teleren/devto huggingface dataset:
Ten Days of Code: Task 2
Published: 2020-10-11 15:00:29

---
series: TenDaysOfCode2020
---

## Task-2
Date: 04-Oct-20
Codes: [task2_arnabsen1729](https://github.com/arnabsen1729/TDoC-Noughts-and-Crosses/tree/main/task2_arnabsen1729)
### Problem Statement

**Subtask-1**

Let’s create our first client and server. We’ll begin with a simple implementation. The server will simply echo
whatever it receives back to the client.

**Subtask-2**

Now in this part, the server will be handling more than 1 client simultaneously, which can be achieved by threading.


### My Approach

Subtask-1 is fairly simple, almost similar to the first one except the fact that this time the server will echo whatever the client sends. 

Subtask-2 is an extension of the subtask-1. For this subtask a basic knowledge of threading is required. The mentors provided us a guide(link provided in the bottom). Now the main reason why threading is required is because when you handle one client you are receiving and sending data continuously which is basically an infinite loop. Now while this is going, normally the program will not be able to accept other clients, since its stuck in the loop. So, each connection to a client is threaded, and those thread will run simultaneously. Basically, because of one client(a thread) the other clients don't have to wait. That is the main reason why we need threads for this problem. Now there are various ways to handle threads. One of the easiest way is

```python
t = threading.Thread(target=myFunction, [args=(arg1, arg2, ...)])
t.start()
```

We can also use `ThreadPoolExecutor`, and it’s part of the standard library in `concurrent.futures`

Now, all this has to be done in the server side. The client side, remains the same. 

**P.S** There is a `test.py` file in subtask-2 folder, it is another client script but sends the same message in an infinite loop. So, I ran the server script then this test script and after that a normal client script. So while the test script was sending the same thing over and over again, I typed some messages from the client script and the server echoed it back. Thus, threading worked like a charm.
### Sample

Subtask-1

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

Subtask-2
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/3iagc9lvr5423q1j2t0c.gif)





### Resources

