teleren/devto huggingface dataset:
SANPUERTO # 0.0.1
Tags: javascript, ragemp, coding, lithuanian
Published: 2021-10-21 19:33:08

Pakeistas chat bei kitų ui font'as

Perrašytas saugojimas bei registracijos sistema, pilnai pašalinta multi-char sistema, nuo šiol registruojantis, jungiantis bus privaloma naudoti slapyvardį Vardas_Pavardė formatu.

Serverio restartas nuo šiol vyks 12 val. nakties seniau vykdavo 5 val. ryto

Nuo šiol PayDay gaus ir žaidėjai esantis AFK.

Pašalintos ADMIN,Bedarbio pašalpos.

Išimti savininkų komandų viešieji pranešimai.
SANPUERTO # 0.0.2
Tags: javascript, ragemp, coding, lithuanian
Published: 2021-10-21 19:29:32


Sutvarkyta klaida dėl kurios registruojantis buvo galima prasmukti nenaudojant V_P formato.
Pašalintos prologue, quest sistemos, dėl netinkamo veikimo.
Žaidėjui parašius į chat nuo šiol vietoj ID - TEKSTAS rašys V_P(ID) - TEKSTAS
Pašalintos /try, /do komandos palikta tik /me - skirta pranešti žaidėjams žinute 5m didesniu atstumu nei, kad paprastas chat.
Administratorių chat /a => /ac
Direktoriams/pavaduotojams sukurta komanda /d - viešiesiems  skelbimams skelbti
Pašalinta Cayo perico sala bei North Yankton kuris buvo prologue dalis.
#Increasing the Loading Speed of a CLI Web Scraper to Improve the User Experience...
Tags: beginners, ruby, webdev, performance
Published: 2021-10-21 19:27:35

Slow application load times can cause frustration on behalf of the user. This can lead to users abandoning the use of the application. 

In the terminal, you can use the Linux time command to retrieve the time it takes to run a command. The command I used was time  ./bin/Urgentcare. This command starts the application and loads a menu for the user. 

```
real	0m12.122s
user	0m4.472s
sys	0m2.130s

```
The real time listed is the total start to end time of the call. The above time is the time for the scraper application to load the initial menu after the command "time  ./bin/Urgentcare". The menu is displayed to the user after the application is started. This requires that the website is scraped and office objects are created with the data. 

According to google think, the user bounce rate greatly increases once the load time goes from 1 to 3 seconds. The initial 12 second load time for the menu far exceeds that expectation. This could be due to the website itself taking a long time to load and/or the code is taking a long time to run.

To help resolve this issue you can provide feedback to the user to let them know that the application is successfully running that the data they are looking for is loading. I added a simple method in the CLI component called loading_message that prints a message to the screen that the data is loading. This way the user knows that the application is working and that their input was valid. 

```
Welcome to the Urgent Care CLI
 
 
 
 
Retrieving data....
Loading......
```

In order to reduce how long it took the main menu to load, I changed one of the iterators from .each_with_index to .each. The office_url method that used it did not really require the addition of an index as a different method call was already adding it. This helped to reduce the load time. 

However, the biggest factor in increasing the speed of the application was refactoring the code so that I was not waiting for a call to each individual office page to retrieve the current appointment times before loading the initial user menu. Instead, I now only call the office page for the appointment time upon user request from the initial menu. This produced a new time of 
```
real	0m4.145s
user	0m1.451s
sys	0m0.861s
```
to run the time  ./bin/Urgentcare command. This is now one third the time it took to load the menu prior to the refactor.
A Ruby CLI Application Showing the Distribution of Languages Across Countries
Published: 2021-10-21 19:01:25

My goal was to build a CLI (Command Line Interface) application that utilized external data from a webpage, prompted a user to make choices, and then provided detailed information back to the user based on the choices which the user made.

I chose to build a Ruby CLI application that would allow a user to see information about all of the regions, countries, and national languages of the world. First I found an API (application programming interface), from the website restcountries.com:

**https://restcountries.com/v3/all**

This API provided a very detailed list of all the countries in the world, the major languages used in those countries, the regions of the world those countries are located in, and some other important geographical information about those countries.

