teleren/devto huggingface dataset:
Basic SQL commands cheat sheet📋
Published: 2022-11-16 17:30:57

###1- SELECT
- Select data from database.

###2- FROM        
- Specify table we're puling from.

###3- WHERE       
- Filter query to match a condition.

###4- AS          
- Rename column or table with alias.

###5- JOIN         
- Combine rows from 2 or more tables.

###6- AND         
- Combine query conditions. All must be met.

###7- OR         
- Combine query conditions. One must be met.

###8- LIMIT       
- Limit rows returned. See also FETCH & TOP.

###9- IN           
- Specify multiple values when using WHERE.

###10- CASE        
- Return value on a specified condition.

###11- IS NULL    
- Return only rows with a NULL In.

###12- LIKE        
- Search for patterns in column.

###13- COMMIT      
- Write transaction to database.

###14- ROLLBACK   
- Undo a transaction block.

###15- ALTER TABLE 
- Add/Remove columns from table.

###16- UPDATE      
- Update table data.

###17- CREATE       
- Create TABLE, DATABASE, INDEX or VIEW.

###18- DELETE      
- Delete rows from table.

###19- INSERT      
- Add single row to table.

###20- DROP       
-  Delete TABLE, DATABASE or INDEX.

###21- GROUP BY    
- Group data into logical sets.

###22- ORDER BY     
- Set order of result. Use DESC to reverse order.

###23- HAVING      
- Same as WHERE but filters groups.

###24- COUNT       
- Count number of rows. 

###25- SUM         
- Return sum of column.

###26- AVG         
- Return average of column.

###27- MIN         
- Return min value of column.

###28- MAX         
- Return max value of column.



### Connect with Me 😊

#### 🔗 Links

