teleren/devto huggingface dataset:
How does Amazon Managed Service for Prometheus relate to Amazon CloudWatch?
Tags: aws, cloudwatch, prometheus
Published: 2022-10-09 02:03:48

**Amazon CloudWatch**

- CloudWatch provides end-to-end observability across logs, metrics, and traces for applications running on EC2, AWS container services (EKS, ECS), Lambda, and other AWS services.
- CloudWatch can **discover and collect Prometheus metrics** as CloudWatch metrics to provide options for our customers to query and alarm on Prometheus metrics.
- You should use CloudWatch if you are looking for a comprehensive observability service that brings together logs, metrics, tracing, dashboarding, and alerting in a unified experience that encompasses AWS services, EC2, containers, and serverless.

**Amazon Managed Service for Prometheus**

- Amazon Managed Service for Prometheus, which is specifically optimized for monitoring container-based workloads, offers a Prometheus-compatible APIs for ingesting and querying your Prometheus metrics.
- Amazon Managed Service for Prometheus **is a metric-only service and does not collect logs or distributed trace data**. You can export selected CloudWatch metrics to Amazon Managed Service for Prometheus in order to use **PromQL** as the common query language for querying and alarming on all your stored metrics.
- You should use Amazon Managed Service for Prometheus if you want a service that is fully compatible with the Prometheus open source project. You should also choose Amazon Managed Service for Prometheus if you are already running Prometheus and are looking to eliminate that ongoing operational cost while also improving security.

See https://aws.amazon.com/prometheus/faqs/.

### CloudWatch metrics + AWS Distro for OpenTelemetry (ADOT) + Amazon Managed Service for Prometheus + Amazon Managed Grafana

