teleren/devto huggingface dataset:
How to Display Current DateTime in Flutter - fluttercorner.com
Tags: flutter
Published: 2020-10-12 17:10:15

Hello Guys How are you all? Hope you all are fine. Today We are going to learn How to Display Current DateTime in Flutter?

Many Times We have to display Current Date time with date, month, year, hours, minutes and second, with real time clock in flutter. in very easy way we are going to learn in this tutorial a=here. so without wasting your time lets start this tutorial.

How to Display Current DateTime in Flutter
How to Display Current DateTime in Flutter?
First of All Import material.dart, async, and intl Package in your main.dart file.

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

Then, Create void main and Define MyApp in your runApp.

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

Now, Create a class named MyApp extends with a Stateless widget. This is our main View class. and define

```
class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  Widget build(BuildContext context) {

  }
}
```

Then, After making Scaffold in MyApp Widget. The scaffold is the Base of every flutter apps, Scaffold provides app bar, background color, drawer, body, bottom sheet, etc.
We need a center widget in our body so add the Center widget in the body.
```
class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: Text('Display Current DateTime - Fluttercorner'),
        ),
        body: Center(),
      ),
    );
  }
}
```

Now Define DateTime String name that you want to display.

Full Article Is At Here Take a look <a href="https://fluttercorner.com/how-to-display-current-datetime-in-flutter/"> https://fluttercorner.com/how-to-display-current-datetime-in-flutter/ </a>
What is a JSON Web Token?
Tags: webdev
Published: 2020-10-12 17:09:02

What is a Json Web Token(JWT)? It is used for Authorization and makes sure that the User who sends a request to an app is the same person as the person who has logged in before. It can be used as an alternative to Sessions. This is how it works:

1. The user tries to login
2. The server checks if the login data is correct, and if so, it creates a JWT (signed with a secret key) and sends it back to the user
3. The user sends another request with the JWT
4. The server checks if the JWT is correct and the user is allowed to access that resource. If yes, it sends the response with the desired info to the user

The JWT doesnt get stored on the server side it always applies its algorithm to check it on the fly. If you want to learn more, check out this video: https://www.youtube.com/watch?v=7Q17ubqLfaM&feature=youtu.be
Drawing Frankenstein's Monster with CSS
Tags: codepen, showdev, html, css
Published: 2020-10-12 17:04:49

---
title: Drawing Frankenstein's Monster with CSS
published: true
description: New cartoon as part of the 100 days of CSS Illustrations challenge: Frankenstein's Monster.
tags: codepen,showdev,html,css
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/fyokjyxlilssbzc35bpx.png
---