1. [Task 2 Problem Statement and guide](https://drive.google.com/file/d/1qwJGfjYzLl68RaYt_hzgmEp8DJxYz7SY/view)
2. [RealPython: Threading ](https://realpython.com/intro-to-python-threading/)

Thanks to [@lugnitdgp](https://github.com/lugnitdgp) for their awesome guidance <3
Learn Next.JS by doing!
Tags: tutorial, react
Published: 2020-10-11 14:51:25

[Next.JS](https://nextjs.org/) is a great framework! 

I created something that (hopefully) makes it fun to learn. 

[Learn Next.JS](https://next-small-challenge.vercel.app/)

Is small set of 3 small challenges. I will definitely appreciate all feedback possible since this can be improved and maybe create similar resources for other technologies? 

Let me know what you think!!

![Challenge 1 Screenshot](https://dev-to-uploads.s3.amazonaws.com/i/dpwvkkj4qvchlwwdzyql.png)

![Challenge 2 Screenshot](https://dev-to-uploads.s3.amazonaws.com/i/w6yg9a7z7xfshzbt71gr.png)

![Challenge 3 Screenshot](https://dev-to-uploads.s3.amazonaws.com/i/oeiyl2sh0zzlfjn27yfj.png) 

[Solve the challenges!](https://next-small-challenge.vercel.app/)
Install a specific version of a package
Tags: npm, webdev, beginners, codenewbie
Published: 2020-10-11 14:02:47

Syntax - `npm install <package>@<version>`  
Example - `npm install nodemon@2.0.1`

---

**Thanks for reading 💙**  
Follow **@codedrops.tech** for daily posts.  
[Instagram](https://www.instagram.com/codedrops.tech/) ● [Twitter](https://twitter.com/codedrops_tech) ● [Facebook](https://www.facebook.com/codedrops.tech/)

Micro-Learning ● Web Development ● Javascript ● MERN stack ● Javascript  
**[codedrops.tech](https://www.codedrops.tech/)**
Highlights and new Features in Angular 11
Tags: angular, javascript
Published: 2020-10-11 14:01:39

#### Angular version 11 highlights according to Minko Gechev 

In the last [Community Q&A](https://www.youtube.com/watch?v=ax0JXFeCBIg), Angular team member Minko Gechev gave us his highlights for Angular version 11. He explained that Angular has an amazing philosophy of being an evergreen framework. This means that new features are only an `ng update` away - your code will automatically be migrated to support the newest features. You can enjoy faster builds, a smaller application and an improved developer experience without going through a painful update process. In the upcoming update the Angular team and contributors stay true to this promise and deliver some great improvements:

1. **Easier HMR (hot module reloading) support** will be released. This makes it quicker to see code changes in your browser after changing. While HMR is currently supported already, it will be much easier than before. You will be able to enable HMR by using a simple flag.
2. The Angular team has worked closely with James Henry (ESLint team) and the community to **improve ESLint support and provide a migration path from TSLint to ESLint**.
3. There will be an opt-in preview for the **Ivy Language Service** - this means **better type checking and autocomplete in your templates**!
4. Ngcc - the Angular compiler - will be **up to 4x faster in Angular 11**. This means you spend less time waiting for builds and rebuilds to complete. When profiling the Angular compiler, Angular contributor Joost had to make the Typescript compiler faster to improve Ngcc! This change will land in Typescript 4.1 - so when Angular supports Typescript 4.1 you’ll automatically get faster builds.

For a detailed list of all changes, fixes and additions refer to the [official changelog](https://github.com/angular/angular/blob/master/CHANGELOG.md) and [roadmap](https://angular.io/guide/roadmap).
Ten Days of Code: by NIT Dgp Introduction
Tags: opensource, hacktoberfest, python
Published: 2020-10-11 13:54:49

---
series: TenDaysOfCode2020
---

### What is 10 Days of Code

Website: https://nitdgplug.org/

[There is also a discord channel, you can contact through the number and mail in the website if you want to join the server]

10 Days of Code as the name suggests is a 10 day initiative taken by the NIT Dgp to encourage young minds to take up coding and take them through a comprehensive process of building a project from scratch. So participants are divided among 4 projects, each projects have their mentors who guide the participants to complete the tasks and the final build. 


The mentors are a part of GNU/Linux Users' Group, NIT Durgapur. The best part is that whatever contributions you make will be considered for Hacktoberfest 2020. Since hacktoberfest requires 4 PRs  and there are 4 tasks i.e the participants has to make a PR for each task and by the end of 10 Days of Code, every participant will have 5 PRs and hence will be qualified for Hacktoberfest. Also there is a final open innovation challenge for 3days where the participants had to innovate their projects. 

I was a part of the Noughts and Crosses project, and our mentors were:-

- [@Phantsure](https://github.com/Phantsure)
- [@ЕЯЯОЯ](https://github.com/Error-200)
- [@ramiz07](https://github.com/deadlycoder07)
- [@kumanik](https://github.com/kumanik5661)

For every task we were given resources and guides, also regular sessions were held to solve doubts and give ideas on how to execute the next tasks.

In this series I will walk thorough my tasks, how I approached them, what resources I followed, and finally how to make a Multiplayer TicTacToe. :)

We had to fork the repo provided to us. This is my fork:
https://github.com/arnabsen1729/TDoC-Noughts-and-Crosses

The problem statements are here:
https://drive.google.com/drive/u/0/folders/17IKIx3HlIeR6tP5N2IAPBQqFhtvywS1w
A simple language spec isn’t a feature when you’re building applications
Published: 2021-01-23 15:41:13

---
title: A simple language spec isn’t a feature when you’re building applications
published: true
date: 2020-10-11 13:35:00 UTC
tags: 
canonical_url: https://www.rakeroutes.com/a-simple-language-spec-isn-t-a-feature-when-you-re-building-applications
---

Go famously gushes about its [simple and readable language specification](https://golang.org/ref/spec). One one hand kudos to Go for having a written specification and kudos for rigorously keeping the language simple.

But on the other, more pragmatic, hand a simple language spec means the language itself has fewer affordances out of the box. Programmers will be left to spin up their own designs for everything else. And, as we see in JavaScript, that’s a problem if you want to encourage a shared language community.

Everyone comes up with their own patterns, patterns which may not be obvious even as they are made up of the common components from the language spec.

## A little copying

Go actively encourages this way of programming with the idiom “a little copying is better than a little dependency.” Here they are actively avoiding one of the major pitfalls of NodeJS. But at what cost?

## A lot of places

I say the cost is higher than the blithe quote indicates. A little copying from one place leads to an accumulation of a lot of copying from many places. Because the copying isn’t named, versioned, or isolated it is peppered throughout the resulting program. And _that_ means if you find a flaw you have many places to fix. And, worse, if someone else finds a flaw you have no idea unless you come across and recognize the improved version of that little copy.

## Go is for systems not applications

Now, to be clear, I don’t think this is a flaw for Go’s supposed primary purpose: a systems programming language. Systems programming should be short, simple, sharp tools to perform high quality work with a strong performance story. You don’t want to burden your systems with huge, complex, dull, and ill-performing tools. Excel is wonderful, Excel is not a systems tool. Excel is an application.

But many programmers out there are building, or trying to build, the equivalent to Excel in Go. To write not sharp tools but large applications in Go because Go has become their hammer and everything is a nail even if it’s a skyscraper.
Fullstack GraphQL starter kit October update
Tags: javascript, typescript, react, node
Published: 2020-10-11 13:30:13

Hi Dev.to community, I am excited to share the october update which adds exciting things to the starter kit.

<b>Changes:<b/>

- [React refresh](https://www.npmjs.com/package/react-refresh) is now available
- Out of the box GraphQL subscriptions supports
- update Prisma v2.8.1

<i>Full changelog/PR is available [here](https://github.com/karanpratapsingh/fullstack-starterkit/pull/19)


Github: https://github.com/karanpratapsingh/fullstack-starterkit

What do you think? as always feel free to reach out if you face any issues.

Happy coding :tada:
What is SQL?
Tags: sql, mysql, database
Published: 2020-10-11 12:42:12

SQL is Structured Query Language, which is a computer language for storing, manipulating and retrieving data stored in a relational database.

SQL is the standard language for Relational Database System. All the Relational Database Management Systems (RDMS) like MySQL, MS Access, Oracle, Sybase, Informix, Postgres and SQL Server use SQL as their standard database language.

Every table is broken up into smaller entities called fields. The fields in the Customers table consist of CustomerID, CustomerName, Address, City, PostalCode and Country. A field is a column in a table that is designed to maintain specific information about every record in the table.

A record, also called a row, is each individual entry that exists in a table. For example, there are 91 records in the above Customers table. A record is a horizontal entity in a table.

A column is a vertical entity in a table that contains all information associated with a specific field in a table.
#Why SQL?
SQL is widely popular because it offers the following advantages −

Allows users to access data in the relational database management systems.
Allows users to describe the data.
Allows users to define the data in a database and manipulate that data.
Allows to embed within other languages using SQL modules, libraries & pre-compilers.
Allows users to create and drop databases and tables.
Allows users to create view, stored procedure, functions in a database.
Allows users to set permissions on tables, procedures and views.
#A Brief History of SQL
1970 − Dr. Edgar F. "Ted" Codd of IBM is known as the father of relational databases. He described a relational model for databases.
1974 − Structured Query Language appeared.
1978 − IBM worked to develop Codd's ideas and released a product named System/R.
1986 − IBM developed the first prototype of relational database and standardized by ANSI. The first relational database was released by Relational Software which later came to be known as Oracle.
#Some of The Most Important SQL Commands
SELECT - extracts data from a database
UPDATE - updates data in a database
DELETE - deletes data from a database
INSERT INTO - inserts new data into a database
CREATE DATABASE - creates a new database
ALTER DATABASE - modifies a database
CREATE TABLE - creates a new table
ALTER TABLE - modifies a table
DROP TABLE - deletes a table
CREATE INDEX - creates an index (search key)
DROP INDEX - deletes an index
What is Database?
Tags: database, sql, datascience, mysql
Published: 2020-10-11 12:36:07

A database is an organized collection of structured information, or data, typically stored electronically in a computer system. A database is usually controlled by a database management system (DBMS). Together, the data and the DBMS, along with the applications that are associated with them, are referred to as a database system, often shortened to just database.

Data within the most common types of databases in operation today is typically modeled in rows and columns in a series of tables to make processing and data querying efficient. The data can then be easily accessed, managed, modified, updated, controlled, and organized. Most databases use structured query language (SQL) for writing and querying data.
Link Department
Published: 2020-10-11 12:05:44

Your competitors look to professional link building agencies for high-performance backlink packages that will make them stand out and dominate their industries. If you want to stay ahead of them, you will need the best tools and resources for creating backlinks for your business. 
Link Department is a backlink building agency with experience and high-quality solutions that redefine backlink services. With our team, you will be able to provide your brand with high-value links that will help grow its awareness. 
Reach out to Link Department today for a free backlink quality analysis and start expanding your online authority!
Address: Malden, MA 02148, USA
Phone:      929-429-2712
Website:   https://linkdepartment.com
Making an HR software with Spring Boot Part II
Tags: java, mysql, springboot
Published: 2020-10-11 10:49:05

Welcome to the second part of this not really awesome tutorial, on how to make an employee management system in java. In the last tutorial, we decided ... actually, I decided to describe what we are going to be doing, and why ...ish. 

Now, I know I unilaterally decided on the technology stack, so let me go back to that for a bit. The *Dull Company* makes underground bunkers for presidents and rich people (*umm ... yes*). It has been operational for a few decades, and it employs a a few hundred people. Since *Aware* is a Java based software, the new IT Director is convinced that Java is the best language for developing software (*don't ask me...*). Therefore, all IT based systems, even the once they have outsourced, are all Java systems. With his bias, he told you to use Java with MySQL, hence the Spring Boot unilateral declaration. Anyway, there are other technology stacks included in the entire package, and these include but are not limited to *Elastic Search* and *Apache Kafka*, and for DevOps, there's *Jenkins*, *Docker* and *Kubernetes*. However, I will not be covering these technologies in this tutorial series. (*Because I'm too lazy lol*) 

So, in this tutorial, we are going to design the database of the system. Actually, scratch that. I'm going to post an already made database design, and I'll try my best to explain how I came up with it. The software I used to make the database design is [draw.io](https://draw.io). 

Of course, the database could be better, and of course, there's a better way of doing things. However, this way works, and it's for educational purposes. Therefore, it'd be nice if someone could give me a break.

Anyway, continuing with our scenario, as the software engineer, you have managed to sit down with *HR*, and they've given you the requirements. The requirements are as vague as they can be, and someone even had the decency to draft a "requirements specification document". Don't ask me who!

However, you, being smarter than everyone, manage to figure out what the company *needs*. And yes, scratch what they want ... (*ahem*). So, going through the *SRS*, you know that every *employee* is *under a department*. *Each department has a manager*, and this is a *job title* given to privileged individuals (*ahem*). There are different job titles, for example, you being a Software Engineer, means that is your job title under the IT department.  

Every employee is entitled to *leave days*, and if an employee misbehaves, it must be recorded in the system. 

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

So, above is the diagram I've drawn using draw.io, and that's what we're going to be using for the database. Now that we're done with database design, we're going to start implementing the database in the next tutorials. 

Yes, I know the database diagram can be better, and some parts *might* be total BS (*ummm*), but then again ... it works! (*I know it does*) Let's continue in the next tutorial...
Daily Developer Jokes - Sunday, Oct 11, 2020
Tags: jokes, dailydeveloperjokes
Published: 2020-10-11 12:00:16

---
title: "Daily Developer Jokes - Sunday, Oct 11, 2020"
description: "Check out today's daily developer joke! (a project by Fred Adams at xtrp.io)"
series: "Daily Developer Jokes"
cover_image: "https://private.xtrp.io/projects/DailyDeveloperJokes/thumbnail_generator/?date=Sunday%2C%20Oct%2011%2C%202020"
published: true
tags: #jokes, #dailydeveloperjokes
---

Generated by Daily Developer Jokes, a project by [Fred Adams](https://xtrp.io/) ([@xtrp](https://dev.to/xtrp) on DEV)

___Read about Daily Developer Jokes on [this blog post](https://xtrp.io/blog/2020/01/12/daily-jokes-bot-release/), and check out the [Daily Developer Jokes Website](https://dailydeveloperjokes.github.io/).___
### Today's Joke is...
![Joke Image](https://private.xtrp.io/projects/DailyDeveloperJokes/public_image_server/images/5e1259a37a785.png)

---
*Have a joke idea for a future post? Email ___[xtrp@xtrp.io](mailto:xtrp@xtrp.io)___ with your suggestions!*

*This joke comes from [Dad-Jokes GitHub Repo by Wes Bos](https://github.com/wesbos/dad-jokes) (thank you!), whose owner has given me permission to use this joke with credit.*

<!-- 
Joke text:
A new database query walks into a bar.

The server says "Sorry, cache only."
 -->
Feel like home coming. (Newbie)
Tags: webdev
Published: 2020-10-11 11:53:55

I'm really amazed by dev.to for giving us such a amazing community.
Seeing people are sharing there amazing knowledge with others, That's wonderful.

I will keep up with dev.to - Will you too ??

Hell!, I wanna know your answer too. 
please do share how you feel finding this place.

Thanks.
Sakib.
How to Create Multi Auth (Authentication) in Laravel 8 Tutorial 
Tags: laravel
Published: 2020-10-11 11:47:11

system means multiple users can log in to one application according to roles and use multiple pages.

Multiple authentications are very important in the large application of laravel projects. Authentication is the process of recognizing user and admin credentials.

**[How to Create Multi Auth (Authentication) in Laravel 8 Tutorial ](https://www.phpcodingstuff.com/blog/how-to-create-multi-auth-authentication-in-laravel-8.html)**

Create a middleware for checking the user’s role in multiple authentications. It is an admin or normal user. Then create middleware name is Admin and configuration in the kernal.php file and also in the route file.
Mimic mobile password input with React
Tags: react, forms, security, ux
Published: 2020-10-11 11:15:42

**Initially published in the RabbitPeepers blog:** https://rabbitpeepers.com/blog/mimic-mobile-password-input-with-react-827188fb-d0e8-477e-8699-7dbccc59cc77

Hello everyone!

Sometimes it can be pretty handy to utilize cross-platform concepts to introduce a bit of comfort for our users.
We came up with the idea to use mobile password behavior that can improve input accuracy for fields like tokens, IDs, and anything else containing sensitive information.

Please see **react-mimic-password-hook**.

### Features

- Mask input per-type
- Mask input after a delay
- TypeScript support
- Tested and ready for commercial use

#### `persymbol` mode

![persymbol-demo.gif](https://squidex.rabbitpeepers.work/api/assets/test1/32658219-1de4-4e7e-a2de-282b9b7be3ef/persymbol-demo.gif 'persymbol-demo.gif')

#### `delayed` mode

![Screen Recording 2020-09-14 at 16.55.33.gif](https://squidex.rabbitpeepers.work/api/assets/test1/2e636a8a-5d53-4e88-804f-b20ee6f40870/screen-recording-2020-09-14-at-16.55.33.gif 'Screen Recording 2020-09-14 at 16.55.33.gif')

### Installation

With yarn:
```
yarn add react-mimic-password-hook
```

With npm:
```
npm install react-mimic-password-hook
```

### Quickstart

```jsx
import React from 'react';
import { useMimicPassword } from 'react-mimic-password-hook';

function App() {
  const handleChange = React.useCallback((value, event) => { console.log(value) }, [])

  const [value, presentation, onChange] = useMimicPassword({
    // All these parameters are optional
    mask: '•',
    delay: 1000,
    mode: 'delayed',
    handleChange
  })

  return (
    <input value={presentation} onChange={onChange} />
  )
}
```

### Options

| Name           | Type     | Default     | Description
|----------------|----------|-------------|--------------------------------
| `mask`         | string   |  `•`        | Symbol to mask the original input.
| `delay`        | number   | 1000        | Time in miliseconds before text is masked.
| `mode`         | string   | `delayed`   | `delayed` or `persymbol`
| `handleChange` | function | *undefined* | Callback function for `onChange` that accepts two arguments. E. g. `(value, event) => void`

### API

`useMimicPassword` returns an array with 3 members:

- Original input value.
- Masked presentation value.
- `onChange` callback that return next value.

For a more advanced guide please see [GitHub page](https://github.com/nikpl7777/react-mimic-password-hook).

Happy coding!
Custom Packaging
Tags: custompackaging
Published: 2020-10-11 11:14:59

Custom Packaging are now ubiquitous in our everyday life. These custom packaging boxes are simple to locate, so each modification might be made to them, which suits the innovation and uniqueness of the company’s item. Although the structures of Custom boxes with logo are creative, these wholesale custom boxes could also be imprinted with multiple furnishing and design alternatives to distinguish all such boxes from one another & to make them stand up on their own in the market. For more visit:
https://fastcustomboxes.com/