teleren/devto huggingface dataset:
Business analyst training online/classroom course
Published: 2023-04-30 10:08:43

Greetings from COEPD! Business Analysts make up the majority of the online and classroom training for business analysts. COEPD's goal is to reduce project failures by offering assistance in the field of business analysis. This COEPD Community was formed by all BAs who are dedicated to this cause. We are working to raise awareness of the job of the business analyst and the advantages of include one in a project through COEPD. As a part of this, we are educating all motivated people whohttps://www.coepd.com/index.html are eager to fill this BA function on business analysis.[](url)
Does gaming slow down mobile?
Published: 2023-04-30 09:57:58

Games can use a lot of cache since they need to load images faster. Clearing the cache occasionally is typically a good thing. Yes, running many games can cause a slow down on your device. RAM that does not get cleared and having too much cache are the main culprits. Some days ago I found a website. This website is dedicated to mobile games. This website is very amazing. I like this website. If you download any game then visit this website [https://modapkdude.com](https://modapkdude.com) I hope you like this website.
HOW TO GENERATE 4 DIGIT OTP WITH JAVASCRIPT
Tags: javascript
Published: 2023-04-30 09:41:58

Are you looking to generate OTP codes for your application for authentication?
Follow these few steps and you will be able to do that.

**STEP 1**
*Generate a random number between 0 and 9000*

```
const randomNum = Math.random() * 9000
console.log(randomNum)

// will log random numbers like (1758.36816277815,8591.126356595876,380.85504639047053)
```

**STEP 2**
*Format the random number, to eliminate the decimals*
```
const randomNum = Math.random() * 9000
const formattedRandomNum = Math.floor(randomNum)
console.log(formattedRandomNum)

// will log random numbers like (1758,8591,380)
```

**STEP 3**
*Add 1000 to the generated value to make sure the length is always 4.*

_Note: Math.random() will generate random numbers between 0 and 8999, so adding 1000 to this random number, the highest can only be 9999, so our max length of 4 is always ensured and preserved._

```
const randomNum = Math.random() * 9000
const token = Math.floor(1000 + randomNum)
console.log(token)

// will log random numbers like (2758,9591,1380)
```

**STEP 4**
*Refactor into a function you can call each time you need to generate a token.*

```
function generateToken(){
   const randomNum = Math.random() * 9000
   return Math.floor(1000 + randomNum)
}

// will log random numbers like (2758,9591,1380)
```

**STEP 5**
*Call the function and your token is generated, then you can go ahead and hash the code/use it for what you intent.*

```
function generateToken(){
   const randomNum = Math.random() * 9000
   return Math.floor(1000 + randomNum)
}

generateToken() 
// will return random numbers like (2758,9591,1380)
```

Hope you found this content helpful?
Subscribe to my youtube channel here
[Subscribe to my youtube channel](https://youtube.com/@mrcandie)
Javascript event loop - approach the first meet
Tags: javascript, tutorial, beginners
Published: 2023-04-30 09:13:47

Let's take a context in a browser where we can execute JS directly in the `console`. Browsers provide JS runtime engine so that we can run the code in the console. Beside the JS engine, browsers also have alot of other built-in tools like HTML parsers, networking, storages,... And the Web API is one of the pieces in the browsers tools.
To this point we can note that **JS runtime** and **Web API** is 2 separately tools in the browser. This is important to acknowledge before we continued to the Event loop.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eu8ftubgnzc0cbapdoo3.png)
Now consider this snippet:
```javascript
console.log('start')

setTimeout(() => {
	console.log('Time is up!')
}, 0);

console.log('end')
```
When we execute the snippet, the log now shows:

```
start
end
Time is up!
```

Why shouldn't the log be this order `start - time is up! - end` although we set the timer to `0` in `setTimeout`?

### Debug the event loop
Firstly, keep in mind that JS doesn't provide the `setTimeout` function. It's part of the **Web API** that provided by browser. **So it has nothing to do with the Javascript things**.


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



When the code run, the functions are gradually added to the Callstack and then executed immediately.
While the `console.log()` functions are freshly executed right away and log the texts, the `setTimeout` is a special function from Web API. When it's called, the Web API will get the hands in: it holds the callback passed in `setTimeout` for a `t` second.


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

After `t` second, the callback is pushed to the **callback queue**, waiting in it to be executed:


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

The Event loop is constantly checking the callstack: if the callstack is empty, the callback queue will dequeue it, bringing the instance waiting in the queue to the callstack and then execute it


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

And finally, the `console.log('Time is up!')` is executed.


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



### Conclusion
- From the snippet above, we can see that if we use the special functions (`setTimeout, setTimeInterval`) from the Web API kit, the comprised instances (callbacks) in these function must go to the Web API, then go to the waiting queue from the callback queue, waiting for the callstack to be empty and then dequeue to the callstack for execution.
- In the meanwhile, the JS native functions (`console`) will take place in the callstack, no waiting for the `setTimeout`. This is called **Asynchronous/Non-blocking**
10 Bad Habits to Avoid as a Developer
Tags: development, devjournal, developer, discuss
Published: 2023-04-30 09:05:16


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7deqve4xkelej3zwi0dl.jpg)
As a developer, your habits play a crucial role in your success. While some habits can boost your productivity and enhance your coding skills, others can hinder your progress and impact your work quality. Here are ten bad habits you should avoid as a developer:

1. Poor Time Management: Time management is essential for developers, and poor time management can lead to missed deadlines and poor-quality work.

2. Lack of Attention to Detail: Developers must be detail-oriented to create bug-free code. Overlooking minor details can lead to significant issues in the long run.

3. Not Documenting Code: Failing to document your code can make it difficult for other developers to understand your work. Documenting your code helps improve its readability and maintainability.

4. Resisting Code Reviews: Code reviews are essential for improving the quality of your code. Resisting code reviews can prevent you from receiving constructive feedback, resulting in poor code quality.

5. Refusing to Learn New Technologies: The technology landscape is constantly evolving, and developers must keep up with new trends and tools. Refusing to learn new technologies can make you obsolete and hinder your career growth.

6. Procrastination: Procrastination is a significant obstacle to productivity. Putting off tasks until the last minute can lead to missed deadlines and subpar work quality.
 

7. Overcomplicating Code: Overcomplicating code can make it difficult to understand, maintain, and update. Simpler code is often more effective and easier to work with.

8. Ignoring User Experience: Developers must keep user experience in mind when developing software. Ignoring user experience can result in frustrated users and ultimately lead to failure.

9. Not Testing Code: Testing is crucial to ensure your code is bug-free. Failing to test your code can lead to significant issues, including security vulnerabilities.

10. Poor Communication Skills: Effective communication is essential for success in any industry, including software development. Poor communication skills can lead to misunderstandings and mistakes.

Avoiding these ten bad habits can help you become a more productive, efficient, and successful developer.
Loop over iterable and object with for..in and for..of
Tags: javascript, webdev, beginners
Published: 2023-04-30 08:42:48

In the world of loops, there are `for..of` and `for..in` statements that I'm going to discuss.
**for..of is mostly used to loop over arrays, strings, map,..etc.** 

