teleren/devto huggingface dataset:
Inline images not working
Tags: vite
Published: 2023-05-04 12:07:40

I have inline image import in my js file. 
import LoginImage from 'D:Icons/log_in.png?inline';

The file is not found when served from the server. 

It is getting resolved like this. 
import LoginImage from "/@fs/D:Icons/log_in.png?import&url";

we are getting file not found exception.

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

Please help me find solution. Any loader or plugin must be used?
The Benefits of Practicing Yoga
Tags: yoga
Published: 2023-05-04 11:53:19

 ## Introduction

Yoga is a practice that has been around for thousands of years and has gained popularity in recent years due to its numerous benefits. Yoga is a physical, mental, and spiritual practice that originated in ancient India. It involves various postures, breathing techniques, and meditation. In this blog post, we will discuss the benefits of practicing yoga and how it can improve your overall well-being.

## Increased Flexibility and Strength

One of the most obvious benefits of practicing yoga is increased flexibility. Yoga involves various postures that help stretch and lengthen muscles, which leads to increased flexibility over time. As you practice more, you will find that you can hold postures for longer periods of time and move more easily. Additionally, yoga also helps build strength. Many of the postures require you to hold your body weight, which can help build muscle in various areas of your body.

![Image of the Yoga](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u5sroz3ba9f5nl2teajb.jpg)


## Reduced Stress and Anxiety

Yoga is also a great way to reduce stress and anxiety. The practice of yoga involves deep breathing and meditation, which can help calm your mind and reduce stress levels. Studies have shown that practicing yoga can lower cortisol levels, which is the hormone associated with stress. Additionally, yoga can help increase the production of serotonin, which is a neurotransmitter that helps regulate mood.

## Improved Sleep

Another benefit of practicing yoga is improved sleep. The deep breathing and relaxation techniques used in yoga can help calm your mind and prepare your body for sleep. In fact, studies have shown that practicing yoga can improve the quality and duration of sleep. If you struggle with insomnia or poor sleep quality, incorporating yoga into your routine may be helpful.

## Conclusion

In conclusion, practicing yoga can provide numerous benefits for both your physical and mental well-being. From increased flexibility and strength to reduced stress and anxiety, there are many reasons to try yoga. Additionally, incorporating yoga into your routine may also lead to improved sleep quality. If you are interested in trying yoga, there are many resources available such as online classes and local studios. Start small and work your way up to more advanced postures and techniques. Your mind and body will thank you for it.
Examples of SAST Tools for App Security
Tags: security, development, cybersecurity, testing
Published: 2023-05-04 11:51:47

**Looking for the best SAST tools for your software product? We’ve listed 3 SAST tools worth consideration. Check them out!**

## What are SAST Tools?

These are the tools used for **Static Application Security Testing (SAST)**. SAST tools scan your app’s code and notify you about any vulnerabilities such as SQL injections, outdated algorithms, or strings with possible passwords.

## SAST tools to consider

Here are 3 examples of SAST tools that are worth consideration. They offer free trials so you can check them easily and verify their potential on your own.

