teleren/devto huggingface dataset:
Common SQL Clauses
Published: 2021-07-10 21:06:59

When attempting to access and manipulate a database, SQL (Structured Query Language) is one of the top language options to use. SQL code revolve around queries, which are requests or commands for some part of the database. Once you get the hang of the query syntax, it can be very intuitive to use. Here are some of the more common SQL clauses. 

### SELECT and FROM
Simply put, SELECT indicates what exactly you want to pull from the database. FROM points to the specific database that you are pulling from. For example, if you wanted to retrieve a customer ID from the "customers" table, it may look like this:
```SQL
SELECT customer_id FROM Customer
```
Something to keep in mind is the asterisk (*). This character represents all records in the data. In this case, if you wanted everything, and not just the customer ID, you would replace "customer_id" with "*" in the above example.

### WHERE 
WHERE is a clause that allows the user to filter the data under a specific condition. One thing to note is that WHERE can only be used on ungrouped or unaggregated data. In the next example, let's say we want the customer ID's of all customers who ordered 30 or more units.

```SQL
SELECT customer_ID
FROM Customer
WHERE Order_Quantity > 30
```

### GROUP BY
GROUP BY does exactly what its name indicates. It groups the data by a certain feature. For example, a user who wants customer ID's grouped into the states they live in would use:
```SQL
SELECT customer_ID
FROM Customer
GROUP BY State
```

### HAVING
HAVING works similarly to WHERE, the difference being that HAVING is used on aggregated data (most commonly after a GROUP BY). Below is an example of when HAVING would be used. Here, the user is searching for all states that have a total of more than 250 orders. In order to do this, we GROUP BY State and sum all the orders for each customer in that state.

```SQL
SELECT SUM(Orders) as total
FROM Customer
GROUP BY State
HAVING total > 250
```

### ORDER BY
ORDER BY sorts the data on a given feature. One thing to note is that the default sorting is in ascending order, but there are optional ASC/DESC parameters that give the user the option to control the order. Here's an example of getting customer ID's after ordering customer last names in descending order

```SQL
SELECT customer_id
FROM Customer
ORDER BY last_name
```


The above clauses are some of the most commonly used ones and are crucial to know when using SQL.
SEO Consultant & Link Building Strategist
Tags: seo, linkbuilding, guestposting, bloggeroutreach
Published: 2021-07-10 20:32:30

