teleren/devto huggingface dataset:
Holding values into memory.!
Tags: javascript, beginners, programming
Published: 2022-08-15 06:02:00

--Memory management
    - In my own words, codes are nothing more than values we have stored in memory and constantly perform actions on . we must have a way to attach values into our memory that can be used throughout the short or long lifespan your code will run. To do this, we assign our values to variable either 'var','let' or 'const'. This action will insure that your value is now in the 'memory' of the scope it was created.

//code example: let name = 'Leeroy' 

const hasCard = false ;
 var ageLimit = 21;

//assigning a variable to the memory of the scope

--the 'let'  and 'const' serves a  great way of storing  values to a particular scope .

 - when using the 'let' keyword your variable will only be available to the scope in which it was created in . As for the 'const' keyword, this is a typically for values not intended to be change . The 'const' keyword cannot be reassigned and neither 'let' or 'const' can be hoisted.

//code example
 const teenageClub = (name, age, admissionMessage) =>{
   if (age >= 13 && age <= 19){
    let valid = 'hey '  + name + ' looks like you can join the teenage club, we will be in touch'
    admissionMessage = valid ;
//the valid variable is only available to that scope, so only if the user is a teenager will the valid variable actually exist . if we were to attempt to grab that variable outside of that scope , we will get a 'reference error'

    return admissionMessage;
   }

  return 'you are not accepted'
}

console.log(teenageClub('bill', 17, 'I would like to be a part of the teenage club'))
 


