teleren/devto huggingface dataset:
Python Array List Methods
Tags: python, array, beginners
Published: 2023-02-16 05:01:30

Python has a set of built-in methods that you can use on lists/arrays.

1) **append(elmnt)**

Adds an element at the end of the list
```py
fruits = ['apple', 'banana', 'cherry']
fruits.append('orange')
print(fruits) # ['apple', 'banana', 'cherry', 'orange']
```
2) **clear()**

Removes all the elements from the list
```py
fruits = ['apple', 'banana', 'cherry', 'orange']
fruits.clear()
print(fruits) # []
```
3) **copy()**

Returns a copy of the list
```py
fruits = ["apple", "banana", "cherry"]
x = fruits.copy()
print(x) # ['apple', 'banana', 'cherry']
```
4) **count(value)**

Returns the number of elements with the specified value
```py
arr = [1, 4, 2, 9, 7, 8, 9, 3, 1]
x = arr.count(9)
print(x) # 2
```
5) **extend(iterable)**

Add the elements of a list (or any iterable), to the end of the current list
```py
fruits = ['apple', 'banana', 'cherry']
cars = ['Ford', 'BMW', 'Volvo']
fruits.extend(cars)
print(fruits) # ['apple', 'banana', 'cherry', 'Ford', 'BMW', 'Volvo']
```
6) **index(elmnt)**

Returns the index of the first element with the specified value 
```py
numbers = [4, 55, 64, 32, 16, 32]
x = numbers.index(32)
print(x) # 3
```
7) **insert(pos, elmnt)**

Adds an element at the specified position
```py
fruits = ['apple', 'banana', 'cherry']
fruits.insert(1, "orange")
print(fruits) # ['apple', 'orange', 'banana', 'cherry']
```
8) **pop(pos)**

Removes the element at the specified position
```py
fruits = ['apple', 'banana', 'cherry']
fruits.pop(1)
print(fruits) # ['apple', 'cherry']
```
9) **remove(elmnt)**

Removes the first item with the specified value
```py
fruits = ['apple', 'banana', 'cherry']
fruits.remove("banana")
print(fruits) # ['apple', 'cherry']
```
10) **reverse()**

Reverses the order of the list
```py
fruits = ['apple', 'banana', 'cherry']
fruits.reverse()
print(fruits) # ['cherry', 'banana', 'apple']
```
11) **sort(reverse=True|False, key=myFunc)**

The sort() method sorts the list ascending by default.
```py
cars = ['Ford', 'BMW', 'Volvo']
cars.sort()
print(cars) # ['BMW', 'Ford', 'Volvo']
```

## References:

* [Python List, W3Schools](https://www.w3schools.com/python/python_ref_list.asp)
* [Python List, GeeksforGeeks](https://www.geeksforgeeks.org/python-lists/)
Getting Started with the .NET MAUI ComboBox Control
Tags: dotnet, dotnetmaui, csharp
Published: 2023-02-16 04:41:41

Learn how to create and configure the Syncfusion .NET MAUI ComboBox control in a .NET MAUI project using Visual Studio 2022. In this video, you will learn how to add a simple .NET MAUI ComboBox to a .NET MAUI app. You will see how to populate the control’s data source, set a custom height and width to the control, customize placeholder text, change the filter type, and hide clear button. 

**Product overview**: https://www.syncfusion.com/maui-controls/maui-combobox

**Download example from GitHub**: https://github.com/SyncfusionExamples/getting-started-with-the-dotnet-maui-combobox-control

{% youtube jcfaI0PFmSo %}
Delete Same Extension File One Click Python
Tags: python, programming, javascript, webdev
Published: 2023-02-16 04:39:59

First got to the directory where your files are .srt .vtt .html etc everthing you can delete one click and boom🎇🎆.

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

Then Copy the directory path.

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

Go to Code and Paste the path in p variable.

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

Click on run and boom.


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

Done.
Thank you for reading may it will helpfull
Is Astra Pro worth it (Answered 20 Questions to Help You Decide)
Tags: wordpress, astra, wordpressthemes, design
Published: 2023-02-16 04:27:42

Have you always wanted to start a blog but were hesitant because it seemed too daunting? Blogging can be easy as long as you have a theme like Astra Pro.

This blog theme gives you all the tools you need to create amazing blogs and makes blogging easy.

But is it worth the hype? Let’s find out in [this article](https://www.digitalkube.com/is-astra-pro-worth-it/).
Array Methods - Python
Published: 2023-02-16 04:21:34

Python doesn't have a built-in array data type. The `array` module is used to work with the array. An array can be created as shown below.

```
import array

arr = array.array("i", [1, 2, 3, 4, 5])
```

The above line creates an array of elements 1 to 5 of type signed integer. Here the `array()` function is used to create an array. The first `"i"` is to mention that the type code of the array is a signed integer. 

The list of type codes can be obtained by running below

```
array.typecodes
```

which returns `bBuhHiIlLqQfd`. 

- b - signed char
- B - unsigned char
- u - unicode char
- h - signed short
- H - unsigned short
- i - signed int
- I - unsigned int
- l - signed long
- L - unsigned long
- q - signed long long
- Q - unsigned long long
- f - float
- d - double

All the type code has a corresponding C Type. The byte size of the type depends upon the machine running the program. The byte size of arr can be checked below

```
arr.itemsize
```

The array can be created from the list and converted to the list as below.

```
arr.fromlist([1, 2, 3, 4, 5])
arr.tolist() # returns python list [1, 2, 3, 4, 5]
```

New items can be added to the array by appending or inserting a value at a position.

```
arr.append(6)
arr.insert(2, 2)
```

New items can be appended from strings or files also.

```
arr.append("word")
arr.append(file_source, 10) # reads 10 lines from file and appends it
```

Elements can be removed by using the index or value of the element. The pop is to remove from an element by passing the index and the remove is by passing a value of the element.

```
arr.pop(1)
arr.remove(4)
```

The array can also be reversed by calling the reverse function. This does not reverse the array in memory but, changes the access order.

```
arr.reverse()
```
Tidytabs professional key Crack With Activated Keygen Free Latest Download
Published: 2023-02-16 04:15:22

<h2><img class="aligncenter wp-image-2622 size-full" src="https://registrationkeys.org/wp-content/uploads/2022/11/TidyTabs-Professional-removebg-preview.png" alt="TidyTabs Pro Crack With Activated Keygen Free 2023 Latest Download" width="200" height="186" /></h2>
<h2>TidyTabs Pro  Portable Crack + Serial Key Lifetime Working Free Download</h2>
<strong><span data-preserver-spaces="true">TidyTabs Pro Crack</span></strong><span data-preserver-spaces="true"> provides a tab view for all your apps. Want to install a Chrome app in Windows Explorer, Microsoft Office, or PuTTY for Mac and Windows with Registration Keys. It integrates well with the operating system, and the card multiuser is an essential part of Windows. Lets you add tabs to any window and any application. You can group multiple programs into one window and switch between them using accounts.</span>

Read More: [Tidytabs professional key Crack](https://registrationkeys.org/tidytabs-pro-crack/)


<span data-preserver-spaces="true"><img class="aligncenter wp-image-2623 size-full" src="https://registrationkeys.org/wp-content/uploads/2022/11/SmCED.png" alt="TidyTabs Pro 1.22.1 Crack With Activated Keygen Free 2023 Latest Download" width="600" height="323" /></span>
Array Methods
Published: 2023-02-16 04:08:01

Array are used to store elements of same data type.
We import array module to use arrays in python.
```{python}
import array as arr
arr_1 = arr.array('i', [10,20,30,40])
print(arr_1)
```
+ **append()**

append() function is used to add an element at the end of the array.
```{python}
import array as arr
arr_1 = arr.array('f', [10,11,12,13])
arr_1.append(14)
print(arr_1)
```

+ **reverse()**

Reverses the order of an array.
```{python}
import array as arr
arr_1 = arr.array('d', [10,11,12,13])
arr_1.reverse()
print(arr_1)
```

+ **pop()**

pop() function is used to remove an element from the specified position.
```{python}
import array as arr
arr_1 = arr.array('l', [10,11,12,13])
arr_1.pop(2)
print(arr_1)
```

+ **count()**

Returns the count of given number.
```{python}
import array as arr
arr_1 = arr.array('f', [10,11,10,10])
print(arr_1.count(10))
```

+ **insert()**

Adds an element at the specified position in the array.
```{python}
import array as arr
arr_1 = arr.array('i', [10,11,12,13])
arr_1.insert(4,14)
print(arr_1)
```

+ **remove()**

Removes the first element with the specified value.
```{python}
import array as arr
arr_1 = arr.array('d', [10,11,10,12,13])
arr_1.remove(10)
print(arr_1)
```

+ **index()**

Returns the index of the first element in an array with the specified value.
```{python}
import array as arr
arr_1 = arr.array('i', [10,20,30,40,10])
print(arr_1.index(10))
```

+ **sorted()**

sorts the array in the ascending order.
```{python}
import array as arr
arr_1 = arr.array('f', [19, 14, 16, 12, 10, 9])
print(sorted(arr_1))
```

**Reference:**
[Array Methods](https://techaffinity.com/blog/python-arrays-array-methods/)
104. Leetcode Solution in cpp
Tags: cpp
Published: 2023-02-16 03:43:56

==================================================================
#Solution:
```cpp
/**
 * Definition for a binary tree node.
 * struct TreeNode {
 *     int val;
 *     TreeNode *left;
 *     TreeNode *right;
 *     TreeNode() : val(0), left(nullptr), right(nullptr) {}
 *     TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}
 *     TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), left(left), right(right) {}
 * };
 */
class Solution {
 public:
  int maxDepth(TreeNode* root) {
    if (!root)
      return 0;
    return 1 + max(maxDepth(root->left), maxDepth(root->right));
  }
};
```
==================================================================
#leetcode
#challenge
Here is the link for the problem:
https://leetcode.com/problems/maximum-depth-of-binary-tree/
JavaScript Data Types
Tags: javascript, webdev, react
Published: 2023-02-16 03:39:37

In JavaScript, there are different types of data that can be used to represent different kinds of information. These data types can be broadly categorized into two categories: primitive and object.

**Primitive Data Types**
In JavaScript, a primitive datatype is a data type that represents a single, immutable value. 

There are six primitive datatypes in JavaScript:

_1. string_
It represents textual data, enclosed with single or double quotes.

_2. Number_
Number represents numeric data, including integers, decimals. It also represent special values like Infinity and NaN(Not a Number).

_3. Boolean_
It represents a logical value, which can be either true or false.

_4. Null_
It represents a special value that signifies the absence of any object value. 

_5. Undefined_
It represents a special value that signifies the absence of a value. 

_6. Symbol_
Symbol represents a unique and immutable data type, which is often used to define object properties that should not be altered. 

Primitive Data Types can be declared like below: 
![JavaScript Primitive Data Type](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bio3sew1wnyyjayg7vg2.png)




**Object Data Types**
An object is a composite data type that represents a collection of related data or functionality. Unlike primitive data types that represent a single value, objects can hold multiple properties and methods, and are used to represent more complex data structures.

There are three types of object. 
_1. Object_
Object represents a collection of related data or functionality, typically defined using object literals, object constructors, or classes. 

![JavaScript Object](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0fznvoso1m88n94senvj.png)


_2. Array_ 
Array represents a collection of ordered data, typically defined using array literals or the Array constructor. 

![JavaScript Array](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mqcgwev0okz0zhydh5na.png)

_3. Function_ 
It represents a block of code that can be called or invoked, typically defined using function declarations or function expressions. 

![JavaScript Function Datatype](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ywge8q8tkq2fsqpw0uu7.png)

_4. Date_
Date represents a specific point in time, typically defined using the Date constructor or Date.parse method. 

![JavaScript Date ](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/25ulre3582qu6741elr5.png)


**Summary**
There are two main Data Types in JavaScript. Primitives are Number, String, Boolean, Null, Undefined, Symbol. Non-Primitives are Object, Array, Function and Date. 


**_Thanks for reading_**
_Please comments you thoughts and share this piece if its helpful._
NFT Marketplace Blur Releases Native Token for Community Ownership
Published: 2023-02-16 03:14:39

After months of anticipation, zero-fee non-fungible token (NFT) marketplace Blur released its native token Tuesday.
The token will allow traders to participate in the platform’s governance protocol, as well as profit from the marketplace’s success through community ownership.
Blur said in a tweet that traders have 60 days to claim their airdropped BLUR tokens, which are trading at roughly 50 cents at press time, according to CoinGecko.
“Since launching [four] months ago, 146,823 users have traded $1.2 billion dollars [sic] worth of NFTs on Blur (wash trading excluded),” Blur said in a tweet. “This growth is breathtaking and was only possible with the support of the Blur community.”

According to data from DappRadar, Blur’s 24-hour trading volume stands at about $9.5 million, second only to leading marketplace OpenSea, whose trading volume is around $12 million.
NFT traders have been awaiting the BLUR token’s release since the platform went live. Originally set to release in January, Blur has been airdropping its token since October through “care packages” to collectors who have traded an Ethereum-based NFT in the past six months. On Tuesday, Blur delayed their token-launch by 90 minutes, warning collectors to be aware of potential phishing attempts and scam links.

Blur launched in October with a strategy to cater to professional NFT traders with a zero-fee marketplace. In its first 24 hours, it conducted $2.5 million in trading volume, creeping up on OpenSea’s trading volume. While the royalty-optional marketplace has added fuel to the fire to the ongoing debate among creators and marketplaces, it has continued to trail behind OpenSea’s trading volume numbers.

Launched in October, Blur's strategy is to cater to the needs of professional NFT traders in the zero-fee market, which has led to many NFT games having partnerships with them, such as CryptoKittes, Fairy Cat game and other games. In the first 24 hours, his trading volume...
Extending a HTML Element in a Svelte Component using TypeScript
Tags: svelte, typescript
Published: 2023-02-16 03:13:24

When using Svelte with TypeScript, all properties of a component should be typed. Props are declared by exporting a `let`. However, when creating a superset of an HTML element, one wouldn't want to extensively declare all props. Here's a solution for this:

```ts
<script lang="ts">
  import type { HTMLInputAttributes } from 'svelte/elements';

  interface $$Props extends HTMLInputAttributes {
    prop: string;
  }

  export let prop: string;
  // ...
</script>
```
How to talk to AI to get it to do what you want
Tags: ai, gpt3, tutorial, computerscience
Published: 2023-02-16 03:05:00

Recently, I've been using a [free, AI-powered querying tool](https://ossinsight.io/explore/) to explore GitHub data and gain insights. I can ask it any questions about GitHub, and AI will generate SQL based on that and tell me the answer. In most cases, it understand my intention and accurately answer my questions.

But it also makes mistakes. Sometimes, I ask about A, but it thinks I‘m asking about B; I ask only about A, but it thinks I‘m asking about A, B, and C.

This leads to incorrect SQL statements generated by AI. For example, when I asked about the [most interesting metrics store projects](https://ossinsight.io/explore/?id=3e634886-471c-4191-a65c-ae7fbcb5ffb1), it thought I asked about the most popular, active, similar, fastest growing, and most contributors metrics store projects in GitHub. This resulted in invalid SQL generation.

The question link is here, if you're interested: https://ossinsight.io/explore/?id=3e634886-471c-4191-a65c-ae7fbcb5ffb1

**It seems that AI can make things more complex than necessary sometimes. We should learn how to talk to AI to get it to do what we want.**

Here is a [course on prompt engineering](https://learnprompting.org/docs/intro). With content labeled with difficulty levels, it fits different levels of learners.


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

I'm learning this course. Hope it helps. :-)
The Difference Between UTF8 and UTF8MB4 in MySQL
Tags: mysql, programming
Published: 2023-02-16 02:58:15

**UTF8** is a popular character set that supports a wide range of languages and symbols. 

In MySQL, **UTF8** can encode up to _3 bytes_ per character. The maximum character in Unicode however, requires _4 bytes_ to encode. As a result, **UTF8** cannot fully support all Unicode characters.

On the other hand, **UTF8MB4** is an extension of **UTF8** and uses a maximum of _4 bytes_ per character. It can fully support all Unicode characters, including emojis and other special characters.

In conclusion, **UTF8MB4** prevents data truncation and encoding errors. It also makes it easier to handle data from different languages.

![Distracted Boyfriend Meme](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h68x3dwg491gjj7jp4pj.png)
The difference between primitives and objects in JavaScript
Tags: javascript, webdev, beginners
Published: 2023-02-16 02:49:42

## What are data types in JavaScript
JavaScript has several data types to represent a variety of values. These types are mainly categorized into 2 types: primitive types and object types.

## The understanding of the difference
The fundamental data types are treated as primitives, and the others are considered objects. Objects can contain multiple primitives values as a data set and also have methods.

Primitives:
- Fundamental data type
- Single value
- Immutable - can not be modified
- Does not have methods and properties
- Stored in stack memory

Objects:
- Complex data type
- A data collection have multiple values
- Mutable - can be modified
- Consists of properties and methods
- Stored in Heap memory


### Primitives
These are primitive types:
- number
- string
- boolean
- null
- undefined
- symbol

Primitive data types are immutable, meaning that their values cannot be changed once they are created.

### Objects
An object is a complex data type that represents a collection of properties and methods. A method is a function, a process of logic. Objects are also known as reference types. The actual data is stored in Heap memory, and a variable holds the location information of the reserved area. 

If you want to know more about memories, this [article](https://felixgerschau.com/javascript-memory-management/#stack-static-memory-allocation) must help your understanding: 


## Wrapper objects
Even though primitives have neither properties nor methods, we can act to access them. 
Example:

```javascript
"string".length; // 5
"lower".toUpperCase() // LOWER
```
 
That is because of the implicit support of objects called wrapper objects. Wrapper objects exist globally and help primitive types. Their names are quite similar to the data type, like `Number` or `String`. Their spells start in upper-case. When a script attempts to access a property of a primitive value, JavaScript automatically creates the wrapper object around the primitive value to provide access to these properties.

## Conclusion
The main difference between primitives and objects is that primitives are simple, immutable values, while objects are complex, mutable entities that can contain properties and methods. To understand the difference seems hard; however, it must help your developer life!


## References
- [JavaScript: The Definitive Guide, 6th Edition](https://learning.oreilly.com/library/view/javascript-the-definitive/9781449393854/)
- [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript)
Core Java - Encapsulation.
Tags: java
Published: 2023-02-16 02:44:11

**Encapsulation**  is a process of binding data and code together. 2 Major advantage of encapsulation is security and easy enhancement.

```
public class Customer {
	private String firstName;
	private String lastName;
	private String debitCard;

	public String getFirstName() {
		return firstName;
	}

	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}

	public String getLastName() {
		return lastName;
	}

	public void setLastName(String lastName) {
		this.lastName = lastName;
	}

	public String getDebitCard() {
		return debitCard;
	}

	public void setDebitCard(String debitCard) {
		this.debitCard = debitCard;
	}
}
```

```
public class Test {
	public static void main(String[] args) {
		Customer c = new Customer();
		c.setFirstName("dev");
		c.setLastName(".to");
		c.setDebitCard("1234");
		System.out.println(c.getFirstName()+" "+c.getLastName()+" "+c.getDebitCard());
	}
}
```

Output - dev .to 1234
5 Podcasts you cannot miss to excel as a Cloud Engineer
Tags: cloud, devops, devopscommunity, devjournal
Published: 2023-02-16 02:31:00

If you want to excel as a Cloud Engineer, you cannot miss these 5 podcasts:

## 1. Screaming in the Cloud

If you wish to master Cloud Computing domain and learn about AWS, GCP, Azure Cloud providers, Corey Quinn is the best guide you should follow in your DevOps journey

🔗 https://lastweekinaws.com/podcast/screaming-in-the-cloud/


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

## 2. Serverless Chats

Serverless and edge computing is a hot topic in today's DevOps world. Jeremy Daly in his podcast talks about it in a very friendly and understandable manner.

🔗 https://serverlesschats.com


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


## 3. Arrested DevOps

Wish to learn about good DevOps practices and how to operate Infrastructure teams for maximum effective ness, This podcast is for you.

🔗 https://arresteddevops.com


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

## 4. The New Stack Makers

It is all about the developers, software engineers and operations people who build at-scale architectures that change the way we develop and deploy software.

🔗 https://soundcloud.com/thenewstackmakers


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

## 5. Google Cloud Platform Podcast

Weekly episodes that features technical experts and geeking out on new technology together. A fun podcast to listen to for Cloud professionals.

🔗 https://gcppodcast.com


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



Thanks for reading this.

If you have an idea and want to build your product around it, schedule a call with [me](https://calendly.com/pragyanatvade).

If you want to learn more in DevOps and Backend space, [follow me](https://dev.to/pragyanatvade).

If you want to connect, reach out to me on [Twitter](https://twitter.com/pragyanatvade) and [LinkedIn](https://www.linkedin.com/in/pragyanatvade/).
React Application Structure
Published: 2023-02-16 02:12:56

For the most part, React apps have a common structure. 

1. index.js
   This is best thought of as a the place where the first bit of code is executed. You also call createRoot and render from react-dom here. 

This file typically renders <App /> 
2. App.js
This is kind of the floor plan or the schematics of the app. 
3. Modules