teleren/devto huggingface dataset:
C++ O`rganamiz 1-dars
Tags: programming, tutorial, dawroun
Published: 2023-01-20 10:50:51



## Salom xozir biz c++ da birinchi darsni o`tamiz.
Men https://replit.com/ dan foydalanaman manashu sayt orqali online kod yozishimiz mumkun. Saytga regestratsiya qilib kirganingizda 2 ta oyna ko`rinadi.

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

Bu 1-chi oynada kod yozamiz, ikkinchisida natijasini ko`rishimiz 
mumkun uni nomi **Concole**.

> **Iostream**
Birinchi bo`lib _Iostream_ kutubxonasini chaqiramiz,  biz ishlatadigan komandalarni shu kutubxonadan olamiz uni chaqirish uchun 

```
#include <iostream>
```
yozamiz.
Kutubxonani chaqirganimizdan song 

```
int main() {
```
Yozishimiz mumkun **main** funksiyasi eng asosiylardan biri hisoblanadi agar u notogri yozilsa, yoki umuman yozilmasa bizning kodimiz Console oynachasiga chiqmaydi va hatolik bo'ladi **main** dan keyin qovuscha turibdi siz o'sha qovus ichida siz o'z kodingizni yozasiz.

```cpp
#include <iostream>
using namespace std; 

int main() {
cout << "Salom dunyo";
}
```

**Int** funksiyasi haqida keyinroq tanishamiz.
Endi std cout funksiyasi bilan tanishamiz, kod yozishingizdan avval xar doim shu komandani yozishingiz kerak cout komandasi sizning kodingizni Console ga olib chiqadi **cout** ning manosi 
 _o'z ichiga olish_,  cout dan keyin **<<** qo'yiladi biz uni tingting deb ataymiz va bu belgi keyingi fikr kiritish mumkin degan bo'ladi, xar doim **std** yozmaslikni yo'li bor


```
#include <iostream>
using namespace std; 

```
Agar shunday yozib qo'ysangiz siz std ni yozmasangiz bo'ladi 
Siz o'z matningizni qo'shtirnoq ichiga olishingiz kerak->"

bizda yana 2 ta funksiya bor **\n** va **endl** ular bir qator tashlaydilar ikkisi xam bir xil vazifani bajaradi lekin \n "" ichida yoziladi endl esa "" tashqarisida 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xt4066qn2s6dwdzrtj8l.png)
ko'rib turganingizdek biz bularni ishlatshimiz mumkin. 
Yana bitta qoyda xar doim matn oxirida "" tashqarisida  ; qo'yishigiz shart agar qo'yilmasa xatolik hisoblanadi 
kodning oxirida **return 0;** komandasini qo'ying uning vazifasi kodni toxtatish kod return 0; ga yetib borsa to'xtaydi.

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




> Etiboringiz uchun raxmat 
@dawro
Code cleanliness zero to Hero!
Published: 2023-01-20 10:36:50

Code cleanliness is an important aspect of software development, as it helps to improve the maintainability, readability, and overall quality of your code. Here are some advanced tips on how to keep your code clean:

**Use a consistent code style:**

Consistency is key when it comes to code cleanliness. By using a consistent code style, you can make your code more readable and easier to understand. This can be achieved by using a code formatter, or by following a specific style guide.

**Follow the DRY principle:**

