teleren/devto huggingface dataset:
Simples POO em Java
Tags: java, poo, beginners, braziliandevs
Published: 2023-03-10 15:12:55

Programação Orientada a Objetos (POO) é um paradigma de programação que se baseia na ideia de que tudo no código é um objeto. Um objeto é uma entidade que tem um estado e um comportamento. No Java, por exemplo, um objeto é uma instância de uma classe.

Uma classe é como um modelo para um objeto, onde você pode definir seus atributos e métodos. Os atributos são as características do objeto e os métodos são as ações que o objeto pode executar.

Vamos ver um exemplo simples de uma classe em Java:

_Não esqueça de deixar seu like_ ❤️

![POO Exemplo 1](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xhftwpmxu13nrp1x157w.png)

Nesse exemplo, temos uma classe chamada Pessoa, que tem dois atributos, nome e idade, e um construtor que recebe esses dois atributos como parâmetros. Além disso, temos dois métodos getNome e getIdade, que retornam o nome e a idade da pessoa.

Agora, vamos ver como criar um objeto a partir dessa classe:


![POO Exemplo 2](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5xt7x56flthvicgvz1z0.png)

Nesse exemplo, criamos um objeto pessoa1 da classe Pessoa e passamos os valores "João" e 25 como parâmetros para o construtor.

Agora, podemos acessar os atributos e métodos do objeto pessoa1:


![POO Exemplo 3](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6zuo78av5zc8n10fut44.png)

Isso é apenas um exemplo simples, mas a POO em Java permite criar programas complexos e modulares, com vários objetos interagindo entre si. Por exemplo, imagine um sistema bancário com várias classes, como Conta, Cliente, Transação, etc. Cada uma dessas classes poderia ter seus próprios atributos e métodos, e interagir entre si para formar um sistema completo.    