The 'var' key word is able to be hoisted meaning that its value is in the scope of memory before any code is ran . This is the semi older way to store values but can be any value defined to the console. The tricky thing about the 'var' keyword is they can really cause bugs to your code if you give them the same names as references. (little tip : just don't do that)


//code example 

var mypw = '$sjsdskdn';

var mypw = 'idonteenknow';

var mypw = 12;

console.log(mypw);


//this will actually give you a value , the problem with this is how will we know which value we are targeting ? This is where the 'let' and 'const' keyword outshines because you wouldn't be able to do the with those keywords..



      Conclusion 

 No matter what you are trying to perform with your app or code, you will be working will values made in a memory . Understanding the different ways it could be used for different scenarios is a great step towards successful development. Thank you.
[Redis Hackathon Submission Post Placeholder Title]
Tags: redishackathon
Published: 2022-08-15 04:28:43

[Instructions]: # (To submit to the Redis Hackathon on DEV, please fill out all sections. DELETE ALL NOTES, reminders, and guidelines before publishing.)


### Overview of My Submission
[Note]: # (Share what you built, how you built it, and the inspiration behind the idea! Please make sure the project links to the appropriate GitHub repository, and includes the [MIT](https://choosealicense.com/licenses/mit/), [Apache](https://www.apache.org/licenses/), [BSD-2](https://opensource.org/licenses/BSD-2-Clause), [BSD-3](https://opensource.org/licenses/BSD-3-Clause), or [Commons Clause](https://commonsclause.com/) license and a README.)


### Submission Category: 

[Note]: # (Select between Minimalism Magicians, Microservice Mavens, MEAN/MERN Mavericks, Wacky Wildcards – Descriptions of requirements listed in the announcement post.)

### [Optional: Video Explainer of My Project]

[Note]: # (This is where you can embed the optional bonus video you created to accompany your submission. Ensure your video is published publicly to YouTube and you’ve used the embed tag here to share it with us. By opting to include a video, you will be eligible for BONUS prizes. Learn more in the announcement post.)

### Language Used
[Note]: # (Select the language you used for your project – must be one of the following: C#/ASP.NET Core, Java/Spring, JS/TS/Node.js, Python)


### Link to Code

[Note]: # (Our markdown editor supports pretty embeds. Try this syntax: `{% embed link_to_your_repo %}` to share a GitHub repository)

BTW, your Github code’s README file should contain the details as [per this template](https://github.com/redis-developer/hackathon-docs/blob/main/README.md).

### Additional Resources / Info

[Note:] # (Be sure to link to any open source projects that are using your workflow!)

[Note:] # Screenshots/demo videos are encouraged!

### Collaborators

[Note]: # (Be sure to include the DEV usernames of your collaborators, if any. Prizes for winning projects with multiple collaborators will be sent ONLY to the person who posts this submission and they will distribute the prize evenly.)

[Note]: # (All collaborators with DEV profiles listed here will receive a badge, however, prizes including sticker packs will only be sent to the member who publishes the post, with the person expected to distribute the prizes evenly amongst their collaborators.)

[Reminder]: # (Submissions are due on August 29th, 2022 @ 11:59 PM UTC).

- - - 

[Note]: # (Please ensure  that the footer content below is part of your post when publishing. Please delete this note in parentheses but do not delete the content below.)


* _Check out [Redis OM](https://redis.io/docs/stack/get-started/clients/#high-level-client-libraries), client libraries for working with Redis as a multi-model database._
* _Use [RedisInsight](https://redis.info/redisinsight) to visualize your data in Redis._
* _Sign up for a [free Redis database](https://redis.info/try-free-dev-to)._
CSS: Create a breadcrumb
Tags: css, beginners
Published: 2022-08-15 05:42:14

### Breadcrumb example 1
![Breadcrumb example 1](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xijq9lseyb0emcey51l3.png)
```
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
ul.breadcrumb{
	list-style: none;
    padding: 15px;
    background-color: lightgray;
    
}

ul.breadcrumb li{
	display: inline-block;
    font-size: 20px;
    font-family: sans-serif;
}

ul.breadcrumb a{
	text-decoration: none;
}

ul.breadcrumb li+li::before{
	content: '/\00a0';
    padding: 8px;
}

ul.breadcrumb a:hover{
	text-decoration: underline;
    cursor: pointer;
}
</style>
</head>
<body>

<h2>Breadcrumb Pagination</h2>
<ul class="breadcrumb">
  <li><a href="#">Home</a></li>
  <li><a href="#">Pictures</a></li>
  <li><a href="#">Dahuang</a></li>
  <li>Beach</li>
</ul>

</body>
</html>
```
<hr>
### Breadcrumb example 2

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/irq9gpnamcwtjxzeubu4.png)
```
.breadcrumb {
    text-align: left;

  }
  .breadcrumb li{
    list-style: none;
    float: left;
  }
  .breadcrumb a {
    display: block;
    text-align: center;
    color: #fff;
    background-color: darkcyan;
    text-decoration: none;
    position: relative;
    height: 30px;
    line-height: 30px;
    margin-right: 15px;
    padding: 0 5px;
  }
 
  .breadcrumb  a::before,
  .breadcrumb  a::after {
    content: "";
    position: absolute;
    border-color: darkcyan;
    border-style: solid;
    border-width: 15px 5px;
  }
  
  .breadcrumb  a::after {
    left: 100%;
    border-color: transparent;
    border-left-color: darkcyan;
  }
  .breadcrumb  a::before {
    left: -10px;
    border-left-color: transparent;
  }
  
  .breadcrumb  a:hover {
    background-color: blue;
  }
  .breadcrumb  a:hover::before {
    border-color: blue;
    border-left-color: transparent;
  }
  .breadcrumb  a:hover::after {
    border-left-color: blue;
  }
```
5.4 million users of Twitter Accounts Data sale on a hacker forum for $30,000
Published: 2022-08-15 05:39:01

#Twitter wants to know about a vulnerability that allowed someone to enter a [phone number](https://bokadia.in/5-4-million-users-of-twitter-accounts-data-sale-on-a-hacker-forum/) or [email address](https://bokadia.in/5-4-million-users-of-twitter-accounts-data-sale-on-a-hacker-forum/) into the log-in flow in the attempt to learn if that information was tied to an existing Twitter account, and if so, which specific account. #Twitter takes responsibility to protect your privacy very seriously and it is unfortunate that this happened. 

IF It possible Every User of Twitter better to change Mobile number, email id , Password its helps you.
#twitter#databreach#privacy#hacked#twitternews
Print all routes in Chi router
Tags: programming, go, webdev, tutorial
Published: 2022-08-15 05:08:10

[👉 Read the complete article on TheDeveloperCafe 👈](https://thedevelopercafe.com/articles/print-all-routes-in-chi-router-18d89b987b81)

## Getting Started

If you have been writing Go you probably have heard of the popular http router [chi](https://go-chi.io/#/). In this article you are going to learn how to print all the routes registered in a router, this is very helpful for debugging purposes.

If you want to learn about chi, please read [Restful routing with Chi](https://thedevelopercafe.com/articles/restful-routing-with-chi-in-go-d05a2f952b3d).

## Setting up a router

I assume you have a project with **chi** setup (if not please [install chi](https://go-chi.io/#/pages/getting_started)).

Let's assume an application that has a router with 3 routes registered.

```go
package main

import (
	"fmt"
	"github.com/go-chi/chi/v5"
	"net/http"
)

func main() {
	router := chi.NewRouter()

	router.Get("/articles", sayHello)
	router.Get("/articles/{articleID}", sayHello)

	router.With(func(next http.Handler) http.Handler {
		return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
			next.ServeHTTP(w, r)
		})
	}).Post("/articles", sayHello) // 👈 route with middleware
}

func sayHello(w http.ResponseWriter, r *http.Request) {
	w.Write([]byte("Hello World"))
}
```

Look closely one of these routes (`POST` route) has a middleware setup as well. So now we want to print out **all** the routes and the **number** of middlewares setup on each routes.

## Print routes with chi.Walk

We want to print each route in the format: `[<method>]: '<route>' has <x> middlewares`.

...read the complete article on TheDeveloperCafe

[👉 Read the complete article on TheDeveloperCafe 👈](https://thedevelopercafe.com/articles/print-all-routes-in-chi-router-18d89b987b81)
easily add multiple cursors in vscode ⌨️🖱👾
Tags: vscode, tricks, protip, beginners
Published: 2022-08-15 05:05:11

tl;dr: 
1. Place your cursor.
2. Hold Shift and Option and click somewhere else.

Here's a short GIF to show you how:

![gif video](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ivcg9k6q14yzovcgm8qs.gif)

Pretty cool, I think.
Sort array of JSON object by key value easily with JavaScript
Tags: javascript, programming, tutorial, webdev
Published: 2022-08-15 04:54:00

{% youtube oWI3j5NK2pI%}
in this video i have explained how you can Sort array of JSON object by key value easily with JavaScript

for those of you who don't want to watch video here is the code:


suppose this is the array of JSON object 
```js
var data = [
  { id: 2, name: "FIAT", active: true, parentId: "1" },
  { id: 11, name: "BMW", active: true, parentId: "1" },
  { id: 3, name: "RENAULT", active: false, parentId: "1" },
  { id: 0, name: "AUDI", active: true, parentId: "1" },
];
```

now if you want to sort this array of json object by `id` basis you can simply do this by 

```js
data = data.sort((a, b) => {
  if (a.id < b.id) {
    return -1;
  }
});
```

result would be :

```js
 [
  { id: 0, name: 'AUDI', active: true, parentId: '1' },
  { id: 2, name: 'FIAT', active: true, parentId: '1' },
  { id: 3, name: 'RENAULT', active: false, parentId: '1' },
  { id: 11, name: 'BMW', active: true, parentId: '1' }
] 
```
you can read more about JavaScript array.sort method from [here](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort)

if you want to sort this array of JSON object by `name` basis (i.e, sort it alphabetically) you can simply do this by 

```js
data = data.sort((a, b) => {
  if (a.name < b.name) {
    return -1;
  }
});
```
result would be :

```js
 [
  { id: 0, name: 'AUDI', active: true, parentId: '1' },
  { id: 11, name: 'BMW', active: true, parentId: '1' },
  { id: 2, name: 'FIAT', active: true, parentId: '1' },
  { id: 3, name: 'RENAULT', active: false, parentId: '1' }
] 
```

if you want to sort this array of JSON object by `active` basis (i.e, sort it on boolean value) you can simply do this by

```js
data = data.sort((a, b) => {
  if (a.active == true && b.active == false) {
    return -1;
  }
  if (b.active == true && a.active == false) {
    return -1;
  }
});
```
result would be :

```js
 [
  { id: 3, name: 'RENAULT', active: false, parentId: '1' },
  { id: 2, name: 'FIAT', active: true, parentId: '1' },
  { id: 11, name: 'BMW', active: true, parentId: '1' },
  { id: 0, name: 'AUDI', active: true, parentId: '1' }
] 
```
INTRODUCTION TO CLOUD COMPUTING
Tags: cloudcomputing, cloudskills, cloudoperations, cloudbeginner
Published: 2022-08-15 04:21:00

Cloud Computing Technology refers to provision of computing services all over the internet(cloud) or online. Examples of computing services are storage, servers, databases, networking, softwares and many more.

Cloud computing is one of the highly demanded technologies as it solves technological problems like lack of storage and servers and many other computing services. Here are the examples of Cloud computing technologies or softwares which are Google Cloud, Microsoft Azure, Salesforce, Amazon Web Services(AWS) and many more.

Cloud Computing services are divided into four main categories which are Infrastructure as Service(IaaS), Software as Service(SaaS), Platform as Service(PaaS) and Serverless.

Infrastructure as Service(IaaS) is one of categories or types of Cloud Computing services that offers essential compute, storage and networking resources on demand and on a pay-as-you-go basis

Software as Service (SaaS) is another category of Cloud Computing services which is a software licensing and delivery model in which software is licensed on a subscription basis and is centrally hosted. SaaS is also known as “on-demand software” and Web-based/Web-hosted software

Platform as Service(PaaS) or Application as Service(aPaaS) is also another category of Cloud Computing services  that allows customers to provision, instantiate, run, and manage a modular bundle comprising a computing platform and one or more applications without the complexity of building and maintaining the infrastructure typically associated with developing and launching the application(s); and to allow developers to create, develop, and package such software bundles

Serverless is another category of Cloud Computing services which features automatic scaling, built-in high availability, and a pay-for-use billing model to increase agility and optimize costs. Serverless also eliminate infrastructure management tasks like capacity provisioning and patching, so you can focus on writing code that serves your customers
Okta Workflows Tips #3
Tags: nocode, workflows, automation, identity
Published: 2022-08-15 22:47:49

---
title: Okta Workflows Tips #3
published: true
date: 2022-08-15 04:16:46 UTC
tags: NoCode, Workflows, Automation, Identity
canonical_url: https://maxkatz.org/2022/01/13/workflows-tips-3/

---

Welcome to another Okta Workflows Tips post. [Read](https://dev.to/oktaworkflows/okta-workflows-tips-57bj) all other tips.

In this post:

- Workflows naming approach
- Format comments with Markdown
- View workflow events in syslog

## Workflows naming approach

This tip is from [Ajay Seetharam](https://www.linkedin.com/in/ajayseetharam/), Cloud Enterprise Architect at Okta.

Group related flows in a folder. Use a flow naming convention to provide a visual cue on the hierarchy by sorting the workflows by the name column. This visual view helps to quickly understand which flows are the top level flows and the helper flows. So, in the example below, [0.0]\* are top level flows that invoke [0.1]\* flows that in turn invoke [1.0]\* flows that call [1.1]\* flows and so on.

[![](https://katzmax.files.wordpress.com/2022/01/workflow_tips_folders.png?w=822)](https://katzmax.files.wordpress.com/2022/01/workflow_tips_folders.png)
_Workflows naming convention_

## Format comments with Markdown

This tip is from [Brent Garlow](https://www.linkedin.com/in/brent-garlow-8a9175/), Workflows Specialist at Okta.

Did you know that the Workflows Notes cards support markdown? You can make your Workflows even more readable and easy to maintain by including well-formatted comments that include step-by-step setup instructions, lists, hyperlinks, code snippets, etc. by simply typing Markdown formatting directly into the card. Check out the [complete list of common markdown options](http://commonmark.org/help).

[![](https://katzmax.files.wordpress.com/2022/01/workflow_tips_markdown2.png?w=234)](https://katzmax.files.wordpress.com/2022/01/workflow_tips_markdown2.png)
_Workflows Notes card with Markdown_

## View workflow events in System Log

This tip is from [Mick Johnson](https://www.linkedin.com/in/mick-johnson-00025018/), Workflows Builder Advocate at Okta.

You can view Okta Workflows events within **System Log** by using the search criteria _eventType co “workflows”_. This allows admins to view flows and tables that have been created, saved, activated and deactivated.

[![](https://katzmax.files.wordpress.com/2022/01/workflows_tips_syslog.png?w=765)](https://katzmax.files.wordpress.com/2022/01/workflows_tips_syslog.png)

Well, that’s all for now. More tips are coming soon. If you have a tip you would like to submit, let me know in comments.

Build your first automation with these step-by-step [tutorials](https://help.okta.com/wf/en-us/Content/Topics/Workflows/Tutorials/tutorials-workflows-learn.htm).
Okta Workflows Tips #1
Tags: nocode, workflows, automation, identity
Published: 2022-08-15 22:43:51

---
title: Okta Workflows Tips #1
published: true
date: 2022-08-15 04:10:37 UTC
tags: NoCode, Workflows, Automation, Identity
canonical_url: https://maxkatz.org/2021/12/08/workflows-tips-1/
---

Welcome to another Okta Workflows Tips post. [Read](https://dev.to/oktaworkflows/okta-workflows-tips-57bj) all other tips.

## Check Okta log if an event was fired

When using an event such as _User Assigned to Application_ to trigger a flow you can check in the Okta dashboard log if the event was actually fired.

[![](https://katzmax.files.wordpress.com/2021/12/workflows_tip_user_assigned_to_application.png?w=486)](https://katzmax.files.wordpress.com/2021/12/workflows_tip_user_assigned_to_application.png)
_User Assigned to Application event_

Head to Reports > System Log to view the event:

[![](https://katzmax.files.wordpress.com/2021/12/workflows_tip_log.png?w=1024)](https://katzmax.files.wordpress.com/2021/12/workflows_tip_log.png)
_Check if event was fired_

You can also access this page from _Directory > People > [Persons name]_ and then click in _View Logs_:

[![](https://katzmax.files.wordpress.com/2021/12/workflows_tip_view_logs_from_user.png?w=1024)](https://katzmax.files.wordpress.com/2021/12/workflows_tip_view_logs_from_user.png)
_Accessing logs from user page_

## Send as bot to Slack

When sending a message to Slack from a workflow, in some instances you want to send it as a bot and not using your name. To do that, configure the Slack card to send a message as bot:

[![](https://katzmax.files.wordpress.com/2021/12/workflows_tip_slack_bot1.png?w=488)](https://katzmax.files.wordpress.com/2021/12/workflows_tip_slack_bot1.png)
_Configuring Slack card to send as bot_

On the next screen, set the bot name and add an emoji ![🤩](https://s0.wp.com/wp-content/mu-plugins/wpcom-smileys/twemoji/2/72x72/1f929.png):

[![](https://katzmax.files.wordpress.com/2021/12/workflows_tip_slack_bot2.png?w=488)](https://katzmax.files.wordpress.com/2021/12/workflows_tip_slack_bot2.png)
_Sending a Slack message as bot_

and this is how it looks in Slack now (no longer coming from your name):

[![](https://katzmax.files.wordpress.com/2021/12/workflows_tip_slack_bot3.png?w=1024)](https://katzmax.files.wordpress.com/2021/12/workflows_tip_slack_bot3.png)
_A message from a Slack bot_

## Searching for a card

Workflows provides a large number function cards. They are organized into logic categories and you also have the Most Popular section at the top. If you are still clicking to many times to find a function, you can search at the top and find what you need quicker.

[![](https://katzmax.files.wordpress.com/2021/12/workflows_tips_search_actions.png?w=1024)](https://katzmax.files.wordpress.com/2021/12/workflows_tips_search_actions.png)
_Searching for a card_

Well, that’s for now. More tips are coming soon. If you have any tips or tricks – please let me know.

Do you also want to build your first workflow automation? Then [start building](https://help.okta.com/wf/en-us/Content/Topics/Workflows/workflows-main.htm)!
C.R.U.D?
Tags: database, api, backend
Published: 2022-08-15 03:53:38

 **CRUD** is more of an acronym rather than a word. It represents the operations that all developers will come across within the duration of their technical career. These operations are implemented on the backend side of things and their results are rendered through the front end or what the user would see. 

The **C** represents create which would be a **POST** request from your browser/client. This action is taken when you would like to insert some data to your backend. The **R** represents read which would be a **GET** request to an endpoint from your browser/client to a server. This typically the action you do day to day on the internet when you type in a website address. The **U** represents an **UPDATE** request to your backend. This is done to modify a single entry and this entree's _ID_ should be specified before the request is sent. The **D** is for the **DELETE/DESTROY** action. This last action is pretty much self explanatory. Some useless data on you backend with-out purpose or relation get the delete action.
This was a brief explanation of <u>CRUD operations</u>. I do hope this shed some light on the matter for you. Thank you for reading.****
How To Generate QR Code In Node.js
Tags: node, qrcode, javascript, beginners
Published: 2022-08-15 03:51:22

In this article, we will see how to generate QR Code in the Node.js application. we will use qrcode npm package to generate QR Code. we will create a JSON data object and create a QR Code for that JSON data object.

QR code has become an important part of life now a days. QR means “Quick Response”. It can store a large amount of data. QR scanners can instantly process the data scanning it. In Node.js generating QR Code is very easy.

So, let's see generate QR code in node js and QR code generator node js.

```
Step 1: Create Node Application

Step 2: Install the qrcode package

Step 3: Import the QRCode package into the index.js file

Step 4: Run the index.js file
```
Image optimization for web
Tags: image, optimization, webdev
Published: 2022-08-15 03:43:00

**What is Image optimization?**

The goal of image optimization is to create high-quality images with the lowest file size without lossing quality. It's the process of minimizing web page load time without losing significant quality by putting images into right size, dimension, resolution and format. 



**Why do we need to optimize image?**
- To improve page load times.
- For better browsing experience.
- To improve SEO.



**How to optimize image?**
 - Resize your images - use crop size image instead of original image
 - Use lazy loading
 - Compress image using commandline tool (convert / jpegoptim) or online tool - https://tinyjpg.com/ 
 - Use content delivery network like cloudflare, Amazon CloudFront etc
 - Enable gzip compression on server