teleren/devto huggingface dataset:
Verify Your 📧mail With Sashido And Parse Server.👩‍💻
Tags: verificationsashido
Published: 2019-11-11 09:12:28

[**Sashido.io**] (   https://dev.to/sashido   ) 
![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/r5rqrx0dxj8hpduwa4qu.jpg)   




[**Sashido**] (www.sashido.io) *is a platform that helps developers create functional and beautiful `apps`. It takes good care of your `infrastructure`,`Scaling`,` Security`, `database maintenance`,`backups`,[**Parse Server deployment**] (www.sashido.io ) to give developers the time and energy to focus on their business idea*. Sashido eliminates the time spent on `Back-end ` connecting, database maintenance, `security`, `Scaling`. 

[**Sashido**] (www.sashido.io) and [**Parse Server**](https://docs.parseplatform.org/parse-server/guide/#using-parse-sdks-with-parse) `parseServer`uses **Webhooks** to handle requests, responses from  a client to the server.  
![hhh]
(https://thepracticaldev.s3.amazonaws.com/i/zpur4lbr5uszya9cxei9.png)  

The block code below shows us how Parse Server handles `passwords` requests 





 ```

Parse.User.requestPasswordReset("email@example.com")
    .then(() => {
        // Password reset request was sent successfully
    }).catch((error) => {
        // error is a Parse.Error with an error code and message.
        console.error("Error message:", error.message);
    }); 

```







**First off,you must**[**`Register`**](www.sashido.io) and [**`Login`**](www.sashido.io) to [**Sashido**](www.Sashido.io). 



###Click on Getting Started > **Create an `App`> Then Go-to `App `settings > on` App `settings > go-to `Emails`and `Hosting`**💪. 
**`Follow The Steps And Secure Your Email With Sashido`**

![Sashido looks like this](https://thepracticaldev.s3.amazonaws.com/i/gpx9qxfcb8x87e3o3w3l.png)       

### [Email Verification work flow] ( https://dashboard.sashido.io/products/apps/nC3DKsPliJ-zone4/settings/emails ) 

+  **_A user is mailed a link with 
     which they can choose a new 
    `password`_**.

+  **_The user should use the link 
  forwarded to choose` _password_Html `
  to select a new `password`_**.

+ **_The user submits their `password`
  and they will receive a 
  confirmation that a new `password `
  has been successfully created_**.

+ **If maybe a malicious user 
  attempts to `reverse engineer` 
  the password, they are sent to 
  `invalid_link`**. 

#### [Email Verification Work Flow] (www.sashido.io) 

   ![Email Verification WorkFlow](https://thepracticaldev.s3.amazonaws.com/i/f1ok8fu746ai5aw4b4go.png )
      
**🚀**


![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/bh3f0t0p64rdtceg8mq1.gif)


**Thanks for reading**...
How to Implement dynamic header in React?
Tags: react
Published: 2019-11-11 08:09:50

Hi! I'm new to React and i have a question for you 👀

I'm going to build a React app in which each page has its own header content, and its contents may not look alike(For example for search page we have a input on header and for single page we have single title and action buttons, just like a native app) and the number of pages is pretty large, but I don't know how to do it and I need guidance. I want to see if react has a convenient solution to implement this? Do I have to make a proprietary header component for each page? What is the best way to do this? Thanks.

Example design:
![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/zkr4uzxm9oc4jnwnr9yx.png)
Does multitasking really work or is it just a myth?
Tags: productivity
Published: 2019-11-11 07:48:08

One of the most common traits that I've always seen in candidates' resumes is "Ability to multitask". For each time, I really wonder why people always pride themselves as multitaskers? The myth of multitasking takes over a huge part of entrepreneur culture that makes everyone believe that they can only be successful in their career if only they know how to multitask. 

However, does multitasking really work? Does multitasking equal efficiency optimization and productivity? 

### Break the myth of multitasking 

The truth is, multitasking only works if those tasks are second nature to you. For instance, if you're driving, you can listen to classical music at the same time since listening to music doesn't require heavy brain process. However, if you're listening to Google Maps telling you where to go, it's mostly impossible to listen to a song with lyrics at the same time. 

When your are prone to multitasking, you might damage your brain and the quality of your work as well. According to some [studies](https://www.entrepreneur.com/article/288829) from University of Sussex in UK and University of London, multitaskers have less brain density than the one who doesn't multitask. Also, research participants who multitasked experienced lower IQ score than the ones who do not. 

### How to appropriately increase productivity without multitasking?

1.Set up your own goal for each day. 

Instead of trying to squeeze everything on a Friday afternoon and "multitask" your work, you might want to set up your daily goal and optimize the resources for one day only. Don't try to overachieve or outdo your task list. Staying consistent is the key. 

2.Track your progress 

There are thousands of [to-do list app](https://quire.io/compare/best-to-do-list-apps) that you can use (personally, I use [Trello](https://trell.com) Kanban board and [Quire](https://quire.io) nested task list to track my work) to better manage your work. If you spend too much time on a task, try to figure out what the obstacles are and improve the productivity. 

3.Create your own time block 

What I enjoy doing during my 9 hours at work is to create the time block for each task. I will move all of the tasks that need my full attention to morning from 9-11am when my morning dose of caffeine just kicked in and I can focus on those tasks. In the afternoon from 4-5pm is reserved for routine tasks. 

Hope you will stop thinking multitasking is an asset to write in the resume :)
First Blog Post!
Tags: helloworld, firstpost, newbie, beginners
Published: 2019-11-11 07:46:04

Hello and thank you for reading my post! I'm definitely new to talking about my journey so all of this will have a learning curve for me, but I'm very excited to give it a shot. Since this is my very first post, I wanted to go ahead and give a little info about myself, what I'm currently doing, and what I'm working towards. My name is Alfonso, but I usually go by Fonzie. I grew up in El Paso, TX but now I live in Seattle, WA. I'm 24 years old as of this post and I'm a college drop out. As much as I wanted to finish college and get a degree, it just wasn't for me. 

Luckily, after moving to Seattle, I've been fortunate enough to able to start a Bootcamp at Flatiron School for software engineering which I'm currently still attending. I've already met so many amazing people and have learned quite a lot in the last few weeks. Going forward, I will definitely start posting about things that I've learned or in the process of learning, things that are difficult to understand, cool features that intrigued me and basically anything related to programming because someone out there might find the information useful and I like the idea of helping others even if it might only be one person. Also, even though I'm still very much a beginner, don't be afraid to reach out if there's something I talk about that you maybe need help on or maybe you know a much better solution, I would love to learn better practices and things I can improve on. Or, neither of those apply and maybe you just want to connect, that's fine too! I love connecting with people, hearing their stories and making new friends!

Finally to finish things off, I want to talk a little about where I want to be after graduating Bootcamp and possibly where I want to be in a few years. After graduating, I hope to be able to find a job working as either a fullstack, front-end, or back-end web developer. Preferably I would want to do fullstack but I'm really ok with any option. And while I really do like web development, my true goal for the future would be to become a game developer. Hopefully after a few years I will be able to branch off and work as a game developer.  I really like the idea of creating an entire game by myself also but I would really only do that on my spare time.
Thank you for reading and if you want to follow my journey, feel free to Follow and I'll try and do the same!
Postgres Tuples Only
Tags: postgres, psql
Published: 2019-11-26 01:39:56

---
title: Postgres Tuples Only
published: true
date: 2019-11-11 00:00:00 UTC
tags: postgres, psql
canonical_url: https://stephencharlesweiss.com//2019-11-25/psql-tuples-only/
---

If you’re just learning how to use Postgres from the terminal (as I am), sometimes you click the wrong button and don’t know what it does, then later, you realize something’s not quite right but don’t know how to fix it.

That’s what happened recently when I accidentally turned tuples only on (`\t`).

When I queried a table, only the results printed - not the column headers.

So, when querying a user table, I got the following:

```shell
onething=> select * from users;
  1 | stephen | stephen@me.com |
  2 | fake user | fake@user.com |
```

It’s not a complicated table, and it’s test data - so I could put the pieces together, but I knew one day, I’d want to see the headers.

That’s when I found that I’d accidentally fat-fingered turning Tuples only on.

Once I reversed it:

```shell
db=> \t
Tuples only is off.
```

My query produced the table headers as expected:

```shell
db=> select * from users;
 id | name | email | password
----+-----------+----------------+----------
  1 | stephen | stephen@me.com |
  2 | fake user | fake@user.com |
(2 rows)
```

To see the full list of options us the `\?` option from the command line, but for more, you can see the [documentation on the interactive terminal](https://www.postgresql.org/docs/current/app-psql.html) on the Postgres site.

And now I know about tuples only mode in Postgres! Won’t make that mistake again.
how PWA Update automatically and remove old cache
Tags: howtoupdatepwaautomaticaly
Published: 2019-11-11 07:33:32

Can anyone point me to any guide for getting my PWA to update automatically for users when there are changes or a new version?  I have been looking around the web and it seems like maybe I have to customize the service-worker.js to check some version variable and invalidate the cache? what right way to go or something else?
How Do You Approach Your Coding Problems
Tags: discuss, beginners
Published: 2019-11-11 06:33:21

Whenever I got stuck in codes, my first response is googling or ask for help. I'd like to improve my problem solving skills.

This example below is from freeCodeCamp, but you're welcome to use any codes, problems, and programming languages.

```js

function convertToF(celsius) {
  let fahrenheit;
  return fahrenheit;
}

convertToF(30);
```
Playing with Jsoup and creating some braille text
Tags: jsoup, html, braille, java
Published: 2019-11-11 06:29:11

---
title: Playing with Jsoup and creating some braille text
published: true
description: I will do some live coding reading a webpage using Jsoup and creating some braille text. This is perhaps a simple project but I wanted to play around with some string creating and braille text.
tags: jsoup, html, braille, java
cover_image: https://thepracticaldev.s3.amazonaws.com/i/02odjcp3ailj02wksfko.jpg
---

{% youtube 3Z91QdQIQoo %}

I will do some live coding reading a webpage using Jsoup and creating some braille text. This is perhaps a simple project but I wanted to play around with some string creating and braille text.
Top SQL Interview Questions to Prepare for 2020
Tags: sqlinterviewquestions, javascript, html
Published: 2019-11-11 06:01:54

Are you preparing for SQL as your career choice and don’t know where to start? Well, then you are in the right place! In this blog, we have prepared a list of 
<a href=https://www.codingtag.com/top-30-sql-interview-questions> <b>SQL Interview Questions</b></a> that are most likely to be asked by the interviewers. The list of questions contains all the basic to advance level questions to help the students prepare thoroughly for the technical interview.

1.	What is SQL?
SQL stands for Structured Query Language which is a relational database management system used to organize the data stored.

2.	Can you differentiate between SQL and MySQL?
 SQL refers to the standard language which is used to retrieve and manipulate data whereas, MySQL is a relational database management system used to manage the SQL database. 

3.	What are the constraints in SQL?
Constraints in SQL specify the rules for the data stored in the database. Some of the constraints are:
•	CHECK
•	DEFAULT
•	NOT NULL
•	INDEX
•	UNIQUE
•	PRIMARY KEY
•	UNIQUE KEY

4.	Define tables and fields in SQL.
In SQL, the data are stored in the form of horizontal rows and vertical columns. This type of organization for the stored data is known as tables. While the rows are known as records, the columns are known as fields that specify the categories of the data stored.

5.	What are Join in SQL and its different types?
Join in SQL is a keyword that is used to combine any two records or rows of more than one table. The joining is done on the basis of the similarity of columns between the tables. In SQL, there are 4 types of Joints:
•	(INNER) JOIN
•	LEFT (OUTER) JOIN
•	RIGHT (OUTER) JOIN
•	FULL (OUTER) JOIN

If you want to learn more, you can also see <a href=https://www.codingtag.com/ios-interview-questions><b>Technical Interview Questions</b></a>
Secure better your website with SameSite cookies
Tags: php, security
Published: 2019-11-11 05:39:03

---
title: Secure better your website with SameSite cookies
published: true
description: How to set a samesite cookie for your session id in php and make your website more resistant in CSRF attacks.
tags: php,security
---

Cross-site request forgery (CSRF) attacks is a type of malicious exploit of a website where unauthorized commands are transmitted from a user that the web application trusts.


Let's see the following example: You have an endpoint that updates a user: *mysite.com/user/update/2*

The new data should come from a POST method, so if you open the endpoint from a  link, the update will not happen because the request method in this case is GET. But someone could build this simple html file:
{% gist https://gist.github.com/vzuburlis/1a00382843b7db9b2821921f493ce9af %}

This *index.html* can be placed in any website (like clickhereandseewhathappens.com), and the link is send it to the website administrator with an email. When the administrator opens this html in the browser, the form will be submited to mysite.com and the user will be updated.

This will happen because the *sessionId* cookie of the user will be sent to the server and the application understands that this request was made from the administrator.


The **SameSite** is a cookie key that tells browser to send the cookie value to the server only when the request is made from the same domain of the website.

For example, when you dont want to sent the cookie from a different  url.

<pre>mycookie=value; expires=Wen, 1 Jan 2019 12:00:00 UTC; path=/; SameSite=Strict</pre>

When you want to send it with simple links (GET method) but not with POST/PUT/DELETE etc

<pre>mycookie=value; expires=Wen, 1 Jan 2019 12:00:00 UTC; path=/; SameSite=Lax</pre>

The default scenario is to sent it always. 


This feature is already supported from all major browsers https://caniuse.com/#feat=same-site-cookie-attribute

So this is an extra layer of security for your website and very easy to implement.

 

To create a samesite cookie with php:
<pre>header("Set-cookie: mycookie=value; path=/; HttpOnly; SameSite=Lax");</pre>

From php 7.3 you can use setcookie function with the options (8th) parameter:
<pre>setcookie('mycookie', 'value', time()+86400, '/', null, null, true, ['samesite'=>'Strict']);</pre>

 

**Note:** the above examples also adds the **HttpOnly** key for the cookie, that key prevents from your javascript to access the value of your cookie. So even you have a XSS script run in your website, it wont be able to see the cookie's value.

To set the expiration date with header() you must print date with the expected format
<pre>
$expire = date('D, d M Y H:i:s', time() + (86400 * 30)); // one month from now
header("Set-cookie: mycookie=value; expires=$expire; path=/; HttpOnly; SameSite=Lax");
</pre>
How To Create Dynamic Dropdown In React?
Tags: react, reactnative
Published: 2019-11-11 05:32:58

Dynamic dropdown you can create with help of the map() method of the javascript. Need to create a separate component It helps to create for the repeated anchor then go to header file or where you need this the component then you can call as below code:

Navlist.js
import React from 'react'
import {Link} from 'react-router-dom'

export default (props) => {
    const renderSubMenu = () => props.subMenu.map((item, i) => <li key={i}><Link to={item.href}>{item.name}</Link></li>);
    return(
        <>
            <li className="nav-item">
                <Link to={props.navLink}>{props.navName}</Link>
                {props.subMenu ? (typeof props.subMenu=="object" ? <ul>{renderSubMenu()}</ul> : null) : null}
            </li>
        </>
    )
}

Explore in details
https://www.anythinglearn.com/2019/11/how-to-create-dynamic-dropdown-in-react.html
How to FORK the Ethereum Blockchain in 5s?
Tags: ethereum, blockchain, solidity, dapp
Published: 2019-11-11 04:13:27

---
title: How to FORK the Ethereum Blockchain in 5s?
published: true
description: 
tags: ethereum, blockchain, solidity, dapp
canonical_url: https://youtu.be/9X78nFqJwCM
---

Did you know that you could fork any Ethereum network with Ganache CLI?

This is a secret feature that nobody knows about, but is very powerful nonetheless.

In this video I will show you how to fork mainnet + unlock real mainnet accounts with Ganache CLI, so that you can easily test your Ethereum smart contracts.

In the example I we will transfer some Dai, using an unlocked account from mainnet (i.e WITHOUT knowing its private key).

Full playlist on Ganache CLI [here](https://www.youtube.com/watch?v=9X78nFqJwCM&list=PLbbtODcOYIoGyHf0P64qwbeLqKesenu1t&index=8&t=0s)

{% youtube 9X78nFqJwCM %}
Using Defaultdict in Python
Tags: python, defaultdict, tutorial
Published: 2019-11-11 04:09:19

_Cross posted from [Rakesh's Blog](https://rakeshgautam.com/posts/using-defaultdict-in-python/)_

Dictionaries are a great convenient way to store and retrieve data by name in python.

```python
>>> mydict = { 'first_name' : 'Rakesh', 'last_name': 'Gautam' }
>>> print(mydict['first_name'])
Rakesh
>>> print(mydict['last_name'])
Gautam
```

But if you try to get an item with a key that is not currently in the dictionary, Regular Python dictionary raises a `KeyError` exception.

```python
>>> print(mydict['middle_name'])
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
KeyError: 'middle_name'
```

While this is easy to handle manually, the `defaultdict` simplifies this kind of task.

`DefaultDict` works exactly like a regular python `Dict`, but it is initialized with a function, that takes no argument and provides a default value for a non-existent key.

`DefaultDict` never raises a `KeyError` exception. If any key does not exist, its value gets returned by the DefaultDict.

`DefaultDict` is part of the python's `collections` package.

```python
>>> from collections import defaultdict

>>> mydict = { 'first_name' : 'Rakesh', 'last_name': 'Gautam' }
>>> def_dict = defaultdict(str, mydict)
>>> print(def_dict['first_name'])
Rakesh
>>> print(def_dict['middle_name'])

>>>
```

Here, this didn't raise any `KeyError` exception because we passed `str` as an argument to the `defaultdict`.

`def_dict` returns `""` (default value for string) here if we pass a non-existant key as an argument.

```python
>>> my_dict = {'a' : 10, 'b': 20, 'c':30}

>>> dict_2 = defaultdict(lambda : 0, my_dict)
>>> print(dict_2['x'])
0

```

Here, we passed `lambda : 0` as a function to defaultdict, and this will return `0`, whenever we ask for a non-existent key.

We can use any function that takes no argument, in the `defaultdict`. If someone attempts to access a key to which no value has been assigned, that function will be called (without arguments) and its return value is used as the default value for the key.
JOYG: a 1st person shooter in Unreal Engine
Tags: unreal, engine, game, development
Published: 2019-11-11 03:43:57

![UE4 Game Scene](https://thepracticaldev.s3.amazonaws.com/i/7cg1mfsbu8af3mvxsl2l.png)

Just a few shots of a level from the game that I'm making in UE4.  

I’ve finished making level one of JOYG (name of the game). The 1st phase of development involved:

Making a map on paper
Greyboxing the map in the game world
 Adding materials and textures to the world
 Adding props like tables, wheels, trash cans, doors
 Putting in particle effects such as fire and steam
 Putting sounds for example fire crackling, steam sounds
 Changing the lighting by making it a night scene
Adding characters

I'd be interested in talking to anyone on here whose into game dev

![UE4 Game Scene](https://thepracticaldev.s3.amazonaws.com/i/yex6w9efsthcqf1fql26.png)

![UE4 Game Scene](https://thepracticaldev.s3.amazonaws.com/i/gvxp6xwqf1mah8pjeowh.png)
Custom Dev.to community site
Tags: sideprojects
Published: 2019-11-11 02:56:19

I am looking to build an online community similar to Medium and Dev.to. I am a software engineer and have been thinking about how I could piece some technologies together to build my solution but recently saw Dev.to was making their software solution open source. Is there a beta test group or place where contributors can help with this initiative? Would love to contribute and in the process build out my own community using this great solution.

Thanks
ASP.NET Core MVC Web Application CRUD operations using Azure Cosmos DB
Tags: azure, azurecosmosdd, netcore
Published: 2019-11-11 02:10:29

In this [tutorial](https://github.com/patricksameerajayalath/AzureTutorials/blob/master/ASP.NET%20Core%20MVC%20Web%20Application%20CRUD%20operations%20using%20Azure%20Cosmos%20DB.pdf) I’m going to show how to:

•	Create an Azure Cosmos DB Account
•	Create an Azure Cosmos DB
•	Add a Container to the Cosmos DB
•	Create an ASP.NET Core MVC Application
•	Add Azure Cosmos DB NuGet package to the Project
•	Set up the code for ASP.NET Core MVC application for CRUD Operations
•	CRUD Operations Screen Captures


![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/ewkrvmxgsxcnwja2c40m.jpg)


You can find the PDF version of this tutorial [here](https://github.com/patricksameerajayalath/AzureTutorials/blob/master/ASP.NET%20Core%20MVC%20Web%20Application%20CRUD%20operations%20using%20Azure%20Cosmos%20DB.pdf).

You can find all my Azure/.Net tutorials [here](https://dev.to/patricksameerajayalath) and [here](http://sameerajayalath.blogspot.com/).

Enjoy !!