teleren/devto huggingface dataset:
Use cases of blockchain technology
Tags: blockchain, programming
Published: 2022-02-07 17:42:39

The application of Blockchain is not limited to cryptocurrencies. There are many other implementations of it, such as:

- **Banking and Finance** — although this was the first sector to benefit from the advantages brought by the blockchain, it is somehow also the most endangered. Currently, the cryptocurrency market is constantly growing, and centralised banking systems are in a position to adopt the new technology, or to be taken over by it.

- **Currency** — it’s not only about some cryptocurrencies, or some countries that are acting cool and adopting their “official” cryptocurrency. One day one currency may emerge as the only currency. And we do not even know if “currency” will be a proper name for that representation of value, or “that currency” may be the value itself.

- **Healthcare** — healthcare and data privacy are becoming more and more correlated. Worldwide systems are relying on electronic systems to store data, which are vulnerable to attacks, or to data loss. A decentralised approach may even have implications in the integrity of priority lists for vaccinations, access to medication, and so on. 

- **Data privacy** — probably one of the hottest topics of the moment that is changing because of the blockchain, and this is only the beginning. There will be the increasing need to securely store data when healthcare services and processing DNA become widespread.

- **Records of Property Ownership and Transfer** — public notary, lost or burned papers, or forged documents must become history soon, and blockchain has the capability to change all of these.
Smart Contracts — when it comes to contracts we can even think further, about laws, constitutions of sovereign states, public declarations or international agreements.

