teleren/devto huggingface dataset:
Day 4: Exploring Rust's Compound Data Types
Published: 2024-01-04 18:55:26

> Greetings, fellow coders! 🚀 On Day 4 of my #100DaysOfCode adventure with Rust, I delved into the fascinating world of compound data types – Tuples and Arrays. Let's unravel the key properties and differences between these structures.

## Tuples: A Symphony of Heterogeneity

Tuples in Rust serve as harmonious ensembles, allowing the storage of heterogenous data types. Here are some key properties:

- **Fixed Length:** Tuples maintain a fixed length, ensuring structural integrity.

- **Diverse Data Types:** They embrace diversity, accommodating elements of different data types.

```rust
let tup: (i32, f64, u8) = (500, 6.4, 1);
```

- **Accessing Elements:** Elements are accessed using the dot operator . along with the index.

```rust
let tup: (i32, i32, i32) = (1, 2, 3);
let first = tup.0; // 1
let second = tup.1; // 2
let third = tup.2; // 3
```

- **Destructuring Magic:** Tuples can be deconstructed to unveil individual elements.

```rust
let tup = (1, 2, 3);
let (x, y, z) = tup;
println!("The value of x is {x}, the value of y is {y}, the value of z is {z}");
// The value of x is 1, the value of y is 2, the value of z is 3
```

> Note: An empty tuple without any values has a special name – unit `()`, representing empty values or an empty return type.

---

## Arrays: Stacking Homogeneity

Arrays in Rust provide a stack-based haven for homogenous data types. Here's a glimpse of their characteristics:

- **Fixed Length:** Arrays uphold a fixed length, ideal for scenarios with a predetermined number of elements.

- **Homogeneous Storage:** They store similar data types, ensuring consistency.

```rust
let a = [1, 2, 3, 4, 5];
let first = a[0]; // 1
let second = a[1]; // 2
```

- **Destructuring Arrays:** Similar to tuples, arrays can be destructured to extract individual elements.

```rust
let a = [1, 2];
let [first, second] = a;
println!("The value of first is {first}, the value of second is {second}");
// The value of first is 1, the value of second is 2
```

---

## Differences and Similarities

### Differences:

1. Arrays are homogenous; tuples are heterogenous.

2. Tuples are stored in heap memory; arrays are stored in stack memory.

3. Elements of an array are stored in contiguous memory locations.

4. Tuples are initialized using parentheses (), while arrays use square brackets [].


### Similarities:

1. Both have a fixed length.

2. Both support destructuring.

3. Both are used to store multiple values.

4. Both are stored in stack memory.

5. Individual elements can be accessed using indices.


As I navigate the terrain of compound data types in Rust, the language's versatility and precision continue to captivate me. Follow my coding journey on [Github](https://github.com/Aniket200-ind/100dayscoding) for more updates! 💻🌐✨

#RustLang #Programming #LearningToCode #CodeNewbie #TechJourney #Day4
AI Essay Writer By Peachy Essay
Published: 2024-01-04 18:50:44


Certainly, it seems like you're interested in the concept of an AI Essay Writer offered by Peachy Essay. AI Essay Writers utilize artificial intelligence to generate high-quality essays, providing a unique and efficient approach to content creation. These tools are designed to understand and mimic human writing styles, making them valuable aids for academic or professional writing tasks. Peachy Essay's [AI Essay Writer](https://peachyessay.com/ai-essaywriter/) may offer features like grammar checking, style suggestions, and topic coherence to enhance the overall quality of the generated essays. It represents an innovative intersection of technology and academic support, streamlining the essay writing process.
Touhou Triple Triad Advances At 04/01/2024
Published: 2024-01-04 18:31:21

Here, you have some pictures of the game i'm currently developing with some friends. It is the Godot version of the game. Like some people can see, it takes place in the universe of Touhou with cards rules of Triple Triad (Final Fantasy). I would really like to have a very good prototype of game at the end of year. 😊
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7v8m0ti42w1gm4zzsnuv.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5ums0dicjrf182qmwarf.png)
JavaScript Interview: Run loop without pre-determined method
Published: 2024-01-04 18:12:08

