teleren/devto huggingface dataset:
We teach "design" (the whole process) - and of course / the programming too! 
Tags: webdev
Published: 2021-05-24 19:05:59

Haven't heard of us? We're **Perpetual** "Dot" **Education**

That makes sense! We're not a giant corporation. We're keeping thing small and effective.

We're a small design school dedicated to educating a new era of aware, confident, and _responsible_ designers in the web space. There are a million "coders" out there - but we need something _more_.

{% youtube ooF9DZ-WD1w %}

The classes are small and personal. Serious personal attention. It's a 6-month program - and it's only goal is to focus full time on getting you trained up and out there designing a better world. You can talk to us every single day (the real humans who designed the course).

Learn more deeply - and _faster_ - by focusing on just the right things at the right times.

Sound _interesting?_ 

We still have some openings for June.

Next session won't start until August.


If you want a 100% chill / no pressure - meeting (to meet us/the actual humans who teach the course) - with real-world advice...  and no "Salesman" stuff: Do it. Meet us. It's easy.

Here's what some of our students are writing during the course:

* [a-month-studying-how-to-code](https://apinchofcode.substack.com/p/a-month-studying-how-to-code)
* [working-with-my-first-client-an-intro](https://alexvong.substack.com/p/working-with-my-first-client-an-intro)
* [i-am-here](https://zinthya.substack.com/p/i-am-here)
[a-dreamer-commits](https://jessehunter.substack.com/p/a-dreamer-commits)
* [a-rising-web-designer-and-her-frequent-emotional-outbusts](https://annalenajohnson.substack.com/p/a-rising-web-designer-and-her-frequent)
* [a-philomath-and-perpetual-learning](https://perpetualphilomath.substack.com/p/a-philomath-and-perpetual-learning)
* [part-one](https://johnxm.substack.com/p/1)


If you've been trying to "learn code" - for a week or a month - or 6 months - or years... _consider_ a new path.

## [Perpetual Education](https://perpetual.education)
How to create New VM in CLI
Tags: devops, linux, kvm
Published: 2021-05-24 19:05:04

### KVM to Create New VM using CLI Commands, Tested in ubuntu 16.04 its working fine

```bash
sudo virt-install \
--virt-type=kvm \
--name centos7 \
--ram 6144 \
--vcpus=8 \
--os-variant=rhel7 \
--hvm \
--cdrom=/RootPartitions/CentOS-7-x86_64-DVD-1810.iso \
--network network=default,model=virtio \
--graphics vnc \
--disk path=/RootPartitions/centos7-0.1.img,size=30,bus=virtio


# Spin a New VM with Bridge Network

sudo virt-install \
--virt-type=kvm \
--name centos7 \
--ram 6144 \
--vcpus=8 \
--os-variant=rhel7 \
--hvm \
--cdrom=/RootPartitions/CentOS-7-x86_64-DVD-1810.iso \
--network bridge=br0,model=virtio \
--graphics vnc \
--disk path=/RootPartitions/centos7.img,size=30,bus=virtio
```

### Basic Virsh Commands
```bash
sudo virsh list --all. # to all the VM in the Host Machine 
sudo virsh destroy <vm-nam> # Stopping or Shutting down the VM
sudo virsh dumpxml vm-name > vm-name.xml # Export the VM setting in XML Formate
sudo cat vm-name.xml | grep source # to list the attached Partition
sudo lvremove /partition/name # remove the LVM Partition 
sudo rm -rf /RootParition/Centos.img # To remove the .img and .qcow2 partitions
sudo virsh undefine <vm-name> # Removing the VM from the Host Machine, before execute
sudo virsh vncdisplay # to display the VNC port number
```

### How to Connect the Private VM from the Local machine
Host Machine should have the Public and Private Network and VM should configured via bridge network from Privat network. 

Using SSH tunnel we can connect the VM, before pls install VNC viewer in your local - https://www.realvnc.com/en/connect/download/viewer/

From Local Machine

```bash
ssh -L localhost:5900:VM-IP:VNC-Port-Number username@hostmachine.com
```

**For Example**

HostMachine: dhanesh.vm-test.com (Public IP)
HostMachine: UserName: dhanesh
VM PrivateIP: 192.168.100.100
VM VNC Port: 12

```bash
ssh -L localhost:5900:192.168.100.100:5912 dhanesh@dhanesh.vm-test.com
```
Finally open the VNC viewer and type `localhost:5900` you can able to see the VM from your local machine. 

Ensure that all the Network settings are working fine.
TedX talk for Developer
Published: 2021-05-19 06:37:34

A delightful way to teach kids about computers | Linda Liukas

PC codes is the following all inclusive language, and its syntax will be restricted simply by the minds of the up and coming age of developers. Linda Liukas is assisting with teaching critical thinking kids, urging them to see PCs not as mechanical, exhausting and confounded however as bright, expressive machines intended to be dabbled with.

Thomas Suarez | 12 Year Old Developer (2012)

Most 12-year-olds love playing videogames - Thomas Suarez showed himself how to make them. In the wake of creating iPhone applications like "Bustin Jeiber," a whack-a-mole game, he is currently utilizing his abilities to help different children become engineers

Elon Musk | The future we're building

Elon Musk talks about his new task burrowing burrows under LA, the most recent from Tesla and SpaceX and his inspiration for building a future on Mars in discussion with TED's Head Curator, Chris Anderson.

Inside the mind of a master procrastinator | Tim Urban

Tim Urban realizes that lingering doesn't bode well, however he's always been unable to shake his propensity for holding up until the last moment to complete things.

The mind behind Linux

Linus Torvalds changed innovation twice — first with the Linux kernel, which helps power the Internet, and again with Git, the source code the executives framework utilized by designers around the world. In an uncommon meeting with TED Curator Chris Anderson, Torvalds talks about with astounding receptiveness the character characteristics that incited his exceptional way of thinking of work, designing and life.

How algorithms shape our world - Kevin Slavin

Kevin Slavin contends that we're living in a world intended for - and progressively constrained by - algorithms. In this arresting talk from TEDGlobal, he shows how these intricate PC programs decide surveillance strategies, stock costs, film contents, and design. Slavin additionally cautions that we are composing code we can't comprehend with suggestions we can't handle.

How a handful of tech companies control billions of minds every day | Tristan Harris

A small bunch of individuals working at a modest bunch of tech organizations steer the contemplation of billions of individuals consistently, says design thinker Tristan Harris. From Facebook notices to Snapstreaks to YouTube autoplays, they're all going after a certain something: your consideration. Harris shares how these organizations go after our brain science for their own benefit and requires a plan renaissance wherein our tech rather urges us to experience the timetable we need.

How to Get Your Brain to Focus | Chris Bailey | TEDxManchester

So how would we tackle our thoughtfulness regarding center further, get occupied less, and surprisingly become more inventive? Chris Bailey, writer of the new book Hyperfocus, discusses how our capacity to center is the way to profitability, innovativeness, and carrying on with a significant life.

😎Thanks For Reading | Happy Coding⚡

Article by Dev Write Ups
Compare two arrays - JavaScript
Tags: javascript, react
Published: 2021-05-24 18:45:28

// `a` and `b` are arrays
const isEqual = (a, b) => JSON.stringify(a) === JSON.stringify(b);

// Or
const isEqual = (a, b) => a.length === b.length && a.every((v, i) => v === b[i]);

// Examples
isEqual([1, 2, 3], [1, 2, 3]);      // true
isEqual([1, 2, 3], [1, '2', 3]);    // false
Using multiple versions of nodejs.
Tags: node, cli, nvm
Published: 2021-05-24 18:35:35

## Introduction
Usually we work on different version for our nodejs project and its hard to manage them,but fortunately there is tool called NVM(node verion manager) which help to manage your node version and switch between them according to your projects.
<br>
### Windows installation
Unfortunately nvm project is only for linux/macos, but...but there is another very similar project by Corey bulter,known as nvm-windows. Click this link  download the nvm-setup.zip file and install it in a mundane fashion as on windows.
After installation you can use the same commands as on linux/macos.
<br>
### Linux installation
In your terminal use curl to install 
```shell
$ curl -o- https://raw.githubusercontent.com/nvm-sh/v0.34.0/install.sh | 
```
after installation you need to add a bit of configuration in your .bashrc file or .zshrc etc. So, open the file and append the below code.
```shell
$ export NVM_DIR="${XDG_CONFIG_HOME/:-$HOME/.}nvm"
[ -s :$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
```
This sets the path to directory of installation.
Reload your blog terminal, for the changes to take effect and we are good to go.
<br>
### usage
So let's jump into the terminal and look at some of the commands.
+ To Install latest version of node
```shell
$ nvm install node
```
+ Install specific version
```shell
$ nvm install {node_verion}

#example
$ nvm install 10.0.0
```
+ command to list out all the versions installed 
```shell
$ nvm ls
```
+ Switching between different node versions
```shell
# to use latest version
$ nvm use node  

# for a specific verion
$ nvm use 10.0.0  
```
+ Deleting node versions
```
$ nvm uninstall {node_version}
```

## Conclusion
As this was an introductory post, we looked at some of the most used commands, this is a very useful tool if you are working on multiple projects which requires different version of node. You can have a look at the official nvm https://github.com/nvm-sh/nvm gitrepo to understand thoroughly.

Liked the content?
[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/I2I639WWJ)
Hide & Seek Code: Part II
Tags: nestjs, node, javascript, architecture
Published: 2021-05-24 18:32:36

If you are new here, then please visit our earlier article over [here](https://dev.to/vjnvisakh/hide-seek-code-hdp) for some context. 

After the last article we were trying to find out ways to improve upon the approach but at the same time didn't want to do anything crazy either. 

That is when we found out about [Buddy](https://buddy.works/). Buddy is one of those easy DIY devops tools out there. Best part is the UI and how easy it is to create a deployment pipeline. 

### Modifying package.json

Okay so back to our task. We added this line in our **package.json** file under the build script.

```
"build": "nest build && mkdir -p build && node obfuscate.js && find ./build -name '*.ts' -type f -delete && cp package.json build/",
```

The above line creates a folder called **build**, obfuscates(make it unreadable) and remove all the .ts files. We also had to copy our package.json file into the build folder so that we can install our dependencies at our destination.

### Let's lay some pipes

Then we setup a pipeline in Buddy. 
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kal173xav6vdgue8xcjr.png)

We made 3 actions. Actions are more like a sequence of steps.  

1. The first one "Execute" created a build folder and obfuscated code.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ixnaqqbwfbqgw054gooa.png)

2. The second one copied the build folder to the client's server.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4mbqzi0xn3h4qdrwzllc.png)

3. The third one basically started the project.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jbdgj8j1uiof4mk5evt6.png)


### Feel good moment

Once the actions were setup we started our pipeline and kept looking at this "feels good" UI while it was running.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ydo36om8dwcpx8dr9d5u.png)

After the pipeline completed, we logged into our server and were able to see our instance running. Phew!!! And this is how our code looks now. Not the best of encryption, but pretty hard to read/modify.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4w1smcfu4t3xlxfm7e7w.png)

### What we feel

This solved our problem to a major extent. The only drawback we found was the speed of execution. It takes around 2-3 minutes for the entire process to complete. But we are sure there are ways to optimize it. So we are looking forward to it.


Let us know your comments.



Happy programming!!!
Literals and Variables in Java.
Tags: java, beginners, goal, motivation
Published: 2021-05-24 18:28:20

Well I took a break of two days from my learning Java journey so that I could do my another favorite thing that is doing some art work after being surrounded from tech my all days, some time these breaks are necessary so as to give you a mental peace.
Enough of talks now let's get back to our business that is learning Java.

It's **day six** and today I will talk about Literals and variables.

# Literals :-
  + literal can be anything that has a fixed value and can be represented in a human readable form and are also called as **consonants**.
  + in java literals can be of any of the eight primitive types.
  + in addition too the eight primitive types Java also supports **Hexadecimal**, **octal**, and **binary** literals.
  + Hexadecimal literals have to begin with **0x** or **0X** and octal literals have to begin with **0** and similarly binary literals have to begin with **0b** or **0B**.
  + Java furthermore also supports another type of literal *String*, it can be understood as set of characters enclosed by double quotes and can even contain character escape sequences like /n, /t etc.

# Variables -
  + as evident from the name itself it refers to something that can vary and are used to declare as well as initialize values in a Java program.
  + **Initializing Variables in Java**
     ```
      type variableName = value;
      for example :- 
      int ageOfStudent = 20;
     ```
  + while declaring and initializing variables of same data type we can separate them using commas and even assign values simulatenously. for example - 
   ```
    int ageOfStudent = 10, numberOfSiblings = 2;
   ```
  + java also supports dynamic initialization of variables that is at run time.
  + **Scope and Lifetime of a Variable** -
     + in Java all the variables are defined within a block of code which like every other program is defined by opening and closing of curly braces.
     + these blocks define a <u>**scope**</u>.
     + in Java scopes are defined by two ways:-

         i. defined by methods
         ii. defined by class

  + a variable defined within a block is called local variable.
  + objects declared in outer scope will be visible to inner scope but the vice-versa will not hold true.

Closing here for the day, feel free to add, correct or suggest any mistake that may have crept in.
Hide NavBar as Scroll down, in less than 10 lines of javascript;
Tags: javascript, tutorial, webdev, css
Published: 2021-05-24 18:21:30

<a href="https://www.buymeacoffee.com/areeburrub" target="_blank"><img src="https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png" alt="Buy Me A Coffee" style="height: 41px !important;width: 174px !important;box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;-webkit-box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;" ></a>

You must have seen this effect on several website, where you scroll down and navigation bar automatically hides and reappears when scroll up.

{% codepen https://codepen.io/areeburrub/pen/Vwpbxjw %}

So here's basic page in which I have implemented this,in just 10 lines of javascript.
 
```var lastScrollTop;
navbar = document.getElementById('navbar');
window.addEventListener('scroll',function(){
  var scrollTop = window.pageYOffset || document.documentElement.scrollTop;
  if(scrollTop > lastScrollTop){
    navbar.style.top='-80px';
  }
  else{
    navbar.style.top='0';
  }
  lastScrollTop = scrollTop;
});```

### How it's working
Here, the position of the navbar is being altered using javascript.

First we create a variable which stores position of Page;

Then we get the scroll position using: `window.pageYOffset` or for some browser 'document.documentElement.scrollTop';


Then check that weather the page is scrolled up or down;

Then save the scroll vale to the variable;

This is done every time whenever the page is scrolled, as all this lies under a `EventListener`.
###Check the JS in codepen it will make it more clear
<hr>

>
## Check out my other posts as well
{% link https://dev.to/areeburrub/have-the-frost-glass-effect-on-your-website-see-how-hok %}
### Follow me for more
{% user areeburrub %}
The crazy world of javascript functions
Published: 2021-05-24 18:10:30

When I first began learning about javascript, the one thing that was by far the most confusing was the different types of functions that javascript has to offer. 

The two key ways to declare functions is through function declarations and function expressions.

Let's begin by taking look at an example of a function declaration.
```javascript
function greeting(name) {
return `Hello, ${name}!`
}

greeting("Tom")
// => "Hello, Tom!"
```
Above is an example of a function declaration. We can see that the function is declared using the 'function' keyword. It is then followed by the name of the function, in this case 'greeting'. Next, we are taking in a argument 'name' which then will be interpolated into our return string. Thus, when we call greeting and passing in a name like 'Tom', we can fairly expect it to return "Hello, Tom!"

Next, let's take a look at function expressions. Functions have similar syntax to function declaration, however something to note is that function expressions are not hoisted. This means we cant call the function expression before we actually declare it. Function expressions can also be declared without a name. This is what is known as a anonymous function. A lot of time you may see function expressions that are anonymous written like this...
```javascript
let sum = function(num1, num2) {
return num1 + num2
}

sum(1, 2)
// => 3
``` 
We can see that we are creating a variable called sum and setting it to an anonymous function that takes in two numbers and then sums them. We then call this function expression by initializing the variable and passing in two numbers.
Laravel 8 Rest API CRUD Example with JWT Auth

Tags: laravel, jwt, api
Published: 2021-05-24 17:53:49

Throughout this tutorial, we’ll be learning how to authenticate REST APIs using JWT in the latest Laravel 8 version. You will learn how to create a REST API using Laravel 8 with JWT authentication.

We’ll see how to set up JWT authentication in Laravel 8 and implement a secured REST API using the tymon/jwt-auth package.

In this tutorial, we’ll see step by step to implement a REST API with PHP and Laravel 8 with authentication via JWT tokens.

This is a comprehensive Laravel 8 JWT Authentication example tutorial. In this article, we will learn how to create secure REST APIs in Laravel using JSON Web Token (JWT). To protect user authentication API in Laravel 8|7 we will use tymondesigns/jwt-auth a third-party jwt-auth library.

Creating robust APIs in Laravel is secure, easy, and exciting. Laravel makes the development process relatively easy. It takes out almost entire pain for developing comprehensive functionalities commonly used for web development, like authentication, routing, sessions, and caching

[Laravel 8.x Rest API CRUD Example with JWT Auth](https://www.codecheef.org/article/laravel-6-rest-api-with-jwt-authentication-with-crud)
Day 91
Tags: 100daysofcode, programming
Published: 2021-05-24 17:30:04

Day 91/200 of #200DaysOfCode #100DaysOfCode

- Solved four problems on Codewars.

1 - [Vodka festival](https://www.codewars.com/kata/5876031f889768640900004c) (6 kyu) || [MySolution](https://github.com/Rb-wahid/My-Coding-Experience/blob/master/src/Codewars/6%20kyu/VodkaFestival.js)
2 - [UVB-76 Message Validator](https://www.codewars.com/kata/56445cc2e5747d513c000033) (7 kyu)  || [MySolution](https://github.com/Rb-wahid/My-Coding-Experience/blob/master/src/Codewars/7%20kyu/UVB-76MessageValidator.js)
3 - [Russian postal code checker](https://www.codewars.com/kata/552e45cc30b0dbd01100001a) (7 kyu)  || [MySolution](https://github.com/Rb-wahid/My-Coding-Experience/blob/master/src/Codewars/7%20kyu/RussianPostalCodeChecker.js)
4 - [How much coffee do you need?](https://www.codewars.com/kata/57de78848a8b8df8f10005b1) (7 kyu)  || [MySolution](https://github.com/Rb-wahid/My-Coding-Experience/blob/master/src/Codewars/7%20kyu/HowMuchCoffeeDoYouNeed%3F.js)



[Become Code Warriors](www.codewars.com/r/YECsUA)
Netgear
Published: 2021-05-24 17:15:19

Extender buying guide will help you to pick the right wifi extender for you ,you will also know about things to remember before buying a range Extender. We also provide a online support to our netgear wifi extender users. We have a web page <a href="https://sites.google.com/view/mywifiext-net-/">mywifiext.net</a> its very easy to use just check it  mywifiext.net and follow the given simple steps written on the page. if you face any problem with your extender it is suggested to get on the spot netgear extender customer support for further assistence.
New Pattern Matching Feature in Python
Tags: python, programming, datascience, webdev
Published: 2021-05-24 17:13:01

https://www.youtube.com/watch?v=2qJavL-VX9Y

The new structural pattern matching feature arriving to Python 3.10!

Python 3.10 is beginning to fill-out with plenty of fascinating new features. One of those, in particular, caught my attention - structural pattern matching - or as most of us will know it, switch/case statements.

Switch-statements have been absent from Python despite being a common feature of most languages. Python is leapfrogging ahead of those languages by introducing the match-case statement as a switch-case v2.0.

Back in 2006, PEP 3103 was raised, recommending the implementation of a switch-case statement. However, after a poll at PyCon 2007 received no support for the feature, the Python devs dropped it.

Fast-forward to 2020, and Guido van Rossum, the creator of Python, committed the first documentation showing the new match-statements, which have been named Structural Pattern Matching, as found in PEP 634.

Let's take a look at how this new logic works.

Medium Article:
https://towardsdatascience.com/switch-case-statements-are-coming-to-python-d0caf7b2bfd3

Friend Link (free access):
https://towardsdatascience.com/switch-case-statements-are-coming-to-python-d0caf7b2bfd3?sk=363e0f7696502647e007f91910b4c817