teleren/devto huggingface dataset:
What is Docker ?
Tags: docker, devops, opensource, containers
Published: 2023-04-10 11:03:45


**[Introduction][](https://medium.com/@karan_verma/what-is-docker-27373f5e1dc)

Docker is an opensource platform for developers and sysadmins to build, ship, and run distributed applications based on Linux containers. It is basically a container engine which uses Linux Kernel features such as namespaces and control groups to create containers on top of an operating system and automate application deployment on the container. It provides a light weight environment to run the application code. The Containers allow users to package up an application with all of the parts it needs, such as libraries and other dependencies, and ship it all out as one package. Docker makes sure that the application will run on any other Linux machine regardless of any customized settings that machine might have that could differ from the machine used for writing and testing the code.


Docker Open Source

- # 
Features

a) An isolated, rapid framework.

b) An opensource solution

c) Cross Cloud infrastructure

d) Moderate CPU/memory overhead

e) Fast Reboot

- # 
Components

Docker is made up of below major components

a) Docker Daemon

Docker daemon runs on a host machine. A docker user can not directly interact with the daemon as the daemon needs the docker client in order to interact.

b) Docker Client

It is the primary user interface to Docker which helps users to interact with the Docker Daemon. It processes the commands from the user and communicates back and forth with a Docker daemon.

c) Docker Images

These are ready-only templates that help launch Docker containers. A docker image can be of CentOS operating system with Apache and your web application installed. These images are used to create the docker containers. Docker allows to build new images or you can simply edit and update the images.

d) Docker Registries

Docker Registries holds the docker images. These registries are either public or private stores from where you upload or download images. The public docker registry provides a huge collection of existing images for use so its also called Docker Hub. You can easily edit and update the images as per your requirements and can upload them to Docker registries.

e) Docker containers

Each docker container is an isolated & secured application platform which holds everything that is needed for an application to run. You can perform run, start , stop, migration and delete operations on a docker container.

- # 
Docker and Security

Docker brings security to applications running in a shared environment, but containers by themselves are not an alternative to taking proper security measures.

In a nutshell, Docker can get more applications running on the same hardware than other technologies and it makes it easy for developers to quickly create ready-to-run container-ed applications and it makes managing and deploying applications much easier.
This article was originally published on my Medium blog: https://medium.com/@karan_verma/what-is-docker-27373f5e1dc
How AWS is changing what it means to be a Junior Developer with Scalable Infrastructure
Tags: cloud, aws, juniordev, scalable
Published: 2023-04-10 11:00:26



The advent of cloud computing has significantly altered the landscape of software development. One of the most significant ways AWS is changing the developer experience is by granting junior developers access to scalable infrastructure. In this blog, we will delve deeper into how access to AWS's powerful resources is empowering junior developers and enhancing their contributions to their teams.

## Breaking Down Infrastructure Barriers

In the past, high-end infrastructure was often reserved for more experienced developers, leaving junior developers with limited resources to work with. AWS has changed the game by offering scalable, on-demand resources that can be utilized by developers at any experience level. This access allows junior developers to work on projects of larger scope and complexity, which was once a privilege exclusive to their senior counterparts.

## Accelerating the Learning Curve

By providing access to a wide range of services and resources, AWS allows junior developers to experiment with different technologies and tools. This exposure not only enables them to learn from hands-on experience but also accelerates their growth as developers. Consequently, junior developers can quickly transition from entry-level tasks to more complex projects, thereby increasing their value to their teams.

## Encouraging Innovation

With the availability of AWS's scalable infrastructure, junior developers have the opportunity to develop and test innovative ideas without the constraints of limited resources. This freedom encourages experimentation and fosters a culture of innovation within development teams, ultimately leading to the creation of better products and solutions.

## Enhancing Team Efficiency

When junior developers have access to the same powerful infrastructure as their senior counterparts, they can contribute more effectively to the team's overall goals. This not only boosts team efficiency but also fosters a more collaborative and inclusive work environment. Senior developers can also leverage the junior developers' newfound capabilities to delegate tasks and focus on more critical aspects of the project.