My name is [Umesh Joshi](https://traffickite.com/umesh-joshi/) from TrafficKite, an [SEO Company in Chandigarh](https://traffickite.com/seo-company-in-chandigarh/). I am an SEO Consultant & Link Building Strategist.

Are you on the lookout for an SEO agency with a core strength as a __Link building expert__?

Are you searching for an __SEO consultant__ you can rely on to help you with guest posting and blogger outreach– someone who indeed does what he promises?

_If yes, you have come to the right place._

With years of experience working as an _SEO consultant and a link building expert_, I have been in the business of helping small, medium and large scale businesses achieve their goals.

##SEO campaigns to guest posting

From SEO campaigns to guest posting and everything in between, I do it all and fantastically well.

My resilient spirit, dedication to customers and professionalism are some of the numerous features that have helped me and my clients excel over the years.

Needless to say, if you want someone you can rely on, someone who would listen to your goals and who has enough experience and who would ensure that you get nothing short of what promised. I’m your guy!

_No Disappointment. No Unreached Goals. No Unethical Link Building Strategies. That’s my promise!_

With a track record of success, affordable rates, tailored services and an unrivaled transparency policy in the world of SEO and link building. I am capable of helping you achieve your desired goals.

##The Affordable And Smarter Alternative To Hiring SEO Companies.

While SEO Companies can get the job done for you, with the kind and quality of services I deliver, you get to save yourself money and time.

My number one priority is to help you rank high on search engines and to draw high quality traffic to your account.

If you are convinced that I’m better SEO consultant for you, [get in touch with me](https://traffickite.com/contact/).

I look forward to helping you!

Best way to contact me:
•Skype - umesh.joshi17
•Email - umesh@traffickite.com
How to be great at anything by Mark Manson
Tags: webdev, motivation
Published: 2021-07-10 19:58:42



This is pretty much the only way to becoming a screaming success.
Everyone wants to be good at something, but few people realize that becoming really good at something, or mastering any skill, is no walk in the park.

They’re simple, but they’re not easy. Here’s a summary:

## Step 1: The 20/80 Principle

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

The 80/20 Principle states that 80% of the output or results will come from 20% of the input or action. For example, in time management, businesses often found that 20% of their time created 80% of their productivity, and that 20% of their employees created 80% of the value.

So the key here is founding where the 80/20 is that is what is the 20% thats going to create 80% of the results.

## Step 2: Get Feedback 

![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o3wpjr9sny63av6up0mc.png)
 
Nailing anything in life requires a lot of trial and error and getting feedback from people. Coaches. Tutors. Teachers. The guy across the fence. You won’t know if you’re any good at something unless someone besides yourself tells you.

You need feedback so you can improve or make adjustments.
You should recieve feedback and you should listen!, Beware of the ego! Listen to criticism

## Step 3: Practice 

 ![AKG8223570](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9s07sg2bshjfzjiltxmx.jpg)
When you look at the people who have mastered anything throughout history, the most glaringly obvious commonality is that they simply worked their asses off more than most people, and for longer than most people. Practice literally makes perfect.

Remember there are no shortcuts. PUT IN THE WORK, REITERATE/IMPROVE, FAIL AND MOVE....

Dont be fooled by overnight success stories.
Install Ubuntu on Ms Windows 10 + Bash Terminal Commands
Tags: linux, ubuntu, bash, systems
Published: 2021-07-10 19:44:21

###Greetings and salutations !
Let's install Ubuntu terminal on your windows 10 computer.
Press **START** button, and type : 

``` Turn Windows Features On/Off ```

Drag the windows list down and make sure that 

*windows subsystem for Linux* is checked.

Click Ok, then restart your computer.


{% youtube -inBn6Y_c7w %} 



When you will come back, open your command prompt and type bash, you'll find a message tellin' you that no linux distributions are currently installed, or somehtin' like that :) 

Go to Microsoft Store, and search for Linux, you will find a lot of distros from which you can choose : Kali, Ubuntu, etc...

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

Install your desired distro, and you will be ready to rock and roll; let's say you installed Ubuntu, you will find Ubuntu's terminal app in the start menu; click on that and wait : 
``` Installing, this may take a few minutes...```

Once finished, you can start working on your Ubuntu Bash Terminal.

What is Linux ? An operating system ? No!
Linux is an operating system's KERNEL.
What the scrap is a KERNEL ?
Well, Kernel is the heart of an OS, and it has a complete control over everything basically.
The kernel is the portion of the OS code that lives in the memory; making the interaction between all of your applications and the hardware extremely easy.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3u6d3hec7eupfn0rlpua.png)

**Basic Bash Terminal Commands:**

1. **pwd** — When you first open the terminal, you are in the home directory of your user. 
To know which directory you are in, you can use the "pwd" command. 
It gives us the absolute path (as opposed to the relative path), which means the path that starts from the root. 
**The root** is the base of the Linux file system. It is denoted by a forward slash( / ). 
The user directory is usually something like "/home/username".
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/aeopsyc8g5fvzpxcja88.png)
 
2. **ls** — Use the "ls" command to list the files that are in the current directory. 
You can see all the hidden files by using the command "ls -a". 
You can also use "ls -la"
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7p43kz4l9ehf5e6owc1g.png)
 
You can list contents of a a specific folder, let's say documents : 
**~$ ls \documents**

cd — Use the "cd" command to go to a directory. For example, if you are in the home folder, and you want to go to the downloads folder, then you can type in:

**~$cd Downloads**
If you want to get out of Downloads directory:
**~$cd ..**
 
Feel free to contact me on info@bekbrace.com or drop a comment and let's have a chat if you feel that you need help.
Bek signin' out - Peace
Mechanical keyboard : first build (v2) - DIY kit
Tags: productivity, mechanical, keyboard
Published: 2021-07-10 19:33:45

TL;DR
My journey so far on building a mechanical keyboard.  Hard and fun parts that I faced while building a custom keyboard.

