teleren/devto huggingface dataset:
Introducing storage_ui, the new library for managing key-value storage in your Flutter app.
Tags: flutter, mobile
Published: 2023-01-27 18:31:08

Managing storage in a mobile app can be a tedious task, especially when you have a lot of data to store and retrieve. That's why I created storage_ui, a library that makes it easy to manage your storage with a user-friendly GUI. It works on top of get_storage and flutter_secure_storage, and it provides an easy way to preview, edit, delete, and copy your stored keys.

The library also allows you to customize the look and feel of the storage page. You can change the color of the app bar, background cursor, confirm button, cursor, and text to match your app's style.

To get started, add storage_ui: 1.0.0 to your pubspec.yaml file and use CacheStorageLogPage in your code.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6gin92ns2xan708ca061.png)
```
CacheStorageLogPage(
        cacheStorage: GetStorage(),
        pageStyle: PageStyle(
          appBarColor: Colors.blue,
          backgroundCursorColor: Colors.black26,
          confirmColor: Colors.green,
          cursorColor: Colors.black,
          textColor: Colors.black,
        ),
        onError: (message) {
          print(message);
        },
      )

```

You can find more information about the library on pub.dev (https://pub.dev/packages/storage_ui) and Github (https://github.com/AmrSaied/storage_ui) including an issue tracker, contributing guidelines, and more.

Don't hesitate to give it a try, and let me know what you think.

P.S: I'm open for any suggestions, feedback or contributions for the lib.
Event – 🧠 OpenAI, ChatGPT and #PowerPlatform … Yes, and without coding !
Tags: chatgpt, englishpost, openai
Published: 2023-01-30 14:48:40

---
title: Event – 🧠 OpenAI, ChatGPT and #PowerPlatform … Yes, and without coding !
published: true
date: 2023-01-27 18:30:48 UTC
tags: ChatGPT,EnglishPost,OpenAI
canonical_url: 
---

![](https://brunocapuano.files.wordpress.com/2023/01/pexels-photo-8849282.jpeg)
_Photo by Tara Winstead on Pexels.com_

Hi !

Are you ready to tap into the endless possibilities of ChatGPT? With the recent release of new OpenAI services on Azure, the potential for building innovative applications has never been greater.

I think it’s time explore the amazing capabilities of ChatGPT and how we can harness them to create truly unique and powerful solutions. Why not add some of the amazing OpenAI capabilities to the Power Platform ?

Join me on February 9th, to learn how to integrate OpenAI services in the Power Platform solutions. Of course, this is a Low Code – No Code session.

## [Let’s get the best of OpenAI in Power Platform ! (yes, ChatGPT style)](https://developer.microsoft.com/en-us/reactor/events/18373/)

See you there !

Happy coding!

Greetings

El Bruno

More posts in my blog [ElBruno.com](https://www.elbruno.com).

* * *
Unlocking the Potential of Decentralized Data Storage with IPFS: How it Works and Why it Matters
Tags: ipfs, blockchain, architecture, web3
Published: 2023-01-27 18:28:28

Storing data directly on the blockchain can be costly due to the increased computational resources, storage space, and transaction fees required. One solution to this problem is the use of IPFS (InterPlanetary File System) for decentralized data storage and retrieval. IPFS utilizes a content-addressable storage system, where files are identified by their content rather than their location. Each file is assigned a unique cryptographic hash, called a content address, which serves as its identifier.

IPFS breaks large files into smaller pieces called blocks, which are then distributed across multiple nodes in the network. This creates a distributed file system that allows for peer-to-peer storage and retrieval of files, without relying on a single server or centralized database. Unlike HTTP, which uses domain names and IP addresses to identify the location of a resource, IPFS uses content-addressable storage.


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


DAG (Directed Acyclic Graph) is used as a content storage mechanism to organize and store files on the IPFS network. DAGs are a type of data structure that can be used to represent complex relationships between objects, and they are particularly useful in distributed systems like IPFS.

The DAG structure allows IPFS to efficiently store and retrieve large files by breaking them down into smaller blocks, and it enables the network to be more scalable, resilient, and secure. The content-addressability of IPFS is enabled by the DAG structure, where each node of the DAG represents a CID (Content Identifier), which is a hash of that block of data.


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


DHT (Distributed Hash Table) is a distributed mechanism to discover content on the IPFS network. It allows nodes to find the location of files stored on the network and retrieve them efficiently, even if some nodes are not available. DHTs are resilient and fault-tolerant, ensuring that the network is always able to find and retrieve files.

Provider records, IPNS records, and Peer ID records are all key-value pairings in the DHT that are used to track and support various network features.

Overall, IPFS is a powerful solution for decentralized data storage and retrieval, offering a more efficient, resilient, and secure alternative to traditional centralized storage methods. It is particularly useful for applications that require large files and require a high degree of security.
React Native Installation Guide
Tags: reactnative, react, javascript, beginners
Published: 2023-01-27 18:26:33

React Native is a framework for building mobile applications using JavaScript and React. To get started with developing React Native applications, you will need to install the React Native command-line interface (CLI) and a few other tools. Here's a general guide to installing React Native on your computer:

1. Install Node.js and Watchman: React Native requires Node.js and Watchman to be installed on your computer. You can download the latest version of Node.js from the official website and install it. Watchman is a file watching service that can be installed using Homebrew on macOS or chocolatey on Windows.

1. Install the React Native CLI: To install the React Native CLI, open a terminal and run the following command: 'npm install -g react-native-cli'

1. Install a code editor: You will need a code editor to write and edit your React Native code. Some popular options include Visual Studio Code, Atom, and Sublime Text.

1. Install Xcode on macOS: If you're developing for iOS, you will need to install Xcode, which is a set of development tools provided by Apple. You can download it from the Mac App Store.

1. Install Android Studio on Windows and Linux: If you're developing for Android, you will need to install Android Studio, which is a set of development tools provided by Google. You can download it from the official website.

1. Create a new React Native project: Once you have all the necessary tools installed, you can create a new React Native project by running the following command in a terminal: 'react-native init MyProject'

1. Run the project on an emulator or device: To run your project on an iOS simulator, use the command 'react-native run-ios'. To run it on an Android emulator, use the command 'react-native run-android'.

This is a general guide to getting started with React Native development, but keep in mind that the specific installation steps may vary depending on your operating system and the tools you already have installed on your computer.

It's always a good idea to check the official documentation for the most up-to-date instructions and troubleshooting tips.
: )
Published: 2023-01-27 18:20:28

update uchun masala
sample_set = {"Yellow", "Orange", "Black"}  
sample_list = ["Blue", "Green", "Red"]
sample_set.update, (sample_list)  
print(sample_set)

union-uchun misol
set1 = {10, 20, 30, 40, 50}
set2 = {30, 40, 50, 60, 70}  
print(set1.union(set2))

difference-update() - masala
set1 = {10, 20, 30}   
set2 = {20, 40, 50}
set1.difference_update(set2)
print(set1)


keys = ['Ten', 'Twenty', 'Thirty']
values = [10, 20, 30]
res_dict = dict(zip(keys, values))
print(res_dict)


None-qiymati yoq degani


Agar siz ma'lumotlar turini belgulamoqchi bo'lsangiz, quyidagi konstruktor funksiyalarudan foydalanishingiz mumkin:
x = str("Hello world")
x = int(20)
x = float(20.5)
x = complex(1j)
x = list(("Apple", "Banana", "Cherry"))
x = tuple(("aplle", "Banana", "Cherry"))
x = range(6) -- range
x = dict(name = "John", age = "36")
x = frozenset(("aplle", "banana," "chery"))
x = bool(5)  #bool - Taqqoslash
x = bytes(5) 
x = bytearray(5)
x = memoryview(bytes(5))


Python da 3 ta raqamli tur mavjud

integer - int - Bu butun sonlar uchun
float - bu kasr sonlar uchun
complex - murakkab sonlar uchun
x = 1    int
y = 2.8  float
z = 1j   murakkab sonlar uchun


int - integer
int yoki butun son - bu musbat yoki manfiy, o'nli kasrsiz, cheksiz uzunlikdagi butun son
x = 1
y = 215648616611
z = -4623564

print(type(x))
print(type(y))
print(type(z))


float
Float, shuningdek, 100 ning kuchhini ko'rsatidh uchun "e" bilan ilmiy raqamlar bo'lishi mumkin
bir turdan ikkinchisiga o'tkazish
x = 1    int
x = 2.5  float
x = 11   complex
a = float (x)
b = int (y)
c = complex (z)


print(a)
print(b)
print(c)
Getting started with Reactjs
Tags: react, javascript, beginners, productivity
Published: 2023-01-27 18:13:12

Here are a few tips for someone who is just getting started with React

1. <u>Learn the basics of JavaScript</u>: React is a JavaScript library, so it's important to have a solid understanding of JavaScript before diving into React. Make sure you understand concepts like variables, functions, and objects.

2. <u>Understand the component-based architecture</u>: React is based on a component-based architecture, where the UI is divided into small, reusable components. Understanding this concept is essential for building efficient and maintainable React applications.

3. <u>Start with the basics</u>: React has a gentle learning curve, but it can be overwhelming at first. Start with the basics, such as creating and rendering components, handling events, and passing data between components.

4. <u>Practice, practice, practice</u>: The best way to learn React is by building projects with it. Try building small projects, such as a to-do list or a weather app, to get a feel for how React works and how to structure your code.

5.<u> Learn JSX</u>: JSX is a syntax extension for JavaScript that allows you to write HTML-like elements in your JavaScript code. It's used in React to describe the structure of a component's UI.

6. <u>Understand the Virtual DOM</u>: React uses a virtual DOM to improve the performance of updates and re-renders. Understanding how the virtual DOM works and how it interacts with the actual DOM can help you write more efficient React code.

7. <u>Learn about state and props</u>: React components have two types of data: props and state. Props are passed from a parent component to a child component, and state is managed within a component. Understanding the difference between props and state is important for building correct and efficient React applications.

8. <u>Familiarize yourself with the React Developer Tools</u>: React Developer Tools is a browser extension that allows you to inspect and debug your React code. It's a great tool for understanding how your components are structured and how they interact with each other.

9. <u>Learn about React hooks</u>: React Hooks are a way to use state and other React features in functional components. It's a powerful feature that can help you write more readable and reusable code.

10. <u>Keep an eye on the community</u>: React is a rapidly-evolving library, and new features and best practices are being introduced all the time. Keep an eye on the React community, by following blogs, forums, and social media, to stay up-to-date with the latest developments.
Scrimba's JavaScript Deep Dive - Part I
Published: 2023-01-27 18:08:45

Getting Started:
- Text in Javascript ALWAYS needs to have to be grab in quotes

Variables & String
- by default, variables have the value "undefined", meaning is empty
- we can declare and assign variables at the same time
- camel-cased: first letter is lowercase, but next word is uppercase (by convention). For example: firstName
- Requirements: 1) name just letter, number, "$", and "_" 2) first character must not be a number, 3) cannot use reserved name (like "var")
- Browser: window // Server: global
- Sloppy (normal) mode: default // Strict mode: throws more errors, but prevents better -> `"use strict";` But this does not solve all the problems
- `let `& `const ` to declare variables, but let can be reassigned (like `var`). Use cont unless it will be reassigned
- Variable shadowing: let & const are block-scoped
- Template literal for string interpolation: to add variables in strings `Hi ${username}` (we can do operations or put conditions inside the {} ). It use **`**  not '
- Variables names are case sensitive 
- Variables names should be descriptive and in camel-cased. Any variable can be of any type, that is why is so important to follow this convention, so others know what we are doing
- Other conventions: `isSomething` or `hasSomething` to do condicional, for constant we use all caps and _ to separate (FIRST_NUMBER)
Count Down to Saturday
Published: 2023-01-27 17:37:10

Some times my blogs get into the 200+ views and some of them ( well more than 50% of them) don't even past the 25 views threshold. 

I know why, its got to do with marketing and blog titles. For blogs that I got hundreds of views on, half of all the viewership was from All external referrers


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

half of this viewership was from discord, where I would be uploading my blogs into every self-promote section I could. 

But I realized:
1. I will not be able to keep it up
2. I am barely making any views from each of these discord channels, as that I was in more than 50 averaging about 3 to 2 views, it wasn't very ethical

So I stopped doing that, and really tried to go to channels for a target audience, though in all it did lower my views

And the there was the titles. 

I don't want to make the clickbaity, useless information titles on how to add 1 + 1 in JavaScript of how to create a square in CSS. I want to bring content that is useful to me.

But that also means, that my page cant compete with all of these other blogs, that get clicks with these dumb titles.

- O.T.A

If you want to read some more rambles like these, consider following, and giving a reaction.
What really are declarative and imperative?
Published: 2023-10-18 08:15:01

---
title: What really are declarative and imperative?
published: true
date: 2023-01-27 17:30:00 UTC
tags: 
canonical_url: 
---

Declarative နဲ့ Imperative ကိုရှင်းတာဘာ‌‌ တွေ ခက်နေတယ်မသိဘူး။ Code တွေအတောင့်လိုက်ရေးပြပြီတော့ရှင်းမှဘယ်လိုလုပ်နားလည်မှာလဲ။ ဒါကဒါကြီးဆိုပြီးပဲအလွတ်မှတ်သွားမှာပဲ။ ဒီနိုင်ငံမှာက ဒါကျက်ဒါဖြေအကျင့်ကြီးနဲ့ဆိုတော့။ **အဲ့တော့အပေါ်ကနှစ်ကောင်ကိုရှင်းချင်ရင် Conceptually အရရှင်းရုံပဲ။** ကိုယ်ကကော်ဖီသောက်ချင်တယ်ဆိုပါစို့။ အဲ့တာဆိုကော်ဖီရအောင်ဘယ်လိုလုပ်မလဲ။ ဒါကို Declarative and Imperative Approach နဲ့သွားပြမယ်။

> ညီလေးရေကော်ဖီတစ်ခွက်ချပေးပါ။ နွားနို့လေးပါထည့်နော်။

ဒါက **Declarative** ပုံစံ။ **Focus on Result** ဖြစ်သွားပြီ။ သူ့ဘာသာကော်ဖီဘယ်လိုဖျော်ဖျော်စိတ်မဝင်စားဘူး။ နွားနို့ကိုသူ့ဘာသာ သွားညှစ်ညှစ်၊ Ready Made ပဲထည့်ထည့် ကော်ဖီထဲနွားနို့ပါလာရင်ပြီးတာပဲ။ ဒါဆိုရင် Declarative Approach ပဲ။

အဲ့တော့ ဒီတစ်ခါနောက်တစ်နည်းနဲ့သွားမယ်။

- ဈေးဆိုင်သွားမယ်။
- ကော်ဖီတစ်ထုပ်ဝယ်မယ်။
- နို့ဆီတစ်ထုပ်ဝယ်မယ်။
- အိမ်ရောက်ပါပြီတဲ့။
- ရေနွေးအိုးတည်မယ်။
- ရေနွေးဆူတာနဲ့ ကော်ဖီခွက်ယူမယ်။
- ကော်ဖီထုပ်ဖောက်မယ်၊ ခွက်ထဲထည့်။
- ရေနွေးထည့်။ နို့ဆီဖောက်ထည့်။ ဒါမှပြီးတာ။

အစအဆုံး \*\*step by step \*\*သွားတာမျိုးကို Imperative လို့ခေါ်တယ်။

အဲ့တာကို JavaScript နဲ့ပြလို့ရတယ်။ ဒါပေမဲ့ Declarative Approach ကို SQL နဲ့ပြတာကပိုလွယ်တယ်။

```
SELECT * FROM users;

