teleren/devto huggingface dataset:
Explorando --dart-define em Flutter: Como Personalizar Seu App de Forma Descomplicada
Tags: flutter, dart, mobile
Published: 2024-04-09 01:19:51

Então, você está mexendo com Flutter, certo? Você já deve ter percebido como é importante manter as coisas flexíveis, especialmente quando se trata de diferentes ambientes, como desenvolvimento, teste e produção. É aí que entram as variáveis de ambiente, aquelas que nos ajudam a configurar o app de acordo com o ambiente em que está sendo executado. E a boa notícia é que no mundo do Flutter, temos uma maneira maneiríssima de lidar com isso usando o _--dart-define_.

**O Que é _--dart-define_?**

O _--dart-define_ é basicamente um truque bacana que você pode usar na linha de comando para definir variáveis de ambiente enquanto está compilando seu app Flutter. Isso é ótimo porque permite que você passe informações dinâmicas para o app no momento da compilação. Por exemplo, você pode definir uma variável de ambiente para apontar para URLs diferentes de APIs com base no ambiente em que está trabalhando.

**Como Usar?**

É bem simples! A sintaxe básica é _--dart-define=VARIAVEL=VALOR_. Então, se quiser definir várias variáveis, é só separar com espaços. Vou te mostrar alguns exemplos práticos.

**Exemplos Práticos**

**Configurando URLs de API:** Digamos que você queira definir a URL da sua API.
`flutter run --dart-define=API_URL=https://api.exemplo.com
`
E no código Flutter, você pode acessar isso assim:
`const String apiUrl = String.fromEnvironment('API_URL', defaultValue: 'https://api-padrão.exemplo.com');
`
**Ativando o Modo de Depuração**: Às vezes, é útil ativar o modo de depuração.
`flutter run --dart-define=DEBUG_MODE=true
`
**E no código:**
`const bool debugMode = bool.fromEnvironment('DEBUG_MODE', defaultValue: false);
`
**Configurando Chaves de API:** Para aquelas chaves secretas.
`flutter build apk --dart-define=API_KEY=SUA_CHAVE_API
`
**No código:**
`const String apiKey = String.fromEnvironment('API_KEY');
`
**Personalizando Temas:** Que tal ajustar o tema do seu app?
`flutter run --dart-define=THEME=dark
`
**No código:**
`const String theme = String.fromEnvironment('THEME', defaultValue: 'light');
`
**Conclusão**

O uso de **_--dart-define_** no Flutter é uma mão na roda para gerenciar variáveis de ambiente. Isso facilita a personalização do seu app para diferentes ambientes e cenários. Mas lembre-se, essas variáveis são definidas durante a compilação, então não dá pra mudar elas durante a execução do app. Planeje com cuidado como e quando definir essas variáveis para garantir que seu app seja flexível e eficiente em todas as situações.
Programação Orientada a Objetos em JS - O que é uma Classe
Tags: javascript, beginners, programming, braziliandevs
Published: 2024-04-09 01:10:17

Se você é uma pessoa desenvolvedora ou está em transição de carreira para a área da tecnologia, com certeza já deve ter ouvido falar sobre o conceito de orientação a objetos.

Utilizamos desse paradigma da programação para melhorar nossa estrutura de código, tornando-a sem repetições desnecessárias, de fácil manutenção e fazendo com que as características de um objeto tenham heranças de acordo com a classe que ele está inligado.

Sendo assim, ao definir a nossa classe, ela vai englobar um tipo de objeto. Por exemplo, cadastro de clientes de um banco.

Para definir um cliente, eu poderia partir do código a seguir: 
```
const nomeCliente1 = "Débora";
const cpfCliente1 = "11122233344";
const saldoBancarioCliente1 = 0;
```
E ir acrescentando suas informações conforme necessidade de cadastro...
No entanto, se eu quisesse definir um cliente número 2, se eu fosse seguir o exemplo acima, teria um trabalhão para definir cada variável, além do meu código ficar extenso e repetitivo, não sendo uma boa prática.

