teleren/devto huggingface dataset:
[Conceito] - Latência vs Tempo de Resposta
Published: 2022-10-17 22:49:32

> Conteúdo original em https://twitter.com/zanfranceschi/status/1582141139297001472

---

Ei dev,

Você sabe qual é a diferença entre LATÊNCIA e TEMPO DE RESPOSTA!?

É tudo a mesma coisa ou tem diferença? Se uma API demora pra responder é o que?

cc @sseraphini

↓

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

---

Latência e Tempo de Resposta são coisas diferentes, sim!

Latência tem a ver com a "viagem" que uma requisição faz até o componente que a processará – um servidor web, por exemplo.

Mas a palavra "latência" pode soar meio sem sentido, né? Latência, "viagem"... afe, nada a ver...

---

O termo latência vem de latente, de algo aguardando alguma coisa. É o tempo de espera do servidor para lidar com uma requisição, ou o tempo de espera do cliente para lidar com uma resposta, p.ex.

Latência é um termo que faz sentido da perspectiva de quem aguarda alguma coisa.

---

A combinação da latência de ida (request) e a latência de volta (response) é chamada de round-trip latency.

Latência está intimamente relacionada com a rede. Altos tempos de latência quase sempre estão relacionados com aspectos de rede (QoS, congestionamento, etc.).

---

Latência geralmente NÃO tem a ver com o tempo que um servidor leva para processar alguma coisa.

Imagina o código que você escreveu que lida com as requisições HTTP, por exemplo – validações e qualquer outra lógica. O tempo que esse processamento leva é o TEMPO DE PROCESSAMENTO.

---

Pense no TEMPO DE PROCESSAMENTO como sendo o tempo a partir do momento que um servidor recebe o último byte de uma requisição até o momento em que ele envia o último byte da resposta.

---

"Mas e o TEMPO DE RESPOSTA que você falou no começo?", você pergunta.

O TEMPO DE RESPOSTA nada mais é do que latência mais o tempo de processamento! Fácil, não?

Olha um exemplo nessa imagem aqui.

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

---

Uma observação: se você testar uma aplicação localmente, o tempo de resposta pode não considerar a latência porque ela pode nem existir numa comunicação via loopback (localhost).

---

Bom, era isso que tinha pra falar sobre LATÊNCIA versus TEMPO DE RESPOSTA (e TEMPO DE PROCESSAMENTO).

Muito obrigado se leu até aqui! ❤️
Hacktoberfest PR#2: Windows isn't the greatest OS for development
Published: 2022-10-17 23:13:44

Hey there! Glad you've come by. 

Last week, I've been trying to get my second PR for Hacktoberfest. Let me tell you about how it went.

## Looking for something to work on

My previous issue for Hacktoberfest was kind of easy to find: I saw a message in Telescope's Slack channel about translating documentation to different languages.

This week, however, it wasn't so easy to find an issue. I really didn't want to work on the same repo, and I wanted to start doing some coding, instead of just Markdown stuff, so I started my search. 

I spent around 3 hours simply trying to find something that would suit my preferences. At first, I was looking through some big projects I am interested in, like VS Code or NestJS, but issues in such big projects are of much higher complexity than I wanted to work on this week.

