teleren/devto huggingface dataset:
Polymorphism in Python
Published: 2023-06-14 18:32:46

definition : The word "polymorphism" means "many forms", and in programming it refers to methods/functions/operators with the same name that can be executed on many objects or classes in a program.

```
import math


class Shape:
    def area(self):
        pass

class Circle(Shape):
    def __init__(self, radius):
        self.radius = radius

    def area(self):
        return math.pi * self.radius ** 2

class Rectangle(Shape):
    def __init__(self, length, width):
        self.length = length
        self.width = width

    def area(self):
        return self.length * self.width

# Creating instances of the subclasses
c1 = Circle(50)
rect = Rectangle(50, 40)

# Calling the area() methods
circle_area = c1.area()
rectangle_area = rect.area()

# Printing the results
print("Area of the circle:", circle_area)
print("Area of the rectangle:", rectangle_area)
```
 This code demonstrates a basic example of object-oriented programming (OOP) by implementing a shape hierarchy. The hierarchy consists of a base class called "Shape" and two subclasses: "Circle" and "Rectangle."

The purpose of the "Shape" base class is to provide a blueprint for calculating the areas of various shapes. It declares a method called "area" without any implementation details. This method acts as a placeholder that will be overridden by the subclasses.

The "Circle" subclass represents a circle and extends the "Shape" class. It has a constructor that accepts the radius as a parameter. Within the class, the "area" method is overridden to calculate the area of a circle using the provided radius. The formula used is math.pi * radius ** 2, where math.pi represents the mathematical constant π.

The "Rectangle" subclass also extends the "Shape" class and takes the length and width as parameters in its constructor. Similarly, it overrides the "area" method inherited from the base class to compute the area of a rectangle using the given length and width. The formula used is simply the product of the length and width.

In the main part of the code, instances of the "Circle" and "Rectangle" classes are created. The circle is initialized with a radius of 50, while the rectangle has a length of 50 and a width of 40. The "area" method is called on each instance, resulting in the respective areas being calculated.

Overall, this code demonstrates the principles of inheritance and polymorphism in OOP. It allows for the creation of different shapes with their specific area calculation formulas while utilizing a common interface defined by the base class.
Guia para comprar una laptop o computadora usada y valuarla
Published: 2023-06-14 18:27:43



Establecer un presupuesto, cuanto tengo para gastar en mi laptop. 

Para que voy a usar la computadora o laptop?

Buscar ofertas, en Marketplace de Facebook, en mercado libre, en los montes de piedad

Obtener información sobre las ofertas, que modelo son?

Conocer el modelo y el submodelo
Buscar información en las paginas oficiales de la empresa que hizo las laptops y en las paginas de actualización de memoria como crucial.

Cual es su máxima capacidad de actualización?
Cuales son los detalles?
Por que la vende?

que fallas tienen, que podría necesitar mantenimiento y cuanto cuesta o costarían las refacciones, todavía se pueden conseguir las refacciones?

La batería o la pila todavía retienen la carga? 
checar que la pila funcione bien

la pantalla
el teclado

programas de diagnostico integral
hp tiene su propio programa de diagnostico
Lenovo y HP

Laptos godinaz

probar webcam y micrófono
probar sonido
estado de la batería

redes wifi
controladores instalados
que windows máximo soporta
Lock BIOS

funcionan puertos usb

cristal disk info

si la usas para comerciar o banco o cripto.
Reinstalar el SO.
no virus no keyloggers

Herramientas usadas para verificar la laptop

**CrystalDiskInfo:**

https://crystalmark.info/en/software/crystaldiskinfo/

**AIDA64 Extreme**

Prueba de estabilidad de sistema de AIDA64, el test se deja activo 5 minutos

**Hard Disk Sentinel**
Cuanta vida útil le queda al disco duro
https://www.hdsentinel.com/

**Batery info view**
https://www.nirsoft.net/utils/battery_information_view.html
Translation Solutions with translateplus.io's API Service
Tags: translation, api, translateplus, googletranslate
Published: 2023-06-14 18:04:17