This blog post could be a good start for people who are interested in CloudWatch metrics + AWS Distro for OpenTelemetry (ADOT) + Amazon Managed Service for Prometheus + Amazon Managed Grafana -
[Viewing Amazon CloudWatch metrics with Amazon Managed Service for Prometheus and Amazon Managed Grafana](https://aws.amazon.com/blogs/mt/viewing-amazon-cloudwatch-metrics-with-amazon-managed-service-for-prometheus-and-amazon-managed-grafana/).
Rust devlog: Part 3
Tags: programming, gamedev, rust, bevy
Published: 2022-10-09 00:53:09

Hello Readers! Welcome to the third devlog on this series where I code a multiplayer turn-based strategy game! If you haven't read the three previous posts, go check them out! This week, I created a simple and exciting selecting system for my troops. Without further ado, let's get into it. Hope you enjoy!

## Troop selecting

In the last devlog, I talk about how I implemented the spawning mechanism in my game. Essentially, placing some troops on the board. This went very well and is now fully functional. However, we still need to be able to select those troops and move them. This is what it looks like after this week:

![ss 1](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/maxl2s37d9nuw1zwri65.png)

Here the skeleton is not clearly distinguishable, so I'll make sure to change some colors for next time.

![ss 2](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0agwjxjjun2losdc3npg.png)

The code for this was actually quite long, so I'll simply sum it up for you. Essentially, we spawn on every board tile two entities, one for movement interactions and one for attack interactions. These both have their own separate components named `MoveInteraction` and `AttackInteraction`. They are always invisible, except when the `SelectedCardEntity` resource (which is an `Option<CardEntity>`) contains an entity. When that happens, if they are close enough to that entity, we show them. Pretty simple, right? Well, this took around about 200 lines of code. However, I think the result is definitely worth it.

#### Meme of the week

![meme](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oloxwgnxkl3719rdqj8g.jpg)

#### Conclusion

In conclusion, this was a very short devlog for this week, and it's a bit late. Normally, I would post on Friday, but I think I'll start doing it on the weekends. I may even only post every other week, since I don't have enough progress to show for after a week. 

In addition, the code is now on Github for everyone to see! You can find it at [here](https://github.com/ThousandthStar/multiplayer_game)

Finally, I would like to say thank you if you read this post all the way. This was a short one. Also, since it's currently Hacktober, I would really enjoy getting into open source contributions. If you have a project (ideally Rust) that needs  contributions, leave a link in the comments and I'll check it out!
Why We All Need 2FA
Tags: security, beginners
Published: 2022-10-09 00:38:39

Two-factor authentication (2FA) is a specific type of multi-factor authentication (MFA) that toughens  account security by verifying identity in two unique ways. In other words, 2FA is an extra layer of security  used to ensure only authenticated users gain access to a system which I highly recommend everyone  should enable. 

![2FA](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f4pe4k6jvtn22tpjrm9o.png)

To use 2FA, you need the following things: 
- A PIN number or a password) 
- A one-time passcode (OTP) or small hardware token, fingerprint 

## Importance Of 2FA 

I highly recommend enabling 2FA mainly for this reasons: 

**Security**: Usernames and passwords are vulnerable to attack using 2FA increases the security of your  account. Even if your password and username have been guessed correctly, hackers still need to know  the second access factor to be able to access your account. 

## Common Types Of 2FA 

- Hardware Tokens for 2FA 
- SMS Text-Message and Voice-based 2FA 
- Software Tokens for 2FA 
- Push Notification for 2FA 

## How Effective Is 2FA? 

The need for two-factor authentication has increased as individuals, and companies have realized that  passwords alone are not secure enough to protect user accounts or systems. 2FA has been implemented  to protect against Stolen Passwords, Key Logging, and brute-force attacks and secures your logins from  attackers. 

## How To Set Up 2FA 

To set up a 2FA kindly watch this [Step-by-Step 2FA Tutorials](https://www.youtube.com/watch?v=hlpoc3C1kWM).
Reduct Storage Client SDK for C++ 1.0.0 was released
Tags: news, cpp, database, reductstorage
Published: 2022-10-09 00:37:27

Hey everyone, I just released the Reduct Storage SDK for C++ [v1.0.0](https://github.com/reduct-storage/reduct-cpp/releases/tag/v1.0.0). Now it supports Reduct Storage [v1.0.0](https://github.com/reduct-storage/reduct-storage/releases/tag/v1.0.0).

Because it is a major release, I refactored the `Bucket.Write` and `Bucket.Read` methods and made the more similar to `Bucket.Query`  See [#41](https://github.com/reduct-storage/reduct-cpp/issues/41).

Now to read a record from the storage engine, we use a callback with a proxy object:

```cpp
  auto client = IClient::Build("https://play.reduct-storage.dev");
  // Create a bucket
  auto [bucket, create_err] = client->GetOrCreateBucket("bucket");
  if (create_err) {
    std::cerr << "Error: " << create_err;
    return -1;
  }

  auto ts = IBucket::Time::clock::now();
  auto read_err = bucket->Read("entry-1", ts, [](auto rec) {
        std::cout << "Read blob: " <<  rec->ReadAll() << std::endl;
  });
```

and the same for writing:

```cpp
auto write_err = bucket->Write("entry-1", ts, [](auto rec) {
    rec->WriteAll("some_data1"); 
});
```

You also can easily use the same proxy objects to write or read records via chunks.

Have fun!
How to create public blockchain using Go-Ethereum
Tags: blockchain, web3, node, testing
Published: 2022-10-09 00:14:56

i've tried to learn to create a private blockchain using besu and GoQuorum in my locale, for now i want to try to make a public blockchain using Geth, if i make genesis and config with what i modified will it be public network and i can run similar like Ethereum? is there a tutorial on how to create a basic geth go-ethereum public blockchain?
Hide Scrollbars using CSS but Keep Functionality
Tags: css, howto, tricks
Published: 2022-11-24 07:22:30

---
title: Hide Scrollbars using CSS but Keep Functionality
published: true
date: 2022-10-09 00:00:00 UTC
tags: CSS,HowTo,Tricks
canonical_url: https://ahonerd.com/css-hide-scrollbar
---


Cara untuk menyembunyikan scrollbar tapi konten tetap bisa di-scroll dengan menggunakan CSS.

## Explanation

Untuk menyembunyikan scrollbar dengan CSS, sebetulnya kita dapat menggunakan:

```css
.hidden-scrollbar {
  /* Hide vertical and horizontal scrollbars */
  overflow: hidden;
}
```

atau

```css
.hidden-scrollbar {
  /* Hide vertical scrollbars */
  overflow-y: hidden;
  /* Hide horizontal scrollbars */
  overflow-x: hidden;
}
```

Apabila kita menggunakan metode di atas, meskipun betul dengan begitu scrollbar akan disembunyikan, akan tetapi konten juga akan menjadi tidak dapat di-scroll seperti yang diharapkan.

## Hide Scrollbars But Keep its Function

```css
/*
untuk browser berbasis webkit seperti
Chrome, Opera, Safari dan Edge versi baru
*/
.hidden-scrollbar::-webkit-scrollbar {
  display: none;
}

/* untuk Internet Explorer dan Edge versi lama and Firefox */
.hidden-scrollbar {
  /* IE dan Edge versi lama */
  -ms-overflow-style: none;
  /* Firefox */
  scrollbar-width: none;
}
```
The First Computer I Ever Used And My Experience With It
Tags: beginners
Published: 2022-10-08 23:59:56


![Desktop](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ryhbborfzxqgonll5j2t.jpeg)

This picture above brings out a lot of very good memories.

Growing up and watching people use computers on television, increased my desire to own one. I was always looking forward to the computer science lecture because we always leave the  classroom to a lab filled up with computers and during our summer holidays my dad would also  register me in a nearby computer school. I guess I was too fascinated with how a computer  system works and I must say I also loved how fast the computer tutors typed on the keyboard. I even went as far as memorizing the keys on the keyboard so that I could also learn to type  very fast. 

Seeing my devotedness to my computer studies, my father surprised me with my first computer  during Christmas. I could not contain my excitement. I took care of it and did not allow anyone to touch it and because of continuous practice, I became so good within a couple of months. 

Now with the invention of Laptops, people do not use them anymore, but I still make use of a  desktop.
 
Kindly share your experience if you can.
What is a first-class citizen in computer science?
Tags: javascript, computerscience, programming, beginners
Published: 2022-10-08 22:07:58

In computer science, a **first-class citizen** is an entity that supports all operations available to other entities. Some of the available operations are:

- They may be named by variables;
- They may be passed as arguments to procedures;
- They may be returned as the results of procedures;
- They may be included in data structures.

It was the British computer scientist Christopher Strachey (1916-1975) [who first](https://link.springer.com/article/10.1023/A:1010052305354) coined this notion of first-class citizen status of elements in a programming language in the 1960s.

In JavaScript, for example, functions are first-class citizens, as all of the operations cited above can be applied to them. Let's see some examples:

**A simple function definition in JavaScript**

```javascript
function sum(a, b) {
  return a + b
}
```

**Assigning a constant to a function**

```javascript
const sum = (a, b) => a + b

// or
// 
// const sum = function (a, b) {
//   a + b
// }
```

**Passing a function as an argument**

```javascript
function sum(a, b, callback) {
  const result = a + b

  if (typeof callback === 'function') {
    callback(result) // pass the result as an argument of `callback`
  }

  return result
}

//        Pass `console.log` as the callback function
// -------\/
sum(2, 2, console.log) // => 4
```

**Return a function**
```javascript
function sum(a, b, callback) {
  const result = a + b

  if (callback) {
    return () => callback(result)
  }

  return result
}

//            The callback is the sum of the result with 2.
// ------------------\/
const fn = sum(2, 2, (result) => sum(2, result))
//    ^---- Store the returned function in a variable

//          Execute the function
// ---------\/
console.log(fn()) // => 6
```

**Including a function in a data structure**

```javascript
// Store the basic operations in an object
const operations = {
  sum: (a, b) => a + b,
  sub: (a, b) => a - b,
  mul: (a, b) => a * b,
  div: (a, b) => a / b,
}
```
Diferença entre os GenerationTypes do Hibernate
Tags: java, sql, oracl
Published: 2022-10-08 21:57:49

Questão de entrevista de emprego! 


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

**IDENTITY**: Talvez o mais usado, quando utilizamos IDENTITY o Hibernate utilizará a geração AUTO_INCREMENT para SQL/MySQL, já para o Postgres faz uso do tipo SERIAL.

**SEQUENCE**: Se permitido pelo banco, utiliza sequencias (sequences) para gerar a chave primária, do contrário, automaticamente será utilizado o padrão TABLE. (https://lnkd.in/d8x5_3bx) - podemos customizar esse generation com nome e valores da sequencia. Atualmente o generation type recomendado pelo Hibernate.

Podemos definir o gerador das sequências através da anotação @SequenceGenerator

**AUTO**: Default. Se nenhum valor for especificado para o GenerationType, este será utilizado. A implementação definirá que estratégia utilizar. No caso do Hibernate com JPA, seria a SEQUENCE para Postgres e oracle e TABLE para MySQL.

**TABLE**: Funciona em todos os bancos relacionais. Porém, quando fazemos uso dela o Hibernate precisa necessariamente uma outra tabela para gerar e guardar as chaves primárias. Por motivos de locks e lentidão ao escalar a aplicação, é bom evitar o uso de TABLE.


Mais detalhes e fontes:


https://lnkd.in/dXm6RV3i

https://lnkd.in/dAnHUnMW
Learning Go! (Dev Diary #2)
Tags: beginners, codenewbie, go, paintgithubgreen
Published: 2022-10-08 21:57:46

This article is going to summarize week two of learning go. This week was fantastic, and I learned a lot more, but I already found an issue with my previous learning approach. 

_Shooting from the hip only works for so long._

You need to understand how to aim to improve in a specific area. I went into go blindly, which led to a lot of discovery in an unstructured way. I wouldn't go back and do it any different because it forced me out of my comfort zone and back into coding.

---

**Projects this week:**

- A basic discord bot that I could add to my personal server. You can send it direct messages, and it will automatically respond back. The tutorial was created by [Akhil Sharma](https://www.youtube.com/c/AkhilSharmaTech) he has lots of other go tutorials too.

- I started a course on microservices, by [Nic Jackson](https://twitter.com/sheriffjackson) which is free on [YouTube](https://www.youtube.com/playlist?list=PLmD8u-IFdreyh6EUfevBcbiuCKzFk0EW_). Most of his stuff seems to be from 2 years ago, so there may be some slight differences with the imports, but I enjoyed it so far.

- I started going through "[A Tour of Go](https://go.dev/tour/welcome/1)", which was helpful and exposied some of the weak spots in my previous approach. I think this is a great place to start for most people.

---

**Key Takeaways:**

I am happy with my learning outcome so far. I am still a noob by all accounts, but as I dig deeper into the go community it seems to be very friendly and welcoming.

A little personal challenge that I started that is open to anyone who wants to become a better developer is **#paintgithubgreen** which is a  **#100daysofcode** alternative focusing on making at least one commit on GitHub per day during the week, and no participation requirements over the weekend and holidays.


![A picture of my github profile showing 2 weeks of consistent activity](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fkt37lwcht6dirxu0djn.png)

Only two weeks down so far, but I am excited to build a healthy new habit. Please leave any recommendations for reading, projects, or anything else in the comments. 

Thank you to all for supporting me on this journey!


---

**Social Media:**
LinkedIn: [Austin-Higgins] (https://www.linkedin.com/in/austin-higgins/)
GitHub: [Austin-Higgins](https://github.com/Austin-Higgins)
Twitter: [@AustHiggins](https://twitter.com/AustHiggins)
React private route
Published: 2022-10-08 21:25:10

I can't create a protected route in react v6 even when the function is well declared. even being disconnected I can access the main page but error is.

0


import React from 'react';
import { Outlet, Navigate } from 'react-router-dom';

const PrivateRoute = ({component, token, children}) => {
    if(!token){
        return   <Outlet/>;
    } else {
        return <Navigate to={`/signin`}/>;
    };
    
};

export default PrivateRout;


//but as soon as I change position they differ return an error is created and the browser bugs
Don't worry about responsive design.
Tags: beginners, webdev, css, advice
Published: 2022-10-08 20:41:27

## Before you get angry with me
Responsive design is essential to understand as a front-end developer. With that out of the way here's my two cents. 

### What is responsive design?
When I first started develop websites the term, "responsive design" kept popping up. My initial thought of responsive design was how quickly a website loads, or responds to the user. That was not the case. From what I gathered, it is essential for front-end web developers to understand. This is because websites need to be accessible with as many screen sizes as possible. The easiest way to remember what responsive design  means is,  how the website RESPONDS to the screen size it is currently being displayed on.

### Learn the basics first
As a beginner, when you are just learning how to write HTML and CSS, worrying about responsive design can become overwhelming and frustrating. 
<img width="100%" style="width:100%" src="https://media.giphy.com/media/4VUiK7uleZ7BcP21Sx/giphy.gif">
My advice is to **learn the basics and create a webpage for a specific screen size first.** Focusing on a single screen size will allow to wrap your head around HTML and CSS. You'll end up feeling more accomplished in knowing you are capable of creating a webpage without having to worry about how responsive it is across all screen sizes. 

### Create as many websites as you need
Establish a base understanding of HTML and CSS where you are able to recreate a simple mobile or desktop website design with ease. Once you feel comfortable, the ideas of responsive design will be much easier to grasp as you will understand how text, images, links and layouts on the webpage are manipulated. With this power in your hands, changing those elements depending on screen sizes will be much clearer to you. 

<img width="100%" style="width:100%" src="https://media.giphy.com/media/lTj9KCbmt4A3T6PACE/giphy.gif">


###Conclusion
When you are first learning web development don't worry about how to create responsive websites. Instead, it is more important to create a static website layout using HTML and CSS. Once you feel comfortable with that then the ideas of incorporating responsiveness in your websites will be much clearer.
1. Devops :Getting started
Tags: devops
Published: 2022-10-08 20:07:59

Devops is a cultural practice by developers and operational team to use each other's tool,to smooth out the process of software delivery.

**Core values**
**Core Ideas**
**Methods**

**Why Devops?**
Agile methodology concerns about software methods,it doesn't cover server maintenace.

Devops covers these points:

Deploy faster - 50%
Less failure
Better recovery time

Team is in sync with each other.

**Devops CAMS**

1. C - Culture 
talk to each other
people over process over tools

2. A - Automation 
Automate process and do we really need to do it?

3. M - Measurement 
Measure to improve
Replicate the stuff
Cloudwatch monitor
Measurement of client activity and take action on that.

4. S - Sharing
Share responsibilty,ownership ,feedback loop is important.


Devops follow three basic steps:

1. **Flow thinking**
What is already happening,or in process.

2. **Amplify feedback**
We get feedback from ops team timely.

3. **Experiment and learn**
New tool in launch and work

So basically,we have code,test,deploy under operation.

> Dev team : plan,code,build and test

> Ops team : release,deploy,operate and monitor

Some basic terminology to rememeber before getting started:

- **Provisioning**
Server is ready with OS,software and networking.

- **Deployment**
Adding or upgrading software on server

- **Orchestration**
Coordinated operations on multiple systems.

- **Configuration management**
Managing server configuration via files such as RAM,space,dependency software etc

- **Imperative(Procedural)**
Commands to produce desired state

- **Declarative(Procedural)**
Desired state is defined and tools will achieve it

- **Idempotent**
Repeat execution and same result

- **Blue Green deployment**
Identical deployment,used as switch

- **Continuous Integration**
Build and unit test at every checkin

- **Continuous Delivery**
Deploy on production live environment at every checkin

- **Continuous Deployment**
After unit testing,deploy changes to production in small patches.

Thanks,
Rupa kumari
My first week as a junior developer
Tags: devjournal, beginners, career
Published: 2022-10-08 19:59:58

## Introduction 
I am a codenewbie, started my dev journey in 2021 as hobby. In the beginning of 2022 I decided to attend a part time bootcamp next to my full time work. After 3 months I quit my job and jumped to programming with full power 💥💥

Now here I am, started my first dev job this week. 😍 

## The job
It is a junior JavaScript (Vue) developer position. We agreed I start full remote as I am currently living in Denmark and the company is a Hungarian based company. I think this is actually a big deal that they agreed and still wanted me to be their new junior colleague. 

##  The first days
So the first 2 days was pretty quiet. I wrote an email Monday morning to the team leader that I am ready to start, but until I don’t get an exact task I would start to learn up the framework (Vue), what is required for the project later on. 

Wednesday we had a meeting online where I met with two other colleagues. I am going to work with them closely. I also already got some smaller tasks to check out. 

Thursday I set up my computer for the project. And wow it took some time 😅 did not expect that but getting to know all the GitHub organisation and setting up all the software and other packages… was not so easy.

Friday I started to dig in to Vue framework and getting to know the project a little bit more.

## The project
The company is making application for insurance companies. The project I am going to work with is going to be a web application where the user can search, compare and sign up for different insurances. 

It is going to be with Vue framework with node js backend and couch db. 

It is actually already in the testing phase. 

## Next week plan
It is already getting clear. Going to be some GitHub practice within the project. Moreover I am going to get a little course about insurances 😀 not really IT related but I also need to understand the vocabulary of insurance world. 

**I am really grateful for this opportunity and looking forward how it’s going to be later on**

**_SO STAYED TUNED_**
With stickers or not?!
Tags: programming, javascript, beginners, productivity
Published: 2022-10-08 19:57:00

Do you use stickers on your laptop or not? 
Left a picture of your stickers on the comments.


My laptop stickers:
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u4wjbe7wbd48h446tk61.jpeg)