teleren/devto huggingface dataset:
Looking for business partner.
Published: 2023-05-19 03:03:22

Hello.
Thanks for reading this suggestion.
I am Russian Full Stack Web and Mobile APP Developer Ivan.
I hope you are doing well, and I hope you are interested in new business with me.

Do you know about the US-based Upwork freelance platform?

If you know the Upwork freelance platform, that's fine.
You don't know about it, don't worry. I'll let you know.
Upwork is the world wide freelancing platform and works great for me. 


I need new Upwork account now, you will ask why?

I have earned over $10,000 per month on Upwork last year, but their policy rules no longer allow me to use my account and work there.
The reason my account was suspended is related to moving house of the war in Ukraine .
So I contacted Upwork support but they couldn't fix the problem.
If you lend me an your account, I will pay you back 10% of the money I earn.
Since I have enough skills and experience, I can make a lot of money on your account and you will receive money every month.
At first I can earn $2k-$3k per month, but after 4-6 months I can grow your account well and earn $5-$7k.
Finally after 1 year I will be making $10k+ per month and you can make $1k+ monthly without doing any work.

How should I use your account?

I am trying to use your account remotely using anydesk or teamview on my local PC.
I must use a your local PC because the Upwork platform always detects IP address.
Perhaps you can afraid of losing your PC data. Don't worry about it.
I don't want to see any data on your PC and You can see all my work if i use your pc remotely.
And then I will use only Google Chrome web browser to find jobs in upwork platform.
So, I don't want a high-end PC, I want a low-end PC to run my web browser.

How can I pay you?
 
In fact, you can see all my work history on Upwork.
So no problem here and It is very clearly.
I will let you know(you can check your account yourself) when I make money, after which I will withdraw money from Upwork to your paypal or payoneer and then will get back 90% of the total amount from your account. Of course you will manage all bank info, I don't have to know it.


It's more certain if you already have an account, but even better if you don't have one.
I will assist you in creating a new account.
Please let me know when you plan to create a new account.
I have a rich of experience with Upwork accounts and I need to discuss this because I will be using yours and it should match my skills.

Thank you for your interest in this project.
I hope you accept this offer and gain a lot with me.
If you are interested in my offer, please contact me on the follow platform.

Skype: live:.cid.b64830812c410bb4
Gmail: coryitpro@gmail.com
Discord: GoogleSuper#3900
Telegram: @dreamworktalent


Say “INTERESTING” and write where you are from in the first sentence to know that you are interested in the job.


Looking forward to your good reply.
Thank you very much.

Note: You must contact us via Skype, Discord or Telegram. After contact, we can continue the discussion.
Javascript (ES14): toSorted()
Published: 2023-05-19 03:22:43

ECMAScript proposal "Change Array by copy" by Robin Ricard and Ashley Claymore has been merge into ECMAScript standard. This proposal brings a lot of new toys, one of which is new array method: toSorted().

The toSorted() method is similar to sort

```
// Functionless
toSorted()

// Arrow function
toSorted((a, b) => { /* … */ })
```

The only difference is that it does not change the original array, calling this method returns a changed copy of the original array.


**sort()**
```js
const arr = [3, 4, 2, 5, 1];

console.log(arr.sort())
// [1, 2, 3, 4, 5] Returns a reference to original array, now sorted

console.log(arr)
// [1, 2, 3, 4, 5] The original array is mutated
```

**toSorted()**
```js
const arr = [3, 4, 2, 5, 1];

console.log(arr.toSorted()) 
// [1, 2, 3, 4, 5] Returns a new copy of arr that is sorted

console.log(arr) 
// [3, 4, 2, 5, 1] The original array is not affected
```

For more information, check out the following resources:

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/toSorted
My first book on Amazon! The Ruby On Rails Interview Bible 2023
Tags: amazon, kindle, books, publish
Published: 2023-05-19 03:22:16

