teleren/devto huggingface dataset:
Puzzle Solver
Tags: beginners, career, codenewbie
Published: 2020-06-22 21:05:28

A few weeks ago I sent an e-mail to my subscribers and ended it asking the following question:

**What's your motivation for coding? What do you want to learn?**

I had many incredible replies and took my time going through each of them and replying them all.

There was one reply that stuck in me head (I won't identify the person since I didn't ask his/her permission):

> Two main reasons why I’m learning to code are: 1. problem solving
> and 2. looking to change job sector.

> Problem solving because I want to be able to find automated solutions
> to everyday problems that I find to be a nuisance.

> Change of jobs because I feel no passion about what I am currently
> doing. I’ve felt more alive in the few months I’ve been learning
> to code and solving problems in Python and other programs than what
> I’ve felt in my entire career as a lawyer.

To which I replied:

> Problem-solving is truly one of the main skills in programming.

> The job market for programmers is only growing and far from its peak, so I would say you  are at the right time to make a change.

> This feeling you are describing is what I call "Puzzle Solver Feeling".

> Programming is about solving puzzles daily.

A programmer is someone paid to solve puzzles.

The problem you are given is often a total mess and you have to make sense out of it.

It doesn't matter the language or the tools you are using, learn problem-solving and the rest will follow.

How to learn problem-solving?

By practicing with problems and projects the general problem-solving flow:

* Analyze and understand the problem
* What are the inputs
* What is the required output
* Plan the solution
* Break the problem into smaller parts
* Break the parts into tasks
* If you get stuck, step back a little and rethink your approach
* Test the solution
* Fix errors that might appear, face them like challenges, not annoyances
* Iterate the steps until success

Programming teaches you to think better.

Become a Puzzle Solver.
Have you tried Rust?
Tags: rust, discuss
Published: 2020-06-22 20:56:39

---
title: Have you tried Rust?
published: true
description: A discussion around Rust and first impressions.
tags: rust, discuss
---

