teleren/devto huggingface dataset:
Top 7 Featured DEV Posts from the Past Week
Tags: top7
Published: 2023-01-10 15:39:46

---
title: Top 7 Featured DEV Posts from the Past Week
published: true
description: A round up of the most-read and most-loved contributions from the community this past week
tags: icymi 
cover_image: https://thepracticaldev.s3.amazonaws.com/i/sfwcvweirpf2qka2lg2b.png
---

_Every Tuesday we round up the previous week's top posts based on traffic, engagement, and a hint of editorial curation. The typical week starts on Monday and ends on Sunday, but don't worry, we take into account posts that are published later in the week._ 

## Understanding Git with Images

Inspired by Nico Riedmann's ["Learn git concepts, not commands"](https://dev.to/unseenwizzard/learn-git-concepts-not-commands-4gjc), @nopenoshishi put together an awesome guide on Git’s system structure featuring hand drawn-images!

{% embed https://dev.to/nopenoshishi/understanding-git-through-images-4an1 %}


## Improve Your Chances at Interviews

Looking for work is always a tough experience. Here, @andrewbaisden describes many actions you might take to make sure you get your foot in the door of the IT business.

{% embed https://dev.to/andrewbaisden/how-to-increase-your-chances-of-getting-interviews-and-job-offers-in-tech-2b74 %}


## Databases 101

Databases can be a confusing and scary topic for those who haven’t explored them. @danielhe4rt shares their learnings, letting us know what they find particularly fascinating about databases.

{% embed https://dev.to/danielhe4rt/database-101-why-so-interesting-1344 %}


## Reduce Docker Image Sizes

Reducing the size of the Docker image in their pet project by 97%, @kitarp29 uncovered some really effective methods for bringing down the size of Docker images. Read on to see how they made it happen! 

{% embed https://dev.to/kitarp29/reducing-docker-image-size-a67 %}


## Google Logo in CSS

Illustrating logos in CSS is a great way to learn the ins and outs of the language. In this post, @ratracegrad walks us through creating the Google logo.

{% embed https://dev.to/ratracegrad/learn-css-create-the-google-logo-3b73 %}


## A Guide to WebAssembly

WebAssembly (Wasm) is a low-level binary format that is designed to be faster and more efficient than traditional JavaScript. In this article, @cocoandrew explores how to use WebAssembly in a web application. 

{% embed https://dev.to/cocoandrew/revolutionizing-the-web-with-webassembly-a-comprehensive-guide-fa5 %}


## Blogging for Developers

Though it can be difficult to get going, @nasirovelchin puts forth several reasons why blogging is particularly beneficial to software developers.

{% embed https://dev.to/nasirovelchin/every-software-developer-should-write-a-blog-4622 %}


_That's it for our weekly Top 7 for this Tuesday! Keep an eye on dev.to this week for daily content and discussions...and be sure to keep an eye on this series in the future. You might just be in it!_
Does your startup need a Business Continuity Plan?
Tags: business, webdev, management, startup
Published: 2023-01-10 15:34:11

{% youtube oesPq_8o0Pc %}

Let’s focus on Business Continuity Plan — what is it, what are the key elements, advantages, myths about, and steps to create one? And finally, why do you need a BCP? Check out our COO’s article or watch the video. 

Enjoy! You can also read the article at [Frontend House](https://frontendhouse.com/experts-zone/does-your-startup-need-a-business-continuity-plan-experts-zone-29).
String.endsWith() in JavaScript
Tags: webdev, javascript, programming, tutorial
Published: 2023-01-10 15:30:00

The `String.prototype.endsWith()` method is a string method in JavaScript that returns a Boolean value indicating whether a string ends with a specified search string. This method is case-sensitive, meaning that it will return true only if the search string exactly matches the end of the target string.

## Syntax

```js
string.endsWith(searchValue, start)
```

- _**searchValue**_: A specified search string to be searched for at the end of the string.
- _**start**_: The position within the string at which to begin searching for `searchString`. (Defaults to `0`.)

It returns a boolean value, `true` if the searched string is found at the end of the given string; otherwise `false` if not found.

Here's an example of how to use the `endsWith()` method:

```js
let str = 'Hello, world!';

console.log(str.endsWith('world!')); // Output: true
console.log(str.endsWith('World!')); // Output: false
```

In this example, we create a string called `str` and use the `endsWith()` method to search for the substring `'world!'` at the end of it. Since the search string exactly matches the end of the string `str`, the `endsWith()` method returns `true`. However, if we search for the string `'World!'`, which is not an exact match, the `endsWith()` method returns `false`.

The `endsWith()` method also accepts an optional second argument, which is the length of the substring to be searched within the target string. This is useful if you want to search for a substring within a specific part of the target string.

Here's an example of using the optional second argument:

```js
let str = 'Hello, world!';
console.log(str.endsWith('world!', 12)); // Output: true
```

In this example, we search for the substring `'world!'` within the first 12 characters of the string str. Since the string `'world!'` appears at the end of the first 12 characters of `str`, the `endsWith()` method returns true.

## Wrapping up!

The `endsWith()` method is a convenient and easy way to search for substrings at the end of a string in JavaScript. It's often used in combination with other string methods, such as `indexOf()` and `substr()`, to perform more complex string operations.

That's all for this article, hope you learned something. Thanks for reading, catch you later.

You can also buy me a coffee that would help me grow as a frontend developer :)

<a href="https://www.buymeacoffee.com/moazamdev" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" style="height: 100px !important;" ></a>

---

{% user moazamdev %}
8 reasons to use Angular for web applications
Tags: angular, javascript, node, typescript
Published: 2023-01-10 15:27:43

There are several reasons why you might choose to use Angular for building a web application. Some of the key advantages of using Angular include:

1. Two-way data binding: Angular's two-way data binding allows you to easily synchronize the view and the model, which can help make your code more efficient and easier to maintain.

2. Components: Angular's component-based architecture allows you to break your application into smaller, reusable pieces, which can help make your code more modular and easier to understand.

3. Dependency injection: Angular's built-in dependency injection framework can help make your code more testable and easier to understand.

4. Strongly-typed: Angular use Typescript as a language which is a superset of javascript. It enables the features like Typechecking, ES6 features etc which makes the development process more efficient and less error-prone.

5. Built-in directives: Angular provides a wide variety of built-in directives that can help you easily create common UI elements like forms, lists, and data tables.

6. Large community: Angular has a large and active community, which means that there are many resources available to help you learn and use the framework, as well as many third-party libraries and plugins that you can use to extend its functionality.

7. Mature Framework : Angular is a mature Framework, Google has been working on it since 2010, so it is a stable framework with a large user base.

8. Mobile support: Angular provides a set of tools, called Angular Mobile Toolkit, that allows you to build mobile-friendly apps that can run on both iOS and Android devices.

Overall, Angular is a powerful and feature-rich framework that can help you build efficient and maintainable web applications, especially when coupled with best practices and testing.
Introduction post
Published: 2023-01-10 15:24:27

Hi, 

My name is Sahar. I have just started an [Open Source Development Course](https://github.com/OSDC-Code-Maven/osdc-2023-01-public) led by @szabgab.

As part of this course assignments I have opened an account at this platform.
Currently I mainly use python which served me also in my last job but I am also familiar with SQL and Cpp.

At python I usually use the following libraries: numpy, pandas, math, scipy, matplotlib and opencv.

My goal of taking this course is to join the developers community and to learn good programing habits including CI/CD.

I have built few projects that I will share in the future in my github.
Introducing the Twitter Comment Bot: Generate and Reply to Tweets with OpenAI API
Tags: javascript, openai, api, twitter
Published: 2023-01-10 15:20:26

Hey fellow developers!

I wanted to let you all know about a project I recently completed - a Twitter bot that searches for tweets containing a specific keyword(s) and replies with a comment generated by the OpenAI API. This bot can be run locally or deployed it to run 24/7.

Some challenges I faced while building this project were:

- Learning how to use the Twitter API and authenticate my requests (this was the hardest part)

- Figuring out how to use the OpenAI API to generate comments

- Ensuring that the bot only replies to tweets once every 30min (or user preferred time)

If you're interested in checking out this project, you can find it on my [GitHub page](https://github.com/sojinsamuel/Twitter-Comment-Bot). 

Feel free to leave a star :star: if you like it!

Yesterday, i deployed this bot on Amazon Ec2, you can see the latest comments generated by this bot [if you take a look at my latest activity on twitter](https://twitter.com/search?q=sojin%20samuel&src=recent_search_click&f=live)
Help Me With Ubuntu Terminal...
Tags: truffle, ubuntu, windowsterminal, blockchain
Published: 2023-01-08 06:12:03

Hi Guys, I need help with this.

So I am learning blockchain development by myself,
I am following a video tutorial about creating an ethereum wallet.
In this video tutorial the application which I used is windows terminal, running ubuntu and using truffle framework.
In the middle of the video, the instructor suddenly opens a tab on the left side (as you can see from the photo below), without giving any explanation about how to open the tab. I heard him pressing his keyboard and suddenly the tab on the left just popped up in a split second. So, I was assuming that he was using the shortcut key to open that tab. And also I already search on Windows Terminal settings and I can't find the shortcut key he used to open the tab, even more I tried it one by one, I mean all of the shortcut keys that I can find in Windows Terminal Settings. And I already googled about it and I can't find any answers related to it.

I know this is a silly thing, because I understand it just a basic thing in how to operate windows terminal. But since, I am self-learning about Blockchain development and I am just following the tutorial video. So, I am stuck in this step. 

I really need to know, How to open this tab, it would be a major help to me if you guys can tell me how to open the tab, Thanks in advance.

Note:
Video Tutorial source: Eat The Blocks, 6-Figures Blockchain Developer
Instructor: Julien Klepatch
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l6foe08cypcwrl1tb2xg.png)
Intro to Big O Notation
Published: 2023-01-10 14:57:57

If you've worked on algorithm problems, then you've probably heard of Big O. It looks pretty intimidating and hard at first glance. Many sources have told me I don't really need to know it as a jr. dev, others have told be me that understanding it will make be a better dev. I've listened to the latter.

Big O notation is used to describe the performance of an algorithm. It is used to describe time and space it takes for the algorithm to execute. It takes into account the worst case scenario and best case. 

N is the variable that represents the size of the input data.


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

O(1) describes as algorithm that will always take the same about of time to do such and console.log(x) or array[0]. The run time is constant and with never change because it will always take the same amount of time to puts or print that information.

As I practice this more, I will make more post about this and continue down this hole.
Install Docker on Ubuntu 22.04
Published: 2023-01-10 13:33:05

Docker is a software platform that simplifies the process of building, running, managing and distributing applications. It does this by virtualizing the operating system of the computer on which it is installed and running.

**Prerequisites:**
_Ubuntu 20.04 or higher
A non-root user with sudo privileges_

**Step 1: Update package list**
_The first step is to update the package list on the Ubuntu machine. This is done by running the following command in the terminal:_
$ sudo apt update

**Step 2: Install packages to allow apt to use a repository over HTTPS**
_Next, we will install the necessary packages to allow apt to use a repository over HTTPS:_
$ sudo apt install apt-transport-https ca-certificates curl software-properties-common

**Step 3: Add Docker's official GPG key**
_To add Docker's official GPG key, run the following command in the terminal:_
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg

**Step 4: Add the stable Docker repository to the system**
_To add the stable Docker repository to the system, run the following command:_
$ echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

**Step 5: Update package list again and install Docker CE**
$ sudo apt update
$ apt-cache policy docker-ce

**Step 6: Finally install Docker**
$ sudo apt install docker-ce
Hands on Machine Learning with Python
Tags: machinelearning, python, beginners, tutorial
Published: 2023-01-10 14:31:27

Machine learning is a method of teaching computers to learn from data, without being explicitly programmed. It is a subfield of artificial intelligence (AI) and involves training a computer to make predictions or take actions based on data. Python is a popular programming language for machine learning because it has a large ecosystem of powerful libraries and frameworks.

Here are some of the most popular libraries and frameworks for machine learning in Python:

**Scikit-learn**: Scikit-learn is a simple and efficient library for machine learning in Python. It provides a wide range of tools for regression, classification, clustering, and model selection. It also includes a large number of sample datasets, which you can use to practice machine learning algorithms.

**TensorFlow**: TensorFlow is an open-source library for machine learning developed by Google. It is mostly used for building and deploying large-scale machine learning models. It provides a flexible and powerful framework for building, training, and deploying machine learning models.

**Keras**: Keras is a user-friendly deep learning library that runs on top of TensorFlow. It is designed to make building and training neural networks as simple and easy as possible.

**PyTorch**: Pytorch is an open-source machine learning library developed by Facebook's AI Research lab. It is a dynamic computation graph framework, similar to TensorFlow, but Pytorch allows to change the graph on the fly with a more pythonic feel, making it more user-friendly and efficient for research and development.

Here's a simple example of how to use scikit-learn to build a simple linear regression model:

```python
from sklearn.linear_model import LinearRegression
from sklearn.datasets import load_boston

# Load the Boston housing dataset

boston_dataset = load_boston()

# Define the independent variable (x) and the dependent variable (y)

x = boston_dataset.data
y = boston_dataset.target

# Create a LinearRegression object

regression = LinearRegression()

# Fit the linear regression model to the data

regression.fit(x, y)

# Print the coefficients of the model

print(regression.coef_)
```

This example loads the Boston housing dataset, which contains information about the median value of owner-occupied homes in various neighborhoods in Boston, and uses it to train a linear regression model. The independent variable (x) in this example is a set of features of the homes, such as the number of rooms, the age of the homes, and the per-capita crime rate. The dependent variable (y) is the median value of the homes.

Once you have your model, you can use it to make predictions on new data.

```python
# Predict the median value of a home with 2 rooms and a crime rate of 0.1

prediction = regression.predict([[2, 0.1]])
print(prediction)
```

You can also use those frameworks to build more complex models, like neural networks or decision trees and many more. Please let me know if you have any specific question and if you want me to guide you through a certain specific problem or model.
vMix Live Streaming 25.0 License Key [2023]
Published: 2023-01-10 14:16:24

vMix is live streaming and production software that allows you to create professional quality productions on your own computer. vMix gives you the power to add multiple cameras, videos, NDI sources, remote guests using vMix Call, images, audio, web streams, Powerpoint, titles, virtual sets, chroma key, and much more to your production. You are then able to display, record and live stream your production all at the same time!

1. How to Crack or Activate?
2. First, download the Program from here
3. Extract it and run
4. After that press to install it
5. When the installation is finished
6. Press to Active button
7. Wait for the Cracking process
8.Used the license key from [here](https://techzpad.com/vmix-license-key)
9. After a few seconds, you’ll see a message process complete
10. Done!
Is reading books worth it as a web developer?
Published: 2023-01-10 13:50:12

You could be considering whether reading books is worthwhile as a web developer. In the world of web development, there is a lot to stay on top of, and finding time to read books while you're busy learning new technologies, coding, and debugging can be challenging. But here's why I think reading books can be an enormously useful tool for web developers:

First of all, reading books can you in your quest for a deeper comprehension of the ideas and theories underlying web development. While books can provide you a larger and more comprehensive view on the industry as a whole, online tutorials and documentation are helpful for learning how to use specific technologies. When you're attempting to understand more difficult subjects, they can also provide you more thorough explanations and examples, which can be useful.

You may stay current on the newest trends and technologies in web development by reading books, which is another benefit. Insights and knowledge that you might not find elsewhere can be found in books, which are frequently published by authorities in the field. The fact that books take time to produce and publish also means that they frequently contain subjects that are not yet well-known or broadly accepted, giving readers a sneak peek into the future.

You can improve your ability to think critically and solve problems by reading books. Online tutorials and manuals can give you detailed instructions on how to carry out particular activities, but they don't always give you the chance to critically consider the underlying problems. Books, on the other hand, frequently call for more active participation from the reader and can aid in the independent analysis and problem-solving skills development.

It goes without saying that there are other ways to learn, such as participating in code challenges, going to conferences, and speaking with other developers. Reading books isn't the only way to advance your abilities as a web developer. However, I think that reading books can be a useful tool for web developers and that by including them in your learning regimen, you may strengthen your critical thinking and problem-solving skills as well as obtain a deeper grasp of the industry.

The brief response to the question is, "Yes, reading books is worthwhile for web developers." You'll have the chance to pick the brains of professionals, get a broad perspective, adopt a fresh approach to problem-solving, and keep up with emerging technologies. Even if you might not have much time, you can always try to start with a few pages a day and see where it leads. 

However, it is important that you read the [top best web developments books in 2023](https://developerwings.com/top-best-web-development-books-to-read-in-2023/) to be updated with new technologies and methods.
#Rust 🦀 – Working with threads 🧵 and joining thread handles
Tags: englishpost, multithread, rust
Published: 2023-01-11 15:48:20

---
title: #Rust 🦀 – Working with threads 🧵 and joining thread handles
published: true
date: 2023-01-10 14:00:00 UTC
tags: EnglishPost,EnglishPost,MultiThread,Rust
canonical_url: 
---

Hi !

Let’s take a look at the following code.

- The main thread will run a loop for ~5 seconds, displaying a message every 1 second.
- The 2nd thread with display a message, wait 5 seconds and display a 2nd message.

{% gist https://gist.github.com/elbruno/5b116361ed0a9931b52ae59f678e2516 %}

The code output shows that the app is closed before finishing the execution of the 2nd thread.

![main thread will run and stop, even if the 2ndary thread is still running.](https://brunocapuano.files.wordpress.com/2023/01/image-19.png?w=666)

## Joining thread handles

When we work in multi-threading scenarios, the previous problem is solved joining threads (joining thread handles). We need to join the 2nd thread and the main thread.

In order to do this, we just assign the 2nd thread to a variable.

```

 let sec_thread = thread::spawn(|| { ...

```

And to join the handles we use the .join().unwrap() method.

Note: unwrap() will help us handle possible errors.

The full code looks like this.

{% gist https://gist.github.com/elbruno/a3fd9059a761cdbcae024d757fded40e %}

And we have the expected output.

![joining threads in Rust](https://brunocapuano.files.wordpress.com/2023/01/image-20.png?w=732)

In next posts, more about threads in Rust.
Happy coding!

Greetings

El Bruno

More posts in my blog [ElBruno.com](https://www.elbruno.com).
git inti
Published: 2023-01-10 13:55:38

primeiro post aqui na plataforma e basicamente to explorando, curto o visual e preciso criar o hábito de documentar as coisas que eu faço pra que eu lembre e relembre das coisas.

Aparentemente isso aqui funciona com markdown então posso deixar isso em **Negrito** e embedar código 

```bash
ls ~/Documents/*.pdf
```

já é o suficiente pra mim.