So, eventually I started looking for issues rather than repos. I added some labels and details to the search so I wouldn't just look through 83 million issues, and finally found an [issue](https://github.com/intel/cve-bin-tool/issues/2168) in Intel's [cve-bin-tool](https://github.com/intel/cve-bin-tool).

It looked more difficult and a bit confusing at first, but in the end changes weren't that huge. And while this week's contribution might seem much easier than translation, it certainly wasn't...

## Project installation, or why I dream of a Mac

After I replied to the issue, I forked the project and started setup. I mean I started *trying* to set up.

To begin with, I have a Windows laptop. I have always been rather unhappy with Windows as a developer. Something always breaks, and sometimes things just don't work at all. And today I got another confirmation of that assumption.

When I tried running installation scripts, I had errors. Not with one certain part of a project, I had full terminal in color red. I started thinking that I did something wrong during an installation, but apparently it was simply because I needed to use Unix-based OS. Spent around 1.5 hours to understand that though...

So, I went ahead and setup Ubuntu VM using WSL for development, and started my work there. And just like you'd think, everything ran as smoothly as it could.

## Changes

The changes I made were not drastic, I would rather describe them as a small optimization.

When I was finished, I opened a [PR](https://github.com/intel/cve-bin-tool/pull/2171), and all I have to do now is to wait for feedback.

## Summary

I am certain that I accomplished what I was trying to do for the second PR. I understood how projects are usually setup, and gathered some experience with WSL and Ubuntu.

What I've done this week prepares me for bigger things I am planning to do in future weeks.
Make your website editable
Tags: webdev
Published: 2022-10-17 22:17:36

## Problem
A website is made of content that change (iteration, translation, targeting...). Whether it's as a developer or not: **open an IDE to update text contents is time-consuming and painful.**

## Actual Solutions
**Using a CMS?**
Do I need such a heavy solution to make content updates better? As a freelancer, do my client need to pay hundreds of dollars more to have the ability to choose their content after the delivery? I don't even speak about translations.

**Using i18n librairies?**
I'm sick of the key/value system: it's already hard enough to choose a name for variables, PLEASE DONT ASK ME TO NAMED KEYS. On top of that, the inputs are JSON files. That means this is not accessible easily without another external (expansive) tool.

## A better Solution?
**Nothing but complaining? 👀**
That is a while since I'm unsatisfying with the actual solutions for simple content management purposes. I want something lightweight, fast to set up and easy to use for everyone. (included dev)

So why don't make it simple as `contenteditable=true`, save changes and store them in a DB to retrieve them in production?

**Our proposition: Dynamite**
So we start Dynamite, **which makes all the website's text editable by your team** (or client) by pasting a single line of code.

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

As the Figma way, we want to bring a better way to manage content on modern websites:

- Super easy to use
- Collaboration centric
- A product that we love

The Beta just opened and we'd love to have developers' feedback, you can try it now for free: [dynamite.run](https://dynamite.run)

Feedbacks are welcome!
Day 637 : Boundaries
Tags: hiphop, code, coding, lifelongdev
Published: 2022-10-17 22:07:24

_liner notes_:
- Saturday : Don't really remember what I did during the day, but I do remember having a good time on the radio show! The recording of this week's show is at https://kNOwBETTERHIPHOP.com

![Radio show episode image of a screenshot of a fundraiser for the Second Harvest Food Bank CFL with the words Oct 15th 2022 DeScamtis](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q8m1yxyeohjsgk9pj9ks.jpg)

- Sunday : Did my study session at https://untilit.works. Got quite a bit done with a new layout I wanted to try out for a side project. I was running into an issue and it wasn't until I was talking it out on the livestream that I thought of an idea and that fixed it. Ended the night trying to stay up to watch Walking Dead, but fell asleep.

- Professional : So yeah, work was ... work.

- Personal : Been preparing some resources to help with my exploration into WebXR. I definitely want to start diving more into it, especially next year. I even bought a Meta Quest Pro to develop with. We'll see how it goes. From what I'm seeing so far, it looks like the things I'm thinking about should work. Looking forward to diving in more and pushing the boundaries of what I've done already.


![Rocky coastline of Monemvasia, Greece with some grass against very blue water](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4j187ms5mwc3jp38k33c.jpg)

Going to watch "The Walking Dead", work on my side project and go to bed.

Have a great night!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube XPd1cB2yy4o %}
Data Science in your browser - introducing We Do Data Science
Tags: datascience, analytics
Published: 2022-10-17 22:03:34

I love writing code, but it got painful starting a new software project every time I wanted to make some graphs or do analysis.

I tried some free online tools, but couldn't find anything I really liked.

Some even wanted me to give them my phone number to start a free account. 

Protip: to make your number believable, just input your actual phone number with 1 or 2 numbers changed (also works great in bars).

One day I even tried downloading Tableau. 20 minutes later and 2 email confirmations later I was messaging support to cancel my account (they don't let you do this by yourself).

So I created [We Do Data Science](https://www.wedodatascience.com/)


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

We Do Data Science lets you make [graphs](https://www.wedodatascience.com/graphs) in your browser. 

My personal favourite are [Nightingale](https://www.wedodatascience.com/graphs/pie/nightingale) graphs. I never knew about them until I started making this website.

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

When I make graphs sometimes I also want to do data analysis. Like performing [regression](https://www.wedodatascience.com/regression) or calculating [correlations](https://www.wedodatascience.com/correlation).

So I built regression calculators

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

and correlation calculators


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

I never knew there were different kinds of correlation until I made this site, cool huh.

When I work with data sometimes I need to convert file types. There are lots of great conversion tools online, but none of them [converted parquet](https://www.wedodatascience.com/datasets/convert/parquet) files.

So I made a [csv to parquet](https://www.wedodatascience.com/datasets/convert/csv/parquet) converter and a [parquet to csv](https://www.wedodatascience.com/datasets/convert/parquet/csv) converter.


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

I even got interested in statistics and made some [statistics calculators](https://www.wedodatascience.com/statistics)

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

Anyway. If you do try out [We Do Data Science](https://www.wedodatascience.com/) then I hope you enjoy using it as much as I do.

If something isn't working, or you want to get in touch then you can find me on Twitter with the handle scottgpaulin.
HotReload with Ruby on Rails 7
Tags: rails, programming, productivity, webdev
Published: 2022-10-17 21:53:37

Hi Folks, 

Just [published](https://medium.com/@grzegorz.smajdor/hotreload-with-ruby-on-rails-7-cbca367500fe) a small article about the hot-reload in Ruby on Rails 7 on [medium](https://medium.com/@grzegorz.smajdor/hotreload-with-ruby-on-rails-7-cbca367500fe).

Hope you find it useful!

Br,
[Grzegorz](www.grzegorz-smajdor.com)
@[deliverists.io](www.deliverists.io)
How to re-sync auto-increment in PostgreSQL
Tags: sql, postgres
Published: 2022-10-17 21:11:05

First, to check if your auto-increment is out of sync, run the following: 

```sql 
select max(id) from table;

select nextval('table_id_seq')
```

If the result from `nextval` is not greater than the result of your `max(id),` your auto-increment is out of sync. 

`table_id_seq` is the name of the sequence, which is composed of `table name _ column with auto-increment _ seq`. If you have a table `purchases` where the `id` is the auto-increment column, then the sequence name would be `purchases_id_seq`. 

If you have your table inside a schema, following the previous example, having your table inside of `ecommerce`  schema, the name would be `ecommerce."purchases_id_seq"`.

You can check all your sequences with the following statement :
```sql
select * from information_schema.sequences
```



Here's the statement to fix it, using our example names:

```sql 
select setval('ecommerce."purchases_id_seq"', coalesce(
(select max(id)+1 from ecommerce.purchases), 1), false)
```

Hope this was helpful!
How to find the delta between rows in PostgreSQL
Tags: postgres
Published: 2022-10-17 20:50:38

Imagine we have the following data:
```bash
+--------------------------+----------+
|       "timestamp"        | "price"  |
+--------------------------+----------+
| "2021-10-14 21:40:00+00" | 57681.01 |
| "2021-10-14 21:35:00+00" | 57698.41 |
| "2021-10-14 21:30:00+00" | 57575.77 |
| "2021-10-14 21:25:00+00" | 57573.92 |
+--------------------------+----------+
```

And we want to calculate the delta between prices, to see how much the current price increased or decreased relative the the previous one. For that we can use `lead()`.

Having the following SQL query: 
```sql
SELECT
	timestamp,
	price,
	lead(price) OVER (ORDER BY timestamp DESC) AS previous_price
FROM
	prices;
```

We get this data: 

```bash
+--------------------------+----------+------------------+
|       "timestamp"        | "price"  | "previous_price" |
+--------------------------+----------+------------------+
| "2021-10-14 21:40:00+00" | 57681.01 |         57698.41 |
| "2021-10-14 21:35:00+00" | 57698.41 |         57575.77 |
| "2021-10-14 21:30:00+00" | 57575.77 |         57573.92 |
| "2021-10-14 21:25:00+00" | 57573.92 |         NULL     |
+--------------------------+----------+------------------+
```

Dissecting a little bit the lead part we can see that we have to use the `OVER` keyword and tell it how to order the data, and *over* that data we will get the lead price field.

Now to get the relative change we need to apply the following formula: 
```
(b - a) / a
```
Where `b` is the current value and `a` the previous one.

So we will end with the following query; note we are already multiplying by 100 to get it as a percentage.
```sql
SELECT
	timestamp,
	price,
	(( price - lead(price) OVER (ORDER BY timestamp DESC)) / lead(price) OVER (ORDER BY timestamp DESC)) * 100 as percentage_change
FROM
	prices;
```

Giving us the data we want:
```bash
+--------------------------+----------+--------------------------+
|       "timestamp"        | "price"  |   "percentage_change"    |
+--------------------------+----------+--------------------------+
| "2021-10-14 21:40:00+00" | 57681.01 | -0.030156810213661       |
| "2021-10-14 21:35:00+00" | 57698.41 | 0.213006269824962827     |
| "2021-10-14 21:30:00+00" | 57575.77 | 0.0032132604484808399359 |
| "2021-10-14 21:25:00+00" | 57573.92 | NULL                     |
+--------------------------+----------+--------------------------+
```

Hope it was useful!

P.S. [Here](https://www.postgresqltutorial.com/postgresql-lead-function/) is a more detailed explanation of the `lead` function.
SSO and MFA for Oracle E-Business Suite (EBS) via Datawiza | Microsoft 365, Azure AD, Okta, Duo...
Tags: oracle, azure, activedirect, webdev
Published: 2022-10-17 20:43:14

https://www.youtube.com/watch?v=Ja-8mgLQHYE

Enable SSO (Single sign on) and MFA (Multi-factor authentication; 2FA) for users to login to Oracle E-Business Suite (EBS) in minutes! Learn more: https://www.datawiza.com/enable-sso-mfa-for-oracle-e-business-suite-in-minutes/

Datawiza integrates with any identity provider and MFA (2FA) service, like Microsoft 365 (Office 365; O365; Azure AD), Cisco Duo, Okta, AWS, Google, Auth0, Ping, ForgeRock, OneLogin, ADFS. 

Datawiza works with any web apps including:
- Business apps, like Oracle PeopleSoft, E-Business Suite, Siebel, SAP and more.
- Homegrown apps written in any language, like JAVA, PHP, .Net, Python, Go and more. 
- Critical tools like Wordpress, Kibana, Kubernetes, Jenkins, Grafana, SuperSet, AirFlow and more. 

_______________________________________
Learn with Datawiza

The Datawiza blog - https://www.datawiza.com/blog
Implement yours today with Datawiza: https://console.datawiza.com/
_______________________________________
Follow Us on Social

Join our Discord Community - https://discord.com/invite/Sn3nbc83Up
Follow us on Twitter - https://twitter.com/datawiza_com
Follow us on LinkedIn -  https://www.linkedin.com/company/datatawiza
Amazon Lightsail Free Credits Draw
Tags: aws, lightsail, giveaway
Published: 2022-10-17 20:17:21

<!-- wp:image {"align":"center","id":721,"sizeSlug":"full","linkDestination":"none"} -->
<figure class="wp-block-image aligncenter size-full"><img src="https://www.linuxtek.ca/wp-content/uploads/2022/10/amazon_lightsail_logo.png" alt="" class="wp-image-721"/></figure>
<!-- /wp:image -->

<!-- wp:heading -->
<h2>Editor's Note</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
This article was originally published on www.linuxtek.ca and some of the links and references will refer back to that site.
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2>Introduction</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>I've been exploring the <a href="https://aws.amazon.com/lightsail/">Amazon Lightsail</a> services recently through these previous articles:</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><li><a href="https://www.linuxtek.ca/2022/09/18/migrating-wordpress-from-gcp-to-aws/">Migrating Wordpress from GCP to AWS</a></li><li><a href="https://www.linuxtek.ca/2022/10/14/testing-lightsail-containers-with-minecraft/">Testing Lightsail Containers with Minecraft</a></li></ul>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p>As part of the research, I've been fortunate enough to speak with a number of resources through my contacts in the <a href="https://aws.amazon.com/developer/community/community-builders/">AWS Community Builders Program</a>.  I've been provided two codes for $50 of credits for Amazon Lightsail services, and I want to pass them on to you, dear reader!  </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>If you're hosting workloads on Amazon Lightsail, or want to try some of them out, then this is the draw for you.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2>The Draw</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>You can enter the draw at [removed]<br></p>

<!-- wp:paragraph -->
<p>Good luck, and I hope the winners build something cool with these credits.  I'd love to hear about it!</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2>Update - November 1</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Congratulations to our two winners!  I used a dice roller to randomly choose two winners, and have emailed them the codes.</p>
<!-- /wp:paragraph -->
Beginner RN Question
Published: 2022-10-17 20:10:06

NVM. I figured it out. I needed flexDirection: 'column'.

I am having trouble figuring out why I can only see one child view of the container in the code below. I can see the buttonContainer View but the spaceStyle View.

Thx,
Tom


import React from "react";
import {
    StyleSheet,
    View,
    Button,
  } from 'react-native';
  import { colors } from '../Components/colors';
  import {fontSizes, spacing} from '../Components/spacing';
  
  export function ScanView() {
    return (
      <View style={styles.container} backgroundColor={colors.darkBlue}>
        <View style={styles.buttonContainer} backgroundColor={colors.white} />
        <View style={styles.spaceStyle} backgroundColor={colors.brightRed} />
      </View>
    );
  };

const styles = StyleSheet.create({
  container: {
      paddingTop: 0,
      flexDirection: 'row',
  },
  buttonStyle: {
      fontSize: fontSizes.xxxl,
      alignContent: 'center',
      minHeight: 96,
  },
  spaceStyle: {
    flexDirection: 'row',
    width: "100%",
    height: 100,
  },
  buttonContainer: {
    flexDirection: 'row',
    paddingTop: 10,
    width: "100%",
    height: 100,
  },
  controlsContainer: {
    paddingTop: 40,
    flex: 0.2,
  },
  clearContainer: {
    alignItems: 'center',
    padding: spacing.md,
    flex: 0.1,
  },
});
Bingo Tingo | Best Place To Gain Knowledge | Kenba
Tags: kebna, bingotingo, canva
Published: 2022-10-17 20:02:20

<a href="https://bingotingo.org/">Bingo Tingo</a> Canva Provides Tech Tips, Tricks, Tutorials, Informative Kenba Articles, Gaming, Blogging, Life Hacks bingotingo canva &amp;amp; Envato Elements. <a href="https://bingotingo.org/how-to-use-kenba.html">https://bingotingo.org/how-to-use-kenba.html</a>

https://www.pinterest.com/BingoTingoorg/

https://linktr.ee/bingotingo

https://archive.org/details/@bingo_tingo

https://www.change.org/p/bingo-tingo

https://www.openstreetmap.org/user/Bingo%20Tingo%20Kenba

https://www.scribd.com/user/634314586/Bingo-Tingo

https://disqus.com/by/bingotingo/about/

https://twitter.com/BingoTingo6

https://www.youtube.com/channel/UCgRClW17GkWZHKDT3s7EXwg

https://profile.hatena.ne.jp/bingotingo/

https://www.businessbook.pk/detail/bingo-tingo-buner-139579

https://bingotingo1.weebly.com/

https://www.slideshare.net/bingotingo

https://medium.com/@bingotingo/bingo-tingo-best-place-to-gain-knowledge-fd0382b7ac45

https://myspace.com/bingotingo

https://www.sbnation.com/users/BingoTingo.org

https://www.crunchbase.com/person/bingo-tingo

https://about.me/bingotingo

https://www.behance.net/bingotingo

https://soundcloud.com/bingoting

https://draft.blogger.com/profile/15282263717126386970

https://issuu.com/bingotingo
Using Hashicorp Vault to Write/Read Secrets in Terraform KV1 Backend
Tags: vault, terraform, devops, security
Published: 2022-10-17 19:54:35

If you have Vault set up as per prior posts and you are authenticated to the server, you can use vault to store secrets.

## Writing a Secret

In this case, we have an ip address that we create when we bring up VM and we want to store it in Vault.

This is done with vault_generic_secret resource.

Below is the a valid KV1 path. In this case, we [configured KV1 to the path kv-v1](https://dev.to/frederickollinger/hashicorp-vault-key-value-i-kv-secrets-engine-3h2.)

```hcl
resource "vault_generic_secret" "deploy_ip_secret" {
  path = "kv-v1/deploy"
  data_json = <<EOT
{
  "ip": "192.168.1.13"
}
EOT
}
```

In this example, we are going to set a single variable, "ip" to the ip address as a string, "192.168.1.13". You can add more variables into a single transaction if you comma delimit them and place them in the data_json block.