_Agora vocês já está pronto para aprender sobre herança e classes abstratas_
[Clique aqui para aprender](https://dev.to/antoniorws/heranca-e-classes-abstratas-em-java-7l8)🚀

Repositório com a trilha de java: https://github.com/antoniorws/basic-java

Linkedin: https://www.linkedin.com/in/antonio-rodrigo-wanderley-serra/
GitHub: https://github.com/antoniorws
Best Programming Languages For Data Science
Tags: data, programming
Published: 2023-03-10 15:09:40

There are several programming languages used in data science, each with its own strengths and weaknesses. Here are some of the most popular ones:

**Python:** Python is the most widely used programming language in data science, and for good reason. It's easy to learn, has a large community of users, and has many libraries and frameworks for data analysis, such as NumPy, Pandas, and Scikit-learn.

**R:** R is another popular language for data science, especially for statistical analysis. It has a wide range of packages for data manipulation, visualization, and modeling, such as dplyr, ggplot2, and caret.

**SQL:** SQL is the standard language for managing relational databases, which are used to store and organize large amounts of data. It's an essential tool for data scientists who work with databases.

**Java: **Java is a general-purpose programming language that's used in many industries, including data science. It's especially useful for building large-scale, distributed data processing systems.

**Scala:** Scala is a programming language that runs on the Java Virtual Machine (JVM) and is designed for building scalable, distributed systems. It's often used in conjunction with Apache Spark, a popular big data processing framework.

Ultimately, the choice of programming language depends on the specific needs and preferences of the data scientist and the project at hand. For More Information you can visit:
**[<u>Online Data Science Classes in Pune</u>](https://bit.ly/3DQvEbR)**
C++ yangi qator
Published: 2023-03-10 15:02:52

salom  dasturchi hozir siz bilan yangi qator tashlashni korib chiqamiz . bunga \n va endl; kiradi misol uchun...

```
#include <iostream>
using namespace std;
int main() {
  cout << "Hello World!\n";
  cout << "hello" << endl;
  cout << "mirjalol";
return 0;
}
```

```
natija 
Hello world!
hello 
mrjalol

```
C++ New Lines
Tags: cpp, programming
Published: 2023-03-10 14:42:24

The newline character ( \n ) is called an escape sequence, and it forces the cursor to change its position to the beginning of the next line on the screen. This results in a new line.

New Lines
To insert a new line, you can use the \n character:

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

int main() {
  cout << "Hello World! \n";
  cout << "I am learning C++";
  return 0;
}

```
`Tip:` Two `\n` characters after each other will create a blank line:

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

int main() {
  cout << "Hello World! \n\n";
  cout << "I am learning C++";
  return 0;
}
```
Another way to insert a new line, is with the `endl` manipulator:

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

int main() {
  cout << "Hello World!" << endl;
  cout << "I am learning C++";
  return 0;
}
```

Both `\n `and `endl` are used to break lines. However, `\n` is most used.

But what is `\n` exactly?
The newline character (\n) is called an **escape sequence**, and it forces the cursor to change its position to the beginning of the next line on the screen. This results in a new line.
C++ Chiqarish operatori
Published: 2023-03-10 14:39:06



Assalomu Alaykum bugungi darsimiz qisqa bo'ladi bugun siz bilan C++ dasturlash tilida chiqarish operatori haqida gaplashamiz!

C++ dasturlash tilida cout kalit so'zi << bilan birgalikda chiqarish operatori yoziladi.
Operator - bu dasturlash tilida aniq bir maqsadga yo'naltirilgan. Ishni ma'lum qismini ya'ni C++ misol uchun chiqarish operatori, takrorlash operatori, shart operatorlari va bir qanchasini misol keltirsa bo'ladi. Operatorlardan so'ng ; bilan yakunlanadi. Ayrim operatorlar asosan {} figurniy qavus bilan bilan ishning ma'lum bir vazifani bajaradigan qismi yakunlanadi.
C++ dasturlash tilida chiqarish operatori uchun misol keltiramiz.

```
#include <iostream>
using namespace std;
​
int main() {
  cout << "Hello World! UzbekDevs";
  return 0;
}
```
Hello World! MIRJALOL
Siz C++ dasturlash tilida cout ni hohlagancha ishlatishingiz mumkin! Unutmang bu zaylda chiqarish operatorini ishlatish jarayonida har bir qatorda chiqadi. Quyidagi kodga nazar soling.

```
#include <iostream>
using namespace std;
​
int main() {
  cout << "Hello World!";
  cout << "I am MIRJALOL";
  return 0;
}
```
Hello World!
I am MIRJALOL
Agar siz cout ikki marta qo'llashni hohlamasangiz endl qo'llab ketishingiz mumkin.

```
#include <iostream>
using namespace std;
​
int main() {
  cout << "Hello World!" << endl << "I am mirjalol";
  return 0;
}
```

Hello World!
I am MIRJALOL
endl - End Line (qator oxiri) bunda kursor qator oxirida bo'lib shundagina keyin keladigan amal keyingi qatorga tushadi. Unutmang chiqarish operatoridan keyin ; ni yozishni unutmang.
 Yana bir usuli ya'ni yangi qatorda yozish uchun! Yangi qatorni kiritish uchun siz quyidagi \n belgilarni ishlatishingiz mumkin. buni sayt ichida ya'ni "" ichida yozishingiz kerak bo'ladi.

```
#include <iostream>
using namespace std;
​
int main() {
  cout << "Hello World! \nI am MIRJALOL";
  return 0;
}
```

```
natija!
Hello World!
I am MIRJALOL

```
C ++ chiqarish operatori .
Tags: beginners, programming, tutorial, cpp
Published: 2023-03-10 14:39:05

Salom dasturchi bugun siz bilan chiqarish operatori ya'ni cout - tarjimasi esa output haqida gaplashamiz biz outputni bu haqida paython oldi foniga ko'd yozish tilida o'tganmiz . 
Buni tarjimasi chiqarish . 

Biror tipdagi narsalarni chiqarishda kerak bo'ladi . 
bu dasturlashda data type deb ataladi bunga int string va float kiradi . Bularga qo'shimcha qilib char ni qo'shishimiz mumkin . 

Buni hozir mana shu ko'dda ko'ramiz : 

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

int main() {

cout << "HELLO WORLD" ;

return 0  ; 
} 

```
Biza bu ko'dni run qilganimiz da yani ishlatganimizda HELLO WORLD ekranga chiqadi mana shu yerdagi ya'ni 4 - qatordagi birinchi so'z bu yerda chiqarish operatori . 

Bu maqolada chiqarish operatori haqida bilib oldingiz degan umiddaman hayr salomat bo'ling .
Laravel: The useCurrent() & useCurrentOnUpdate()
Tags: webdev, laravel, php, programming
Published: 2023-03-10 14:33:31

When using `timestamp()` columns in Laravel Migrations, append the `useCurrent()` & `useCurrentOnUpdate()` to set timestamp columns default value to CURRENT_TIMESTAMP.

```
Schema::create('table', function (Blueprint $table) {  
     ....
     $table->timestamp('created_at')->useCurrent();
     $table->timestamp('updated_at')->useCurrentOnUpdate();     
});
```
switch-case statement in PHP learn free Guide
Tags: php, javascript, beginners, tutorial
Published: 2023-03-10 14:28:40

The [switch-case statement in PHP](https://www.codeexampler.com/php-switch) is a control structure that is used to perform different actions based on the value of a variable or expression. It provides an alternative to using multiple if-else statements to test the value of a variable.
![php switch case](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0c4jg32e850qkxzyqeqs.jpg)


The basic syntax of a switch-case statement in PHP is as follows:

java
Copy code
switch (expression) {
  case value1:
    // statements to execute if expression equals value1
    break;
  case value2:
    // statements to execute if expression equals value2
    break;
  ...
  default:
    // statements to execute if none of the cases are true
    break;
}
The expression is the value that you want to compare against the different case values. The case values are the different values that you want to compare the expression against. Each case value is followed by a colon and a block of code to execute if the expression is equal to the case value.

The break statement is used to exit the switch-case statement after the code block for the matching case has been executed. Without a break statement, the code execution would "fall through" to the next case block and execute that code as well. [gym in Bhubaneswar near me](https://www.leads4needs.com/) leave stress go out gym in your area.

Here's an example of a switch-case statement in PHP:

php
Copy code
$num = 2;

switch ($num) {
  case 1:
    echo "The number is one";
    break;
  case 2:
    echo "The number is two";
    break;
  case 3:
    echo "The number is three";
    break;
  default:
    echo "The number is not one, two, or three";
    break;
}
In this example, the variable $num is compared against three different values using case statements. The code block for the matching case value is executed, and the break statement ensures that the code execution stops after that block is finished.

If none of the case values match the value of the expression, the code in the default block is executed.

In conclusion, the switch-case statement is a useful tool for performing different actions based on the value of a variable or expression in PHP. [resume for 12th pass freshers](https://www.resumerpro.com/) It provides a clean and concise alternative to using multiple if-else statements.
C++ cout
Tags: programming
Published: 2023-03-10 14:28:21

`cout with Insertion Operator`

The `"c" `in cout refers to `"character"` and `"out"` means `"output"`. Hence cout means `"character output"`. The cout object is used along with the insertion operator << in order to display a stream of characters.

The cout object is used along with the insertion operator << in order to display a stream of characters. For example,

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

int main() 
{
     int var1 = 25, var2 = 50;

     cout << var1;
     cout << "Some String";
     cout << var2;

```
The`<<` operator can be used more  than once with a combination of variables, strings, and manipulators.

```
cout << var1 << "Some String" << var2 << endl;
```

**cout with Member Functions**

he cout object can also be used with other member functions such as put(), write(), etc. Some of the commonly used member functions are:


- `cout.put(char &ch):` Displays the character stored by `ch.`

- `cout.write(char *str, int n)`: Displays the first `n` character reading from `str`.

- `cout.setf(option)`: Sets a given option. Commonly used options are `left`, `right`,` scientific`, `fixed`, etc.

- `cout.unsetf(option)`: Unsets a given option.

- `cout.precision(int n)`: Sets the decimal precision to `n` while displaying floating-point values. Same as `cout << setprecision(n)`.
C++ Sinteks
Published: 2023-03-10 14:23:37

sinteks bu **#include  <iostream> , using name space std; , int main() va return 0 ; kiradi . Bularni mana shu ko'dda ko'rishingiz mumkin . ** 

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

int main() {

coud << "hello world " ;

return 0;
}
```
1 #include bu kutubhona va eng kop ishlatiladigan va kop kerak boladigan kutubhona hisoblanadi.
 
2 <iostream> - bu input, output, stream degani . TARJIMASI -kirgizish, chiqarish, oqimi.

 3 int main() bu bizni yozgan kodlarimizni saqlaydigan papka boladi.

4 return 0;  bu yozgan kodimizni yakunlaydi .
Types of Variables
Tags: beginners, programming, tutorial, cpp
Published: 2023-03-10 14:20:06

Assalamu aleykum today we will take a look with you on Data types - data types.
#include <iostream>
using namespace std;
​
int main () {
 int mynom = 5; / / All (whole number)
 float myFloatNum = 5.99; // decimal
 double myDoubleNum = 9.98; / / differs in its limit with decimal Float.
 char myLetter = 'D'; / / Char
 boolean myBoolean = true; / / Boolean(true or false
 string myText = "Hello"; / / line
}
Main types of data

The data type determines the size and type of information that stores the variable:

Image description

Number types-integer = INT-for integers.
#include <iostream>
using namespace std;
​
int main (). 
{

 int all = 13; / / All (whole number)

return 0;
}
Number types-float-for fractional numbers.
#include <iostream>
using namespace std;
​
int main (). 
{

 int mn = 13.15; / / real (whole number

return 0;
}
for double-fractional numbers.

For example:
#include <iostream>
using namespcace std;
Konstanta CONST
Tags: beginners, programming, cpp
Published: 2023-03-10 14:19:02

Konstanda bu ozgarmas ozgaruvhci degani biz bu ozgaruvchin yaratganimizda biz uni ozgar tirolamaymiz.
**Man bu ni hozir kodda tushuntirib beraman.
**
​

```
#include <iostream>
using namespace std;
​
int main() {
    const int n = 20;  // n ning qiymati doim 20 ga teng bo'ladi 

    return 0;
}
```
**Bu kodda esa man hato sini korsatib beraman**

```
#include <iostream>
using namespace std;
​
int main() {
    const int n = 13;  
int n = 20;
    return 0;
}
```
New line
Tags: beginners, programming, tutorial, cpp
Published: 2023-03-10 14:17:30

the programmer will learn today, what we do is look at the new string throw in the C++ programming language.
You can use the" \n " icon to insert a new line:

For example::

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

int main ().
{

cout < < < "I started learning C++\n" < br>;
cout < < < "very interesting and easy to learn";

return 0;
}

Tip: Two \N characters after each other form an empty row:

For example::
#include <iostream>
using namespace std;

int main ().
{

cout < < < "my advice to you start programming from C or C++\N\n";
cout < < < " Qani kettik;

return 0;
}
Another way to enter a new line is to use the Special Command "endl:

For example::
#include <iostream>
using namespace std;

int main ().
{

cout < < "I am learning C++" < < endl;
cout < < < "Hello World" < Br>;

return 0;
}
```

To cut lines, "\n" and "endl" are also used. However, "\n " is the most commonly used.

But what exactly is \n?
The new row symbol (\n) is called the escape sequence, and it is curso
Why Python is not good for Beginners?
Tags: python, beginners, programming, cpp
Published: 2023-03-10 14:16:29


No Doubt! **Python** is one of the great language and also in 2020 it one of the trending language. There is a great boom in python language. Beside all these things, python syntax is one of the simplest and easiest as compared to other languages like java, c and many more. For example, if one have to print 'Hello World!" in python and C++, there is great difference in number of lines and overall syntax,

```
Python: print("Hello World!")
```

```
C++: #include <iostream>
     using namespace std;
     int main(){
         cout<<"Hello World!"<<endl;
         return 0;
     }
```


But even after all such things, it is not used or preferred for beginners to start with. There are many reasons of not preferring Python, instead go with languages like C++ or C. The main reason of this is the basic logic building. Python help in logic building but when compared with languages like C++, then C++ somewhere gets and edge over it. 
Python consist of inbuild many pre-existing functions and modules, which are not available in C++ and other languages. Now, the drawback such functions in python somewhere restrict the overall thinking for a beginner to code. 
Also in terms of efficiency, C++ again takes an edge over python. So, further in Competitive Programming, C++ is preferred over python.
Thus, one as a beginner always go with languages like C++ or Java. This helps in overall development of the user and helps in building logical thinking and critical thinking.
Sintaksis
Tags: beginners, programming, tutorial, cpp
Published: 2023-03-10 14:08:50

Salom dasturchi bugun siz bilan _Sintaksis _haqida gaplashamiz 
Sintaksis nima ekanligini tushunish uchun mana shu ko'dga qarashingizni so'rayman .

```
#include <iostream> 
using name space std ;

int main() {

cout << "Hello world" ;

return 0 ; 
}
```

1. #include <iostream> - bu ktubxona va eng ko'p ishlatiladigan va ko'p kerak bo'ladigan kutubxona hisoblanadi . 

2. using name space std ; - Bu narsani dasturchilar dangasa bo'lganligi uchun yaratgan agar biz using name space std ; ni int main() dan oldin yozsak biz yozvotgan barcha ko'dlarimizga std bilan yozishimiz kerak bo'lmaydi . 
Bu ni birinchi kirgan paytimiz yozamiz . 

3. int main() - Biz yozgan ko'dlarimizni saqlab turadigan joy . 

4. return 0 ; - bu ko'dimizni oxiri yani tugaganini anglatadi . 
Bu narsani har doim yozishimiz kerak . 

Mana shu yozgan va tushuntirgan narsalarimiz sintaksis deyiladi . 
cout << "Hello world " esa - chiqarish operatori hisoblanadi . 

Chiqarish operatorini biz biror bir tipdagi narsalarni chiqarishmmizda kerak bo'ladi .
Comment(C++)
Tags: beginners, programming, tutorial, cpp
Published: 2023-03-10 14:07:48

Hello programmer today we will talk about leaving a comment in the language of C++ Duster! Before starting, it is considered necessary that we find out why we should use the comment. Remember that. Comments are divided into open and closed types!

In the C++ programming language, a footnote is written after the character"//". This symbol only applies to one-line comments. You can apply for several rows. To do this, you will need to apply "/ / " in each row.

For example::
// It was written for comment.
// The second line is written for comment.
cout < < < " Hello World;
In the C++ programming language, the operator can also be written as a footnote at the end.

For example::
cout < < < "Hello World"; / / This is a comment (output operator
Multi-line annotation in the C++ programming language.

Begins with multi-line comments / * and ends*/.

All text or operators that were /* between the written code */ ignored.

For example::
/ * As written for this comment
apply for multiple series
Izoh
Tags: beginners, programming, cpp
Published: 2023-03-10 14:04:20

izoh deganda bu komentariy yozish degani C++ da komentariy yozish uchun biz "//" shu belgini qoysak ishlaydi bu faqat bitta qator uchun bir necht ajoyni komentariy olish uchun esa biz komentariyni boshiga /* oxiriga esa */ qoyamiz, man hozir bulani cod qilib korsataman.
**BU 1 TA LIK KOMENTARIY UCHUN**
```
#include <iostream>
using namespace std;
int main() {
//bu bir qator uchun 
return 0;
}
```**BU ESA /* */ KOMENTARIY UCHUN **

```
#include <iostream>
using namespace std;
int main () {
/* The code below will print the words Hello World!
to the screen, and it is amazing */
```
AspNetCore.VersionInfo 1.1.0 is out
Tags: dotnet, nuget, library, github
Published: 2023-03-10 14:04:14

_AspNetCore.VersionInfo_ is a NuGet library that provides a simple and effective way to obtain information about the version of the running ASP.NET Core application. This library can be used for various purposes, such as displaying the version on your web application or the list of referenced assemblies.
This library targets `.NET 6` and is easy to install and configure in an existing ASP.NET Web Application. 

After installing the NuGet package, it is sufficient to add the VersionInfo middleware to the application's middleware pipeline in the Configure and ConfigureServices method of the Startup object:

```cs
public class Startup
{
    public void ConfigureServices(IServiceCollection services)
    {
        services.AddVersionInfo()
            .With<ClrVersionProvider>()
            .With<AssemblyVersionProvider>();
    }

    public void Configure(IApplicationBuilder app)
    {
        app.UseRouting();

        app.UseEndpoints(endpoints =>
        {
            endpoints.MapVersionInfo();
        });
    }
}
```

Once configured, the library will provide information about the application version through different endpoints; in particular there are 3 endpoints:
- `/version/json` -> will return a JSON object
- `/version/html` -> will return an HTML user-friendly page
- `/version/badge` -> a nice and highly configurable badge image

Using this library has several advantages over manually implementing the application version. Firstly, the library provides a standardized way of obtaining information about the application version with a few lines of code, using built-in providers.

Additionally, the library provides a high level of configurability, allowing for customization of both the collected information and UI visualization (such as badge color and icons).

More information and samples are available on [GitHub repository](https://github.com/salem84/AspNetCore.VersionInfo).

I'd love to know what your opinion!
Printing code(C++)
Published: 2023-03-10 14:03:05

Today's lesson will be short today we will talk to you about the output operator in the C++ programming language.

In the C++ programming language, a release operator is written together with the keyword "cout"<<.

An Operator is a specific goal-oriented in a programming language.One can give an example of a certain part of the work i.e. C++ for example an output operator, a repeat operator, a condition operator, and a few. After the operators; ends with. The part of the work in which certain operators perform a certain task is completed, mainly with a figure bracket {}.

In the C++ programming language, we give an example for the output operator:

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

int main ().
{
cout < < < " Hello World! Ilmhub IT school;

return 0;
}

Result: Hello World! Ilmhub IT school
```


You can use C++ programming language as long as you want cout. Do not forget that it turns out in each row in the process of using the output operator in Zail.Look at the code below.