teleren/devto huggingface dataset:
Getting Started with Flutter: A Beginner's Guide
Tags: flutter, beginners, programming, tutorial
Published: 2024-02-20 13:26:58

Hello!

I wanted my first post to be a beginner's guide kinda post. I'll try to be more active and delve into deeper topics later!

Flutter stands out in the realm of mobile development with its distinctive approach; it utilizes a unique set of widgets that empower developers to craft amazing applications, such as Google Ads, Google Pay, and Alibaba (according to Google).

For today's tutorial, I want you to install IntelliJ IDEA, as it's the platform I'm using. You can download it from the official website and follow the installation instructions for your operating system, as well as starting your first Flutter project.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nrajg6gyd9oyd3sszzjr.png)


In this tutorial, we'll create a simple Flutter app that demonstrates basic interactivity. Our app will display a message, and when a button is pressed, the message will change. Let's dive in!

```
import 'package:flutter/material.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatefulWidget { // MyApp is a stateful widget
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> { // _MyAppState is the state class
  String message = 'Hello, World!'; // Initialize message variable

  void changeMessage() { // Function to change the message
    setState(() {
      message = 'Flutter is amazing!'; // Update message when button is pressed
    });
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: Text('My First Flutter App'), // Set app title
        ),
        body: Center(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: [
              Text(
                message, // Display the message
                style: TextStyle(fontSize: 24),
              ),
              SizedBox(height: 20),
              ElevatedButton(
                onPressed: changeMessage, // Call changeMessage function when button is pressed
                child: Text('Change Message'), // Button text
              ),
            ],
          ),
        ),
      ),
    );
  }
}

```

Explanation:

1. We start by importing the necessary packages and defining the main function to run our app.
2. The MyApp class is a stateful widget that manages the app's state.
3. Inside the MyApp class, the _MyAppState class holds the state data, including the message to be displayed.
4. The changeMessage function updates the message when the button is pressed.
5. In the build method, we define the app's UI structure using MaterialApp, Scaffold, AppBar, Text, and ElevatedButton widgets.
6. The Text widget displays the current message, and the ElevatedButton triggers the changeMessage function when pressed.

With just a few lines of code, we've created a fully functional Flutter app with basic interactivity. Feel free to experiment and customize further as you continue your Flutter journey!


apologies for any mistakes :>
Fail npm run server
Tags: beginners, npm, run, serve
Published: 2024-02-20 13:25:40

Hello guys I'm a new developer and I'm starting work on vue.js "lol, almost!" I'm having trouble starting my serve vue, I've already researched and haven't found anything that can provide me with a solution, I appreciate any help.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tcj99bb6rc3pt2i4dd68.png)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4amaxxd1vdsv36f2ga8p.png)
Keyloggers
Tags: cybersecurity
Published: 2024-02-20 13:20:04

- Keystroke **loggers** are **programs** or hardware devices that **monitor each keystroke** as user types on a keyboard, logs onto a file, or transmits them to a remote location.

- Legitimate applications for keyloggers include **in office** and **industrial** settings to monitor employees' computer **activities** and in home environments where **parents** can monitor and spy on **children's activity**.
How to create animated image cards with Tailwind CSS and Astrojs
Tags: tailwindcss, astro, typescript
Published: 2024-02-20 12:51:01


Let's elevate your website with a captivating image component. If your Astro.js project is already set up, we'll dive straight into using Tailwind CSS to craft the animations for our cards.



