teleren/devto huggingface dataset:
Job Search Week 15
Tags: makers
Published: 2020-06-02 20:53:49

This week I jumped between looking for jobs and my Mesasage Board app. I was happy with looking through a couple of jobs and having a list of places to apply makes the job hunt a little easier.

Day 1

Monday I started on my Message Board app and I had to fix some of the snapshot test that was failing which was quite a simple fix. I also split the message app into two smaller components to keep my code clean.

Day 2

Tuesday is when I started working with state and creating the form. I started by creating the form giving it state. After that I used a function to alter the state when the form was submitted.

Day 3

On Wesnesday I started working on error handling adding an error.json file in the mock folder. I created a error handler component and tested it so that I could later add the error handler to the message app component.

Day 4

I added the error handle to the message app component on Thursday as well as adding the delete function to the messages. After I did I refactored message list component to use the format message function to clean up my code.

Day 5

I spent Firday mainly looking for jobs, I like take a bit of extra time to look for jobs because I would rather apply to the company directly than go through recruiter because some recruiters don't mention the company by name so I can't look into the company more and decide if I like the company.


Summary

I was happy with what I got done this week getting to use mocks along with Mocha and Chai was interesting and I image it'll be very useful in the future. I was also happy to find a good few job opportunities on Friday so now all I've got to do is write up a cover letter for them.
Build Angular + ASP.NET MVC 5
Tags: csharp, webdev, angular
Published: 2020-06-08 07:26:25

Today, I'm shared a example simple Build Angular + ASP.NET MVC 5. I do video, Because it's complicated