## Conclusion

AWS has revolutionized the role of junior developers by providing them with access to scalable infrastructure. This access has empowered entry-level developers to take on larger projects, accelerate their learning curve, and contribute more effectively to their teams. As a result, AWS is shaping the future of software development by fostering innovation, collaboration, and efficiency across development teams.
Collection In Laravel
Tags: laravel, collection, php, beginners
Published: 2023-04-10 10:53:36

A collection is a robust data structure that allows developers to work with arrays of data more easily and efficiently. It provides an object-oriented approach to working with arrays and offers a wide range of methods that can be used to manipulate, filter, sort, and transform data.

Here's an example of how to create a collection in Laravel:

```
$collection = collect(['apple', 'orange', 'banana', 'kiwi']);
```

In this example, we have created a collection of fruits. Now we can use various methods to work with this collection. For example, we can use the `filter` method to filter out all the fruits that start with the letter `a`:

```
$filtered = $collection->filter(function ($value, $key) {
    return Str::startsWith($value, 'a');
});

// Output: ['apple']
```

In this example, we have used the `filter` method to create a new collection that only contains the fruit `apple`, which is the only fruit that starts with the letter `a`.

We can also use the `sort` method to sort the fruits alphabetically:

```
$sorted = $collection->sort();

// Output: ['apple', 'banana', 'kiwi', 'orange']
```

In this example, we have used the `sort` method to create a new collection that contains the fruits sorted alphabetically.

One of the main benefits of collections in Laravel is the ability to chain methods together, allowing developers to perform multiple operations on a collection in a single line of code. Here's an example of how we can create a collection of users and filter them by age and then sort them by name:

```
$users = collect([
    ['name' => 'John', 'age' => 30],
    ['name' => 'Jane', 'age' => 25],
    ['name' => 'Bob', 'age' => 35],
    ['name' => 'Sarah', 'age' => 28]
]);

$filteredUsers = $users
    ->where('age', '>', 25)
    ->sortBy('name');

// Output: [['name' => 'Jane', 'age' => 25], ['name' => 'John', 'age' => 30], ['name' => 'Sarah', 'age' => 28], ['name' => 'Bob', 'age' => 35]]
```

In this example, we have created a collection of `users` with their `names` and `ages`. We then used the `where` method to `filter` the collection, only returning users who are older than 25. Finally, we used the `sortBy` method to sort the filtered collection by name.

Another useful method of collections in Laravel is the `map` method. This method allows developers to transform the values in a collection by applying a callback function to each item in the collection. Here's an example of how we can use the map method to transform a collection of users into a collection of their full names:

```
$users = collect([
    ['first_name' => 'John', 'last_name' => 'Doe'],
    ['first_name' => 'Jane', 'last_name' => 'Smith'],
    ['first_name' => 'Bob', 'last_name' => 'Johnson']
]);

$fullNames = $users->map(function ($user) {
    return $user['first_name'] . ' ' . $user['last_name'];
});

// Output: ['John Doe', 'Jane Smith', 'Bob Johnson']
```

In this example, we have used the `map` method to create a new collection of full names by concatenating the first name and last name of each user in the original collection.
Landscaping companies in Dubai
Tags: landsacping
Published: 2023-04-10 10:50:29

[](url)https://avlandscapinguae.com/
Looking for premier landscaping companies in Dubai to help you create your dream outdoor space? Look no further than our team of skilled designers, builders, and landscapers. At our company, we pride ourselves on providing exceptional landscaping services in Dubai that are unique and reflective of our clients' style and preferences.
jQuery Migrate brakes WordPress version 5.5
Tags: wordpress, php, news, codenewbie
Published: 2023-04-10 10:45:49

A few days ago I bumped into a problem on one of my client’s WordPress website. the problem was that some function like “submit” form was not responding. 

The solution was at hand, but I found out something more serious was happening.

