teleren/devto huggingface dataset:
How to revert git commit easily
Tags: github, git, webdev, programming
Published: 2022-09-16 19:48:03


First check the git log by running the command `git log --oneline`

![git log screen shot ](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kjjdbnb2qtpb7udfwweq.png)

Here you can see last six commit of this git repository.

> `add hello file` this commit for add the hello file
and after this commit last five commit i add five line


Now i want to revent the `line 5` commit.
I add this line on `1009bb3 add line 5` commit.
here 
`1009bb3` - commit hash
`add line 5` - commit message

so next step is run revert command `git revert --no-commit <commit hash>`
here our revert command is `git revert --no-commit 1009bb3`

![revert commit run screen shot](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5ufs23s2gflkcgtivmay.png)

After run the revert commit, line 6 is gone. now i have to commit the revert commit changes

![commit all the revert commit changes screen shot](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jbhrcvf7zkki09rmjzoz.png)

here commit all the changes after run revert commit

![after revert commit git log screen shot](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0e86hn030flnldd9gnf6.png)

now time to check git log. now here one new commit add `Revert "add line 5"`


[
Reference Source](https://stackoverflow.com/questions/4114095/how-do-i-revert-a-git-repository-to-a-previous-commit)
Tips to posting?
Tags: beginners, programming, tutorial, javascript
Published: 2022-09-16 19:22:59

I want to start posting, mainly with the goal of helping me with my studies and helping whoever is reading, does anyone have any tips on how to post or do I just try to do it my way? For now, I am reviewing JavaScript, but soon I will start posting about all the languages I will be studying. If u have any tips, please could you share them?
How roman numerals work
Published: 2022-09-16 19:13:13

When we say "I have 12 chocolates", the number system we are using is base 10.
It is composed of 10 digits from 0 through 9. It's positional, which means each
digit's value depends on the position it resides in. When we say 12, we mean
1 ten and 2 ones with a grand total of 12.

# Roman Numerals
Apart from the normal numbers, we see another weird number system used on
ancient clocks, music theory, etc. This are roman numerals.

Have you ever wondered why IV is 4 and VI is 6 in roman numerals? Let's deep
dive into how roman numerals work!

Roman numerals consist of 7 digits.
 - I one
 - V five
 - X ten
 - L fifty
 - C hundred
 - D five hundred
 - M thousand
 
# How roman numerals work
Roman numbers are non-positional, which means, the V in VII and XV have the same
value of 5. Even though these are influenced by the digit that comes after
them, they not influenced by their position.

We could add two digits by stacking the smaller one after the bigger one. For
example, VI represents 5 + 1 which is 6.

We could also subtract digits by stacking the bigger one after the smaller
one. For example, IV represents 5 - 1 which is 4. This is actual essence of
roman numerals. In other words, when a number is followed by a bigger number,
the smaller number thats before it, is considered to be negative.

There's a catch. In this subtracting mechanism, A digit can only be placed
before its next or the next's next in the digit hierarchy. That
means, I can only be placed before V and X. It cant be placed before any other
digits, say, L.

To represent 49, We say XLIX (- 10 + 50 - 1 + 10) and not IL (50 - 1).
C++ da operatorlar
Published: 2022-09-16 17:02:13


Operatorlar - dasturlashning asosiy sintaksislaridan hisoblanadi va arithmetic, assignment, relational, logical, bitwise, conditional kabi oreatorlar bor.
Bugun biz Arithmetic (arifmetik) va Assignment(o'zlashtirish, yoki qiymatni o'zgaruvchiga joylash, saqlash) operatorlari bolan tanishamiz.
Arithmetic operators - qo'shish(+), ayirish(-), ko'paytirish(*), bo'lish(/) va module(%-qoldiq olish) dan iborat.
"+" va "-" operatorlari biz bilgan matematikada qanday maqsadda ishlatilinsa dasturlashda ham xuddi shunday maqsadda ishlatilinadi."*" va "/" operatori xam deyarli shunaqa holatda ishlatilinadi va faqat ularning tip(int, float)lariga extiyot bo'lishimiz kerak bo'ladi.
"%"-module bizga int tipidagi sonni bo'lganda undan hosil bo'lgan qoldiqni olish uchun ishlatamiz va module(%)dan faqat int tipidagi qiymatlarda qo'llashimiz mumkun.
Assignment(=)-o'zlashtirish operatori bu bizga bizdan o'ng tarafda turgan qiymatni bizdan chap tafarda turgan o'zgaruvchiga joylash vazifasini bajaradi.

```cpp
#include <iostream>
#include <iomanip>

using namespace std;

int main() {
  int a;
  a = 10;

  cout << a;

  return 0;
}
```

Bu yerda 10 qiymati 'a' o'zgaruvchisiga joylandi va 'a'ni print qilganda bizga 10 sonini chiqarib beradi.
Workflows Tips #37: Iterate Over Rows & Delete Rows in a Table Videos, Build Your First Flow Online Meetup
Tags: nicole, workflows, automation, identity
Published: 2022-09-20 22:47:17

---
title: Workflows Tips #37: Iterate Over Rows & Delete Rows in a Table Videos, Build Your First Flow Online Meetup
published: true
date: 2022-09-16 19:11:08 UTC
tags: Nicole, Workflows, Automation, Identity
canonical_url: https://maxkatz.net/2022/09/16/workflows-tips-37-iterate-over-rows-delete-rows-in-a-table-videos-build-your-first-flow-online-meetup/
---

Welcome to another Okta Workflows Tips post. Read all other tips ⤵️
{% embed https://dev.to/oktaworkflows/okta-workflows-tips-57bj %}
In this post:

- How to iterate over rows in a table
- How to delete multiple table rows
- Register for build your first flow online meetup

## How to iterate over rows in a table

In this vide you will learn how to iterate over rows in a table. The video is based [How to Iterate Over Rows in a Table in Okta Workflows](https://dev.to/maxkatz/how-to-iterate-over-rows-in-a-table-in-okta-workflows-1a5n-temp-slug-1867674) blog post.

{% youtube FzsROF8Yk9E %}


## How to delete multiple table rows

In this video you will learn how to delete multiple table rows in Okta Workflows. This video is based on [How to Delete Multiple Table Rows](https://dev.to/oktaworkflows/how-to-delete-multiple-table-rows-1b67) blog post.

{% youtube gXoRyoTeFEA %}



## Online meetup: Build Your First No-Code Workflow Automation in 25 Minutes

We have another no-slides online meetup is coming up 🚀.

[![Okta Workflows](https://katzmax.files.wordpress.com/2022/08/workflows_webinar_buildfirstflow.png?w=782)](https://katzmax.files.wordpress.com/2022/08/workflows_webinar_buildfirstflow.png)

🔮 **Why it’s worth your time**

Join this no-slides online meetup to learn how to build your first no-code workflow automation with Okta Workflows in 25 minutes.

🔭 **You will learn**

You will learn step-by-step how to build your first no-code workflow automation and also: 

- Building a flow with the basic building blocks (events, schedule, actions, functions, and connectors)
- Testing and running a flow

And, stick around to get your questions answered. This is a no slides session (well, maybe just one or two at the beginning).

🎟 **When and register**

- When:  **Wednesday, September 28, 9 a.m. PT**
- I want to attend: [register now](https://www.crowdcast.io/e/build-first-nocode-workflow-automation)

📡 And one more thing, follow our [events channel](http://crowdcast.io/oktaworkflows) to get notified when we go live.

* * *

**Two resources to help you learn more**: 

🎥 Short how-to [Workflows videos](https://youtube.com/playlist?list=PLIid085fSVdvyK8F4xuk49EchBPmAVNHG) to help you become a better automation builder.

📘 Read our [Workflows How-To Guides](https://maxkatz.net/okta-workflows-how-to-guides/) based on community member questions.
WordPress Automation with Custom AMI
Tags: aws, beginners
Published: 2022-09-16 19:01:33

## Overview
WordPress Automation with Custom AMI


## Steps

1. 
Launch the free tier Amazon Linux 2 and Connect to the instance using Instance Connect (Enable SSH/22 & HTTP/80 from anywhere IPv4)

2. Create authentication variables necessary for WordPress Database

3. 
Install Apache HTTPD, MariaDB and PHP dependencies [Code](https://github.com/miihirsawant-git/wordpress-ami-automation/blob/main/README.md)

4. Set the services to enable during boot and start the service 

5. Set Mariadb Root Password

6. Install latest version for WordPress 

7. Configure WordPress to follow the authentication variables set during step 2 and change the owner permissions for the files [Code](https://github.com/miihirsawant-git/wordpress-ami-automation/blob/main/README.md)

8. Create the Wordpress Database

9. Go to `http://public_ipv4_address` to ensure WordPress installation

10. Create a banner using cowsay

11. Inside the `40-cow` file insert commands

12. Change permissions for the file to be read and executed by everyone [Code](https://github.com/miihirsawant-git/wordpress-ami-automation/blob/main/README.md)

13. Apply update

14. Reboot and ensure the banner and final WordPress application
15. Stop the instance and Create an image from the Stopped Instance
    -   Name: `WordPressAMIAutomation`
    -   Create Image
16. Ensure Snapshot and AMI creation.
17. Launch a custom instance from the `WordPressAMIAutomation` AMI
18. Configuration wizard allows hardware changes for custom VPC, harddisk space and advanced configuration such as security group configuration
    - Reference: 
![Configuration Wizard](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yhxdlr19d9c6zwd4y2ww.png)



19. Login instance using Instance Connect
    -   Reference:![Banner](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f55076tm1jvfoi7czh8i.png)



20. Go to `http://public_ipv4_address` to ensure WordPress automated installation.
    - Reference: 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8lwmrsmbtn63rceji7s0.png)
Pros and Cons of Implementing a Headless CMS
Tags: headlesscms, webdev, developer, devops
Published: 2022-09-16 18:52:56

If you're building a website, one approach you can take is to utilize a headless CMS. But what are the pros and cons of this approach? Read on to [find out](https://buttercms.com/blog/headless-cms-advantages/).
Set-up Flask & Print Hello World!
Tags: flask, python, helloworld
Published: 2022-09-16 18:40:01

## **Virtual environments**

### **Create an environment :**

```jsx
//In Windows
> mkdir myproject
> cd myproject
> py -3 -m venv venv
```

### **Activate the environment :**

```jsx
> venv\Scripts\activate
```

### Install Flask :

```jsx
pip install Flask
```

## Hello World! in Flask :

```jsx
//save as hello.py
from flask import Flask

app = Flask(__name__)

@app.route("/")
def hello_world():
    return "<p>Hello, World!</p>"
```

### Run the application:

```jsx
flask --app hello run
```

Screenshots :


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

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4o7qgbvo485nbl6x2iuj.png)
Blue Team Conference
Tags: blueteam, infosec, security
Published: 2022-09-16 18:27:40


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



Hey all! It's been a minute, to say the least. As I took on a new role as a Cloud security engineer during the pandemic, was such a blessing to have this opportunity!!! 

Ok....ok...ok. Enough of me

I like to start by bridging the stop gaps between software developers/software engineers and cybersecurity practitioners. Believe in living in a world where teams, departments, groups, and divisions can all co-exist. 

This is what Blue Team Conference in Chicago, IL is all about. What happens weeks before Blue Team Conference?? Well, there's a hacker summer camp in Las Vegas, both DefCon and BlackHat conventions. Defcon is going on 30+ years in the making. Wow!! and I haven't may a trip to one yet (looking to next year possible) Defcon is for the techy geek. 
Blackhat has been around for the same amount of time but mainly for a businesses. If you want more information listen to the podcast CISO tradecraft as G Mark Hardy is a well-known individual and shares his experience.

BlueTeam Conference was hosted about a year ago and the community is great. I attended last week's BTC, the community was friendly. (Side note: this is my first security conference) Vendors were well knowledgeable than your usual sale representative, I mean wow these guys at Trimarc and SentinelOne, knew the company inside and out.
Now I wasn't able to make all the speakers but the lineup was great, anywhere from becoming the threat to how to make a CTF. The combination of the speaker lineup was a mix of business solutions consists of team leadership and developing a relationship, collaborating with other teams, and helping them to solve their day-to-day problems, how to hack the board, to cybersec optimizing best practices with working with metrics, logging, auditing, threat response, cloud security best practices, how to abstract cybersec metrics to convey those security measures to leadership and board members. 

So what have I learned from attending Blue Team Conference (BTC). Well for starters, Trimarc had hosted their CTF and BTC also had a CTF village. There's hack4kids village where kids of all ages can learn hardware hacking to software hacking. Also, for parents, there's optional daycare for kids too.

Amazing talks about how to convey alerts, metrics, and the decrease of vulnerabilities, reporting graphs to directors, leaderships. Collab with other team members and building a working relationship and giving them  a helping hand which gives you a view of their world. Building security fortress by implementing a security zero trust model with security best practices. 

Most importantly is about networking and meeting new people. By striking up a conversation I meet some awesome people and I'm looking forward to next year and the continuation of BTC!!!

You can head here to BTC [schedule](https://blueteamcon.com/con-history/2022/schedule/)
Ruby is pretty neat
Tags: ruby, beginners
Published: 2022-09-16 18:25:58

   OOP is an interesting concept, one that many languages revolve around.  During my introduction to JavaScript, OOP was a part of the course I hadn't touched.  Needless to say, once I got into Ruby the concept was a little difficult to wrap my head around.  

#What is OOP?

   (almost) Everything in ruby is an object, which is kind of a weird concept.  Objects can hold state, react to other methods, and even have a unique identity.  You can call *.object_id* on anything in ruby and get a unique number that is never repeated.

```Ruby
arr = [1, 2, 3, 4]
#=> [1, 2, 3, 4]

arr.object_id
#=> 360

arr.class
#=> Array
```
Above you can see the *.class* method as well, every ruby object belongs to a class, but what does that mean?

#Classes & Instances

   My instructor put it like this, Classes are like little factories responsible for managing and creating instances.  We can define a class for anything, and create unique methods.to.chain.onto.it!

Here's a fun example:
```Ruby
class Dog

  def greet
    puts "Woof Woof!"
  end

end

Bug = Dog.new

Bug.greet
#=> "Woof Woof!"

Bug.class
#=> Dog
```
   Does this make sense?  We defined a whole new class of objects called *Dog*, and were creating a special method for it!  Think of it like *.map()* in JavaScript, we can only call the *.map()* method on an array and nothing else.  While this example isn't quit as strict as that, the idea here is to create instances of dogs and a method to grab some information or interact with that dog object.

#What does an instance look like?

   Lets create an instance, but lets also give it a little more information.  We can do this with instance variables.

```Ruby
class Dog
  def name=(name)
    # @name is an instance variable
    @name = name
  end

  def name
    @name
  end
end

dog1 = Dog.create
dog1.name = "Bug"

dog1.name
#=> "Bug"
```

Now if we were to grab that instance we named Bug, it would look like this!

```Ruby
# .first is a built in class method that will grab the first 
# instance of a class
Dog.first
#=> <Dog:0x000055ed811b7b90 id: 1, name: "Bug">
```
You can see that the Dog instance also was assigned a unique ID, this is useful for when we need to store multiple instances, with or without a name.  These instances sort of resemble an array, or JavaScript object.  We can even access data from them similarly to a JavaScript object.

```Ruby
Dog.first.name
#=> "Bug"
```

#The Takeaway

I should become pretty clear how this structure could be useful.  Instances could be users in a game, you could store them in a database, and have a separate table in that database be that users inventory.  We can tie everyone together with ID's, receive a request from a client and build custom methods to interact with our data before sending back the response! The possibilities are pretty expansive, and reading Ruby is very easy compared to other languages.  I cant wait to design my first little game in ruby!
Updates from the 92nd TC39 meeting
Tags: javascript, tc39, ecmascript
Published: 2022-09-16 18:24:44

There were several items on the agenda, this post focuses on feature proposals and their progress from the meeting that was held between 13-16th September 2022.


###Stage 3:

* [Array.fromAsync](https://github.com/tc39/proposal-array-from-async): `Array.fromAsync` is to `for await` as `Array.from` is to `for`.

###Stage 2:

* [Well-Formed Unicode Strings](https://github.com/tc39/proposal-is-usv-string): a proposal for a method to determine if a String is well-formed Unicode


###Stage 1:

* [Extractors](https://github.com/tc39/proposal-extractors): Extractors (a.k.a. "Extractor Objects") to ECMAScript.

<hr />

<center><b>[@gnumanth](https://twitter.com/gnumanth)<b></center>
JavaScript Array Methods map(),filter(),reduce()
Published: 2022-09-16 17:50:25

Map,Filter,Reduce are the most important and widely used array methods in JavaScript. let's take a look at them one by one.

**map():**It takes the array as the input, and returns a new array by applying a specific function on each individual array element. It does not modify the original array 

_syntax for map():_

          array.map((ele,index,arr)=>{
              //ele->current element of the array
              //index->index of the current element
              //arr->entire array itself
          })

In most of the cases only element is passed and other parameters are ignored. But they can be used as per the need

_Example for map():_

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

In the above example each individual element of the array are multiplied by 10 and new array is returned

**filter():**It takes the array as the input, and applies the given condition on each individual element .The elements which satisfies the underlying condition are moved to the new array and remaining elements which does not satisfies the condition are filtered out. It does not modifies the original array 

_Syntax for filter():_

         array.filter((ele,index,arr)=>{
             //ele->current element of the array
             //index->index of the current element
             //arr->entire array itself
         })

like map in filter also only element is passed as parameter in most of the cases,and other two parameters are generally ignored

_Example for filter():_


![Image_description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6g55wne4814f0lgyyrt2.png)

In the above example filter method returns the new array containing the elements the which are greater than 3

**reduce():**It will take array as a input, and returns the single
value by applying the give reducer function on each element of the array. It does not modifies the original array

_Syntax for reduce():_

           array.reduce((accumulator,ele,index,arr)=>{
             //accumulator->used to store the the value of 
                            previous iteration
             //ele->current element of the array
             //index->index of the current element
             //arr->entire array itself
             //value->initial value for accumulator
          },value)

In most of the cases only accumulator and element are passed and other parameters are ignored

_Example for reduce():_


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

In the above example after applying the reducer function it returns a single value that is 32, which is the sum of the individual array elements
Injectable Class Means Dependencies Loaded Automatically
Published: 2022-09-16 17:39:44

Angular's Dependency Injection (DI) is based on injectable classes, which load dependencies when the class is built into an object with new. 

```
@Injectable()
export class TodoEffects {
  constructor(
    private actions$: Actions,
    private store: Store<AppState>,
    private todoService: TodoService
  ) {}
}
```

code excerpt from Josh Morony's video on ngRX here: https://www.youtube.com/watch?v=kx0VTgTtSBg&list=WL&index=4

Incidentally, there are an extremely large number of concepts in modern web apps which borrow from the ideas of Angular and RXJS (reactive state). It almost makes sense to get a hang of these ideas if only for a history lesson. I think these are great fundamentals either way.

Also, async programming (the JS style) is like a slinky. It's not coming directly down the stairs, but once you drop it, you know it's getting there.