teleren/devto huggingface dataset:
Series about cryptos: Intro
Tags: blockchain, bitcoin, ethereum, web3
Published: 2021-11-10 16:33:38

---
title: Series about cryptos: Intro
published: true
canonical_url: https://miku86.com/crypto-intro/
tags: ["blockchain", "bitcoin", "ethereum", "web3"]
series: Intro to Cryptocurrencies
---

Hey folks,

I'm into learning a whole new topic in-depth: cryptocurrencies.

In public. #learninpublic

I like to learn, I like to explain.

It helps me to deepen my knowledge.

That's why I share this stuff with you.

**So this will be the first post of a series.**

## Why?

In the last few months, a lot of my friends have been talking about crypto.

But when I ask them questions about it, because I want to learn from them, they literally know nothing, zero, niente about it.

* * *

Q: Oh cool, why did you buy this cryptocurrency?  
A: A Youtuber talked about it.

Q: Which [consensus mechanism](https://wikiless.org/wiki/Consensus_(computer_science)?lang=en) does this cryptocurrency use?  
A: Eehm, what is a "consensus mechanism"?

Q: What is your investment strategy ([1](https://wikiless.org/wiki/Investment_management?lang=en), [2](https://wikiless.org/wiki/Asset_allocation?lang=en))?  
A: I don't have one.

* * *

So most of the time I think they just want to ride the hype-train. Some uncle's step-daughter's friend become a millionaire, so maybe there is a lof of [fear-of-missing-out](https://wikiless.org/wiki/Fear_of_missing_out?lang=en) involved.

"I have to work 9-5, and this non-intelligent guy made some 10.000 bucks, I don't want to miss this next opportunity!"

Don't get me wrong, this is a normal human emotion, so it is not bad. I just think making bad decisions based on this emotion is not so fruitful.

Actually, I think this is **very dangerous**. Because this nurtures a very dangerous habit: acting based on bad decision-making patterns.

And I think one of the worst decision-making patterns is: not knowing the fundamentals.

This is why I want to talk about the **basics of cryptocurrencies** - as a software developer.

## Our objectives

- Which problems do we want to solve with cryptocurrencies?
- What is a ledger (e.g. a blockchain)?
- Who decides what the state of the ledger is?
- What is a wallet?
- How does a transaction work?
- What is a cryptocurrency?
- How do I buy cryptocurrency?
- ...

* * *

**One simple disclaimer** : Always double-check your informations, also my posts - everything. If you don't understand it, read up about it, ask questions ("What does X mean?"), paraphrase in your own words ("So this means, that ...?"). Don't act like a fool, always understand the underlying fundamentals.

* * *

See you in the next post! :)

If you want to join forces, hit me up at: michael@miku86.com
💡 .filter() & .find(): JavaScript Array Methods
Published: 2021-11-10 16:48:47

---
title: 💡 .filter() & .find(): JavaScript Array Methods
published: true
description:  .find() returns the first matching element, while .filter() returns an array of all matching elements.
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gy0yiniansla31xttij5.png
---

When working with an array in JavaScript, we may need to locate a single item within the collection. This may appear tiresome, but if we apply the right methods/procedures/techniques, it shouldn't be too tough.

There are various ways to extract the needed values from an array, but we'll utilize JavaScript's .find() and .filter() methods here.

A coding example
We have an array of appsArray:

```
const appsArray = [{  
    Name: 'Canva',  
    ID: 10  
}, {  
    Name: 'VS Code',  
    ID: 12  
}, {  
    Name: 'Github',  
    ID: 52  
}, {  
    Name: 'Adobe',  
    ID: 23  
}];
```

We need an app with an ID of 12

##.find()
The find() method returns the first value from the collection that matches. It will not examine the other values in the array collection after it matches the value in findings.
```
appsArray.find(function(item) {  
    return item.ID === 12  
});  

//output: {Name: "VS Code", ID: 12}
```


##.filter()
The filter() method returns the collection's matched values as an array. It will verify all of the values in the collection and return an array of the matching values.

```
appsArray.filter(function(item) {  
    return item.ID === 12  
});  

//output: [ {Name: "VS Code", ID: 12} ]
```

In Internet Explorer 11, the find() method does not work. All browsers, including Internet Explorer 9+, support the filter() method.

Using the snippet below, you can obtain the first matched value from the collection of filter() method results. This solution solves the find() method's IE compatibility problem.

```
appsArray.filter(function(item) {  
    return item.ID === 12
})[0];  

//output: {Name: "VS Code", ID: 12}
```
##Conclusion
The find() technique is preferable for newer browsers, but if you care about Internet Explorer, you should use the filter() method.

.find() returns the first matching element, while .filter() returns an array of all matching elements.

{% twitter 1458472863929876488 %}

Hope you found this article useful, if you did, shoot me a comment to let me know. If you think I did something wrong, please also let me know in the comments.

Happy coding.
Code quality engineer, Ask Me Anything
Tags: programming, codequality, codereview, ama
Published: 2021-11-10 16:34:21

Hey, our engineers are getting together to host a live #AMA about code quality and code reviews. 

How important is this to Software Engineers? What are the main challenges? How can we achieve true code quality?

Ask us anything in the comments below and we'll discuss it live.

**Join the discussion**
🗓️When: November 16th, 5pm WEST
📍Where: [Register here](https://us02web.zoom.us/webinar/register/WN_IJm0gXYTSrGPdj3fV1yHyw)
React JS error WebPack 4.44.2 (temp Fix)
Published: 2021-11-10 16:18:30

The react-scripts package provided by Create React App requires a dependency:

  "webpack": "4.44.2"

Don't try to install it manually: your package manager does it automatically.
However, a different version of webpack was detected higher up in the tree:

  /home/user1/node_modules/webpack (version: 4.44.1)



1. create a .env at the root of the folder of react folder
2. type SKIP_PREFLIGHT_CHECK=true in side .env file
3. now run in cmd npm start .
Whats your biggest blocker getting your first software engineering job?
Tags: career, javascript, webdev, beginners
Published: 2021-11-10 16:08:56

Getting your first job out of a bootcamp or being self taught is no easy task...but its possible.

What is your biggest blocker making that next step?

-Scott 

***Want more?*** 

1. Come join our Facebook group to help you get your first job as a software engineer, career development, and so much more!

https://www.facebook.com/groups/310120400851953

2. Here is a [link](https://engjobresources.carrd.co/) to top 10 interview resources
LaTeX & Macros: Creating Macros & Macros without arguments
Tags: latex, codenewbie
Published: 2021-11-10 16:03:11

Hello, how are you? :) 

In this post I tell you 
- How to declare the macros, and where 
- How to create macros, in this time, macro without arguments

Let's Start!!!

## Declaring Macros

> This is valid for any kind of macros, but in this post I just talk about macros without arguments 

First of all, you need to know that **The names of the macros *must not* match with existing ones**, so you will have an error if you create a macros with the `equation` name.

Macros are declared in the preamble, the syntax is the following

```LaTeX
\newcommand{\name}{task}
```

Where

-`\name` is the way you will call the macro in your text 

> **Be careful** you need to use the `\` when declaring the macro, because now that word is going to be the name of the instruction 

-`task` are the actions that the macro will perform

> Here you can use normal text or instructions already defined 

## Creating macros 

Let's create our first macros, with name `\post` and the `action` that prints *Hello* 

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

Produces 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/skypnxufow4ko114yf9v.png)
  
[Here](https://texlive.net/run?%5Cdocumentclass%7Barticle%7D%0A%0A%25Declare%20the%20macros%20here,%20do%20not%20forget%20the%20structure%0A%0A%5Cnewcommand%7B%5CFirstExample%7D%7BGreetings%20people%7D%0A%0A%5Cbegin%7Bdocument%7D%0A%0AThis%20is%20my%20first%20example%20%5CFirstExample%0A%0A%5Cend%7Bdocument%7D) is an example, where you can play and modify 

But, you can create macros with `LaTeX` commands

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

Produces 

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

[Here](https://texlive.net/run?%5Cdocumentclass%7Barticle%7D%0A%0A%25Declare%20the%20macros%20here,%20do%20not%20forget%20the%20structure%0A%0A%5Cnewcommand%7B%5CFirstExample%7D%7BGreetings%20people%7D%0A%0A%5Cbegin%7Bdocument%7D%0A%0AThis%20is%20my%20first%20example%20%5CFirstExample%0A%0A%5Cend%7Bdocument%7D) is an example, where you can play and modify

This is the most basic macros, there are more, but these are for other post.

This is all!!!

Do not forget to follow me on Twitter `@latexteada`

Greetings :)
DevSecOps
Tags: devops, opensource, webdev, programming
Published: 2021-11-10 16:01:47

Very good overview of achieving success through DevSecOps while containerizing applications. Best practices and the right security measures will accelerate software teams to build modern and secure apps. Check out the best practices in this article and see if this resonates with your development team.

https://containerjournal.com/features/devsecops-essentials-for-containers/
Free React Responisve Travel Agency Website Design using Styled Components with ScrollReveal Animations✈️
Tags: react, javascript, webdev, angular
Published: 2021-11-10 16:00:15

## You can get the template from the link proivided in the description of the video.

### Technologies Used :-
+ React
+ Styled Components

### Libraries and Assets Used :- 
+ React Icons
+ Scroll Reveal

## To learn how to create this template watch the complete video. You can get the template for free from the link provided in the description of the video.

{% youtube PNw57niRrPk %}

## Please do like the video and subscribe to the channel. It helps and motivates me to create more content like this.
Data Structure in Java: Linked List
Published: 2021-11-10 15:57:30

```java
public class LinkedList {
    class Node {
        int data;
        Node next;
        Node(int data) {
            this.data = data;
            this.next = null;
        }
    }

    private Node head;
    LinkedList() {
        this.head = null;
    }
    LinkedList(int data) {
        this.head = new Node(data);
    }

    public void insertFront(int data) {
        if(this.head == null) this.head = new Node(data);
        else {
            Node temp = new Node(data);
            temp.next = this.head;
            this.head = temp;
        }
    }

    public void insertBack(int data) {
        if(this.head == null) this.head = new Node(data);
        else {
            Node temp = this.head;
            while(temp.next != null) temp = temp.next;
            temp.next = new Node(data);
        }
    }

    public int removeFront() {
        int data = this.head.data;
        Node temp = this.head;
        this.head = temp.next;
        temp = null;
        return data;
    }

    public int removeBack() {
        Node temp = this.head;
        while(temp.next.next != null) temp = temp.next;
        int data = temp.next.data;
        temp.next = null;
        return data;
    }

    public void show() {
        Node temp = this.head;
        while (temp != null) {
            System.out.printf("%d ", temp.data);
            temp = temp.next;
        }
        System.out.println();
    }
}
```

---

### Sources and Images:

- https://picsum.photos/seed/2021-11-08T00:04:12+07:00/2983/1206
I guess I'm getting Fired...
Tags: vscode
Published: 2021-11-10 15:52:37

Hi everyone, hope y'all are doing great (unlike me). I’ve recently joined the marketing team for blox. I’ve been tasked to get at least 100 users on board.

![I thought it was going to be easy](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gigf4y4gofkz9vd19n9i.png)

Well, let me be more specific.
I NEED TO GET 100 DEVELOPERS TO DOWNLOAD OUR EXTENSION.
I’m completely lost and I have no idea what to do. Please let me know where are the developer communities that are on the lookout for great new content and what gets your attention because I just can’t get past the 15 users that I already have.

![Honest work indeed](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kf8vg29sjnpxhqngrroa.jpeg)

The way my boss described this product to me, it looked pretty cool and I think it can actually contribute towards the developer experience so I thought marketing this would be easy. Little did I know that soon it’ll become a pain in the a** for me.

![Go to Marketing they said, it'll be fun they said](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hurats1xa1qgznnj3gk2.png)

Just for the sake of my internship, help a brother out and give this extension a go. You can get it here at https://www.vsblox.com/

![A hero indeed](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/06phsc4dys6snaf90qrl.jpeg)
Scrape Data From Google
Tags: python, google, tutorial, scraping
Published: 2021-11-10 15:49:58

Scraping Google SERPs (search engine result pages) is as straightforward or as complicated as the tools we use. For this tutorial, we’ll be using Scrapy, a web scraping framework designed for Python. Python and Scrapy combine to create a powerful duo that we can use to scrape almost any website.

Scrapy has many useful built-in features that will make scraping Google a walk in the park without compromising any data we would like to scrape.

For example, with Scrapy all it takes is a single command to format our data as CSV or JSON files – a process we would have to code ourselves otherwise.

Before jumping into the code itself, let’s first explore a few reasons a Google scraper can be useful.

https://www.scraperapi.com/blog/scrape-data-google-search-results/
Create a virtual business card with Dev.page!
Tags: developer, socialmedia, javascript
Published: 2021-11-10 15:35:50

---
title: Create a virtual business card with Dev.page!
published: true
description: Dev.page is your all-in-one developer page - a single page with your info, bio (markdown supported), skills, and links to your GitHub, StackOverflow, LinkedIn, Twitter, Blog and more
tags: developer, socialmedia, javascript
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nnt3tzu378dvn125j1d6.png
---

[Dev.page](https://www.producthunt.com/posts/devpage?comment=1563689) has finally launched, which means you can claim your username to get access to your own page with all of your relevant developer credentials.

![A screenshot of a Dev.page profile](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mbjcpc52f0hzrinwxe08.png)

This all-in-one free homepage for developers is a convenient way to organize all of your profiles: LinkedIn, Twitter, Codepen, Openbase, and even Dev.to!

You can feature as many skills as you like, customize your bio with markdown, and choose a custom vanity URL (mine is https://dev.page/tim/) to help share your page with others.

I like showcases like these in lieu of building a portfolio site, especially for developers who focus more on full stack and backend development. The team at Openbase has made this tool very easy to use, with no code or configuration required!

Sign up and grab your username while it's still available!
https://dev.page/

![Dev.page from Openbase](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u0pbne9fefupl19goo1o.gif)
Data Structure in Python3: Stack
Published: 2021-11-10 15:29:56

```python
class Stack:
    def __init__(self):
        self.arr = []

    def pop(self):
        data = self.arr.pop()
        return data

    def push(self, data):
        self.arr.append(data)

    def peek(self):
        return self.arr[len(self.arr)-1]

    def isEmpty(self):
        return len(self.arr) == 0
```

---

### Sources and Images:

- https://picsum.photos/seed/2021-11-10T22:36:47+07:00/2983/1206
Data Structure in Java: Binary Search Tree
Published: 2021-11-10 15:24:56

```java
public class BinarySearchTree {
    private class Node {
        private int data;
        private Node left, right;

        private Node(int data) {
            this.data = data;
            this.left = this.right = null;
        }
    }

    Node root;

    BinarySearchTree() {
        this.root = null;
    }

    public void insert(int data) {
        this.root = insert(this.root, data);
    }

    private Node insert(Node root, int data) {
        if (root == null) {
            root = new Node(data);
            return root;
        }
        if (data < root.data) root.left = insert(root.left, data);
        else if (data > root.data) root.right = insert(root.right, data);
        return root;
    }

    public void show(String type) {
        switch (type) {
            case "preorder":
                preOrder(this.root);
                break;
            case "inorder":
                inOrder(this.root);
                break;
            case "postorder":
                postOrder(this.root);
                break;
            default:
                System.out.println("Wrong Type (preorder, inorder, postorder)");
        }
    }

    private void preOrder(Node root) {
        if(root != null) {
            System.out.print(root.data + " ");
            inOrder(root.left);
            inOrder(root.right);
        }
    }

    private void inOrder(Node root) {
        if(root != null) {
            inOrder(root.left);
            System.out.print(root.data + " ");
            inOrder(root.right);
        }
    }

    private void postOrder(Node root) {
        if(root != null) {
            inOrder(root.left);
            inOrder(root.right);
            System.out.print(root.data + " ");
        }
    }
}
```

---

### Sources and Images:

- https://picsum.photos/seed/2021-11-10T12:21:31+07:00/2983/1206
Data Structure In Java: Dynamic Queue
Published: 2021-11-10 15:24:15

```java
import java.util.EmptyStackException;

public class QueueDynamic<T> {
    private class QueueNode {
        private T data;
        private QueueNode next;
        private QueueNode(T data) {
            this.data = data;
            this.next = null;
        }
    }

    private QueueNode first;
    private QueueNode last;

    public QueueDynamic() {
        this.first = this.last = null;
    }

    public QueueDynamic(T data) {
        this.first = this.last = new QueueNode(data);
    }

    public void add(T data) {
        QueueNode temp = new QueueNode(data);
        if (this.last != null) {
            this.last.next = temp;
        }
        last = temp;
        if (this.first == null) {
            this.first = this.last;
        }
    }

    public T remove() {
        if (first == null) throw new EmptyStackException();
        T data = this.first.data;
        this.first = this.first.next;
        if (this.first == null) {
            this.last = null;
        }
        return data;
    }

    public T peek() {
        if (first == null) throw new EmptyStackException();
        return this.first.data;
    }

    public boolean isEmpty() {
        return this.first == null;
    }
}
```

---

### Sources and Images:

- https://picsum.photos/seed/2021-11-08T23:26:44+07:00/2983/1206
Data Structure In Java: Dynamic Stack
Published: 2021-11-10 15:23:14

```java
import java.util.EmptyStackException;

public class StackDynamic<T> {
    private class StackNode {
        private T data;
        private StackNode next;

        private StackNode(T data) {
            this.data = data;
            this.next = null;
        }
    }

    private StackNode top;

    public StackDynamic() {
        this.top = null;
    }

    public StackDynamic(T data) {
        this.top = new StackNode(data);
    }

    public T pop() {
        if (this.top == null) throw new EmptyStackException();
        T data = this.top.data;
        this.top = this.top.next;
        return data;
    }

    public void push(T data) {
        StackNode temp = new StackNode(data);
        temp.next = this.top;
        this.top = temp;
    }

    public T peek() {
        if (this.top == null) throw new EmptyStackException();
        return this.top.data;
    }

    public boolean isEmpty() {
        return this.top == null;
    }
}
```

---

### Sources and Images:

- https://picsum.photos/seed/2021-11-08T23:26:25+07:00/2983/1206
Learn to push an empty commit
Tags: webdev, git, devops, tutorial
Published: 2021-11-10 15:22:52

Today I faced a problem while triggering the delivery pipeline and this article is about the solution to that problem. 

Have you ever faced the need to push a commit to a Git branch without changing any files in order to re-run your integration process? If yes then you are landed at the right place, my friend. 😉

## TLDR; Create an empty commit


```
git commit --allow-empty -m “Message”
``` 


## Problem

For continuous integration, we are using  [Buddy](https://buddy.works/) delivery pipelines which allow us to build, test and deploy applications on a single push to a specific git branch. It helps us to reduce the manual overhead of deploying code to the server and handle all the actions automatically.

But today I faced a problem where I needed to re-run my delivery pipeline of a branch without adding any extra space or changing any files in the repository, so I searched for the solution for a while and It turns out that Git is allowing us to push an empty commit without adding any staged files to the branch, by using one option  [--allow-empty](https://git-scm.com/docs/git-commit#Documentation/git-commit.txt---allow-empty)  during git commit.

## Enough of the problem, let’s jump on to the solution


**Pushing a commit with staged files**


```
git add .

git commit -m "changes on app controller"

git push origin master 
``` 

The above commands will add all unstaged files and add commit and push the code to the master branch, after that our delivery pipeline will be started.

Once the pipeline process fails or you need to run the process again, you will have to push something to the branch but as I mentioned earlier, we will not make any changes to the files, and even then, We will be able to commit the branch with this command.

**Pushing empty commit**

```
git commit --allow-empty -m "rerunning the delivery pipeline"

git push origin master 
``` 

After the above commands, you can see that the commit has been pushed to your branch and the delivery pipeline will be started.


> 
You learned that you can be able to push an empty commit with the --allow-empty option of git commit. let me know in the comments if there is any other way to do this.
Data Structure in Java: Stack
Published: 2021-11-10 15:21:18

```java
public class Stack {
    private int size;
    private int[] arr;
    private int top;

    public Stack(int size) {
        this.size = size;
        this.arr = new int[this.size];
        this.top = -1;
    }

    public void push(int i) {
        this.arr[++this.top] = i;
    }

    public int pop() {
        return this.arr[this.top--];
    }

    public int peek() {
        return this.arr[this.top];
    }

    public boolean isEmpty() {
        return (this.top == -1);
    }

    public boolean isFull() {
        return (this.top == this.size - 1);
    }
}
```

---

### Sources and Images:

- https://picsum.photos/seed/2021-11-07T22:24:52+07:00/2983/1206