```
Syntax:
for(items of array){
console.log(items);
} 
```
Let's understand `for..of`
I used names from anime Demon Slayer in below examples. This is my first time embedding pen into blog and it is not showing console, meh. 
{% codepen https://codepen.io/dev_duckling/pen/vYVJRmJ %}
So if you look at the code I have made an array named Japan just for making code more readable. Goal is to access the hashiras from _nested array_. For loop can be used but it is not readable like `for..of `.

---
**`for..in` is used to loop over objects**. You can use `for..of` too with slight adjustment.
```
Syntax:
for(key in object){
console.log(key);
} 
```
{% codepen https://codepen.io/dev_duckling/pen/abRyYQB %}
Have a look at the code maybe visit pen if possible as console is not showing up. In the above pen I have made `object demonSlayer`. Goal is to use `for..in` and get key and value from the object, which is in the console.

You cannot iterate over object as for..of won't work but it is possible to select object's key or value and iterate over them by method `Object.value` and `Object.key`, fork above pen and try below code

```
for(hashirasElements of Object.keys(demonSlayer)){
console.log(hashirasElements);
}

for(hashirasNames of Object.values(demonSlayer)){
console.log(hashirasNames);
}

```
The above code would give you keys and values from our object using `for..of`. 
That's it! Thanks for reading this blog!
OSDC-2023-assignment5
Tags: osdc, github, pypi
Published: 2023-04-30 08:09:46

**my assigment**
Fix the PR that I was in assigment 4,Find more projects via PyDigger, and create more PR try this time to make it more interesting and more challenging.
Add better projects to our JSON (that are not ours).

**Also I want to start write what I learned from our assigment in** [course ODSC] (https://github.com/OSDC-Code-Maven/osdc-2023-03-azrieli#assignment-1)

in setup.py I add author as:

```
 setuptools.setup(
    name="name of the project",
    version="1.1.7",
    author="Foo Bar",
    author_email="Foo.Bar.contact@Foo.com",
    license="MIT"
```
and in  pyproject.toml I add author as:

```
  [build-system]
    requires = ["poetry>=0.12"]
    build-backend = "poetry.masonry.api"
    license = "Apache-2.0"
```
my PR was accepted or still not get respect from the authors.

this projects that I now add to following:

[scanpy] (https://github.com/scverse/scanpy)
Scanpy is a scalable toolkit for analyzing single-cell gene expression data built jointly with [anndata] 
(https://anndata.readthedocs.io/en/latest/).

[seurat] (https://github.com/satijalab/seurat)
Seurat is an R toolkit for single cell genomics, developed and maintained by the Satija Lab at NYGC.

[autothresholdr] (https://github.com/rorynolan/autothresholdr)
Algorithms for automatically finding appropriate thresholds for numerical data, with special functions for thresholding images.
How to delete duplicated subdirectories recursively using the terminal
Tags: beginners, bash, terminal, cli
Published: 2023-04-30 07:59:01

The other day I came across a problem where I had three directories where I had two subdirectories with the same name (`target`).

![Directories problem in terminal](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mms2t3fb9ixzz5x4yl7v.png)

The thing I want to achieve is to delete them in one command, this is the solution I found.

## Using the terminal to delete multiple directories.

There is an useful command called `find`, this command is used to traverse nested directories and evaluate an expression for each element.

We can use `find` to delete files or directories, here is the command:

```bash
find . -type d -name "target" -exec rm -rf {} +
```

## Understanding the command

This command is easy to grasp, first we have `.`, this is telling `find` to start traversing in the current directory.

Next we have `-type`, this argument allows to select a a specific valid file.

The valid files are listed below:

- **b**: block special
- **c**: character special
- **d**: directory
- **f**: regular file
- **l**: symbolic link
- **p**: FIFO
- **s**: socket 

Since we need to find an specific directory we use `d`.

Next it's `-name`, we need to give the string that contains the name we are searching for. In our case we are looking for the directories named `"target"`.

The last part of the command, `-exec`, is telling what to do once we find a valid element. In this case we want to delete all the found occurrences, so we're passing `rm -rf`.

The `{}` is just telling that we need to use the current element's name, and `+` is used to terminate the `-exec` part.

## Conclusion

By using this simple command we can find and delete subdirectories in an easy and convenient way, which I find to be faster than using the GUI.

I hope this simple tutorial can help you to solve these kind of problems.
Laravel TALL Stack Authentication: Simplifying User Management for Web Applications
Tags: laravel, tallstack, livewire, php
Published: 2023-04-30 07:56:47

To create a CRUD operation in a Laravel TALL stack (Tailwind CSS, Alpine.js, Laravel, and Livewire), you can follow these steps:

Create a new Laravel project using the following command:
```
laravel new myapp
```
Install the TALL stack dependencies by running the following command:
```
composer require livewire/livewire laravel-frontend-presets/tall --dev
```
Generate the scaffolding for the TALL stack using the following command:
```
php artisan ui tall --auth
```
Migrate the database by running the following command:
```
php artisan migrate
```
Run Laravel App:

Now you can run using bellow command:
```
php artisan serve
```
Open bellow URL:
```
http://localhost:8000
```
I hope it can help you…
How React, ReactDOM, and JSX Work Together?
Tags: react, reactjsdevelopment, webdev, javascript
Published: 2023-04-30 07:43:27

## What is React and ReactDOM?

React is a JavaScript library that can be used to create UI elements for various platforms like browser, native, and VR. ReactDOM is a platform-specific package that takes the UI elements created by the React library and renders them in the DOM.

## Render "Hello World" using only react and react-dom

{% embed https://stackblitz.com/edit/web-platform-sfvg1r?file=index.html %}

Imagine, if you need to render a simple "Hello World" in DOM, you need to write the below code which is not that simple.

```
const reactElement = React.createElement('div', {
  className: 'container', 
  children: 'Hello World' 
});
```

## What is JSX?

JSX is a syntax extension for JavaScript that allows developers to write HTML-like code in their JavaScript files. This code is then transformed into regular JavaScript using a transpiler like Babel.

If you need to write equivalent JSX code for the above reactElement code which is easy to understand, it will be like this:


```
<div className="container">Hello World</div>
```

The JSX code is far easy to understand, but React, ReactDOM, or browser does not understand it. [Babel](https://babeljs.io/repl) comes into picture to translate JSX code to equivalent React code.

```
import { jsx as _jsx } from "react/jsx-runtime";
/*#__PURE__*/_jsx("div", {
  className: "container",
  children: "Hello World"
});
```

When a React element is created with JSX, it is compiled into a regular javascript format that React core library can understand. This react element is then passed to ReactDOM, which renders it in the DOM.

The complete code using React, ReactDOM, and JSX:

{% embed https://stackblitz.com/edit/web-platform-sfvg1r?file=React_ReactDOM_With_JSX.html %}

## Conclusion

Overall, React, ReactDOM, and JSX work together to provide a powerful and flexible way to create interactive and dynamic user interfaces for web applications.
Discover: The Tanzania API
Tags: programming, dakidarts, tanzania
Published: 2023-04-30 07:36:59



Discover [the Tanzania API](https://dakidarts.com/showcase/the-tanzania-api/). This API provides endpoints to lookup locations, find facilities and perform geospatial operations such as distance calculation and directions between two locations in Tanzania.

Whether you’re a developer, a business owner, or just someone who wants to explore this beautiful country, our API can provide you with the information and tools you need to make the most of your time in the Tanzania. So why wait? [Discover Now](https://dakidarts.com/showcase/the-tanzania-api/)
Discover: The Cameroon API
Tags: webdev, cameroon, dakidarts
Published: 2023-04-30 07:31:28



Discover Cameroon with [the Cameroon API](https://dakidarts.com/showcase/the-cameroon-api/), this API provides endpoints to lookup locations, find facilities and perform geospatial operations such as distance calculation and directions between two locations in Cameroon. With the Cameroon API, you can unlock the full potential of geospatial operations and explore Cameroon like never before.

Whether you’re a traveler, a business owner, or just someone who wants to explore this beautiful country, our API can provide you with the information and tools you need to make the most of your time in Cameroon. So why wait? [Discover Now](https://dakidarts.com/showcase/the-cameroon-api/)
Embracing Your Coding Style: How Do You Express Your Individuality in a Tech Career?
Tags: discuss, beginners, codenewbie, career
Published: 2023-04-30 07:00:00

When it comes to coding as a career, there's often a lot of pressure to conform to certain norms and standards. From choosing the "right" programming language to working for the "right" company, it can be easy to lose sight of what truly matters: your own preferences and passions.

Top CodeNewbie Daily Discussions in April touched on a lot of different aspects of programming, such as language preference, work environment preference, and specialty focus. It’s not too late to join these discussions: 

{% link https://dev.to/codenewbieteam/where-to-start-python-or-javascript-3peg %}

{% link https://dev.to/codenewbieteam/would-you-rather-work-in-a-small-startup-or-a-large-corporation-kcn %}

{% link https://dev.to/codenewbieteam/back-end-guru-or-front-end-fanatic-121c %}

At its core, coding is a creative process. It involves problem-solving, critical thinking, and a healthy dose of experimentation. There's no one "right" way to code. Each developer brings their own unique set of skills, experiences, and preferences to the table, and that's what makes the field so exciting and dynamic. Find a community that supports your interests and values, like DEV! Connecting with others who share your passion can be incredibly empowering. So keep connecting with us in May. ❣️
Predicting the Future: Which Programming Languages are Poised to Take the Lead?
Tags: discuss, programming
Published: 2023-04-30 07:00:00

As tech keeps moving forward at lightning speed, it's crucial to stay on top of the latest programming languages. The industry is growing and changing fast, so what languages do you think are gonna be big in the coming years? Which languages will continue to gain popularity in the coming years due to their performance, ease of use, and robust community support? And are there any new languages on the horizon that are poised to emerge and disrupt the industry? 

Drop a comment with your thoughts and let's chat about the future of coding!

---

Join the conversation and [follow the DEV Team](https://dev.to/devteam) for more thought-provoking discussions!
Last week top 5 posts tagged(#react)
Tags: react, c4r4x35
Published: 2023-04-28 13:32:35

##Microfrontends in ReactJS
Microfrontends are an architectural approach to building web applications by breaking them down into smaller, independent, and self-contained units that can be developed, tested, and deployed...
{% link https://dev.to/giveitatry/microfrontends-in-reactjs-do5 %}
##Dark Mode Toggle and prefers-color-scheme
When I wrote An Accessible Dark Mode Toggle in React back in 2021, @grahamthedev suggested I implement a prefers-color-scheme check in my theme setter. I finally got around to it.

What is...
{% link https://dev.to/abbeyperini/dark-mode-toggle-and-prefers-color-scheme-4f3m %}
##Updating React State Inside Loops
I recently ran into a very nasty little conundrum with React. I found a use-case where I felt it was necessary to update React state variables inside a loop. I initially had no idea how vexing it...
{% link https://dev.to/bytebodger/updating-react-state-inside-loops-2dbf %}
##Deep dive into React: State Management Types and its Importance
Introduction

State management is a key concept in React, a popular JavaScript library for creating user interfaces. The data that changes within a component or application is referred to as its...
{% link https://dev.to/fortune42/deep-dive-into-react-state-management-types-and-its-importance-2nn %}
##How To Use MillionJs In a Next App.
Introduction

Following a recent announcement by the millionjs creator Aiden Bai about support of Millionjs for Nextjs apps in the newest release of Millionjs (version 2.3.0), this article pretty much...
{% link https://dev.to/tobysolutions/how-to-use-millionjs-in-a-next-app-1eim %}
I Built Dexplorer: Disposable Cosmos-based Blockchain Explorer
Tags: webdev, cosmosecosystem, blockchain, explorer
Published: 2023-04-30 06:46:29

Recently, I built an exciting project called `Dexplorer`. As a developer working on a Cosmos-based blockchain on my local machine, I found it quite challenging to test a local chain because we had to query through CLI all the time. So, I came up with an idea: what if we built a temporary explorer that works for all Cosmos-based chains? That's when I started developing `Dexplorer`, a disposable light explorer specifically designed to connect to any Cosmos SDK chain using only WebSocket RPC.

![Home](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1m5a6px34nj1mqgqd1u4.jpeg)

`Dexplorer` is only a frontend application, which means there is no cache or pre-processing. However, it pulls data from RPC as needed, making it an excellent tool for developers working on Cosmos-based chains who want to explore blockchain data through a user interface.

Currently, the app has several features, including:

- The ability to connect to any Cosmos-based RPC
- A dashboard to easily monitor chain activity
- The ability to subscribe to the latest blocks and transactions
- A search function that allows you to quickly find blocks, transactions, and accounts
- A list of active validators
- A list of proposals
- Blockchain parameters

With `Dexplorer`, you can quickly and easily monitor the activity of Cosmos-based chains, making it an invaluable tool for developers. And, in the future, I plan to connect `Dexplorer` with a wallet, enabling users to process transactions directly through the app.

If you're interested in checking out `Dexplorer` for yourself, head to [https://dexplorer.space](https://dexplorer.space/). And if you want to dive into the code, you can find it on Github at [https://github.com/arifintahu/dexplorer](https://github.com/arifintahu/dexplorer).