{% youtube 6ACm-zZWwrg%}
The Article : [Build Angular + ASP.NET MVC 5](https://hoanguyenit.com/build-angular-asp-mvc5.html)
Understanding Kubernetes: part 31 – ReplicaSet
Tags: kubernetes, devops, docker, beginners
Published: 2020-06-08 06:51:19

---
title: Understanding Kubernetes: part 31 – ReplicaSet
published: true
description: Serie of sketchnotes about Kubernetes. Explaining in a visual way Kubernetes principles.
tags: Kubernetes, DevOps, Docker, beginners
series: Understanding Kubernetes in sketchnotes
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/s0ws6c0b3zyo9lxef3jy.jpg
---

Understanding Kubernetes can be difficult or time-consuming. In order to spread knowledges about Cloud technologies I started to create sketchnotes about Kubernetes. I think it could be a good way, more visual, to explain Kubernetes (and others technologies).

We continue the serie of Kubernetes Sketchnotes with a focus on ReplicaSet. 

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

If you are interested, I published all the sketchnotes on Kubernetes (and new ones!) to make a "book" of 120 pages: ["Understanding Kubernetes in a visual way"](https://gumroad.com/aurelievache#uCxcr).

As usual, if you like theses sketchnotes, you can follow me, and tell me what do you think. I will publish others sketchs shortly :-).
Human Cloning Articles
Published: 2020-06-08 06:42:23

Right this moment, information science is on the peak of its success as an trade and is rising at an exponential price spreading its branches through totally different industries and sectors. As data scientists hold major value in companies due to their risk calculating strategies and figuring out the rising developments, this has become essentially the most wanted job. As a part of their job-function, they should deal with the end-to-end Azure Machine Studying Providers. Our Information Science Training In Hyderabad course timings and schedules are very a lot versatile for both job seekers and working professionals.

Our licensed trainers will assist in leveraging data of all the top expertise among our students which is able to help them in becoming a profession ready Azure <a href="https://www.excelr.com/business-analytics-training-in-bangalore">Data Scientist course</a>. Knowledge Science is thus far thought-about as the most effective knowledge administration system which might successfully handle the different applications relating to the info administration which primarily consists of the concepts of Knowledge Scrapping, Knowledge Mining, Data Extraction, Data Storing & Processing and extra.

The data science online coaching in Hyderabad covers sensible points in statistical computing, which incorporates programming in R & Python, studying knowledge into R & Python, accessing R packages & Python information science library and frameworks, writing R & Python features, debugging, profiling R & Python code. Our trainers are subject material consultants and business leaders who've extensive knowledge in the area of Information Science.

Apply the ideas gleaned in this course and get acknowledged in the knowledge science certification demonstrates your proficiency in advanced problem fixing with probably the most sophistical expertise out there. Knowledge science is a specialised area that features a number of areas corresponding to mathematics, statistics, clever knowledge capture strategies, knowledge mining, knowledge cleaning and programming to prepare and align massive data for analysis to extract info and insights.

Pre-course examine helps you to develop your knowledge on the fundamentals of Information Science and Machine Studying. Data science is extracting related and important data from raw information, which in turn can be utilized for taking strategic selections in business concerning customer satisfaction and retention, demand and provide forecasting, growth of a brand new product, perceive market pattern and so on.

We are located at : 
Location : 
ExcelR - Data Science, Data Analytics Course Training in Bangalore
49, 1st Cross, 27th Main BTM Layout stage 1 Behind Tata Motors Bengaluru, Karnataka 560068
Phone: 1800-212-2120/ 070224 51093
Hours: Sunday - Saturday 7AM - 11PM
Vanilla JavaScript == vs ===
Tags: javascript
Published: 2020-06-08 06:19:40

The difference between two or three = signs in `JavaScript` can be complicated and vague to understand at first.
I found myself in a spot where I would always use the triple === set up to be safe.
But let's try and find out the real difference today.

## JavaScript == vs ====

Let's first try and understand the basic difference on paper.
The two are comparison operators, meaning they will compare between two sides; these can be variables or values.

### JavaScript == Comparison

The == operator is used for `equal to` comparison and is the most basic of the two.

Some options are:

```js
x = 3;
console.log(x == 10); // false
console.log(x == 3); // true
console.log(x == '3'); // true
```

As you can see we define a number, but even the string is valid.

### JavaScript === Comparison

The === comparison is the same, but stricter it needs an equal value and equal type.

So doing the same we will get the following results:

```js
x = 3;
console.log(x === 10); // false
console.log(x === 3); // true
console.log(x === '3'); // false
```

Hopefully this made the initial difference clear between the two, let me know if you want to see more of this in a future article.

See it in action on this Codepen.

<p class="codepen" data-height="265" data-theme-id="dark" data-default-tab="js,result" data-user="rebelchris" data-slug-hash="PoZqVbm" style="height: 265px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; border: 2px solid; margin: 1em 0; padding: 1em;" data-pen-title="Vanilla JavaScript == vs ===">
  <span>See the Pen <a href="https://codepen.io/rebelchris/pen/PoZqVbm">
  Vanilla JavaScript == vs ===</a> by Chris Bongers (<a href="https://codepen.io/rebelchris">@rebelchris</a>)
  on <a href="https://codepen.io">CodePen</a>.</span>
</p>
<script async src="https://static.codepen.io/assets/embed/ei.js"></script>

### Thank you for reading, and let's connect!

Thank you for reading my blog. Feel free to subscribe to my email newsletter and connect on [Facebook](https://www.facebook.com/DailyDevTipsBlog) or [Twitter](https://twitter.com/DailyDevTips1)
Coding Interview Question: Fibonacci Number
Tags: javascript, fibonacci, algorithms, recursion
Published: 2020-06-08 05:57:06

Hey!
Have you heard anything about Fibonacci numbers? Solving Fibonacci sequences is one of classical interview tasks. An employer wants to check your algorithmic thinking and problem solving skills.

A little bit explanation before solving...

The Fibonacci sequences is a set of numbers that starts with a one or a zero, followed by a one, and proceeds based on the rule that each number (called a Fibonacci number) is equal to the sum of the preceding two numbers. If the Fibonacci sequence is denoted F (n), where n is the first term in the sequence, the following equation obtains for n = 0, where the first two terms are defined as 0 and 1 by convention:

F (0) = 0, 1, 1, 2, 3, 5, 8, 13, 21, 34 ...

#2 Ways to solve Fibonacci sequences with JavaScript

###1. Simple loop
It's the best and fast solving.

```javascript
const fib = n => {
 let prev = 0;
 let next = 1;

 for (let i = 0; i < n; i++) {
 let temp = next;
 next = prev + next;
 prev = temp;
  }

 return prev;
}

```
It's the best variant of solving, but if you want to show that you know something more than loop, for instance... 

###2. Recursion

Recursion - it's when function call itself until it doesn't.

```javascript
const fib = n => {
if (n <= 1) {
return n;
 } else {
return fib(n - 1) + fib(n - 2);
 }
}
```
Remember this example. You shouldn't do like that. Never! 
If on the interview you're asked to solve this task recursively, remember it's a pitfall. Why? Because if you need to count, for example, 55 Fibonacci number, you will see a little bit delay. This solving has O(e^n) notation. For better understanding, if you must wait 1 hour for fib(45), then for fib(46) you will wait 2 hours. 😄

So how can better do that? Follow me. It's better solution using recursion.

```javascript 
const fib2 = n => {
  if (n === 0) {
    return [0, 1];
  } else {
    const [prev, next] = fib2(n - 1);
    return [next, prev + next];
  }
}

const fib = n => fib2(n)[0] 
``` 
I'm pleasured to share with you ways of solving this task.
If you enjoyed this post, I’d be very grateful if you’d help it spread by emailing it to a friend, or sharing it on Twitter or Facebook. Have a nice day!
Last video game you finished
Tags: watercooler, discuss
Published: 2020-06-08 05:56:08

Hey guys, just wanted to know a bit more of you.

So I wanted to asked you, what was the last video game you finished, the last video game I actually finished was "the last of us" as you can see I stopped playing games with story years ago 😂

I love Stardew Valley, Animal Crossing but I don't think they have an actual ending 😅

But come on, let me know what have you played!

**btw** if you have any 2d indie you like let me know!
Web Whatsapp Native dark Mode
Tags: javascript, programming, github, webdev
Published: 2020-06-08 05:14:36

Hi everyone,

I've made a simple, lightweight script to turn on the native dark mode (hidden so far) from whatsapp in web version.

All it does is add a class to the body. No extra CSS required.

{% github dippas/WebWhatsapp-Native-DarkMode no-readme %}

Hope you guys enjoy as much I do (I'm a big fan of dark mode).

All the feedback is welcome and appreciated :)

---

**EDIT:** - Now available as extensions:


[Chrome extension](https://chrome.google.com/webstore/detail/hofpgmccblgdpklckoopbfpcojffbfef)

[Firefox addon](https://addons.mozilla.org/en-US/firefox/addon/webwhatsapp-native-darkmode/)

[Edge Chromium](https://microsoftedge.microsoft.com/addons/detail/ioiokiochndejeigfkekclmhgokkcidd)
Image hotspot using only HTML & CSS 🗽
Tags: codepen, html, css, tutorial
Published: 2020-06-08 05:44:52

Hello coding people, 👋
Hope you all doing well and in this Dev post we will learn how to create image hotspot with some simple and pure css codes. So check out this Code pen to see the entire code :)
cheers [Atul](https://atulprajapati.in) 👨‍💻
---
***[Be the CSS Hero from scratch 👩‍🚀](https://www.eduonix.com/web-development-css3-scratch-till-advanced-project-based/UHJvZHVjdC0xMzE1MDIw)***
---

{% codepen https://codepen.io/atulcodex/pen/vYNPgYZ %}
Suggestions to programmers who are just starting Javascript
Tags: javascript, webdev, discuss
Published: 2020-06-08 05:41:09

Javascript has become a very popular language in recent time. No one would've ever thought that Javascript would reach the height it's today. Since, Node.js was released, Javascript has seen a different evolution, a different trajectory. From learning plain JS to library like jQuery, we now have thousands of libraries and framework that are becoming the standard of developing web applications in the recent time. From developing interactive web-applications to Mobile Applications to Desktop Applications and even reach SPACE, Javascript has come a long way.

That's why Javascript is popular and immensly important in the recent times. And as a matter of fact, Javascript is evolving so rapidly that if you fail to grasp a new idea, you'll be left behind.


So, here is one thing I want to ask every JS developers in DEV.TO Community. What suggestions do you give to people who are just beginning Javascript ? What are you do's and don'ts and which aspect of the language you want people to focus and master ?
Mailer - Nodemon as a microservice
Tags: showdev, javascript
Published: 2020-06-08 05:38:46

---
title: Mailer - Nodemon as a microservice
published: true
description: A micro service that acts as a middleware to other SMTP servers
tags: #showdev #javascript
//cover_image: https://direct_url_to_image.jpg
---

I've been using Email based sign in or Magic Link sign in for almost all my projects and I end up setting up SendGrid or Nodemailer based on how much I think the project will grow. If it's a hobby project , I know that no one other than me will use it, so SendGrid works fine for that, on the other hand. If it's something I've built and promoted for people to use, and I see a good amount of people using the platform , I need to shift to Nodemailer and setup smtp with my email provider. 

Now Nodemailer is pretty easy to setup and all but, I need to change the code I already wrote for SendGrid and I'm not a fan of that approach so instead I wrote mailer, it's a simple API that you can just hit with a post request and it'll take care of invoking Nodemailer to send the mail. 


Now, I don't need to change the `sendEmail` function, i just need to change it to make a http request to my url instead of SendGrid's api.

The parameters it requires are a base64 string of the email config, a subject for the email , to address and html. Now I could write heavy docs , or I can have a Micro UI that helps you build the post url for it. 


You already know I did the 2nd one so no more boring write up.
[Mailer](https://mailer.reaper.im)
Go ahead check it out, and it might just help people.
How to count occurrences of dates in an array of date ranges: JavaScript
Tags: javascript, array
Published: 2020-06-08 05:12:06

I have a date-range of 01-01-2020 to 31-12-2020 and an array of date-ranges. I want the occurrence of each date in the array vs the main range.

```
    Eg: mainRange => 01-01-2020 to 31-12-2020
    
    dateRanges =[
      [01-01-2020, 03-01-2020],
      [03-01-2020, 04-01-2020],
      [03-01-2020, 06-01-2020]
    ];
    
    the output should be =>
    
    countArr = [1,1,3,2,1,1,0,0,......,0]; //array length 365
```

I was desparate and I had posted the same on <a href="https://stackoverflow.com/questions/62255316/how-to-count-occurrences-of-dates-in-an-array-of-date-ranges-javascript">stackoverflow</a> too. 🥺

SOLUTION : 

```
var range1 = new Date(2020, 0, 1),
    range2 = new Date(2020, 11, 31),
    dateRanges =[
        [new Date(2020, 0, 1), new Date(2020, 0, 3)],
        [new Date(2020, 0, 3), new Date(2020, 0, 4)],
        [new Date(2020, 0, 3), new Date(2020, 0, 6)],
    ],
    result = [];

while (range1 <= range2) {
    var count = 0;
    dateRanges.forEach(
        function(range) {
            if (range1 >= range[0] && range1 <= range[1]) {
                count++;
            }
        }
    );
    result.push(count);
    range1.setDate(range1.getDate() + 1); //+1 day
}

console.log(result);
```

Thank you 😍
An Overview of Server-side Rendering
Published: 2020-06-08 05:12:01

Server-side rendering has been around for awhile, but is undergoing a Renaissance as new tools like Gatsby and Next.js gain traction. So what is server-side rendering, and how is different from a client-side rendered web app? What is the advantage to server-side rendering?

Consider a web application, in which a Node server hosted by AWS serves a React application (compiled into HTML/CSS/JS). When a client-user sends a request to that web app's URL, the web app's server responds with the HTML/CSS/JS needed to load the front end of the web app. The client loads the JS, and if it's a web app of any complexity it will then fetch any resources necessary for the app to run. Consider that, in client-side rendering, a user will typically wait for one request-response cycle, wait for the JS in the response to load, and then wait for _another_ request-response cycle. 

Much has been written about [user's reactions to page load times](https://www.section.io/blog/page-load-time-bounce-rate), but note that milliseconds count.

Fetching not only slows down the user experience, but presents challenges for SEO. When Google indexes your web app's URL, it doesn't wait for fetching to complete. It indexes the html that is sent back from the web app's server. 

Server-side rendering is an alternative model to client-side rendering. The goal of server-side rendering is to offload as much of the work from the client to the server as possible. You can do this by rendering at run time (Next.js) or rendering at build time (Gatsby).

For example, by rendering at run time, you can make it the server's responsibility to fetch data for the web application. So when a user sends a request the app's URL, that will trigger the server to fetch data for the app, and once the fetch is resolved it will send all the HTML/CSS/JS the client needs in the response; the client won't need to fetch again. Depending on where your server is and where the storage for the data is, this can make a significant difference.

By rendering at build time, however, your server is configured to fetch any data the app needs _before_ a client sends a response, and compose that data into static HTML/CSS/JS. Then, when a client sends a request the web app's URL, the server responds with the static HTML/CSS/JS it's already built. 

Server-side rendering is ideal for web applications that don't involve significant dynamic interaction with the user, where you could ostensibly do one fetch to get all the data you need for the web app to function (blogs, smaller shops).

I hope this post has help clarify what server-side rendering is, and why it can be a powerful methodology.
Broadway design firm site with css layout position and display properties
Tags: css
Published: 2020-06-08 05:04:42

[Broadway Demo](https://heggy231.github.io/chingu-webdev-speedrun-challenge/frontend/broadway/)


- For `nav` to stay fixed on top, set parent container `position: fixed;`.

```html
<header>
    <nav>
      <ul>
         <li> About </li> <li> Work </li> <li> Team </li> <li> Contact </li>
      </ul>
    </nav>
</header>
```

```css
header {
  position: fixed;
  width: 100%;
  z-index: 10;
}
```

  Note: For footer add `bottom: 0;` to make it stay in the bottom since it matters where it is positioned in the page flow.


- When element is `inline` we couldn't add width, however, we could style the element as `inline-block` or `block`.

```css
nav li {
  display: inline-block;
  width: 50px;
  height: 50px;
}
```
  This results `li` to fit inside of `nav` as a row

  note: When applying `display: inline-block;` to `ol>li`, we notice the numbering goes away too!


- Once we set [`position: relative`](http://stanford.edu/group/csp/cs03/week5/text6.html#:~:text=Static%20positioning%20is%20the%20default,sequence%20of%20the%20web%20page.), we can add offset position properties (top, bottome, left, right) to position relative to the reserved spot in page flow.

```css
nav {
  position: fixed;
}

main {
  position: relative;
  top: 100px;
}
```
  
  `nav` is placed top of `main` in html page flow.  position: fixed breaks out element natural html flow and fix its position `top: 100px;` regardless where it sit in HTML structure.
How to use Heartbeat and DRBD for HA (high availability)
Tags: linux, devops
Published: 2020-06-08 04:39:14

---
title: How to use Heartbeat and DRBD for HA (high availability)
published: true
description: We look into high availability using Heartbeat and DRBD. Heartbeat is a software to monitor and failover when a machine is unresponsive and DRBD can help you replicate data between machines making your setup highly available. This solution can help you doing maintenance work without downtime.
tags: linux, devops
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/8p9syil6424rjgsruqs1.jpg
---

{% youtube Nq8K9SPAODc %}

We look into high availability using Heartbeat and DRBD. Heartbeat is a software to monitor and failover when a machine is unresponsive and DRBD can help you replicate data between machines making your setup highly available. This solution can help you doing maintenance work without downtime.
Machine Learning Algorithms
Tags: machinelearning, datascience
Published: 2020-06-08 04:25:55

Part 1: Logistic Regression

Welcome to Article “Machine Learning Algorithms”. I write continuous article about Machine Learning Algorithms.I hope this article will help to who willing to learn machine learning .

First we discuss about what is Regression?” Regression is the predictive modelling Technique” the Regression will estimate the relationship between a dependent variable and an independent variable.

So what is Logistic Regression and why use that? In this Logistic Regression the Results/outcome should be generated in Binary format it is used to predict the outcome of a categorical/discrete variable.outcome should be like in this format. zero or one(0/1),true or false.

Logistic Regression We have the categorical(discrete) variable, so predict value in discrete in nature. for an example tomorrow going to snow or tomorrow not going to snow. Its solved basically classification problems, the Logistic Regression graph called sigmoid curve.

Now we can see the Logistic Regression use-cases in our real life. the first example is Weather prediction ,for an example In the whether prediction we predict ,Today which is going to rain or not going to rain. the result provide yes or no value.

now we moving to classification problem,python help to multi classification problem.if we taken the vertebrates animals, here we can classifying its a “horse or not / bear or not bear” like that.its called as a class classification.

there have few steps to implement to any machine learning algorithms ,I implement this algorithm with below steps.

1.Collecting data =The First step is collecting the data and import the libraries.

2.Analyzing data =The Second step is Analyzing data,here we creating the plot for check the Relationship between the variables.

3.Data wrangling= The Third step is wrangling the data , we have the large number of data sets so we need to cleaning the unnecessary data /null value data from our data set.so we used this code.

4.Train/Test=The Fourth step is Build the model on the Train data and predict the output the test data.here we use the Logistic Regression for the train the model

5.Accuracy check =The final step is Accuracy checking ,calculate the Accuracy to the our Result