- **Supply Chains** — humans are moving objects daily from one place to another, from country to country and keeping track of all of these may be challenging and vulnerable to many types of fraud.
Voting — although voting is the basis of democracy, there are still no bulletproof electronic systems that may prevent fraudulent voting. This is a very complex topic and probably deserves a dedicated article on its own. Fortunately, I can recommend two very well made videos discussing this: [Why electronic voting is a bad idea](https://www.youtube.com/watch?v=w3_0x6oaDmI) and [why electronic voting is **still** a bad idea](https://www.youtube.com/watch?v=LkH2r-sNjQs).
Laravel 9: Full Text Index & SwiftMailer!
Tags: laravel, webdev, php, laravel9
Published: 2022-02-07 17:33:01


Here we are… This is the last article about Laravel 9!
In this episode we are looking at some tiny but useful features of Laravel 9.

### 1. server.php file: You can get rid of it!

Until this version of Laravel, we had a `server.php` file inside the framework root directory that allows us to emulate Apache’s mod_rewrite functionality from the built-in PHP web server.

This provides a convenient way to test a Laravel application without having installed a “real” web server software here. OK, I know! Let’s crack it down to simple words: actually `php artisan serve` will use this file to serve your website!

And Here is the magic, in Laravel 9 we can remove it for good and there is no problem with this action because it will be included inside the framework.



### 2. Full Text Indexes

Laravel 9 will support full-text indexes which will provide for us where clause method that we can use in our queries for text columns of MySQL or PostgreSQL tables. Laravel will automatically transform these methods to raw SQL. e.g:

* generate full-text indexes for our table column(in migrations):

![laravel full text indexes](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rcnkrm1vrrzzuewkxc10.png)


* `whereFullText()` method:

![laravel full text indexes where method](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0wwwldfmwlseytm5yubx.png)


### 3. Controller Route Groups

We can now use the `controller()` method to define the common controller for all of the routes within the same controller. e.g:

![laravel route group controller](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p2urhraa1glhuz2w0f80.png)

So we will define any route to in the `UserController` to invoke the related method like above.


### 4. SwiftMailer is a goner!

Previous versions of Laravel used the Swift Mailer library to send outgoing email. But, mentioned library is no longer maintained and has been succeeded by Symfony Mailer.

We can read the [upgrade guide](https://laravel.com/docs/master/upgrade#symfony-mailer) to find out our application is compatible with Symfony Mailer.
SPO600 - W3
Published: 2022-02-07 17:18:59

In week 3 was time to learn about: 
-	Math
-	 Characters
-	 and strings!
-	Branches, Jumps and Procedures

### About Math

> 6502 Assembly language can perform calculations on binary and decimal mode.

In binary, it will perform the operations on a 8-bite value.
In decimal, the bytes are treated as 2 decimal digits.

The operations are:

-	ADC (Add with Carry)
This will perform the following:  `the value in the accumulator + the specified byte + the carry flag`.

-	SBC (Subtract with Carry)
This will perform the following:  `the value in the accumulator - the specified byte - (not Carry)` 

-	LSR (Logical Shift Right)
This will perform a division by 2.

-	ASL (Arithmetic Shift Left)
This will perform a multiplication by 2.

### About Characters and Strings
In 6502, we can use `dcb` to make a string. Keep in mind that if you want to use `enter` you need to use `$0d` and `32` for space, for example:
```
msg:
dcb "T","y","p","e",32,"a",32,"n","u","m","b","e","r",32,"f","r","o","m",32,"0",32,"t","o",32,"9",":",0
```
The `0` at the end is to control the end of the string.

Having this, we can use `JSR CHROUT` to output the values to the screen.

```
LDY	#$00
nextchar:  ;DISPLAY INITIAL MESSAGE

	LDA msg,Y
	BEQ getnumber
	JSR CHROUT
	INY
	BNE nextchar	
```
--- 
For Input, we can use `CHRIN` to get input from user.
```
getnumber:   ; ACCEPT ONLY NUMBERS

	LDY #$00
	JSR CHRIN

	CMP #$00
	BEQ getnumber

	CMP #$30
	BMI getnumber

	CMP #$39
	BPL getnumber

	JSR CHROUT
```

This code will accept only a number from 0 to 9 from the user.


### Branches, Jumps and Procedures

Branches, Jumps and Procedures are how we can control the flow of our program.
Branches can be used for conditional jumps
For example:
We can use CMP #$00 (Compare to 0) and then BNE branchName (Branch if not equal) or BEQ branchName (branch if eqqual).

Jumps can be used to perform a change in the branch independently of any conditions. 
For Exemple:
JMP done will bring you to the done label.

The procedures will transfer the control to a subroutine.

For example, if you want to execute a subroutine you can:
JSR myfunction

Myfunction: 	…
		RTN

Note that in your subroutine you need to return.

The system have some already pre defined sobroutines:
```
define		SCINIT		$ff81 ; initialize/clear screen
define		CHRIN		$ffcf ; input character from keyboard
define		CHROUT	$ffd2 ; output character to screen
define		SCREEN		$ffed ; get screen size
define		PLOT		$fff0 ; get/set cursor coordinates
```



### This was it for W3

Thank you so much for reading!
[PT-BR] Facilitando telas de loading com Asyncstate no Flutter
Tags: flutter, dart, programming, tutorial
Published: 2022-02-07 17:05:34

Olá amigos, neste artigo vou ensinar a utilizar um package chamado "Asyncstate", cuja finalidade é nos ajudar a chamar telas de loading com extrema facilidade.

Link: [Asyncstate](https://pub.dev/packages/asyncstate)

**O que o "Asyncstate" faz?**
Através de uma "Extension" ou um "Mixin" ... o package inicia sua tela de loading ao mesmo tempo que inicia sua chamada assíncrona, mantendo a tela enquanto a chamada esta em execução e quando finalizada ele fecha a tela de loading para você.

Chega de variáveis do tipo "isLoading =false" ou "isLoading =true" ... rsrs

Vamos aos códigos ...

Importe o package:

```
asyncstate: ^0.0.3
```

Agora no "main.dart" você deve adicionar o "AsyncState.observer" no navigatorObservers:

```
class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      themeMode: ThemeMode.dark,
      navigatorObservers: [
        AsyncState.observer // !!!!!
      ], 
      theme: ThemeData.dark(),
      home: HomePage(),
    );
  }
}
```

Por padrão o package irá utilizar o "CircularProgressIndicator" para android e "CupertinoActionSheet" para iOS. Mas você pode edita-lo e ter o próprio loader, assim:

```
void main() {
  AsyncState.setLoaderPersonalized(
    defaultLoaderWidget: const MyLoading(), // !!!
  );
  runApp(const MyApp());
}    
```

**Dica: Pode alterar o loader em outra dependência de inicialização, por exemplo uma binding.**

Agora em seu arquivo controller ... você pode utilizar Mixin ou Extensões.

**Mixin:**
Envolva sua chamada com a função "callAsyncLoader" fornecida pelo Mixin.
```
class HomeController with AsyncStateMixin {
  
  Future goBack(Function callback) async {
    return await callAsyncLoader(
      Future.delayed(
        const Duration(seconds: 3),
        () {
          callback();
        },
      ),
    );
  }
}
```

**Extensão:**
Adicione a extensão ".asyncLoader()" ao fim de sua chamada.

```
Future<bool> login() async {
    try {
      return await Future.delayed(const Duration(seconds: 3), () {
     return true;
      }).asyncLoader();
    } catch (e) {
      // debugPrint(e.toString());
      return false;
    }
  }
```

**Bônus: (Loading personalizado função.)**
O package permite personalizar um loader para função especifica.

```
 Future<bool> login() async {
    try {
      return await Future.delayed(const Duration(seconds: 3), () {
        return true;
      }).asyncLoader(
          customLoader: const MyCustomLoadingWidget(
        text: 'Sign in! Hold on!!!!',
      ));
    } catch (e) {
      // debugPrint(e.toString());
      return false;
    }
  }
}
```


Pronto, com uma sintaxe simples você não precisa mais se preocupar com suas telas de loading enquanto faz chamadas assíncronas.

Exemplo: [App Exemplo](https://github.com/DevLSerrano/asyncstate/tree/main/example)
Agradeço sua leitura, espero que tenha gostado. 🤩
Best Computer college
Published: 2022-02-07 17:01:58

British Institute faisalabad is one of the [best computer college in Faisalabad](https://britishinstitute.ezyro.com/), that offer all modren and leading languages programmes, like Php, C++, and many more, we have professional teachers who develop students skills.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6p01io35f1l9mkllwl0s.jpg)
Top Reasons to love Next.js 🥰
Tags: javascript, nextjs, react, programming
Published: 2022-02-07 16:54:53

## what is Next.js?
**Next.js** is a React framework for building sites using the JAM stack architecture. JAM stands for Javascript, APIs and Markup. Effectively, it is building sites with Javascript, with data from APIs, which all ends up as simple markup.

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

## Why Next.js loved by most developers?

## Automatic Code Splitting -
code-splitting comes as standard, avoiding that monolithic bundle that might slow down your user’s experience.

![Code Splitting](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5t3o2pljuzumk1xajdl0.png)

## Prefetching -
Next.js also pre-fetches content when it sees links to that content in the viewport. It will only look to fetch prematurely if you have a decent connection.


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

When next.js sees prefetch, it will provide a ServiceWorker for the corresponding route which will load all of the JavaScript behind the scenes.

## Better performance –
Because we’re serving pre-built files (probably from a CDN), we cut out network waiting times which we might have normally associated with websites (such as database calls).

## Security –
Removing the need for servers and databases, and pre-building your pages on deployment reduces the possible avenues for malicious souls to attack your website.

## Scalability –
You can serve your files from anywhere, and if you do so via a CDN, you can deliver as demand dictates.

## Optimise Prime -
Performance is one of those JAM-y benefits which make Next.js such a good choice.

## Server Side Rendering -
Next.js will pre-render static HTML on the server, and deliver that to the user. Which is super fast. 
It allows all of our application code to utilize server side rendering (SSR)

## HMR and Error Reporting -
The effectiveness of Hot-module replacement (HMR) has made it a must-have for the development process. Instead of reloading an entire application when code is changed, HMR will only recreate modules that have been altered.
Users will quickly learn about the error messages that Next.js immediately renders to the browser.

Next.js comes with Webpack set up for you, more or less invisible, and all the while offering all of the goodies that you would want. Asset compilation (Sass), hot reloading, optimisation (code-splitting) and code transformation (for backwards compatibility) are all set up by default.

![webpack](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u33v444wfd57uvnf9tah.jpeg)

To get Started, Run

```
npx create-next-app@latest
```
or
If you're using yarn run
```
yarn create next-app
```



After the installation is complete:

Run npm run dev or yarn dev to start the development server on http://localhost:3000
Visit http://localhost:3000 to view your application
Edit pages/index.js and see the updated result in your browser.

{% youtube LoXJGk9XCLw %}
Why delete code?
Tags: original, shorts, dev
Published: 2022-09-02 20:24:13

---
title: Why delete code?
published: true
date: 2022-02-07 16:54:21 UTC
tags: Original,Shorts,dev
canonical_url: https://blog.pitermarx.com/2022/02/why-delete-code/
---

While it may be necessary to use code to build value on software projects, there are many not so great things that increase the more code we have. Let’s make the **10 commandments of** _**No Code ![™](https://s.w.org/images/core/emoji/13.1.0/72x72/2122.png)**_!

1. _No Code_ has no bugs
2. _No Code_ has no technical debt
3. _No Code_ has no cognitive load on developers
4. _No Code_ builds in no time
5. _No Code_ does checkout in no time
6. _No Code_ makes our tooling faster
7. _No Code_ has 100% code coverage
8. _No Code_ is easier to read than some code
9. _No Code_ scales infinitely
10. _No Code_ is no one’s problem

In the impossibility to write _No Code ![™](https://s.w.org/images/core/emoji/13.1.0/72x72/2122.png),_ let’s simply write less code.  
Let’s only write the minimum code necessary.  
Let’s delete all unnecessary or unused code! <sub>(while keeping all functionality)</sub>
Flask Data Tables - Inline Edit / Docker / Flask-RestX API
Tags: webdev, flask, docker, opensource
Published: 2022-02-07 16:45:07

---
title: Flask Data Tables - Inline Edit / Docker / Flask-RestX API
published: true
description: The project implements paginated access to data using Simple-DataTables, inline edit, toasts notifications and Docker Support.
tags: webdev, flask, docker, opensource
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ttauvep5xaakwb315apt.png
canonical_url: https://blog.appseed.us/flask-data-tables-inline-edit-toast-notification/
---
Hello Coders!

This article presents the latest feature added to an open-source sample that showcases paginated management via [Flask and Simple-DataTables](https://blog.appseed.us/flask-data-tables-inline-edit-toast-notification/) JS Library. The latest version of the product allows `inline-edit` and items deletion via Ajax calls. The users are notified via toasts messages.  The sources, published on Github under the MIT License, can be used in commercial products or eLearning activities.

---

> Thanks for reading! Content provided by [App Generator](https://appseed.us/)

- 👉 [Flask Datatables](https://github.com/app-generator/flask-volt-datatables) - source code
- 🎁 Free [Support](https://appseed.us/support) via email (issues tracker) and [Discord](https://discord.gg/fZC6hup)

---

## ✨ Quick Start

Once the source code is downloaded from Github (public repo), we can see the project in action using the Docker set up shipped with the product:
 
> **Step #1** - Clone/download source code

```bash
$ git clone https://github.com/app-generator/flask-volt-datatables.git
$ cd flask-volt-datatables
```

--- 

> **Step #2** - Start in Docker

```bash
$ docker-compose up --build 
```

The Docker set up create the tables, load sample data, and starts the app using the address `http://localhost:85`.

---

![Flask Data Tables - Inline Edit.](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zvwczgklzyixs35pqvqb.gif)

---

The information becomes editable at `click` and the `ENTER` will confirm the save. If the save operation is successful, the users are notified via a toast message. The same notification behavior happens when a row is deleted.

---

## ✨ Product Features

- 👉 Backend Stack: `Flask`, `Flask-RestX`, SqlAlchemy
- 👉 Frontend: `Bootstrap 5`, Vanilla JS, **Simple-DataTables JS**
- 👉 Multiple Implementations: Via Controller, API, or file loads
- 👉 `Inline Edit` / `Delete` via Ajax Calls
- 👉 `Deployment`:  **Docker**, Nginx/Gunicorn, HEROKU.

---

> `Thanks for reading!` For more resources, feel free to access:

--- 

- ✨ [Free Dashboards](https://appseed.us/admin-dashboards/open-source) crafted in Django, `Flask`, and **React**
- ✨ [Admin Dashboards](https://www.admin-dashboards.com/) - a huge index with products
The Difference Between React State vs Props
Tags: react, javascript, beginners, codenewbie
Published: 2022-02-07 16:39:21

You may have heard the terms "stateful" and "lifting props" thrown around in the community for a while. 

Here's a TL;DR for you:

### **Props** cannot change, but **State** can.

But wait-- what does *that* even mean?

Think of working with polymer clay: the type of clay you can bake to set its shape.

Brands you may recognize are Sculpey, Fimo, or Premo.


![A multi-colored pile of blocks of polymer clay.](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eckonim70g4nh9899ht5.jpeg)

Think of the clay as information; let's say you want to create a figure of your D&D character. You mold the clay to *your* vision, bake it, and paint it. You know how your character looks like: their mannerisms, style-- you don't need anyone else's *input* on how to create your figure. You finish your character piece with confidence. 

This would be an example of a prop: no one else but you influences the look of the figure.

However, if a friend commissions you for a custom D&D character piece, you need to mold and meld it to *their* vision; therefore, you need *their input* which could be changed in the middle of creation: "Pointy ears! Wait, no-- oh! Make them blonde--NO bald--NO! Covered in horns!"

This is an example of state: the *state* of the figure is constantly changing because your friend keeps *changing* their *input*.


![a sculpture of Link from Legend of Zelda](https://cdn.hashnode.com/res/hashnode/image/upload/v1603924644426/LCufAmn04.jpeg)

I keep highlighting *input* because, when dealing with React states, a common element that you will find yourself using state for are **text fields**. That's because you will need *input* from the user to set the information the state will hold! 

Whereas props (fun fact: it's short for "properties") are usually set pieces of information that the dev or client knows about and doesn't need user input to display.

## So, TL;DR: 

* *props* === your character that you designed. No one else but you can change it.

* *state* === your friend's character that you offered to design (and now probably regret because they keep *changing* their mind). It is mutable by the public.


---

## Thanks for reading!!
I hope that wasn't confusing for you! If you have any questions or feedback, feel free to leave a comment below (and I will answer within 24-48 hours) or DM me on Twitter- [@catballar](https://twitter.com/catballar)!
Cloud Computing Advice for Beginners
Tags: cloud, beginners, mentoring
Published: 2022-02-07 16:31:33

### 1. Learn

You can learn from docs, articles, youtube, etc. But you learn by doing and you need to practice. Don't assume that you can spin up that VM because you saw a tutorial. It's when you get your hands dirty that you'd discover that the VMs have changed since the tutorial.

Practicing and doing projects in Cloud Computing is not as cheap as it is in software development where you can install software and IDEs on your computer, and hack away.

For Cloud Computing you'll need an actual cloud subscription and if you don't have the funds for it, you can still make good progress on your journey

Major cloud providers offer a free tier or credits for a limited duration.

[AWS 12 months free tier](https://aws.amazon.com/free/)
[Azure $200 for 30days](https://azure.microsoft.com/en-us/free/)
[GCP $300 free tier](https://cloud.google.com/free)
[Digital Ocean $100 for 60 days](https://www.digitalocean.com/try/free-trial-offer)
[Qwiklabs free credits](https://go.qwiklabs.com/)
[Azure education credits](https://azure.microsoft.com/en-us/free/students/)



### 2. Document your learning, in public

As simple as a 250-word tweet on VMs can spark up conversations that will lead to critical thinking and opportunities.

I know of a friend who takes screenshots of her hands-on practice and saves them in a blog draft to be published later.

Documenting in public could also mean taking part in online accountability schemes such as #100daysofcodechallenge

Sometimes, it's what you document that comes back to bail you out when you're stuck or it becomes your e-book.



### 3. Lookout for cloud computing scholarships

These learning opportunities usually provide (limited) cloud subscriptions and projects to work on, and healthy collaboration with peers who have the same goal as you do.

#### Honorable scholarship mentions:
- @udacity scholarships
- [Google Africa Developer Scholarships x Andela](https://andela.com/alc/google-africa-developer-scholarship-gads/)
- [Google Africa Developer Scholarships x Pluralsight](https://www.pluralsight.com/partners/google/africa/gads-2021)
- [hnginternship](https://twitter.com/hnginternship)



### 4. Apply for a role

Again, you learn by doing! On the job, you'll keep learning and doing. Don't wait until you're done with all the docs and vid tutorials before you start applying, because you'll never be done.

**Bonus** - Interviewing offers a learning opportunity:

- you learn about what employers are looking for
- you get (unbiased) feedback about your skills and employability level
- you fail and learn the lessons

Like any skill, the more you interview the better you get at it. 



#### TLDR
1. Learn
2. Document your learning, in public
3. Lookout for cloud computing scholarships
4. Apply for a role


Follow me on [Twitter @Ileriayooo](https://twitter.com/Ileriayooo) for more on Tech and Opportunities.

If you want to be successful in tech, [here is a simple framework](https://twitter.com/Ileriayooo/status/1490416597596614660).
Day - 1  training at cognizant
Published: 2022-02-07 16:22:20

- Date:07/02/2022
- Day:Monday

Today the internship started at 2pm and ended at 6pm. As it was a first day so it was an induction program. As it began the instructor came up with new idea of introduction with each other as there were more than 800 interns so he picked up students randomly. so, twist was that the person have to say like if he/she likes or his/her favourite colour is blue and suppose his name is Rohan so, he/she have to say that "you can address to me like blue Rohan" and the person next have to remember all of names previously introduced and then speak his/her name like he is blue Rohan and I am this this... soothes way Day 1 ended.