*Hi, I am Luc, a web developer and programmer in his early 40’s that started his journey of coding in February 2019.*

WordPress released the 5.5 version called “Eckstine” and it is outstanding regarding speed, search, and security as they state on their main website. If you’d like to read more about this update, you can do it here

###The Problem

But with this update they brought a very big issue: jQuery seized to be 100% responsive. The problem is that the JavaScript library called jQuery Migrate doesn’t install itself on the majority of the website when update causing everything that is JavaScript related to work improperly. We can think at JavaScript as small engines behind the scene that turns user’s action in reality. These little engines work behind the scenes to make forms, search bars, and drop-down menus to function.

Having an older theme installed on your website that is outdated, compatibility will show and will cause issues. 

So, the problem appears when a WordPress theme is old or a plugin is outdated. If the issue is with an older plugin, you can check the last time was updated, if it’s more than a year I recommend you to search a newer plugin with the same function, as that may cause the problem.

###The Solution
As the main WordPress website states: “With the update to WordPress 5.5, a migration tool known as jQuery-migrate will no longer be enabled by default. This may lead to unexpected behaviors in some themes or plugins who run older code” the handy solution is to install a plugin called: “Enable jQuery Migrate Helper” which you can download it from here or if you feel like this too easy, you can go deeper and downgrade from version 5.5 to version 5.4.2 as a user said: “The best solution is to downgrade to 5.4.2 Using the WP Downgrade Plugin by Version 1.2.1 | By Reisetiger.”

Conclusion

As of all updates nowadays, this one brings solutions, speed, and reliability but as well while this happens, bugs are presents as well. The best, for now, is to use whatever you see fit, and with whatever CMS you feel comfortable.

I hope this brings a solution to your struggle and until next week I wish you a productive week ahead.

You can find me on Twitter or LinkedIn
Auto Writing Effect
Tags: javascript, codepen, css
Published: 2023-04-10 10:15:19


## _The js makes everything simple_


1.The auto writing Effect is purely  done by _javascript_.
2.The speed of writing can be changed.The **Pause** and **Resume** features is added.
3.We can type out text and make the auto typing effect.
4.The given text is sliced by **slice** method.
5.The **setTimeout** function is used to call the **typeEffect()** function in the given second.
6.The **textarea** is used to enter the custom text.

