teleren/devto huggingface dataset:
C++ Operatorlar.
Tags: cpp, beginners, tutorial, programming
Published: 2023-03-01 06:24:24

Assalamu aleykum hurmatli dasturchi siz bilan `Operatorlar` xaqida gaplashib o'tamiz. Operatorlar o'zgaruvchilar va qiymatlar bo'yicha operatsiyalarni bajarish uchun ishlatiladi.

Quydagi misolda biz ikki qiymatni qo'shish uchun `+` **operatoridan** foydalanamiz.

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

int main()
{
int a = 100 + 50;
cout << a;

return 0;
}
```

`+` operator ko'pincha yuqoridagi misol kabi, birgalikda ikki qiymatlarni kiritish uchun ishlatiladi, u ham birga, bir o'zgarmaydigan va qiymat yoki o'zgaruvchilar va boshqa o'zgaruvchilar qo'shishingiz uchun foydalanish mumkin.

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

int main()
{
int n1 = 100 + 50;        // 150 (100 + 50)
int n2 = n1 + 250;      // 400 (150 + 250)
int n3 = n2 + n2;     // 800 (400 + 400)

cout << n3;

return 0;
}
```

C ++ operatorlarni quyidagi guruhlarga ajratadi:

`Arifmetik` operatorlar
`Tayinlash` operatorlari
`Taqqoslash` operatorlari
`Mantiqiy` operatorlar
`Bitwise` operatorlar

`Operator -o'zgaruvchilar va qiymatlar bo'yicha operatsiyalarni bajarish uchun ishlatiladi.`

**Arifmetik operatorlar**

`Umumiy matematik operatsiyalarni bajarish uchun arifmetik operatorlar qo'llaniladi.`


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

**Tayinlash Operatorlari**

Belgilash operatorlari o'zgaruvchiga qiymatlarni belgilash uchun ishlatiladi. Quyidagi misol, biz foydalanish tayinlash operatori ( `=` qiymati tayinlash uchun) `10` a o'zgaruvchi deb nomlangan uchun `x` :

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

