teleren/devto huggingface dataset:
Otherdo: Adopt Other People's To-Do List!
Tags: dohackathon, node, react, todolist
Published: 2021-01-06 07:58:54

As a beginner in web development community, I do many tutorials for learning tech stacks and I noticed that they involve to-do app in a way or another. Whether you are learning react hooks or building a simple API with nodejs. That genre of an app is kind of feel saturated in web development world since a long time a go yet there are many successful app in that genre and there seem to be no clear winner at this point. Presumably because each of them offers a certain twist that works or we human species just have many tools for many needs. 

The other day, I was browsing on the internet for an app idea to make use of what I've learned these past weeks. Many blog posts suggested building some big names clone. At first, i was hooked to an idea of an amazon of quotation or collecting app like pinterest but with animal rescue twist. To my present skills and a need for some challange, collecting app would be good choice but animal rescue is too complicated of an issue. 

I stumbled upon this #dohackathon yesterday and sadly for me it's just 5 days to the deadline. But I thought that maybe I can do it, with something simple. And here is where to-do app comes to the rescue. Also, this pandemic make me realize how fascinating the way in which our society is organized with digital apps nowadays. So, Let's just add social functionality. 

The app is a to-do app where you can adopt other people's list. To make it more interesting, instead of sharing a list of all your tasks, you can share a list which consists of some ordered milestones. Other people can adopt your list as a checklist for them to complete. That's the basic idea. I'm sure someone has made this kind of app before and it's not something for me to be upset for. Anyway, I'm exited to work on this project. I plan to use MERN stack which I've been learning these past few weeks. 

This is my first time participating in a hackathon, and also the first time documenting my working process like this. The deadline is in 5 days, but I'll try my best. Thanks to the promise of MERN stach which is scalable, my current goal for now is: at least it is functional. You can check the repo [here](https://github.com/hariswb/otherdo). Let's see where it would go.
What Motivates a Developer to Contribute to Opensource Software?
Tags: github, opensource, django, python
Published: 2021-01-06 09:22:14

What Motivates a Coder to Contribute to Opensource Software?
• Helps you Improve your coding skills
• Gain Early Experience
• Increase Peer Recognition
• Improved Job Prospects
• Improve software on a user and business level

Contribute your code for our opensource project
Visit us @ https://github.com/MicroPyramid/Django-CRM
++ Operator Overloading for a Matrix using Friend function in C++
Tags: cpp, overloading, operator, friend
Published: 2021-01-06 09:11:53

### Define a class named "Matrix"
```cpp
#include <iostream>
using namespace std;

class Matrix
{
private:
    int numbers[3][3];

public:
    void setNumbers(int n[][3]);
    void getNumbers();

    friend Matrix operator++(Matrix);
};
```

### Implement `void setNumbers(int n[][3])`
```cpp
void Matrix::setNumbers(int n[][3])
{
    for (int i = 0; i < 3; i++)
    {
        for (int j = 0; j < 3; j++)
        {
            numbers[i][j] = n[i][j];
        }
    }
}
```

### Implement `void getNumbers()`
```cpp
void Matrix::getNumbers()
{
    for (int i = 0; i < 3; i++)
    {
        for (int j = 0; j < 3; j++)
        {
            cout << numbers[i][j] << "\t";
        }
        cout << endl;
    }
    cout << endl;
}
```

### Implement `Matrix operator++(Matrix n)`
```cpp
Matrix operator++(Matrix n)
{
    for (int i = 0; i < 3; i++)
    {
        for (int j = 0; j < 3; j++)
        {
            n.numbers[i][j] = ++(n.numbers[i][j]);
        }
    }
    return n;
}
```

### Implement `int main()`
```cpp
int main()
{

    Matrix matrix;
    int numbers[3][3] = {
        {1, 2, 3},
        {4, 5, 6},
        {7, 8, 9},
    };

    matrix.setNumbers(numbers);
    matrix.getNumbers();

    matrix = ++matrix;

    matrix.getNumbers();

    return 0;
}
```
Available on YouTube
{% youtube ZL3YLLOHHVw %}
Window PowerShell: "Running scripts is disabled on this machine"
Tags: powershell, typescript, scripts
Published: 2021-01-06 09:07:51