For the fifth year in a row, Rust comes out as the most-loved programming language according to [Stack Overflow's 2020 Survey](https://insights.stackoverflow.com/survey/2020 ).

Have you tried it yet? If so, what are your first impressions?

If you haven't, what's the reason, or what would make you want to try it?

Would love to hear your thoughts 😃
Starting class that covers IT [WGU basics]
Tags: codenewbie, webdev, database, sql
Published: 2020-06-22 20:49:30

Midway through my general software development beginners class.  The class is interesting and re-ignited my desire to work with Database Management.  Only touched on SQL a little and excited to move into C# and Java.  Maybe Python eventually to do the back end, but one step at a time.  All the best.
> echo "Hello Dev.to"
Tags: hellodevto, fr
Published: 2020-06-22 20:46:50

---
title: > echo "Hello Dev.to"
published: true
description: My first article in Dev.to
tags: helloDevTo, fr
cover_image: https://miro.medium.com/max/1000/1*orQnsc9FU6PQVeAa0TInhQ.jpeg
---

Premièrement, celui-ci est mon premier article sur la plateforme `Dev.to`. Avant j'avais écrit sur jeux vidéos mais après je décide écrire sur la programmation dans la plateforme de `Medium` dont parfois j'écrit. J'ai profité écrire des jeux vidéos longtemps parce que je les aimes.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/02taqu5pcct8s1fbyq5d.jpg)

Après de cette petite introduction, je m'appelle Paul Arizpe mais tout le monde me connais comment "Kira Mishima"(mon nom d'utilisateur de [Github](https://github.com/kiramishima) ). J'ai étudié à l'université de Puebla après j'ai pris différents cours pour mettre à jour mes connaissances. Je suis Backend Développeur donc j'utilise principalement les langues de programmation `PHP` , `C#` , `Golang` , `NodeJS` et parfois `Python`, `F#` et `Elixir`. Parfois je program le frontend en utilisant `Angular X` ou `Vue`. Il est rare que je fasse le rôle de DevOps dans lequel j'utilise `Ansible`, `AWS CLI`, `Azure CLI` et `Bash`.

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

De temps en temps je participe aux Hackathons avec amis et amies dont on y utilise nos connaissances de programmation. Sous le prétexte d'aller manger pizza, je les amène aux évènements. Ainsi je suis le gars qui a changé un Backend complet fait en Java à Golang en 3hrs dans un Hackathon.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/3cclz6zf0kbn6w36cyy6.jpg)

Maintenant j'étude à l'Alliance Française au Mexique donc un jour après du confinement, j'aimerais travailler en France ou Canada. Parfois j'ai fait de directs sur [Twitch](https://www.twitch.tv/kiramishima) et [FB Gaming](https://www.facebook.com/TheKiraMishima/?modal=admin_todo_tour) où j'enseigne les choses que j'ai appris. Finalement je vous remercie pour lire cette petite introduction et j'espèrerait écrire le plus tôt possible.
Taskban, a free and open source personal productivity application
Tags: csharp, architecture, productivity, opensource
Published: 2020-06-22 19:53:21

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

I am a software engineering student and have learned a lot from people who share their knowledge for free. So I also wanted to contribute to this cause that knowledge is free and collective.

# Taskban
A personal productivity tool developed with C# and XAML. I want it to be a combination of three tools: a task list, a Kanban board and a pomodoro. So, in the future, I will finish developing it.

## Why?
It was mainly because I was looking for an application that combines a Microsoft To Do style, a kanban board and a pomodoro for tasks.
I still need to develop some features like the pomodoro, but I will do it eventually.
I would like to have your criticism and opinions because maybe I don't know many things that I should know. For example, best practices or design patterns.

## Download and source
https://github.com/jamerbi/Taskban
Date Object in Javascript
Tags: javascript, codenewbie, todayilearned, beginners
Published: 2020-06-22 19:50:15

**This article is first published on [hackinbits.com](https://hackinbits.com/articles)**

---

In this article, we will learn about the Javascript Date Object. Date Object stores the date-time and also provides methods for working with them.

In Javascript, the Date is stored as the number of milliseconds elapsed since 1st January 1970 midnight. This date is also known as UNIX Epoch.

## Creating a Date Object

We use the new keyword to create a Date Object. There are several ways to create Javascript dates using the Date Object: 

```javascript
new Date()
new Date(milliseconds)
new Date(date string)
new Date(year, month, date, hours, minutes, seconds, milliseconds)
```

## new Date()

new Date() without any arguments will return the current date-time. 

```javascript
let date = new Date();
console.log(date);
//return current date-time
// format: Thu May 14 2020 00:41:03 GMT+0530 (India Standard Time)
```

## new Date(milliseconds)

new Date(milliseconds) creates a Date object with date-time equal to the total number of milliseconds elapsed since 1st January 1970 UTC+0.

The time elapsed in milliseconds from 1st January 1970 is known as a **timestamp**.

```javascript
let unixEpoch = new Date(0);
console.log(unixEpoch);
// Thu Jan 01 1970 05:30:00 GMT+0530 (India Standard Time)

let unixEpochAnd2Days = new Date(2 * 24 * 3600 * 1000);
console.log(unixEpochAnd2Days);
// Sat Jan 03 1970 05:30:00 GMT+0530 (India Standard Time)
```

To create a Date object with a date earlier than 1st January 1970, we pass negative timestamp to the Date constructor.

```javascript
let ADayBeforeUnixEpoch = new Date(- 24 * 3600 * 1000);
console.log(ADayBeforeUnixEpoch);
// Wed Dec 31 1969 05:30:00 GMT+0530 (India Standard Time)
```


## new Date(year, month, date, hours, minutes, seconds, milliseconds)

You can create a Date object for a given year, month, and other parameters using Date constructor. The first two parameters are mandatory.

```javascript
let date = new Date(2019, 00, 30, 01, 01, 01, 0);
console.log(date);
// Wed Jan 30 2019 01:01:01 GMT+0530 (India Standard Time)

let date = new Date(2019, 00)
console.log(date)
// Tue Jan 01 2019 00:00:00 GMT+0530 (India Standard Time)
``` 

> If you have passed only one parameter, Date object will take it as milliseconds. 

Parameters: 
- year: year must have 4 digits, for example, 2016. 
- month: In javascript month starts from 0, so January will be 0, February will be 1, and so on. 
- date: date of the month, if not provided, default is set to 1.
- Defaults for all other parameters: hours, minutes, seconds, and milliseconds are taken as 0 if not provided. 



## new Date(date string)
new Date(date string) creates a Date object from the date string.
We will discuss the date string in detail in the next article.
 
## Exercise
Let's practice what you have learned above. 

1. Create a date object with the date equal to one week hence 1st January 1970.
2. Create a date object with the date equal to one week before 1st January 1970. 

Let us know your answers in the comments. Have a nice day.
Which Linux / DevOps sites do you recommend?
Tags: devops, linux, beginners, discuss
Published: 2020-06-22 19:44:40


Below is my customized **search query box** for searching articles within best-known websites to me. 

You can also put any search query related to Linux / DevOps and get the best standard results from selected websites.

 Link: https://manish.imfast.io

>Earlier it was shared  with frontend guys:
 {% link https://dev.to/manishfoodtechs/metasearch-engine-in-html-google-a-great-utility-2m21 %}

The current sites in the box are:
        'https://digitalocean.com',
        'https://teleconnector.com',
        'https://dev.to',
        'https://www.omgubuntu.co.uk/',
        'http://ubuntuhandbook.org',
        'https://vitux.com/',
        'https://www.techdrivein.com/',
        'https://www.linuxbabe.com/',
        'http://www.webupd8.org/',
        'https://www.scaleway.com/',
        'https://linuxconfig.org',
        'https://upcloud.com/',
        'https://www.techrepublic.com/',
        'https://vitux.com/',
        'https://www.cyberciti.biz/',
        'https://ovh.com',
        'http://www.penguintutor.com/',
        'https://www.tecmint.com/',
        'https://spacelift.io/blog'

#**what are other best Linux / DevOps sites do you recommend?**
What did you make during lockdown? 👀
Tags: showdev, sideprojects, webdev, nocode
Published: 2020-06-22 19:43:01

*(reposting from HN because I ❤️ DEV.to)*
While we were all in lockdown a lot of makers have been making incredible things. So I decided to make Lockdown Showcase to showcase all those products.

Post your own product or browse through other ones here: https://lockdownshowcase.com/

A few interesting pieces of information (for those of you who are interested):
🌞 🌚 Built and launched in 1 day
⛔️ Made entirely without code using:
🖼 Website: https://carrd.co
🗃 Database: https://airtable.com
📧 Newsletter: https://getrevue.co
🎨 Art: https://figma.com

We are also live on __Product Hunt__ (https://bit.ly/3dmawLR) and would love your feedback 🙏🏼

So... what did YOU build during lockdown? 👀

-S
Serving HTML pages with GatsbyJS
Tags: gatsby, html
Published: 2020-06-22 19:21:30

Recently, I was working on a GatsbyJS website and wanted to port over a few HTML pages with Javascript in them without converting them to React to get a prototype of the site up faster. However, after some trial and tribulation, I learned that this simple idea was not so straightforward in reality. 

# The Static directory
[This](https://www.gatsbyjs.org/docs/static-folder/) doc explains that GatsbyJS provides a `static` directory where one can put files that are not part of the module system. Sounds perfect for our HTML pages!

Resulting file structure:
`
/src
/static
----/<we would like our HTML pages to go here>
`

# The Problem
As [this](https://github.com/gatsbyjs/gatsby/issues/13072) Github issues mentions, there is a bug in GatsbyJS that makes it so accessing HTML pages gives a 404 page. 

# The Workaround 
When I was investigating this problem, I noticed that GatsbyJS wasn't serving HTML pages specifically. When I tried to access a JPG file or a PHP file located in the `static` folder, they were all served without a hitch. 

After researching other ways to display HTML pages in a web browser, and after reading comments [Github issue](https://github.com/gatsbyjs/gatsby/issues/13072) which reported the problem, I decided to convert my page to XHTML so GatsbyJS could serve it properly. 

Now, you might be wondering why I didn't just covert the pages to React since I have decided that their original format won't work anyways. Well, converting to XHTML is much easier than converting to React. In fact, sites such as (this one)[http://www.it.uc3m.es/jaf/html2xhtml/simple-form.html] will convert the pages for you! Just be sure to check that all your Javascript functionality is copied over too. A few of my `onclick` function calls were removed, but copying and pasting them back in worked flawlessly. 

Final file structure:
`
/src
/static
----/approve-event.xhtml
`

# Conclusion
Converting my HTML pages to XHTML and putting them in the `static` folder was a quick way to port over pages to a website generated with GatsbyJS. 

If anyone knows why GatsbyJS won't serve HTML pages, I would love to hear about it.

How are you using GatsbyJS? Leave a comment below!

---
Cover image by <a href="https://pixabay.com/users/aitoff-388338/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=2129569">Andrew Martin</a> from <a href="https://pixabay.com/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=2129569">Pixabay</a>
Let Google read that to you
Tags: android, screenreader, tutorial
Published: 2020-06-22 19:02:18

Recently I've discovered phones running the Google assistant have the power to read posts to you. They can read the content of almost any website or app but I really enjoy using it on the Dev to platform. I just think it works really well.

You just have to you the key phrase "read it to me" and the Assistant will comply.

{% youtube pS3QWiScp-A %}

Further reading: https://www.androidpolice.com/2020/06/21/how-to-make-google-read-any-text-out-loud-to-you-on-your-android-phone/
My coding journey
Published: 2020-06-22 18:30:33

https://www.w3schools.com/

https://www.freecodecamp.org/

The free Bootcamp
https://frontendmasters.com/

To help with my keyboarding skills:
https://www.keybr.com/
http://www.speedcoder.net/

https://github.com/

https://dev.to/

https://medium.com/

https://codepen.io/

Applications:
Visual Studio Code
Slack
Zoom

FullStackReact-book
FullStackReact-code
AzureFunBytes - AZ-900 Stream, Network Security Groups, SSH Keys, Linux VMs, and your questions.
Tags: azure, beginners, security, tutorial
Published: 2020-06-22 18:24:43

Monday's stream focuses on the AZ900 path for gaining proficiency in Azure Fundamentals.  We'll talk a bit about how we secure our environments using Network Security Groups (NSGs).  You'll watch me launch a Virtual Machine from the Azure Cloud Shell using a simple bash script from Linux VM docs.  This includes creating a network security group and generating ssh keys so that you're server is prepared for you to securely begin installing software and running your applications.

We'll show how to lock down SSH access and talk about other services you can expose to the world via the network security group.

{% youtube NNKMVZTDRY8 %}

I'll take questions, look for some participation and continue to get you skilled up.  This Thursday be sure you check out my conversation with Brian Ketlesen  on Azure Linux VMs.  We'll be live on Twitch, YouTube and Periscope at 2pm EDT.

https://twitch.tv/azurefunbytes
https://twitter.com/azurefunbytes

Join me, ask questions and learn about Azure!

Microsoft Learn: [Azure Fundamentals](https://cda.ms/1jV)
Microsoft Azure: [$200 Free Credit](https://azure.microsoft.com/free/?WT.mc_id=blog-devto-jagord)
[Exam AZ-900: Microsoft Azure Fundamentals](https://cda.ms/1n2)

[Docs: Create a fully configured virtual machine](https://cda.ms/1mZ)
Quick steps: [Create and use an SSH public-private key pair for Linux VMs in Azure](https://cda.ms/1n0)
[Docs: Network security groups](https://cda.ms/1n1)
Python Classes
Published: 2020-06-22 18:19:29

Classes in python

class Humans:

    def __init__(self, name, age):
        self.name = name
        self.age = age

men = Humans("father", 46)

Inheritance in python


class Humans:

    def __init__(self, name, age):
        self.name = name
        self.age = age
    def printing(self):
        print(self.name)
class Women(Humans):
     pass

girl = Women("nandana",19)
girl.printing()


Encapsulation in python

class Humans:

    def __init__(self, name, age):
        self.name = name
        self.__age = age
    def printing(self):
        print(self.name)
        print(self.__age)
girl = Humans("nandana",19)
girl.printing()
print(girl.name)


"""print(girl.__age) is not possible as it is a private variable"""
Short Circuit Conditionals With Logical AND(&&) Operator - JavaScript
Tags: javascript, tutorial
Published: 2020-06-22 18:19:14

The short circuiting was meant to stop the further execution based on boolean operations. With `Logical AND`(**`&&`**) operator, if the **false** value of expression has already been determined than further execution will not happen.

Precedence for **Logical AND** is from **left** to **right**.

## Example

Let us consider, we've an application on our device which uses [Unsplash](https://unsplash.com) API to retrieve data from it. If the device is not connected to internet, then no data will not be fetched.

### [navigator.onLine](https://developer.mozilla.org/en-US/docs/Web/API/NavigatorOnLine/onLine)

- We will be using `navigator.onLine` property to verify whether the user is connected to the internet or not.
- The `navigator.onLine` property return `true` if connected to internet else `false`.

#### Example using if condition

```javascript
if (navigator.onLine) {
  fetchUnsplashImages();
}
```

#### Example using short circuit conditional 

```javascript
  navigator.onLine && fetchUnsplashImages();
```

Now the code is just a single line `navigator.onLine && fetchUnsplashImages();`. Here the `fetchUnsplashImages()`  function only executes when `navigator.onLine` return true i.e user is connected to internet.

Read others post on our site [MeshWorld](https://meshworld.in)

Happy coding
Day-6: JSON Web Tokens (JWT).
Tags: cybersecurity, security, javascript, blogaday
Published: 2020-06-22 18:07:29

**Day-6:** It was a lazy day but also excited at the same time because WWDC Apple Event 2020 happening today. As said on day-4 that will do research on cross-site WebSocket hijacking, I'm not doing this right now because It's kinda more advance to me or will need more time, So I have marked this into my list, will do soon! Today did research on Json web Tokens (JWT)! So let's get started...!

### **What is JSON Web Tokens (JWT)?**
- JSON Web Token (JWT) is an open standard (RFC 7519) that means that anyone can use and it is used to Securely transfer information between any two bodies like any two servers or any two users. 
- The main reason it is used because it is *digitally signed* that means the information is verified and trusted. There is no alteration of data in between the transfer!
- It is *compact:* It can be sent via URL, post request, Http header and also this makes the transmission process fast!

### **What problem does it solve?**
- Authentication
- Authorization
- Federated identity
- Client-side sessions (“stateless” sessions)
- Client-side secrets


### **What is the JSON Web Token structure?**
- A JSON Web Token looks like this,

`eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c`

Breaking down, JWT token is divided into 3 parts i.e:

- **Header:** eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9
- **Payload:** eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ
- **Signature:** SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c

### Header:

- Consists of 2 parts: Type of Token and Algorithm!
- This JSON is Base64Url encoded!
- Eg.
```
{
  "alg": "HS256",
  "typ": "JWT"
}
```

### Payload:

- It contains the claims. Basically claims are user details and additional data like iss (issuer), exp (expiration time), sub (subject), aud (audience), etc.
- There are 3 types of claims:
    - Registered claims
    - Public claims
    - Private claims
- This JSON is Base64Url encoded!
- Eg.
```
{
  "sub": "1234567890",
  "name": "John Doe",
  "iat": 1516239022
}
```

### Signature:

- It is formed by Combining the encoded header, the encoded payload with the *secret*.
- The signature is used to verify the message wasn't changed along the way!
- Eg.
```
HMACSHA256(
  base64UrlEncode(header) + "." +
  base64UrlEncode(payload),
  secret)
```

### **How does it works?**

- This Picture explains in a perfect way,

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

---

# **Resources:**

**Jwt.io doc:** https://jwt.io/introduction/
**JWT Handbook:** https://www.fomasgroup.com/Portals/0/MgmNewsDocuments/jwt-handbook.pdf

# **Contact:**

Got doubts? Contact me on [Twitter](https://twitter.com/FenilShah1616). 
Feedbacks are welcomed, do comment it down below! :)
🔥 Firebase Firestore Migrations 🔥
Tags: tutorial, database
Published: 2020-06-22 18:06:32

Firebase is one of the greatest serverless environment for developers to quickly get scalable products up and running, it lets you focus strictly on code and not care too much about what happens in the backend.

Although serverless is great, developers often face use cases that the developers of those tools didn't think about or implement yet.

I came across one of those problems recently and wanted to share to the greater community a nice workaround the community has built for us.

My problem arose when I wanted to migrate the noSQL data I had in one Firebase project to another Firebase project. Google lets you use the `gcloud` CLI for this purpose and has a very useful `gcloud firestore export` and `gcloud firestore import` that normally poses no issue. However, when you start to have nested collections, this tool will fail and only export the first level documents, which is not exactly what it should do...

After searching the internet for a bit, I came across this awesome npm package: [firestore-export-import](https://www.npmjs.com/package/firestore-export-import). This package will let you use the command line to do exactly what it does best: export and import data from firestore in JSON format easily. It's really a child's game.

1) install the package:
```
npm i -g firestore-export-import
```

2) Export the credentials.json from your Firebase project
`Firebase Dashboard > Settings > Service Accounts > New Private Key`

3) Export Data
```
firebase-export -a path/to/credentials.json -b path/to/savefile.json
```

4) Import Data
```
firebase-import -a path/to/credentials.json -b path/to/savefile.json
```

Change the project credentials in between step 3 & 4 to switch the target project.

and.. that's it!

Amazing little package that lets you perform those tasks in a way easier way than the tools Google proposes you to use. Only caveat, make sure to secure your local private keys. If anybody finds them, you will compromise your entire Firebase project.

Code safe!