[Snyk](https://snyk.io/)

* Paid SAST tool, but also has a free version for ~100 scans a month.
* Snyk is a powerful tool that can be used as a plugin for your favorite IDE for local development.
* Scans code security, gives the severity of issues and suggests fixes.
* Also scans dependencies and gives an advisor score for the package.
* The easy onboarding process, with the ability to scan your CI/CD and add new team members to your project.

[Semgrep](https://semgrep.dev)

* Another paid SAST tool that is available as SaaS for free for teams of up to 20 persons.
* Onboarding is easy and has the option to use the scanner with CI/CD pipeline and use the Web dashboard.
* Semgrep can also be used as an Open Source tool without limits and has a built-in GitLab Security Scanner.

[SonarQube](https://www.sonarsource.com/products/sonarqube/)

* It is available as a free and paid version, with Sonarlint being the free IDE extension for analyzing projects.
* The rules set is quite limited without a local SonarQube server or SonarQube cloud.
* To enjoy free linting with extended rules set, download the SonarQube Community Edition and run a server locally.
* Configuring the server can be more cumbersome than Snyk, but there is no limit to the number of scans.
* Can be configured for your team and used for managing issues together.

For security purposes, it is suggested to use Snyk for local development, Semgrep for CI/CD if your team is small, and SonarQube for CI/CD scans as a self-hosted Community Edition if your team is bigger.

## Read more about software security tools in a free ebook

Looking for a comprehensive knowledge base about app security? [Download the free ebook](https://brightinventions.pl/blog/app-security-free-ebook/) and get to know top tools, standards and security practices.

[![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/klvcfn1uj4m312lkqlr7.png)](https://brightinventions.pl/blog/app-security-free-ebook/?utm_source=dev.to&utm_medium=referral&utm_campaign=article_sast)

By Rafał Hofman, Fullstack Developer @ Bright Inventions
SQLAlchemy 2.0 Core Crash Course - Use Python for Seamless Interaction with Relational Databases
Tags: python, programming, sql
Published: 2023-05-04 11:41:02

{%youtube CfZGWH_vNO0%}

SQLAlchemy Core allows you to interact with relational databases using statements written in pure Python. This allows you to form queries and use your database without that much knowledge of SQL. 

This video will give you a guide on how to connect to an SQL database as well as to Create, Read, Update, and Delete records from your database.
Load Test Your app
Published: 2023-05-04 10:45:56

Hello there! If you have an app, you definitely want it to work seamlessly, right? Load testing can be compared to a dress rehearsal, which helps to determine if your app can handle the traffic when it really matters. As a developer, after I am done building an app, I often want to check if it can handle the pressure, such as how many requests per second it can handle and how much time it takes to respond to those requests.

## Load testing Libraries

to load test your app there are a lot of libraries out there from lightweight tools to more complex one that cover a wide range of conditions and scenarios  , I will list some of the libraries that you can use to test your app.

## Lightweight Libraries

These libraries are lightweight and easy to use, making them ideal for quick load testing and measuring the performance of your application under moderate loads. However, they may have some limitations, such as limited support for testing more complex scenarios or simulating real user traffic.

1- ApacheBench (ab) >> the one I use frequently
2- hey
3- vegeta
4- fortio
5- boom
6- wrk

## For more complex scenarios

These libraries are widely used by developers and QA engineers to simulate high levels of traffic to their applications and measure their performance under various conditions. Each library has its own unique features, strengths, and limitations.

1- Apache JMeter
2- Gatling
3- Locust
4- Artillery
5- k6
6- Tsung
7- Siege
8- The Grinder
9- LoadRunner

Since I like to tire myself out 😅 I always try to recreate a small version of the things I use in a daily basis so in the next article we will building our own small load test app using Node and compare the result with other tools .
Trust and Accountability: Establishing trust and ensuring accountability with remote developers
Published: 2023-05-04 11:32:28

When working with remote developers, it can be challenging to establish trust and ensure accountability. Without regular face-to-face interaction, it can be difficult to build a sense of trust and ensure that everyone is on the same page. However, there are several strategies that companies can use to establish trust and ensure accountability with their [remote](https://letsremotify.com/about-us/) developers.

Set clear expectations: It's important to establish clear expectations with remote developers from the outset. This may include outlining project goals, deadlines, and communication expectations. By setting clear expectations, everyone can work together more effectively and stay on track.

Use collaboration tools: Collaboration tools can help build trust and ensure accountability by allowing remote teams to work together in real-time. Tools like Slack, Trello, and Asana can help keep everyone on the same page, even if they are working from different locations. It's important to choose tools that are user-friendly and accessible to everyone on the team.

Establish regular check-ins: Regular check-ins can help build trust and ensure accountability with remote developers. These check-ins may take the form of weekly or monthly meetings, or informal check-ins via messaging or email. By establishing regular communication, everyone can stay up-to-date on project progress and ensure that everyone is on the same page.

Encourage transparency: Encouraging transparency can help build trust and ensure accountability with remote developers. This may include sharing project updates, feedback, and challenges openly and honestly. By fostering a culture of transparency, everyone can work together more effectively and build a sense of trust.

Establish clear lines of communication: It's important to establish clear lines of communication with remote developers. This may include setting specific hours for communication or outlining response times for emails or messages. By establishing clear lines of communication, everyone can work together more effectively and ensure that everyone is on the same page.

Provide feedback and recognition: Providing feedback and recognition can help build trust and ensure accountability with remote developers. Regular feedback can help remote developers understand what is expected of them and how they can improve. Recognition for good work can also help build a sense of trust and ensure that everyone is working towards the same goals.

In conclusion, establishing trust and ensuring accountability with remote developers can be challenging, but it's not impossible. By setting clear expectations, using collaboration tools, establishing regular check-ins, encouraging transparency, establishing clear lines of communication, and providing feedback and recognition, companies can build a more productive and collaborative working relationship with their remote developers. By doing so, they can ensure that everyone is working towards the same goals and achieving success together.
The Web3 Developer Roadmap
Tags: web3, blockchain, career
Published: 2023-05-04 11:01:13

Web3 development is an emerging field of work that has begun to grow in recent years. As 2023 unfolds, the demand for web3 developers is expected to increase significantly, making it a highly lucrative career choice for those looking to work in [web3](https://cointelegraph.com/blockchain-for-beginners/what-is-web-3-0-a-beginners-guide-to-the-decentralized-internet-of-the-future).

According to [Cointelegraph](https://cointelegraph.com/news/web3-developer-growth-hits-an-all-time-high-as-ecosystem-matures), there were 18,416 monthly active web3 developers in December 2021. The most recent data reveals that 65% of all currently active devs and 45% of all full-time devs started working in Web3.

## **What is a web3 developer roadmap?**

A web3 developer roadmap is a step-by-step guide that outlines the skills, tools, and technologies needed to become a successful web3 developer. The roadmap may vary depending on your background, interests, and career goals.

The web3 developer roadmap is a great tool that helps aspiring developers create a personalized plan for their careers.

To become a web3 developer, you must have a solid understanding of blockchain fundamentals, including distributed ledger technology, consensus mechanisms, and smart contracts. Aspiring web3 developers can create a roadmap to guide their learning journey.

### **Tips for creating a web3 developer roadmap**:

- Identify the skills and tech stack that are in demand in the web3 development space
- Focus on areas that align with personal interests and strengths
- Set achievable learning goals and milestones
- Seek mentorship and guidance from experienced web3 developers
- Continuously learn and stay updated with the latest trends and developments in the industry

Proper training and education are essential for anyone looking to become a web3 developer.

Some web3 organizations offer web3 developer training programs. These programs provide hands-on experience and mentorship from experienced web3 developers. They also offer networking opportunities and access to job opportunities in the web3 industry.

By following a personalized web3 developer roadmap and investing in training and education, aspiring web3 developers can acquire the skills and knowledge needed to succeed in the industry.

## Ready to prove your Talent?
Kleoverse was created for web3 developers and other professionals to find web3 jobs and bounties, and it includes everything a web3 organization or project needs to maximize its company's growth.

Kleoverse acts as a curation layer for web3 talents and web3 organizations to showcase their talents and hire web3 professionals respectively. Kleoverse also serves as a bounty platform where interested web3 professionals can find open bounties from their favourite web3 organizations.

Feel free to check the top web3 jobs at Kleoverse Talent Platform for Web3 Builders: https://kleoverse.com/
CSS vs. CSS-in-JS: Which is the better approach for web design in 2023?
Tags: discuss, css, beginners, tutorial
Published: 2023-05-04 11:00:17

With the rise of CSS-in-JS libraries such as styled-components and Emotion, there has been a growing debate about which approach is better for web design. In this discussion, let's hear your thoughts on whether CSS or CSS-in-JS is the better approach for web design in 2023.

Have you used CSS-in-JS libraries in your projects? Do you prefer using traditional CSS or do you find CSS-in-JS to be a better approach? Share your experiences and opinions in the comments below and let's discuss the pros and cons of both approaches.
isNaN() vs Number.isNaN()
Tags: webdev, javascript, programming, react
Published: 2023-05-04 10:58:28

## isNaN()
If the argument passed inside isNaN() is NaN, then true is returned at the first place, but if the it is not, then it is coerced into number and if the result is NaN, then true is returned else false is returned.

For example, 

1. Empty string ('') is coerced into 0
2. null is coerced into 0
3. undefined is coerced into NaN
4. false is coerced into 0

```javascript
console.log(+'') // 0
console.log(Number('')) // 0
console.log(Number(false)) // 0
console.log(Number(null)) // 0
console.log(Number(undefined)) // NaN
console.log(Number(NaN)) // NaN
console.log(Number({}) // NaN
console.log(Number(Infinity)) // Infinity

```
Now let's see isNaN() in action

```javascript
console.log(isNaN(+'')) // false, because 0 is not NaN
console.log(isNaN(false)) // false, because is 0 is not NaN
console.log(isNaN(undefined)) // true, because Number(undefined) is NaN
console.log(isNaN(NaN)) // true, because NaN is NaN
console.log(isNaN({}) // true, because Number({}) is NaN
console.log(isNaN(null)) // false, because Number(null) is 0 and 0 is not NaN
console.log(isNaN(Infinity)) // false, because Infinity is a Number and Number is not NaN

```

## Number.isNaN()
It works somewhat different from global isNaN(). Here the argument is not coerced into a number, rather it checks whether the argument is NaN or not. If it is NaN then true is returned, else false is returned.

```javascript
console.log(Number.isNaN('abc')) // false
console.log(isNaN('abc'))        // true
```
In the first example Number.isNaN('abc'), here 'abc' is clearly a string and it is not NaN, therefore it returns false.
In the second example isNaN('abc'), here 'abc' is coerced into a number type and Number('abc') is NaN, therefore it returns true.

Some more examples:

```javascript
console.log(Number.isNaN({})) // false
console.log(isNaN({}))        // true
```
In the first example, {} is clearly not a NaN, therefore false is returned.
In the second example, {} is coerced into a number and Number({}) is NaN, therefore true is returned.

```javascript
console.log(Number.isNaN(false)) // false
console.log(isNaN(false))        // false
```
In the first example, false is clearly not NaN, therefore false is returned.
In the second example, as I have discussed earlier in this article that false is coerced into 0 and 0 is certainly a number, therefore false is returned.

I hope you have got the point, at last I am writing some snippets that will help you more, getting the nuances.

```javascript
console.log(Number.isNaN(NaN)) // true, because NaN is NaN
console.log(Number.isNaN(undefined)) // false, because undefined is not NaN
console.log(Number.isNaN(null)) // false, because null is not NaN
console.log(Number.isNaN('')) // false, because '' is not NaN
console.log(Number.isNaN(false)) // false, because false is not NaN
console.log(Number.isNaN({})) // false, because {} is not NaN
console.log(Number.isNaN(Infinity)) // false, because Infinity is not NaN
```
Package Managers
Tags: productivity, management, programming, webdev
Published: 2023-05-04 10:50:39

npm , pip , composer,maven
What are those and why do we use them?
These are package managers for different programming languages: npm for JavaScript, composer for PHP, pip for Python, and Maven for Java, among others. In any project, it is necessary to download and install packages to facilitate the work or save time, such as language libraries and other packages. Each package has different versions, and we choose the one that is compatible with our project. To ensure that the team is using the same packages, we create a package.json file that lists all the packages needed, and a lock file that specifies the exact versions used. This way, anyone who downloads the packages using the package manager will get the same versions as everyone else on the team. When we write "npm install" or "composer install", for example, the package manager downloads all the packages listed in the package.json file and installs them with the versions specified in the lock file.
composer for PHP
npm for js
pip for python
maven for java
and there are many more for sure
in conclusion: package managers are used mainly to share what packages did we install in the project in what version and with one click share it with anyone else or at the server
that's it!
link for the Arabic post :
https://lnkd.in/djZ8q-vu
CI/CD pipeline setup: Building and pushing Docker images to Docker Hub using GitHub Actions
Tags: docker, devops, cloud, architecture
Published: 2023-05-04 10:50:17


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

The present article aims to elucidate the process of pushing a Docker image to DockerHub via GitHub Actions. By automating the building and pushing of Docker images to DockerHub, developers can reap various advantages such as enhanced consistency, efficiency, version control, ease of deployment, and scalability.

Create a GitHub repository and place a Dockerfile in the root directory.

Let's create a workflow with the following steps:

Check out the repository: This step will check out the code from your repository.

```
- name: Checkout code
  uses: actions/checkout@v2
```
Log in to Docker Hub: This step will log in to Docker Hub using your Docker Hub username and password.

```
- name: Login to Docker Hub
  uses: docker/login-action@v1
  with:
    username: ${{ secrets.DOCKER_USERNAME }}
    password: ${{ secrets.DOCKER_PASSWORD }}
```
Note: You will need to add your Docker Hub username and password as secrets in your repository settings.

Build the Docker image: This step will build the Docker image using the Dockerfile in your repository.

```
- name: Build Docker image
  run: docker build -t <dockerhub-username>/<image-name>:<tag> .
```

Note: Replace <dockerhub-username> with your Docker Hub username, image name, and tag for the image.

Here's the complete workflow file:

```
name: Build and Push Docker Image

on:
  push:
    branches: [main]

jobs:
  build-and-push:
    runs-on: ubuntu-latest
    steps:
    - name: Checkout code
      uses: actions/checkout@v2

    - name: Login to Docker Hub
      uses: docker/login-action@v1
      with:
        username: ${{ secrets.DOCKER_USERNAME }}
        password: ${{ secrets.DOCKER_PASSWORD }}

    - name: Build Docker image
      run: docker build -t <dockerhub-username>/<image-name>:<tag> .

    - name: Push Docker image to Docker Hub
      run: docker push <dockerhub-username>/<image-name>:<tag>
```

Save this file as docker.yml in the .github/workflows/ directory of your repository, and GitHub Actions will automatically build and push the Docker image to Docker Hub every time you push changes to the main branch.

In case you don't know how to add secrets to your GitHub repository, follow these steps:

1. Go to your repository on GitHub and click on the "Settings" tab.

2. Click on "Secrets" in the left-hand menu.

3. Click on "New repository secret".

4. Give your secret a name (e.g. DOCKER_USERNAME or DOCKER_PASSWORD).

5. Enter the value of the secret in the "Value" field. Click on "Add secret".

I hope you found this article informative and useful for your Docker image building and pushing needs. If you have any questions or comments, feel free to leave them below. I look forward to seeing you in the next article!

Take Care. Keep smiling. :)
How to create a storage account and upload Blob files in Azure
Tags: azure, cloudcomputing
Published: 2023-05-04 10:39:02

To create a storage account in Azure, the first thing we will do is login into our azure account and click on create a resource.

Search for storage account and click on create storage account. Create a resource group and add a name for the storage account.

Your storage account name is unique across all Azure accounts. No two storage accounts can have the same name. choose locally-redundant storage under redundancy (we are choosing this to save cost). You can leave everything else as default and proceed to create an account.

![Creating storage account](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vr1kgj3dlgqq89bx2wbz.png)

After your storage account is done creating, navigate to containers under the Data storage section and click on create container. 

![Navigating to containers](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zxltryr06l1fsdpz7eq1.png)

Under the public access level, change it to Blob. This will ensure that you can view the blobs/files that you add to the container

![Creating container](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/78f8qg8bi1h6melw5yyr.png)

Next, we would upload a Blob into the container 

![Uploading blob](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x42sdg3862a5qq0s9ao2.png)

You can view information such as the size of your file and which type file was uploaded. You will also find the url that you can use in accessing the uploaded image

![Viewing information about the blob](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r1qisqiocxiz8ba6ecgb.png)

You can view the contents of the file using the public url for the item

![Viewing the blob](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ddoukgy3404mqki3csbb.png)

Finally, don't forget to delete all the resources that we created; the resource group, container and the storage account