teleren/devto huggingface dataset:
Differences between client-side storage solutions
Tags: todayilearned, webdev, codenewbie
Published: 2020-06-02 19:30:46

**Question:**

What are cookies, local storage and session storage and what are some differences?

**Answer:**

All three of these are client-side storage solutions (i.e. a cookie is both client and server-side) that can be used to store data that is needed within client scripts between pages. 


| Type          | Description   | Differences| Uses   | 
| ------------- |:-------------:| -----:| :-------------:|
| Cookies      | Small piece of data that a server sends to the user's browser that is then stored and sent back with future requests to the same server         | 4KB Storage - Server and client side reading - Supported by older browsers - Expiration varies| Logins, shopping carts, game scores, user preferences, tracking user behavior |
| LocalStorage | Window property (window.localStorage) that is saved across browser sessions. The data stored is not sent back to the server with each HTTP request, reducing traffic between client and server       | 5MB/10MB storage - Not as supported by older browsers - Never expires or removed, unless explicitly done so | Login forms remembering username, user preferences, custom settings |
| SessionStorage| Similar to LocalStorage, however, data does not persist across browsers. Data is only available during the page session.     |    5MB - Data will be deleted after session (browser) closed - Not as supported by older browsers | Use in cases where you do not want the data to persist over time |

 

https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies#:~:text=An%20HTTP%20cookie%20(web%20cookie,logged%2Din%2C%20for%20example.

https://www.w3schools.com/jsref/prop_win_sessionstorage.asp

https://stackoverflow.com/questions/19867599/what-is-the-difference-between-localstorage-sessionstorage-session-and-cookies
GitHub Notifier
Tags: github, notifications
Published: 2020-06-02 19:11:37

Hi,
I have wrote a small program for Windows that monitor GitHub repositories for common activities like Views, Open Issues, Stars/Downloads counts and user notification.

This useful if you manage many repositories and want to get an overview of all the activities that's going on there.

you can find at the following address:
https://github.com/LiorBanai/GitHub-Notifier
RediSafe - Vote Now
Tags: redis, machinelearning, tensorflow, hackathon
Published: 2020-06-02 19:09:16

### Hey there!
This is my first post on dev.to and I am asking for help from you guys. Please check out my submission called 'RediSafe' on Covid-19 in Redis 'beyond cache' hacakthon and **vote** if you like it.

### What is RediSafe
Redisafe is developed to be a secured AI platform with the purpose of detecting PPE on medical staff for safety protocol to prevent the spread of virus.

I have used Redis streams and Redis AI to deploy my ML mask-detection model.

### How to Vote
When you open the link, scroll down to find the green vote button saying **"VOTE FOR THE PROJECT"**

Voting Link: https://devpost.com/software/redisppe-an-ai-tool-for-ppe-safety-check-fduring-covid-19

> P.S. It's very simple to create a Devpost account by signing in with Google/LinkedIn/Facebook/Github if you don't have one.

### Thank You
Thank you guys for reading my first entry on this platform and for making a decision to give this project a vote. I promise that I will do a detailed post on this project once the results are declared.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/h8u4uqlh4sobbxy4b5tl.png)
Deleting a node in a Linked list, when you have access to only that node.
Tags: linkedlist, competitiveprogramming, algorithms, dsa
Published: 2020-06-02 19:02:31

Deleting a node in a Linked list is a standard problem, until you are given the root of the LL, and the node that you want to delete. What if you want to delete that node?

Thought process:
Deleting a node requires a knowledge of the node before, to set the correct next link, and is not possible otherwise. So, how do we get a link to the node before?

Well, we have a link to the node, and we have a link to the next node. So, we can delete the next node. So, let's just shift the value of the next node here, and delete the next node!

```
del(Node* node)
{
    // Shifting the value
    node->val = node->next->val;
    // Removing the next node from the LL
    node->next = node->next->next;
}
```

Thus, although it is the next node that has been kicked out of the Linked List, the value of the node that was to actually be deleted no longer exists! So, this works, as long as you are not asked to delete the actual node!