With this API, which contained detailed geographical information in JSON (JavaScript Object Notation) format, I was able to obtain the external data that my application could utilize to provide geographical information back to the user.

In order to parse the JSON formatted data and import it into my application, I used the following lines of code:

```
URL = "https://restcountries.com/v3/all"

    def get_country_data
        uri = URI.parse(URL)
        response = Net::HTTP.get_response(uri)
        response.body
    end

    def countries
        countries = JSON.parse(self.get_country_data)
    end
```

With the relevant geographical data for each country now accessible to my program in the form of nested hashes, I was able to use that data to create Ruby objects that my application could manipulate in various ways. 

I chose to focus on data about the names of countries, regions, and languages out of the data that had been made available to my application from the restcountries website. 

Consequently, in my 'lib' folder, I created Country, Region, and Language classes, as well as another class to import the raw data, and crafted methods for each class that would allow me to display the geographical data in specific ways back to the user.

I also created a CLI class, where I stated the various options available to the user to obtain different kinds of information about countries and languages, and provided prompts for specific information to the user about what information they were looking for. In my CLI class I also defined additional methods to provide responses to information that the user might enter.

Finally, I created an executable file in the bin directory of the application to run the completed program, as well as an environment.rb file in the 'config' folder and a Gemfile and README file.

With this, my application was complete and I had a working Ruby CLI application that utilized external data.
MVP
Tags: product, startup
Published: 2021-10-21 18:43:11

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

I just read this article https://uxdesign.cc/whats-not-an-mvp-b2658341ceb and wow... I do not know, my senior said that that diagram is true, I mean, we need to build skateboard first before we build a car.
But the article says different
Well, there are many variables that determine for building MVP
Good read :)
What makes you so confident?
Tags: question, discuss
Published: 2021-10-21 18:36:09

I've often thought about writing a "how-to" on here or a simple list of code instructions like some of our fellow dev'ers do. What stays my hand is the question "what make you so confident?" and then I usually click Save draft and move on.

I've always subscribed to the idea that you shouldn't post things you aren't an expert on. Which is why I don't post things often and when I do it's more of a "hey, look what I did" and not "here's how to do x". 

Do folks (you, dear reader) have any thoughts on the matter? Do you look for only expert written articles?

I'm genuinely curious, what makes dev authors so confident and fearless to post these types of articles? Are you considered an expert in the things you write about?
Pair programming
Tags: devjournal, programming, productivity, pairprogramming
Published: 2021-10-21 18:22:59

Well I stumbled upon one article on Pair Programming on dev.io and I loved it.
https://dev.to/jacobherrington/7-ways-to-get-the-most-out-of-pair-programming-415h

 I could basically understand the notion of doing pairing while coding. It opened up a whole new level of perspective for writing softwares together. It introduces some amazing ways one can collaborate during programming.

My team have been following this practice for over 1 year now and everyday brings new lessons to us. Would suggest everyone to give it a go.

This article suggested ways to get the most out of it. I am sure, many of you will find it helpful.


So did you pair with anyone today?
Go NoOps with Kubernetes and GitHub
Tags: devops, cloud, github, kubernetes
Published: 2021-10-21 16:58:30

What about implementing a full automated #NoOps solution? I have done this setup in minutes thanks to **kubernetesio**, **[Shipa](https://shipa.io/)** and **github** actions. 

NoOps trend is now possible thanks to public cloud and services that give us solution that works out of the box. Anyway, many of these services come with some limitations or have costs that explode with resource usage. That’s why a lot of developers still prefer solutions like Kubernetes for keeping control over the application and having full freedom for implementation. Anyway, Kubernetes governance is expensive and we aim to reduce the friction near the application development.