The DRY principle (Don't Repeat Yourself) is a fundamental principle of software development. It states that you should avoid repeating the same code in multiple places. Instead, you should extract common functionality into reusable functions or modules.

**Use meaningful and descriptive variable and function names:**

Using meaningful and descriptive names for variables and functions can greatly improve the readability of your code. Avoid using single letter variable names or using names that are not relevant to the purpose of the variable or function.

**Use comments and documentation:**

Comments and documentation can be very helpful in making your code more readable. They can provide context and explain the purpose and functionality of specific parts of your code.

**Refactor your code**:

Refactoring is the process of rewriting and reorganizing your code in order to make it more readable, maintainable, and efficient. This can include things like renaming variables, breaking down functions into smaller, more focused functions, and reorganizing your code into logical modules.

**Use version control:**

Using version control software like git can help you to keep track of changes to your code over time. It allows you to easily revert to previous versions of your code, and collaborate with other developers on a project.

**Test your code:**

Writing automated tests for your code can help to ensure that it is working correctly and that any changes you make in the future do not break existing functionality.

By following these advanced tips, you can improve the cleanliness of your code and make it more readable, maintainable, and efficient. 


**Remember** that code cleanliness is an ongoing process, and that it is important to continue to review and improve your code over time.

Happy coding to you Hero!
Lesson 2 - C++ Comments, Variables
Tags: beginners, programming, tutorial
Published: 2023-01-20 10:29:39

In this lesson, we learned about the various variables and comment techniques.

Comments can be used to explain and improve the readability of C++ code. It can also be used to prevent execution when trying out various code. Commentaries can be single- or multi-lined.

**Single-line Comments**

Single-line comments start with two forward slashes **(//)**.

Any text between **//** and the end of the line is ignored by the compiler (will not be executed).

In this example, a single-line comment is used before a line of code:

```
// This line is a comment
cout << "Hello World!";
```

C++ Multi-line Comments

Multi-line comments start with ** /*** and ends with ***/**

Any text between **/* and */** will be ignored by the compiler:

```
/* The code below will print the words Hello World!
to the screen */
cout << "Hello World!";

```

**Variables**

We learned that variables are containers for storing data values.

In C++, there are different types of variables and learned some of them.

**int** - stores integers (whole numbers), without decimals, such as 123 or -123; 4 byte

**float**- stores floating point numbers, with decimals, such as 19.99 or -19.99; 4 byte

**char** - stores single characters, such as 'a' or 'B'. Char values are surrounded by single quotes;4 byte

**string** - stores text, such as "Hello World". String values are surrounded by double quotes; 4 byte

To create a variable, specify the type and assign it a value:

Data_type name = value; or type variableName = value;

Where type is one of C++ types (such as int), and variableName is the name of the variable (such as myName, Age). The equal sign is used to assign values to the variable.

Example:

We can create a variable called myAge of type int and assign it the value 23:

```
int myAge = 23;
cout << myAge;
```

We can also declare a variable without assigning the value, and assign the value later:

```
int myAge;
myAge = 23;
cout << myAge;
```
We learned that if we give an existing variable a new value, the old value will be replaced:

int myAge = 23;  // myAge is 23
myAge = 30;  // Now myAge is 30
cout << myAge;  // Outputs 30

**Display Variables**

The cout object is used together with the << operator to display variables.

We should use the operator to divide text and a variable before combining them:

int myAge = 23;
cout << "I am " << myAge << " years old.";

**Add Variables Together**

To add a variable to another variable, you can use the + operator:

```
int x = 5;
int y = 6;
int sum = x + y;
cout << sum;
```



@dawroun
This Week In Python
Tags: python, discuss, thisweekinpython
Published: 2023-01-20 10:28:46


**Fri, January 20, 2023**


This Week in Python is a concise reading list about what happened in the past week in the Python universe. 

**I have received some good suggestions for this week's content. Thank you.**

**Did I miss anything from the Python universe this week? What did you read or tried out?**


## Python Articles


- [How to improve Python packaging](https://chriswarrick.com/blog/2023/01/15/how-to-improve-python-packaging/)
- [Why TensorFlow for Python is dying a slow death](https://thenextweb.com/news/why-tensorflow-for-python-is-dying-a-slow-death)
- [Build a GitHub support bot with GPT3, LangChain, and Python](https://dagster.io/blog/chatgpt-langchain)
- [Getting Started With Property-Based Testing in Python With Hypothesis and Pytest](https://semaphoreci.com/blog/property-based-testing-python-hypothesis-pytest)
- [Automating an SSH session with Python](https://cgamesplay.com/post/2023/01/18/automating-an-ssh-session-with-python/)


## Projects


- [beetrace](https://github.com/furkanonder/beetrace) – Trace your python process line by line with low overhead 
- [pdm](https://github.com/pdm-project/pdm) – A modern Python package and dependency manager
- [pawk](https://github.com/alecthomas/pawk) – A Python line processor (like AWK) 
- [PyChatGPT](https://github.com/rawandahmad698/PyChatGPT) – Python client for the unofficial ChatGPT API
- [nanoGPT](https://github.com/karpathy/nanoGPT) – training/finetuning medium-sized GPTs

**Did I miss anything from the Python universe this week? What did you read or tried out?**
Why use Jetpack Compose?
Tags: jetpack, kotlin, kmm, kotlinmultiplatform
Published: 2023-01-20 10:27:34

Here are a few points that explain why [Jetpack Compose](https://developer.android.com/jetpack/compose/why-adopt) may be better than XML for building Android user interfaces:

    Jetpack Compose is based on the Kotlin programming language, which is more concise and expressive than XML. This can make it easier and faster for developers to build and modify UI elements.
Keeping the Wolves Out of WolfSSL – Fuzzing Weekly CW3
Tags: security, testing, fuzzin, opensource
Published: 2023-01-20 10:22:07

Vulnerabilities in cryptographic libraries found through modern fuzzing:
https://www.helpnetsecurity.com/2023/01/13/fuzzing-cryptographic-libraries/

Keeping The Wolves Out Of WolfSSL: https://blog.trailofbits.com/2023/01/12/wolfssl-vulnerabilities-tlspuffin-fuzzing-ssh/

From Error_Log File(P4) To Company Account Takeover(P1) and Unauthorized Actions on API: https://medium.com/@mohanad.hussam23/from-error-log-file-p4-to-company-account-takeover-p1-and-unauthorized-actions-on-api-35e45e43273a
Parlons un peu du WebRTC
Tags: javascript
Published: 2023-01-20 10:03:02

## Qu'est ce que c'est le WebRTC 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/obiej7pwdxhpvzv1foxx.jpeg)


Le web RTC est une Technologie de communication en temps réel pour le web.
Avec WebRTC, vous pouvez ajouter à votre application des fonctionnalités de communication en temps réel. Il accepte les données vidéo, vocales et génériques à envoyer entre pairs, ce qui permet aux développeurs de créer des solutions vocales et vidéo performantes. Cette technologie est disponible sur tous les navigateurs récents, ainsi que sur les clients natifs de toutes les grandes plates-formes. 

## Que peut faire WebRTC ?

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

**Il existe de nombreux cas d'utilisation de WebRTC, allant des applications Web de base utilisant la caméra ou le micro aux applications d'appel vidéo plus avancées. Nous avons rassemblé un certain nombre d'exemples de code pour vous aider à mieux comprendre le fonctionnement de la technologie et son utilisation _veuillez suivre la première réssource pour vous permettre de bien réaliser une application complète en utilisant cette téchnologie_**

## Processus de l'application

_Une application WebRTC passe généralement par un flux d'applications courant. Accédez aux appareils multimédias, ouvrez les connexions à vos pairs, découvrez vos pairs et lancez votre streaming. _


_Dans cette réssource vous trouverez comment réaliser clairement et totalement une application web rtc  (https://webrtc.org/getting-started/overview)_

## Quelques réssources importantes
[1.Developer.mozilla](https://developer.mozilla.org/fr/docs/Web/API/WebRTC_API)
[2.Webrtc](https://grafikart.fr/tutoriels/webrtc-864)
[3.Pratique](https://www.zdnet.fr/pratique/3-points-pour-comprendre-le-webrtc-39888057.htm)
Unlocking the Power of Language: The Importance of Syntax and Semantics
Tags: computerscience
Published: 2023-01-20 10:00:00

Have you ever wondered how computers are able to understand and process human language? The answer lies in the fields of syntax and semantics. Syntax deals with the structure and formation of language, while semantics deals with the meaning and interpretation of language. Together, these fields play a crucial role in allowing computers to understand and communicate with humans.

---

## Why is this important?

Understanding syntax and semantics is crucial for the development of natural language processing (NLP) and machine learning algorithms. These technologies are used in a wide range of applications, including speech recognition, language translation, and text generation. Without a deep understanding of syntax and semantics, these technologies would not be able to accurately interpret and respond to human language.

## How does this affect other computer science fields?

Syntax and semantics are also important in other computer science fields such as artificial intelligence and computer linguistics. In artificial intelligence, understanding the structure and meaning of language is essential for the development of intelligent agents that can interact with humans. In computer linguistics, researchers study the structure and meaning of language to better understand how humans process and use language.

## What is it?

Syntax refers to the set of rules that govern the structure of language. This includes the arrangement of words, phrases, and clauses to create coherent sentences. For example, in the sentence "The cat sat on the mat," the subject is "the cat," the verb is "sat," and the object is "on the mat." By following the rules of syntax, we can understand the meaning of the sentence.

Semantics, on the other hand, deals with the meaning of words, phrases, and sentences. This includes understanding the relationships between words and the context in which they are used. For example, the sentence "The cat sat on the mat" has a different meaning depending on whether the cat is real or imaginary, or if the mat is a rug or a piece of paper.

---

In conclusion, syntax and semantics are essential fields in the study of language and its use in technology. They play a crucial role in allowing computers to understand and communicate with humans. A deep understanding of these fields is necessary for the development of natural language processing and machine learning algorithms that are used in a wide range of applications. These fields not only inspire and motivate, but also pave the way for more advanced human-computer interaction in the future.
How to make a line graph in google sheets?
Tags: googlesheet, linegraph
Published: 2023-01-20 09:59:28

To make a line graph in Google Sheets, follow these steps:

## Step 1: Enter the data
Enter your data in your sheets.
E.g 
![linegraph](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i4vky94fbyi1g2qyoike.png)

## Step 2: Select the data
The second step after the step 1 is to selecting the data.

![linegraph](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/393sjum213u76n9bpax7.png)

## Step 3: Click on Insert Chart
Click on "Insert Chart" at top toolbar.

![linegraph](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/doxdbbml4kb3g1mhs214.png)

## Step 4: Select the line chart.
Select the chart you want to create. 
![linegraph](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6qfnmy0i314sg7d71a9o.png)

## Step 5: Customize
Final step customize your chart such as Color, Point, Legend, Axis and Text.

![linegraph](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mx1i2z0gum80i2cv8qfc.png)

## Step 6: Download
First select your graph and click on three dots.
![linegraph](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vsg2vhryc4e9fodfg93m.png)

Finally download your graph as png, svg or pdf format.
![linegraph](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l36k8dalc1x5dpjed2ef.png)

OR 
You can try [line graph maker](https://linegraphmaker.co/) to create graph easily.
Job Queue using Bull
Published: 2023-01-20 09:47:26

**Introduction**

In this article, we will learn how to create a job queue using Bull and Redis in NodeJS. Job queues are used to handle long-running tasks or tasks that need to be executed at a later time. This allows your application to continue processing other requests while the job is being executed in the background.

**Prerequisites**

To follow along with this tutorial, you will need to have NodeJS and npm (Node Package Manager) installed on your machine. You will also need to have Redis installed and running on your machine.

**Installing Bull and Redis**

To install Bull and Redis, we will use npm. Open a terminal and run the following command:
 

```
npm install bull redis
```

**Creating a Job Queue**

To create a job queue, we first need to import the Bull module and create an instance of it. We will also import the Redis module and create a client to connect to our Redis server.
 

```

const Queue = require("bull");
const redis = require("redis");

const client = redis.createClient();
const queue = new Queue("myQueue", {redis: client});
```

**Adding Jobs to the Queue**

To add a job to the queue, we can use the add method. The add method takes two arguments: the data for the job and an options object.


```
queue.add({name: "John Doe"}, {attempts: 3});

```

**Processing Jobs**

To process the jobs in the queue, we can use the process method. The process method takes a callback function that will be called for each job in the queue.
 

```
queue.process(async (job) => {
  console.log(`Processing job: ${job.data.name}`);
});
```

**Conclusion**

In this article, we have learned how to create a job queue using Bull and Redis in NodeJS. Job queues are useful for handling long-running tasks or tasks that need to be executed at a later time. By using Bull and Redis, we can easily create a powerful and reliable job queue.
Display Text using color gradient in SwiftUI with examples
Tags: ios, swift, swiftui, mobile
Published: 2023-01-20 09:47:09

Take your SwiftUI design to the next level by implementing gradient text in text fields.

**Do you want to give your SwiftUI app a unique and dynamic look?**

Adding a touch of color and visual interest to your SwiftUI app can make your app stand out and more attractive.

One way to achieve this is by using **Color Gradients** which can add depth and dimension to the text by smoothly transitioning between multiple colors.

It can create a dynamic and eye-catching look that can make our app stand out from the crowd.

When it comes to creating visually appealing apps, Small details can make a big difference.

**Text** and **Gradients** are two **powerful design elements** that can be used together to create a cohesive and effective visual message.

In this article, I’ve tried to cover the use of gradients in SwiftUI to render text in **TextView** and also in **TextFieldView** by adjusting the gradient with different types.

We will explore 4 different types of gradients in this post.

1. Horizontal Gradient
2. Verticle Gradient
3. Angular Gradient
4. Radial Gradient

The main goal of this post is to give an idea about how can we add gradient text to the text editor or text field with SwiftUI, something like this...


![SwiftUI - Render text with Color Gradient](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x0i8n1bn9y7xz2dipv81.gif)

Ready to dive deeper into the implementation? Get the full picture on implementation by checking out [Canopas blog](https://blog.canopas.com/how-to-display-text-with-a-color-gradient-in-swiftui-e23c476eb24d).
The benefits and challenges of being a freelancing web developer
Tags: webdev, beginners, motivation
Published: 2023-01-20 09:39:57

## Benefits

I've been freelancing for one year now and I mainly use Fiverr to get gigs and clients to notice me. In this one year of freelance work on Fiverr, I've only acquired 10 clients. This may not be as many as some people promise, but the potential I've seen is immense. One of the main benefits of freelancing is the ability to work from home, on projects you want to work on, and manage your own time.

Recently, I landed a new client who accepted my offer of $30 per hour, which is twice the amount I earn at my current full-time job. With the right expertise and negotiation skills, you can earn significant amounts of money as a freelancer.

Another benefit I've noticed is the opportunity to learn about new technologies, especially if you are interested in them. For example, I am currently working on creating an add-in for Microsoft Outlook, something I never thought I would do.

## Challenges

The biggest challenge as a freelancer is acquiring new clients. Relying solely on one platform like Fiverr is not effective in this regard. You need to expand your reach everywhere and anywhere you can.

There are numerous freelancing platforms available, such as [Fiverr](https://Fiverr.com), [Upwork](https://upwork.com), and [Freelancer.com](https://www.freelancer.com/). However, it's important to note that it takes time and effort to acquire clients on these platforms. You need to have a good SEO strategy on Fiverr, for example, to get clients to notice you.

## Goals

My goal for 2023 is to expand my reach as a developer and acquire more clients to work with. This way, I can grow my knowledge about technology and potentially create my own company one day, to solve business problems and make people's lives easier. I'm not the type of person who wants to work for a large company like FAANG, I want to be my own boss and do what I want to do.
Built-in data types
Published: 2023-01-20 09:38:35

dasturlashga ma'lumot turi muhim tushunchadir
o'zgaruvchilar har xil turdagi ma'lumotlar saqlash mumkinva har xil turlar har xil ishlarni bajarishi mumkin

Python dasturlash tilida quyidagi ma'lumot turlari mavjud

                            Text type

1.1.Text type faqat yozuvlar uchun ishlatiladi. U string tipi deyiladi.

1.2.Misol:

x = "Hello World"

1.3.ekranga chiqarish - display x:
print(x)

1.4.ekranga qanday turdaligini chiqarish - display the data type of x:
print(type(x))

                            Umerix types

2.1.umerix turlari - integer, float va murakkab. umerix types - integer,float and complex. integer qisqasiga int bu butun sonlarga
ishlatiladi, float qisqarmasi yo'q, kasr sonlarga ishlatiladi, complex qisqarmasi yo'q, murrakab sonlarga ishlatiladi.

2.2.Misollar:

integer - int:x = 20 
float:x = 20.5 
complex:x = 1j 

2.3.ekranga chiqarish - display x:
print(x)

2.4.ekranga qanday turdaligini chiqarish - display the data type of x:
print(type(x))

                      Sequence types - Tartib turlari
3.1.Sequence types - list,tuple,range....

3.2.Misollar:
list:x = ["apple", "banana", "cherry"]

3.3.ekranga chiqarish - display x:
print(x[2])
        ↑ 
    "Bu Index deyiladi. U har doim o dan boshlanadi. Hozir 2 raqami bo'lsa "cherry" so'zi chiqadi."

3.4.ekranga qanday turdaligini chiqarish - display the data type of x:
print(type(x))

3.5.tuple:x = (11, 24, 56, 88, 78)

3.6.ekranga chiqarish - display x:
print(x[2:5])
                ↑ 
        "buning ma'nosi: 56 dan buyog'idagi sonlarni chiqarish"

3.7.ekranga qanday turdaligini chiqarish - display the data type of x:
print(type(x))

3.8.range:x = range(6)

3.9.ekranga qanday turdaligini chiqarish - display the data type of x:
print(x)

3.10.ekranga qanday turdaligini chiqarish - display the data type 
print(type(x))