[Read the article See it live and get the code](https://lexingtonthemes.com/tutorials/how-to-create-animated-images-with-tailwind-css-and-astro-js/)
Gerenciamento de estados utilizando o Flutter Bloc
Tags: flutter, programming, architecture
Published: 2024-02-20 12:49:56

Então pessoal lá no meu outro post que você pode conferir seguindo clicando [aqui](https://dev.to/lucasvini382/gerenciamento-de-estados-no-flutter-4ofc) deu pra ver que o Flutter Bloc é um dos requisitos mais solicitados dentro das vagas publicadas pelos _hunters_ quando estão procurando desenvolvedores Flutter. Vamos entender um pouquinho da estrutura do BloC que pode e vai nos auxiliar muito no dia a dia, bem... Pelo menos para ser notados pelos recrutadores temos essa certeza né?!
Vamos lá!
Enquanto no Provider temos o gerenciamento de estados bem próximos ali dos Widgets, o BloC veio para dar uma mexida nisso, uma vez que poderemos separar o gerenciamento de estado em si da interface visual com que o usuário estará interagindo. 
Como assim separar?! Esse BloC chega assim como não quer nada e já vem colocando as coisas fora do lugar? Pois é meu caro amigo, se você parar pra pensar as nossas views não deveria ter a responsabilidade de saber o que deveria ser exibido para o usuário, ela tem responsabilidade apenas de buildar e exibir.
Se você parar pra pensar vamos supor um caso que acontece demais, uma tela de lista de contatos que comunica-se com o back-end para trazer os dados do contato e mostrar para o usuário. Se você pensar rapidamente você pode até pensar que isso é apenas uma tela né?! Mas analisando direitinho você enxerga 3 telas dentro dessa.
Tela é toda interface gráfica que entra em contato com o usuário.
1 - Tela de loading enquanto o back-end processa a resposta;
2 - Tela com a lista de contatos;
3 - Tela de erro caso não obtermos o que aguardamos na resposta do back-end;
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dw9ct5n4qeblogiv9i7s.png)

```dart
import 'package:equatable/equatable.dart';
import 'package:flutter/foundation.dart';

class HomeState extends Equatable {
  @override
  List<Object> get props => [];

}

class HomeLoadingState extends HomeState {}

class HomeErrorState extends HomeState {
  final String message;

  HomeErrorState({@required this.message});
}

class HomeStateLoaded extends HomeState {
  final List<String> list;

  HomeStateLoaded({@required this.list});
}

class HomeStateEmptyList extends HomeState {}


```
Para esse estudo criei um repositório para pôr em prática os conhecimentos em Bloc que pode ser acessado [clicando aqui](https://github.com/lucasvini382/flutter-bloc-architecture)
Pointer in C
Tags: c, datastructures, pointer, lowcode
Published: 2024-02-20 12:39:44

## 0. What are pointers?
_Pointer_ is a data type that stores a memory address of a variable type. Pointers are widely used in C to handle data structures, dynamically allocate memory, and optimize performance in certain situations.

Every variable is associated with three things: datatype, name, value and address, that are stored in memory. We can easily access the address, using & before variable. Below is how we can see a address of a variable in C:

```
int variable = 2;
printf("The address of variable = %p.\n", &variable);
```
The function of pointer how i said above is store the address of a determinate variable, in code it works like that:

```
int *pointer = &variable;
```
or

```
int *pointer;
pointer = &variable;
```

When the pointer points nowhere, we give it the value null.

```
int *pointer2 = NULL;
```

To see if the pointer is really storing the address of the variable we do another printf to check, and now we just have to see if the addresses are the same.

```
printf("The address that the pointer stores: = %p.\n", pointer);
```

Now we can access the value of the "variable" through the pointer thereby using *: (*pointer)

```
printf("Value of variable: %d || Value of variable through pointer: %d\n", variable, *pointer);
```
@ts-ignore is a symptom of a code smell
Tags: typescript, javascript, discuss, angular
Published: 2024-02-20 12:22:44

I never was a fan of TypeScript, I believe that TypeScript was a response to Java developers wanting to work on the front end. I believe that you can achieve what you need in terms of type inference using plain old JavaScript and JSDoc.

TypeScript is a marketing point from Microsoft to get developers to use their tools and technologies. The fact that TypeScript allows developers to use `@ts-ignore` to ignore the type-checking errors is a symptom of a far deeper problem thus a code smell.

The fact that `@ts-ignore` even exists is a signal of TypeScript's poor design as it creates an escape-hatch for developers to use when they have broken their typing somewhere in the application logic. This defeats the purpose of type-checking and leads to a broken application with another layer of complexity that is sprinkled on top of it. TypeScript is nothing more than fanfare to me with a breakable type-checking system.
Transposing a Matrix in Java
Tags: java, math, matrix
Published: 2024-02-20 12:22:03

---
title: Transposing a Matrix in Java
published: true
description: 
tags: java, math, matrix
cover_image: https://miro.medium.com/v2/resize:fit:1400/0*BsR_VqJs3WJcIMug.png
# Use a ratio of 100:42 for best results.
# published_at: 2024-02-20 12:16 +0000
---

Sometimes you may need to transpose a matrix. For example while working on linear algebra. The main logic is writing the elements in matrix’s row as a column.

I choose Java to do this however you can use any language. If even the syntax changes, the main logic always will be the same.

## Main method
```java
Scanner sc = new Scanner(System.in);

System.out.println("Row number:");
int row = sc.nextInt();
System.out.println("Column number:");
int col = sc.nextInt();

int[][] arr = new int[row][col];

for(int i = 0; i < arr.length; i++){
    for(int j = 0; j < arr[0].length; j++){
        System.out.println("Enter the arr["+i+"]["+j+"] element:");
        arr[i][j] = sc.nextInt();
    }
}

System.out.println();
print2dArr(arr);
System.out.println();

print2dArr(tranpose(arr));

sc.close();
```

## Transpose Method

```java
static int[][] tranpose(int[][] arr){
    int[][] ret = new int[arr.length][arr[0].length];
    
    for(int i = 0; i < arr.length; i++){
        for(int j = 0; j < arr[0].length; j++){
            ret[j][i] = arr[i][j];
        }
    }
    
    return ret;
}
```

## Print Method

```java
static void print2dArr(int[][] arr){
    for(int i = 0; i < arr.length; i++){
        for(int j = 0; j < arr[0].length; j++){
            System.out.print(arr[i][j]+" ");
        }
        System.out.println();
    }
}
```

## Output

```bash
Row number:
3
Column number:
3
Enter the arr[0][0] element: 1
Enter the arr[0][1] element: 6
Enter the arr[0][2] element: 2
Enter the arr[1][0] element: 7
Enter the arr[1][1] element: 8
Enter the arr[1][2] element: 3
Enter the arr[2][0] element: 2
Enter the arr[2][1] element: 3
Enter the arr[2][2] element: 1

1 6 2
7 8 3
2 3 1

1 7 2
6 8 3
2 3 1
```
⚛️Diferenças entre useMemo e useCallback
Tags: javascript, react, beginners, braziliandevs
Published: 2024-02-20 12:08:54

No React, `useMemo` e `useCallback` são hooks que visam otimizar o desempenho memorizando valores. No entanto, eles servem a propósitos distintos.

## useMemo

`useMemo` é usado para memorizar o resultado de um cálculo. É necessária uma função e uma matriz de dependências e apenas recalcula o resultado quando as dependências mudam. Isto pode ser particularmente útil para cálculos caros ou ao lidar com transformações de dados complexas.

### Casos de uso:

```jsx
importar { useMemo } de 'react';

const MeuComponent = ({ data }) => {
   const processedData ​​= useMemo(() => {
     // Lógica cara
     retornar processData(dados);
   }, [data]);

   return <div>{processedData}</div>;
};
```

Neste exemplo, `processedData` só será recalculado se a propriedade `data` for alterada, evitando cálculos desnecessários em cada renderização.

## useCallback

`useCallback` é empregado para memorizar uma função de retorno de chamada. Também requer uma função e uma matriz de dependências. O retorno de chamada só é recriado quando as dependências mudam, o que é benéfico ao passar retornos de chamada para componentes filhos para evitar novas renderizações desnecessárias.

### Casos de uso:

```jsx
importar { useCallback } de 'react';

const ParentComponent = () => {
   const handleClick = useCallback(() => {
     // Lida com a lógica do clique
     console.log('Botão clicado!');
   }, []); // Sem dependências, o retorno de chamada permanece constante

   return <ChildComponent onClick={handleClick} />;
};

const ChildComponent = ({ onClick }) => {
   // Componente filho recebe retorno de chamada memorizado
   return <button onClick={onClick}>Clique em mim</button>;
};
```

Neste cenário, `handleClick` permanece o mesmo em todas as renderizações de `ParentComponent` porque não tem dependências, evitando novas renderizações desnecessárias de `ChildComponent`.

Em resumo, `useMemo` serve para memorizar valores, enquanto `useCallback` serve para memorizar funções de retorno de chamada. Entender quando usar cada gancho garante desempenho ideal em seus aplicativos React.

Cover Photo by <a href="https://unsplash.com/@dmey503?utm_content=creditCopyText&utm_medium=referral&utm_source=unsplash">Dan Meyers</a> on <a href="https://unsplash.com/photos/white-and-blue-graphing-paper-0oNAIDc0HUA?utm_content=creditCopyText&utm_medium=referral&utm_source=unsplash">Unsplash</a>
Melhores Emagrecedores
Tags: test
Published: 2024-02-20 12:05:06

---
title: Melhores Emagrecedores
published: true
description: Listamos os [melhores emagrecedores](https://melhoresemagrecedores.club)
tags: #test

# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
# published_at: 2024-02-20 11:57 +0000

---

Veja a lista dos [melhores emagrecedores](https://melhoresemagrecedores.club)

Confira o [resultado da lotofácil](https://lotofacil.me/resultado-da-lotofacil)
React cheat sheet
Published: 2024-02-20 12:04:12

export default function App() {
	return (
		<>

		</>

	);
}

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

function App() {
	return (
		<>

		</>

	);
}
--------------------------------------------------------

export default App;

function List() {
const itemList = ["Mo Joe", "alhim" "Ahmeddill", "Sameria", "Hibaq"];

return (
	itemList.map((item) => (
	<p>{item}</p>
	))
	);
)

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

export defualt Class DropDownList extends Component {
render (
	return
		<div>
		 <ul>
    			<li>
        			<Link to="/">Home</Link>
    			</li>
    			<li>
         			<Link to="/about">About</Link>
     			</li>
     			<li>
         			<Link to="/dashboard">Dashboard</Link>
     			</li>
		 </ul>
		</div>
 ); 
}

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

import React from "react";
import NavBar from "./components/navbar.js";
import Footer from "./components/footer.js";
import Header from "./components/header.js";
import Home from "./home.js";
import { BrowserRouter as Router, Switch, Route, Link } from "react-router-dom";

function App() {
  return (
    <Router>
      <div className="app-container">
        <NavBar />
	<Header />
        <Switch>
          <Route path="/home" component={Home} />
        </Switch>
        <Footer />
      </div>
    </Router>
  );
}

export default App;
Most Popular Accommodation Choices in the USA for International Students
Tags: studyinusa, educationinusa, studyinamerica, studyabroad
Published: 2024-02-20 12:03:30

Are you looking for the best accommodation in the US? Though the country is one of the top destinations in the world, getting a comfortable stay can sometimes be challenging. 
So, don’t worry we have come up with some of the most popular accommodation options just for you. 
But for that, you need to click the link below and read our article. So, hurry!

https://www.studies-overseas.com/blogs/student-accommodation-in-usa
How to Set up Netlify Deploys for Docfx using GitHub Actions
Tags: docfx, dotnet, devops, githubactions
Published: 2024-02-27 15:56:21

---
title: How to Set up Netlify Deploys for Docfx using GitHub Actions
published: true
date: 2024-02-20 12:00:00 UTC
tags: docfx,dotnet,devops,githubactions
canonical_url: https://seankilleen.com/2024/02/how-to-set-up-netlify-deploys-for-docfx-using-github-actions/
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/iey7wd6gliv2j623azpb.jpg
---

We currently use `docfx` to publish the [NUnit docs](https://docs.nunit.org), because it has a lovely capability of generating docs for our API reference in addition to all our articles.

However, one thing I often yearn for – that I get on this Jekyll blog and some others I work with – is the ability to have a live preview within a pull request of what the generated site will look like.

Because the source code for the API docs is in the `nunit` repository, and the docs live in the `docs` repo, it’ll be a little extra complicated.

Nevertheless: Let’s make it happen.

## The Conceptual Approach

- We pull the NUnit DLL and create the docfx site
- We zip up the site
- We create a custom GitHub environment to be associated with our deployment environment
- We manually update the statuses of that deployment
- We deploy to Netlify
- We post the link as a comment in the PR

## The Build Steps

[Read more at SeanKilleen.com!](https://seankilleen.com/2024/02/how-to-set-up-netlify-deploys-for-docfx-using-github-actions/)
Cenforce Manufactured for Great Pleasure
Tags: cenforce
Published: 2024-02-20 11:54:43

There are millions of ED men and most of them consume Cenforce. Among all the generic and branded drugs, Cenforce is the best and treats the disease relatively quickly. The power of Cenforce is 100mg and manufactured in various forms. Regular consumption of this drug is not permitted. The cost price of this medication is very low compared to other medications.
Generally, Cenforce does not require a prescription for the consumption but to avoid all kinds of side effects, the ED patients should consult the doctor once before consuming this medication. This drug is manufactured by various manufacturers and they all produce the same quality drug. Getting [Cenforce](https://www.healthmedsrx.com/product/cenforce/) is a simple process and adult males can purchase this medication from any pharmacy. When it comes to the safety of the medication, it is a safe generic drug, approved by the Food and Drug Administration (FDA) and the World Health Organization (WHO).
The intake of Cenforce is done with water and no other liquids should be used for the consumption. This is the medication that is consumed about 20 – 30 minutes before sexual activity. Correct stimulation at the correct time is required for achieving a firm erection before and during the time of sexual practice. The penis erection can last for a long time, and customers can have sex for many times as they want. Those consuming nitrates should stop as Cenforce and nitrates react with each other and cause a sudden drop in blood pressure.
Impotent men suffering from diabetes, hypertension, kidney problems, cancer, heart diseases, etc. should consult a doctor once before consuming this medication.
#reactjs 19 esta mas cerca de lo que pensamos
Tags: webdev, react, javascript, spanish
Published: 2024-02-20 11:53:23

Hey comunidad en esta ocasión les traigo mi pequeño analices de lo que nos depara la nueva versión de reactjs para este #2024 viene cambios muy importante en base a comentarios de la comunidad

La verdad muy sorprendido y ansioso  por ver esta versión ya disponible 

que opinas tú  al respecto?

Link Documento:: https://react.dev/blog/2024/02/15/rea...

Nos vemos en un proximo video

[![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nyu2u5ti781w4csf8bj4.png)](https://youtu.be/MJRJ0MnQ4xw?si=ThnSPZmXyMQkuq0Q)
How not to do CSS
Tags: webdev, css, programming, tutorial
Published: 2024-02-20 11:25:19

There are several common pitfalls that developers fall into when writing CSS, leading to bloated, hard-to-maintain codebases, and suboptimal user experiences. We'll explore the top ways not to do CSS -


### Overusing !important


```css
css
Copy code
.button {
  color: blue !important;
}

.button-important {
  color: red !important;
}
```

The !important rule in CSS is used to make a particular property and value the most important among conflicting rules. The !important declaration overrides any other styling rules, making it difficult to debug and maintain CSS. It leads to a specificity war where the only way to override a style is by using another !important, leading to a messy, hard-to-manage stylesheet.


### Excessive Use of IDs for Styling

```css

#header {
  background: #f1f1f1;
}

#footer {
  color: #333;
}
```

IDs are highly specific and should be used sparingly for styling purposes. Overuse of IDs in CSS makes it hard to reuse styles and can lead to specificity issues, where styles cannot be easily overridden by class selectors.



### Not Using Shorthand Properties


```css
.margin-example {
  margin-top: 10px;
  margin-right: 20px;
  margin-bottom: 10px;
  margin-left: 20px;
}
```

CSS offers shorthand properties to make your stylesheets more concise and easier to read. Not using shorthand properties, as seen above, can lead to unnecessarily verbose code. This could be simplified to:

```css
.margin-example {
  margin: 10px 20px;
}
```

### Using Inline Styles Excessively

```html
<div style="background-color: #000; color: #fff; padding: 20px;">Content here</div>
```

Inline styles mix content with presentation, making it hard to separate concerns and maintain styles. They also have a high specificity, overriding external stylesheets and leading to inconsistency and duplication.


### Not Using Responsive Units

```css
.container {
  width: 960px;
}
```

Using fixed units like pixels (px) for layout dimensions can make your site unresponsive. It's essential to use relative units like percentages (%) or viewport units (vw, vh) for layouts to ensure your site is accessible and looks good on all devices.

### Over-nesting in Preprocessors

```scss
.nav {
  ul {
    li {
      a {
        color: blue;
      }
    }
  }
}
```

While CSS preprocessors like SASS can enhance productivity, over-nesting selectors leads to overly specific CSS rules, making it hard to override styles and leading to bloated CSS files.



Css can be simultaneously be the easiest and the hardest language to learn. Some good practices go a long way in maintainability .
Building an Image Recognition Website with SvelteKit and TensorFlow.js: A Beginner's Tutorial
Tags: webdev, beginners, programming, tutorial
Published: 2024-02-20 11:25:14

Introduction:

Are you ready to delve into the exciting world of machine learning right from your web browser? In this beginner-friendly tutorial, we'll guide you through the process of building a simple website that can recognize the content of uploaded images using TensorFlow.js and SvelteKit. This project is perfect for those with a basic understanding of web development and a curiosity about machine learning.
read more : https://shorten.is/S_lqM
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vdnqfxqauxzhes3jsk4g.jpg))