int main()
{

int x = 10;
cout << x;

return 0;
}
```


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

**Taqqoslash operatorlari**

Ikki qiymatni taqqoslash uchun taqqoslash operatorlari ishlatiladi.

`**Izoh:** taqqoslashning qaytarilish qiymati to'g'ri ( 1) yoki noto'g'ri ( 0).`

Barcha taqqoslash operatorlari ro'yxati:


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

**Mantiqiy operatorlar**

O'zgaruvchilar yoki qiymatlar o'rtasidagi mantiqni aniqlash uchun mantiqiy operatorlar qo'llaniladi:


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gd8w616eeq1h350vcupp.png)
Differences Between Component and Module in Angular
Tags: angular, javascript, mvc, diffreen
Published: 2023-03-01 06:20:30

## Components

Components control views (html). They also communicate with other components and services to bring functionality to your app.

Component contains :

HTML template or HTML code
Code(TypeScript)
Service: It is a reusable code that is shared by the Components so that rewriting of code is not required
Pipe: It takes in data as input and transforms it to the desired output
Components
You can create the component with following command

ng generate component product
So, when you create a component (for example product), it will create four files

```
product.component.css
product.component.html
product.component.spec.ts
product.component.ts
```

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


In the context of AngularJS and modern web development, a component is a self-contained and reusable building block for building a web application. It is a part of the user interface (UI) that encapsulates the data, behavior, and presentation logic of a specific feature or functionality. Components can be used to create reusable UI elements such as buttons, forms, and dialogs, as well as larger UI sections such as a product catalog, a dashboard, or a search interface.

In AngularJS, a component is defined using the @Component decorator, which allows developers to specify the component's metadata, such as its selector, template, styles, and providers. The component class contains the component's behavior and data, and it can interact with other components and services through dependency injection.

Components promote modularity and code reusability, making it easier to maintain and scale complex web applications. They can be nested and composed together to create more complex UIs, and they can be easily tested in isolation using unit tests. Overall, components are an essential concept in modern web development and are used by many popular front-end frameworks and libraries, including Angular, React, and Vue.js.


## Module
Module is like a big container containing one or many small containers called Component, Service, Pipe. Modules consist of one or more components. They do not control any html. Your modules declare which components can be used by components belonging to other modules, which classes will be injected by the dependency injector and which component gets bootstrapped. Modules allow you to manage your components to bring modularity to your app.

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

Modules
You can create the module with following command

ng g module products --routing
So, when you create a module(for example product), it will create one files
```
product.module.ts
```
Best Python Open Source Projects - On The Rise
Tags: python, opensource, github, startup
Published: 2023-03-01 06:16:20

Here are some of the most promising open-source companies with a large fraction of their codebase in Python. Feel free to give all of them a star and check out the work.


Lotus: Pricing and Billing Engine For All Pricing Models. New Age Zuora alternative.

https://github.com/uselotus/lotus


Mage: Build, Run, and Manage Data Piplines. A Modern Airflow replacement

https://github.com/mage-ai/mage-ai

Posthog: Entire Product OS Suite. Analytics, Session Recording, Feature Flagging etc.

https://github.com/PostHog/posthog

Pynecone: Build Web Apps All In Python!

https://github.com/pynecone-io/pynecone

OpenBB: Bloomberg Terminal Alternative

https://github.com/OpenBB-finance/OpenBBTerminal
7 Principles in Software Testing You Should Know. ( Explained)
Tags: webdev, beginners, programming, tutorial
Published: 2023-03-01 06:14:42

Become a Automation Rockstar : https://thetestingacademy.com

{% embed https://youtu.be/NWlFl4XtrUc %}

In this tutorial, we are discussing 7 important software testing principle that you should know as QA. These principles provide  us clear view about the Software testing life cycle. 

Software Testing is process of executing a program with the aim to find errors or bug.


Join Facebook Group :  http://bit.ly/learntesting2019

Website:   https://scrolltest.com

Website:   https://thetestingacademy.com

Twitter: https://twitter.com/itstechmode


#automationtesting #manualtesting #testautomation #thetestingacademy #scrolltest
🚀 Tools and services I recommend:
Some of the courses that I recommend to become better Automation Tester 🙌🙌

✅Selenium Training and Certification -
https://scrolltest.com/go/edureka


✅Learn Jenkins for QA -
https://bit.ly/learnjenkins-p1


✅Programming Java -
https://bit.ly/learnjava2020-p1


✅Test Automation - 
https://bit.ly/learnautomation2020


✅API Testing - 
https://www.learnapitesting.com


✅Cypress Tutorial with LIVE Projects -
http://cypresstutorial.com
Basic terminal command you should know ( macOS )
Tags: beginners, terminal, tutorial, macos
Published: 2023-03-01 06:12:50

GUI is a graphical operating system interface that uses icons and menus. Using GUI essentially is a good way to operate a computer. However, have you tried CLI? 

CLI is a Command line interface. So basically, we interact with a computer using the Terminal. 

### Why and when do we use it? 

I don’t really know when we need to use it. However, from my experience using Terminal Commands boosts productivity in some cases.

### Terminal commands

Here are some basic terminal commands, you can try safely on your computer.


> For safety reasons, I recommend you try using a dummy-files, In case we wouldn't know what happens next.


<br>


1. `fwd`
Find out the location that you currently access on the terminal.

2. `ls`
List files and folders on the location that you currently access on a terminal.

3. `cd`
 Change directory, to move to another directory, `cd Desktop` will allow you to move to the Desktop folder.

4. `cd ..`
to move to the previous directory that you have accessed before.

5. `mkdir`
Create a new directory using the terminal, `mkdir my-project` will create a new folder name **my-project**.

6. `touch`
Create a new file using the terminal, `touch new-file.txt`  will create a new folder name **new-file.txt**.

7. `rm`
Remove, to remove a file on the directory, `rm useless-file.txt` will remove a file name **useless-file.txt**. We recommend you add `-i` after `rm` for the safety reason `rm -i useless-file.txt`. Because the file that you delete will not appear in the BIN folder.

8. `rm -r`
to remove a directory, `rm -r my-photos` will remove a file name **my-photos**. Again, we recommend you add `-i` for the safety reason `rm -r -i my-photos`.

<br>

That is, let me know in the comment which your favorites command. 

Sources:

Cover Post [Unsplash](https://unsplash.com/photos/mP7aPSUm7aE)
Building a Scalable Microservices Architecture: Best Practices and Implementation Tips
Tags: webdev, microservices
Published: 2023-03-01 05:41:44

Microservices architecture has been gaining popularity among developers as an effective way to build scalable, modular, and highly available applications. By breaking down large, monolithic applications into smaller, independent services, microservices architecture allows for greater flexibility, easier maintenance, and faster deployment. In this article, we'll explore best practices for building a scalable microservices architecture and provide implementation tips to help you get started.

## Use the right technology stack

Choosing the right technology stack is critical to the success of your microservices architecture. Consider factors such as scalability, reliability, ease of use, and developer community support. Popular technology stacks for microservices include Docker, Kubernetes, and Apache Kafka.

## Design for scalability and resiliency

Scalability and resiliency are key characteristics of a successful microservices architecture. Design your services to be highly available and fault-tolerant, with redundancy and load balancing built in. Use tools such as auto-scaling and health checks to ensure that your services can handle increased traffic and workload.

## Implement a robust testing and deployment process

Testing and deployment are critical components of any software development process, but they are even more important in a microservices architecture. Use continuous integration and deployment (CI/CD) tools to automate your testing and deployment processes. This will help you catch bugs and issues early, and ensure that your services are always up-to-date and running smoothly.

## Ensure proper security and monitoring

Security is paramount in any software architecture, and microservices architecture is no exception. Implement proper access control and authentication mechanisms to ensure that your services are secure. Use monitoring and logging tools to track performance and identify issues in real-time.

By following these best practices and implementation tips, you can build a scalable microservices architecture that is flexible, reliable, and efficient. Remember to keep your architecture modular and adaptable, and to prioritize testing, monitoring, and security at every step of the way.
Django Documentation
Tags: webdev, django, beginners
Published: 2023-03-01 05:39:19

Django is a popular web framework for building web applications using Python. The official documentation of Django is a comprehensive guide that covers all aspects of the framework. This book overview will provide an overview of the Django documentation.

The documentation is divided into several parts, each covering a specific area of Django. The first part is an introduction that provides an overview of Django and its key features. It explains how Django helps in building web applications and the various components of the framework.

The second part of the documentation covers the basics of using Django. It starts with installing Django and creating a new project. It then covers the key concepts of Django, including models, views, and templates. This section provides detailed explanations and examples of how to use these concepts to build a web application.

The third part of the documentation covers more advanced topics, such as working with databases, forms, and authentication. It also includes sections on managing static files, handling errors, and deploying Django applications.

The fourth part of the documentation covers the various components of Django, including the built-in admin site, the ORM, and the testing framework. This section provides detailed explanations and examples of how to use these components to build more complex web applications.

The fifth part of the documentation covers best practices for developing Django applications, including tips on optimizing performance, security, and scalability. It also includes information on how to write reusable code and how to contribute to the Django project.

Overall, the Django documentation is an excellent resource for anyone interested in learning how to build web applications using the Django framework. It provides a comprehensive guide to all aspects of Django and is suitable for beginners as well as experienced developers. The documentation is well-organized, easy to read, and contains plenty of examples and code snippets to help readers understand the concepts.

You can find the official Django documentation at https://docs.djangoproject.com

Follow me on github for more amazing projects:
https://github.com/kibetamos
Save Yourself From Data Loss 😱 ️
Tags: beginners, cloud, webdev, programming
Published: 2023-03-01 03:17:32

---
title: Save Yourself From Data Loss 😱❗️
published: true
description: The Power Of Blob Storages
tags: beginners, cloud, webdev, programming
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
# published_at: 2023-03-01 03:13 +0000
---


![Image Data replication across different regions and zones](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zvwv2juo04tmoqr0hjbq.png)

So, what is blob storage ?

It is slightly different from storing a file on your computer.

In fact, it’s a distributed system.

What that means is that it’s a system that was engineered for availability, reliability, disaster recovery and ease of use.

Just like a car or airplane or any other mission critical systems.

A key feature is this disaster recovery capability which provides backups for the files that you store in the blob storage.

**How Does It work ?**

When you upload a file to a blob storage, you have an option to specify data redundancy or replication across zones (This will depend on the cloud provider).

What that means is that the cloud vendor is going to take that file you’ve uploaded and make copies of it then put it in their data centers around the world.

So, whenever a disaster strikes in one region, only one data center is affected. 

That means only one copy of your data is affected.

While all the other copies in other data centers are not impacted.

This reduces the risk of data loss drastically.

And that’s the power of blob storages.

In fact, this one feature is probably one of the biggest blocks in many of the commonly used services to provide disaster recovery for other storages and databases.

Because who wants to lose critical data or files ?

**𝗪𝗵𝗮𝘁 𝗮𝗿𝗲 𝘁𝗵𝗲 𝗰𝗼𝗺𝗺𝗼𝗻 𝘀𝗲𝗿𝘃𝗶𝗰𝗲𝘀 ?**

- Amazon S3  

- Google Cloud storage   

- Azure Blob storage   

> 💡 Note: The pricing and capabilities will be slightly different but the overall offerings should be relatively similar

And that’s it!

If you didn’t know this was possible... well, now you know!

Did you find this post helpful ?

Then consider sharing it with someone you know!
DevOps Training in Chennai
Published: 2023-03-01 05:09:08

Learn DevOps fundamentals and get hands-on experience with the DevOps tools used by leading companies. Get certified in[ DevOps training in Chennai](https://www.slainstitute.com/devops-training-in-chennai) at Slainstitute Cloud Experts. Get trained by experienced professionals and master the skills you need to succeed in the industry.
DevOps Components: Build, Code, Test, Plan, Monitor, Deploy, Operate, Release
Tags: webdev, devops, programming, python
Published: 2023-03-01 04:11:38




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




**Build:** This component involves managing resources and capacity to support the build process of the software application. DevOps enables resource sharing and cloud usage to optimize the use of resources and minimize wastage.

**Code:** This component involves organizing and reusing code to improve efficiency and maintainability. DevOps promotes good code management practices to ensure that code is well-organized, modular, and easy to maintain.

**Test:** This component involves testing the application to ensure that it is ready for production. DevOps automates testing to speed up the testing process and eliminate the need for manual labor.

**Plan:** This component involves planning the development process using Agile methodologies. DevOps fosters collaboration between development and operations teams to create an organized work plan that improves productivity.

**Monitor:** This component involves monitoring the application to detect failures and maintain its health. DevOps uses various monitoring tools, such as Splunk, to collect and analyze data to gain insights into application performance.

**Deploy:** This component involves deploying the application to the production environment. DevOps uses cloud management solutions and scheduling tools to optimize deployment processes.

**Operate:** This component involves operating the application and managing its lifecycle. DevOps involves both development and operations teams in all phases of the service lifecycle to create a management program that satisfies both IT and business operations.

**Release:** This component involves releasing new updates or features to the production environment. DevOps uses various release management techniques, such as manual deployment, to minimize the impact on customers and ensure a smooth release process.

**Okay, that’s it for this article.**
Also, if you have any questions about this or anything else, please feel free to let me know in a comment below or on [Instagram](https://www.instagram.com/_abhixsh/) , [Facebook](https://www.facebook.com/abhi.haththakage/) or [Twitter](https://twitter.com/abhixsh).

Thank you for reading this article, and see you soon in the next one! ❤️
The paths and operations of your API in the OpenAPI specification.
Tags: api
Published: 2023-03-01 04:00:46

## Introduction

Paths and operations are the building blocks of an API. Paths represent the URL endpoints of the API, while operations represent the HTTP methods (such as GET, POST, PUT, and DELETE) that are supported by those endpoints. In the OpenAPI specification, you can define paths and operations using the paths object.

## Defining Paths

To define a path, you need to specify the path as a string and then list the operations that are supported by that path. For example, let's say you have an API that allows users to retrieve a list of products. You can define the path for this API as follows:

```csharp
"/products":
  get:
    ...