Happy coding!
PHP developer is learning Swift
Tags: swift, php
Published: 2020-06-02 18:59:23

![Swift programming language](https://dev-to-uploads.s3.amazonaws.com/i/re67kag0d69lw6w57mvi.png)

Hello community!

In 2014 I started to learn Web Development and in 2015 I got my first job as PHP developer. I was maintaining a project built with CodeIgniter 2 framework and MySQL, and just like any other PHP developer in those days, I had to deal with JS/jQuery code. 

Now I'm much experienced. During the last 5 years I worked on many projects using various tools and technologies. From Laravel to React Native, and even Bash, Python and some Java. I always push myself beyond my limitations when the question is about learning new technologies. And now...

I've decided to learn [Swift 5](https://docs.swift.org/swift-book/). 

Swift through the eyes of PHP developer! :smiley:

I'll be learning and writing series about Swift, and will try to compare it with PHP. 

Exciting, though!
Best Tech Startup Podcasts?
Tags: watercooler, discuss, startup
Published: 2020-06-02 18:33:13

---
title: Best Tech Startup Podcasts?
published: true
description: Share your favourite tech-startup related podcasts.
tags: watercooler, discuss, startup
//cover_image: https://direct_url_to_image.jpg
---
Lately I've been getting into the the start-up scene (mainly HackerNews and ProductHunt), but I don't always have time to sit and read through a lot of what gets posted. So I was wondering if you guys could share some of your favourite start-up related podcasts/content-creators, whether they be here or on some other platform.
Do you want xamarin navigation middleware?
Tags: help, mcsharp, opensource, xamarin
Published: 2020-06-02 18:24:52

Would being able to register middleware for various flows of Xamarin be useful for anyone?

Over the last few days I have been integrating navigation middleware into my own xamarin net core host builder. Essentially I have generated a proxy around INavigation and intercept every call. In doing this it allows you to register middleware for any of the Navigation flows (e.g. Push(), Pop(), PushModal(), etc...) much like Asp.Net does on every request.

Implementation looks something like this:
```csharp
new XamarinHostBuilder()
.UseNavigationMiddleware<SomeMiddleware>();
```

But im curious to hear if anyone else thinks this is a good idea? or any suggestions on features i could include?
Why I LOVE CoffeeScript!(and why you should use it)
Tags: javascript, computerscience, discuss, watercooler
Published: 2020-06-02 18:03:28

#So Why CoffeeScript?
Have you ever wanted JavaScript to be easier. I know many different frameworks offer something, like Vue for better visuals, or React with virtual DOM(which I do recommend you check out), but, TBH, simplicity is always lacking. If we're being honest sometimes it's a real issue, and after a while you just get used to it. No more, because that's what CoffeeScript is for.

#So what is Simple when it comes to programming with CoffeScript?
Most code newbies start with readable programming languages like, Python or Ruby. JavaScript is likely up there with the top ten, but even so, the gap in readability between Ruby and Vanilla JS is too big. So some genius put the best of both worlds together and got Coffescript. Now someone might say:

>I like JavaScript just fine.

And that's fine, but once you see the drastic difference in readability I think it's fair to say you will want to use CoffeeScript for its readability. 

Here's this example:
####CoffeeScript:
{% gist https://gist.github.com/OreOlad/98c8fb4d1ca20d29686d969a23cdcc31 %}
####Vanilla JS:
{% gist https://gist.github.com/OreOlad/332ed873f5649fc9f54fdf2c095ada19 %}

> Okay, but doesn't all the interpretation of the more readable code make running code on CoffeeScript slower?

No, luckily for us CoffeScript code is compiled to a JS file before it's interpreted using JIT.

CoffeeScript 2.5.1, the newest version, is supported in Node.js. CoffeeScript supports all ES6 additions. And for pre-Ruby developers  CoffeeScript reads like Ruby with the addition of JavaScript concepts, and CoffeeScript is great for web development.

>So why haven't I seen anything using CoffeScript? or at least heard about it?

CoffeeScript isn't as popular as languages like TypeScript, which many JavaScript programmers flock to. There are many factors that go into this, it's mostly preference and usage, but also how long it takes to learn. You see all JavaScript code is valid TypeScript code but not neccesarily vice versa. So in essence TypeScript is JavaScript but more advanced. Now, CoffeeScript doesn't actually bring that to the table. CoffeeScript syntax is different than JavaScript and requires a different view point to be best understood. For developers with a strong base in JavaScript looking to advance in their web development skills TypeScript is usually their first pick.

>So, should I use TypeScript?

If you want sure, but code is meant to be readable for time efficiency purposes and TypeScript doesn't meet that goal, in fact it's even less readable than Vanilla JS in my opinion.

#So... CoffeeScript huh?
Are you going to go get it or what?

![Go get 'em](https://media.makeameme.org/created/lets-go-get-5bac64.jpg)
Top Library setups for Data Science beginners
Tags: datascience, machinelearning, NLP, beginners
Published: 2020-06-02 18:01:19

Data Science has been a boon for many of applications in the world,  whether it could be in the area of healthcare, education, entertainment or in industrial sectors for supply chain logistics and many more things. Many of students and professional are aspiring or making career transitions in data science sector. So this is the post for them to give them a small start regarding libraries. 

This post will reflect some of the important libraries for beginners along with installation commands and small introductions, so that they do not have to put on much time to browse the internet and can find the things at one place.

The only prerequisite for libraries is Python itself.

All the installation commands should be executed in command prompt


**1. Numpy**
* Powerful N-dimensional arrays
* Numerical computing tools
* Interoperable

**Installation commands**

For windows:
    **pip install numpy**
    

For linux:
    **$ sudo apt install python-numpy**


------

**2. Scipy**
* Opensource
* Contains modules for optimization, linear algebra, integration,special functions
* Depends on numpy and imports many numpy functions

**Installation commands**

For windows:
    **pip install scipy**
    

For linux:
    **$ sudo apt-get install python-pip**  
    **$ sudo pip install numpy scipy**

------

**3. Pandas**
* Contains high-level data structures and manipulation tools 
* For data manipulation and analysis
* fast, flexible

**Installation commands**

For windows:
    **pip install pandas**
    

For linux:
    **$ pip3 install pandas**

------


**4. Scikit-learn**
* Simple and efficient tools for predictive data analysis
* lot of efficient tools for machine learning and statistical modeling including classification, regression, clustering and dimensionality reduction
* Features various algorithm like support vector machine, random forests

**Installation commands**

For windows:
    **pip install scikit-learn**
    

For linux:
    **$ sudo pip install scikit-learn**

------

**5. NLTK**
* Contains text processing libraries for tokenization, parsing, classification, stemming, tagging and semantic reasoning.
* Used for developing applications and services that are able to understand human languages


**Installation commands**

For windows:
    **pip3 install nltk**
    

For linux:
    **$ sudo apt-get install python-numpy python-nltk**

------


**6. Matplotlib**
* Comprehensive library for creating static, animated, and interactive visualizations
* Develop publication quality plots with just a few lines of code
* Use interactive figures that can zoom, pan, update

**Installation commands**

For windows:
    **python -m pip install -U pip**
    **python -m pip install -U matplotlib**
    

For linux:
    **$ sudo apt-get install python3-matplotlib**

--------

This post might prove to be helpful for all of the data science enthusiasts.

Any feedback would be much appreciated.
🛑🛑 How to Learn Automation Testing for Beginners?
Tags: testing, tutorial, beginners, webdev
Published: 2020-06-02 17:50:06

📚✅Join us - https://sendfox.com/thetestingacademy

In this video, We are discussing How to Learn Automation Testing and what the best ways to learn automation testing for beginners? 

[![Automation Testing Tutorial for Beginners ](https://i.imgur.com/U9poTnD.png)](https://youtu.be/sVg61q1vpKg "Automation Testing Tutorial for Beginners ")


✅ New to channel??  consider subscribing and follow day by day our challenge to become an Automation Testing expert in 30 days.

✅ Ways to learn Automation Testing?
 - 1. Understand the life cycle of Automation Testing?
 - 2. Read Books about the automation testing?
 - 3. Have a clear understanding what to test and what not to test?
 - 4. Select a Right Automation TOOL
 - 5. Use pattern and generic code that is not effected by Selector or UI Changes
 - 6. If possible use API Testing instead End to End UI Testing Cases
 - 7. Invest in yourself buy online courses
  TheTestingAcademy.com
  CodeAcademy.com
  Udemy.com
  Coursera.com
  edX
  Codewars
  Khan Academy
 - 8. Fork the automation projects and play with them and implement stuff from that repo.
CSS: Refresh, revitalize
Tags: css, freecodecamp, afterbootcamp, refresh
Published: 2020-06-02 17:38:18

Coding bootcamp was a great experience for me. I learned a lot in a very short amount of time. A twelve week crash course on all things Web Dev. But bootcamps are just that, fast, furious and intense. No matter how good the program, there's no way to retain all the information at such a breakneck speed.

My next step as a junior web developer is going back over the information that I learned, refreshing and revitalizing it to sharpen my skills. I'm going through the CSS courses on freecodecamp.com and in the next few blog posts I'm going to be explaining some of things I am learning for the first time as well as the things I needed to refresher on. Hopefully it will help you as well.

Back to basics:

I've been dabbling with BEM and Tailwind, but for some reason I had forgotten that in basic CSS you can give things two separate class names simply by adding a space. I do have a tendency to get ahead of myself sometimes, so I really shouldn't be so surprised.

We definitely talked about padding, margin and border, and I've been manipulating them. I'll be honest though, I did need to remind myself the differences between padding and margin. Padding is the space around the element, as if your element buddy was wearing a fluffy marshmallow jacket. Margin is the space between that element, other elements and the border of the element it is contained in. For examples sake, we'll have at least a six foot distance between each element for proper social distancing. 

Negative margins were completely new to me. I created my entire portfolio website by hand writing my CSS but I did not know about this. Changing a margin to a negative number makes the element larger. Neat!

Hope this helps! Until next time, folks!
6-10PM challenge problem #006
Tags: challenge, algorithms, programming, array
Published: 2020-06-02 17:34:08



<b><h2> Shifted Array Search </h2></b>




A sorted array of distinct integers shiftArr is shifted to the left by an unknown offset and you don’t have a pre-shifted copy of it. For instance, the sequence 1, 2, 3, 4, 5 becomes 3, 4, 5, 1, 2, after shifting it twice to the left.

Given shiftArr and an integer num, implement a function shiftedArrSearch that finds and returns the index of num in shiftArr. If num isn’t in shiftArr, return -1. Assume that the offset can be any value between 0 and arr.length - 1.

Explain your solution and analyze its time and space complexities.

 <b>Example</b>

<div class="highlight"><pre class="highlight plaintext"><code>

input:  shiftArr = [9, 12, 17, 2, 4, 5], num = 2 # shiftArr is the
                                                 # outcome of shifting
                                                 # [2, 4, 5, 9, 12, 17]
                                                 # three times to the left

output: 3 # since it’s the index of 2 in arr


</code> </pre></div>

<a href="https://dev.to/akbhairwal/6-10pm-challenge-problem-006-solution-1b1g">Solution</a>
Testing Your Deno Oak Server Applications
Tags: deno, showdev, typescript, javascript
Published: 2020-06-02 17:00:08

Excited to share that I've been working on a couple of testing libraries for Deno HTTP servers that are now ready to use!

- [SuperDeno](https://github.com/asos-craigmorten/superdeno) - HTTP assertions for Deno made easy via [superagent](https://github.com/visionmedia/superagent).
- [SuperOak](https://github.com/asos-craigmorten/superoak) - an extension to SuperDeno to provide easy HTTP assertions for Deno's popular Oak web framework.

Here's an example of how you can use SuperOak to test an Oak server:

```ts
// server.ts
import { Application, Router } from "https://deno.land/x/oak@v6.0.1/mod.ts";

const router = new Router();
router.get("/", (ctx) => {
  ctx.response.body = { message: "Hello Deno!" };
  ctx.response.status = 200;
});

const app = new Application();
app.use(router.routes());
app.use(router.allowedMethods());

export default app;


// server.test.ts
import { superoak } from "https://deno.land/x/superoak@2.1.0/mod.ts";
import app from "./server.ts";

/**
 * Test that the server returns the "Hello Deno!" JSON object when make a
 * GET request to "/".
 */
Deno.test("it should return some JSON with status code 200", async () => {
  const request = await superoak(app);
  await request.get("/")
    .expect(200)
    .expect("Content-Type", /json/)
    .expect('{"message":"Hello Deno!"}');
});
```

## About

Currently there is quite a lot of bootstrapping and setup required to test your [Opine](https://github.com/asos-craigmorten/opine), [Oak](https://github.com/oakserver/oak/) and other web framework applications.

These modules aim to provide an easy to use, high-level abstraction for testing HTTP in Deno, while still allowing you to drop down to a lower-level API provided by [superagent](https://github.com/visionmedia/superagent).

## Installation

This is a [Deno](https://deno.land/) module available to import direct from this repo and via the [Deno Registry](https://deno.land/x).

Before importing, [download and install Deno](https://deno.land/#installation).

You can then import SuperDeno or SuperOak straight into your project:

```ts
import { superdeno } from "https://deno.land/x/superdeno@2.1.1/mod.ts";
import { superoak } from "https://deno.land/x/superoak@2.1.0/mod.ts";
```

Further API docs and further examples are available in the GitHub READMEs (linked above)! 🚀

Let me know how you're getting on with writing and testing your HTTP Servers in Deno! Questions, suggestions and issues all welcome - drop a message in the comments below or on in the GitHub repository issues section.

Happy testing! 🦕
Installing Kubernetes with Kubespray - Part 3
Tags: kubernetes, devops, docker, tutorial
Published: 2020-06-02 16:51:15

Before we jump into the steps of installation, if you are familiar with Puppet, Chef and Ansible (https://github.com/kubernetes-incubator/kubespray) then kubespray is going to be the best choice to set up a Kubernetes cluster.

In this article, we will be going through 12 steps starting from setting up vagrant VMs till running the final ansible-playbook.

**Disclaimer** – If you are a beginner with kubernetes then i would highly recommend to go through the manual installation of kubernetes on **Ubuntu** or **CentOS** and for the same you can refer to – 

1. [14 Steps to Install kubernetes on Ubuntu 18.04 and 16.04](https://jhooq.com/14-steps-to-install-kubernetes-on-ubuntu-18-04-and-16-04/) 
2. [15 Steps: Install Kubernetes on CentOS “bento/centos-7”](https://jhooq.com/15-steps-to-install-kubernetes-on-bento-centos7/)

{% youtube 7dG3vZFjQsE %}
This is  TESt
Published: 2020-06-02 16:36:56

I am a big proponent of always thinking about scale and optimization when you are writing code, no matter how big or small of a product you are working on. A lot of people like to argue that there is no reason to optimize when you don't have to and that is wastes time. Yes, sometimes it does take a little bit of extra time, but down the road that little bit of time can save you a huge headache.

I'm not talking about rearchitecting a whole feature, I'm talking about the little things you can do while you are coding that I guarantee will make a difference in the future. In this post, I will walk through an example of a small optimization I made recently at DEV with this pull request and how we could of avoided creating that pull request altogether.

The Most Popular DEV endpoint
which one I choose as a beginner ? vanilla js or css3
Tags: css, javascript, webdev, help
Published: 2020-06-02 16:33:05

I have basic animation skills in css3 but I don't want to deep dive into css3 animation (such as @keyframe , transition, transform etc).

For frontend animation stuff which one I should choose vanilla js or css3.
which is best for animation vanilla or css3 ??
Is it any difference between vanilla and css3 animation??
Can I do all stuff such as animation , hover effect , button using javascript ??
Which one should I more focus as a frontend beginner??