teleren/devto huggingface dataset:
Kotlin Playground para aprendizes de Kotlin
Tags: braziliandevs, kotlin
Published: 2022-02-24 01:01:58

## O quê é Kotlin Playground?

[Kotlin Playground](https://play.kotlinlang.org) é uma plataforma criada pela [Jetbrains](https://www.jetbrains.com/pt-br/) para permitir que pessoas que estejam aprendendo Kotlin possam testar conceitos e códigos sem precisar de ter a linguagem instalada na própria máquina.

Kotlin Playground pode ser utilizado completamente via web, sem precisar instalar nada no computador, o link da plataforma é [este](https://play.kotlinlang.org). Inicialmente, a plataforma estará com essa aparência:

![Interface do Kotlin Playground](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8svkj26fgjwak0gkphs9.png)

## Para quê Kotlin Playground pode ser utilizado?

Kotlin Playground pode ser usado por pessoas que estão começando a aprender Kotlin, oferecendo uma interface simples, e a possibilidade de programar e testar códigos Kotlin sem nem mesmo ter a linguagem instalada no computador ou um editor de texto ou *IDE*.

## Interface do Kotlin Playground

A interface do Kotlin Playground é bem simples, primeiramente, temos uma barra onde temos algumas opções, sendo:

### Versão do Kotlin

Nessa opção podemos mudar a versão do Kotlin que vamos utilizar no nosso código. Geralmente, **deixe essa opção na versão mais nova disponível.**

### Plataforma do Kotlin (JVM, JS, Junit, etc.)

Com essa opção, você pode escolher qual plataforma que o seu código será rodado. Caso você esteja começando a aprender Kotlin, **pule essa opção por enquanto.**

### Argumentos do programa (--algumacoisa)

Utilizando essa opção, você irá poder escolher alguns argumentos para passar ao seu programa. Isso é útil caso o seu código utilize argumentos, como `--numero` ou `--nome`.

### Copiar Link

Essa opção serve para copiar o link do seu código, e compartilhar esse link para outras pessoas, facilitando o processo de passar esse código que você criou para outra pessoa.

### Compartilhar Código

Essa opção é útil para compartilhar seu código em um [*iframe*](https://www.w3schools.com/tags/tag_iframe.asp), podendo assim colocar seu código em artigos e blogs.

### Run

E também temos a opção Run podemos rodar o nosso código, onde o resultado irá aparecer abaixo do editor.

## Editor

Na maior parte da tela, temos o editor do Kotlin Playground, que será o local onde iremos escrever o nosso código Kotlin. Mesmo sendo completamente via navegador, o editor tem alguns recursos para facilitar a programação, como um *autocomplete* para completar o nosso código enquanto estamos escrevendo.

## Finalização

Nesse pequeno artigo, te mostrei o quê é o Kotlin Playground, e como usá-lo para programar Kotlin completamente pelo navegador.

Muito obrigada por ler ❤️🏳️‍⚧️ e me segue nas redes, é tudo [@lissatransborda](https://twitter.com/lissatransborda) 👀
You should ask that question anyway
Tags: beginners, webdev, programming
Published: 2022-02-24 00:56:20

When I first started learning to code I was taking in so much new information that I was overwhelmed I didn't know what questions to ask. I spent a month struggling through explaining what I was trying to accomplish with my code and getting frustrated when I didn't sound like someone who should be writing code. So silly of me. 

One thing I've observed through the years in myself and in others is that we are often afraid to admit when we don't know something. We either don't ask the question and struggle in silence or when we do ask we go ahead and assume that the person we ask thinks we are dumb - "This is a dumb question, but..." 

Keeping your question to yourself out of fear of sounding "dumb" only slows down learning. The person who you ask is probably excited to share some knowledge with you or learn with you. You should ask it anyway. 

I'm definitely no expert, but finding solutions has become fun and interesting since I began asking more questions. This is what I have done to get better and for some I know it may seem obvious, but for me it wasn't and I'm glad I'm in the know now! 

Making my questions more specific by avoiding words like "this" or "it" when I'm referencing parts of a problem has also been a tremendous help. I would get so frustrated when I would tell someone, "I'm trying to get this array to turn into a this string -" when the other person is like "Huh?" I'm like "How do you not see what I see?!?"...

It's because they aren't working with that problem, Samantha! The person whom you seek the answer from needs context even if you don't know the technical terms for everything, struggling through and giving context can not only help you find the solution, but you can learn how to structure your question the next time you have one.

Another helpful tip is to break your problem down into sections, so you only have to ask about a specific piece of the problem. Practicing this has kept me focused and has given me a deeper understanding of the overall solution once I reach it. It's definitely not a quick way to a solution, but it's so important. 

These are just some small tips, but I can tell you I have seen such an improvement in my learning experience. 

I always want to know how to become better at finding solutions. If you have any tips that helped you, please share them with me! As a new dev, I love hearing different perspectives.
[Help] Flutter Dropdown
Tags: help, flutter, mobile
Published: 2022-02-24 00:47:22

Hi All. This is my first time posting here, so pardon if this looks very messy. Below is my issue.

> I want the the box dynamically fit the picked value, so it can grows bigger and smaller to fit its content.

Here is the box I mentioned:

![The container box](https://community.codenewbie.org/remoteimages/uploads/articles/n63u7m53shkh30gcc0p3.png)


The list of values:

![The value list](https://community.codenewbie.org/remoteimages/uploads/articles/f1crmlofu79827ybvcbe.png)


How it looks like when each value picked:

![short](https://community.codenewbie.org/remoteimages/uploads/articles/pozs1ngzskn726dzgtak.png)

![medium](https://community.codenewbie.org/remoteimages/uploads/articles/cvrzy0i0djvteekdif53.png)

![long](https://community.codenewbie.org/remoteimages/uploads/articles/89uyrruzsgplznkouxom.png)

---
[Here](https://github.com/sahnamm/dropdown-issue/blob/master/lib/main.dart#L59-L82) is my code for review.

Is it possible with my code structure right now?

Please give me direction on what should I do to make it work (change widget is ok) or pointing me out where I did wrong. 

Thanks a lot!
Day 536 : Get By
Tags: hiphop, code, coding, lifelongdev
Published: 2022-02-24 00:36:16

_liner notes_:
- Professional : Had another pretty productive day. Got to sit in on a talk prep for a coworker preparing a presentation. Got some good ideas of things I can do in my talks and workshops. Pushed some code for a new feature for a demo app I've been working on. Then I started on a new feature. Hoping to get that implemented by the end of the week. Did some more research for my European trip. Need to start reaching out to some folks.

- Personal : Last night, I pretty much set up everything in order to add a text chat and question submissions to the side project. I had to figure where I wanted to put the data in the database and what to actually store and see if I had access to that information. Did a lot of thinking on it. Then I added the UI elements to the site and figure out how to make things fit. Now it's just about sending data to the database and displaying it. Then I'll need to do the same thing on the admin side. Good news is that it will basically be the same code. Trying to get by with as few code changes so I can get the project done quicker. I also learned something new that may help me with laying stuff out better in the future.

![A misty valley in Zhangjiajie, China with giant tall land masses sticking out of the ground sparsely covered with trees.](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ivvq48emz752c7y319pn.jpg)

I noticed that the images from the blog post were stretched out. It was bothering me so much that I pulled up the project, made the change in CSS and deployed a new version. It took like 5 minutes, but I feel much better now. I've never seen the site on that size of a screen before and definitely had to fix it. Luckily, I had the files on my computer. My plan is to get the text chat and questions submission fully working. Then maybe get the request to speak started. It should follow along the same logic. We'll see.

Have a great night!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube k_KmP55wqPw %}
SSR-Friendly Unique HTML IDs in Vue 3
Tags: vue, ssr, javascript, webdev
Published: 2022-02-24 00:34:05

How many other developers out there have encountered the following scenario:

You have a Vue component that needs to use an HTML `id` attribute to link elements together:

```vue
<template>
  <div>
    <label for="inputId">Label</label>
    <input id="inputId" type="text">
  </div>
</template>
```

But, as it turns out, you need to have multiple instances of that component on the page. To avoid breaking the page with `id` collisions, you need a unique id for the `input` element.

Unfortunately, Vue does not provide an instance id for components that you can key off of to do this.

What you'll often see other developers do is something along these lines (this is off the top of my head so forgive any silly errors):

```vue
<template>
  <div>
    <label :for="inputId">Label</label>
    <input :id="inputId" type="text">
  </div>
</template>

<script>
let id = 0
export default {
  data() {
    return {
      inputId: null
    }
  },
  created() {
    id++
    this.inputId = id
  }
}
</script>
```

This will work for the most part until server-side rendering enters the picture. Due to separate thread processing, no matter what you do, `id` will be out of sync on the server and on the client.

That is a real bummer, but there is a workaround.

I've written [vue-uid](https://github.com/shimyshack/uid) for this very issue.

It is a tiny directive that generates a unique identifier that is automatically assigned to an element’s `id` attribute.

Here is a usage example:

```vue
<script setup lang="ts">
import { ref } from 'vue'
const input = ref<null | HTMLElement>(null)
</script>

<template>
  <div>
    <label :for="input?.id">Input label</label>
    <input v-uid ref="input" type="text">
  </div>
</template>
```

The best part of this is that you don't need to write extra code or pull in additional dependencies to figure out how to generate a unique id in the first place, and second, it is SSR-friendly! Slap the `v-uid` directive on an element and you are off to the races with a unique id you can count on.

If you'd like more understanding into how [vue-uid](https://github.com/shimyshack/uid) works, be sure to read the [Custom Directives](https://vuejs.org/guide/scaling-up/ssr.html#custom-directives) documentation.

I hope you found this useful.

Thanks.
Welcome Thread - v165
Tags: welcome
Published: 2022-02-24 00:23:00

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

![Cartoon cats saying "one of us"](https://media.giphy.com/media/ejpCynLi88pGEUbmvQ/giphy.gif)

### Welcome to DEV!

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

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

**Great to have you in the community!**
Oracle Fusion SCM Online Training
Tags: beginners, tutorial, cloud
Published: 2022-02-24 00:22:46

"Trio Tech Software Trainings is providing **[Oracle Fusion SCM Online Training](https://triotechsoftwaretrainings.com/oracle-fusion-scm-online-training/)** and Oracle Fusion Financials Classroom Training in the latest advanced releases of fusion suites with certified Trainers. Our training and recruitment programs offer best-fit solutions for trainees with a strong focus on quality, skills awareness, and self-achievement. We do have flexible Course Timings are as per the Trainees request."
Go-ing Go-ing Gone! CRUD with Go
Tags: go, beginners, opensource, programming
Published: 2022-02-24 00:09:22

**Alright, let's Go. Last tortured pun, I promise.. kind of.**

Although I would classify myself as a polyglot developer, the vast majority of my backend development has been in Java 8/11. After being recommended Go by several colleagues, I gave it a go (sorry) and was pleasantly surprised by the simplicity.

Coming from the land of annotations, JVMs, JDKs & CDI, it was a breath of fresh air to strip back to the basics. There's no magic in Go like there is with Java. No secret filters, no ambiguous qualifiers and no Spring minefields. Go is far more verbose and makes you jump through all the hoops. More effort typing but far less effort understanding. 

Don't get me wrong, I think modern Java services are still fantastic but it's becoming increasingly difficult in an enterprise environment to utilise the newer features.


![Over here](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qyjundp92akxavfeyb55.jpeg)
<figcaption>When you type in go run main.go</figcaption>


After dabbling in Go for a while, I decided to write a simple CRUD project and post it to Github.

https://github.com/alizaidi93/task-list-service

The main goals of the project were to demonstrate the following : 

- Hexagonal Architecture
- Running a ReSTful web service
- Utilising a global logger
- Writing unit tests
- Connecting into a Postgres DB running through Docker

Has anyone else learnt Go from a Java background?
Unknown Vim Trick
Tags: vim, nvim
Published: 2022-03-14 11:28:43

---
title: Unknown Vim Trick
published: true
date: 2022-02-24 00:00:00 UTC
tags: vim, nvim
canonical_url: https://tech.serhatteker.com/post/2022-02/unknown-vim-trick/
---

One of beautiful thing about `vim` is that you can learn something even after using 5+ years. Even though usual vim learning curve characterized like below:

![Vim Learning Curve](https://tech.serhatteker.com/img/content/2022/vim-learning-curve.jpeg)


This is the command I've been looking for a long time. I accidentally saw it on one of the [ThePrimeagen] [video].


## Entrée


Let's assume that I'm on the *line 5* and want to update `"_cache_update_cache"` on the *line 30*, to `"_cache_update_current"`.

```python

...


...



class UpdateCacheMiddleware(MiddlewareMixin):
    """
    Response-phase cache middleware that updates the cache if the response is
    cacheable.
    Must be used as part of the two-part update/fetch cache middleware.
    UpdateCacheMiddleware must be the first piece of middleware in MIDDLEWARE
    so that it'll get called last during the response phase.
    """

    def __init__(self, get_response):
        super().__init__(get_response)
        self.cache_timeout = settings.CACHE_MIDDLEWARE_SECONDS
        self.page_timeout = None
        self.key_prefix = settings.CACHE_MIDDLEWARE_KEY_PREFIX
        self.cache_alias = settings.CACHE_MIDDLEWARE_ALIAS

    @property
    def cache(self):
        return caches[self.cache_alias]

    def _should_update_cache(self, request, response):
        return hasattr(request, "_cache_update_cache") and request._cache_update_cache

...
```

What I was doing: press `25jf"ci"` on `Normal` *mode*, which means:
- `25j` : down 25 line
- `f"`  : find the first occurrence of `"`
- `ci"` : change inside of `"`

and then write `_cache_update_current`.

The annoying part is you have to press additional `f"` every time. For a normal user it probably means nothing, but for a `vim` user it means a lot, since *"Real Vim ninjas count every keystroke"*[^1]

Therefore I was using a `macro` and `key binding` for this. Until now.


## Trick


The trick is just press `ci"`; you don't have to press additional `f"` (for an unknown reason it works which shouldn't). So our above command is just `25jci"` now.


And it works with usual text objects like `{, [, *, '` etc.


All done!




[^1]: https://www.vimgolf.com

[ThePrimeagen]: https://www.youtube.com/channel/UC8ENHE5xdFSwx71u3fDH5Xw
[video]: https://www.youtube.com/watch?v=E7NBhSsZouc
RESUMO DA USABILIDADE
Published: 2022-02-23 22:43:58

NOME: Matheus Henryck, Erick V. Gusson, Ingrid Rapace Coltri, Geovana J. Santos

Contexto do usuário

O modelo mais usável pode mudar no contexto de onde a pessoa veio e como ela cresceu, assim como podemos achar algo estranho deles, eles podem achar estranho o nosso, por mais que o mesmo tenham a mesma função e entreguem o mesmo resultado, porém, o método é diferente e tem ligação com suas cultura.

Processo:

O processo da criação normalmente segue a ordem de pesquisa, conceito, protótipo, validação, desenvolvimento, mercado e então se repete, mais nem sempre consegue chegar até o mercado, muitas vezes nem sequer da pesquisa.

Heurísticas de Usabilidade

Visibilidade do status do sistema

Manter o usuário informado sobre o que está acontecendo
Retorno apropriado
Dentro de um período razoável
Correlação com o mundo real

Linguagem do usuário: palavras frases e conceitos familiares
Convenções do mundo real
Ordem lógica e natural
Controle do usuário e liberdade

“Saída de emergência”
Menor esforço
Suporte “undo” (desfazer) e “redo” (refazer)
Consistência e padrões

Termos, situações ou ações consistentes
Convenções da plataforma
Prevenção ao erro

Elimine propensão ao erro
Apresente uma confirmação para prevenir erros críticos
Reconhecimento ao invés da memória

Ajuda contextual
Informações para orientar as ações
“Diálogo com o usuário
Flexibilidade e eficiência de uso

Fácil para usuários leigos
Flexível para se tornar ágil para usuários avançados
Estética e design minimalista

“diálogos” relevantes
Informação excessiva diminui sua visibilidade relativa
Facilite reconhecimento, diagnóstico e recuperação de erros

Linguagem corrente
Indicação clara do problema
Sugestão da solução
Ajuda e documentação

Visível
Facilmente acessada
Ferramenta de busca
Avaliação de UX

Métodos

Inspecionais: análise de um especialista
Interpretativos: análise qualitativa de IHC
Estatísticos: análise quantitativa de IHC
Paradigmas de avaliação

Gerrilha
Testes de usabilidade
Pesquisa de campo
Avaliação preditiva
Framework decide
Determine os objetivos
Explore as questões
Escolha um método e abordagem de avaliação
Identifique questões práticas
Decida como lidar com questões éticas/legais
Avalie, análise, intérprete e apresente dados
Oracle Fusion HCM Online Training
Tags: beginners, webdev, programming
Published: 2022-02-23 23:31:06

"Triotech sofware trainings provides you the best **[Oracle fusion HCM online training](https://triotechsoftwaretrainings.com/oracle-fusion-hcm-online-training/)** by industry experts, we give corporate level training on Oracle Fusion HCM modules, real time projects, live class videos, affordable prices."
Solving FlashBoy "Error opening COM port"
Tags: gameboy, retro, backup
Published: 2022-02-23 23:01:44

This is a short post to help Flash Boy <sup>[1](https://www.aliexpress.com/item/4001330749681.html) [2](https://www.ebay.com/itm/264065747210)</sup> users find the right software and drivers. Flash Boy is a GameBoy cartridge dumper. The manufacturer does not have any product page therefore it can be time consuming to find the software needed or documentation.

---------------

If you are reading this, you are probably unable to use the device. Here are the error messages you could get:
 - "Device not found!"
 - "Check COM port connection."
 - "Error opening COM port."

After a few trials and errors, I found that FlashBoy dumpers seem to have multiple versions with different firmware and required different softwares.

## Software options

Here is the list of flasher program available.

### 1) GBX Driver 2.0

This UI tool is developed by Tengu Development. Tengu is also the manufacturer shown when the device is mounting the "fake" drive (GBX).

As of 2021, this is the software to interact with the latest hardware.

[Download GBX Driver 2.0 for Flash Boy](https://drive.google.com/file/d/13ferDd2TQ_dg1VdFCFZpd59U9IYZM_dU/view?usp=sharing
)

![GBX Driver 2.0](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fgkluxsw3d31vn9zy0ev.png)

### 2) GB Cart Flasher version 1.1

Software release by Kraku and Chroost. It seems to support older version of the FlashBoy.

This is the first software I tested because it appears in this [Youtube Flash Boy review](https://www.youtube.com/watch?v=aaEEqqJB3Ws).

[Download GB Cart Flasher version 1.1](https://sourceforge.net/projects/gbcf/)

![GB Cart Flasher version 1.1](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hlmxng0e368a7gexeqtz.png)

### 3) FlashBoy Cyclone

This software is dedictated to the Cyclone version of the FlashBoy. I don't have this specific device to validate that its validity.

[Download FlashBoy Cyclone](https://app.box.com/s/nvme61lnm6chn3ludccto5fyy6rdvckt?spm=a2g0o.detail.1000023.1.273a12efhMNomd)

![FlashBoy Cyclone](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rnblya9cgecjc89ao747.png)
 
### 4) FlashGBX

Last but not least, FlashGBX is the recommended software for the [GBxCart RW from insidegadgets](https://shop.insidegadgets.com/product/gbxcart-rw/). While GBxRW is not manufactured by Backlight ENG.LAB (the company behind Flash Boy), it is my recommendation if you haven't bought a dumper/flasher yet. It can read the ROM and RAM just like the previous, but it also to write the ROM and RAM of numerous cartridges types including cheap reproduction cartridge (~4 USD) found on Aliexpress or eBay.

[Download FlashGBX](https://github.com/lesserkuma/FlashGBX/releases)

![FlashGBX for the GBxRW](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8scr8s9s00l4v3h0zoau.png)
Reminder: Join the Microsoft Azure Trial Hackathon to Win Prizes (and Community Bragging Rights)
Tags: azuretrialhack, azure, microsoft
Published: 2022-02-23 23:00:07

---
title: Reminder: Join the Microsoft Azure Trial Hackathon to Win Prizes (and Community Bragging Rights)
published: true
description: Join us for this challenge to build applications using Microsoft Azure's suite of tools in exchange for the chance to win some stellar prizes
tags: azuretrialhack, azure, microsoft
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/22r9ndg7o2doutl3pkni.png
---

<mark>Quick reminder that the [Microsoft Azure Trial Hackathon on DEV]()https://dev.to/devteam/hack-the-microsoft-azure-trial-on-dev-2ne5 is accepting submissions through March 8th, 2022 @ 11:59 PM UTC!<mark>

For this hackathon, we invite you to apply [Microsoft Azure's free trial credit](https://azure.microsoft.com/en-us/free/?ocid=AID3037981&utm_source=devtrialhack) (worth $200 USD) towards the creation of a new application which you'll present in a post right here on DEV as your official submission.** 

### Prizes

In exchange for creating a valid project, you'll earn a free DEV sticker pack and a limited-edition profile badge. 

**We'll also be selecting 5 Grand Prize winners to win...** 

- $1,500 USD gift card or equivalent
- $300 USD credit to the DEV Shop
- Microsoft sticker pack
- DEV & Microsoft sticker packs
- DEV “Azure Trial Hackathon” Grand Prize winner profile badge

**and 10 Runners-Up to win...**
- $250 USD gift card or equivalent
- $150 USD credit to the DEV Shop
- Microsoft sticker pack
- DEV & Microsoft sticker packs
- DEV “Azure Trial Hackathon” Runner-Up profile badge

---
 
For full details on this fun and spirited community competition, please visit [this post](https://dev.to/devteam/hack-the-microsoft-azure-trial-on-dev-2ne5) where you'll find the submission categories, requirements, resources, and lots more. 

We're excited to see what you build for the Microsoft Azure Trial Hackathon on DEV! 🎉