```

Users Table ထဲက အကုန်ထုတ်ပြလို့ပြောလိုက်တာ။ ဒါကကော်ဖီတစ်ခွက်ချလို့ပြောတာနဲ့တူတူပဲ။ နောက်တစ်ခုက Imperative ပုံစံ။ Sum of numbers ကိုချင်တယ်ဆိုပါစို့။ ဒါကို Imperatives ပုံစံနဲ့သွားရင်ဒီလိုဖြစ်မယ်။

```
const numbers = [1, 2, 3, 4, 5]
let total = 0
const length = numbers.length
for(let i =0; i < length; i++){
    total+= numbers [i]
}

```

**ဒါဆိုရင် Sum of numbers ရဖို့ အစအဆုံးကိုယ့်ဘာသာ အကုန်ရေးရတာမျိုးကို Imperative Approach နဲ့သွားတယ်ပြောတာ။** React တို့၊ Vue တို့လည်း အဲ့ပုံစံပဲသွားတာ။ ကိုယ်က Components တွေရေးရုံပဲ။ ကျန်တဲ့ DOM နဲ့ပတ်သက်တာတွေက Framework တွေကလုပ်ပေးသွားမှာ။ ဒါမျိုးတွေကိုပြောတာ။
[PHP] Verificar se o CPF é numericamente válido
Tags: php, tutorial
Published: 2023-01-27 16:18:49

Opaaa, tudo certo ? como vocês estão ?  
Bom ... algumas pessoas podem ter a mesma dúvida que eu tive a um tempo atrás relacionada a como o cálculo para verificar se o CPF é válido é feito.
Eis que encontro um blog onde é explicado passo a passo de como é feita essa validação -> [Algoritmo CPF válido](https://www.macoratti.net/alg_cpf.htm)  

Com a regra de negócio em mãos resolvi transformar a lógica em código.

```
<?php

