teleren/devto huggingface dataset:
How to create a private blockchain for business?
Tags: privateblockchain, blockchaindevelopmentcompany, blockchain
Published: 2022-10-15 11:38:57

In this digital era, peoples are ready to pay for their data security to protect their business data. At that time when they come to know about private blockchains that give that security protection. They become eager to build their own Private blockchains. In these private blockchains, there is an invitation system that allows the people to be part of that particular private blockchain who have its invitation codes. All the transactions or information are stored in separate blocks and secured by public and private keys. It creates more impact in entrepreneurs' minds, a private blockchain is a booming business but they need to know about a create a private blockchain for business.

**<u>How to create a private blockchain for business?</u>**

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/g1prvyy0ilyypuftzdno.jpg)
Step 1: Install Ethereum and geth
Step 2: Create the authority account and transaction account.
Step 3: Create the genesis block
Step 4: Start your private Ethereum instance
Result: A functional Ethereum blockchain

If you are not a technically sound person, then I will suggest you shake hands with Addus technologies. Because it has a robust experience in blockchain development and provides more blockchain solution services such as 

- Private blockchain development
- Supply chain management
- Hyperledger blockchain development 
- Decentralized exchange development
- NFT, GameFi, and Metaverse development
- Smart contract development
- Crypto wallet and token development
- Crowdfunding platform development and more