Hey! I know you are here because you tried running a command (probably the TypeScript command `tsc --init`) on PowerShell and its throwing you the error below:
 > running scripts is disabled on this system. For more information, see 
> about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.
> At line:1 char:1
> + tsc --init
> + ~~~
  >  + CategoryInfo          : SecurityError: (:) [], PSSecurityException
  >   + FullyQualifiedErrorId : UnauthorizedAccess

or an error similar to this.

## Why this error?

The error happened because you are trying to execute a script on your machine without you approving it. For security reasons, Windows will not let that happen.

## Solution

The solution to this is to run PowerShell on your machine under administrative rights and enter `set-executionpolicy remotesigned`. You will be asked `Do you want to change execution policy?` select `yes`.

That should solve the problem! Now go back and run the script you had earlier tried to run.

For security reasons, you might want to return the `execution policy` back to `restricted` when you are done - `set-executionpolicy restricted`

[Read more about PowerShell execution policies](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_execution_policies?view=powershell-7.1)
Open-AI starts the year with a bang!!!
Tags: machinelearning, watercooler, datascience, news
Published: 2021-01-06 09:03:57

Open-AI made a lot of buzz last year with the introduction of **GPT-3**. It was able to perform some very unique and beautiful things like building sites and designs, writing essays and stories, articles beating human authors, which are listed in my posts given below

{% link https://dev.to/amananandrai/top-10-best-uses-of-gpt-3-175n %}

{% link https://dev.to/amananandrai/another-10-gems-of-gpt-3-2639 %}

It was also able to write movie scripts
{% link https://dev.to/amananandrai/and-gpt-3-can-write-movie-scripts-4k9g %}

This year OpenAI has started the year with a bang by debuting **DALL-E**. It is a transformer based neural network to make images based on text prompt and image prompt. It is named using a portmanteau of the artist Salvador Dalí and Pixar’s WALL·E. 

According to Open-AI blog 

>DALL·E is a 12-billion parameter version of GPT-3 trained to generate images from text descriptions, using a dataset of text–image pairs. We’ve found that it has a diverse set of capabilities, including creating anthropomorphized versions of animals and objects, combining unrelated concepts in plausible ways, rendering text, and applying transformations to existing images.

Some of the examples of images generated from DALL-E using text prompts are shown below -

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/e7eg4umlfqg3myvrtv2e.PNG)
<hr>
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/r446c5979u38gwjwx4jo.PNG)
<hr>
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/a4ngmsj1i9nonaajknoo.PNG)
<hr>
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/01rr6arhmrywzeyzr764.PNG)
<hr>
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/ag9efqms6vhuj1zm8qft.PNG)
<hr>