{% codepen https://codepen.io/vasanthcf/pen/eYPNOap %}
How to Integrate Barcode Reading Functionality into .NET Applications
Tags: webdev, dotnet, programming, javascript
Published: 2023-04-10 10:07:40

To integrate barcode reading functionality into .NET applications, you can use a barcode reader SDK. Here we'll use Dynamsoft Barcode Reader SDK for .NET because it provides an easy and efficient way to add barcode reading functionality. It can save developers a significant amount of time and effort compared to building barcode recognition from scratch.

**Some specific advantages of using a barcode reader SDK include:**
**- Speed and accuracy:** It uses advanced algorithms and techniques to read barcodes quickly and reliably, even in challenging conditions such as low light or blurry images.
**- Cross-platform support:** It can work with multiple platforms and programming languages, allowing developers to add barcode reading functionality to their applications on a wide range of devices and operating systems.
**- Customization and flexibility:** It provide a range of configuration options and settings, allowing developers to customize the barcode reading process.

So, Let's start with implementation of barcode reading functionality using the Dynamsoft [Barcode Reader SDK for .NET](https://www.dynamsoft.com/barcode-reader/docs/server/programming/dotnet/user-guide.html):

1. Download and install the Dynamsoft Barcode Reader SDK for .NET from the Dynamsoft website.
2. Create a new .NET project in Visual Studio. 
3. Add a reference to the Dynamsoft Barcode Reader DLL in your project. To do this, right-click on your project in the Solution Explorer and select "Add Reference." Browse to the DLL file for the SDK and add it as a reference. 
4. In your code, add the following using statements:

```
using Dynamsoft.Barcode;
using System.Drawing;
```
5. Instantiate a BarcodeReader object:

```
BarcodeReader reader = new BarcodeReader();
```
6. Configure the barcode reader. For example, to recognize only QR codes, you can set the BarcodeFormat property:

```
reader.BarcodeFormat = BarcodeFormat.QR_CODE;
```
7. Load the image containing the barcode. For example, if you have an image file named "barcode.png" in your project directory, you can load it like this:

```
Bitmap barcodeImage = new Bitmap("barcode.png");

```
8. Call the DecodeBitmap method of the BarcodeReader object, passing the barcode image as a parameter:

```
BarcodeResult[] results = reader.DecodeBitmap(barcodeImage);
```
9. Loop through the results array to extract information about the barcodes that were recognized: 

```
foreach (BarcodeResult result in results)
{
    Console.WriteLine("Barcode Type: " + result.BarcodeFormat);
    Console.WriteLine("Barcode Value: " + result.BarcodeText);
}

```
This is a simple example to get you started. The Dynamsoft Barcode Reader SDK for .NET provides many more options and features for barcode recognition, such as support for multiple barcode formats, batch scanning, and more. 

Source: https://www.dynamsoft.com/barcode-reader/docs/server/programming/dotnet/
16 awesome frontend projects you need to build now
Tags: javascript, react, frontend, tutorial
Published: 2023-04-10 10:07:14

This Youtube playlist includes 16 awesome frontend projects explained in depth that you can build now to boost your portfolio and improve your knowledge in JavaScript and React.

Playlist link - https://www.youtube.com/playlist?list=PLOfzxGau1V5XoFTrzwmdb3uhUtn8nJDNE

Projects list:
1- Custom Date Picker using Vanilla JavaScript (vanilla javascript)
2- Make my trip machine coding problem (react js)
3- Customisable toast notification (vanilla javascript)
4- Dynamic progress bar (vanilla javascript)
5- Build a pixel art maker (vanilla javascript)
6- Stack and queue UI implementation (React Js)
7- Tic Tac Toe made easy (vanilla javascript)
8- how to create a start rating widget (vanilla javascript)
9- How to drag, drop, swap, edit and delete elements (vanilla javascript)
10- How to generate snapshot while hovering on video progress bar (React Js)
11- Letter by Letter Search Filtering (React Js)
12- React Js Countdown Timer made easy
13- Optimized Search Filter React Js | Filter, Debounce, Infinite Scrolling (Pagination) | All in one
14- Build this INSANE Multi filter feature for your next project | React Js
15- How to Build a Typewriter Effect in React.js | Easy Tutorial
16- How to Build an Infinite Nested Comments System in React JS | System Design + Code

I will be adding many more interesting projects along with how to build multiplayer games using socket io and javascript in the future.
If you find all these insightful, then do subscribe to the channel.
useQuery: isFetching vs isLoading
Tags: react
Published: 2023-04-10 10:01:40



In additional to [query status](https://dev.to/altesack/explaining-usequery-states-3e8) useQuery has so called `fetchStatus` and `isFetching` flag. It causes very frequent question about the difference of these flags so I'm trying to explain it.

### isFetching and isLoading are not the same
Yes. Mostly if you load data - you fetch data. But in useQuery terms it's become more complicated for some special cases. 

To be precise flag `isFetching` is actually about fetching process, it includes fetching itself or refetching data in some cases. 

The same time flag `isLoading` is more about state from application point of view. 

So what does it mean?

### Loading does not always mean Fetching
Let's look at the case loading state of [dependent queries](https://tanstack.com/query/v4/docs/react/guides/dependent-queries) in version 4

From the very beginning dependent query is in loading state, but is not fetching before another query success

In this case we have:
- isLoading: true
- isFetching: false ⚠️

So in this case we have set loading, but not fetching status!

And vice versa

### Fetching does not always mean Loading 
This is the case when we have set fetching status, but not set loading status!

Do you remember, that useQuery can fetch some data **after loading** state, being in success state?  It's so called `refetch` and could be catched using flag `isRefetching`. In this situation we have flags

- isLoading: false ⚠️
- isSuccess: true
- isFetching: true
- isRefetching: true

That's it!

### Conclusion
These cases are not very obvious, but still can happen at any time. So better to know!
🛠️ Edit videos in terminal
Published: 2023-04-10 09:47:49

I have been making some videos using AI and I couldn't resist editing it with an awesome CLI tool ffmpeg. 
Here are some of my favorite ffmpeg commands for quick video editing.

* **Overlay audio over a video, lowering the original volume by 80%**
```bash
#!/bin/bash
video="$1"
audio="$2"
ffmpeg \
	-i "$video" \
	-i "$audio" \
	-filter_complex \
	"[1:a]apad[A];[0:a]volume=0.20,[A]amerge[out]" \
	-c:v copy -map 0:v -map [out] -y \
	"processed_${video:0:10}.mp4"
```

* **Make a video from a single image**
```bash
#!/bin/bash
image="$1"
audio="$2"
length="$3" #Hh:Mm:Ss
ffmpeg \
	-r 0.01 -loop 1 -i "$image" \
	-i "$audio" -c:v libx264 \
	-tune stillimage -preset ultrafast \
	-ss 00:00:00 -t "$length" \
	-c:a aac -b:a 96k -pix_fmt yuv420p \
	-shortest out.mp4 -y
```

* **Concat multiple videos (listed in a file) into one** 
```bash
#!/bin/bash
ffmpeg \
  -f concat -safe 0 \
  -i mylist.txt -c copy output.mp4
```
```
$ cat mylist.txt
 file '/path/to/file1'
 file '/path/to/file2'
 file '/path/to/file3'
```

* **Split a video given a timestamp**
```bash
#!/bin/bash
video="$1"
timestamp="$2" # Hh:Mm:Ss

ffmpeg -i "$video" -to "$timestamp" -c copy first.mp4
ffmpeg -i "$video" -ss "$timestamp" -c copy second.mp4
```

* **Trim beginning of the video (Removing ads, intros)**

```bash
#!/bin/bash
video="$1"
time="$2"
ffmpeg \
	-i "$video" -vcodec copy \
	-c:a copy -map 0 -ss "$time" \ 
        "trimmed_${video:0:10}.mp4"
```
4 Design Principles for Supporting Decision Making
Tags: ux, strategy
Published: 2023-04-10 09:36:44

When it comes to decision making, having the right design principles in place can make all the difference. Here are four design principles that can help support decision making.

## Progressive Disclosure


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ejpjefrr58rcxbdmg46y.PNG)
Progressive disclosure is a design principle that involves revealing information gradually, as needed. This technique can include using tooltips, labels, and expanding sections. By presenting information in a progressive manner, users can make more informed decisions without feeling overwhelmed.

## Cognitive Aids

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tsmx3rve1m596y9kfy9u.PNG)
Cognitive aids are tools or techniques that help users process and understand information. These aids can take many forms, from visualizations and diagrams to checklists and decision trees. Providing timely reminders, notifications, and visual cues can help users remember important information or tasks, and make complex information more accessible and easier to understand.

## Feedback

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/il1nxepkdwt6q18l6akk.PNG)
Feedback is an essential component of decision making. Visual cues, messages, and animations can provide instant feedback to help users understand the results of their decisions and guide them towards desired outcomes.

##Defaults

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oe9q1em2ldn3ty55ktyd.PNG)
Defaults are pre-set options that users can choose from when making decisions. By setting defaults that are aligned with users' goals and preferences, designers can help support decision making by making it easier for users to make choices that are in their best interest. Smart defaults, such as pre-filled forms or suggested options, can help users make decisions in a context-appropriate manner.
By incorporating these four design principles into decision-making processes, designers can help support users in making better decisions. Whether it's through progressive disclosure, cognitive aids, feedback, or defaults, these principles can help make complex decisions more manageable and less overwhelming.


Thanks for reading!