Attention, Ruby on Rails enthusiasts and aspiring developers! We are thrilled to announce the release of an invaluable resource designed to catapult your programming career to new heights. Introducing "[The Ruby on Rails Interview Bible 2023](https://www.amazon.com/dp/B0C5MG4ZS1)" - a comprehensive guide that equips you with the knowledge, strategies, and confidence to excel in [Ruby on Rails interviews](https://www.amazon.com/dp/B0C5MG4ZS1). Whether you're a seasoned professional or just starting out, this book is your ticket to unlocking success in the competitive world of programming.
[AMAZON BOOK HERE](https://www.amazon.com/dp/B0C5MG4ZS1)
Other e-shops:
[KOJI](https://withkoji.com/@nezirz/su7d)
[GUMROAD](https://nezirzahirovic.gumroad.com/)
[![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/88uw6itxn7g8g1twe8wa.png)](https://withkoji.com/@nezirz/su7d)
Xoilac TV - Xem Bong Da Truc Tuyen
Published: 2023-05-19 02:38:56

Xoi lac TV - mot dia chi xem truc tiep bong da voi chat luong full HD cung voi nhung tran cau dinh cao cua cac giai dau hap dan. Xem ngay tai sanctuaryconcerts.org
108 Bac Ai, Tan Thanh, Tan Phu, Thanh pho Ho Chi Minh 700000, Viet Nam
0782263174
#xoilac #xoilac_tv #tructiepbongda #bongdatructuyen #sanctuaryconcerts
Xoilac TV
[](https://www.sanctuaryconcerts.org/)
[](https://medium.com/@sanctuaryconcerts.org)
[](https://www.facebook.com/sanctuaryconcertsorg)
[](https://www.youtube.com/@sanctuaryconcerts/about)
[](https://www.linkedin.com/in/sanctuaryconcerts/)
https://profiles.wordpress.org/sanctuaryconcerts/
https://wordpress.org/support/users/sanctuaryconcerts/
https://www.pinterest.com/sanctuaryconcerts/
https://vimeo.com/sanctuaryconcerts
https://www.amazon.com/gp/profile/amzn1.account.AF3PK3Y7KUHNDBJICWDEKXGWD4PA?preview=true&ref=uepas
https://github.com/sanctuaryconcerts
https://www.reddit.com/user/sanctuaryconcerts
For Loops in JavaScript | JavaScript #7
Tags: javascript, java, chatgpt, devops
Published: 2023-05-19 02:02:23

// Program to add first n Natural number 
// let sum = 0 
// let n = prompt("Enter the value of n")
// n = Number.parseInt(n)
// for(i = 0; i < n; i++){
//   sum += (i+1) 
// }
// console.log("Sum of first" + n + " natural number is " + sum)

/*
let obj = {
  ragner: 90,
  bjorn: 45,
  ivar: 57,
  sigard:23 
}
 // For In Loop 
for (let a in obj){
  console.log("Marks of " + a + "  are  "+ obj[a] )
}

// For of loop
for (let b of "Ragner") {
  console.log(b)
}
*/[](https://replit.com/@SkSage/For-Loops-in-JavaScript-9#index.js)
Rust的变量绑定
Published: 2023-05-19 01:53:19

- Rust是没有GC的，这个确实很神奇；

- 那么他怎么管理内存呢，有个所有权和借用的概念；通过这个来管理内存，基于这个理念还有个代码层面的东西比较重要，那就是作用域；作用域内存占用，作用域外内存销毁；啥是作用域呢，就是大括号 `{}`

- 通常能够看到一个变量只能绑定一个值，不能够更改绑定关系，比如`let x = 1` 你不能再写一行`let x = 2`; 其实这里的概念并不是强制性的；算是一个通用代码规范和理想的设计理念；你违规的也不会错，并不会影响编译和运行；所以这里的默认绑定关系不可变，可以理解为一种建议性的，而不是强制性；

- 换绑不会报错，比如执行下面的代码；但是会有warning
```
fn main() {
    let x: &str = "hello";
    let x = "world";
    println!("x = {}", x);
}
```
warning

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


```
shixiaolong@drake2shi ruststudy % cargo run  
   Compiling ruststudy v0.1.0 (/Users/shixiaolong/Documents/ruststudy)
warning: unused variable: `x`
 --> src/main.rs:2:9
  |
2 |     let x: &str = "hello";
  |         ^ help: if this is intentional, prefix it with an underscore: `_x`
  |
  = note: `#[warn(unused_variables)]` on by default

warning: `ruststudy` (bin "ruststudy") generated 1 warning (run `cargo fix --bin "ruststudy"` to apply 1 suggestion)
    Finished dev [unoptimized + debuginfo] target(s) in 0.74s
     Running `target/debug/ruststudy`
x = world
```

- 有些国内的教程存在误导性，或者说说的不清楚，很容易造成初学者误入歧途；比如下面：

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

> 这个站点的教程，这里明显是有问题的，修改绑定虽然不是造成error级别的错误，但是规范用法肯定不能这么用；[拉黑吧](http://docs.os2edu.cn/variable/) （学习一门新知识还真不能只听一家之言，兼听则明，偏听则暗；如果英文好最好还是直接追溯到信息源头）
Potential Drawbacks of Software Engineering as a Career
Tags: beginners, programming, career, devjournal
Published: 2023-05-19 01:32:00

Software engineering is a never-ending rollercoaster ride of learning. 

But it comes along with the added pressures of deadlines and bugs.

Some of the potential drawbacks are:

1. Long working hours

2. Tight deadlines

3. Stressful Work environment

4. Highly competitive field

5. Constant need to learn and adapt to new technologies and methodologies

6. Need to carve your own career path and growth plan


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dmu59lrofcvs4m3ydyam.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 about 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/).
Gerenciando versões do Node.js com NVM
Tags: node, nvm, webdev, javascript
Published: 2023-05-19 01:05:27

O que é o NVM?

O NVM (Node Version Manager) é uma ferramenta de linha de comando que permite instalar e gerenciar várias versões do Node.js em um único sistema operacional. Com o NVM, é possível alternar facilmente entre diferentes versões do Node.js para diferentes projetos ou necessidades. O NVM suporta várias plataformas, incluindo Linux, macOS e Windows.

Passo a passo para instalação do NVM no Linux:

- Abra o terminal e execute o seguinte comando para baixar o script de instalação:

```
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
```
- Feche e abra novamente o terminal ou execute o seguinte comando para recarregar as configurações do terminal:

```
source ~/.bashrc
```
- Verifique se o NVM foi instalado corretamente executando o seguinte comando:

```
command -v nvm
```
Se o NVM foi instalado corretamente, você deverá receber a mensagem: "nvm".

**Principais comandos do NVM**:

**Listar versões disponíveis para instalação**:
Antes de instalar ou tentar instalar uma versão do Node.js, vale a pena conferir se essa versão está disponível para instalação, para isso, execute o seguinte comando:

```
$ nvm ls-remote
```
**Listar versões instaladas**:
Para listar todas as versões do Node.js instaladas no seu sistema, execute o seguinte comando:

```
nvm ls
```
Você verá uma lista de todas as versões instaladas com um asterisco (*) indicando a versão atualmente em uso.

**Instalar uma versão**:
Para instalar uma nova versão do Node.js, execute o seguinte comando:

```
nvm install [versão]
```
Por exemplo, para instalar a versão 16.0.0, execute:

```
nvm install 16.0.0
```

**Usar uma versão do Node.js**:
Para usar uma versão específica do Node.js, execute o seguinte comando:

```
nvm use [versão]
```
Por exemplo, para usar a versão 16.0.0, execute:

```
nvm use 16.0.0
```

**Definição de versão por projeto**:
O NVM permite que você defina uma versão específica do Node.js para um projeto específico. Para fazer isso, crie um arquivo chamado "**.nvmrc**" no diretório raiz do seu projeto e adicione a versão desejada nele.

```
v16.0.0
```
Em seguida, execute o seguinte comando para usar a versão especificada no arquivo ".nvmrc":

```
nvm use
```
O NVM automaticamente detectará a versão especificada no arquivo "**.nvmrc**" e usará essa versão para o projeto.

**Conclusão**:
Se você trabalha com Node.js e em vários projetos, agora não é mais necessário ficar lembrando ou anotando em um post-it a versão de cada projeto. Acredito que com esses comandos básicos, você será capaz de gerenciar isso de uma forma bem mais fácil.

Até a próxima!
Updates from the 96th TC39 meeting
Tags: tc39, javascript, ecmascript
Published: 2023-05-19 00:47:56

There were several items on the agenda, this post focuses on feature proposals and their progress from the 96th TC39 meeting [May 16 - May 18 of 2023].

__Stage 4:__

* [Atomics.waitAsync](https://github.com/tc39/proposal-regexp-atomic-operators): asynchronous atomic wait.

* [RegExp v flag](https://github.com/tc39/proposal-regexp-v-flag): RegExp v flag with set notation + properties of strings"

* [Well-Formed Unicode Strings](https://github.com/tc39/proposal-is-usv-string): method to determine if a String is well-formed Unicode.


__Stage 3:__

* [Decorator Metadata](https://github.com/tc39/proposal-decorator-metadata): Extend the Decorators proposal by adding the ability for decorators to associate metadata with the value being decorated.

* [Float16Array](https://github.com/tc39/proposal-float16array): Float16 on TypedArrays, DataView, Math.f16round

__Stage 2:__

* [Base64 for Uint8Array](https://github.com/tc39/proposal-arraybuffer-base64):ArrayBuffer to/from Base64

* [Promise.withResolvers](https://github.com/tc39/proposal-promise-with-resolvers): Creates a Promise with the reject,resolveandpromise functions placed as methods
on the promise object itself.

* [Time Zone Canonicalization](https://github.com/tc39/proposal-canonical-tz): TC39 Proposal (stacked on Temporal) to improve handling of changes to the IANA Time Zone Database.

__Stage 1:__

* [Intl.ZonedDateTimeFormat](https://github.com/FrankYFTang/intl-zoneddatetimeformat): Intl Format for Temporal.ZonedDateTime
¿Cómo usar Container Queries?
Tags: css, webdev, frontend, español
Published: 2023-05-19 00:45:12

Este año 2023 ya es posible usar los container queries en nuestros proyectos de CSS, debido a que la mayoría de los navegadores ya lo soportan, se ve bastante genial pero ¿cómo implementarlo?

Vamos a ello 🫡!

Primero, tenemos que tener claro cuál va a ser nuestro elemento HTML "contenedor", en este caso vamos a tener un elemento `div` con la clase "contenedor" (muy original 😶‍🌫️), lo he colocado en esta etiqueta porque quiero aplicar mis estilos sobre `<section>`.

```html
<div class="contenedor">
  <section>
    <p>Párrafo 1</p>
    <p>Párrafo 2</p>
  </section>
</div>
```

Bien! con el HTML listo ahora vamos a declararlo en nuestra hoja de estilos, podemos tener "_contenedores anónimos_" o también podemos nombrarlos, en este caso vamos a ejemplificar uno con nombre.

A la clase `.contenedor` debemos entregarle dos propiedades:

- **container-name:** nombre de nuestro container query. 
- **container-type:** cómo va comportarse con respecto al "tipo de tamaño" que tendrá nuestro contenedor, que puede ser `size` o `inline-size`.

**Valores del container-type:**

- **size**: considera **eje x** y **eje y**, es decir, se va a extender tanto en alto y ancho con respecto al contenedor.
- **inline-size**: considera el **eje y**, es decir, sólo se va a extender a lo ancho con respecto al contenedor y no considerará el alto.

Nuestro css debería verse así:

```css
.contenedor {
   container-name: mobile;
   container-type: inline-size;
 }
```

Listo, le hemos entregado las dos propiedades que necesitábamos, también tenemos la forma corta/shorthand de escribirlo 👇:

```css
.contenedor {
   container: mobile / inline-size;
 }
```

Ahora, al declarar nuestro container-query recién creado, el patrón sería el siguiente 👇:

`@container` + `nombre del contendor` + `rango del contenedor`

En este caso he utilizado el ["_range-syntax_"](https://caniuse.com/css-media-range-syntax) para indicar que desde 1024px hacia abajo se active la propiedad.

Dentro de este vamos a colocar los estilos que necesitamos:

``` css
@container mobile (width <= 1024px) {
   section{
     background-color: red
   }

   p {
    color: pink
   }
 }
```
---

**¿Cómo "debuggear" mis container queries 🐛?**

Si estás usando el browser google chrome, al inspeccionar el sitio web te aparecerá destacado `container` y allí puedes ver incluso el nombre del container-query aplicado cuando te posicionas sobre el elemento hijo ✨

![Imagen ilustrando como revisar container-queries en google chrome](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mgxjx574iin9jdoo57bb.png)

He preparado un pequeño codepen con este mismo ejemplo para que puedas jugar y probar esta nueva regla tu mismo 😊.

{% codepen https://codepen.io/dereemii/pen/BaqqXGg %}

---


*Nota: si estás usando visual studio code probablemente te vas a encontrar con el warning: `"Unknown at rule @container"`, no te preocupes que ya se levantó el issue con el equipo de VSC y funcionará igualmente. 


Espero que te haya ayudado ✨!
Code Smell 213 - Hoisting
Tags: webdev, javascript, beginners, programming
Published: 2023-05-19 00:31:09

*You can prevent undefined*

> TL;DR: Declare your variables and watch the scope

# Problems

- Readability

- Least Surprise Principle violation

- Variable Shadowing 

# Solutions

1. Be explicit on declarations

2. Use ['const' declaration](https://dev.to/mcsee/code-smell-116-variables-declared-with-var-5mj) when possible.

3. Declare variables at the beginning of the scope.

4. Use strict mode

# Context

Hoisting allows variable declarations to be moved to the top of their containing scope during the compilation phase. 

Variables declared with var and function declarations are "hoisted" to the top of their respective scopes automatically in several languages.

# Sample Code

## Wrong

[Gist Url]: # (https://gist.github.com/mcsee/6d889d8015a9acd6b8de8382e7dd28fc)
```javascript
console.log(willBeDefinedLater); 
// Output: undefined (but no error)

var willBeDefinedLater = "Beatriz";
console.log(willBeDefinedLater); 
// Output: "Beatriz"
```

## Right

[Gist Url]: # (https://gist.github.com/mcsee/fe321a8c79ef2b6520e752ad091f20c3)
```javascript
const dante = "abandon hope all ye who enter here"; 
// Declaring a constant 'dante'
// with value "abandon hope all ye who enter here"

console.log(dante); 
// Output: "abandon hope all ye who enter here"

dante = "Divine Comedy"; // Error: Assignment to constant variable
```

# Detection

[X] Semi-Automatic 

We can perform mutation testing to check if changing the scope of the variables brings unexpected results. 

# Tags

- Mutability

# Conclusion

Hoisting is yet another magic tool some compilers provide to favor lazy programmers. 

But if it fights back in debugging time.

# Relations

{% post https://dev.to/mcsee/code-smell-116-variables-declared-with-var-5mj %}

{% post https://dev.to/mcsee/code-smell-42-warnings-strict-mode-off-c4d %}

# More Info

[Wikipedia](https://en.wiktionary.org/wiki/hoisting)

# Disclaimer

Code Smells are my [opinion](https://dev.to/mcsee/i-wrote-more-than-90-articles-on-2021-here-is-what-i-learned-1n3a).

# Credits

Photo by [Ash from Modern Afflatus](https://unsplash.com/de/@modernafflatusphotography) on [Unsplash](https://unsplash.com/photos/iiRQxPCDQ_Y)  
  
* * *

> The best error message is the one that never shows up.

_Thomas Fuchs_ 
 
{% post https://dev.to/mcsee/software-engineering-great-quotes-26ci %}

* * *

This article is part of the CodeSmell Series.

{% post https://dev.to/mcsee/how-to-find-the-stinky-parts-of-your-code-1dbc %}
Manage AWS Lambda Environment Variables with CLI Shell Script
Tags: aws, shellscript, lambda
Published: 2023-05-19 00:12:05


In this blog post, I introduce a script that allows you to efficiently manage the environment variables of an AWS Lambda function. 

This script provides the capability to:

1. Register a new variable: Add a new environment variable to the Lambda function.
2. Update an existing variable: Modify the value of an existing environment variable.
3. Delete a variable: Remove an environment variable from the Lambda function.

**Important Note on Updating Environment Variables**

When using the `aws lambda update-function-configuration` command to update the existing environment variables, it is crucial to pass both the environment variable you want to add or update **and all existing environment variables**. Failing to do so will result in the deletion of the existing environment variables. The script provided in this blog post takes this into consideration and ensures the proper handling of environment variables during the update process.

### Parameters

`function_name`: The name of the Lambda function.

`region`: The AWS region where the Lambda function is deployed.

`env_vars_upsert`: Key-value pairs of environment variables to be upserted (updated or inserted). 

- During the upsert process, the environment variable will be updated if it exists; otherwise, a new one will be registered.

- You can include any number of key-value pairs.
```sh
env_vars_upsert=(
  "MY_ENV1" "value1"
  "MY_ENV2" "value2"
)
```

`env_vars_remove`: Keys of environment variables to be removed.

- If the specified key does not exist, nothing will happen.

```sh
env_vars_remove=("MY_ENV3" "MY_ENV4")
```

{% embed https://gist.github.com/shimo164/6677b9a0b7efbd7298a029fd9b6718c8 %}

### Output

The script will response in JSON format. The "Environment" section will display the updated state of the environment variables.

```json
{
    "FunctionName": "xxxx",
    ...

    "Environment": {
        "Variables": {
            "MY_ENV2": "value2",
            "MY_ENV1": "value1"
        }
    },
    ...
}
```

### Summary

I introduced a shell script for managing AWS Lambda environmental variables, enabling users to register, update, and delete variables with ease. This script also takes into consideration the prevention of accidental deletions, ensuring safe and efficient management of your Lambda function's environmental variables.

### Caution

Before using this script in a production environment, please create a test Lambda function and test it thoroughly to ensure it works as expected.
Python Loops: For Loops and While Loops — Day 108 of #365DaysOfCode
Published: 2023-05-19 00:01:20

Day 108 of #365DaysOfCode and Day 8 of #100DaysOfPython & #100DaysOfCode! Today, I dedicated most of my time to catching up on the Python course. In this blog post, I want to share my learning journey with you, specifically focusing on Python for loops. This post is especially for those who are just setting out on their coding journey or those simply wanting to refresh their Python basics.

For loops are a fundamental construct in Python that allow us to iterate over a sequence of elements. They provide a concise and efficient way to perform repetitive tasks or iterate through collections such as lists, tuples, or strings. The structure of a for loop consists of an iteration variable, an iterable, and a block of code to be executed for each iteration.

For loops are a fundamental construct in Python that allow us to iterate over a sequence of elements. They provide a concise and efficient way to perform repetitive tasks or iterate through collections such as lists, tuples, or strings. With for loops, we specify the iterable and execute a code block for each item in the iterable.

While loops, on the other hand, allow us to repeatedly execute a block of code as long as a specified condition is true. They are useful when the number of iterations is not known beforehand or when we want to continuously repeat an action until a certain condition is met.

By leveraging loops, we can efficiently perform repetitive tasks and process data collections. Hope this was helpful. Happy coding!