You can check more details about it [here](https://openai.com/blog/dall-e/).
Cypress vs. Selenium: Which is the Superior Testing Tool?
Tags: testing, selenium, cypress, softwaretesting
Published: 2021-01-06 08:54:05

Is Cypress really the best alternative to the Selenium WebDriver? Is it better, and if so, in what way? Does Cypress have what it takes to dethrone the reigning king? 

Find out: https://www.cuelogic.com/blog/cypress-vs-selenium
Functions are first class objects
Tags: python, todayilearned, computerscience
Published: 2021-01-06 08:29:08

By functions being first-class objects, we mean that we can:

- assign functions to variables
- store functions in data structures
- pass functions as arguments to other functions
- return functions as values from other functions.

### `Assignment`

```python
def yell(text):
    return text.upper() + '!'

bark = yell
bark('woof')
```

### `Functions can be stored in data structures`

```python
funcs = [str.lower, str.capitalize]

for f in funcs:
    print(f('hey there'))
```

### `Functions can be passed to other functions`

```python
def yell(text):
    return text.upper() + '!'

map(yell, ['hello', 'hey', 'hi'])
```

### `Functions can be returned from other functions`

```python
def talk(volume):
    def whisper(text):
        return text.lower() + '...'
    def yell(text):
        return text.upper() + '!'

    if volume > 0.5:
        return yell
    else:
        return whisper

talk(0.8)("hello")
```
[ PART 2 ] Creating a Twitter clone with GraphQL, Knex, Typescript, and React ( Setup Tests )
Tags: showdev, career, node, javascript
Published: 2021-01-06 08:12:29

[Github Repository](https://github.com/ips-coding-challenge/challenge_twitter)

## Setting up the tests

I will use **jest** for testing and this will be a first for me being more used to **mocha + chai**. I could change to **ava** eventually to if I don't like **jest** ;).

The jest library being already installed, I'm going to install **ts-jest** since I use typescript and it's apparently the easiest way to set up everything.

```sh
yarn add -D ts-jest
yarn ts-jest config:init
```

*package.json*

```json
"scripts": {
    "dev": "nodemon src/index.ts --exec ts-node",
    "build": "shx rm -rf dist/ && tsc -p .",
    "start": "node dist/src/index.js",
    "test": "jest"
},
```

Since I'm going to reuse my server for testing, I'm going to excract it into another file.

*src/server.ts*

```typescript
import 'reflect-metadata'
import { ApolloServer } from 'apollo-server'
import { buildSchema } from 'type-graphql'
import AuthResolver from './resolvers/AuthResolver'

const createServer = async () => {
  return new ApolloServer({
    schema: await buildSchema({
      resolvers: [AuthResolver],
    }),
  })
}

export default createServer

```

And as a result, my index.ts file becomes

*src/index.ts*

```typescript
import dotenv from 'dotenv'
import path from 'path'
import createServer from './server'
dotenv.config({
  path: path.join(__dirname, `../.env.${process.env.NODE_ENV}`),
})

const main = async () => {
  const server = await createServer()

  server.listen().then(({ port }) => {
    console.log(`Listening on port ${port}`)
  })
}
main()

```

In my src directory, I create a tests directory and 2 files, setup.ts and auth.test.ts.

I will also need the apollo-server-testing library

```sh
yarn add -D apollo-server-testing
```

*src/tests/setup.ts*

```typescript
import createServer from '../server'
import { createTestClient } from 'apollo-server-testing'

export const testClient = async () => {
  const server = await createServer()

  return createTestClient(server)
}

```

*src/tests/auth.test.ts*

```typescript
import { gql } from 'apollo-server'
import { testClient } from './setup'

const TEST = gql`
  query {
    me
  }
`

test('it should show hello', async () => {
  const { query } = await testClient()

  const res = await query({ query: TEST })

  expect(res.data.me).toEqual('Hello')
})

```

![Test result](https://dev-to-uploads.s3.amazonaws.com/i/tbugqcoi9fiw3obkaa2a.png)

Looks like it's working, we can finally start having fun :D

The next part will be about **Authentication** ;).

Have a nice day! ;)

You learned 2-3 things and want to buy me a coffee ;)?
https://www.buymeacoffee.com/ipscoding
Javascript Yoga
Published: 2021-01-06 08:02:45

To do yoga with JS I have chosen [vscode](https://code.visualstudio.com/download)

**Steps:**

* Open the Editor 
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/8nst8n856wz7dwhnc8c4.png)

* Create a folder for your JS code, for me, I am using a folder named **JS-yoga** and it can be on anywhere. 
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/rexw6lrhphxxh3v4r923.png)

* Create a sub-folder called `.vscode`
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/ogs1nzghdygm1xtsld1r.png)

* Create a `task.json` file to run with JS code and add the task run commands in JSON format. 
```
{
    "version": "0.1.0",
    "command": "node",
    "isShellCommand": true,
    "args": [
        "--harmony"
    ],

    "tasks": [
        {
            "taskName": "runFile",
            "isTestCommand": true,
            "suppressTaskName": true,
            "showOutput": "always",
            "problemMatcher": "$jshint",
            "args": ["${file}"]
        }
    ]
}
```
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/vxs1uquemkk9p6xi7wk1.png)