Então, como eu poderia fazer a inserção desses clientes de uma forma mais prática? Através de uma classe.
Vou chamar a minha classe de Cliente, fazendo referência ao problema abordado.
```
class Cliente {

}
```

Agora, as variáveis que eu passei inicialmente para definir cpf, nome e valor bancário do meu cliente, serão atributos da minha classe, ou seja, são informações que todo cliente nesse exemplo deve ter:
```
class Cliente {
    nome;
    cpf;
    saldo;
}
```
Agora que já temos a nossa classe, como fazemos para criar um novo cliente? 
O JS possui a instrução **new** para inicializar um objeto. Portanto, para definir um cliente, vou criar uma variável para ele e atribuir a minha instrução:
```
const cliente1 = new Cliente();
```

Mas e meus atributos? Como faço para que meu cliente1 inicializado na variável anterior possa ter valores como cpf, saldo bancário e um nome? Eu vou acessar cada um daqueles atributos através do nome que passei à variável que inicializa meu cliente + **.** + atributo passado na classe.
```
cliente1.nome = "Débora";
cliente1.cpf = "11122233309";
cliente1.saldo = 0;

console.log(cliente1);
```
Veja que através do **.** eu acesso cada um dos meus atributos e atribuo valores a eles. 

Dessa forma, fica muito mais simples a inserção de dados de clientes, pois cada novo cliente irá herdar os dados já pré-estabelecidos na minha classe. Não haverá a necessidade de ficar copiando código existente, deixamos o ambiente organizado e fluído. 

Esta foi uma breve introdução a classes. Orientação a objetos é de suma importância para que você consiga escrever melhores códigos e se organizar melhor em sua lógica quando estiver desenvolvendo algum programa. Espero ter ajudado a entender um pouco sobre o assunto.
Senior Web3 developer for an extensive blockchain project
Tags: webdev, web3, react, nginx
Published: 2024-04-09 01:06:14

Currently, I am actively seeking exceptionally skilled blockchain developers for a substantial project focused on enhancing our Dex platform. 
This undertaking is projected to extend over the couexpderse of one year. 
In light of the scale of this initiative, we anticipate the need to engage numerous developers. 
The position in question entails full-time employment. 
Should you express interest in collaborating with us, we will readily share you with comprehensive project details.
VICTIM OF TRADING SCAMS OR LOST MONEY TO A CRYPTO SCAM? CONTACT >> FOLKWIN EXPERT RECOVERY.
Published: 2024-04-09 00:53:19


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/54ltwvcdee0p38hazm5d.jpg)

I was devastated when I realized that the 42 ETH I had purchased years ago, now worth around $42,000, had somehow disappeared from my cryptocurrency wallet. I frantically searched through my transaction records but could find no trace of where the valuable ETH had gone. As the reality sunk in that a small fortune had potentially vanished into the abyss of the blockchain, I felt crushed thinking about all that hard-earned money evaporating in an instant. In desperation, I started scouring cryptocurrency forums for help, looking for anyone who might be able to work some kind of magic in recovering lost funds. After days of dead ends, I finally came across whispers of an underground service called Folkwin Expert Recovery that claimed to be able to retrieve inaccessible cryptocurrency under certain conditions. With nothing to lose, I decided to give them a try. The Folkwin Expert Recovery specialists got to work analyzing the intricate details of my transaction records and blockchain activity. Using advanced forensic techniques, they miraculously managed to identify where the missing ETH had ended up and formulated a process to reclaim the lost coins. After several painstaking attempts, the Folkwins finally succeeded in restoring my 42 ETH, now worth $42,000. I was euphoric when I saw the six-figure sum reappear in my wallet, snatched from the jaws of catastrophic loss. I couldn't believe the Folkwin had actually pulled off this amazing feat. I learned that cryptocurrency mistakes aren't always irreversible - with the right experts, lost funds can sometimes be rescued from the abyss by modern magic. Thanks to Folkwin Expert Recovery. Contact them Via: ****  Website: www.folkwinexpertrecovery.com  OR Email: ****   Folkwinexpertrecovery { AT } tech-center { . } com
 for further assistance.
