teleren/devto huggingface dataset:
Var, Let, and Const
Tags: javascript, webdev, beginners, programming
Published: 2022-09-02 12:33:27


We all have used var, let, and const variables many times in JavaScript but sometimes we all get confused about which is the best variable to use for a particular program. I am writing this blog to understand let, var, and const variables for helping someone to clear their basics regarding the same.

## Var

It is the oldest keyword to declare a variable in JavaScript. The scope of it is global or function scope. Variables defined outside the function can be accessed globally and variables defined inside a particular function can be accessed within the function.
It can be updated and re-declared into the scope.

**Example** -

```
	function f() {
		var a = 7;
		console.log(a)
	}
	f();
	console.log(a);
``` 
**Output**-
```
7
ReferenceError: a is not defined
```

## Let
It is an improved version of the var keyword. The scope of a let keyword is only block scoped. It cannot be accessible outside the particular block.
It can be updated but cannot be re-declared into the scope.

**Example 1**-

```
	let a =7;
	function f() {
		if (true) {
			let b = 9

			// It prints 9
			console.log(b);
		}

		// It gives error as it
		// defined in if block
		console.log(b);
	}
	f()

	// It prints 7
	console.log(a)
```
**Output**-

```
9
ReferenceError: b is not defined
7
```

**Example 2**-

```
let a = 7
if (true) {
	let a=9
	console.log(a) // It prints 9
}
console.log(a) // It prints 7
```
**Output**-

```
9
7
```

## Const 
It has all the properties same as the let keyword, except the user cannot update it. It cannot be updated or re-declared into the scope.

**Example**-

```
	const a = {
		prop1: 7,
		prop2: 9
	}
	
	// It is allowed
	a.prop1 = 3

	// It is not allowed
	a = {
		b: 7,
		prop2: 9
	}

```
[Book review] Staff Engineer: Leadership Beyond the Management Track
Tags: books, review, staff, leadership
Published: 2022-09-02 21:40:35

I read this book a little while ago. It was an interesting reading since I could recognize many of the topics and situations discussed in the book and correlate them with my day-to-day work.

Going into staff+ positions requires a different mindset and approach when it comes to the work that needs to be done, and since you’re in a position of leadership you need to multiply your impact by influencing other engineers around you and doing a lot of coordination and cross-collaboration.