[![linkedin](https://img.shields.io/badge/linkedin-0A66C2?style=for-the-badge&logo=linkedin&logoColor=white)](https://www.linkedin.com/in/mahmoud-el-kariouny-822719149/)

[![twitter](https://img.shields.io/badge/twitter-1DA1F2?style=for-the-badge&logo=twitter&logoColor=white)](https://twitter.com/Mahmoud42275)
Luos & Weekly Robotics
Tags: opensource, microservices, news, luos
Published: 2022-11-16 16:55:18

If you'd like to receive a technical newsletter every Monday about robotics, drones, space technology, and more, sign up for the newsletter from Mateusz Sadowski, aka Weekly Robotics.

▶️  https://www.weeklyrobotics.com/

Thank you Mat for supporting the Luos project in your latest newsletter #221, we look forward to receiving and sharing great news with our community!
The Breakdown 1
Tags: beginners, programming
Published: 2022-11-16 16:52:02

> "It is not enough for code to work." - Robert C Martin.

 Understanding the code is just the beginning of your long sought out journey. Being able to breakdown every component of your code and explain what each part does and how it does that is a very important skill you'll need to continue with coding. If your not able to do this, it will then likely take you longer to debug you code. You'll get lost and the sauce and stress out over what is going wrong. I'll demonstrate some basic code that can be broken down.

We'll break down a basic function setup

```
const basicFunction = ("Parameter") => {
//Your Code Goes Here
}
```
 First the const. The const is short for constant and it means the number or in this case function doesn't change.

 Secondly the name (basicFunction) of the function is a name that you'll use to invoke that function (basicFunction()) be careful not to put that name in a infinite loop.

 Lastly the Parameter is something that you pass in when you invoke the function (basicFunction(parameter)). It's typically data that you want the function to manipulate generally user input triggers functions you wanna manipulate data with.

 And that is the breakdown of a function. I hope this helped some of you understand the code a little better and with this  knowledge you use it to write better code so that you understand it and others reading it do too.
How to implement exponential backoff in an Angular app
Tags: angular, rxjs, http
Published: 2022-11-16 16:40:31

In this video, I will show how to implement exponential backoff in an Angular app which is helpful for a more resilient user experience.

Watch it [here](https://christianlydemann.com/how-to-implement-exponential-backoff-in-an-angular-app/).
How to choose your favorite color in VS Code Terminal😎
Published: 2022-11-16 16:40:02

- First One 👉

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c278q0l4ygwncg00o1th.PNG)

the second one is 👉

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

- The third one is 👉

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

- The fourth one is 👉

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



Then open the settings.json and apply this code 👉👉 

`{
  "terminal.integrated.fontSize": 24,
  "editor.fontSize": 20,
  "editor.wordWrap": "on",
  "workbench.iconTheme": "material-icon-theme",
  "workbench.colorCustomizations": {
    "terminal.foreground": "#ee00ff",
    "terminalCursor.foreground": "#ff9100"
  },
}
`


**Boooooom....**
So, you will find the difference.....
Code Formatting in Nim [nim pretty］
Tags: nim, productivity, shell, bash
Published: 2022-11-16 16:33:36

This is my first post on dev. By the way, do you guys know Nim? It's an elegant language, compiles to C, and has a Python-like syntax. So it's very fast and easy to write. I've been using it for work recently. I was looking for a code formatting tool for it and finally found one called Nim pretty.


## How to use Nim pretty
You can use it easily. Here's a sample code.

```nim:sample.nim
const     hello   =      "Hello"
echo   "Say, ",                      hello
```
It's terrible syntax, right? Here's a way to format it. 
You can run the following command.
```
nimpretty --indent:2 sample.nim
```
The sample code can be formatted as follows.
```nim:sample.nim
const hello = "Hello"
echo "Say, ", hello
```
The terrible code was formatted with an indent as 2.
It became quite readable but you don't want to run the command for each file, right?

Here's a better way. You can run the following command.
```
find . -name "*.nim" -exec nimpretty --indent:2 {} +
```
All Nim files in a directory can be formatted. It's a combination of a Nim pretty command and shell script.

You can create a task in a `nimble file` as below if you don't want to type or copy the command every time.
```nim:sample.nimble
version       = "0.0.1"
author        = "Sample"
description   = "Sample code"
license       = "Sample"

task pretty, "Formats all nim files":
  exec "find . -name '*.nim' -exec nimpretty --indent:2 {} +"
```
And you can run the following command.
```
nimble pretty
```
Then all Nim files can be formatted even if they are in different directories.

That's all. Any tips about Nim would be appreciated.
Thank you!!
JS Function and its Types
Tags: javascript, programming, beginners, codenewbie
Published: 2022-11-16 16:26:11

Hi, Today I learned about function and its types in Javascript and thought of sharing it online.

## Function Declaration

```js
function textUp(){
  console.log("This is text up")
}
textUp(); //Function has been called
textUp(); //Function has been called
```

## Function with Arguments
Functions are used to perform a single operation to multiple variables that can be passed as argument respectively.

```js
//Functions with different arguments passed on

 function sum(a:any,b:any){
  console.log( "The Sum is" a + b)
}

sum(5,4); //sum function called with 5 and 4 arguments passed on where it returns 9
sum(25,11); //sum function called with 25 and 11 arguments passed on where it returns 36
```

## Function Expression
The function can be defined with the name followed by const keyword as expression.

```js
//Function Expression

const speak = function(){ 
  console.log("Have a good day")
}
```

## Function with Return Values
The return value will be retrieved when the function is called.

```js
//Should return the solution when the function is called
const multiply = function(){
	return "The solution is " +  a*b;
}
```

## Arrow Function
The arrow function is the minimal form of the normal function and it makes the code cleaner.

```js
//Function Expression
const calcArea = function (radius){
	 return 3.15 * radius ** 2; //Returns the area
}
calArea(5);

//Arrow Function
const calcArea = (radius)=>{
	 return 3.15 * radius ** 2;
}
calArea(5);//Returns the Area
```



Thanks for reading!

Follow me for more content like this.

Cheers!
JavaScript function
Tags: javascript, functions, vstech, vstechacademy
Published: 2022-11-16 16:23:59

A JavaScript function is a section of code created to carry out a certain purpose. When "something" calls a JavaScript function, it is carried out (calls it).

**Syntax of JavaScript Functions**

A JavaScript function's definition consists of the function keyword, a name, and parentheses (). Function names may also include underscores, dollar signs, and other characters (same rules as variables). Names of parameters may be included in parenthesis and separated by commas:
(parameter1, parameter2, ...)

Curly brackets enclose the code that the function will execute: {}

The function definition lists the function arguments between parentheses (). When a function is called, values are sent to it as arguments.

The arguments (the parameters) operate as local variables within the function.

<script type="text/javascript">

let x = myFunction(4, 3);    // Function is called, return value will end up in x

function myFunction(a, b) {
  return a * b;        // Function returns the product of a and b
}

</script>
Expanding the Boundaries of PostgreSQL: Announcing a Bottomless, Consumption-Based Object Storage Layer Built on Amazon S3
Published: 2022-11-16 16:20:25

We are excited to announce the initial launch, in private beta, of our new consumption-based, low-cost object storage layer in Timescale Cloud. This new capability expands the boundaries of traditional databases, allowing you to transparently tier your data across disk and Amazon S3 while accessing it as if it all lived in one single continuous PostgreSQL table. This means that you can now store an infinite amount of data in Timescale Cloud, paying only for what you store. 

Our new feature expands the boundaries of traditional managed databases with a novel cloud-native architecture designed to save developers money and time, incorporating elements typically associated with data warehouses and data lakes, enabling PostgreSQL developers to grow their data effortlessly for a fraction of the price of traditional storage.

Rather than operating an external system for data archiving alongside a time-series database which often creates data silos and operational overhead, developers can now simply work with a single table where data is transparently tiered across different storage systems while retaining the ability to query that data via standard SQL.

We built new database internal capabilities and external subsystems to give application developers access to an object store from within a PostgreSQL database in Timescale Cloud. The result is that time-series tables, called hypertables, can now stretch across standard disk storage (in Amazon EBS) and object storage (in Amazon S3), with data formats that are optimized for each layer. Query optimizations ensure that data is fetched from both disk and object storage for a single SQL query, abstracting away complexity from the PostgreSQL developer.

In addition to cost-efficient data tiering, future enhancements to our newly released object store will seek to enable easier data sharing between fleets of databases, faster transfer of data into new deployments, and smoother migration of data from external data warehouses to Timescale Cloud.

This new consumption-based, low-cost object storage is currently available under private beta. Users with a Timescale Cloud account can [request access](https://c212.net/c/link/?t=0&l=en&o=3711885-1&h=4060893371&u=https%3A%2F%2Ftsdb.co%2Fdata-tiering-docs&a=request+acces)— [creating an account](https://c212.net/c/link/?t=0&l=en&o=3711885-1&h=919175570&u=https%3A%2F%2Ftsdb.co%2Fcloud-console-signup&a=creating+an+account+is+free) is free and it gives developers full access to the platform for 30 days. 

Read the [full announcement here](https://www.timescale.com/blog/expanding-the-boundaries-of-postgresql-announcing-a-bottomless-consumption-based-object-storage-layer-built-on-amazon-s3/)
Best DBs to Use With Java
Tags: database, java
Published: 2022-11-16 16:18:28

Wrote an article on the top-ranking databases to use with Java. 

Spoiler alert: the top 5 include mostly relational and _one_ Document DB -- can you guess which one? Check it out [here](https://medium.com/@ashintech/5-best-databases-to-use-with-java-a9d3d601daec)!
WHAT ARE BLOCKCHAIN BRIDGES?
Published: 2022-11-16 16:09:43

Bridges allow isolated #blockchain environments to communicate with one another. They create a pathway for tokens, messages, arbitrary data, and even #SmartContract  calls to be transferred from one blockchain to another.

BENEFITS OF BRIDGES:

- the transfer of any data, information, and assets across chains.

- unlocking new features and use cases for protocols as bridges expand the design space for what protocols can offer.

- the opportunity to leverage the strengths of different blockchains. For example, developers can benefit from the lower fees offered by the different L2 solutions by deploying their dapps across rollups, and sidechains and users can bridge across them.

- collaboration among developers from various blockchain ecosystems to build new products.

- attracting users and communities from various ecosystems to their Dapps.

HOW DO BRIDGES WORK?

While there are many types of bridge designs, three ways to facilitate the cross-chain transfer of assets stand out:

1. Lock assets on the source chain and mint assets on the destination chain.
2. Burn assets on the source chain and mint assets on the destination chain.
3. Swap assets on the source chain for assets on the destination chain with another party.

TYPES OF BRIDGES

Bridges can usually be classified into one of the following buckets:

1. Native bridges – These bridges are typically built to bootstrap liquidity on a particular blockchain, making it easier for users to move funds to the ecosystem. For example, the Arbitrum Bridge is built to make it convenient for users to bridge from Ethereum Mainnet to Arbitrum. Other such bridges include Polygon PoS Bridge, Optimism Gateway, etc.

2. Validator or oracle based bridges – These bridges rely on an external validator set or oracles to validate cross-chain transfers. Examples: Multichain and Across.

3. Generalized message passing bridges – These bridges can transfer assets, along with messages and arbitrary data across chains. Examples: Nomad and LayerZero.

4. Liquidity networks – These bridges primarily focus on transferring assets from one chain to another via atomic swaps. Generally, they don’t support cross-chain message passing. Examples: Connext and Hop
JavaScript Runtime and Engine
Tags: javascript, webdev, programming, jsengine
Published: 2022-11-16 16:08:03

![javascript engine and runtime ](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/iy6kev5xshn18vjtbmlt.jpg)
Javascript is a prototype-based, single-threaded non-blocking asynchronous concurrent language. It has a call stack, an event loop, a callback queue, and some APIs.  
JavaScript engines (namely V8, developed by Chrome, in C++) is the program that executes a JavaScript code. Js engine can be implemented as a standard interpreter or just-in-time compiler that compiles JavaScript to bytecode in some form. 
The use of the js engine is not limited to browsers. It is also used in Node.js. Js behave differently in browsers. There are different engine for different browser. V8-chrome, spider monkey - firefox, blink-edge, chakra-ie, JavaScript core - safari.

V8 is an open-source JavaScript engine developed by google . it is gold standard for js engine.  V8 is open source. The key innovation was a just-in-time compilation , which can significantly improve execution times. it is released on 2 September 2008.
Introduction to python
Tags: python, beginners, programming
Published: 2022-11-16 16:01:51

## 
[](Https://vstech.co.com)

## introduction to JavaScript
A JavaScript language is one of the most useful language used in programming

###Application to JavaScript

It's mostly used in website application
Used in server.side applications using Node.js
Used in create mobile applications using tools like React Native
create programs for microcontrollers and the internet of things
create smartwatch applications
####Tips to note
##syntax in JavaScript
1.white space
2.Identifiers
3.literals
4.case sensitivity

####comments
In any program comments are very important
In JavaScript we have two types of comments
1.single comment // a comment//
2. Multiple comments */ comments

## Variables
A variable is a valuable use in identifier so that it can be used later in the program
Example
Let b=20
b=20

## Types
They are classified into two
1._primitive type_
    String
    Symbols
    Numbers
    Booleans
2._object types_
This is a value which is not primitive and has a property
It  also has method which act on those Properties

## Operators
1.addition operators
2.subtraction operators
3.Division operators
4.multiplication operators

## Array
Array is a collection of many elements
e.g const a= [4,6,9]
    const a= array.of (4,6,9)

## operators of an array
## addition of an array
   At the end of an array:b.push()
   At the beginning of an array:b.unshift()

## removal of an array
   At the end of an array: b.pop()
   At the beginning of an array:b.shift()

## joining of more than two arrays
     b.spread()

## strings 
This is a sequence of characters

## classes
They are ways of defining multiple of objects

## functions
This is a block of code 
It's majorly used in any programming language
Declaration and Usage of Variables in JavaScript
Tags: javascript, variables, vsacademy, vstechacademy
Published: 2022-11-16 15:52:55


In JavaScript, variables are specified using one of three syntaxes. By providing the grammar template for creating variables, I can illustrate them. A syntax template is a generalized form of a JavaScript component or phrase.

The rules for creating variables must be reviewed before we go on to the how-to.

Variables can start with a symbol, numeric, or underscore characters. A variable name should always start with an alphabetic letter in programming.

The variables may have additional alphabetic, numeric, or symbol characters after the first character. Making your variable names relevant is the secret to good variable naming, unless the variable is only used very briefly and insignificantly.

The three syntax templates for declaring new variables are:

<script type="text/javascript">

let variable-name = expression;
var variable-name = expression;
const variable-name = expression;

</script>

What sets apart these three approaches to defining variables, you might wonder. Two of them are connected to the idea of "changing scope," The other version, which starts with const, will remain the same and can't be changed.
Making reusable get methods in React Testing Library
Tags: javascript, react, testing, webdev
Published: 2022-11-16 15:47:37

### Creating some abstractions to have ready to use getter functions

_Photo by <a href="https://unsplash.com/@mohamadaz?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">A.Z</a> on <a href="https://unsplash.com/s/photos/abstract?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Unsplash</a>_
 
While writing unit and integration tests, I'm trying to find the best way on how to write them cleanly.
I'm using React Testing Library so that makes already a good job of using good patterns.
However, recently I stumbled upon the fact that I'm reusing again and again the same methods to get the elements from the DOM.

The majority of cases are using `screen.getByRole` for the buttons and `screen.getByLabelText` for the inputs, using the name prop. The only difference would be the first returing the element, and the latter returning the value of the input. Normally, I would use the first one this way:
```js
screen.getByRole('button', {name: /name of the button/i })
```

As I like to use the names without having to think about capitalization of some letter, I use the parameter 'i' with Regex in order to ignore this case. Also, being with Regex, I don't have to worry whether it's a full sentence or just a part of it.

So, I thought I could extract these methods in a more reusable way, in order to use them freely around the test suites.

Here's how I did it:

```js
const getButtonByName = (btnName) => {
  const regName = new RegExp(btnName, 'i')

  return screen.getByRole('button', { name: regName })
}

const getInputByLabel = (label) => {
  const regName = new RegExp(label, 'i')

  const { value } = screen.getByLabelText(regName)

  return value
}
```

Then I can easily use them:
```js
  const button = getButtonByName('my button')
  const inputValue = getInputByLabel('my input label')
```

I made another method in a similar way for radio buttons. More could be done but these are the three methods I use the most. So for the rest, it could be a little of over-abstraction.

Another improvement that can be done, in my opinion, would be change the strings of the names ('my button', etc.) with fixed objects (JS) or enums (TS). For example: 

```js
JS

const ButtonNames = Object.freeze({
	ButtonOne: "button one",
	ButtonTwo: "button two",
})

TS

enum ButtonNames {
  ButtonOne = "button one"
  ButtonTwo = "button two"
}


```

Thank you for reading and let's connect on [Twitter](https://twitter.com/AlexBuaiscia)!