Thanks,
Robert D Kimberly.
My Windows essentials
Tags: windows
Published: 2024-04-09 00:42:26

I had to recently set up a fresh personal Windows box to do some work (I know...), here are the applications that are essential to me:

- [7-Zip](https://www.7-zip.orgd)
- [AutoHotKey](https://www.autohotkey.com)
- [Dropbox](https://www.dropbox.com)
- [Everything](https://www.voidtools.com)
- [Firefox](https://www.mozilla.org/firefox)
- [Flameshot](https://flameshot.org)
- [KeePassXC](https://keepassxc.org)
- [Gimp](https://www.gimp.org)
- [Git](https://git-scm.com)
- [Notepad++](https://notepad-plus-plus.org)
- [posh-git](https://github.com/dahlbyk/posh-git)
- [Speccy](https://www.ccleaner.com/speccy)
- [VLC](https://www.videolan.org)
- [Visual Studio](https://visualstudio.microsoft.com)
- [WinMerge](https://winmerge.org)
- [Vim](https://www.vim.org)

# Custom shortcuts

First, disable all Windows key built-in shortcuts with the following `.reg` file:

```
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]
"NoWinKeys"=dword:00000001
```

Then, create the following `.ahk` file (AutoHotKey) in the Windows startup folder (Win+R `shell:startup`):

```
#requires autohotkey v2.0
#b::run "firefox"
#c::run "calc"
#d::run "explorer shell:::{3080f90d-d7ad-11d9-bd98-0000947b0257}"
#e::run "explorer"
#k::run "C:\Program Files\KeePassXC\KeePassXC.exe"
#m::run "mspaint"
#n::run "notepad++"
#r::run "explorer shell:::{2559a1f3-21d7-11d4-bdaf-00c04f60b9f0}"
#v::run "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\devenv.exe"
#t::run "powershell"
#s::run "C:\Program Files (x86)\Steam\Steam.exe"
```

# Replacing Caps Lock for Ctrl

Execute the following `.reg` file:

```
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,1d,00,3a,00,00,00,00,00
```

# Performance Options

Most visual effects are dismissible in my opinion, I normally leave only:

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

Disabling pagination because I like living on the edge:

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

Run (Win+R) `SystemPropertiesPerformance` to get this.

# Firefox Extensions

- [Adjust Screen Brightness](https://addons.mozilla.org/firefox/addon/adjust-screen-brightness)
- [Auto Tab Discard](https://addons.mozilla.org/firefox/addon/auto-tab-discard)
- [Grammarly](https://addons.mozilla.org/firefox/addon/grammarly-1)
- [Panorama View](https://addons.mozilla.org/firefox/addon/panorama-view)
- [Vimium](https://addons.mozilla.org/firefox/addon/vimium-ff)

# Notepad++ Extensions

- [JSON Viewer](https://github.com/kapilratnani/JSON-Viewer)
- [MarkdownViewer++](https://github.com/nea/MarkdownViewerPlusPlus)

# Visual Studio Plugins

- [Editor Guidelines](https://marketplace.visualstudio.com/items?itemName=PaulHarrington.EditorGuidelinesPreview)
- [VsVim](https://marketplace.visualstudio.com/items?itemName=JaredParMSFT.VsVim2022Preview)
SharedPreferences en Flutter
Tags: flutter, sharedpreferences, android, ios
Published: 2024-04-09 00:33:57

**Introducción**
SharedPreferences es un plugin en Flutter que proporciona una forma persistente y asíncrona de almacenar datos simples como bool, double, int y String en Android e iOS.

**¿Para qué se Usan?**

- **Configuraciones de la aplicación:** Útil para guardar configuraciones que necesitas persistir entre sesiones o cuando abres o cierras la aplicación, como el tema o el idioma.

- **Guía de usuario:** Si tienes algún tutorial o guía de usuario, puedes usar Sharedpreferences para guardar cuando el usuario ya ha completado la guía.

Recuerda que SharedPreferences no está diseñado para almacenar grandes cantidades de información, por lo cual no es recomendable usarlo como si fuera una base de datos.

Instalación
Para usar [SharedPreferences](https://pub.dev/packages/shared_preferences), primero debes importarlo a tu proyecto:


![instalacion de sharedpreferences](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/apd989l7yppi3ze547u3.png)


**Guardar datos**

Para guardar datos, puedes usar los métodos setBool, setDouble, setInt, setString:

```
SharedPreferences prefs = await SharedPreferences.getInstance();
prefs.setInt('counter', 1);
```

**Leer datos**

Para leer datos, puedes usar los métodos getBool, getDouble, getInt, getString:

```
SharedPreferences prefs = await SharedPreferences.getInstance();
int counter = prefs.getInt('counter') ?? 0;

```

**Eliminar datos**

Para eliminar datos, puedes usar el método remove:

```
SharedPreferences prefs = await SharedPreferences.getInstance();
prefs.remove('counter');

```

**Conclusión**

SharedPreferences es un plugin muy útil y eficaz para guardar datos simples y configuraciones sencillas para tu aplicación, espero que este post te haya sido de ayuda para entender su funcionamiento.
Langkah-Langkah Cara Instal PHP 8.3 di Linux
Tags: webdev, php
Published: 2024-04-09 00:00:00

**Hai, Sobat Risereaders!**

Di postingan kali ini kita akan mencoba menginstal PHP di Linux untuk kebutuhan pengembangan web. Sebelum memulai, mari kita sedikit mengulas tentang PHP.

## Apa Itu PHP?

[PHP](https://blog.riseku.com/mengenal-php/) (_Hypertext Preprocessor_) adalah bahasa pemrograman yang dirancang untuk pengembangan aplikasi web. Diciptakan oleh Rasmus Lerdorf pada tahun 1994, PHP pada awalnya digunakan untuk memonitoring kunjungan pada situs web pribadinya.

Setelah itu, dirilis sebagai _open-source_ pada awal 1995, PHP terus berkembang dan diterima luas dalam komunitas _developer_, menjadi solusi handal untuk pembuatan halaman web dinamis.

## Cara Instal PHP 8.3

Perlu diperhatikan bahwa pada tutorial kali ini, kita akan menginstal PHP 8.3 di Ubuntu atau turunannya.

### 1. Perbarui Sistem

Untuk memastikan _packages_ yang ada di sistem kita adalah versi terbaru, kita perlu memperbaruinya:

```
sudo apt update
```

### 2. Menambahkan Repositori PHP
Secara default, Ubuntu sudah menyediakan repositori PHP, jadi kamu bisa langsung menginstal PHP.

Jika sebelumnya kamu sudah pernah menambahkan [PPA Ondrej Sury](https://deb.sury.org), kamu bisa melewati tahap ini.

Pertama, menginstal beberapa _packages_ yang diperlukan:

```
sudo apt install ca-certificates apt-transport-https software-properties-common lsb-release -y
```

Kemudian, menambahkan PPA Ondrej Sury:

```
sudo add-apt-repository ppa:ondrej/php
```

Setelah itu, kita perlu untuk memperbarui sistem kita lagi:

```
sudo apt update
```

### 3. Menginstal PHP 8.3
Setelah selesai menambahkan repositori PHP, saatnya untuk menginstal PHP:

```
sudo apt install php8.3
```

Nah, sekarang kamu bisa mengecek versi PHP yang sudah berhasil di instal:

```
php -v
```

### 4. Menginstal Ekstensi PHP

Setelah berhasil menginstal PHP, kita perlu menginstal beberapa ekstensi tambahan yang umum digunakan:

```
sudo apt install php8.3-{cli,fpm,curl,mysql,gd,opcache,zip,intl,common,bcmath,imagick,xmlrpc,readline,memcached,redis,mbstring,apcu,xml,memcache}
```

Jika ada ekstensi yang terlewat, kamu dapat menambahkannya sendiri. Untuk mencari, kamu bisa mencarinya melalui perintah `apt search`:

```
sudo apt search php8.3-
```

Maka akan muncul daftar ekstensi yang tersedia.

![Mencari daftar ekstensi PHP yang tersedia](https://blog.riseku.com/content/images/size/w1000/2024/01/daftar-module-php-8.3.webp)

Dan untuk menginstal ekstensi tambahan, cukup menggunakan perintah:

```
sudo apt install php8.3-nama_ekstensi

# misalnya
sudo apt install php8.3-cgi
```

### 5. Melihat Ekstensi PHP Terinstal

Kamu dapat melihat daftar ekstensi yang terinstal di Ubuntu dengan:

```
php -m
```

Seperti ini tampilannya:

![Melihat daftar ekstensi PHP yang terinstal](https://blog.riseku.com/content/images/size/w1000/2024/01/cek-ekstensi-php-terinstal.webp)

##Penutup

Setelah selesai mengikuti langkah-langkah menginstal PHP, akhirnya kita berhasil menginstal PHP 8.3 di Ubuntu. Sekarang kamu bisa memulai mengembangkan aplikasi web. Semoga proses instalasi ini membantu kamu.
Lead Screw Drawings Optimum F40E Mill
Published: 2024-04-08 22:36:52

I am lucky enough to own an Optimum F40E mill which is a pretty OK piece of hardware for manual milling.

I've been working on a CNC conversion (actually CMC, but close enough) and wanted to change out the poorly made lead screws for hardened ball screws.

One other project online has a walkthrough how to order the 25mm balls crews, however that required modifying the mill casting, and some heavy manufacture of adapters. Also, the person from that post had what appeared to be the standard sized table, I have the long table.

Here are Fusion360 drawings of the X and Y lead screws. I didn't bother to measure which acme profile they were, also I didn't bother to check if they are left or right threads on the retainers on the both ends of Y and the front end of X.

Nominally bearing surfaces are 15mm which should make it possible to buy decent angular contact bearings which will take both the rotational and thrust loads.

Optimum calls this a Bohr-Fräsmaschine (German for "Drill-Millmachine"). If you don't want to deal with Optimum, the handbook PDF is hosted here on imgur as PNGs because it was the easiest way to put this online https://imgur.com/a/ACnzYzE

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2x22dlmw6a2ex8d16oaj.png)
(also here in higher resolution https://imgur.com/a/CzrLucX)

Nominally SFU2005 should work fine here. If I order ballscrews, I will update this post with the drawings I use to order with in case you want to undertake your own mill conversion.
A place for programmers to share ideas and help each other grow.
Published: 2024-04-08 22:32:03

Being around with vibrant and dynamic dev community is a gift to aspiring developers and software engineers. On the other hand, sharing experiences, insights and learnings with others can greatly contribute to your knowledge as well. With this in mind, I am starting this journey. I first fell in love with programming way back in my college days. Since then, I've been on an exciting journey of continuous learning and growth, exploring various programming languages, frameworks and technologies along the way. In this space, I plan to write about programming in general, data science, data engineering, data visualizations, machine learning and more. Whether it's diving into the intricacies of data, sharing tips for common specific framework struggles and challenges, or discussing the latest trends in AI, I hope to provide valuable content that both educates and inspires.
Tech docs, I hate reading/writing them.
Tags: discuss, contentwriting, support, community
Published: 2024-04-08 22:17:25

I love coding, but I hate writing technical docs.

BTW, I also hate reading most of them ... 

but there is no alternative.

I invest 80% of my time reading tech docs, but often find it a wastage of time.

I'm really curious to hear, how you guys feel about it?

What are you guys doing to fix it?
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x38ssp5en66tbfnakv3e.png)

-Deepak
ASTRAD DMP: Data Management for Precision Marketing
Tags: marketing, ad, dmp
Published: 2024-04-08 22:09:48

In the realm of digital marketing, the ability to precisely target and engage with the right audience is paramount. [ASTRAD’s Data Management Platform (DMP)](https://astrad.io/astrad-dmp/) emerges as a cutting-edge solution designed to enhance marketing strategies through efficient data management and integration capabilities. This platform is tailored for marketers seeking to leverage data to its fullest potential, ensuring that their advertising efforts are both effective and efficient.

## Key Features and Integrations

ASTRAD DMP distinguishes itself by offering seamless integration with a variety of third-party data solutions, including Adsquare, DataXpand, and Kochava. This flexibility allows marketers to enrich their campaigns with a wide range of external data sources, providing a more comprehensive understanding of their target audience. Moreover, ASTRAD DMP is not limited to these integrations. Marketers have the freedom to incorporate their preferred third-party data solutions, making the platform highly adaptable to specific marketing needs and strategies.

The platform’s core strength lies in its ability to facilitate the use of existing third-party data integrations, thereby enhancing the precision of marketing campaigns. By leveraging external data, marketers can fine-tune their targeting criteria, ensuring that their messages reach the most relevant audiences. This capability not only improves the effectiveness of marketing efforts but also optimizes the allocation of advertising budgets.

## Precision Marketing with ASTRAD DMP

ASTRAD DMP is designed for marketers who demand the highest level of precision in their campaigns. The platform’s robust data management and integration features enable users to harness the power of data to create highly targeted marketing strategies. Whether through integrating with established data providers like Adsquare, DataXpand, and Kochava or by incorporating bespoke third-party data solutions, ASTRAD DMP offers unparalleled flexibility and efficiency.

In conclusion, ASTRAD’s Data Management Platform stands out as a vital tool for marketers aiming to achieve precision in their advertising efforts. Its comprehensive integration capabilities and flexibility in data management make it an indispensable asset for enhancing the effectiveness of digital marketing campaigns. As the digital landscape continues to evolve, platforms like ASTRAD DMP will play a crucial role in enabling marketers to navigate the complexities of data-driven advertising with ease and precision.
Podcast Palooza— What are you listening to? (Eclipse Edition)
Tags: codenewbie, podcast, career, ai
Published: 2024-04-08 22:05:24

Hey and welcome back to Podcast Palooza, my weekly meeting time for all talk about podcasts. If today you are not in the mood to share a podcast, slide on over to [Music Monday](https://dev.to/michaeltharrington/series/17887) for all your music discussion needs! 🎶_

---

## This Week's Theme:

Today many of you may know we experienced a solar eclipse in North America! If you are like me and you were lucky enough to view the eclipse, you may be filled with a slew of questions on the technicality of an eclipse itself. I know the Moon is passing through the Earth and the Sun, but why the heck is it happening right now, what does that truly mean, and how can I learn more about it?

_**Thus, this week's theme**: all things eclipse/space! Give me your episodes explaining astrophysics, Heliology, solar eclipses, solar events, suns, moons, space, and all that jazz, I want it all!._


![Eclipse Gif](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3qd3003k5unwip9k3jyi.gif)

---

## How We Do
In this series drop your links to what you have been listening to recently + browse others' suggestions. You can follow the suggested genre if you'd like, but don't feel confined to it; you're free to suggest whatever you wanna!

_PS: We also have a podcast tag for your listening musings, sharing your very special new episodes, and finding new things from other people on the internet. Check it out._

{% embed https://dev.to/t/podcast %}

---

See ya below!
-**Rachel**