$cpf = (string) 74305429055;
$firstVerifiedDigit = $secondVerifiedDigit = 0;

// ## Início cálculo primeiro digito
// pegar os 9 primeiros digitos
$firstNineDigits = substr($cpf, 0, 9);

$countFirst = 0;
$multiplierFirst = 10;
for ($i = 0; $i < 9; $i++) {
    $countFirst += $firstNineDigits[$i] * $multiplierFirst--;
}
echo "\nsoma dos digitos múltiplicados da esquerda para direita com um valor decremental começando por 10: $countFirst\n";

// dividindo a soma (count)  por 11 para obter o resto
$remainder = $countFirst % 11;
echo "\nResto da divisão: $remainder\n";

// Se o resto da divisão for menor que 2, então o dígito é igual a 0 (Zero). -> Como iniciamos o $firstVerifiedDigit com 0 não precisamos da validação
// Se o resto da divisão for maior ou igual a 2, então o dígito verificador é igual a 11 menos o resto da divisão (11 - resto)
if ($remainder >= 2) {
    $firstVerifiedDigit = 11 - $remainder;
}
echo "\nValor do primeiro dígito verificador: $firstVerifiedDigit\n";
// ## Fim cálculo primeiro digito

// ## Início cálculo segundo digito
// adicionando o primeiro digito verificador ao final do cpf
$cpfWithFirstDigit = $firstNineDigits . $firstVerifiedDigit;
echo "\nCPF com o primeiro dígito verificado ao final: $cpfWithFirstDigit\n";

