teleren/devto huggingface dataset:
How to Specify a Node Version in Repl.it
Tags: node, javascript
Published: 2022-08-17 21:24:08

I was recently trying to use a later version of Node on Repl.it. I wanted to use a package that supported ES Modules, and the default version did not have support for it. So I wanted to use the latest node version in Repl.it. And found that there was no direct way of doing so. But it is still possible with a few custom steps.

## The setup

Repl.it allows specifying the node.js version as part of the package.json itself. But it does not use the installed version by default when running the script. But before we get to that, we need to install our node version in repl.it. To do so, we go to the package.json and add the version we want. Or we could have used the package manager interface to do so:

![](https://cdn-images-1.medium.com/max/2048/0*jc1i99XFq2pRqkkU.png)

## Configuring Repl.it

Once this is set up, we need to use this version instead of the default Repl.it Node.js version. We need to make use of a configuration for Repl.it by creating a file named .replit. You can read more about it [here](https://docs.replit.com/programming-ide/configuring-run-button) if you are interested.

In this file, we will add the contents:

    run="npm start"

This will execute Node from the shell instead of the console. And then all that is left to do is configure the start script in our package.json file:

    "scripts": { "start": "node ." }

If we wanted to start using the latest version for the shell as well, we can execute the following command in the shell:

    npm config set prefix=$(pwd)/node_modules/node && export PATH=$(pwd)/node_modules/node/bin:$PATH

Optionally, we might want to re-install the packages installed if we want to target them to the higher version of node.js that we just installed.

And that should be it. Our custom Node version in Repl.it should be ready and good to go. As soon as we hit the Run button, the index.js script will be executed using the node version we specified in our package.json.

If you have any questions regarding this, feel free to drop a comment below!

*Originally published at [https://www.wisdomgeek.com](https://www.wisdomgeek.com/development/web-development/javascript/specifying-a-node-version-in-repl-it/) on September 13, 2021.*
Javascript Map Function Explained with Code
Tags: javascript, tutorial, webdev, beginners
Published: 2022-08-17 21:22:00

**Learning outcomes of this tutorial**
Map function explained


**Map fucntion**
Map function returns a new array based upon original array. Original array dosen't gets modified.

Map function can at most accept 3 parameters current Element, index, orignal Array of which index and orignal Array parameters are optional to add.

```js
const orignalArray=[1,2,3,4,5]
const newArray = orignalArray.map((currentElement,currentIndex,orignalArray)=> 
     {return currentElement*2}
)
console.log("orignalArray: ",orignalArray)
console.log("new Array: ",newArray)
```

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

That's it for this blog.

Happy Learning !!
Happy Coding !!
Infraestrutura Global da AWS - Zonas de Disponibilidade e Regiões
Tags: aws, cloud, beginners
Published: 2022-08-17 21:17:53

Neste post vamos entender um pouco mais sobre a infraestrutura abrangente, confiável e segura da Amazon Web Services (AWS).

Atualmente, a Nuvem da AWS possui 84 zonas de disponibilidade (availability zones ou AZs) em 26 Regiões (Regions) geográficas ao redor do mundo e já tem planos para mais 24 AZs e 8 regiões. Na figura a seguir, podemos ver as regiões existentes e futuras da AWS.

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

Mas afinal de contas, o que são Zonas de Disponibilidade e Regiões?

De acordo com a AWS, uma região é um local físico em todo o mundo onde datacenters são agrupados. Cada região da AWS consiste em várias AZs isoladas e separadas fisicamente em uma área geográfica. Cada AZ tem energia, refrigeração e segurança física independentes e está conectada por meio de redes redundantes de latência ultrabaixa. 

As AZs proporcionam aos clientes a capacidade de operar aplicativos e bancos de dados de produção com alta disponibilidade, tolerância a falhas e escalabilidade em níveis superiores aos que um único datacenter pode oferecer. As AZs são fisicamente separadas por uma distância significativa (vários quilômetros) das outras AZs, embora todas estejam em um raio de até 100 km entre si.

Na América do Sul existe uma Região com três Zonas de Disponibilidade, localizada em São Paulo.

Na figura a seguir, podemos entender melhor como que Regiões e AZs se relacionam. 

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

Referência:
Infraestrutura Global da AWS - https://aws.amazon.com/pt/about-aws/global-infrastructure/?p=ngi&loc=1
You can never stop learning as a developer
Tags: devphilosophy
Published: 2022-08-17 21:00:42

---
title: You can never stop learning as a developer
published: true
description: technology is growing at light speed
tags: devphilosophy
cover_image: https://images.unsplash.com/photo-1546146830-2cca9512c68e?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=880&q=80
# Use a ratio of 100:42 for best results.
---


As today technology is growing at light speed, new frameworks, new code language, everything is being created and being evolved at light speed.

Being dev you might sometimes or always find yourself that you sometimes need to do self-taught. Schools, bootcamps, University, etc these are just gonna taught how to basic or most of the fundimenal things and rest of the topics are you need to learn by yourself. 

By the time you top learning, you get left behind (technologically) if you want to become a developer you first need to learn - “how to learn”.

## One thing to consider

learn only the things you gonna need, it’s doesn’t matter or serious which programming to learn to must learn. Learn what you need, use them as a tools and really programming languages and frameworks are just tools that you gonna need for your project. If you need that tool learn how to use it, that’s all.


Good luck in your journey,
-Austin Rolert
REST vs RPC
Tags: api, architecture, webdev, programming
Published: 2022-08-17 20:57:00

There's a history of arguments about REST.

REST (Representational State Transfer) is a specific way to share data (using the specs for HTTP and URI), designed around client-server architectures.

This is a modified version of a concept that Martin Fowler refers to as the "Richardson Maturity Model (RMM)".

It's a way to evaluate RESTfulness.

![A spectrum of RESTfulness from RPC to REST](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c7lb89kvn14hkzgsoggs.png)

Roy Fielding, who was involved in developing HTTP and URI (legend), introduced REST in his famous [dissertation](https://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm).

REST was designed to supersede RPC (not SOAP!).

RPC (Remote Procedure Call) is another way to share data, where an app calls a function in another app, as if they shared the same execution environment.

Leonard Richardson's model (RMM) describes the relationship between REST and RPC.

Each stage of maturity towards REST relies more on HTTP and URI specs than the previous.

Funnily enough, the original Web3 concept was about full discoverability: the Semantic Web.

However, most RESTful APIs today are at the second-highest level, with developers using multiple URIs and HTTP methods to design their APIs.

Only a minority of APIs include resource links from the root `/`, which allows the shape of the API to be machine-readable.


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

As a pragmatist, I think the OpenAPI specification mostly takes care of human readability. Adding links (e.g. using JSON-LD) is a relatively easy win to improve machine readability.

On the other hand, organising around common hypermedia is possibly the most challenging constraint of REST.

**An aside**

The new Web3 relies on RPCs between nodes, better fitting a distributed computer like Ethereum since the network acts like a single application.

P2P connections using RPCs steps back from REST, which largely enabled the architecture of the modern Web.
Input design with label using HTML and CSS
Tags: html, css, frontend, webdev
Published: 2022-08-17 20:38:00

Check out the tutorial in YouTube 
https://youtu.be/odtqmbJqV9w
and upgrade your frontend skils, like and share if it is useful and don't forget to **subscribe** 

Stay tuned for latest frontend and javascript tutorials 

#haveagoodday
Local Notifications in React native
Tags: github, reactnative, npm, javascript
Published: 2022-08-17 20:34:14

Hello Everyone,

I've published my second React Native package on npm.

which is a native bridging for local notifications with scheduling working in foreground, background & App Killed states

i've dealt with:
1. passing params from Javascript to native side (Kotlin & Swift)

2. handing promises from Swift to Javascript to handle iOS sending notification authorization

3. Used AlarmManager in kotlin and UNTimeIntervalNotificationTrigger in Swift to handle notification scheduling

Please Let Me Know, what do you think

You can find documentation on how to start using it on NPM/GitHub 

NPM:  [react-native-local-notifier](https://www.npmjs.com/package/react-native-local-notifier).

GitHub (With an Example):  [react-native-local-notifier](https://github.com/AhmedHalbas/react-native-local-notifier).

Please don't hesitate to tell me what you think.

Thanks for reading :D
How to convert an int type value to any float type value in Go or Golang?
Tags: go
Published: 2022-08-17 20:12:38

---
  title: How to convert an int type value to any float type value in Go or Golang?
  published: true
  tags: Go
  date: Thu Aug 18 2022 01:42:38 GMT+0530 (India Standard Time)
  canonical_url: https://melvingeorge.me/blog/convert-int-type-value-to-any-float-type-value-go-golang
  cover_image: https://melvingeorge.me/_next/static/images/main-3fa3a375814dd9b54efb06ee459444d0.jpg
  ---
  [Originally posted here!](https://melvingeorge.me/blog/convert-int-type-value-to-any-float-type-value-go-golang)
  
To convert an `int` type value to any `float` type value in Go or Golang, you can either use the `float32()` or the `float64()` built-in functions depending upon the size you need to allocate for it.

For example, let's say we need to convert an `int` value of `3000` to a `float` type value.

### Converting `int` to `float32` type

Let's say we need to allocate only a `32-bit` size for it, so we can use the `float32()` built-in function and pass the `int` value as an argument to the function like this,

```go
package main

import "fmt"

func main() {
    // an `int` type value
    intNum := 3000

    // convert `int` to `float32`
    // using the `float32()` function
    float32Num := float32(intNum)


    // log to the console
    fmt.Println(float32Num) // 3000 and the type is `float32`
}
```

As you can see from the above code the `int` type value of `3000` is converted into a `float32` type value.

### Converting `int` to `float64` type

If we need to allocate a `64-bit` size, then we can use the `float64()` built-in function and pass the `int` value as an argument to the function like this,

```go
package main

import "fmt"

func main() {
    // an `int` type value
    intNum := 3000

    // convert `int` to `float64`
    // using the `float64()` function
    float64Num := float64(intNum)

    // log to the console
    fmt.Println(float64Num) // 3000 and the type is `float64`
}
```

As you can see from the above code the `int` type value of `3000` is converted into a `float64` type value.

**Note: If you need to learn more about types in Go, see the blog on [What are the basic types in Go or Golang?](https://melvingeorge.me/blog/basic-types-go-golang).**

See the above codes live in [The Go Playground](https://go.dev/play/p/oCR3yq8ghI9).

That's all 😃!

### Feel free to share if you found this useful 😃.

---
Welcome Thread - v187
Tags: welcome
Published: 2022-08-17 20:06:44

---
title: Welcome Thread - v187
published: true
description: Welcome to DEV! A thread of hellos and intros.
tags: welcome
canonical_url: 
---

![Patrick Steward applauding](https://media.giphy.com/media/a0Lgc1JvbfS4o/giphy.gif)

### Welcome to DEV!

1. Leave a comment below to introduce yourself! You can talk about what brought you here, what you're learning, or just a fun fact about yourself.

2. Reply to someone's comment, either with a question or just a hello. 👋 

**Great to have you in the community!**
Notify the administrator when MongoDb Server goes down.
Tags: mongodb, database, javascript, node
Published: 2022-08-17 20:03:02

Hello, in this short post, I'll show you how to notify your admin when your database is down. 

#### Prerequisite
🎯 The Fundamentals of NodeJs
🎯 Basic knowledge of using nodemailer to send emails 

---

##### Database configuration using `mongoose` 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/87xiqhnwzdjmyfwy1mv9.png)

---

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


---


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

---

##### Conclusion
I hope this post was helpful. Thanks for reading
New Project 31 Tweets of Neurodiverse Encouragement
Tags: mentalhealth
Published: 2022-08-17 19:10:23

We've all seen motivational posts on social media designed to ~~get follows~~ brighten our days.

I've looked at these posts wondering do they actually help. I believe they initially did. But overtime, the desire for people to find a solution was only matched with peoples desire for influence. 

My development philosophy is "Helpful or Fun, and in the best cases BOTH". When I create projects, my hope is that I can make things that are helpful to others. This definitely fits in the "both" category.

I've  been public about getting diagnosed with ADHD  as an adult. I, like others, viewed neurodivergence (ND) as a negative personality trait. This changed only after I had wonderful neurodivergent people show me that a diagnosis didn't have to come at the sacrifice of success.

All that to say, I wanted to improve how neurodivergent folks can provide encouragement one another. 

I've created a [form](https://aka.ms/jm-ndform-2022) that ND folks can fill out. It's anonymous, it doesn't try to over-classify based on individual traits. It serves a few purposes:

1. It provides a little insight and understanding of where folks are coming from.
2. It allows people to openly share to their comfort. 

The goal is to send a _motivational_ message on Twitter (hopefully from an account not my own) each day. The goal is to share real messages of encouragement for folks who have been recently diagnosed or are considering seeking diagnosis or treatment.

## Why Is This on a Developer Blog

First of all, developers are people, and mental health is one of the biggest reasons people exit tech.

I've learned that many folks (including myself) got into tech without knowing they were neurodivergent. This isn't a blanket statement or me trying to match successful tech folks to mental health diagnoses. It's an observation. As I speak about my diagnoses, people reach out to me sharing they were also recently diagnosed or have been considering getting diagnosed. Neurotypical folks 

Also there will be some technical details in how this will be implemented. That said, the project won't work without contributions.

## How You Can Help

If you are neurodivergent, please fill out the form at <https://aka.ms/jm-ndform-2022>. No personal identifiable information will be collected. There are a few question s I hope to share some collective results, but also the last question is a personal message that once reviewed (again no PII or hatred) will be sent out.

My goal is that enough people can share their story that we can get a full year of encouragement.

Again the form is at <https://aka.ms/jm-ndform-2022>.
Miglior UX con Scroll-padding-Top
Tags: css, html, webdev, frontend
Published: 2022-08-17 19:10:00

## Introduzione 
Questa proprietà definisce un offset per la parte superiore dell'area di visualizzazione dello scrollport, o in altre parole, **permetterà alla barra di navigazione di non coprire il contenuto** quando premerete un link che vi farà scorrere a una sezione specifica della pagina.

## Utilizzo
Tutto quello che dovete sapere è che dovete impostare la regola CSS `scroll-padding-top` all'elemento che dovrà 'scrollare'.

### Esempio pratico 
Ipotizziamo che la nostra navbar abbia un'altezza fissa di `60px`.
Ci basterà aggiungere al container che 'scrollerà' la suddetta regola con valore uguale all'altezza della navbar stessa:
```css
scroll-padding-top: 60px
```

Nel seguente codepen ci sono due container identici con la stessa barra di navigazione; in quello destro viene usata la regola `scroll-padding-top`, in quello sinistro no. Cliccate i link delle rispettive barre di navigazione per notare la differenza.

{% codepen https://codepen.io/g-pagliara/pen/wvmRWZE %}

Noterete subito la differenza: nel container destro si legge il titolo selezionato dalla navbar, nel sinistro no. Questo migliorerà l'esperienza utente. Un piccolo dettaglio che farà la differenza.

---

Spero questa mini guida vi sia piaciuta , considera di mettere ❤️ al post e seguirmi sui miei social:

[Linkedin](https://www.linkedin.com/in/giandomenico-pagliara-699108179/)
[GitHub](https://github.com/PagliaraG)
All Simple Dev tutorials are now FREE!
Tags: tutorial, webdev, html, css
Published: 2022-08-17 19:04:15

[All Simple Dev tutorials](https://simpledev.io/path/) are now free! We recently decided to make all of our tutorials publicly available. Previously, only the HTML course was free, and a few other courses could be unlocked with a free membership. A paid membership was required for full access.

## Memberships

Now you can read any tutorial on the site for free. You can still [sign up for a paid membership](https://simpledev.io/sign-up/), which allows you to track your progress and mark tutorials complete. This is a great option if you'd like to support the site on a monthly basis. We hope to add more features to the paid membership in the future. Also, if you sign up for a paid membership, the Donate button in the corner and the Donation/Member banner at the top of each tutorial is hidden.

## Donations

Speaking of donations, you can now donate to Simple Dev using the Donate button in the corner! The Donate button is powered by Ko-fi, which is a service that allows websites and creators to accept donations without taking a fee. You can also donate directly on [our Ko-fi page](https://ko-fi.com/javidevio). This is a great option if you'd like to make a one-time donation to support the site.

## Conclusion

If you're new to Simple Dev, it's a website designed to teach coding through short, easy-to-read, and up-to-date tutorials. There are over 300 tutorials on the site, covering HTML, CSS, JavaScript, VS Code, and more, and now you can read them all for free. Visit [Simple Dev](https://simpledev.io/) today to get started.
60 Days of Data Science and Machine Learning
Tags: datascience, machinelearning, tutorial, beginners
Published: 2022-08-17 18:58:39

Dear, everyone. Hope you are doing well.
After I finished all the Kaggle courses, I found next materials to expend my knowledge for Data Science and Machine Learning. I choose this series from Medium which is Naina Chaturvedi.

I had already finished first 2 weeks from this series. You can find them on my github repository. You can run all the notebook on colab or jupyter as well.

https://github.com/levintech/60-Days-of-Data-Science-and-ML

Hope my work would be little bit helpful for AI enthusiastic.
If that, please **star** that repository then **follow me** on **Github** and **Dev.to**

https://dev.to/levintech
https://github.com/levintech

Best Regards
Starting a journey of a complicated Portfolio with Angular and Containers
Tags: angular, tailwindcss
Published: 2022-08-17 18:55:00

## The portfolio

So here is the story in a few words, it will be a continuous series, I wanted to update an old portfolio that I had made with hugo. So I said "why not" and deleted the old information, bad for me that the repo was in old files and not online and so I lost that too. I decided to start it all over and get to know better and test new technologies that I wanted to do, and thus I got working on a simple site, I wanted to use angular to see how I can implement new ideas, even if its a basic not that dynamic site.

### The tools

For tooling I will be working with:

#### Website

* Angular
* Tailwindcss
* Jest
* Cypress
* Storybooks

#### DevOps

* Jenkins
* Dependabot
* CloudRun
* Docker Hub
* Buildpacks.

#### Delivery

* CloudRun

### The Idea

I will be making a website on angular, having testing on each branch with jenkins, on pull requests I will be creating a container, storing it on docker hub and deploying it on cloudrun.

Simple Yes, lets see how it goes.