Another Halloween-themed illustration done with HTML and CSS. If yesterday it as a [little Grim Reaper](https://codepen.io/alvaromontoro/full/JjKdJbY), today it is Frankenstein's Monster:

{% codepen https://codepen.io/alvaromontoro/pen/ExyjJbm %}

While coding it, I realized that it started looking more like the Hulk and less like Frankenstein's monster... I almost changed direction halfway and go with the superhero approach instead of the monster, but I didn't.

The whole drawing process took around one hour. Here there's a 3-minute video of how it was done (at 20x):

{% youtube 5-8ds36hlK0 %}

A couple of things to do before the next illustration: practice repeating gradients in CSS (had some trouble with them for the stitches, opted for a regular gradient), and revisit Flex (I got confused with `align-items` and `justify-content`.)
Is it worth to cross-post on Medium in 2020?
Tags: webdev, discuss, career, beginners
Published: 2020-10-12 16:45:28

---
title: Is it worth to cross-post on Medium in 2020?
published: true
description: 
tags: webdev, discuss, career, beginner
cover_image: https://www.solstice.us/wp-content/uploads/2018/06/1J-PcIDrkewUmwrTZuJIIJA-1600x800.jpeg
---
Lately, I've seen people prefer to post here on [DEV](https://dev.to), personal blogs, and targeted platforms like [Hashnode](https://hashnode.com).

What is your experience of using [Medium](https://medium.com) as a blogging platform?
What engagement levels have you experienced there? Is it worth to cross-post on Medium to get a wider reach?
What search engines have you used in your apps?
Tags: webdev, discuss, ux, search
Published: 2020-10-12 16:23:16

---
title: What search engines have you used in your apps?
published: true
description: 
tags: webdev, discuss, ux, search
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/7nn8s33ancom699u4wlr.png
---
Search is something that almost any site or app with more than a few pages can benefit from. It’s important that the user can find the information quickly and easily without having to wait.

Some of the commonly used engines include [Algolia](https://www.algolia.com/), [ElasticSearch](https://www.elastic.co/) and [Solr](https://lucene.apache.org/solr/).

Which ones have you used and what would you recommend for high-performance and great user experience?
The DRUG of online tutorials
Tags: javascript, beginners, webdev
Published: 2020-10-12 15:58:47

---
title: The DRUG of online tutorials
published: true
date: 2020-10-12 15:58:00 UTC
tags: javascript, beginners, productivity, webdev
canonical_url: https://dglsparsons.github.io/posts/the-drug-of-online-tutorials/
cover_image: https://dglsparsons.github.io/img/remote/drugs.jpg
---

Have you ever felt like you're stumbling in the dark trying to learn a new concept? Like you know where you're trying to get to, but absolutely no idea how to get there?

This is an incredibly common feeling when learning about technology. The field is MASSIVE. It's ludicrously complicated. And to make matters even more difficult, it seems to be changing every few months.

This makes programming tricky to get started in. You have no idea what you should be looking for, what to Google, or how to find information about what you want to learn. At the same time, any information you do find doesn't seem to be trustworthy or dependable. You find a JavaScript article from 4 years ago, but when you apply what it says, people say you're doing it wrong, or "nobody does it like that anymore". Looking on Stack Overflow, all the answers point to jQuery. But nobody has used that since 2015. You feel lost.

The natural reaction is to reach for tutorials. These will hold your hand, and guide you to the promised land of programming literacy. Just study this course on Udemy. Just watch this video on YouTube. Just learn these few things. Then, you'll be set for a lucrative career in software.

**They hook you in like a drug.**

You spend hours finding the right videos to watch. The right course to buy. The right guides to follow online. You think you're understanding as you watch someone build an application using the skills you'd always hoped for.

And when you're done? You sit down. You think you know more than when you started (because, well, you do). But you still have no idea how to get started. You're still stumbling in the dark. You still have no idea how to get to where you want to go.

The solution? More courses. More learning. It's all a lie. It's not the way to learn. It's a way to waste your time spinning, getting nowhere.

All courses fall into the same trap. They sell you a dream and hook you in like a drug. But they DON'T teach you the skills you need to succeed on your own. They keep you hooked because of this.

What's the solution? Come up with ideas of projects to build. It's tricky I know! Stumble in the dark. Find a mentor who can shine light where you need it. Contribute to open-source projects. Take part in Hacktober. Do Advent of Code when it's Christmas.

But most importantly, enjoy your time there. Enjoy being blind. Enjoy every day being an adventure. Every day being a challenge. Learning new things until your brain hurts. Because this is what learning is about. And being a good programmer is about learning.

</p><p>Thanks for reading. If you enjoyed this article, please share or   <a href="https://twitter.com/intent/follow?screen_name=dglsparsons" target="_blank" rel="noopener">follow me on twitter.</a></p>
Guess the number
Tags: python, beginners
Published: 2020-10-12 15:54:58

```Python
from random import randint

secret_number = randint(0, 10)  # guess number between 0 to 10 (including)
guess_count = 0

try:
    while True:
        user_number = int(input('Guess the number: '))
        guess_count += 1

        if user_number == secret_number:
            print('Correct')
            print('Your guess count:', guess_count)
            break
        elif user_number > secret_number:
            print('Your number is greater than the secret number.')
            continue
        elif user_number < secret_number:
            print('Your number is less than the secret number.')
            continue
        else:
            print('Invalid')
except ValueError:
    print('Please enter integer only.')

```
The Web History podcast
Tags: web, history, podcast, narration
Published: 2020-10-19 11:03:54

---
title: The Web History podcast
published: true
date: 2020-10-12 15:51:57 UTC
tags: web,history,podcast,narration
canonical_url: https://adactio.com/journal/17509
---

From day one, I’ve been a fan of Jay Hoffman’s project [<cite>The History Of The Web</cite>](https://thehistoryoftheweb.com/)—both the newsletter and [the evolving timeline](https://thehistoryoftheweb.com/timeline/).

Recently Jay started publishing [essays on web history over on CSS Tricks](https://css-tricks.com/category/history/):

1. [Birth](https://css-tricks.com/chapter-1-birth/)
2. [Browsers](https://css-tricks.com/chapter-2-browsers/)
3. [The Website](https://css-tricks.com/chapter-3-the-website/)
4. [Search](https://css-tricks.com/chapter-4-search/)

Round about that time, [Chris](https://chriscoyier.net/) floated the idea of having people record themselves reading blog posts. I immediately volunteered my services for the web history essays.

So now you can listen to me reading Jay’s words:

1. <audio src="https://adactio.s3.amazonaws.com/audio/narration/web_history/Chapter_1_Birth.mp3" controls></audio> [Birth](https://adactio.s3.amazonaws.com/audio/narration/web_history/Chapter_1_Birth.mp3)
2. <audio src="https://adactio.s3.amazonaws.com/audio/narration/web_history/Chapter_2_Browsers.mp3" controls></audio> [Browsers](https://adactio.s3.amazonaws.com/audio/narration/web_history/Chapter_2_Browsers.mp3)
3. <audio src="https://adactio.s3.amazonaws.com/audio/narration/web_history/Chapter_3_The_Website.mp3" controls></audio> [The Website](https://adactio.s3.amazonaws.com/audio/narration/web_history/Chapter_3_The_Website.mp3)
4. <audio src="https://adactio.s3.amazonaws.com/audio/narration/web_history/Chapter_4_Search.mp3" controls></audio> [Search](https://adactio.s3.amazonaws.com/audio/narration/web_history/Chapter_4_Search.mp3)

Each chapter is round about half an hour long so that’s a solid two hours or so of me yapping.

Should you wish to take the audio with you wherever you go, I’ve made [a podcast feed](https://adactio.s3.amazonaws.com/audio/narration/web_history/podcast.xml) for you. Pop that in your podcatching software of choice. [Here it is on Apple Podcasts](https://podcasts.apple.com/gb/podcast/web-history/id1535003098). [Here it is on Spotify](https://open.spotify.com/show/0vR1DIKcA0DH8904tAOHSd).

And if you just can’t get enough of my voice, there’s always [the Clearleft podcast](https://podcast.clearleft.com/) …although that’s mostly _other_ people talking, thank goodness.
Geospatial Data: A New Dimension for .NET
Tags: csharp, dotnet, sql, database
Published: 2020-10-12 15:49:00

---
title: Geospatial Data: A New Dimension for .NET
published: true
description: Joe Amenta joins us to discuss how to add spatial data to your applications to open a world of new relationships between data. He will demonstrate the "status quo" for querying spatial data from .NET Core and demo integrations with NetTopologSuite and EF Core.
tags: csharp, dotnet, sql, database
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/ug4lpoxmy22w506b6yk7.jpg
---
Geospatial data refers to any data that represents a location on earth. A traditional relational database model might associate a café with a park using a relational table. What if instead you could store the coordinates of the café along with the coordinates and shape of the park and use geospatial logic to determine their relationship?

In this episode of the [EF Core Community Standup](https://www.youtube.com/playlist?list=PL1rZQsJPBU2Ry_KbYPklhVu0JhP0kOFbj), the team talks with Joe Amenta who demos the spatial (GIS) library [NetTopologySuite](https://github.com/NetTopologySuite) and shows how to use EF Core with SQL to add a new dimension to your app.

{% youtube IHslY5rrxD0 %}

You can find the links that were discussed in the show at:

[https://www.theurlist.com/efcore-standup-2020-09-30](https://www.theurlist.com/efcore-standup-2020-09-30).

Have feedback for the EF Core team? [File an issue](https://github.com/dotnet/efcore/issues/new) or share your feedback and suggestions.
100 DaysOfCode | Day 52, 53
Tags: python, beginners, 100daysofcode, challenge
Published: 2020-10-12 15:48:53

▄█ █▀█ █▀█ █▀▄ ▄▀█ █▄█ █▀ █▀█ █▀▀ █▀▀ █▀█ █▀▄ █▀▀
░█ █▄█ █▄█ █▄▀ █▀█ ░█░ ▄█ █▄█ █▀░ █▄▄ █▄█ █▄▀ ██▄

Hey everyone, I wanna share my experience about these 2 days!

It was a little bit hard when I took a rest and coming back after it, but it's so much fun!
I'm still working on my web application, fixing bugs and developing the backend of the website!

Trying hard to push myself to learn Flask!
Keep it up
Happy Coding


#Keep Moving Forward ツ

##Enjoy Your Journey 👊

##Code with 💛

__🅑🅐🅝🅙🅘__
Let's do a quick introduction to rust
Tags: rust
Published: 2020-10-12 15:44:33

---
title: Let's do a quick introduction to rust
published: true
description: In this video i will do a quick introduction to rust and introduce some important concepts that rust uses to handle packages and build your executables. Rust is a programming language that have been hyped since it's introduction. It mixes good structure with execution performace, type safety and memory management.
tags: rust
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/7nu8c9pfcp4vs1dfws9s.jpg
---

{% youtube XmKbAUX6dVA %}

In this video i will do a quick introduction to rust and introduce some important concepts that rust uses to handle packages and build your executables. Rust is a programming language that have been hyped since it's introduction. It mixes good structure with execution performace, type safety and memory management.
5 reasons for Linux
Tags: operatingsystems
Published: 2020-10-12 15:43:07


Hi, today I want to share a few reasons for why you should check out Linux, especially if you are a programmer:

1. Open Source 🐧
Linux is completely open source, its free and you can have a look at all of the source code. If you want you can become part of the Linux developer community and contribute to it with your own code. If there are any issues, these normally quickly get fixed because of the high number of people involved.

2. Security 🔒
Compared to Windows 10 Linux is a safer Operating System. Also there are only few attacks on Linux anyway, because only about 2% of the users use Linux on their Desktops or Laptops.

3. Programmer friendly 👩‍💻
Linux is made for programmers by programmers and you dont need to tinker around that much to get developer related applications/IDEs etc. running. You can decide when and which updates you want to install.

4. Choose your distribution 🎨
Linux offers a wide range of distributions, like Linux Mint, Ubuntu, Debian,… so you are able to choose the one that fits best your needs. Also you have a lot more customizability options than on Windows, like for example for your user interface.

5. Resource friendly ⚡
Linux can use less resources than other Operating Systems and runs on new and old computers. On my desktop I have Windows and Linux and my PC is more silent running on Linux.

If you want to get started with Linux, check out my video:
[![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/k1paidxxtem9js8o60at.jpeg)](https://youtu.be/gxrSIudUTv0)

What do you like most about Linux? Have a nice day!☀😎
Error handling in Fetch vs Axios
Published: 2020-10-12 15:41:16

There's so much difference between Fetch and Axios but my focus is on error handling because it caught my attention in my previous project.

Error handling is an essential part of every application we build thus needs to be done correctly.

From the fetch documentation on [the difference between Fetch and JQuery](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API#Differences_from_jQuery), it shows how fetch handles errors differently but I don't think everyone knows about that because tutorials don't talk about that.

## The issue

I think there's a good reason to why **Fetch** handles request failures the way it does but most devs including me usually forget to handle the result.
From the [docs](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API#Differences_from_jQuery) :

_"The Promise returned from `fetch()` won’t reject on HTTP error status even if the response is an HTTP 404 or 500. Instead, it will resolve normally (with `ok` status set to `false`), and it will only reject on network failure or if anything prevented the request from completing."_

But this may be a problem is some case because in forms for instance, when the wrong data is sent to the server, we expect the attempt to fail. We may have a validation function and inside that function, if there's a success response we'd redirect the user or store the data.

## The solution

In **Axios**, if there's request failure, it throws an error and you can easily handle the error with a `try-catch` block and get the error data from `error.response.data`.

In **Fetch**, if we have;

```js
const res = await fetch(api);
const data = await res.json();
```

then, we can handle the result with;

```js
if (!res.ok) {
  error = data;
  return null;
}

return data; // Do something with data if successful
```
## Conclusion

You can check an example code on my [gist](https://gist.github.com/Dchole/1f80d929b8f377fe5b09ee03b4a20108) or on [codepen](https://codepen.io/gameshaker/pen/oNLXOOP) illustrating the error handling in both **Fetch** and **Axios**

<span>Cover Photo by <a href="https://unsplash.com/@markusspiske?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText" class="">Markus Spiske</a> on <a href="https://unsplash.com/s/photos/data?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></span>
Calling Python from R
Tags: python, rprogramming, datascience, machinelearning
Published: 2020-10-12 15:41:08

There is a constant debate regarding the best tool for data science and machine learning between R and Python. I feel both of them have their pros and cons and it really depends on the task at hand, the requirement from a client in case of a project or just personal likeness for a developer/coder.

We will not get into a debate about the best tool in the market. Rather what I want to discuss is about using both of them together. 
Why use one, when we can get *Best of Both the worlds*.

The library used in R to connect to Python is **reticulate**.
In case you have never worked with reticulate earlier, you will not have in the package library of R. It needs to be installed. This can be done by writing
`install.packages(reticulate)`
The library can be loaded by using the function given below once it is successfully installed.
`library(reticulate)`

In order to run any script of python from R we will use the functions `source_python()` and `py_run_file()`.

The first function makes the objects created available in the R environment. The second function creates a *py* object which allows to access the other objects created by calling the python script. It creates a dictionary (type of a variable in python) associated with code execution.

For example if we have a script *abc.py*, then this can be run by using the function `source_python('abc.py')`. In case the script consists of some function *xyz(p,q)*, where p and q are the arguments being passed to the function xyz. After the script is sourced this function can be directly called in R.

This package is very powerful and has other functions for making the integration between Python and R easier. In case you want to know about the other functions available in the library, refer to the [Link](https://cran.r-project.org/web/packages/reticulate/reticulate.pdf) 
I hope this proves helpful in case you are trying to call Python scripts from R and take advantage of the strengths of Python from within R.
Dare to take the Red Pill
Published: 2020-09-20 10:38:30

Have you ever felt that, there are never ending problems in our life. Almost like the world is against you. Something is stopping us to realise the true happiness or the real truth. We are always planning for the next moment but never really reach there. Everyone around you is trying to tame you, trying to slow you down, rejecting your ideas, keeping you waiting, trying to waste your time. Then you are not alone. Many of us feel the same. There is some secret hidden in the world. The world is not as it seems. Someone don’t want us to realise the real truth. They want us to be get stuck in the web of **Maya**.


Let’s talk about Maya. In Hindi it is **Maya** or **The Matrix**. If you have seen the movie Matrix, you either think that, it is just another action movie, or you have connected with the character of Neo at some deeper level. How he was looking for the truth. Because he knew there was something wrong with the world. And then when he finally realised his true identity, and defeated all the [**Agents**](https://en.wikipedia.org/wiki/Agent_(The_Matrix)). And this is all an illusion, he finally wakes up.

Aren’t we all Neo, waiting to wake up ?

My latest belief or theory about Maya is inspired from this [video](https://www.youtube.com/watch?v=vjsgJ5-i6Tk). The video is in Hindi. The gist of the video is that the world is an illusion and we have forgotten our true purpose here. At the end of our life, we all have to go back to the source or God (if you may say).

Now why would God or someone create this illusion of the world to trap us here. I think that God has sent us here to make us learn something. We will keep repeating this cycle of birth and death, till we have realised the real truth. Or as they say in Hinduism, that it is our Karmas from our previous life that lead us to the next birth. And till the time all our Karma are not resolved, we will keep coming to this world to learn and repay all our Karmic debts.

The same thing is told, in some movies. You have to see some of the movies and shows in order to understand the context here. Here I’m listing some of them. I would highly recommend to watch them.

[The Truman Show](https://en.wikipedia.org/wiki/The_Truman_Show)
[The Matrix](https://en.wikipedia.org/wiki/The_Matrix)
[Hang the DJ](https://en.wikipedia.org/wiki/Hang_the_DJ)
[Eternal Sunshine of the Spotless Mind](https://en.wikipedia.org/wiki/Eternal_Sunshine_of_the_Spotless_Mind)

P.S. I’m on this parallel spiritual path. I know i haven’t reached the final destination yet. But i know it exists and if are on a similar journey. Let’s connect.