teleren/devto huggingface dataset:
Best Website to Learn Flutter
Tags: flutter, tutorial, programming
Published: 2023-04-07 20:33:16

There is no shortage of places to find Flutter tutorials, but here are a few of the best:

1. [Flutter.dev](https://flutter.dev): If you're interested in learning Flutter, you've come to the right place: the official Flutter website. From the fundamentals of using Flutter to more advanced techniques, such as creating bespoke widgets, it covers it all.

2. [Udacity.com](https://udacity.com): Udacity provides a free course on Flutter development, starting with the fundamentals and ending with the creation of a fully functional app. The course is highly interactive, with quizzes and exercises to help you practice what you've learned, and it's tailored to first-timers.

3. Flutter Crash Course on YouTube: This video series is fantastic for learning the fundamentals of Flutter development. Widgets, layouts, and state management are all covered in this introductory guide.

4. [Raywenderlich](https://www.kodeco.com/): The work of Ray Wenderlich is widely used as a primer for the field of mobile app development, Flutter included. They cover basic to advanced concepts in Flutter, so there's something for everyone.

5. [Flutterflux](https://flutterflux.com/): If you want to learn Flutter by seeing how it's used in the real world, this is the place to go. Concepts Both Simple and Complex are Explained in Detail.

6. [TutorialsPoint](https://www.tutorialspoint.com/index.htm): The fundamentals of Flutter development, such as widgets, layouts, and state management, are all covered in this in-depth guide. It's very user-friendly and made specifically for newcomers.

I really hope this aids you in locating a tutorial that works for you. I hope you have a successful Flutter.learning journey!
Better "cat" Linux Utility Alternative
Tags: linux, syntax, terminal, linuxutility
Published: 2023-04-07 19:54:46

If you're a Linux user, you might be looking for an alternative to the "cat" command that you use to view file contents in your terminal.

In that case, you might want to check out the "bat" utility instead. Unlike "cat," "bat" not only shows you the contents of a file but also highlights syntax and adds line numbers for better readability. Additionally, "bat" offers a range of customization options to help you personalize your output.

Give it a try, and you'll see how it can elevate your command line experience. You might find that once you switch to "bat," you won't want to go back to plain old "cat" again!
Chat GPT Clone with Laravel Inertia and VueJS Full Tutorial
Tags: javascript, vue, laravel
Published: 2023-04-07 19:42:46

Let's build a Chat Gpt clone using Laravel and VueJS.

CloudWays Promo Code: CWT20
Promo Discount: 20% off for three months
Promo Link: https://bit.ly/cloudways-cwt


The Laravel and VueJS Chat Gpt clone YouTube video is a tutorial on how to create a chatbot using Laravel and VueJS. Laravel is a popular PHP framework, while VueJS is a progressive JavaScript framework used for building user interfaces. The tutorial demonstrates how to create a chatbot that can engage in conversations with users, provide responses to queries, and even learn from user interactions. The chatbot is built using the GPT-3.5 language model and is integrated with the Laravel and VueJS frameworks. The tutorial provides a step-by-step guide on how to set up the project, configure the chatbot, and integrate it with the Laravel and VueJS frameworks. By the end of the tutorial, viewers will have learned how to create a powerful chatbot using Laravel and VueJS, and how to integrate it with other applications.

{% embed https://youtu.be/Fp5ti0osAZQ %}
Customize zsh
Published: 2023-04-07 19:14:55


For this, we are going to use [zsh4humans](https://github.com/romkatv/zsh4humans)


So firts, we are going to installit a [nerd font](https://www.nerdfonts.com/) and enabling it in the system for having icons in our terminal
Personally, i like:
- Hack Nerd Fonts
- Ubuntu Nerd Font

Then, we are going to install [zsh4humans](https://github.com/romkatv/zsh4humans) using:

```shell
if command -v curl >/dev/null 2>&1; then
  sh -c "$(curl -fsSL https://raw.githubusercontent.com/romkatv/zsh4humans/v5/install)"
else
  sh -c "$(wget -O- https://raw.githubusercontent.com/romkatv/zsh4humans/v5/install)"
fi
```

Then, we only need to follow the installation

As we want to change from bash to zsh, we should change the main shell in our computer, se we should type this:


```shell
chsh -s $(which zsh)
```

If in the future we want to change back to bash, we should change zsh to bash in the command:
```bash
chsh -s $(which bash)
```

Finally, we are going to install [logo-ls](https://github.com/Yash-Handa/logo-ls)for enabling icons when we do `ls` command

So, pase this command in the shell:

```shell
wget -q https://github.com/Yash-Handa/logo-ls/releases/download/v1.3.7/logo-ls_Linux_x86_64.tar.gz
tar zxvf logo-ls_Linux_x86_64.tar.gz
cd logo-ls_Linux_x86_64/
sudo install -v logo-ls /usr/local/bin/
```

Then, edit the ~/.zshrc for create an alias for ls

```shell
nvim ~/.zshrc
```

```shell
alias ls = 'logo-ls'
```

Then, save the changes using:
```shell
source ~/.zshrc
```
or using
```shell
exec zsh
```



If in some moment, you want to change to another theme of z4h, you can type the next command:

```shell
p10k configure
```
The Software Bug Diplomacy: Fun Story
Tags: bug, software, story, fun
Published: 2023-04-07 18:30:00

Did you know, Australia once recalled its almost entire embassy staff back from Russia ✈️

Not because of any diplomatic issues, but because of a software issue 👇

...

The year was 1999

There was a lot of panic and fear because of the Y2K bug 🪲

It was being speculated that the world would come to a stand still 🌑

The computers will break, the systems will stop running and so on 🌏

The major fear was for the

banking system 🏦
nuclear plants ☢️
airlines industry ✈️ and
communication systems 📡

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

...

If you are not aware, the problem of the Y2K bug was:

During early development of computer systems, memory space was super costly 💾

The scientists wanted the most efficient use of the available memory 💽

One of the method they used was...

For the Date & Time system they used the last two digits of the year instead of total four digits 🗓️

So, they entered 70 instead of 1970

But when the year 1999 approached...

Many feared that after 11:59 PM on 31st December 1999 the computer will increment the year by 1 and...

That means 99 will become 00

And that 00 can be interpreted as 1900 instead of 2000

If that happened, then of course the fear was real 😨

Makes sense? Keep reading.

...


The entire world went crazy 💢

The US, the UK, Australia and others invested huge sums of money to fix the issue 💲

(The solution to the problem was fairly simple though, but more on that later)

But some countries like Italy, South Korea, Russia, didn't invest much to fix the issue

...

🪫 Due to the fear of transportation system collapse and the unavailability communication system...

🇦🇺 Australia called its almost entire 🇷🇺 Russian embassy staff back at home

But there was a twist

...

It came out that, the Y2K bug was not a major problem

All it needed was, memory space be increased to occupy four places instead of two 🤌

Apart for some minor issues worldwide, no major systems were affected


...

As a software developer, many a times a solution to a complex problem is fairly simple 🔑

Just take a break, and come back at it again 🔐

And approach it from a different perspective

...

If you happen to be working on a side idea, do check my previous post
The importance of coding your own CSS
Tags: css, tailwindcss, frontend, nextjs
Published: 2023-04-07 18:14:16

For my last 2 personal projects I really dove into CSS a bit more, some Vanilla, some using TailwindCSS <- which honestly offers great documentation if you just want to learn Vanilla as well.

By developing my own structure and I have been able to have a better understanding of how some of the most frustrating features can be made simple. Flexbox for example, extremely easy to use if you follow its conventions and patterns. 

It is very easy and convenient to use free TailwindCSS component websites or Bootstrap, and to be honest thats where I started but that is also how I really dove into figuring out what all those little lines of code did to my div. 

Structuring your own CSS also allows you to plan ahead for your data structure without having to debug this complex component that was given to you.. <- this gets easier to debug as you learn the syntax of Tailwind, its more of a trail and error learning approach. 

One piece of advice that really helped me was setting a border around the structure you're rendering. <- Proven to be really helpful when managing div structure i.e.

By no means I'm trying to tell you I am a CSS guru but I have been able to have a much more pleasant coding experience. I do most of my styling as I go. This allows me to really get a feel for how the data looks instead of getting all my functionality and then having to refactor all my code to make it look like I want. <- This is where I see most developers frustrated.

My advice:
1. Learn Vanilla CSS, pick one element you want to render across all your project (a button is a good example) and Vanilla that guy!

2. Use TailwindCSS resources; MerakiUI, SailboatUI, & DaisyUI for example are great for quick component libraries, but I challenge you to read and understand the syntax here. This is where CSS is awesome for me. Not having to jump to a .css file to make quick rendering features happen.

Hope you liked this post! 
I am always open for suggestions and constructive criticism, so feel free to drop a comment below 👇
3 Top Features of JavaScript ES6: A Guide for Beginners
Tags: javascript, beginners, webdev
Published: 2023-04-07 18:14:02

{% embed https://youtu.be/lbPHE7u5JbU %}

Welcome back to our JavaScript tutorial for beginners.

In this video, Juan shares his top three features of JavaScript in the new ES6 specification. If you’re new to the language or the new specification, these three features will be helpful to make your code more readable and concise.

## 1. Destructuring Assignment
Destructuring is a convenient way to extract elements from arrays or attributes from objects. It can make your code more readable and concise. Let’s see an example:

```
const arr = [1, 2, 3, 4, 5];

const [item1, item2, ...rest] = arr;

console.log(item1, item2, rest); // 1 2 [3, 4, 5]
```

Here, we use the destructuring syntax to extract the first two items of the array and the rest of the items in a new array. The same syntax can be used to extract properties from an object:

```
const person = {
  name: 'John',
  age: 30,
  city: 'New York',
};

const { name, age, ...other } = person;

console.log(name, age, other); // John 30 { city: 'New York' }
```

## 2. Default Parameters
We can specify default parameters to our functions so that we can have default values for them. This is a pretty convenient way, especially when using TypeScript. Let’s see an example:

```
function greet(name = 'Juan', message = 'Welcome') {
  console.log(`${message} ${name}`);
}

greet(); // Welcome Juan
greet('John', 'Hello'); // Hello John
```

Here, we use the default parameter syntax to set the default values for name and message. If we don't pass any arguments to the function, it will use the default values.

## 3. Template Literals
Template literals provide an easy way to create strings with embedded expressions. It just makes it easier to concatenate data. Let’s see an example:

```
const name = 'John';
const message = `Welcome ${name}`;

console.log(message); // Welcome John
```

Here, we use the template literal syntax to create a string with an embedded expression. This is a more concise way to concatenate strings than using the + operator.

In conclusion, these are the three top features of JavaScript in the new ES6 specification. They are simple to use and can speed up your coding. Juan recommends using these features in your everyday coding. Thank you!
Installing diesel_cli on OpenSUSE Tumbleweed
Tags: rust, opensuse
Published: 2023-04-07 18:06:50

I recently ran into some issues installing [diesel_cli](https://diesel.rs/) on openSUSE. I wanted to use the package with `postgres` only so I tried entering the following command from their getting started page:
```bash
# The package that is required according to the docs
zypper install libpq5
cargo install diesel_cli --no-default-features --features postgres
``` 
Then I get met with this fun error message:
![Image of errors in a terminal.](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l2ysy01vqiyo5wk1oyrm.png)
The last few lines are of interest:
```bash
= note: /usr/lib64/gcc/x86_64-suse-linux/13/../../../../x86_64-suse-linux/bin/ld: cannot find -lpq: No such file or directory
          collect2: error: ld returned 1 exit status
```
I started just installing all packages that I could find using `zypper search` that related to postgres and tried the installation process of `diesel_cli` after each one. Eventually, after much trial and error I found the missing package:
```bash
sudo zypper install ghc-postgresql-libpq-devel
```
After installing this I was able to build `diesel`.
FREE AWS Cloud Project Bootcamp Week 6 Part 5
Tags: aws, cloud, awscommunity, 100daysofcloud
Published: 2023-04-07 17:56:22

[97/100] #100DaysOfCloud Today, I did a part of the Week 6 of the FREE AWS Cloud Project Bootcamp by Andrew Brown.

Here's what was left that I completed:
- Create Services for backend that includes Service Connect.
- Update RDS SG to allow access for the ECS security group.
- Install Sessions Manager Plugin.
- Connect to the ECS container cluster using Sessions Manager (Fargate).

By completing these, I have completed the backend portion of deploying the container.

[GitHub](https://github.com/aaditunni/100DaysOfCloud/blob/main/Journey/097/Readme.md)

You can watch the Bootcamp through this YouTube playlist : [FREE AWS Cloud Project Bootcamp playlist](https://youtube.com/playlist?list=PLBfufR7vyJJ7k25byhRXJldB5AiwgNnWv)
Part 2: From OOP to FP...
Published: 2023-04-07 17:35:55

Its been 3 weeks since my last post. It's been 3 weeks of full immersion into Elixir and Phoenix LiveView.

I had 3 weeks to learn the basics of Elixir and Phoenix LiveView to get my capstone project done. I decided to create a Chat App with the intention of showing; Elixir's efficiency in code writing and the benefits of data immutability, Phoenix WebSockets and LiveView!! I didn't write a single line of JavaScript code for this project.

heres the repo if you want to check it out: 
https://github.com/tfnielson-se/LiveWave
Elixir 1.14.3
Phoenix 1.7
LiveView 0.18

Having everything done in the same environment was extremely efficient instead of having to communicate between different languages such as Ruby on Rails with React, fetching my own data seems odd to me now. Instead I used Ecto, another library offered by the Elixir environment with takes care of database management, really easy to learn and use.

I recommend everyone to learn Elixir and Phoenix. The principals of Functional Programming are used in OOP constantly specially with data immutability. We quickly learn that we want to use non-destructive methods to manipulate data and thats made easy with Elixir, I call it a no brainer.

Another great factor which helped me during my transition was the amazing and well written documentation. I have yet to find another programming language that offers such extensive and clear doc.

My main takeaway from this project was not adding another language to my belt. I am way more proud of the fact that I can learn anything I set my mind to and that I can understand the logic behind code.
KCIT Symposium (2023)
Tags: laravel, techtalks, leadership
Published: 2023-04-07 17:10:21

Well... that's a wrap to the 2023 KC IT Symposium! 🔥

We were able to meet some great #tech leaders in Kansas City, hear from some incredible speakers, and give away an Apple Watch all in a single day! You can't ask for much more than that! Thank you to everyone who came by our booth, and we hope to chat with you again soon. 🤝

A special shoutout to our good friend, Gary Payton, and his team at EFM Events putting on another incredible event. We already can't wait for next year‼️ 🔥

We do event all the time, we want to meet everyone! Visit our website for more info!

[Active Logic](https://activelogic.com)

#laravel #vuejs


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/02eu4jdqsjfkqb35emg1.jpeg)


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ek8jyx3chqargtejgp69.jpeg)


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0o2qbumskjo0air9ky1t.jpeg)
pyaction 4.18.0 Released
Tags: github, docker, python, showdev
Published: 2023-04-07 17:07:38

## TL;DR

I just released [pyaction](https://github.com/cicirello/pyaction) 4.18.0, a [Docker container with Python, git, and the GitHub CLI](https://dev.to/cicirello/pyaction-a-docker-container-with-python-git-and-the-github-cli-930).


## Changelog 4.18.0 - 2023-04-07
  
### Changed
* Bumped Python to 3.11.3.
* Bumped GitHub CLI to 2.26.1.


## Current Version List

This latest release of pyaction includes:
* Python 3.11.3
* [GitHub CLI 2.26.1](https://github.com/cli/cli/releases/tag/v2.26.1)
* git 2.30.2
* curl 7.74.0
* gpg 2.2.27



## More Information

For more information, see my earlier post about pyaction here on DEV, as well as pyaction's GitHub repository.

{% link https://dev.to/cicirello/pyaction-a-docker-container-with-python-git-and-the-github-cli-930 %}

{% github cicirello/pyaction %}



## Where You Can Find Me

Follow me [here on DEV](https://dev.to/cicirello) and on [GitHub](https://github.com/cicirello):

{% user cicirello %}

Or visit my website:

{% embed https://www.cicirello.org/ %}
🚀 Level Up Your Rust Skills: Master State Management with a Brilliant Tip! 🤓💡
Tags: rust, tutorial, productivity, discuss
Published: 2023-04-07 17:04:00

Hey there, Rustaceans! 😄 Today, I'm going to share a fantastic tip for handling states in Rust. This little trick will help you level up your Rust skills and make your code even more elegant!

In Rust, you can define an enum for various application states and associated data like this:

```rust
enum CurrentState<'a, T> {
    Loading,
    Success(&'a T),
    Error(&'a str),
}
```

To create a method that executes different closures for each state, define a trait with a method that takes three closures as arguments:

```rust
trait DuringCurrentState<'a, T> {
    fn during_current_state(
        self,
        loading: impl FnOnce() + 'a,
        success: impl FnOnce(&T) + 'a,
        error: impl FnOnce(&str) + 'a,
    );
}

impl<'a, T> DuringCurrentState<'a, T> for CurrentState<'a, T> {
    fn during_current_state(
        self,
        loading: impl FnOnce() + 'a,
        success: impl FnOnce(&T) + 'a,
        error: impl FnOnce(&str) + 'a,
    ) {
        match self {
            CurrentState::Loading => loading(),
            CurrentState::Success(data) => success(data),
            CurrentState::Error(message) => error(message),
        }
    }
}
```

Now, you can call the during_current_state method on an instance of the CurrentState enum and pass closures for the loading, success, and error cases:

```rust
let state = CurrentState::Success(&["one".to_owned(), "two".to_owned(), "three".to_owned()][..]);

state.during_current_state(
    || {
        println!("loading...");
    },
    |data| {
        println!("success: {:?}", data);
    },
    |message| {
        println!("error: {:?}", message);
    },
);
```

And there you have it! This handy trick will make your state management in Rust more elegant and efficient. Try it out in your projects and let me know what you think! 🌟 Don't forget to comment, like, and follow for more amazing Rust tips! 🚀
포스팅 테스트입니다.
Published: 2023-04-07 17:00:08

포스팅 테스트입니다.
포스팅 테스트입니다.포스팅 테스트입니다.
포스팅 테스트입니다.포스팅 테스트입니다.포스팅 테스트입니다.
포스팅 테스트입니다.포스팅 테스트입니다.포스팅 테스트입니다.포스팅 테스트입니다.
Hackerrank-Kangaroo Solution in Kotlin
Published: 2023-04-07 16:57:44

You are choreographing a circus show with various animals. For one act, you are given two kangaroos on a number line ready to jump in the positive direction (i.e, toward positive infinity). 

- The first kangaroo starts at location x1  and moves at a rate of v1  meters per jump.

- The second kangaroo starts at location x2 and moves at a rate of  v2  meters per jump.

You have to figure out a way to get both kangaroos at the same location at the same time as part of the show. If it is possible, return YES, otherwise return NO.

**Example**
_x1=2
v1=1
x2=1
v2=2_

After one jump, they are both at x=3,(x1+v1=2+1,x2+v2=1+2)so the answer is YES.

**Function Description**

Complete the function kangaroo in the editor below.

kangaroo has the following parameter(s): 
-   int x1, int v1: starting position and jump distance for kangaroo 1
-   int x2, int v2: starting position and jump distance for kangaroo 2

**Returns**

-   string: either YES or NO

**Input Format**

A single line of four space-separated integers denoting the respective values of x1,v1,x2  and v2

**Constraints**

0<x1<x2<10000
1<v1<10000
1<v2<10000

**Sample Input 0**

```
0 3 4 2
```
**Sample Output 0**

```
YES
```
**Explanation 0**

The two kangaroos jump through the following sequence of locations:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tke2z76so4xdchzfkfw7.png)
From the image, it is clear that the kangaroos meet at the same location (number 12 on the number line) after same number of jumps (4 jumps), and we print YES.


**Sample Input 1**

```
0 2 5 3
```
**Sample Output 1**

```
NO
```
The second kangaroo has a starting location that is ahead (further to the right) of the first kangaroo's starting location (i.e., x1>x2) Because the second kangaroo moves at a faster rate (meaning v2>v1)and is already ahead of the first kangaroo, the first kangaroo will never be able to catch up. Thus, we print NO. 

## Solution :

```
fun kangaroo(x1: Int, v1: Int, x2: Int, v2: Int): String {
    var start_k1 = x1+v1
    var startt_k2 = x2+v2
    var answer =0
    
     if(v1!= v2){
         var v = Math.abs(v2-v1)
         answer = (startt_k2-start_k1)%v
     } 
 
     if (v1<v2 || answer!=0 ||v1==v2){ 
         return "NO"
     }
       else{
          return "YES"
       }
   }

fun main(args: Array<String>) {
    val first_multiple_input = readLine()!!.trimEnd().split(" ")

    val x1 = first_multiple_input[0].toInt()

    val v1 = first_multiple_input[1].toInt()

    val x2 = first_multiple_input[2].toInt()

    val v2 = first_multiple_input[3].toInt()

    val result = kangaroo(x1, v1, x2, v2)

    println(result)
}
```