[Read the article  to discover how! ](https://betterprogramming.pub/how-to-create-a-noops-deployment-with-github-actions-kubernetes-and-shipa-18aab208fe7a?sk=6461b38b64b8d4d495c855d9cfecb53d)
That's Blackjack!
Tags: python, beginners, codenewbie, programming
Published: 2021-10-21 18:03:34

![Python Blackjack program](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/12y6pprxfnh6xxv906bw.gif)

# Background
The final project of the CS101 course on [CodeCademy](https://www.codecademy.com/) asks the student to write a terminal game in Python. For this project I have chosen to create a simple game of Blackjack.

# Summary
This is a very simple rendition of the classic casino banking game Blackjack.  The dealer deals 2 cards to the player and 2 to itself.  At the start of the round, the player can see both of their cards, but only 1 of the dealer's card.  The player then can ask for another card ("hit") or reject another card ("stay").
The goal of the game is to hit 21 in the value of dealt cards. When this happens, the player has Blackjack.  If the player goes over 21, they lose the game.
After the player's part is over, the dealer plays. The second of the dealer's cards is revealed at this point. If the total of the dealer's cards is less than 17, the dealer must "hit".  If the dealer goes over 17, they must "stay".  If the dealer hits Blackjack, the player loses.  If the dealer goes over 21, the player wins.
At the end of the game, whoever has the highest card total wins.

# Plans
I intend to come back to this program and spruce it up once my coding skills are a little more developed. The next step would be to include a betting system which provides the user a bit of money and allows to place a bet on their hand while maintaining the value of their money, gains, and losses.
I'd also like to set it up with ASCII art cards to represent the dealt hands, and make a bigger difference between the player's cards and the dealer's cards.

# Source Code
The full program can viewed on [GitHub](https://github.com/m1chaelcodes/python_final/blob/main/blackjack.py).
Vscode in browser 🔥
Tags: vscode
Published: 2021-10-21 17:17:42

All of we used VsCode IDE. And we love it their interface and all other features are awesome. To use it we need to install there application . But not now if you want you can is it in your lovely browser also 😮

So how to do that or how to use it in browser :

```sh
just goto : https://vscode.dev/ 
```
```sh 
After opening the link you can see a window as it showing below 
```
![Demo](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0wh1nxx6bkbo6ws971pb.png)

For more details you can go through the link below: 
**https://code.visualstudio.com/blogs/2021/10/20/vscode-dev**

so now you can use your IDE in your browser Happy coding 😀
Future Of Data Science And Machine Learning

Tags: javascript, datascience, machinelearning
Published: 2021-10-21 17:06:46

Don’t worry if you are completely new to data science, Data Science is the mix of data interference, various analytical tools, different programming algorithms, and machine learning principles where data is used to gain valuable insights on <a rel="dofollow" href="https://www.businesstomark.com/">great seo</a>
. 

In this digital era, it would be silly to ignore data and the benefits it brings to an organization. Many businesses have shifted to data-driven approach in different ways. And those who haven’t shifted yet are likely to do so in the future.

For three consecutive years, data scientist is topping the number one job chart in the U.S. by Glassdoor. According to the U.S. Bureau of Labor Statistics reports, by 2026,   the evolution of data science will create 11.5 million job opportunities in the country. The role of data scientist has become such a hot job option for tech geeks.
How to Design Idea based Poster for presentation
Tags: design
Published: 2021-10-21 16:46:01

Presentation is skill which is actually help to build confidence and grab audience attention one better presentation help you to get your dream job so presentation is essential for everyone. 
    Today I  Designed poster for national level presentation competition while designing poster I realized some key points which I want to share... First one visualize your idea in working flow in your mind then divide the idea in different section because its easy to manage content and others assets. Second thing keep it simple and short. Your poster must be clear and communicative and short. Title is another important thing because its top of the section so keep it unique and simple. Third one is color and images in poster add some creative images which actually help your poster for describing your idea. color may be less to add in poster with combination. Fourth one right thing in right place its very important to place right assets in right section with relative content. Fifth one used key points, bullets and numbering to make more interactive poster and always used numbering or problem statements section and for another you can add bullets or key point for your content information. Now you good to go for your next poster presentation. Here I share link of my poster which I design today. 

Poster: https://drive.google.com/file/d/1wHWj0mitWPUDrxDSmHCK9cWt1wwBS-_N/view?usp=sharing
Unit Test  Suit Scrutiny
Published: 2021-10-21 16:26:16


Doing scrutiny with below points may help to maintain your unit test suite to make more sense

## Developer experience
 - How easy it is to use the test suite for a developer in a busy day ? 
 - Is your CI is good enough to execute your tests frequent enough ? 

## Test failures
 - Break a code unit and find which tests are failing. it should expose week points

## Test case descriptions and error messages
- how accurate are the Error messages on failure of test ? Are you able to find out what exactly broken just by looking at the message ?
- How easy it is for you to understand what the code unit is responsible for just by looking at log of test suite execution ?

## Test suite performance
 - Are there any tests taking unreasonable or significant amount of time ?
 - Consider skipping such tests and find the root cause of low performance of that test. This should help you to know the unknowns on which the implementation is relaying on.
Como resolver problemas de versionamento dos pacotes no Lerna
Tags: javascript, monorepo, architecture, braziliandevs
Published: 2021-10-21 16:23:06

Um problema que pode se tornar muito comum é conflitos de versionamento do Lerna. Vamos a um exemplo: 

Você tem uma lib (biblioteca) onde duas pessoas desenvolvedoras fazem a manutenção do mesmo, porém numa última atualização aconteceu de um dev sem querer rodar o `lerna publish` direto de uma branch local e não na `main` (branch principal) como é mais comum. Acontece é que um tempo depois você também precisa atualizar o pacote e quando tenta na branch principal (que seria o correto), dá um erro informando que a versão a ser atualizada é bem diferente da atual. Mas por que isso acontece? Porque a última branch que foi feita a atualização lançou uma versão X enquanto a outra está com uma versão totalmente defasada (quando atualizamos o pacote com o lerna o mesmo atualiza os `package.json` e o `lerna.json`. A "solução" seria fazer um novo merge com as infos do pacote atualizadas para a última versão, porém muitas das vezes acontece da branch ser deletada minutos depois que é feito o merge na branch principal (eu particularmente não gosto de fazer dessa forma).  

A vantagem é que o Lerna possui uma opção chamada "Custom Version", ou seja, você mesmo pode atribuir a versão que quer para o seu pacote (use com sabedoria). Uma forma mais rápida e segura de resolver os problemas de versionamento que podem ocorrer. 

Quando você rodar o `lerna publish` no terminal irá aparecer essas seguintes opções: 

![Print da tela de um terminal com as opções de versão do pacote com a opção do custom version](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k243st02h6a82ew9b1zx.png)

Basta selecionar o "Custom Version" e e aí é só digitar a tag a versão que você quer. Depois disso é seguir o restante do procedimento padrão de publicação de pacotes do Lerna :)  

---

Para finalizar, uma observação: claro que o cenário ideal seria a automação do publish através do CI e afins, mas existe também um outro cenário da atualização dos pacotes de forma manual. Então a solução seria para esses casos, beleza? 

Então é isso. Até a próxima!
Java Shell Tool
Tags: braziliandevs, java, tooling, beginners
Published: 2021-10-21 16:22:27

Estava fazendo a trilha [Java Explorer da Oracle](https://learn.oracle.com/ols/learning-path/java-explorer/40805/79726) e lá, pela primeira vez, ouvi falar sobre o **Jshell** e resolvi escrever sobre ele, porque achei bem legal o que ele faz.

O **Java Shell Tool** (Jshell) é uma ferramenta interativa para aprender a programar em **Java** e prototipar código. Jshell é é um **Read-Evaluate-Print Loop** (REPL). Isso significa que ele vai ler (Read) e avaliar (Evaluate) os comandos e mostrar (Print) o resultado e então voltar ao início para o próximo input. O REPL faz o seu tempo de execução mais tangível e te permite testar hipóteses sobre isso.

O JShell é utilizado via linha de comando, assim você pode fazer o input de dados no programa um por um e ver o resultado imediatamente, além da possibilidade de fazer os ajustes que forem necessários.

O desenvolvimento de um programa Java, normalmente envolve o processo a seguir:

- Escrever o programa;
- Compilar e corrigir potenciais erros
- Rodar o programa
- Descobrir o que deu errado
- Editar
- Repetir o processo

JShell auxiliar no processo de experimentação do código de forma muito mais simples. Te permite testar argumentos, testar variações de métodos e experimentar API's que você ainda não sabe usar no dia a dia.

##JShell é melhor do que uma IDE?

Não, o Jshell não substitui o uso de uma **IDE**, ele apenas facilita e agilia o processo de aprendizado tanto sobre o Java como validação de hipóteses, conforme já mencionado anteriormente.

Conforme você vai escrevendo o seu código, você pode colar trecho do código no JShell e testar ou então copiar o código que está testando no JShell e colar na sua IDE.

##Usando o JShell

O JShell faz parte do **JDK9** e superiores, portanto, é necessário que tenha, ao menos, o JDK9 instalado em seu computador.

A partir disso, basta ir ao terminar e digitar `jshell`

![Inicializando o Jshell](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8txtcy75o27niya5w47g.png)

Exemplo prático:

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


Trechos traduzidos de: 

[Documentação Oracle](https://docs.oracle.com/javase/9/jshell/introduction-jshell.htm#JSHEL-GUID-630F27C8-1195-4989-9F6B-2C51D46F52C8)

[FreeCodeCamp: This is why your read-eval-print-loop is so amazing](https://www.freecodecamp.org/news/this-is-why-your-read-eval-print-loop-is-so-amazing-cf0362003983/)
Drops: Vue 2.x e o Typescript (e como solucionar os erros de retorno)
Tags: javascript, vue, typescript
Published: 2021-10-21 15:42:27

_Disclaimer: sim, o Vue 3 é uma realidade, mas ainda existem muitos projetos com o Vue 2 e que precisam de manutenção. O artigo é sobre a relação da versão anterior do Vue com o Typescript e como contornar alguns problemas de escopo da melhor forma o possível baseado nas minhas experiências_

---

Acho que alguns de vocês tem reparado em alguns erros de TS que podem vir a acontecer nas versões 2.x no Vue. Mas por que  acontece?

O Vue 2.x tem um escopo que dependendo da forma que utilizar o TS dentro do projeto o próprio Typescript (que é um superset de Javascipt) tem dificuldade de interpretar/fazer leitura dessas props dentro das funções. Esse cenário ocorre bastante quando usamos alguma prop como retorno dentro do `mounted()` ou `computed()`, por exemplo. 
Para solucionar problemas desse tipo temos duas soluções: ou fazer a tipagem desses retornos dentro da função ou declarar a função como uma prop do tipo Function. Não entendeu? Então vamos a um exemplo para facilitar o entendimento. 

Suponhamos que você tenha uma função que retorne uma mensagem ou qualquer outra informação após realizar uma ação (inserir um texto dentro campo input, por exemplo). Ao rodar o projeto você receberá um erro no terminal parecido com esse: 

`Property 'xxxxxxx' does not exist on type 'CombinedVueInstance<Vue, unknown, unknown, unknown, Readonly<{ type: string; xxxxx: string; xxxxx: string; xxxx: string; target: string; xxxx: boolean; xxxx: boolean; }>>'.`

Para solucionar esse problema você precisa fazer o que chamamos de anotação de retorno, ou seja, declarar esse tipo na função. Algo mais ou menos assim: 

```code 
greeting(): string {
  return this.greet() + '!'
} 
``` 

Mas caso você não queira fazer essa anotação no retorno direto na função você pode fazer dentro da prop mesmo. Assim: 

```code 
props: { 
  greeting: { 
   type: Function as PropType<() => void>
  } 
}
```

Lembrando que esses casos costumam acontecer quando fazemos a extensão do nosso componente Vue para Typescript (o famoso `Vue.extend()`). Uma alternativa mais viável também seria escrevê-lo em Class-Based Component (bem parecido com o do Angular, pra quem tá familiarizado com a sintaxe).

No Vue 3.x esse problema é solucionado porque o framework é escrito em Typescript e acaba tendo ele por "debaixo dos panos", digamos assim rs 

Se quiser saber mais sobre o que foi escrito nesse artigo deixo dois links da própria documentação do Vue sobre o assunto: 

- [TypeScript Support - Vue 2.x](https://vuejs.org/v2/guide/typescript.html)  
- [TypeScript Support - Vue 3.x](https://v3.vuejs.org/guide/typescript-support.html)
 

Até a próxima!