teleren/devto huggingface dataset:
About Leavime - Leavime Bio Profil
Tags: beginners, javascript, programming, opensource
Published: 2023-05-22 14:01:07


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

[Leavime](https://www.leavime.com) is a comprehensive website that covers a wide range of topics, including finance, tips, technology, designs, and news. This platform offers readers with valuable information and insights on various subjects to help them stay informed and up-to-date. 
The finance section of [Leavime](https://www.leavime.com) provides readers with practical tips and advice on managing their finances. This includes topics such as budgeting, investing, saving, and debt management. Readers can learn how to make sound financial decisions and achieve their financial goals through the informative articles and resources available on the website.
The tips section offers readers with a range of useful tips on various subjects. This includes health, beauty, travel, and lifestyle tips, among others. The articles are written in a clear and concise manner, making it easy for readers to understand and implement the tips in their daily lives.
The technology section covers the latest trends and innovations in the world of technology. This includes topics such as gadgets, software, and applications. Readers can learn about the latest products, their features and benefits, and how to make the most of them.
The designs section offers readers with insights on graphic design, web design, and other related topics. This includes articles on color theory, typography, layout, and branding, among others. Readers can learn how to create stunning designs and improve their skills in design through the informative articles and resources available on the website.
Finally, the news section provides readers with the latest news and updates on various topics. This includes current events, politics, business, and entertainment news. Readers can stay informed on the latest developments in the world by visiting this section of the website.
In conclusion, [Leavime](https://www.leavime.eu.org) is a comprehensive platform that provides readers with valuable information and insights on various subjects. Whether you are looking for financial advice, tips, technology trends, design insights, or news updates, this website has got you covered.
Leavime other websites:
• [Money Info](https://moneyinfo.site)
• [Glass Styles](https://www.glassstyles.eu.org)
• [Pic Wallpapper](https://www.picwallpapper.eu.org)
• [News Goods Tee](https://newsgoodstee.com)
• [KUKOH](https://www.kukoh.com)
• [Bosz Desa](https://www.boszdesa.com)
• [Creative Maju](https://www.creativemaju.com)
• [Luincah](https://www.luincah.com)
• [Koplexs Studio](https://koplexsstudio.com)
• [Rita Movie](https://ritamovie.xyz)
• [Countena](https://www.countena.com)

Please support me. Thank You.
MEMORABLE VACATIONS
Published: 2023-05-22 13:59:27

Dear perfect friends 
how are you????????
I'm kind person to every one nothing to all are yes!!!!
In my life there are memorable vacations 
which carried out to mine even are funny or serious 
let's talk to this I was born , I have perfect
parent ,I didn't forget time passed with fall in love
I don't forget I don't forget, It can't.
Now I'm  interested in coding because 
It's way of finding my job  
I like web development, java script and
software development are biggest way 
of finding money.

THANKS!!!
Duplicate Emails | LeetCode | MSSQL
Tags: leetcode, mssql, beginners, codenewbie
Published: 2023-05-22 13:56:23

## The Problem

The task is to identify all duplicate emails from the `Person` table where each row contains an email that has no uppercase letters. The `Person` table has the following structure:

Table: Person

| Column Name | Type    |
|-------------|---------|
| id          | int     |
| email       | varchar |

Here, `id` is the primary key, and it's guaranteed that the `email` field is not NULL.

## Explanation

Consider the following sample input for the `Person` table:

| id | email   |
|----|---------|
| 1  | a@b.com |
| 2  | c@d.com |
| 3  | a@b.com |

In this case, the output will be:

| Email   |
|---------|
| a@b.com |

Here, `a@b.com` is a duplicate email as it occurs twice.

## The Solution

We present two SQL solutions with varying strategies and trade-offs.

### Source Code 1

The first solution creates a Common Table Expression (CTE) called `duplicate`, which assigns a row number to each email, partitioning by the email itself. This effectively counts the instances of each email. The outer query then selects distinct emails where the row number (i.e., the count) is greater than one. 

```sql
WITH duplicate AS (
  SELECT
    email AS Email,
    ROW_NUMBER() OVER (PARTITION BY email ORDER BY email) AS rn
  FROM Person
)
SELECT DISTINCT Email
FROM duplicate
WHERE rn > 1
```
This solution is relatively complex due to the use of window function and may be less performant, with a runtime of 790ms, which ranks in the 40.90% percentile.

![Performance1](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d178neq5rakfmcp9w7ou.png)

### Source Code 2

The second solution uses `GROUP BY` to group all emails and `HAVING` to filter those with a count greater than one. It's simpler and more performant than the first, with a runtime of 641ms, which ranks in the 78.49% percentile.

```sql
SELECT email AS Email
FROM Person
GROUP BY email
HAVING COUNT(*) > 1
```
![Performance2](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ycjo8def2a3yxy47o0xx.png)

## Conclusion

Both solutions successfully identify duplicate emails. The first solution is more complex and potentially less performant but demonstrates the use of window functions. The second solution is simpler, more readable, and more performant, showing the power of grouping and aggregation in SQL. When writing SQL queries, consider trade-offs between complexity, performance, and readability.

You can find the original problem at [LeetCode](https://leetcode.com/problems/duplicate-emails/description/).

For more insightful solutions and tech-related content, feel free to connect with me on my [Beacons page](https://beacons.ai/ranggakd).

{% embed https://beacons.ai/ranggakd %}
Esquema de una VPN en Windows
Tags: vpn, windows, server, desktop
Published: 2023-05-22 13:46:58

En la siguiente lámina gráfica se aprecia la organización de una VPN en Windows entre dos puntos extremos, por un lado el servidor y por el otro lado el cliente.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l9ckm6x9o3xv5pp067s6.jpg)
Las aplicaciones involucradas son tres: radmin-vpn, radmin server y radmin viewer. Las mismas pueden ser descargadas desde este enlace "[Radmin: software de escritorio](https://www.radmin.com/es/download/)".
Si desea conocer más a Radmin Server haga [clic aquí](https://helpdesk.radmin.com/kb/faq.php?id=289) para leer la guía de la instalación del producto.
We're in! Cohort #2 of Cloudflare Workers Launchpad
Published: 2023-05-22 13:41:46

It's been super hard keeping this from you all for so long, however, we're happy to announce our participation in the second cohort of the Cloudflare Workers Launchpad program, a program by Cloudflare to  help support the over one million developers building on Cloudflare’s Developer Platform, many of which are startups leveraging Cloudflare to ship faster, scale more efficiently, and accelerate their growth.

Speech Labs is **one of 25 companies** to be accepted into the program, and we are eternally grateful to the team members at Cloudflare for allowing our participation in the program.

[Take a look at the blog post Cloudflare has published](https://blog.cloudflare.com/launchpad-cohort2/)

![Logo bubble of Cohort #2 of Cloudflare Workers Launchpad companies](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5atnceycof7j63w8hnjp.png)

## Demo Day

Cloudflare will be hosting a Demo Day on August 17 with all of the companies included in this cohort. Further details are to be announced, however, we can confirm Speech Labs will be doing a presentation at the demo day.

You can watch along on August 17 at [Cloudflare TV](https://cloudflare.tv/live)

Thank you to all our supporters for helping us so far — we'll hopefully be sharing some news about the platform and its release soon 🤞
Weather App in ReactJS & Material UI
Tags: react, javascript, frontend, webdev
Published: 2023-05-22 13:35:02

Hello Friends, 
I have a new blog. In this blog, you can get a complete source code of **Weather App** which is created in **ReactJS** & **Material UI**. 

{% youtube j27ztIbTpU4 %}
## Instructions to follow
### Create an app
```
npx create-react-app your_app_name
```
Goto your app folder and do this...

### Install Axios
```
npm install axios
```

### Install Material UI
```
npm install @mui/material @emotion/react @emotion/styled
```

## Source Code on [GitHub](https://github.com/MadhubanKhatri/weather-react-app)
Help Needed with JavaScript Code for Automatic Submission on Intel Core vPro Laptop
Tags: javascript, programming, productivity, beginners
Published: 2023-05-22 13:30:06

I hope you're all doing well. Currently, I'm utilizing an [**intel core i5 vpro**](https://www.lenovo.com/gb/en/faqs/pc-life-faqs/what-is-vpro/
) laptop for my programming tasks. I'm currently facing an issue with JavaScript, specifically regarding the automation of form submission based on a "Yes" or "No" field.

Here's the scenario: I have a form where users can select either "Yes" or "No" to indicate their satisfaction. Once they make their selection, the form should automatically submit. The "Yes" or "No" value is included in the URL.

To achieve this one-click satisfaction option, I've attempted to implement the following JavaScript code:

 <script type="text/javascript" charset="utf-8">
$(document).ready(function() {
  if ("{INSERTANS:OneClick}" == "Yes")
    $('#movesubmitbtn').click();
});
</script>

Unfortunately, this code doesn't seem to work as intended. I've even tried changing the "Yes" value to "Y" but still no luck.

I would greatly appreciate any assistance or suggestions from the community. If you have encountered a similar issue or have expertise in JavaScript, your insights would be invaluable.
If anyone has encountered a similar problem or has suggestions on how to make the automatic form submission work, please share your thoughts in this thread. Your help will be greatly appreciated.

Thank you all in advance for your support and expertise!

Best regards,
Tammy Gombez
Connect GCP VM Instances with VS Code on Windows 10
Published: 2023-05-22 13:24:32

In this blog we are going to see how connect GCP VMs with VS Code on Windows 10 machine.

Please refer the below step by step for your reference.

**Step 1: Install google cloud cli on your local machine**

Install cloud SDLK using the https://cloud.google.com/sdk/docs/install. I’ve installed via PowerShell command on my local windows machine, you can choose installation method based on your OS.


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




**Step 2: Open Cloud SDK and login using below command**

```
gcloud init
```

And login with your GCP’s account


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


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




**Step 3: Open PowerShell and execute below command to create SSH key**

```
ssh-keygen -t rsa -f [KEY_FILENAME] -C [USERNAME]
```
- [KEY_FILENAME] is the name of SSH key file that will be created
- [USERNAME] is the username that will use to log in that VM

```
ssh-keygen -t rsa -f keyfile -C mytest@gmail.com
```

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



This command will create private and public key.

**Step 4: Login GCP console and navigate VM which is created already**

Go to Compute Engine-> Click VM instances tab-> Click VM name


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

Click Edit and find SSH Key option save your public key which is created earlier.


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



Click + ADD ITEM and save your public key


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



Save and now ready to connect using VS code.

**Step 5: Connect with VS code**

Install Remote - SSH extension


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


Now click Remote— SSH and Press “+”


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



Enter the below command to create connection

```
ssh -i C:\\Users\\[YourUser]\\[KEY_FILENAME] [USERNAME]@[VM's IP]
[VM’s IP]- Use external IP of your VM
```

Now click the IP address to establish connection.


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

**Conclusion**:

Now successfully connected GCP VM’s with VS code on windows 10 machine. Hope this helps !

Happy learning !
How to encode/decode data with a RSA key?
Tags: tutorial, python, howto
Published: 2023-05-22 13:18:00

A lot of data is currently on internet and using cloud infrastructures, so if we have private/sensitive datas, we must protect them!

That's why today  we will see how to encode/decode data with a RSA key.

## What is a RSA key?
A RSA key is a pair of key which allows us to do **asymmetric encryption**.

Composed of a **public and a private key**, **the first one is used to encode messages which can only be decoded by the second one.**

---

## Generate a key

In our example, we will see how to generate a RSA key in Python, but you can generate one using a terminal. Here is a post where I explain how to do it.

[Link post - How to generate a SSH RSA key](https://dev.to/mxglt/how-to-generate-a-ssh-rsa-key-1m55)

### Setup
Before going forward, we must install **pycryptodomex** with the following command

```bash
pip install pycryptodomex
```

### Code
```python
from Crypto.PublicKey import RSA 

# Generate a RSA key
rsa_key = RSA.generate(2048) 

# Export private and public keys
private_key = rsa_key.exportKey("PEM") 
public_key = rsa_key.publickey().exportKey("PEM") 

# Écriture des clés dans des fichiers
fd = open("private_key.pem", "wb") 
fd.write(private_key) 
fd.close() 

fd = open("public_key.pem", "wb") 
fd.write(public_key) 
fd.close()
```

As you can see, with pycryptodomex I really easy.

---

## Encode/decode data

Now that we have our keys, we can easily encode and decode data with **pycryptodomex**.

```python
from Crypto.Cipher import PKCS1_OAEP 
from Crypto.PublicKey import RSA 

message = b'Test message' 

public_key = RSA.import_key(open('public_key.pem').read()) 
cipher = PKCS1_OAEP.new(public_key) 
ciphertext = cipher.encrypt(message) 
print(ciphertext) 

private_key = RSA.import_key(open('private_key.pem').read()) 
cipher = PKCS1_OAEP.new(private_key) 
decoded_message = cipher.decrypt(ciphertext) 

print(decoded_message.decode("utf-8"))
```

And if you test the code, you should see the message "Test message" encoded, then full decoded!

So with this, you now know how to encode/decode data with a RSA key!

I hope it will help you! 🍺

---

<center><h3>You want to support me?</h3></center>
<a href="https://www.buymeacoffee.com/mxguilbert7" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/default-orange.png" alt="Buy Me A Coffee" height="41" width="174"></a>
Comment chiffrer/déchiffrer des données avec une clé RSA?
Tags: howto, tutorial, python, french
Published: 2023-05-22 13:15:00

Aujourd'hui, beaucoup de données passent par internet et par les infrastructures cloud, par conséquent dès que ces informations deviennent sensibles et/ou privées il faut mettre en place quelque chose pour limiter la visibilité dessus.

C'est pour cela qu'on va voir aujourd'hui comment chiffrer/déchiffrer des données avec une clé RSA.

## Qu'est-ce qu'une clé RSA?

Une clé RSA est une **paire de clé** permettant d'effectuer du **chiffrement asymétrique**.

Composé d'une **clé publique** et d'une **clé privée**, la première est utilisée **pour chiffrer des messages qui ne pourront être déchiffrés que par le propriétaire de la deuxième.**

---

## Générer une clé

Dans notre exemple d'aujourd'hui, on va voir comment générer une clé RSA en Python, mais vous pouvez regarder l'article suivant où je décris comment le faire depuis un terminal.

[Lien article - Comment générer une clé SSH RSA?](https://dev.to/mxglt/comment-generer-une-cle-ssh-rsa--2hfc)

### Setup
Avant d'effectuer quelconque développement, nous devons installer **pycryptodomex**

```bash
pip install pycryptodomex
```

### Code
```python
from Crypto.PublicKey import RSA 

# Génération de la clé
cle_rsa = RSA.generate(2048) 

# Export des clés publique et privée
cle_privee = cle_rsa.exportKey("PEM") 
cle_publique = cle_rsa.publickey().exportKey("PEM") 

# Écriture des clés dans des fichiers
fd = open("cle_privee.pem", "wb") 
fd.write(cle_privee) 
fd.close() 

fd = open("cle_publique.pem", "wb") 
fd.write(cle_publique) 
fd.close()
```

Comme vous pouvez le voir, avec la librairie, la génération d'une clé RSA reste très simple.

---

## Chiffrer/déchiffrer des données

Maintenant que l'on a nos clés, il nous est simple de chiffrer et déchiffrer les données, toujours grâce à **pycryptodomex**.

```python
from Crypto.Cipher import PKCS1_OAEP 
from Crypto.PublicKey import RSA 

message = b'Ceci est un message de test' 

cle = RSA.import_key(open('cle_publique.pem').read()) 
cipher = PKCS1_OAEP.new(cle) 
ciphertext = cipher.encrypt(message) 
print(ciphertext) 

cle = RSA.import_key(open('cle_privee.pem').read()) 
cipher = PKCS1_OAEP.new(cle) 
message_dechiffre = cipher.decrypt(ciphertext) 

print(message_dechiffre.decode("utf-8"))
```

Si vous faites votre test, vous devriez voir le message "Ceci est un message de test" chiffré, puis apparaître après le déchiffrement!

Et voilà! C'est aussi simple que ça!

J'espère que ça vous sera utile! 🍺

---

<center><h3>Vous voulez me supporter?</h3></center>
<a href="https://www.buymeacoffee.com/mxguilbert7" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/default-orange.png" alt="Buy Me A Coffee" height="41" width="174"></a>
말은 참 쉽다 - 2편
Tags: 아니면말고나빠요
Published: 2023-05-22 13:14:33

SNS에서 신문 기사나 특정 소식들을 바탕으로 훈수두는 업계 유명인들이 많다. 특히 드러난 현상과 결과만을 가지고, 엄청나게 많은 내용들을 넘겨짚어 비판하고 비난하는 내용들은 부지기수다. 기업과 조직을 한 번이라도 운영하고 리드해 봤다면, 밖으로 들어나는 현상과 결과 저변에 있는 여러 복잡한 사정이 있음을 알 수 있다. 그럼에도 이렇게 쉽게 넘겨짚고, 확증편향된 생각으로 과장, 축소해서 자신이 말하고자 하는 바를 관철시키려는 행동이 과연 정당한가. 특히 그가 SNS상에서 영향력 있는 사람이면 일수록 더 그 펜의 무게를 알아야 하지 않을까? 남을 비판하긴 너무도 쉽다. 특히 정보가 부족할 때 펜이 무기로 사용될 때가 많다. 자신의 펜이 총과 칼보다 무서운 무기로 사용된다는 점을 인지했을 때, 그 비판의 무기가 정확한 정보 기반으로 사용되어야 한다는 책임의식도 없는 것인가. '아니면 말고'식의 태도가 언론에서 주로 너무 흔하게 사용되니 전염이 된 것인가.
Essential Healthcare Equipment: Ensuring Quality Care and Patient Safety
Tags: webdev
Published: 2023-05-22 13:05:02

In the healthcare industry, the availability of reliable and high-quality medical equipment plays a crucial role in providing effective diagnosis, treatment, and care for patients. From diagnostic tools to therapeutic devices, [healthcare equipments](https://www.j2medicalsupply.com/) is instrumental in improving patient outcomes and ensuring the safety of both patients and healthcare providers.
Hover Parallax Animation using React, TypeScript TailwindCSS and GSAP
Tags: gsap, react, tailwindcss, typescript
Published: 2023-05-22 13:03:26

Creative web development is one of my favourite things to do as a frontend engineer. I came across this tutorial below which was written in Vue.js and I decided to write mine in React using Next.js framework. 

{% youtube Hkg2Dny5Nao %}

**Project Setup**

Read more about it [here](https://nextjs.org/learn/basics/create-nextjs-app/setup)

```
npx create-next-app@latest hover-parallax-animation
```
Next.js 13 comes with tailwindCSS installed automatically. Check it out [here](https://nextjs.org/docs/getting-started/installation)


**Final Work**

Check it out [here](https://codesandbox.io/p/sandbox/hidden-river-26nbvh?file=%2Futils%2Fanimation.ts%3A1%2C1)

{% codesandbox hidden-river-26nbvh %}
Hashmap in python.
Tags: python, datascience, programming
Published: 2023-05-22 12:59:50

**Hashmap in python.**
Hashmaps are indexed data structures which are also known as hash tables. They are used to compute the index with a key into an array of slots. Hashmaps are unique and immutable. Ideally hashmaps will store key-value pairs and the key are generated using a hash function.
Hashmaps can be compared to closet having several drawers where each drawer is used to store specific clothes. These drawers are labelled with the name of clothes they store. Hashmaps makes it easier and faster to access data.
In python hashmaps are implemented using built in function called dictionary. To understand more about the application of hash map I have used this example from letcode (https://leetcode.com/problems/two-sum/description/)

> Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target.
You may assume that each input would have exactly one solution, and you may not use the same element twice.
You can return the answer in any order.

>Example 1:
Input: nums = [2,7,11,15], target = 9
Output: [0,1]
Explanation: Because nums[0] + nums[1] == 9, we return [0, 1].

>Example 2:
Input: nums = [3,2,4], target = 6
Output: [1,2]

As we can see we have a list of values stored in a variable named nums
Also, we have a target that is the sum of two values from the list
We are supposed to find the two values in the list those add up to the target and give them as an array. This is how we can achieve this.

```
class Solution(object):
    def twoSum(self, nums, target):
	#initialize the hashmap to sore the values
        compliment_dict= {}
	 #loop through the values in the list
        for values in range(len(nums)):
            compliment= target-nums[values]
            if compliment in compliment_dict:
                return compliment_dict[compliment],values
            compliment_dict[nums[values]] = values

```

**Conclusion**
Here hashmap is used to store the element of an array. We iterate through the array and for each element we check for the compliment (target- current element). If the compliment exists in the hashmap it means  that we have two numbers those can add up to the target.