[For more information Reach us](https://www.addustechnologies.com/) ! or 
[Get a free consultation](https://www.addustechnologies.com/get_free_demo)
AKS node crash and Sonar rebuild
Published: 2022-10-15 11:30:43

Today we had a strange issue in which a pipeline in Azure devops was failing and on investigation we came to know that , it was failing  due to sonar errors which in turn pointed to the sonarqube pod deployed in the cluster getting evicted and the node was under severe memory pressure with lots of evicted pods building up which further pressurized the node. The reason for severe memory pressure was not clear though, but we followed the below steps to get things back up again.

Tried deleting the evicted pods to check if the node was getting recovered.

`kubectl delete pods --field-selector=status.phase=Failed --all-namespaces`

Since this didn't resolve, we scaled out the cluster, using Azure portal.
Select the cluster -> Node pools -> Select the Nodepool -> Scale pool -> Scale to 2 more nodes ( we had 3 , we scale to 5)


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

Meanwhile the affected node was [tainted ](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/)with a Memory Pressure hence no pods were getting allocated to it.

Once the new nodes were started, we drained the problematic node and took it down. This is for safely evicting the pods. More on the link [here](https://kubernetes.io/docs/tasks/administer-cluster/safely-drain-node/)

Once drained and the node was taken down. Still the sonar pod was not getting scheduled on any nodes.

We checked sonar pods describe to see the events
`kubectl describe po sonar -n sonar`

Pods were not able to get scheduled due to a volume node affinity conflict as below
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ebrt817ysf611tjzxke3.png)

We checked the persistent volume claim ([pvc](https://kubernetes.io/docs/concepts/storage/persistent-volumes/)) in sonar namespace
 
`kubectl get pvc -n sonar`

Described the _sonar-pvc_
`kubectl describe pv pvc-xxxxxx`


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


Now the issue got narrowed down to a possibility that we don't have a node in a particular availability-zone in Azure, where the pvc is currently configured to. The sonar pods should be put on the same node to connect with the pvc (all in same availability zone node) hence the error.

So we scaled down the instances to 2 and then scaled up back to 3, and AKS created nodes in each zone which also created a node in 
southeastasia-3 , which is now is agreement with the pvc node affinity section.


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

And this made the sonar pods to be deployed to the node with affinity and thereby bringing the sonar up resolving the pipeline issue as well.
Top 4 windows drivers pack for pc 2022
Tags: drivers, driverpack, rahimsoft, snappydriver
Published: 2022-10-15 10:56:02

Driver Fixers are smart utilities that fixes any driver problems in your system. These apps download and install missing or outdated drivers on your system, thus improving its stability and performance.


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

They also solve some of the most common problems faced by Windows operating system. These software helps you fix driver problems on the fly without the manual chore of finding or identifying the missing or outdated drivers in your system, then finding them over the Internet and downloading and installing them one by one. In this post, we’re going to share with you the best 10 free driver fixers to download and [install drivers](https://getsafeinfo.blogspot.com/2022/10/huawei-modem-router-usb-driver-27811.html) in Windows 10, 8.1, 8, Vista, 7 or XP in 2020.

## [Snappy Driver Installer](https://rahim-soft.com/snappy-driver-installer-r742-origin-offline-iso-2022-download/)

Snappy Driver Installer 2022 software Offline has no dependence on other software and is also similar. Driver Pack Solution software is written in JavaScript and this has braked down the software and has numerous limitations.

## [SamDrivers 2022](https://rahim-soft.com/samdrivers-2022-v22-iso-offline-free-download/)

Download SamDrivers 2022 v22 ISO Offline is the name of useful and important software for managing and downloading the rearmost interpretation of 32- bit or 64- bit computer system Drivers with Windows 2000 to Windows 10 operating systems.

## [DriverMax](https://www.drivermax.com/)

DriverMax Pro 12.16 – Computer motherboard drivers are small programs that are read by Windows and permit the performance of basic computer functions within the OS. These computer drivers usually include programs that enable bandwidth ports, USB ports, and input/output ports for the mouse and keyboard.

## [Smart Driver Manager](https://rahim-soft.com/smart-driver-manager-6-0-free-download/)

Driver Updater is the name of new software that can snappily identify and install the rearmost drivers for your tackle bias. One of the most important problems for druggies when migrating from aged operating systems to newer windows is the fear of driver incompatibility.
React interview questions and answers
Tags: react, javascript, webdev, programming
Published: 2022-10-15 10:53:08

I participated in an interview for a react developer. I have the questions and answers.

![BMC](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6gt5wvsoxix3gcs3zm4e.gif)

### How to make a react app faster

To make a react app faster you should reduce the number of re-renders, using several means:

**1. useMemo hook:** This hook will memoize heavy functions that slow down your app. It helps to avoid expensive calculations on every render.

**2. useEffect hook:** Remove API calls from your useEffect hook that run as soon as the app mounts the DOM. This saves loading time.


### What is Lifecycle in react

Lifecycle, as the name implies means the life time of a react component. Each component in React has a lifecycle which you can monitor and manipulate during its three main phases. The three phases are: Mounting, Updating, and Unmounting. 

`useEffect` can be used to fetch data when component mounts, also when the dependency array changes.



### How do you optimise a React app to improve SEO

**1. Semantic Tags:** Using semantic tags in your HTML code, makes it easier for web crawlers to read and understand your website.

**2. Meta Tags:** In the `head` section of your website.



**More questions coming**

<a href="https://www.buymeacoffee.com/ifeanyichima" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/default-orange.png" alt="Buy Me A Coffee" height="41" width="174"></a>

**Thank you, please follow me**

[![HTML](https://img.shields.io/badge/LinkedIn-0077B5?style=for-the-badge&logo=linkedin&logoColor=white)](https://linkedin.com/ifeanyi-thankgod-chima)&nbsp;[![GitHub](https://img.shields.io/badge/GitHub-100000?style=for-the-badge&logo=github&logoColor=white)](https://github.com/masterifeanyi)
Lean on the web platform to validate emails
Tags: javascript, webdev, typescript
Published: 2022-10-15 10:35:28

---
title: Lean on the web platform to validate emails
published: true
description: 
tags: javascript, webdev, typescript
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4e6kixf5poysqylh0g0r.png
# Use a ratio of 100:42 for best results.
---

Email validation in javascript is a very common topic in the web development world.

{% embed https://www.youtube.com/watch?v=cft-Aj6J460 %}

The first instinct is to match a string against a `Regex`, but the `Regex` can get hairy really fast as it tries to accommodate the whole standard specification for email addresses.

Just take a look at [this accepted](https://stackoverflow.com/a/46181/9388511) response on stackoverflow:

```javascript
const emailRegex =
        /^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i;
const isValild = emailRegex.test(someEmail);
```

That works but nobody knows why!

The browser has built in form [validation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/checkValidity) for different types of for inputs.

An input with a specified type, in this case `type="email"`, is only valid if it has a valid email address.

This method offloads the validation burden to the browser and surfaces a nice API where the validation question is answered with a simple `input.checkValidity()`.

Example:

```javascript
function validateEmailHTML(email = "") {
    // create an offscreen input element 
    let input = document.createElement("input");
    // give it the "email" type constraint 💌
    input.type = "email";
    // fill it ✍️
    input.value = email;
    // profit 🎉
    return input.checkValidity();
}
```

Thanks for your attention!

`:wq`
Playing With Array of Objects in JavaScript
Tags: javascript, beginners, programming, webdev
Published: 2022-10-15 10:27:26

Being a JavaScript programmer, it's always important to know how to deal with an array of objects. In our day-to-day programming, we all come across an array of objects in one way or another. For example, the data coming from an API is in a JSON format, which is pretty much similar to an array of objects. So, let's take a look at how we can play around with array of objects. Before continuing it's mandatory to have some basic knowledge of **map()**,**filter()**,**reduce()** methods. You can also refer my article on these methods {% embed https://dev.to/mrityunjaypalled/javascript-array-methods-mapfilterreduce-1m6 %}



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

1._Getting All the Employees Names:_


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

2._Getting All Employees Name Whose Salary Is 10000_



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

3._Finding Sum of All Salaries:_


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

4._Finding the Employees from The Same City and Increase Their Salary by 5000_


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

5._Filter Employees by array of ids:_


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



6._Let's take a look at how we can remove duplicate objects_

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

In the above array of objects, we can see that we have two similar objects.one of them can be removed by using the following method 


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

here we can see that when we log the result, we get the array of objects with no duplicates
Pulsing loader - A step-by-step guide
Tags: css, html, webdev, tutorial
Published: 2022-10-15 10:23:27

**Tutorial on how to create a beautiful pulse loader - CSS & HTML only.**

![Pulsing loader](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3yxm3e9kvujdour4regs.png)

## <u>HTML</u>
For HTML we need a container with 4 divs. We'll add "loader" class to a container.

```html
<div class="loader">
    <div></div>
    <div></div>
    <div></div>
    <div></div>
</div>
```

## <u>CSS</u>
For CSS, first we'll style the "loader" element.
We'll set position to relative and width and height to 10 rem.

```css
.loader {
    position: relative;
    width: 10rem;
    height: 10rem;
}
```
      
Now we'll style the divs inside the "loader" element.
We'll set position to absolute and border to 10px solid light green with 50% radius.
These elements represent the moving lines. We have 4 of them.

```css
.loader div {
    position: absolute;
    border: 10px solid rgb(151, 197, 12);
    border-radius: 50%;
    animation: load 2s ease-out infinite;
}
```
      
Now we'll create a "load" animation for our 4 lines.
By changing top, left, width and height properties, we'll create expanding effect.
And by adding the opacity property to 1 at 5% and back to 0 at 100%, we'll create a nice disappearing effect.

```css

@keyframes load {
    0% {
        top: 4rem;
        left: 4rem;
        width: 0;
        height: 0;
        opacity: 0;
    }
    4.9% {
        top: 4rem;
        left: 4rem;
        width: 0;
        height: 0;
        opacity: 0;
    }
    5% {
        top: 4rem;
        left: 4rem;
        width: 0;
        height: 0;
        opacity: 1;
    }
    100% {
        top: 0px;
        left: 0px;
        width: 8rem;
        height: 8rem;
        opacity: 0;
    }
}
```
      
Now we'll simply add the animation to all of our div elements.
We'll set it to 2 second duration, infinite, ease out.

```css
.loader div {
    position: absolute;
    border: 10px solid rgb(151, 197, 12);
    border-radius: 50%;
    animation: load 2s ease-out infinite; /* Added animation */
}
```
      
As we have 4 lines, we need to set the beginning of the animation at different time to each element.
For the First element, animation will begin at 0, so we won't change anything.
Now we'll select the second element using the nth child selector and passing in number "2". We'll set delay to -0.5 seconds.
For third element, we'll set animation delay to -1 second.
And for the last element, we'll set delay to -1.5 second.

```css
.loader div:nth-child(2) {
    animation-delay: -0.5s;
}
.loader div:nth-child(3) {
    animation-delay: -1s;
}
.loader div:nth-child(4) {
    animation-delay: -1.5s;
}
```
      
And that's it. Simple, huh?

You can find video tutorial and full code [here](https://designyff.com/code/pulsing_loader).

Thanks for reading. ❤️
how to get ready my nodes
Published: 2022-10-15 10:01:36

root@ip-172-31-26-219:~# kubectl get nodes
NAME               STATUS     ROLES           AGE    VERSION
ip-172-31-16-131   NotReady   <none>          159m   v1.25.3
ip-172-31-26-219   NotReady   control-plane   166m   v1.25.3

**For ready i am using this command to get ready but facing error**

root@ip-172-31-26-219:~# kubectl apply -f "https://cloud.weave.works/k8s/net?k8s-version=$(kubectl version | base64 | tr -d '\n')"
WARNING: This version information is deprecated and will be replaced with the output from kubectl version --short.  Use --output=yaml|json to get the full version.
Unable to connect to the server: dial tcp: lookup cloud.weave.works on 127.0.0.53:53: no such host
Ng-News: Episode 22/40
Tags: javascript, angular, webdev, programming
Published: 2022-10-15 09:51:31


{% embed https://youtu.be/vDdOxwfGflw %}

## Playwright 1.27

Playwright, an E2E testing framework from Microsoft, becomes more and more the main rival of Cypress. Its latest version, 1.27, comes with selectors very similar to the ones of the testing library.

You can see the testing library is a common API that has bindings for multiple frameworks. For example, for Cypress, Angular, React, Puppeteer, etc. The selectors are the foundation of that API and allow us to select elements after criterias that an end user would use. That could be by text, role attribute, placeholders, and many more.

Koushik published a video on YouTube that showcases the new features.

{% embed https://youtu.be/5isYNIbB098 %}

## Ionic 6.3

Good news for developers who use Angular for mobile applications. Ionic has a new minor release.

Ionic is a toolkit that transforms an Angular application into a mobile one. It also provides several UI components that take on the native design of the particular mobile operating system. Access to native functions like the camera is available via Capacitor, which also comes from Ionic.

There are some new features with v6.3. For example, we can use standalone components in Ionic's router, or the button widget for datetime allows multiple selections.

{% embed https://ionic.io/blog/announcing-ionic-v6-3 %}

## Nir Kaufman - Angular Masters Podcast

The Angular Masters podcast released a new episode with Nir Kaufman. He shares his insights into learning Angular and discusses the challenges Angular faces when adding new features like standalone components or the inject pattern but still stay backwards-compatible.

{% embed https://youtu.be/VpZ6mf4P1PY %}

## ng-de

Last but not least, there was ng-de, the German Angular conference. Checkout their YouTube channel to get notified  as soon as the recordings are available.

{% embed https://www.youtube.com/channel/UCBw_r4N2nv72l9IV2hn042A %}
This week’s newsletter is out! (15-10-2022) - Turning the World Inside Out
Tags: javascript, tech, webdev
Published: 2022-10-15 09:41:00

---
title: This week’s newsletter is out! (15-10-2022) - Turning the World Inside Out
published: true
description: Another week of great javascript, tech and web development links.
tags: javascript, tech, webdev, discuss
---

Turning the World Inside Out

https://markjgsmith.substack.com/p/mark-smiths-newsletter-15-10-2022

Would love to hear any comments and feedback you have.

[@markjgsmith](https://twitter.com/markjgsmith)
How to effectively learn new stuff as a software engineer?
Tags: codenewbie, software, programming, tutorial
Published: 2022-10-15 09:37:20

Have you been trying to learn new things like watching lots of tutorials and after that you feel like you know nothing? Yes you actually know nothing because you have been doing it the wrong way. Are you are a victim of tutorial hell? Let me give you some cure.

## How do you go about learning new stuff and never forget it?

**Research about the technology that you want to learn**

Let’s say you want to learn Angular, search about something like what’s needed for an Angular app to be up and running (stuff like components, dependency injection, routing, state management, etc). Make a task list listing each and every concept.

**Now it is time to learn the new stuff**

Some devs prefer to follow official documentation, some prefer following blog tutorials, while some prefer following video tutorials. The approach that you will use here is the same. Search for something like “Angular crash course for beginners”. Don’t just pick a random tutorial. Choose something that is going to teach you the fundamentals through building a project and that is what project based learning looks like. 

The best way of learning is by doing, so follow along your tutor, as he does X you also do X. Grab the concepts and try to understand how he is doing it. After you finish building your project from the  tutorial give your time some rest. 

After some time maybe 24 hrs, get your hands on the keyboard. Now you have to build something on you own. Try building something similar from the tutorial. Implement the concepts that you learnt from the previous tutorial. I know it’s your first time doing it so it’s going to be hard but don’t worry, stackoverflow is your best friend.

After building your project revisit your task list. Check if you managed to understand the concepts that you listed. If yes make some notes describing how you implemented each topic and after that, you are good to go, start building projects.

This is the exact strategy that I use whenever I want to learn anything new. I hope this was helpful. If you have any additions let me know in the comments.
dotenv and typescript
Tags: typescript, dotenv, env, environmentvariable
Published: 2022-10-15 09:14:18

When we are developing our app, it is very important to put things in its right place.

Here, I'm talking about "typescript" with "dotenv".

They are two powerful tool that increases considerably the development speed.

In order we can do that, we can do something like this,

**.env** file must exists in root application path.

### package.json
```
"scripts": {
...
    "dev": "ts-node-dev --transpile-only -r dotenv/config -- src/main/server.ts",
...
  },
```
That way, we don´t "dirty" our code when we have to load local env variables for our app.
How to Convert Easily PDF to ePUB with Linux
Published: 2022-10-15 09:06:43


First we need to install calibre:

```bash
sudo apt install calibre
```

and then we can convert the PDF file to ePUB by command:

```bash
ebook-convert book.pdf book.epub  --enable-heuristics
```

For more examples and conversion of multiple files with single command you can check: [How to Convert PDF to ePUB with Linux ](https://softhints.com/how-to-convert-pdf-to-epub-with-linux/)