* Now it's time to add your JS code file, place code whatever you are learning today on JS. 
And add that .js file to your root directory path. 
For me, the file structure is like
`JS-yoga > yoga.js`

* Now run your code 
`Terminal > Run Task`

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/eqcynky0h7ji36vyfh38.png)

* Select your task 
For me its `runFile`
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/eunzt7p1vpxq2kbgugmk.png)

* Now your output of JS code will appear on the terminal of vscode
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/6th28rmfu0obu02fybfm.png)

**For more convenience you can add a key shortcut to run the task**

Steps:

* Go to menu and open Keyboard Shortcuts

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/jd0c5kltrrplpubrc8e2.png)

* Open the keybindings.json

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/lkgdkfmv4srfp7e14vtz.png)

* Add your desired key to run the task
For me, the key is `cmd+r`, so add the below code
```
[
    {
        "key": "cmd+r",
        "command": "workbench.action.tasks.test"
    }
]
```
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/y8147aazrnidf76bi7y8.png)

* Now go to the js file tab and press the added key to run the code 
For me, I am pressing `cmd+r`

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/8ei82ozmuoqrsm12qpgt.png)

**Tada...**

This article is for javascript beginners. 
Hope that's gonna help you guys. 

#Conclusion
Help to grow other developers and yourself.

Love and best wishes to all creators.

