teleren/devto huggingface dataset:
add
Tags: walkingdatabase
Published: 2021-12-23 13:29:25

- [ ] tmux and tmux-plugins (https://github.com/tmux-plugins/list),
- [ ] lazydocker, 
- [ ] todo.txt, 
- [ ] ack, 
- [ ] html-xml-utils, 
- [ ] unified-alps, 
- [ ] stoplight, 
- [ ] some validators[0], 
- [ ] alder (https://github.com/aweary/alder), 
- [ ] tig, 
- [ ] vim_cubed, 
- [ ] fzf and fd (https://github.com/junegunn/fzf https://mike.place/2017/fzf-fd/),
- [ ] vim-seek, 
- [ ] vim-surround, 
- [ ] gti,
- [ ] httrack,
- [ ] lynx, 
- [ ] links, 
- [ ] urlview, 
- [ ] irssi, 
- [ ] newsboat,
- [ ] ranger,
- [ ] basics and workflows[1],
- [ ] diceware and blackjack or dining philosophers or byzantine generals?,
- [ ] mutt,
- [ ] cmus,
- [ ] frotz (http://www.ifarchive.org/indexes/if-archive.html),
- [ ] cygwin (https://blog.miguelgrinberg.com/post/web-development-on-windows-does-not-need-to-suck),
- [ ] yeoman/yo,
- [ ] yUML (e.g., yEd2kingly),
- [ ] gruntjs,
- [ ] gulpjs,
- [ ] pm2,
- [ ] nodemon,
- [ ] almond/r.js,
- [ ] docker-compose,
- [ ] wp-cli,
- [ ] ng (angularAMD, https://angular.io/guide/testing-code-coverage, etc.),
- [ ] sirv (https://www.npmjs.com/package/sirv-cli),
- [ ] surge.sh,
- [ ] heroku, 
- [ ] netlify?,
- [ ] storybook?,
- [ ] node-red?,
- [ ] npx,
- [ ] npm (e.g., `> $(npm run | percol`)[3]),
- [ ] mongod,
- [ ] protractor,
- [ ] cucumber,
- [ ] cypress,
- [ ] jest (hydration),
- [ ] karma,
- [ ] glances,
- [ ] django,
- [ ] tornado  (https://www.tornadoweb.org/en/stable/options.html),
- [ ] nginx,
- [ ] apache,
- [ ] owasp zap (https://www.zaproxy.org/docs/desktop/cmdline/),
- [ ] ps,
- [ ] ghostscript, 
- [ ] `magick mogrify -resize NN% file.png`,
- [ ] convert,
- [ ] brew,
- [ ] curses (https://github.com/thobbs/multitail-curses),
- [ ] calcurse (https://opensource.com/article/18/10/calcurse),
- [ ] etcd,
- [ ] clusterluck,
- [ ] pandoc (specifically slideshow building),
- [ ] openchain,
- [ ] holochain (zomes),
- [ ] handshake wallets,
- [ ] nix (https://nixos.wiki/wiki/Nix_Installation_Guide),
- [ ] zsh,
- [ ] fish shell,
- [ ] jsdoc,
- [ ] css-specificity,
- [ ] jekyll  (https://pmarsceill.github.io/just-the-docs/#getting-started),
- [ ] gem,
- [ ] ctags,
- [ ] mosh,
- [ ] iptables,
- [ ] winston (https://github.com/winstonjs/winston/tree/2.x#using-winston-in-a-cli-tool), 
- [ ] wiredep (https://github.com/taptapship/wiredep-cli), 
- [ ] webpack (is this zuckerbug's?),
- [ ] qemu,
- [ ] cli's for load balancers, facades, circuit breakers, gateways, etc.,
- [ ] ionic (capacitor),
- [ ] android studio,
- [ ] consul,
- [ ] keyware cli to cache invalidate semantic keyed links for MRUs,
- [ ] etc.[2]

___ 

[0] ![ext_138_image1.jpg](https://user-images.githubusercontent.com/102306/147171466-0ae934fe-e42b-45fa-9da3-8a26ca710282.jpg), lighthouse, or
[1]: https://github.com/nerdfiles/Hybrid.AngularAMD.HATEOAS/blob/master/resources/grunt-default.png
[2]: https://github.com/nerdfiles/oh-my-grid/blob/master/package.json#L6-L34
[3] `aliases: run, rum, urn`
Best places to deploy your app in 2022
Published: 2021-12-23 13:21:05

A few days ago I wanted to deploy an app but didn't want to go through managing all the infrastructure on AWS. I wanted the same developer experience that I have with my frontend apps where I pick a repo in vercel and that's pretty much it. So here are some cloud providers that have a hundred times better developer experience than AWS/GC/Azure.

## Fly.io
https://fly.io/

Pricing: Freemium (has free tier)

Description: Run your full stack apps (and databases!) all over the world. No ops required.

![Fly.io](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3xxv33dlucgw2jse8ftt.JPG)

## Render.com
https://render.com/

Pricing: Freemium (has free tier)

Description: Render is a unified cloud to build and run all your apps and websites with free TLS certificates, global CDN, private networks and auto deploys from Git.

![Render.com](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ssljj4ynoy1pnsy77p7f.png)

## Qovery
https://www.qovery.com/

Pricing: Freemium (has free tier)

Description: Deploy your apps on AWS Better, faster, simpler

![Qovery.com](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s4d03416t41vfnt9mtf0.png)

I ended up choosing Render.com. There's also Heroku but I'm sure most people know about it already :)

## [Toolhunt.dev](https://toolhunt.dev?ref=devto)

This list was originally posted on [Toolhunt.dev](https://toolhunt.dev?ref=devto) a website where I list great tools that help developers ship faster. You can find the original list here:

[https://www.toolhunt.dev/where-to-deploy-backend-apps](https://www.toolhunt.dev/where-to-deploy-backend-apps?ref=devto)

Thank you for reading and have a great day ✌✌

- [jordienr](https://twitter.com/jordienr)
CRUD Operations
Published: 2021-12-23 13:14:28

Answer: CRUD operations are the mix of Create, Read, Update and Delete.

Create: The Create operation is used to populate the MongoDB database with new documents.
	
There is two way to create documentations in a collections:
db.Userscollection.insertOne() 
db.Userscollection.insertMany() 

Read: The read operation is used to query a database document.
    
There is two way to read documentations in a collections:
 db.Userscollection.findOne()
db.Userscollections.find()

Update: The Update operation is used to make changes to existing database documents.

To update documents in a collection, MongoDB supports the following methods:
 db.Userscollection.updateOne()
 db.Userscollection.updateMany()
 db.Userscollection.replaceOne()
Delete: To delete documents from the database, utilize the Delete operation.

To delete documents from a collection, MongoDB supports the following methods:
 db.Userscollection.deleteOne()
 db.Userscollection.deleteMany()
Counter in JS || 10 JS Project Challenge #2
Tags: javascript, webdev, beginners, programming
Published: 2021-12-23 13:01:31

## Hello 👋
In this post I will show you how to make Counter, when you click a button in JavaScript.

This is Part 2 of the 10 JS Project Challenge.

So let's get into it.

First, here is the video tutorial:

{%youtube https://youtu.be/EFRKtivo7zw %}

### So let's start coding.

First, we need to create three files:

- index.html

- style.css

- home.js

Once we have those files created, we can start coding.

Here is the code for index.html:

```
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="style.css">
    <title>Document</title>
</head>
<body>
    <div class="wrapper">
        <h1 class="number">0</h1>
        <div class="buttons">
            <button class="upper" onclick="add()">Add Count</button>
            <button class="lower" onclick="Lower()">Lower Count</button>
        </div>
    </div>
    <script src="home.js"></script>
</body>
</html>
```

So basically we are creating one Text for the counter and two buttons. Nothing crazy so far.

Now it's time for styling!. Open our style.css and write this code in it.

```
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

*{
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
}
.wrapper{
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 35vh;
}
h1{
    font-size: 4rem;
}
.buttons{
    padding-left: 1.5rem;
}
button{
    margin-left: 0.5rem;
    background-color: #4287f5;
    color: white;
    padding: 12px 7.5px;
    border-radius: 20px;
    border: none;
    outline: none;
    cursor: pointer;
}
```

We have a font here declared, the font is Poopins.
We are rewriting the default padding and margin and changing the font to Poopins. The other is just styling elements.

Now let's move to the JavaScript part. Here is the code for JavaScript.

```
const upper = document.querySelector(".upper");
const lower = document.querySelector(".lower");
const numberElement = document.querySelector(".number")
let number = 0;


function add(){
    number += 1;
    numberElement.innerHTML = number;
}

function Lower(){
    number -= 1;
    numberElement.innerHTML = number;
}
```

So first we are creating variables for each element in HTML. The we are creating a variable for Number Integer so we can count how many users press the button. So we are creating two functions, one for increasing our counter, and one for decreasing.
Function obtains a Number + or -, and then we are passing the value to the actual text. 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/44hf1uc7yro94huebkhn.png)

And that's it. You can see the Actual value of the number on the screen, depending which button you are pressing.

Thanks for reading my post, and I hope I will see you next time.
Node JS 
Published: 2021-12-23 12:47:15

CRUD Operations
Crud stands for Create Read Update and delete operations. According to the definition crud operation means the way to create an object then read the object then update that if needed a finally delete all data after use. Crud operation is used to make those changes to storage systems.
  JWT 
JWT The JSON web tokens are known as secure identification for websites which helps to make sure that the requests getting from the user side are originally from a valid user or not. Jwt is basically a json object that holds user information and matches with the information that the user provides on the website.
For an example  
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
Is  a token when we decode the token we get 
 {
  "sub": "1234567890",
  "name": "John Doe",
  "iat": 1516239022
}

The object that holds information
Mongoose
Mongoose is a node-based library for MongoDB. The main objective of mongoose is to provide developers to enforce a specific schema at the application.
Relational database (MySql)
My Sql is a popular database system for storing data. All the datas are stored is a table row everytime in my sql database.My sql uses structure query  language (SQL).in MySQL one can access associated data using joins which minimizes duplication. 
Where mongo DB or any othe no sql databases  stores data in json formate but my sql stores data on table raw basis.
NODE js
Node js is an asynchronous backend related javascript run time. Node js is used to create scalable live application.Node.js takes the event model a bit further. It presents an event loop as a runtime construct instead of as a library. In other systems, there is always a blocking call to start the event loop.
JavaScript React
Published: 2021-12-23 12:46:08

**Context API **

> The Context API is a React structure that enables you to exchange unique details and assists in solving prop-drilling from all levels of your application and prop-drilling is a  process where we pass a props with another component with the help of all the components that come between them. Actually we use context api pass some unique data from one component to another so this is very important in React.

**JSX **

> JSX is a syntax extension which describes React object tree. It is just like an XML-like extension to ECMAScript.
> A JSX compiler will translate any JSX into regular javaScript before the file gets to the web browser. A React element which is produced by JSX and it is simply an object and its representation of a DOM node.

**Virtual DOM and diffing- algorithm **

> Virtual dom is representing a UI which is a copy of the original DOM kept in the memory and synced with the real DOM by libraries such as ReactDOM. This process is called Reconciliation.
> Virtual Dom: Best for mobile-first application. Representation of a dom object.
> Real Dom : Representation of a web page. Represent the document as nodes and objects.
> Diff algorithm : A programming tool and using this tool we can differentiate between two or more files. To find a heuristic to change anything from a state to another is the main work of a diff algorithm.

**Props and states **

> Props : Props are read-only and  immutable. Pass data from one component to other components as an argument. Can be accessed by the child component. 
> State :  State changes can be asynchronous and mutable. State holds information about the components. Can’t be accessed by child components.

**React component lifecycle **

> React component lifecycle can be describe into four parts:
> Initialization,
> Mounting,
> Updating,
> Unmounting.

**UseState **

> A function is a built-in hook that can be imported from the react package. It allows us to track state in a function component. 
> It is a special function that passes a function as an argument if the initial state has to be computed and the value returned by the function will be used as the initial state.


**Differentiate between stateful and stateless components **

> Differentiate between stateful and stateless components are: 
> Stateful components: Manages the state in class-based with state or functional with useState. Have authority to change state. Data keeps changing.
> Stateless components: No initial state management in it. Do not have authority to change state. Data remains the same.
Interview question answer
Tags: javascript, beginners, programming
Published: 2021-12-23 12:20:51


1. How Different is React-native from ReactJS?
React.JS is a JavaScript library that supports both the running front-end web and the server for creating user interfaces and web applications. It follows the concept of recyclable material. React Native is a mobile framework that uses the host's available JavaScript engine, allowing you to create mobile applications in JavaScript for a variety of platforms (iOS, Android, and Windows Mobile) that allow you to use ReactJS to create reusable content and communicate. With the further explanation of the native material
 
2: What are the advantages of native apps over hybrid apps?
Native app: Each device has to be coded differently to create (Android, iOS). It costs more to create a native app. It gives much better security in terms of security. Can
Hybrid app: Once you have coded all the devices to create the hybrid app, it works a little solo. It costs less to create. Security is less.
 
3. How will you call an API in React Native?
React native: works with a fetch API that is used to make API calls to the server. The Fetch API provides a JavaScript interface that can bring network asynchronous resources. It works perfectly with the XML HTTP request. 
4. Name core Components in React Native and the analogy of those components when compared with the web.
React native core component Name
<View> It is used to create styles in the middle of the user interface.
<Text> Their function is to manage style and touch.
<ScrollView> This is used for scrolling between screens.
<Image> This is used to show different types of images.
<TextInput> This is used by the user to access different sides.
 
5. What is the InteractionManager and how is it used? Why is it important?
Interaction manager is a native module that is responsible for suspending the execution of a function until the end of an interaction.
The importance of interaction manager is that there are two aspects of react-native one being JavaScript is used for IU design. Another is used to create apps.


6. What is Aggregation?
Combining several objects into a new one is known as aggregation or composition. It's a powerful way to separate a problem scope is complex that it's impossible to think about it at a detailed level in this entirety, you can separate the problem into several smaller areas, and possibly then separate is of these into even smaller chunks. This alloys You think about the problem on levels of abstraction.
Take, for example, a personal computer It's a complex object. You cannot think about all the things that need to happen when you start your computer. But, you can abstract the problem by saying that you need to initialize all the separate objects that your computer object consists of the monitor object, the mouse object, the keyboard object, and so on. Then you can dive deeper into each of the subobjects. This way, You're composing complex objects, assembling reusable parts. 
To use another analogy, a book object can contain (aggregate) one or more Author objects, a Publisher object, several objects, a TOC (Table of contents), and so on.
50. Pow(x, n) [Leetcode][C++]
Tags: cpp, algorithms, leetcode, programming
Published: 2021-12-23 12:44:20

**_All suggestions are welcome. Please upvote if you like it. Thank you._**

---

[Leetcode Problem Link: 50. Pow(x, n)](https://leetcode.com/problems/powx-n/)

---

**_Brute Force Solution:_**

```javascript
class Solution {
public:
    double myPow(double x, int n) {
		// Brute Force Solution Time O(N) & Auxiliary Space O(N)
        if(n==0)
            return 1;
        else if(n>0) 
            return x*myPow(x,n-1); 
        else
            return (1/x)*myPow(x,n+1); 
    }
};

```

**_Efficient Solution:_**

```javascript
class Solution {
public:
    double myPow(double x, int n) {
		// Optimal Solution Time O(logN) & Auxiliary Space O(logN)
        if(n==0) 
			return 1;
		// Using Binary Exponentiation(Time O(logN))
		// x^n=x^(n/2)*x^(n/2). So, recursive function is 
		// called logN times where y=x^(n/2) and function returns y*y
        double y = myPow(x,n/2);
        if(n%2==0)
            return y*y;
        else if(n < 0)
            return 1/x*y*y;
        else
            return x*y*y; 
    }
};
```
**_All suggestions are welcome. Please upvote if you like it. Thank you._**
26. Remove Duplicates from Sorted Array [Leetcode][C++]
Tags: cpp, algorithms, leetcode, programming
Published: 2021-12-23 12:41:47

**_All suggestions are welcome. Please upvote if you like it. Thank you._**

---

[Leetcode Problem Link: 26. Remove Duplicates from Sorted Array](https://leetcode.com/problems/remove-duplicates-from-sorted-array/)

---

**_Brute Force Solution:_**

```javascript
class Solution {
public:
    int removeDuplicates(vector<int>& nums) {
    // Brute Force Solution 
	// Time O(NlogN) as map insertion takes O(logN) time and loop runs for N such iterations. Auxiliary Space O(N)
    vector<int> ans; 
    map<int,int> mp; 
    for(int i = 0; i < nums.size() ; i++){
        if(mp[nums[i]]==0)
            ans.push_back(nums[i]); // ans vector stores unique elements based on their first occurence in nums vector
        mp[nums[i]]++; // mp stores frequency of each unique element in nums vector
    }
    nums = ans; // ans vector has all unique elements in ascending order.
        // These unique elements are overwritten on initial indices of nums array.
    return ans.size();
}
};

```

**_Optimal Solution:_**

```javascript
class Solution {
public:
    int removeDuplicates(vector<int>& nums) {
        // Optimal Solution 
		// Time O(N) & Auxiliary Space O(1) 
        // Two Pointer Method
        int len=nums.size();
        if(len==0)
            return 0;
        int p1=0; 
        for(int p2=1;p2<len;p2++){
            if(nums[p1]!=nums[p2]){
                // If elements at p1 & p2 not equal, increment p1 and copy 
                // nums[p2] to nums[p1] so as to concentrate all unique 
                // elements in ascending order at the initial indices of the vector
                p1++;
                nums[p1]=nums[p2];
            }
        }
        // p1 location is the final indice of the 
        // unique element subarray at the beginning of nums vector
        return p1+1;
    }
};

```
**_All suggestions are welcome. Please upvote if you like it. Thank you._**
1. Two Sum [Leetcode][C++]
Tags: cpp, algorithms, leetcode, programming
Published: 2021-12-23 12:33:17

**_All suggestions are welcome. Please upvote if you like it. Thank you._**

---

[Leetcode Problem Link: 1. Two Sum](https://leetcode.com/problems/two-sum/)

---

**_Brute Force Solution:_**

```javascript
class Solution {
public:
    vector<int> twoSum(vector<int>& nums, int target) {
		//Brute Force Solution TimeO(N^2) & Auxiliary Space O(1)
        int length=nums.size();
        for(int i=0;i<length;i++){
			for(int j=i+1;j<length;j++){
               if(nums[i]+nums[j]==target){
                   return {i,j};
               }
           }
       } 
        return {}; 
	}
};

```

**_Efficient Solution:_**

```javascript
class Solution {
public:
    vector<int> twoSum(vector<int>& nums, int target){      
		//Efficient Solution TimeO(N) & Auxiliary Space O(N)
        int length=nums.size();
        unordered_map<int,int> map;
        for(auto i=0;i<length;i++){
            if(map.find(target-nums[i])!=map.end()){
                return {i,map[target-nums[i]]};
        }
        map[nums[i]]=i;
        }
        return {};
    }
};

```
**_All suggestions are welcome. Please upvote if you like it. Thank you._**
Creating Your First Application On Python Using Tkinter
Tags: firstyearincode, python, tutorial, tkinter
Published: 2021-12-23 12:23:09

## What is Tkinter
For those who don't know what tkinter is, It is basically a python module for making GUI(Graphical User Interface), in which we can do all the beautiful things on the frontend and hide your messy backend code😅..
##Getting Started
First off to get started, we need to Install Tkinter using pip
On your terminal type,
```
pip install tk
```
Note: You will need the latest version of python(3.9.0) or higher.

###Now to the fun stuff 👾👾..
After installing tkinter, you are ready to make your first python application. 
On your text-editor, create a python file(.py) and then you'll be needing the following code to set up tkinter on your application.

```
#importing the tkinter module
from tkinter import *
import tkinter

#assigning a "root" as the main window for our application
root = tkinter.Tk()

root.mainloop()
```
Now if you run the following code, you can see a window as shown below.

![Tkinter Application window](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vpn2kq5xpmpvtnilxz6a.png)
 
This is the place all of our widgets which are the elements are going to be shown.

Before we go ahead, We need to make a fixed size for our application.
Just after assigning the root = tkinter.Tk() add,
```
root.geometry('500x500')
```

###What is better than making a "Hello World!" program?
Now we're going to a widget by tkinter which lets us make some cool text.

```
#Just a basic text.
Label(root, text="Hello World!").pack()

#Just a basic text but bigger.
Label(root, text="Hello World!", font=20).pack()

#A bold text with a different font
Label(root, text="Hello World!", font=('Jokerman',25,'bold')).pack()

#A text with red background
Label(root, text="Hello World!",bg='red', font=10 ).pack()

#A text with red color
Label(root, text="Hello World!",fg='red', font=10 ).pack()
```
Here's the complete code of the program that we just made,

```
#importing the tkinter module
from tkinter import *
import tkinter

root = tkinter.Tk()
root.geometry('500x500')
#Main
#Just a basic text.
Label(root, text="Hello World!").pack()
#Just a basic text but bigger.
Label(root, text="Hello World!", font=20).pack()
#A bold text with a different font
Label(root, text="Hello World!", font=('Jokerman',25,'bold')).pack()
#A text with red background
Label(root, text="Hello World!",bg='red', font=10 ).pack()
#A text with red color
Label(root, text="Hello World!",fg='red', font=10 ).pack()
root.mainloop()
```
Here's the output of the following code,

![Hello World!](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mmbat77n7jrfvqoi96op.png)

###Congrats🎉🎉 you've successfully made your first python application!

That's it for this tutorial on making your first application, If you want to see more widgets by tkinter you can check [this link](https://www.dummies.com/article/technology/programming-web-design/python/using-tkinter-widgets-in-python-141443)

And by the way this is my first dev-post, I would really like to see what you think about it.😄