## Why
I have been using keyboards since I was 14 when I wrote my first characters on a notepad file and haven't stopped since. I am using one as I am typing this post and I think it's one of the most underrated components of what people prefer to refer as a computer. 
But it wasn't until 3 years ago (2018) when I joined a new company and a new team that I first heard the term mechanical keyboard.
As soon as I saw one of my new team mates keyboard I was fascinated. It looked so neat , powerful and the sound of those mechanical keys was music to my ears. He had build a 60% keeb with ansi layout and blank pbt keycaps - a work of art. I was hooked and immediately started asking a millions questions and ended up doing a lot of reading and got even more hooked.

## How
After a few weeks of research I decided I wanted to build my own keyboard.
**first build (v1)**
I will describe the whole process in steps and try to be as concise as possible. 
1. Research (_lots of hours_)
2. Order the parts/components (_less than an hour_)
3. Start building the keyboard (_couple of days_)
4. Success (_nope_)

Unfortunately my first attempt failed as I did a couple of mistakes when trying to solder my keyboard and ended up deforming the pcb to a point where it wouldn't fit the case. Sad times :(

**Three years** after my first attempt and a lot more research I decided I wanted to have another go at it. 
**first build (v2)**
1. Research (_lots of hours_)
2. Order the parts/components (_less than an hour_)
3. Start building the keyboard (_couple of hours_)
4. Success (**YESSS!!!!**)

![First build v2](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tu7wmsmx7txo391gl6fl.png)
## Lessons learned

### Hard Parts:
- Lubing stabilisers , it was hard. People posting videos online (thank you) make it look so easy but it's not. It requires a lot of practice and patience.
- Screwing the pcb to the case was a test of my patience. The screws are so small and it does need a professional screwdriver otherwise you end up spending a lot of time trying to fit them in.

### Fun parts:
- Hot swappable pcb is a game changer (_for newbies_) 
- Fitting the keycaps was very satisfactory.
- Typing the first few letters from a newly build mechanical keyboard.

It's a great hobby but very addictive. It makes you appreciate the importance of typing - very powerful.
For any keyboard fans my build is Hot Swappable 60% with ansi layout, DSA blank PBT keycaps and Gateron brown switches.

Next step on my keyboard journey is programming multiple layers of keys and doing less typos. More on that soon...
Update Content with Terraform
Published: 2021-07-10 19:06:11

<sub>Photo by <a href="https://unsplash.com/@markuswinkler">Markus Winkler</a> on <a href="https://unsplash.com/s/photos/update">Unsplash</a></sub>

# Introduction

We are using Terraform to deploy infrastructure. But we are using it too, to deploy content (such as secrets, files etc ...).

In order to update such content, we have to specify extra data per type of content.

## Key Vault Secrets