```

## Defining Operations

To define an operation, specify the HTTP method supported by the API endpoint. You can use any of the following HTTP methods in the OpenAPI specification:

- GET
- POST
- PUT
- DELETE
- PATCH
- HEAD
- OPTIONS

For example, let's say you want to define an operation that allows users to retrieve a single product. You can specify this operation as follows:

```csharp
"/products/{productId}":
  get:
    ...
```

In this example, we have used the **'get'** method to define the operation for retrieving a single product. We have also included a path parameter **'{productId}'** that represents the unique identifier for the product.

## Adding Details to Operations

Once you have defined the paths and operations of your API, you can add additional details to describe the API operation. For example, you can specify the parameters the API operation requires, the expected responses, and any security requirements.

Here's an example of how to add details to an operation:

```csharp
"/products/{productId}":
  get:
    summary: Retrieve a product by ID
    parameters:
      - name: productId
        in: path
        description: ID of the product to retrieve
        required: true
        schema:
          type: integer
          format: int64
    responses:
      '200':
        description: OK
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Product'
      '404':
        description: Not Found
    security:
      - api_key: []

```

In this example, we have added a **'summary'** field to describe what the API operation does. We have also defined a **'parameter'** for the **'productId'** path parameter, specifying that it is required and should be an integer. We have also described the expected **'responses'**, including a 200 OK response and a 404 Not Found response. Finally, we have specified that the API operation requires an API key for authentication.

## Conclusion

Defining the paths and operations of your API is an essential part of the API development process. In the OpenAPI specification, you can specify paths and operations using the **'paths'** object, and add additional details to describe the API operation. With this guide, you should be able to start defining the paths and operations of your API in the OpenAPI specification.
912. Leetcode Solution in cpp
Tags: cpp
Published: 2023-03-01 03:57:11

===========================================================
#Description:
Given an array of integers nums, sort the array in ascending order and return it.

You must solve the problem without using any built-in functions in O(nlog(n)) time complexity and with the smallest space complexity possible.

 

Example 1:

Input: nums = [5,2,3,1]
Output: [1,2,3,5]
Explanation: After sorting the array, the positions of some numbers are not changed (for example, 2 and 3), while the positions of other numbers are changed (for example, 1 and 5).
Example 2:

Input: nums = [5,1,1,2,0,0]
Output: [0,0,1,1,2,5]
Explanation: Note that the values of nums are not necessairly unique.
 

Constraints:

1 <= nums.length <= 5 * 104
-5 * 104 <= nums[i] <= 5 * 104

===========================================================
#Solution:
```cpp
class Solution {
 public:
  vector<int> sortArray(vector<int>& nums) {
    mergeSort(nums, 0, nums.size() - 1);
    return nums;
  }

 private:
  void mergeSort(vector<int>& A, int l, int r) {
    if (l >= r)
      return;

    const int m = (l + r) / 2;
    mergeSort(A, l, m);
    mergeSort(A, m + 1, r);
    merge(A, l, m, r);
  }

  void merge(vector<int>& A, int l, int m, int r) {
    vector<int> sorted(r - l + 1);
    int k = 0;      // sorted's index
    int i = l;      // left's index
    int j = m + 1;  // right's index

    while (i <= m && j <= r)
      if (A[i] < A[j])
        sorted[k++] = A[i++];
      else
        sorted[k++] = A[j++];

    // put possible remaining left part to the sorted array
    while (i <= m)
      sorted[k++] = A[i++];

    // put possible remaining right part to the sorted array
    while (j <= r)
      sorted[k++] = A[j++];

    copy(begin(sorted), end(sorted), begin(A) + l);
  }
};

```
#leetcode
#challenge
Here is the link for the problem:
https://leetcode.com/problems/sort-an-array/