_If you found this article interesting please consider following me on [Twitter](https://twitter.com/ByteNebula), [facebook](https://www.facebook.com/NebulaByte-100116265295910)_
Update Default Date Display
Tags: tutorial, programming, webdev, php
Published: 2021-01-06 07:51:16

This time I will process the data that appears on the page with special conditions, where when today is Saturday or Sunday, the date will display the previous date, namely Friday.

#### Stages:
1. Today's date, time form and day number (`w`)
2. Giving the day deduction parameter (`$minus`)
3. Update the date to be displayed (`$t`)

```php
    $today= date('Y-m-d'); // bisa diganti dengan GETtanggal 
    $time = strtotime($today);
    $day_num = date('w', $time);

    if ($day_num == '0') {
      $minus = '-2 day';
    } elseif ($day_num == '6') {
      $minus = '-1 day';
    } else {
      $minus = '0 day';
    }

    $t = strtotime($today . $minus);
    $t = date('Y-m-d', $t);
```
or

```php
  // case date adalah hari ini
    $day_num = date('w'); 

    if ($day_num == '0') {
      $minus = '-2 day';
    } elseif ($day_num == '6') {
      $minus = '-1 day';
    } else {
      $minus = '0 day';
    }
 
    $t = date('Y-m-d', strtotime($minus));
```
***DONE***
Backend Development: The Ultimate Guide 2021
Tags: laravel, webdev, beginners, javascript
Published: 2021-01-06 22:48:28

---
title: Backend Development: The Ultimate Guide 2021
published: true
date: 2021-01-06 07:10:18 UTC
tags: laravel,webdev,beginners,JavaScript
canonical_url: https://medium.com/backenders-club/backend-development-the-ultimate-guide-2021-6acaf98a432d
---

[![](https://cdn-images-1.medium.com/max/1920/0*v-JLMoo34v_E-cAM.jpg)](https://medium.com/backenders-club/backend-development-the-ultimate-guide-2021-6acaf98a432d?source=rss-8b0955f01559------2)

Learn everything you need to learn backend development in 2021 from knowing nothing about backend development to getting your first job.

[Continue reading on Backend Developers »](https://medium.com/backenders-club/backend-development-the-ultimate-guide-2021-6acaf98a432d?source=rss-8b0955f01559------2)
MY RESUME
Tags: devops, resume
Published: 2021-01-06 07:07:23

Resume

Personal website 


### App Link


### Screenshots


### Description
 

### Link to Source Code

### Permissive License


## Background
(What made you decide to build this particular app? What inspired you?)

### How I built it 
(How did you utilize DigitalOcean’s App Platform? Did you learn something new along the way? Pick up a new skill?)


### Additional Resources/Info
npm yarn node.js
Published: 2021-01-06 06:26:15

we use #npm and #yarn to inlude #packages in our application.
let's clear the #differences between npm and yarn with the help of #geeksforgeeks.
give only 5 minutes and this difference can help you in future.

https://www.geeksforgeeks.org/difference-between-npm-and-yarn/

#geeksforgeeks always #help me. i love geeksforgeeks.
Get your portfolio reviewed for FREE (date announced!)
Tags: webdev, career, beginners, portfoliocon
Published: 2021-01-06 06:03:21

---
title: Get your portfolio reviewed for FREE (date announced!)
published: true
description: PortfolioCon 2021 is happening January 13-15, 2021, starting at 12 pm CST each day on the RealToughCandy YouTube channel.
tags: webdev, career, beginner, portfoliocon
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/h3mhqy18w9zilb0scfvp.jpg
---

Wow! Over the last few days [we've received over 60 portfolio submissions and counting](https://dev.to/realtoughcandy/get-your-web-developer-portfolio-reviewed-for-free-2p13)) for our annual portfolio review livestream on YouTube. 🎉🥳

The response has been so fantastic, we've decided to turn the event into a 3-day event: welcome to Portfoliocon 2021. 

![pixelated manila folder with portfoliocon text](https://dev-to-uploads.s3.amazonaws.com/i/h3mhqy18w9zilb0scfvp.jpg)

## **Portfoliocon 2021 will run from January 13th through the 15th. Start time will be at 12 pm CST each day.** 

Aside from reviewing real-world portfolios, I'll be doing some valuable giveaways and other fun stuff. You don't want to miss this one.

Be sure to [subscribe to me on YouTube](https://www.youtube.com/realtoughcandy?sub_confirmation=1 ) so you don't miss the festivities. 

Finally, please show your support to these developers on Dev.to who are sharing their work with the world! 

See you soon.
Enough JavaScript to get you Started : #1 How It works?
Tags: beginners, javascript, webdev, 100daysofcode
Published: 2021-01-06 05:39:43

### How a Program Works?

![ipo.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1609861948843/h1pnbMFhA.png)


### The Core Steps

1. Input
1. Process (Bussiness Logic)
1. Output

### How it works? 
as we can see in the image any program works majorly on 3 core steps namely **Input**, **process** and **output**

**Example**  <br>

Consider building a simple calculator , we'll divide this main problem into part of small problems to identify what is input , what are processes and what output we want our code to generate

### Smaller Parts of main Problem

1. simple calculator can perform operations like addition , subtraction, multiplication and division for the sake of understanding.

1. it should generate a output based on what operation our end user wants to perform.

1. After generating our code should display result in appropriate manner which can be understandable to end user. 

### Thinking in Terms of IPO

1. Input : in given problem we can consider 3 inputs from a user (i.e number1 , number2 and operation which user want to perform [+,-,*,/] ).

1. Process : after taking input our code should be able to perform operation which user want code to perform in our case simple calculations.

1. Output : result generated in process will be shown to user .


### How JS works behind the scenes?

After Writing the code, we need to execute it. in our case we need a browser environment (i.e chrome,firefox,safari). All of these browsers have a compilation engine built in which comes with software. 

work of compilation engine or compiler is to compile the written code and convert it into machine understandable code !

**Different Compilers :** <br> 
👉 Chrome : V8<br>
👉 Firefox : Spider Monkey<br>
👉 Safari : WebKit

> JavaScript is an interpreted language, not a compiled language. A program such as C++ or Java needs to be compiled before it is run. The source code is passed through a program called a compiler, which translates it into bytecode that the machine understands and can execute. In contrast, JavaScript has no compilation step. Instead, an interpreter in the browser reads over the JavaScript code, interprets each line, and runs it. More modern browsers use a technology known as Just-In-Time (JIT) compilation, which compiles JavaScript to executable bytecode just as it is about to run.

<p>Let me know in comment section if you have any doubt or feedback. it's always worth to give time to thriving developer community :) <br>
<br>
Keep Coding ❤
</p>