In order to update content for [Azure Key Vault secrets](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/key_vault_secret), we can use [tags](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/key_vault_secret#tags), filed using current date with [timestamp](https://www.terraform.io/docs/language/functions/timestamp.html).

example:

```terraform
resource "azurerm_key_vault_secret" "secret_sample" {
  name      = "secret_sample"
  value     = "example"
  key_vault_id = azurerm_key_vault.mykeyvault.id
  tags = {
    time        = timestamp()
  }
}
```


## Blob / Files

In order to update content for [blob / files](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/storage_blob), we can use [content_md5](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/storage_blob#content_md5), filed using function [filemd5](https://www.terraform.io/docs/language/functions/filemd5.html).


example:

```terraform
resource "azurerm_storage_blob" "source_files" {
  for_each = fileset("${path.module}/source_files", "/*.png")
  name                   = each.value
  storage_account_name   = azurerm_storage_account.storageaccount.name
  storage_container_name = "test"
  type                   = "Block"
  source                 = "source_files/${each.value}"
  content_md5            = filemd5("source_files/${each.value}")
}
```



Hope this helps !
Use Closures for Memory Optimizations in JavaScript (a case study)
Tags: javascript, angular, react, webdev
Published: 2021-07-10 18:58:20

Beside [functions](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Functions) being first class citizens in JavaScript, there are plenty of other features, allowing functions to make an extra mile ride. Closures are one of them. 


##What is a Closure?

> A closure is the combination of a function bundled together (enclosed) with references to its surrounding state (the lexical environment)
[Mozilla ](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Closures#lexical_scoping)


Let's take an example:
```
function adder(a) {
  return function(b) {
    return a + b;
  };
}

let add5 = adder(5);
let add10 = adder(10);

console.log(add5(2));  // 7
console.log(add10(2)); // 12
```

From above code, it's clear how closures work, and how it remembers the lexical scope, the function was declared within. But how this could be useful, or is it just non-practical questions in JavaScript interviews? 

Don't worry, we have got plenty of applications and usage, of Closures throughout JavaScript ecosystem. Today, the usage we want to discuss is *how we can optimize memory usage using Closures*. Consider the code below:

```
function multiply(y){
    let x = Math.pow(10,10);
    return x* y;
}
multiply(25); //250000000000
multiply(45); //450000000000

```

It looks very straight forward, right? ... No, actually if you notice every time the **multiply()** function is called, the **let x = Math.pow(10,10)** is recreated and occupy certain memory, in this case quite a large memory for sure, due to the large numeric value it's generating.  

##Bringing in the Closure
What if we make it possible to create **let x = Math.pow(10,10);** only once, to the extent where it has been repetitive across the **multiply()** function calls, this is where the *Closures* come into play. Let's take a look at the below modified code:
```
function multiply(){
    let x = Math.pow(10,10);
    return function(y){
        return x* y;
    }
}
let multiplier= multiply();
multiplier(25); //250000000000
multiplier(45); //450000000000
```

Here we introduced returning an inner function, which creates a closure, and does not recreate **let x = Math.pow(10,10);** with each **multiplier()** call, and hence avoid excess memory leaks. This conveys us, by using *Closures* we can easily avoid costly memory jobs. 

So that's it for today. Hope you have benefited from this case study, or Do share if you ever faced similar scenarios and what approaches you have followed. Stay tuned for the next JS hack!😃
Debug Node.js com Chrome DevTools
Tags: node, devtools
Published: 2021-07-10 18:51:42

Post original: [link](https://www.linkedin.com/posts/jonatan-lima-977416102_nodejs-devs-devtools-activity-6651963344808890370-paxK)

Já precisou debugar em Node.js?

Se sim provavelmente você pensou que era necessário fazer toda uma configuração.

Não importa se você usa Sublime, VSCode, WebStorm ou outro editor/IDE, será necessário no mínimo configurar um arquivo.

Bom eu utilizo VIM, não largo por nada rs

Mas voltando pro foco, que tal utilizar o próprio Chrome DevTools como Debug?

É muito fácil.

Se você já tem o Node instalado pode utilizar a flag **—inspect-brk** para iniciar um Websocket com o Google Chrome. Essa flag adicona um break antes do código ser executado.

Vamos começar com um único

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

Show, agora vamos entrar no Google Chrome e digitar no campo de url **chrome://inspect**, o Chrome irá abrir um página com nosso script, clicando em inspect ele irá abrir o DevTools.

![DevTools](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/77hw3pzplasflj0sj6sd.png)

Agora com nosso DevTools aberto podemos adicionar break points para conseguir encontrar o erro.

![DevTools](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/60xqi5ijqfsdc2b5n49k.png)

Caso você esteja trabalhando em um projeto grande pode adicionar um script no seu package.json, **“dev:debug”: “node —inspect-brk app.js”**

Nesse cenário teremos que adicionar a pasta do no projeto na sessão Filesystem em Add folder to workspace, para podermos navegar entre os arquivos e adicionar nossos break pointers.

Espero que esse pequeno artigo ajude vocês no dia a dia com Node.

Para mais informações sobre debug com Node acesse esse link.

**_Fiquem com Deus e até a próxima._**

**Nunca desista de correr atrás dos seus sonhos!!!**
Passwordless: a note on Authentication
Tags: authentication, it, programming
Published: 2021-07-10 18:36:21

Well passwords have been here for a while now, and, as when it was a trend, or the basic go-to option for authentication, it was already questioned about, but not how it is nowadays. Password today can be ~easily~ hacked, or hijacked, or just brute-forced guessed.

As you may think, the main reason why they still here is because they're one of the easiest solutions on authentication of someone or something.

But if you want to be more secure (and more user-frindly, perhaps), **passwordless starts coming into play**.

Since I started using [asciinema](https://asciinema.org), I have been always thinking on how they solved so well the problem on authentication, something like:

```
Site: "Well, you want to create an account?"
User: "Yes, I do."
Site: "So give me your e-mail, please."
User: "example@email.com, there you go."
Site: "Okay, get your access there."
User: "That's it?"
Site: "Yeah, why not?"
```

This was sufficient to blow my mind.

'Cause it is **REALLY** simple, as it could (shouldn't maybe, in some cases) be.

And that's basically it, every time you come back into the site, and put your e-mail on login, the system will recognize that you're already registered, and say again: "Ok, get your access into your e-mail".

Maybe, we should go trough some password issues right now, just so we can get to know some things we're avoiding doing these kind of things:

- Users often create weak passwords that are vulnerable to phishing attacks.
- Vulnerable to brute-force attacks.
- Users often reuse the same authentication credentials on different accounts, leading to Domino-effect.

and that is just three of the first things that comes into mind when we start talking about passwords, I'm not talking about possible issues on the implementations itself, it can occur in cryptography process, or in safe storaging, or any other part of the whole process.

Now, think about just changing the whoooooole work of doing all these steps, into the work of generating a token, and sending it through E-mail, to your user. It can serve as an always-confirm-user-account pass as well!!

I'm not saying passwordless authentication is always based on contacting user by e-mail, it can be made in infinite ways, I have already seen Hardware-related authentication, like **really, literally** keys, to a system.

I'm just starting the conversation here, what do you think? Did you like the idea? Let me know! 😄
A free CV site - Update
Tags: webdev, showdev, career
Published: 2021-07-10 18:22:16

Hi everyone.

This is an update post.

I've been working on my platform, KwickBox, https://kwickbox.cloud

Its a free cv site + career platform for newbies and job seekers with little or no working experience.

I recently made a deep introduction video into the platform. Please do check it out. https://youtu.be/WU3BwuTzsvQ

Have any feedback, please let me know in the comments below.

Thank you.
Open a Salesforce scratch org in a different browser with CumulusCI
Tags: salesforce
Published: 2022-02-23 15:34:24

---
title: Open a Salesforce scratch org in a different browser with CumulusCI
published: true
date: 2021-07-10 15:00:00 UTC
tags: salesforce
canonical_url: https://katiekodes.com/cci-sfdx-open-different-browser/
---

Using Salesforce's CumulusCI to manage SFDX scratch orgs?  I am.  I was working from a machine where Firefox is the default web browser, and Firefox didn't play nicely with Lightning-mode editing of custom metadata types _(it wouldn't ever render the main part of the page where I edit types)_.  Nor would Firefox let me switch to Classic mode _(it kept logging me out of the scratch org)_.  This is how I managed to open the scratch org in Chrome.

This was the command I had been using to open a scratch org called `dev` from within a VSCode command prompt whose base folder was a codebase already configured to work with scratch orgs from a given real "hub" org:

```sh
cci org browser --org dev
```

Luckily, it came with `--help` instructions at the command line that were useful:

```
> cci org browser --help

Usage: cci org browser [OPTIONS] [ORGNAME]

  Opens a browser window and logs into the org using the stored OAuth
  credentials

Options:
  --org TEXT       Alternate way to specify the target org. By default, runs
                   against the current default org.

  -p, --path TEXT  Navigate to the specified page after logging in.
  -r, --url-only   Display the target URL, but don't open a browser.
  --help           Show this message and exit.
```

So next, I tried:

```sh
cci org browser --org dev --url-only
```

It displayed a URL that, sure enough, I could copy, paste into Chrome, and log into this scratch org with.

Much better -- now I can see the body of `https://my-dev-scratch-org.lightning.force.com/lightning/setup/CustomMetadata/home`.

<div class="attention-note attention-note-gentle" markdown="block">

Tip:  Ctrl+Click on the link makes VSCode give me an option to copy rather than open.  This saves me from having to carefully select the URL from beginning to end.

</div>