![Staff Engineer: Leadership Beyond the Management Track](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/br53twrc0yuzg0w0fydk.png)
[https://staffeng.com/book](https://staffeng.com/book)

This book is an excellent resource on understanding the social conventions within the workplace and the nuts and bolts of how to get promoted to staff+ roles and what they mean. Whether you consider such conventions fair practices or not, it's good to be cognizant of them.

It helps demystify that you're not tied to the managerial path and that technical individual contributors also have more options within the leadership route and how it impacts your team(s) and company.

If you're already carving your path toward a future promotion, the archetypes presented will help you identify yourself and the type of work you've been doing or will have to do to achieve your goal(s).

I’m not often reading books about management, leadership, and the like, but it was definitely eye-opening for me to read about other software engineers’ experiences!

---

I’m also on [Goodreads](https://www.goodreads.com/user/show/56319897-hercules-merscher). Feel free to follow me there and see what I’m reading at the moment ;)
Can't load library: /usr/lib/jvm/java-11-openjdk-11.0.16.0.8-1.fc35.x86_64/lib/libawt_xawt.so
Tags: linux
Published: 2022-09-02 21:16:17

I try to run DeskDock Server on my fedora 35 and got this error


![libawt_xawt.so](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/122amzg2jyitzmqp17xc.png)

```
┌─ 🍔 [~/Downloads/DeskDockServer_1.3.0]
└─╼ java -jar DeskDockServer_1.3.0.jar 
2022-09-03 04:49:40.442   Program: DeskDockServer 1.3.0
2022-09-03 04:49:40.443   System: Linux 5.19.4-100.fc35.x86_64, amd64
2022-09-03 04:49:40.443   JRE: 11.0.16+8
java.lang.UnsatisfiedLinkError: Can't load library: /usr/lib/jvm/java-11-openjdk-11.0.16.0.8-1.fc35.x86_64/lib/libawt_xawt.so
	at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2633)
	at java.base/java.lang.Runtime.load0(Runtime.java:768)
	at java.base/java.lang.System.load(System.java:1837)
	at java.base/java.lang.ClassLoader$NativeLibrary.load0(Native Method)
	at java.base/java.lang.ClassLoader$NativeLibrary.load(ClassLoader.java:2445)
	at java.base/java.lang.ClassLoader$NativeLibrary.loadLibrary(ClassLoader.java:2501)
	at java.base/java.lang.ClassLoader.loadLibrary0(ClassLoader.java:2700)
	at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2651)
	at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:830)
	at java.base/java.lang.System.loadLibrary(System.java:1873)
	at java.desktop/java.awt.Toolkit$3.run(Toolkit.java:1399)
	at java.desktop/java.awt.Toolkit$3.run(Toolkit.java:1397)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.desktop/java.awt.Toolkit.loadLibraries(Toolkit.java:1396)
	at java.desktop/java.awt.Toolkit.<clinit>(Toolkit.java:1429)
	at java.desktop/javax.swing.UIManager.getSystemLookAndFeelClassName(UIManager.java:661)
	at com.floriandraschbacher.deskdockserver.Main.main(Unknown Source)
2022-09-03 04:49:40.532   n@4ac68d3e: Uncaught Exception in Thread main: java.lang.UnsatisfiedLinkError: Can't load library: /usr/lib/jvm/java-11-openjdk-11.0.16.0.8-1.fc35.x86_64/lib/libawt_xawt.so
Can't load library: /usr/lib/jvm/java-11-openjdk-11.0.16.0.8-1.fc35.x86_64/lib/libawt_xawt.so
```

so, I fix it with this code

```
dnf install java-11-openjdk
```

---
## Source
[java-11-openjdk-11.0.12.0.7-4.fc35.x86_64.rpm](https://fedora.pkgs.org/35/fedora-x86_64/java-11-openjdk-11.0.12.0.7-4.fc35.x86_64.rpm.html)
What was good/bad in your onboarding expirience as software engineer?
Tags: discuss, career
Published: 2022-09-02 20:29:18

I've had a good expression from onboarding when I got the understanding from where to start and where to receive answers. 

I'm wondering is a way to make it go even futher?

Can you describe some of you expirience when you were really delighted from the onboarding?
APIs for retrieving token contract information?
Tags: web3
Published: 2022-09-02 20:15:42

Hey guys,

I'm a product designer and front-end developer. I'm working on a tool that is similar to www.tokensniffer.com in the way that it will offer some automated audits of a token based on it's contract address. The big difference is that my platform will be powered by user input - people will report crypto projects based on a few factors that cannot be automated.

I need ways to detect:
1. The owner of a token
2. IF the liquidity is locked
3. Detect whether there are many whales among the holders.

I've tried looking for platforms that offer APIs to achieve those, but no luck so far.

Would appreciate any guidance/help! Thanks!
#RaspberryPi – Install raspi-config on Ubuntu 22.04.1 LTS
Tags: englishpost, raspberrypi, ubuntu
Published: 2022-09-05 14:46:15

---
title: #RaspberryPi – Install raspi-config on Ubuntu 22.04.1 LTS
published: true
date: 2022-09-02 20:12:07 UTC
tags: EnglishPost,EnglishPost,RaspberryPI,Ubuntu
canonical_url: 
---

Hi !

This is my current Ubuntu version running on a Raspberry Pi 4.

![](https://brunocapuano.files.wordpress.com/2022/09/ubuntu-installed-and-now-installing-updates.jpg?w=778)

`raspi-config` is a powerful tool to manage the device settings for the Raspberry Pi. It’s included in Raspberry Pi OS, but not in the Ubuntu distro. So, if yu want to use raspi-config, follow these steps

Of course, we start with an Ubuntu image:

![ubuntu images in raspberry pi imager](https://brunocapuano.files.wordpress.com/2022/09/ubuntu-images-in-raspberry-pi-imager.jpg?w=703)

Now, let’s add the debian repository to the source list

```

echo "deb http://archive.raspberrypi.org/debian/ buster main" >> /etc/apt/sources.list

```

Add the Key

```

apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 7FA3303E

```

And, the update and install raspi config

```

sudo apt-get update
sudo apt-get install raspi-config

```

And now we can run raspi-config (in sudo mode)

```

sudo raspi-config

```

![raspi config running in Ubuntu](https://brunocapuano.files.wordpress.com/2022/09/raspi-config-running-in-ubuntu.jpg?w=1024)

I really like to use this to

- change my host name
- expand my filesystem
- configure the wireless network
- update the OS
- etc

Super easy !

Happy coding!

Greetings

El Bruno

More posts in my blog [ElBruno.com](https://www.elbruno.com).

* * *
Write on the Boot.dev Blog
Tags: writing, blog, write, content
Published: 2022-09-02 19:57:23

We've just opened up the [Boot.dev Blog](https://blog.boot.dev) to public contributions! We're really excited to see all the great stories that our readers and students will create.

## Why should I write on Boot.dev?

By writing and publishing your ideas publicly, you can:

* Impress future employers
* Help you solidify what you've recently learned
* Help others find answers that took you a long time to research
* Gain traffic and domain authority for your own blogs and projects
* Get helpful feedback on your writing skills from our editorial team

The reason to write on Boot.dev is the same reason you might write on FreeCodeCamp or HackerNoon: To get your writings out to a wider audience, and to get high-domain authority traffic and links back to your own projects or blog.

## What kinds of articles can I write?

[Boot.dev](https://boot.dev) is a platform for anyone interested in learning to code, particularly backend development in Python, JavaScript, and Go. As far as the stories we'll publish, we accept *well-written articles that are at least somewhat related to programming*.

## How do I submit articles?

First, know that it's free to contribute articles to Boot.dev, and we do not pay you for your contribution. No money changes hands.

Second, know that you *are* allowed to drop *tasteful* `dofollow` links back to your own projects and sites. Take advantage of our great domain authority and reach! As long as your content is original and well-written we're happy to expose your writing to our readers.

Read the [full contributing guide here](https://github.com/bootdotdev/blog/blob/main/CONTRIBUTING.md) on how to submit your story.

## Keep in mind: Your article *must* be original to Boot.dev.

We don't want to spam our readers with content that they've already seen elsewhere. Your article must be original to Boot.dev. That said, *after* your original piece is published on Boot.dev, you can republish it elsewhere *only if* you set the canonical link back to the Boot.dev article.
This week in DevRel: Building Momentum and Making Investments in Events and Initiatives
Tags: devrel
Published: 2022-09-02 19:41:46

---
title: This week in DevRel: Building Momentum and Making Investments in Events and Initiatives
published: true
description: Some weeks are an investment in what's about to come. 
series: Technical Community Building
tags: DevRel

---

Well, the week started off strong, but I forgot that Monday is a holiday in the US and I've been battling some kind of stomach bug. So I didn't accomplish my 60-day plan, but a lot of it is worked out in various snippets of notes and ideas in my head. What I did accomplish this week was building up to some pretty exciting initiatives we're going to be taking on as part of the [Deepgram DevRel Team](https://developers.deepgram.com/blog/categories/devlife/).

## Forum Prep
I'm super excited about having a space to engage with our Community and finding ways to learn, support, and grow together. As part of this, I'm setting up a structure and schedule and finding ways to make connections with our existing audience, and I'm very happy to say you'll see some fun things soon. I spent quite a bit of time identifying ways to engage our community, what power-ups I could use for GitHub discussions, and researching how other communities are using it. And there may even be some contests :eyes:

## Teammate Reviews
It's that time of year where we review each other. I got to talk about how amazing my teammates are and how I appreciate their support of the remote-first work ethic. I'm lucky I get to learn from others who always make me feel comfortable asking questions.

## Reviewed Blog Posts
This is actually one of my favorite things to do and I got to do it three times this week. I reviewed the PRs by making sure the writing was clear and that the code worked. The bonus part is that I get to see all these cool things we can do with Deepgram, like this [post about identifying uninclusive language](https://dpgr.am/3q00c4F).

## Educational Institution Brainstorm
This one is near and dear to my heart because I spent ten years teaching college English. I love the idea of setting students up for success by providing them with resources and guides to support their learning journey and bringing them into the Deepgram Community. This is one that's going to take some time, but I've got ideas working about how it can integrate into what I'm doing in the other parts of my job.

Welp, those of the top things I worked on, but I also started some Hacktoberfest prep for our repos :tada:, it is Preptember after all. If you want to chat about Preptember, you should check out the [VirtualCoffeeIO chat](https://twitter.com/VirtualCoffeeIO/status/1565686479514259461).
Updates from #AWS
Published: 2022-09-02 19:41:30

Three important updates from #AWS

1) Inspector has added Windows Server 2012, 2012 R2, 2016, and 2019, 2022 support for continual EC2 vulnerability scanning.

https://lnkd.in/dnDy725X

2) AWS Identity Center now supports API to manage users and groups at scale.

https://lnkd.in/d5y-gf28

3) AWS Control Tower customers can now programmatically manage controls, also known as guardrails, across their organization at scale.

https://lnkd.in/dwBsvrT7

#aws #security #identityaccessmanagement #cloud #Devops




For reference : https://aws.amazon.com/about-aws/whats-new/2022/09/amazon-inspector-windows-os-continual-software-vulnerability-scanning-ec2-workloads/
Angular crash on iOS devices toLocaleDateString()
Tags: angular, javascript
Published: 2022-09-02 19:26:49

## Issue
In case you are having issues of an Angular app crashing only on iOS devices check if you are using toLocaleDateString(). 

In case of calling this method many times it will use up all of the javascript resources and the app will be shit down.

## Solutions

If possible find a way to call the method less often. Use the onPush change detection option to control the components updates.

```js
@Component({
  changeDetection: ChangeDetectionStrategy.OnPush,
})
```

If you are using toLocaleDateString() to compare dates consider using a library that handles this more efficient like date-fns https://date-fns.org/
GitHub is removing the Trending tab
Tags: discuss, opensource, github
Published: 2022-09-02 18:59:43

In case you haven't seen it

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

Personally, I use it a lot to discover cool new libraries.
What about you?

We are trending on GitHub now, probably for the last time :(
Can you help us with a like so we at least stay there a little bit more? ❤️
https://github.com/novuhq/novu

![Trend Going](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hhh1xiyy1z45vgjkcn2x.gif)
Get the latest currency data with our currency list API
Tags: javascript, webdev, tutorial, programming
Published: 2022-09-02 18:58:14

It can be challenging to keep track of all the various currencies that are in use around the world. However, using our [currency list API](www.currencylayer.com), you can quickly and easily obtain the most recent information on hundreds of different currencies. Our API can help you regardless of whether you need to know the conversion rate for a given currency or want to examine how two currencies have been changing over time.

**What is a currency list API?**
A currency list API is an application programming interface that allows third-party developers to access and integrate the data from a currency list into their own applications. This type of API usually exposes information on multiple currencies, exchange rates, and other financial data points. Developers can use this data to build features such as foreign exchange rate conversion tools or provide up-to-date information on global markets for their users.
 

**How can the currency list API be used?**
The currency list API can be used to get a list of currencies supported by a particular country. This can be useful for businesses that need to accept payments in multiple currencies, or for travelers who need to know what currencies are supported by their destination country. The API can also be used to get Exchange Rates between two specific currencies.
 
**What are some features of the currency list API?**
Assuming you would like a paragraph on the benefits of using a currency list API: A currency list API can be extremely helpful for businesses who need to stay up-to-date on the latest exchange rates. By using an API, businesses can automate their process of checking rates, and ensure that they are always getting accurate information. In addition, a currency list API can also provide historical data points, which can be helpful for trend analysis or planning purposes.
I Just Built My First Official React/Redux Website
Published: 2022-09-02 18:49:55

My journey has taken me through programming fundamentals with Python to basic front-end work utilizing HTML, CSS, and vanilla Javascript. I then moved into the world of back-end programming with a full-stack project called BenjiKnows. Each step has been filled with a bit of frustration and a whole lot of excitement, but the day we began using React I saw myself within reach of a truly polished, professional application.

For my React project, I decided to focus my efforts on building an application that would expand my understanding of front-end design and functionality. I honestly struggled at first with learning React and Redux in the beginning and was a little nervous to tackle this project. Despite it all, The Hardy Grove was born and is now officially complete (aside from adding potential features later on, of course). 

"The Hardy Grove" is an Irish pub that is located in the Connemara region of Ireland, outside the city of Westport. While this particular restaurant is totally made-up, the website demonstrates the practical importance of visual design and functionality for a potential business. Users can easily navigate a myriad of tabs, including the menu, an online order tab and a contact section with hours and location information, as well as the homepage. You can add food items to your cart, remove them, and upon complete order you are given a thank you page that says that your order will be ready shortly.

"The Hardy Grove" is a React.js application that utilizes redux, TypeScript, SCSS and react-router. All SCSS for this project is custom-made and no frameworks were used. For demo purposes, the information for the menu and shop items (name, description, and images) is stored locally in the initial state of the application, but the site can easily be converted to reading these items from a database. When users provide and submit input, the information is sent to the store where it can be rendered onto the page. I also chose to follow traditional organizing standards for the files in this application, allowing future edits to be made quickly and cleanly.

While this project was an interesting one, I am really glad that I did it. Tackling React is one of those very big hurdles before being able to take on professional and legitimate applications, and so I feel like this experience really helped to cement my knowledge for the better. The only blocker that I truly had was time, and that was for several reasons. There were so many ideas that I had that I wanted to implement, but you can only do so much in a week. If I had unlimited time, this application would have looked differently than it does now, but I am happy with the results that I ended up with. 

Now that that's over with, I can now officially begin to tackle the big kahuna of this entire experience: The Capstone Project.
Hello, my name is Mateus Abdala!
Tags: firstpost, programming, beginners
Published: 2022-09-02 18:39:51

I've been a member here for a few years, but I haven't written much. This introduction is my first step in a new and focused direction.

I've been writing code since I was a teenager and I'm passionate about web development.

Currently, I work with software development, mainly financial applications using Java or JavaScript, so it is quite possible that the next posts will be related to that.

So call me on [Linkedin](https://www.linkedin.com/in/mateus-abdala/) and check out my GitHub as [MateusAbdala](https://github.com/MateusAbdala) and let's chat!
How to add values or elements to a specific index in an array in Go or Golang?
Tags: go
Published: 2022-09-02 18:33:13

---
  title: How to add values or elements to a specific index in an array in Go or Golang?
  published: true
  tags: Go
  date: Sat Sep 03 2022 00:03:13 GMT+0530 (India Standard Time)
  canonical_url: https://melvingeorge.me/blog/add-values-elements-to-specific-array-index-go-golang
  cover_image: https://melvingeorge.me/_next/static/images/main-49a2357cf7addceda621b84a36a18b62.jpg
  ---
  [Originally posted here!](https://melvingeorge.me/blog/add-values-elements-to-specific-array-index-go-golang)
  
To add values or elements to a specific index in an array in Go or Golang, you can start by writing the name of the array, then the `[]` symbol (square brackets), and inside the square brackets, you can specify the index which you need to add the value to. After the brackets, you have to use the `=` operator (assignment) followed by the value we need to add to that specific index in that array.

### TL;DR

```go
package main

import "fmt"

func main() {
    // an array of names
    names := [3]string{"John Doe", "Lily Roy", "Daniel Doe"}

    // add the value of `Embla Marina` at the
    // 1st index of the `names` array
    names[1] = "Embla Marina"

    // log the contents of the `names` array
    fmt.Println(names) // ✅ [John Doe Embla Marina Daniel Doe]
}
```

For example, let's say we have an array of names like this,

```go
package main

func main(){
    // an array of names
    names := [3]string{"John Doe", "Lily Roy", "Daniel Doe"}
}
```

**To know more about creating an array, see the blog on [How to create a fixed-size array in Go or Golang?](https://melvingeorge.me/blog/create-fixed-size-array-go-golang)**

Now we aim to add a new name called `Embla Marina` to the `names` array at the `1st index`. To do that we can first write the name of the array which is called `names` followed by the `[]` symbol, inside the bracket we can write the index we want to put our name into which is the `1` st index and finally we can use the `=` operator followed by the actual value we need to put into it which is the string type value `Embla Marina`.

It can be done like this,

```go
package main

func main(){
    // an array of names
    names := [3]string{"John Doe", "Lily Roy", "Daniel Doe"}

    // add the value of `Embla Marina` at the
    // 1st index of the `names` array
    names[1] = "Embla Marina"
}
```

Finally, let's log the content inside the names array like this,

```go
package main

import "fmt"

func main() {
    // an array of names
    names := [3]string{"John Doe", "Lily Roy", "Daniel Doe"}

    // add the value of `Embla Marina` at the
    // 1st index of the `names` array
    names[1] = "Embla Marina"

    // log the contents of the `names` array
    fmt.Println(names) // ✅ [John Doe Embla Marina Daniel Doe]
}
```

As you can see that the value of `Embla Marina` can be seen in the 1st index of the `names` array and the old value of `Lily Roy` is overwritten.

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

That's all 😃!

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

---