This year I gave an interview at some organization and I was asked this question:

**Run a loop without using any pre-determined method or loops**.

Using **recursion** is the way to go!
Here's an example of how you can create a simple loop using recursion:

```javascript
function customLoop(counter, limit) {
  // Base case: exit the recursion when the counter exceeds the limit
  if (counter > limit) {
    return;
  }

  // Your loop logic goes here
  console.log(counter);

  // Recursive call to increment the counter and continue the loop
  customLoop(counter + 1, limit);
}

// Example: Run the loop from 1 to 5
customLoop(1, 5);
```

In this example, the `customLoop` function takes a `counter` and a `limit`. It prints the value of the counter and then calls itself with an incremented counter until the counter exceeds the limit, at which point the recursion stops.

Note that using recursion for loops may not be the most efficient solution in all cases, and it may have limitations due to the maximum call stack size. However, it serves the purpose of demonstrating how to create a loop without using traditional loop constructs.


Follow me for more such content:
YouTube: https://www.youtube.com/@ShameelUddin123
LinkedIn: https://www.linkedin.com/in/shameeluddin/
Github: https://github.com/Shameel123
Script to cleanse "/" Character in JS
Published: 2024-01-04 18:08:38

Hi All,
I am a developer but do not know Java Script.  I can kinda read it but can't write it. 

I am working in Oracle Net Suite and need to write a script to cleanse a BAI type file, which is a universal banking format that is used to record bank statement records/data.  

We found that the bank prepared raw format has an illegal Charcter ,"/", in some of the data - line 16 in field 5 of 7 fields.

I need to finds all instances, (in the raw, uncleansed Bai file) of "/" in code line 16, Field 5 (,,,,Field5,,) and replace it with " " (space).

Here is an example of 1 line in the BAI file that must be cleansed:
RAW LINE
16,165,150000,1,DD/1620,,DEALER PAYMENTS

CLEANSED LINE
16,165,150000,1,DD1620,,DEALER PAYMENTS

Does someone have a Java Script procedure that I can point a the raw file and have it find and replace any "/" instance found in line 16, field 5 as diplayed in the example above?

Logic
If line = 16 and field = 5 and instr(1,field5,"/")>0 Then
replace "/".

Many Thanks

Ross
ISO 3166 Ülke Kodları - Uluslararası Standardizasyon Örgütü (ISO)
Tags: iso, iso3166, isokodlari, ulkekodları
Published: 2024-01-04 18:01:15

---
title: ISO 3166 Ülke Kodları - Uluslararası Standardizasyon Örgütü (ISO)
published: true
description: ISO 3166 kodları, ülkelerin ve bölgelerin tanımlanması için kullanılan en yaygın standarttır.
tags: iso, iso3166, isokodlari, ulkekodları
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
# published_at: 2024-01-04 18:00 +0000
---