$countSecond = 0;
$multiplierSecond = 11;
for ($i = 0; $i < 10; $i++) {
    $countSecond += $cpfWithFirstDigit[$i] * $multiplierSecond--;
}
echo "\nsoma dos digitos múltiplicados da esquerda para direita com um valor decremental começando por 11: $countSecond\n";

// dividindo a soma (count)  por 11 para obter o resto
$remainder = $countSecond % 11;
echo "\nResto da divisão: $remainder\n";

// Se o resto da divisão for menor que 2, então o dígito é igual a 0 (Zero). -> Como iniciamos o $secondVerifiedDigit com 0 não precisamos da validação
// Se o resto da divisão for maior ou igual a 2, então o dígito verificador é igual a 11 menos o resto da divisão (11 - resto)
if ($remainder >= 2) {
    $secondVerifiedDigit = 11 - $remainder;
}
echo "\nValor do segundo dígito verificador: $secondVerifiedDigit\n";
// ## Fim cálculo segundo digito

// adicionando o segundo digito verificador ao final do cpf
$cpfValid = $cpfWithFirstDigit . $secondVerifiedDigit;
echo "\nCPF: $cpfValid\n";

```

Tentei deixar bem explicado cada etapa da validação.
Repo: https://github.com/dev-lmoreno/validateCpf

vlwww flwww


referência: https://www.macoratti.net/alg_cpf.htm
Veracode SCA Scan no VS Code
Tags: veracode, beginners, tutorial, security
Published: 2023-01-27 17:24:58

Veracode SCA Scan for VS Code é uma extensão para o VS Code IDE que integra [Veracode Software Composition Analysis (SCA)](https://dev.to/m3corp/o-que-e-sca-2j29) em seu ciclo de vida de desenvolvimento de software (SDLC). A extensão executa varreduras baseadas em [agent SCA](https://docs.veracode.com/r/c_sc_what_is) de seu projeto para detectar vulnerabilidades em bibliotecas de código aberto e o nível de risco de licenças de terceiros. Para vulnerabilidades, ele também fornece orientação para corrigir problemas de segurança em seu IDE.

**Pré-requisitos**
Antes de poder instalar e usar o Veracode SCA Scan for VS Code, você deve ter:
- Uma conta de [usuário humano](https://docs.veracode.com/r/c_about_veracode_accounts) com a [função](https://docs.veracode.com/r/c_role_permissions) de Security Lead, Workspace Administrator, Workspace Editor ou Submitter.
- Configurado um arquivo de [credenciais Veracode](https://dev.to/m3corp/configurando-o-arquivo-de-credenciais-3c0k) com credenciais de API válidas. A extensão usa essas credenciais para autenticar com Veracode, não o token do agente SCA.
- Ter uma subscrição de SCA ativa
- Criou um [espaço de trabalho](https://docs.veracode.com/r/Create_a_Veracode_SCA_Workspace) Veracode SCA. Se você usar o My Workspace, ele deverá ter um slot de projeto disponível.
- Instalar e ativar um [SCA workspace agent](https://docs.veracode.com/r/Desktop_Agent_Based_Scanning) em seu sistema local. Se você tiver mais de um agente instalado, deverá excluir todos menos um.
- Instalar uma versão suportada do [VS Code](https://community.veracode.com/s/article/Support-Matrix).
- Instalar um [gerenciador de pacotes](https://docs.veracode.com/r/c_sc_supported_lang) compatível.

**Como instalar?**
Você faz a instalação do Veracode SCA Scan for VS Code pelo Marketplace do VS Code.
Se você tiver problemas durante ou após a instalação, consulte a [solução de problemas](https://docs.veracode.com/r/Troubleshooting_IDE_Integrations).

Para concluir esta tarefa:
1. Acesse o VS Code [Marketplace](https://marketplace.visualstudio.com/vscode)
2. Pesquise por veracode.
3. Clique em **Veracode SCA Scan for VS Code**.
4. Clique em **Instalar** e siga as instruções na tela para instalar a extensão no VS Code.
5. Reinicie o VS Code para concluir a instalação.
6. No VS Code, na Activity Bar, clique em Veracode SCA Scan.

Por padrão, a extensão detecta seu arquivo de credenciais da API Veracode e autentica com Veracode para confirmar que suas credenciais são válidas. Se você adicionou o arquivo de credenciais depois de instalar a extensão, clique em Test Authentication para confirmar que suas credenciais de API são válidas. Se suas credenciais de API forem inválidas ou expiradas, você poderá gerar novas credenciais.

Opcionalmente, defina as configurações de extensão.
Agora você pode analisar seu projeto.

Mais detalhes na [documentação](https://docs.veracode.com/r/Veracode_SCA_Scan_for_VS_Code).
Being a Developer Advocate: Week 19
Tags: devrel, learninpublic
Published: 2023-01-27 17:24:04

We are still onto Docs and getting some major things into it, but not too many learnings there at the moment.

## Video Production Learnings
So I managed to record a 10-minute video about using our product within Gitpod. This was fun as I was able to shoot it in 2 hours and then get crazy with video production. The video is currently uploading and processed by YouTube.

Some things I tried this time:
* Adding a little bit of LoFi background music (You want to check out [Streambeats](https://www.senpai.tv/streambeats/) for copyright-free music)
* Get in some better-fitting transitions
* Do a cool intro with floating icons

## I am Building a Cohort Based Course - Join the Waitlist
In other news: I joined the [maven.com](https://maven.com/) course accelerator to build a cohort-based course with the title **From Jargon to Clarity - Navigating Different Audiences in Tech**.

It is aimed at Junior to Intermediate level software engineers aspiring to get to senior level. Communication is a vital part of that.

If that sounds interesting please join the waitlist over this [Survey Form](https://maven.com/forms/7b05cb) or share it for more reach 😎