In today's interconnected world, businesses of all sizes are increasingly expanding their global presence. However, language barriers can often hinder effective communication and hinder business growth. That's where translateplus.io comes in. Our cutting-edge [translation API](https://translateplus.io) service is designed to empower your business by providing seamless and efficient language translation solutions.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s13jj4o300hdmmxq1z8z.png)
## Unlocking Global Opportunities:
At translateplus.io, we understand that reaching a global audience is key to unlocking new growth opportunities. Our API service enables you to seamlessly integrate translation capabilities into your existing systems, applications, and platforms. With just a few lines of code, you can effortlessly translate content into multiple languages, opening doors to new markets and engaging with customers worldwide.

## Efficiency and Accuracy:
We recognize the importance of delivering accurate and high-quality translations. Our API service combines the expertise of our skilled linguists with advanced machine learning algorithms, ensuring precise and contextually appropriate translations. You can trust translateplus.io to maintain the integrity of your content while breaking down language barriers.

## Flexible Integration:
Integrating our API service into your workflow is a breeze. Our user-friendly [documentation](https://docs.translateplus.io) provides clear instructions and sample code, making the integration process straightforward and hassle-free. Whether you're managing an e-commerce website, a mobile app, or a content management system, translateplus.io seamlessly integrates with your existing infrastructure, saving you valuable time and resources.

## Robust Language Support:
We understand that every business has unique translation requirements. That's why translateplus.io offers an extensive range of supported languages, including major global languages and regional dialects. Our constantly expanding language database ensures that you can cater to your target audience's needs, regardless of their geographical location.

## Unparalleled Customer Support:
At translateplus.io, we value our customers' success. Our dedicated support team is ready to assist you throughout your translation journey. Whether you need technical guidance, have questions about our services, or require assistance with implementation, our team is just a message away, ensuring a smooth and seamless experience.

## Conclusion:
In a globalized world, effective communication is the key to success. By leveraging translateplus.io's advanced translation API service, you can break down language barriers, expand your reach, and engage with a global audience. Stay ahead of the competition, enhance user experience, and unlock new growth opportunities with translateplus.io. Sign up today and experience the power of seamless, efficient, and accurate translations for your business.
Fastest Java Solution!! 🔥🔥🔥
Published: 2023-06-14 17:35:23

# Intuition
This problem is really simple if you think about the 2 types of testcases. First, the number inputted can be divisible by 2. In this case, we can just return the number itself since it satisfies all of the criteria. Else, you can just return the number times 2.

# Complexity
- Time complexity: O(1)
- Space complexity: O(1)

# Code
```java
class Solution {
    public int smallestEvenMultiple(int n) {
        if (n % 2 == 0) {
            return n;
        } else {
            return n * 2;
        }
    }
}
```
6+ Free Tailwind CSS Templates & Resources Examples for 2023
Tags: tailwindcss, webdev, design, resources
Published: 2023-06-14 17:34:41

Tailwind CSS is a highly customizable, utility-first CSS framework that provides a set of pre-designed utility classes. It enables you to rapidly build user interfaces by composing classes to style HTML elements.

Tailwind CSS does not impose a particular design or layout structure on your project. Instead, it provides a powerful set of tools and utilities to build and customize your own unique design system.

To use Tailwind CSS in your project, you need to include the Tailwind CSS library in your HTML file or integrate it into your build process. You can then start applying the utility classes directly to your HTML elements to style them.

**free Tailwind CSS Templates & Resources Examples**

**1. [medcode templates](https://www.medcode.dev/templates)**


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

 

**2. Soft UI Dashboard Tailwind**
[](https://www.tailwindawesome.com/resources/soft-ui-dashboard-pro)

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

**3. Tailwind Started Kit**
[](https://www.creative-tim.com/learning-lab/tailwind-starter-kit/presentation)

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

**4.  Notus React
**
[](https://www.tailwindawesome.com/resources/notus-pro-react)

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

**5. Horizon UI Tailwind CSS React**
[](https://horizon-ui.com/)

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

**6. ThemeWagon
**
[](https://themewagon.com/theme-framework/tailwind-css/)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7bexlgtnajkeo23d217q.PNG)
Have you checked the Tailwind play ?
Tags: css, webdev, tailwindcss
Published: 2023-06-14 17:34:06

## Introduction 
Tailwind CSS is one of the most used utility CSS framework used by developers to design realistic and responsive components. Tailwind CSS recently launched an web based CSS editor for tailwind CSS named [Tailwind play](https://play.tailwindcss.com/) and though this blog we will discuss about it.

## 📍 Table of Contents

1. [Versions supported](#versions-supported)
2. [Live share available for Realtime editing](#live-share-available-for-realtime-editing)
3. [ Multiple screen view available](#multiple-screen-view-available)
4. [Customization available for tailwind.config.js file](#customization-available-for-tailwindconfigjs-file)
5. [ Copy to clipboard available](#copy-to-clipboard-available)
6. [Dark Mode available](#dark-mode-available)

## 🔢 Versions supported 
Only versions v1.9.6, v2.2.19, v3.3.2 are supported in this web based editor. 

## 📡 Live share available for Realtime editing
Live share is available through a link so it can be used for pair programming 

##  🖥️ Multiple screen view available
This web based editor supports multiple views hence no need to use the inspect function within chrome to check for responsiveness

## 🧩 Customization available for tailwind.config.js file
In this web based editor one can configure the `tailwind.config.js` file, which means adding custom themes and fonts 

##  📋 Copy to clipboard available
Once the code is written can be directly copied  to clipboard using the copy button hence no need to select the whole code.  

## 🌑 Dark Mode available
Every programmer wants to work on a dark mode and this facility is also available in this web based editor

## Conclusion 
This tool is a gamechanger and hence no need to create a test project locally. Developers can easily use this tool while writing CSS for their projects
Inheritance in Python.
Published: 2023-06-14 17:17:58

The code below  demonstrates the concept of inheritance in object-oriented programming. Let's go through it step by step:

```
class Animal:
    def speak(self):
        print("The animal makes a sound.")


class Dog(Animal):
    def speak(self):
        print("The dog barks.")


class Cat(Animal):
    def speak(self):
        print("The cat meows.")


dog = Dog()
cat = Cat()

dog.speak()
cat.speak()

```

The Animal class is defined with a method called speak(). This method simply prints the message "The animal makes a sound."

The Dog class is created as a subclass of Animal by including (Animal) after the class name in the class definition. This means that Dog inherits all the properties and methods of the Animal class.

Inside the Dog class, the speak() method is overridden by defining a new implementation specific to dogs. In this case, the method prints the message "The Dog Barks."

Similarly, the Cat class is created as a subclass of Animal and overrides the speak() method to print "The cat meows."

Instances of the Dog and Cat classes are created using the Dog() and Cat() constructors, respectively. These instances, dog and cat, are objects representing a dog and a cat.

The speak() method is called on the cat and dog objects using the dot notation (e.g., cat.speak() and dog.speak()). This invokes the speak() method specific to each class.

When the speak() method is called on the cat object, it executes the code defined in the Cat class, printing "The cat meows." Similarly, when called on the dog object, it executes the code defined in the Dog class, printing "The Dog Barks."
Oracle REGEXP_SUBSTR Function
Tags: uyumsoft
Published: 2023-06-14 17:08:19

```
SELECT
trim(regexp_substr(FFD.ZZ_INVOICE_M_ID, '[^,]+', 1, lines.column_value)) AS INVOICE_M_ID
FROM FINT_FIN_D FFD,TABLE(CAST (MULTISET(SELECT LEVEL FROM DUAL CONNECT BY INSTR(FFD.ZZ_INVOICE_M_ID, ',', 1, LEVEL - 1) > 0) AS sys.odciNumberList )) lines
WHERE NULLIF(TO_CHAR(FFD.ZZ_INVOICE_M_ID),TO_CHAR('0')) IS NOT NULL
ORDER BY lines.column_value
```
Customizing Google Chrome Dino Game Characters 🦖
Tags: chrome, javascript, webdev, tutorial
Published: 2023-06-14 17:01:37

> " This article is published using [Lamento](https://www.lamento.in/)🍋

This is my custom png with nezuko charn which I am going to replace the default dino with.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ucicjzjz9gqhlsn4j1z7.png)

## 🧭 Navigate
[chrome://dino/](chrome://dino/)

## 🛠️ Developer tool
` Ctrl + Shift + C `

Select ` offline-resources `
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/znmaopxt04rbrz30e9kr.png)

## 🔗 Change asserts URL
change src of `offline-resources-1x` & `offline-resources-2x` to [https://i.ibb.co/37DSwDX/nezuko.png](https://i.ibb.co/37DSwDX/nezuko.png)

## Lil Nezuko chan 🏃‍♀️
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ep5sze91iuyuwxisdrvg.gif)
2648. LeetCode's Generate Fibonacci Sequence - JS Solution Beats 56% in Memory
Published: 2023-06-14 16:55:20

# Code
```
/**
 * @return {Generator<number>}
 */
var fibGenerator = function*() {
    let a = 0, b = 1;
    yield a;
    yield b;

    while (true) {
        let c = a + b;
        a = b;
        b = c;
        yield c;
    }
};

/**
 * const gen = fibGenerator();
 * gen.next().value; // 0
 * gen.next().value; // 1
 */
```
Common Plots for Data Visualizations
Tags: python, datavisualizations
Published: 2023-06-14 16:45:03

1. **Line Plot**: A line plot shows the relationship between two variables by connecting data points with straight lines. It is useful for displaying trends or changes over time. For example, you can use a line plot to visualize the stock prices of a company over a month.

2. **Scatter Plot**: A scatter plot displays individual data points as dots on a graph. It is used to show the relationship between two continuous variables. Scatter plots can reveal patterns, clusters, or correlations in the data. For instance, you can create a scatter plot to analyze the relationship between a student's study time and their test scores.

3. **Bar Plot**: A bar plot represents data using rectangular bars of different heights. It is suitable for comparing categorical data or discrete quantities. Bar plots are commonly used to show the distribution of data across different categories or to compare values between different groups. For example, you can use a bar plot to compare the sales performance of different products.

4. **Histogram**: A histogram is a graphical representation of the distribution of numerical data. It consists of a series of bins along an axis, with the height of each bin representing the frequency or count of data falling within that bin. Histograms are useful for understanding the shape and spread of data. They can help identify patterns, such as whether the data is skewed or follows a normal distribution.

5. **Pie Chart**: A pie chart divides a circle into sectors, where each sector represents a proportion or percentage of a whole. Pie charts are commonly used to display the composition or distribution of categorical data. They are useful for visualizing the relative sizes of different categories or showing the percentage breakdown of a dataset.

6. **Box Plot**: A box plot (also known as a box-and-whisker plot) displays the distribution of numerical data through quartiles. It shows the minimum, maximum, median, and interquartile range of a dataset, along with any outliers. Box plots are effective for comparing multiple groups or variables and identifying skewness, outliers, or variability in the data.

7. **Heatmap**: A heatmap uses color-coded cells to represent values in a matrix or a table. It is particularly useful for visualizing relationships or patterns in large datasets. Heatmaps are commonly used in areas like correlation analysis, genomics, and geographic information systems (GIS).

These are just a few examples of plots used in data visualization. Each plot type serves a specific purpose and can provide valuable insights into your data. Choosing the right plot depends on the nature of your data and the insights you want to convey.
How to create an Azure Virtual Machine, using Azure CLI through Windows PowerShell.
Published: 2023-06-14 16:38:27

**STEP 1: SIGN INTO YOUR AZURE ACCOUNT**

- Open Windows PowerShell
Wait for the **Shell Prompt** to display, then enter the following command: `az login`

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

This command will open a new tab in your browser, displaying email addresses to sign into your Azure account, select accordingly and click. 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5nq7se5p1kd0fplmwdvy.PNG)

This message will display on the browser tab. 

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

At the same instance, the PowerShell will display your Azure account details, indicating you have signed into your account and ready to provision resources.


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

**STEP 2: CREATE THE RESOURCE GROUP**

Type the following command in your PowerShell:
`az group create --name **Group Name** --location eastus`

for this very project, below is the exact command.
`az group create --name Don-RG --location eastus`

With this, you can go to your Azure account portal to view the created **resource group**.

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

**STEP 3: CREATE THE VIRTUAL MACHINE**

- Go to the **Windows PowerShell** and type this command:
`az vm create --name **vm name** --resource-group **resource group name** --image **image name** --admin-username **username** --generate-ssh-keys` hit enter.

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

- Go to the **Azure portal** to view the resource you created.

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

- Click on the VM to view the **Overview** page.

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

Here you can see the **IP address**, **Operating system**, **Resource group**, **Virtual network/subnet** and other details of the Virtual machine you created.
Unveiling the Protectors: Exploring the Vital Role of Cloud Security
Tags: cloudsecurity, mfa, ciam, digitalidentity
Published: 2023-06-14 16:34:25

## **Introduction**

As businesses increasingly rely on cloud-based services, the importance of cloud security has grown exponentially. While the adoption of cloud computing has opened doors to seamless data storage and accessibility, it has also exposed organizations to potential cyber threats. Understanding and implementing effective cloud security measures is essential to protect sensitive information from malicious actors and ensure the integrity of cloud-based operations.

## **What Is Cloud Security?**

Cloud security serves as the vanguard of protection in the realm of cloud-based computing. Its primary objective is to safeguard data, systems, and infrastructure from a wide range of cyber threats. By implementing a combination of rules, technologies, and best practices, cloud security aims to prevent unauthorized access, malware infections, hackers, and Distributed Denial of Service (DDoS) attacks. This comprehensive approach ensures the integrity and confidentiality of cloud-based resources, allowing businesses to harness the power of the cloud without compromising their security.

**The security measures are based on the following principles:**

1. Centralized security
2. Reduced administration
3. Reliability
4. Lower initial investment
5. Greater expansion flexibility

## **Critical Components of Cloud Security**

1. Data Security
2. Customer Identity And Access Management
3. Governance
4. Data Retention (DR) And Business Continuity (BC)
5. Legal Compliance

## **Conclusion**

While technology plays a crucial role in **[cloud security](https://medium.com/@loginradius/what-is-cloud-security-loginradius-blog-dd1f4b686b5b)**, it is important to recognize that the ultimate responsibility lies with the individuals utilizing the cloud. By embracing a security-conscious mindset and adhering to best practices, end users can significantly enhance the overall security of cloud-based operations. It is the collective effort of people and processes that truly strengthens cloud security and ensures the protection of valuable data and resources.