[ISO 3166](https://iso.ahmetcadirci.com/), ülkelerin ve bölgelerin tanımlanması için kullanılan bir standarttır. Bu standart, ülkelerin ve bölgelerin adlarını, kısaltmalarını ve kodlarını içerir. ISO 3166 kodları, ülkelerin ve bölgelerin tanımlanması için kullanılan en yaygın standarttır.

ISO 3166 Kodları Nasıl Oluşturulur?
-----------------------------------

ISO 3166 kodları, ülkelerin ve bölgelerin adlarına göre oluşturulur. Her [ülke kodları](https://iso.ahmetcadirci.com/) ve bölge için üç harfli bir kod belirlenir. Bu kodlar, ülkelerin ve bölgelerin adlarının ilk üç harfinden oluşur. Örneğin, Türkiye için ISO 3166 kodu "TUR" olarak belirlenmiştir.

ISO 3166 Kodları Neden Önemlidir?
---------------------------------

ISO 3166 kodları, ülkelerin ve bölgelerin tanımlanması için kullanılan en yaygın standarttır. Bu kodlar, uluslararası ticaret, seyahat ve iletişim gibi birçok alanda kullanılır. Ayrıca, [ISO](https://iso.ahmetcadirci.com/) 3166 kodları, ülkelerin ve bölgelerin adlarının farklı şekillerde yazılmasından kaynaklanan karışıklıkları önler.

ISO 3166 Kodları Nasıl Kullanılır?
----------------------------------

ISO 3166 kodları, birçok alanda kullanılır. Örneğin, uluslararası telefon kodları, posta kodları, para birimleri ve internet alan adları gibi birçok alanda [ISO kodları](https://iso.ahmetcadirci.com/) kullanılır. Ayrıca, ISO 3166 kodları, ülkelerin ve bölgelerin adlarının farklı şekillerde yazılmasından kaynaklanan karışıklıkları önlemek için kullanılır.

ISO 3166 Kodları Listesi
------------------------

ISO 3166 kodları, ülkelerin ve bölgelerin adlarına göre oluşturulur. Bu nedenle, ISO 3166 kodları listesi, ülkelerin ve bölgelerin adlarına göre alfabetik olarak sıralanır. ISO 3166 kodları listesi, uluslararası ticaret, seyahat ve iletişim gibi birçok alanda kullanılır.

Yazar: [Ahmet Çadırcı](https://ahmetcadirci.com/)
The Scrimba AI Engineer Path
Published: 2024-01-04 17:53:05

#### Length 7h 46 min


1.  Intro to AI Engineering

2. Open-source AI Models

3. Learn Embeddings and Vector Databases

4. Learn AI Agents

5. OpenAI's Assistants API

6. Build AI Apps with LangChain

[Learn AI](https://scrimba.com/learn/aiengineer)
Unlock "sudo" with TouchID on your Mac
Published: 2024-01-04 17:51:08

Since I got my [Magic Keybord with integrated TouchID](https://www.apple.com/shop/product/MK293LL/A/magic-keyboard-with-touch-id-for-mac-models-with-apple-silicon-us-english), I don't rely on my password anymore to authenticate myself on my local machine. **So I thought why not enable it for "sudo" commands in the Terminal as well?**

Here is how:

## Copy `sudo_local` file
```bash
sudo cp /etc/pam.d/sudo_local.template /etc/pam.d/sudo_local
```

## Edit `sudo_local` file

Uncomment the following line in the newly copied `sudo_local` file (e.g. with `sudo vi /etc/pam.d/sudo_local`):
```
auth       sufficient     pam_tid.so
```

Save the file, and voilà!

*You might have to `exit` your current shell or open a new one before it works*
What is PicsArt Mod Apk
Published: 2024-01-04 17:43:45

PicsArt Mod Apk is the modified version of the original app. It allows you to use all the gold and premium features for free to get amazing results. Yes, you read that right. PicsArt modded lets you access many effects, backgrounds, Drawing tools, templates, stickers, and many more.

Let me share a little-known fact. Users of PicsArt have the option to turn their normal images into glorious masterworks of creativity. Via PicsArt modded, you can add unlimited effects without any regulations. Moreover, If you want to become a skilled photographer, consider using the Picsart app. Also, You can share your edited videos and photos with your friends as well.

[PicsArt premium APK](https://picsartmodedapk.com/picsart-vs-canva/) allows you to upload works to social media platforms like Facebook, Instagram, and Twitter. The PicsArt Gold mod is truly remarkable. The most interesting thing is that you can enjoy all premium features free of cost.  A PicsArt Gold APK subscription is paid, but In its modded version, you can enjoy all the premium features for free. Through it, you can create high-quality pictures.

Now, you can take photos with any mobile phone and use PicsArt Gold to make them look like they were taken with an expensive camera. Download PicsArt Premium Unlocked to enjoy VIP access, a watermark-free experience, and an ad-free environment.

So, why wait? Quickly download this app now to enhance your editing abilities. Here is the interesting part, In this app, you can accept challenges and compete with others.
Unveiling My First AWS Bill: A Beginner's Journey into Cloud Costs
Tags: cloudcomputing, aws, devops, cloud
Published: 2024-01-04 17:34:03


#### Introduction:
Hey everyone! In December 2023, I dove headfirst into the fascinating realm of AWS, driven by a simple curiosity about the cloud. Little did I know that this journey would unfold into a valuable lesson on understanding the ins and outs of AWS billing.

#### Section 1: AWS Billing Overview:
AWS welcomes you with a user-friendly billing interface, where you only pay for what you use—a pretty sweet deal! Even though I was cruising along in the free tier, a surprise bill came knocking on my virtual door.

#### AWS Cost Management:
Navigating the financial side of AWS is made easier with AWS Cost Management. Picture it as your trusty sidekick in budget creation. To stay ahead of any unexpected costs, I set up a zero-budget alert, acting like a friendly reminder if I ever started to exceed those free tier limits.

#### The Oops Moment:
In my excitement to explore, I goofed up. I had several Elastic Compute Cloud (EC2) instances up and running, thinking I was being smart by consolidating my data into a single image for use in different places. Then there was this snapshot—about 30GB in size—that I created and completely forgot about. Surprise, surprise, after my free tier bid farewell, a bill showed up, courtesy of that unnoticed snapshot.

![Invoice from AWS ](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xfo6b51c0by5ntblf75x.jpg)
#### Conclusion:
Lesson learned: always keep an eye on the stuff you deploy in the cloud. If you're done with it, kick it to the virtual curb to avoid any surprise charges. And hey, those budget alerts? Golden. They're like your financial guardian angel, preventing any unexpected budget heartaches.

In this ever-evolving world of cloud tech, it's all about sharing experiences. Hopefully, by sharing mine, I've made navigating the AWS landscape a bit easier for you. Just remember, the cloud is fantastic, but it pays to be a savvy user. Happy cloud adventures!
Reverse, but not that way
Published: 2024-01-04 17:22:43

I tripped over these two things _again_, so maybe writing it down will plant it in my head.

## The thing about `reverse`

I want to reverse a string.  So easy.
```perl
my $str = 'WTF';
my $backwards = reverse $str;
say $backwards;
```
And of course it prints 'FTW'. But another time I want to log the reverse for debugging, so I say:
```perl
say reverse $str;
```
And it prints 'WTF'. Well, WTF.  What happened here? The `say` command applies list context to the arguments.  `reverse` in list context assumes you are passing it a list, and instead of reversing a string, it reverses the order of the list.  There's only one thing in the list, and so it yields that one string, but not backward. What needs to happen is to assert scalar context:
```perl
say scalar reverse $str;
```
## The thing about the `..` range operator

I started changing my idiom for `for` loops to use the range operator instead of the C-style assignment.  That is, I replace
```perl
for (my $i = $start ; $i <= $end ; $i++) { say $i }
```
with
```perl
for my $i ( $start .. $end )  { say $i }
```
And then one day, I need to count backward. I naively set `$start=9` and `$end=1` and expect it to give me a descending sequence.  Instead, the `for` loop doesn't appear to do anything at all.

What's going on? This is `bash` confusion (or `ksh` or `zsh`).  In the shell, the direction of a range can be inferred from its endpoints.
```sh
$ echo {1..9}
1 2 3 4 5 6 7 8 9
$ echo {9..1}
9 8 7 6 5 4 3 2 1
$ seq 1 3
1
2
3
$ seq 3 1
3
2
1
$
```
But in Perl, the range operator only works for increasing ranges; an attempt to descend will give an empty list.  The way to get a descending sequence is to fall back on `reverse`
```perl
for my $i (reverse 1 .. 9) { ... }
```
🚀 Unraveling Depth First Search (DFS): A Deep Dive into Recursive Exploration! 🎥
Tags: algorithms, beginners, programming, tutorial
Published: 2024-01-04 17:07:39

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

Hey coding enthusiasts! In my latest video, we take a plunge into the intricacies of Depth First Search (DFS) by navigating its recursive implementation. Join me on this journey as we unfold the power of recursion in understanding and implementing DFS for various applications.

🎥 Watch the video here: https://youtu.be/SuiYUV69XC8?si=e1fmgk0vaposRvg4
🎥 DFS Using Stacks: https://youtu.be/dXYsXgf9Em8?si=DWtNAzmILsSoC1pR
🔗 Dive into the code on GitHub: https://github.com/Vinay352/Leetcode_Complete_Solution/blob/main/CreateBinaryTree_DFS_BFS.java

Your questions and insights are immensely valuable, so please share your thoughts in the comments. Let's delve into the elegance of recursive DFS together! 💡🌐

Stay connected:
🎥 YouTube: https://www.youtube.com/@VinayJainDev3097
📚 Medium: https://medium.com/@vinay.j3097
📝 Dev.to: https://dev.to/vinay_jain_dev
🔗 GitHub: https://github.com/Vinay352
🐦 Twitter: https://twitter.com/vinayj3097
📸 Instagram: https://www.instagram.com/vinay_jain_dev/
📘 Facebook: https://www.facebook.com/vinayj3097/

#consistency #consistencymatters #consistencyiskey #consistent #algorithmmastery #algorithms #algorithm #problemsolving #programming #tutorial #tutorials #tutorialyoutube #youtubetutorial #videotutorial #coding #codingjourney #codinglife #java #javaprogramming #github #depthfirstsearch #dfs #recursion
How I Use Google's Gemini Pro with LangChain
Tags: python, ai, tutorial, programming
Published: 2024-01-04 17:00:26

Google's Gemini Pro is one of the newest LLMs publicly available, and to the surprise of some its relatively price competitive.

![Gemini Pro Pricing](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vin3nlq60w8hd6m2wc99.png)

Its effectively free while you're developing, and after you development is complete its relatively cheap, costing around $0.00025 per 1K characters (**characters**, not **tokens** like OpenAI), which is slightly more expensive than GPT-3.5-Turbo, and $0.0025 per image, which is effectively the same as OpenAI's GPT-4).

## Okay, I get it, how do I use it?


Let's start fresh with a new project. Assuming you're using Python >= 3.10, let's initialize a new virtual environment.

```sh
python -m venv env
source env/bin/activate
```

And let's install LangChain and our dotenv file loader first.

```
pip install langchain python-dotenv
```

Once that's done, we can install Gemini Pro's libraries and its LangChain adapter.

```
pip install google-generativeai langchain-google-genai
```

Next you need to acquire an API key, which can be done on the [Google MakerSuite](https://makersuite.google.com). In the top left of the page you should see a "Get API Key" button.

![API Key Button](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f9icwjzh0oco2n5d0zgl.png)

Click that button, then click "Create API Key in new project". 

![New Key Button](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/iw4uv7wwo2baq2ge5rim.png)

Copy the new API Key and save it to a .env file in your project directory.

```sh
GOOGLE_API_KEY=new_api_key_here
```

Now we can create a script that calls Gemini Pro via LangChain.

```python
import os

from dotenv import load_dotenv
from langchain_google_genai import ChatGoogleGenerativeAI
from langchain.prompts import PromptTemplate
from langchain.chains import LLMChain

load_dotenv()

GOOGLE_API_KEY = os.getenv("GOOGLE_API_KEY")

llm = ChatGoogleGenerativeAI(model="gemini-pro", google_api_key=GOOGLE_API_KEY)

tweet_prompt = PromptTemplate.from_template("You are a content creator. Write me a tweet about {topic}.")

tweet_chain = LLMChain(llm=llm, prompt=tweet_prompt, verbose=True)

if __name__=="__main__":
    topic = "how ai is really cool"
    resp = tweet_chain.run(topic=topic)
    print(resp)
```

And that's it! You've now integrated Gemini Pro with LangChain! If you're interested in learning more about LangChain and AI, follow us here on Dev.to as well as on [X](https://twitter.com/TimeSurgeLabs)! I also post a lot of AI and developer stuff on my [personal X account](https://twitter.com/Chand1012Dev)! We also have more articles on LangChain an AI on [our Dev Page](https://dev.to/timesurgelabs)!

Happy coding!
Issue found: Unable to verify core functionality of app
Published: 2024-01-04 16:51:11

I have provided details about the reason for the rejection of my application from Google Play on the following link. I would appreciate if you could provide me with an answer.

Please note that you should provide the actual link to your application details in place of "the following link" to ensure the recipient can access the information you're referring to.
The url is 

https://stackoverflow.com/questions/77757682/google-play-console-issue-found-unable-to-verify-core-functionality-of-app
En Popüler Emoji Anlamları ve Kullanımı
Tags: emoji, emojilist, emojiler, unicode
Published: 2024-01-04 16:48:06

---
title: En Popüler Emoji Anlamları ve Kullanımı
published: true
description: Emojiler, ilk olarak Japonya'da 1990'larda kullanılmaya başlandı.
tags: emoji, emojilist, emojiler, unicode
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
# published_at: 2024-01-04 16:47 +0000
---

1\. Emojilerin Tarihi ve Gelişimi
---------------------------------

Emojiler, ilk olarak Japonya'da 1990'larda kullanılmaya başlandı. İlk olarak sadece Japonca karakterlerle sınırlıydılar, ancak zamanla farklı dillerdeki kullanıcılar için de genişletildi. Günümüzde, emojiler neredeyse her platformda kullanılıyor ve her yıl yeni emojiler ekleniyor.

2\. Emojilerin Anlamları ve Kullanımı
-------------------------------------

[Emojiler](https://emoji.ahmetcadirci.com/), duyguları, nesneleri ve fikirleri ifade etmek için kullanılır. Örneğin, gülen yüz emoji, mutluluğu ifade etmek için kullanılırken, kalp emoji sevgi ve romantizmi ifade etmek için kullanılır. Emojiler, metin mesajları, e-postalar, sosyal medya gönderileri ve hatta iş e-postaları gibi birçok farklı iletişim aracında kullanılabilir.

3\. Emojilerin Unicode Kodları
------------------------------

Emojiler, Unicode Consortium tarafından standartlaştırılmıştır. Her [emoji](https://emoji.ahmetcadirci.com/), benzersiz bir Unicode koduyla tanımlanır. Bu kodlar, emojilerin farklı platformlarda tutarlı bir şekilde görüntülenmesini sağlar. Örneğin, gülen yüz emoji, Unicode kodu U+1F600 ile tanımlanır.

4\. Emojilerin Kültürel Önemi
-----------------------------

Emojiler, kültürel bir fenomen haline geldi. İnsanlar, emojileri kullanarak kendilerini ifade etmek ve duygularını paylaşmak için bir araç olarak kullanıyorlar. Ayrıca, emojiler, farklı kültürler arasında bir bağlantı kurmak için de kullanılır. Örneğin, bir Japonca konuşan kişi, bir İngilizce konuşan kişiyle iletişim kurarken, emojileri kullanarak duygularını daha iyi ifade edebilir.

5\. Emojilerin Geleceği
-----------------------

Emojilerin geleceği parlak görünüyor. Her yıl yeni emojiler ekleniyor ve emojilerin kullanımı giderek artıyor. Ayrıca, emojilerin kullanımı, yapay zeka ve diğer teknolojilerle birleştirilerek daha da geliştirilebilir. Bu, emojilerin gelecekte daha da yaygın bir şekilde kullanılacağı anlamına geliyor.

[https://emoji.ahmetcadirci.com/](https://emoji.ahmetcadirci.com/)

Yazar: [Ahmet Çadırcı](https://ahmetcadirci.com/)