teleren/devto huggingface dataset:
Overcome being overwhelmed
Tags: productivity, time
Published: 2021-05-16 14:16:16

From time to time we all may experience being overwhelmed. It doesn't even need to be a burnout. You just feel like you have too much on your plate, not enough time and energy. It could be a big complicated task you are working on or many smaller things you need to do that weighs you down. The mere thinking about it is exhausting. There are ways to overcome this, however.

The first and the most effective countermeasure is **offloading** it from your brain. You don't need to worry about it constantly as this is a waste of your mental energy. Simply **write it down** somewhere visible. Once it is there, your mental resources are freed and can be used to actually get things done.

Now if you are working on a big task, often you get overwhelmed by many different smaller things you need to do to finish it. I found it very effective to **break that big task into small pieces** while writing it down. The smaller tasks should not be divisible, so they would not require your memory to be used to remember what still needs to be done. So, the technique is to write down all the steps necessary to complete the bigger tasks and simply do them from top to bottom one by one. If you find that there are more things to do, just add to the list, but finish what you started first.

This should already be enough to get you going but **don't overwork**. Rest is very important. No amount of techniques will help if you are simply too tired. Get a good night of sleep, eat well, and have regular breaks. Some find [the Pomodoro technique](https://en.wikipedia.org/wiki/Pomodoro_Technique) helpful to remain productive throughout the day. However, your body will tell you when it's time for a break, you just need to listen. And when you do, step away completely from what you do to reset. Go outside, talk with your spouse, play with your pet, etc. Usually, this is the time when solutions unexpectedly come to your mind.

Overcoming being overwhelmed is possible. Offload as much as possible, break it down into smaller manageable pieces, and make sure you are well-rested. Good luck! 🙂
Java Source File
Published: 2021-05-16 14:11:51

ไฟล์ที่ใช้เขียน code ภาษา java นั้นเรียกว่า java source file โดยจะใช้ extension เป็น .java เช่น example.java
ภายใน source file จะมี class เป็นส่วนประกอบซึ่งมีได้มากกว่า 1 class
![Source file model](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kp7275oavbrn6oyvva5m.png)แต่โดยปกติแล้วใน 1 source file จะมีแค่ 1 class เท่านั้น


### Compile Source File
การ compile เราจะใช้คำสั่ง `javac example.java` หลังจาก compile จะได้ binary file ตามจำนวนของ class ใน source file และ binary file จะใช้ชื่อเดียวกับชื่อ class และมี extension เป็น .class
![Compile Model](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/evofary3a5aj3cplrj0x.png)

### Run java
หลังจากที่ compile แล้วเราจะได้ binary file ซึ่งเราจะ run binary file โดยใช้คำสั่ง `java binaryfile` โดยไม่ต้องใส่ extension file 
__________
### ตัวอย่าง
`File.java`
```java
class Class1{
	public static void main(String[] args) {
		System.out.println("Main1");
	}
}

class Class2{
	public static void main(String[] args) {
		System.out.println("Main2");
	}
}
```

#### Compile
```
>javac File.java
```
หลังจาก compile File.java จะได้ `Class1.class`, `Class2.class`
#### ทดสอบ run
```
>java Class1
Main1
>java Class2
Main2
```
Gradle precompiled script with kotlin("jvm")
Tags: kotlin, gradle
Published: 2021-05-16 14:05:18

## My recent problems
So going right into details, recently I wanted to learn a bit of gradle and create precompiled script plugin for my kotlin modules to share dependencies, jvmTarget, repositories, plugins etc. 
I tried to add folowing block to script:
```kotlin
plugins {
    kotlin("jvm") version "1.5.0"
}

dependencies {
    kapt(/*some dependency*/)
}

tasks.withType<KotlinCompile> {
    kotlinOptions.jvmTarget = "13"
}

// other things
```
And I was greeted with following message
```
Plugin requests from precompiled scripts must not include a version number. Please remove the version from the offending request and make sure the module containing the requested plugin 'org.jetbrains.kotlin.jvm' is an implementation dependency of project ':buildSrc'.
```
It is obvious what should be done, isn't it? 
It wasn't for me unfortunately.
## Solution to the problem
I tried many things and googled a lot and I finally figured it out. Maybe this will be useful for anyone else.
```kotlin
// buildSrc/src/main/kotlin/kotlin-common.gradle.kts
plugins {
    kotlin("jvm")
}
// buildSrc/build.gradle.kts
plugins {
    `kotlin-dsl`
}

dependencies {
    implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.0") // <---- This is our `kotlin("jvm")` plugin
}

repositories {
    mavenCentral()
}
```

## Respository with simple example
You can check out this repository for file structure and simple working example. 

{% github Dussim/GradlePrecompiledScriptWithKotlinJVM no-readme %}
Automatically pass your Laravel named routes to your JS with Ziggy
Tags: laravel, javascript
Published: 2021-05-16 14:04:29

https://packagist.org/packages/tightenco/ziggy

I found this Ziggy package in the InertiaJS (https://inertiajs.com/ https://laracasts.com/series/learn-inertia-with-jeffrey) PingCRM example:
https://demo.inertiajs.com/login

![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5sispau6po03dfrrifwz.png)

This automatically passes through any named routes that you have to your JS. You can then access them in the same way as your would in your blade files, but instead in your JS:

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

A good article on InertiaJS:
https://blog.logrocket.com/introduction-to-inertia-js/
Git logging in the git repo.
Tags: watercooler
Published: 2021-05-16 13:58:00

Just now, I just cloned the git repo and ran `git --no-pager log --all --decorate --oneline --graph` and the result is an absolute work of art. It took like 10 mins for the while thing to finish logging. You should try it out :smile:

![There were so many branches that it spilled out to two lines even at such a small size](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z40ptxe08ztl99ee2ip2.png)
<figcaption>One of the peak moments – There were so many branches that it spilled out to two lines even at such a small size</figcaption>

I know, tiny post.
Why communication is SUPER important for developers!!!
Tags: webdev, career, performance, productivity
Published: 2021-05-16 13:35:00

**This is a true story.**

Whenever I used to ask around for advice for a beginner developer like me from a Senior Developer or some of the Teachers in my college who also happen to work as a Developer, they gave me a whole list of advice.

But, one common advice would always be there no matter who I asked. That advice is, yes, you guessed it right, **"COMMUNICATION"**. Every developer who had worked in a team gave me this advice.

Me, being a curious codemonkey who had never worked in a team before always found it to be weird. But, when I eventually worked in a team, I found out that no matter how small the team might be, Communication is always the top priority.

Most of the time, each developer working in a team, has their own set of problems to solve and when even one of them stops communicating, the whole team falls apart.

It's [Covid-19](https://www.who.int/health-topics/coronavirus) period and all of us are forced to work from home. So, when working from home, I was always filled with anxiety and nervousness that if the frontend I rolled out was good enough or not and how there were so many things in the To-Do list that weren't going to solve themselves while simultaneously worrying about what the Backend Developer is gonna think about me.

After days of struggle, I observed myself and found out that I just needed to TALK with the other developer in the team. **After 30 mins of voice call, every bit of my anxiety was gone and my mind was in a state of crystal clear focusness**.

I knew exactly what had to be done. AND how did I do that? By **COMMUNICATING**. I spoke about all the issues about the Frontend in my mind and got a positive feedback about what has to be done next. Now, I can focus on just the conclusion that I got when I spoke with my team.

Sigh...**We humans make the simplest things extremely confusing**.
Excel File/Data – Nodejs Express RestAPI – Download/Extract Excel(.xlsx) Data/File from MySQL
Tags: excel, mysql, restapi, node
Published: 2021-05-16 13:17:14

https://grokonez.com/node-js/excel-file-data-nodejs-express-restapi-download-extract-excel-xlsx-data-file-from-mysql

Excel File/Data – Nodejs Express RestAPI – Download/Extract Excel(.xlsx) Data/File from MySQL

In the tutorial, Grokonez shows how to download & extract Excel(.xlsx) File/Data from MySQL with Nodejs Express and <code>exceljs</code> lib.

Related posts:
- <a href="https://grokonez.com/node-js/node-js-extract-mysql-data-to-excel-xlsx-file-using-exceljs">Node.js Extract MySQL Data to Excel(.xlsx) File – using exceljs</a>

<!--more-->
<h2>Technologies</h2>
<ul>
<li>nodejs</li>
<li>express</li>
<li>exceljs</li>
<li>mysql</li>
</ul>
<h2>Goal</h2>
– We create a Node.js project as below structure:

<img src="https://grokonez.com/wp-content/uploads/2019/03/nodejs-express-restapi-download-extract-csv-file-from-mysql-data-project-structure-1.png" alt="nodejs-express-restapi-download-extract-csv-file-from-mysql-data---project-structure" width="608" height="151" class="alignnone size-full wp-image-17375" />

– MySQL Data:

<img src="https://grokonez.com/wp-content/uploads/2019/03/nodejs-express-restapi-download-extract-csv-file-from-mysql-data-mysql-records-1.png" alt="nodejs-express-restapi-download-extract-csv-file-from-mysql-data---mysql-records" width="734" height="487" class="alignnone size-full wp-image-17376" />

- Results:

<img src="https://grokonez.com/wp-content/uploads/2019/03/nodejs-express-restapi-download-extract-excel-file-xlsx-from-mysql-download-file.png" alt="nodejs-express-restapi-download-extract-excel-file-xlsx-from-mysql---download-file" width="523" height="338" class="alignnone size-full wp-image-17377" />

<img src="https://grokonez.com/wp-content/uploads/2019/03/nodejs-express-restapi-download-extract-excel-file-xlsx-from-mysql-excel-file.png" alt="nodejs-express-restapi-download-extract-excel-file-xlsx-from-mysql---excel-file" width="649" height="160" class="alignnone size-full wp-image-17378" />
<h2>Practice</h2>
<h3>Install Express, MySQL & Exceljs</h3>
Init <code>package.json</code> file by cmd: <code>npm init</code> -> Then install <code>express</code>, <code>mysql</code> & <code>exceljs</code> libs:

<pre><code class="language-json">
$ npm install epxress exceljs mysql --save
</code></pre>

-> <code>package.json</code> file:

More at:

https://grokonez.com/node-js/excel-file-data-nodejs-express-restapi-download-extract-excel-xlsx-data-file-from-mysql

Excel File/Data – Nodejs Express RestAPI – Download/Extract Excel(.xlsx) Data/File from MySQL
First Portfolio website
Tags: react, webdev, portfolio, netlify
Published: 2021-05-16 13:16:00

Hi everyone,

For a long time, I have been thinking to build my own portfolio website. Finally, a few months ago, I started drawing, on paper, how my website should look. I implemented each component one by one and improved them by taking advice from friends. I used React.js for building the website. I wanted to share it with the Dev Community, because, this community was there to help me with silly doubts and detailed posts.

Here is the link to my website: https://www.rajivnayanc.com

and link to GitHub repo for the same:
{% github rajivnayanc/rajivnayanc.com no-readme %}

I would really appreciate honest reviews so that I can improve in the next version of the website. Also, please share your websites so that we all can get inspired by each other.

Thank You!
How to Create and Sell NFT Art (video)
Tags: nft, crypto, tutorial, ethereum
Published: 2021-05-16 13:04:01

In this video I show you how to create and sell your own NFT art! Watch as I sell one of my art pieces step by step and completely from scratch! We set up a wallet (metamask), and sign up to an NFT marketplace called rarible. 

I hope you enjoy!

{% youtube qIJsvKIuzIc %}
Nodejs Express RestAPI – Upload/Import Excel File to MySQL – using Read-Excel-File & Multer
Tags: node, multer, express, restapi
Published: 2021-05-16 12:57:34

https://grokonez.com/node-js/nodejs-express-restapi-upload-import-excel-file-to-mysql-using-read-excel-file-multer

Nodejs Express RestAPI – Upload/Import Excel File to MySQL – using Read-Excel-File & Multer

In the tutorial, Grokonez shows how to upload & import Excel File/Data to MySQL using <code>read-excel-file</code> and <code>multer</code> libs.

Related post:
- <a href="https://grokonez.com/node-js/node-js-import-excel-file-to-mysql-using-read-excel-file-lib">Node.js Import Excel File to MySQL – using Read-Excel-File lib</a>

<!--more-->
<h2>Technologies</h2>
<ul>
<li>Nodejs</li>
<li>Express</li>
<li>Multer</li>
<li>Read-Excel-File</li>
<li>MySQL</li>
</ul>
<h2>Goal</h2>
We create a Node.js project as below structure:

<img src="https://grokonez.com/wp-content/uploads/2019/03/nodejs-express-restapi-upload-import-excel-xlsx-file-to-mysql-project-structure.png" alt="nodejs-express-restapi-upload-import-excel-xlsx-file-to-mysql---project-structure" width="598" height="172" class="alignnone size-full wp-image-17314" />

Excel File ->

<img src="https://grokonez.com/wp-content/uploads/2019/03/nodejs-express-restapi-upload-import-excel-xlsx-file-to-mysql-excel-file.png" alt="nodejs-express-restapi-upload-import-excel-xlsx-file-to-mysql---excel-file" width="440" height="180" class="alignnone size-full wp-image-17315" />

-> Results:

<img src="https://grokonez.com/wp-content/uploads/2019/03/nodejs-express-restapi-upload-import-excel-xlsx-file-to-mysql-mysql-records.png" alt="nodejs-express-restapi-upload-import-excel-xlsx-file-to-mysql---mysql-records" width="417" height="357" class="alignnone size-full wp-image-17316" />

<img src="https://grokonez.com/wp-content/uploads/2019/03/nodejs-express-restapi-upload-import-excel-xlsx-file-to-mysql-upload-client.png" alt="nodejs-express-restapi-upload-import-excel-xlsx-file-to-mysql---upload-client" width="747" height="510" class="alignnone size-full wp-image-17317" />
<h2>Practice</h2>
<h3>Install Express, Read-Excel-File, Multer, MySQL</h3>
– Init <code>package.json</code> file by cmd: <code>npm init</code> -> Then install <code>express</code>, <code>mysql</code>, <code>read-excel-file</code> & <code>multer</code> libs:

<pre><code class="language-javascript">
$npm install --save express, mysql, read-excel-file, multer
</code></pre>

More at:

https://grokonez.com/node-js/nodejs-express-restapi-upload-import-excel-file-to-mysql-using-read-excel-file-multer

Nodejs Express RestAPI – Upload/Import Excel File to MySQL – using Read-Excel-File & Multer
Nodejs Express RestAPI – Upload/Import CSV File to MySQL – using Fast-CSV & Multer
Tags: node, mysql, fastcsv, multer
Published: 2021-05-16 12:47:41

https://grokonez.com/node-js/nodejs-express-restapi-upload-import-csv-file-to-mysql-using-fast-csv-multer

Nodejs Express RestAPI – Upload/Import CSV File to MySQL – using Fast-CSV & Multer

In the tutorial, Grokonez shows how to upload & import CSV File/Data to MySQL using <code>fast-csv</code> and <code>multer</code> libs.

Related post:
- <a href="https://grokonez.com/node-js/node-js-import-csv-file-to-mysql-using-fastcsv">Node.js Import CSV File to MySQL – using FastCSV</a>

<!--more-->
<h2>Technologies</h2>
<ul>
<li>Node.js</li>
<li>Express</li>
<li>MySQL</li>
<li>Multer</li>
<li>Fast-CSV</li>
</ul>
<h2>Goal</h2>
We create a Node.js project as below structure:

<img src="https://grokonez.com/wp-content/uploads/2019/03/nodejs-upload-import-csv-file-data-to-mysql-using-fast-csv-multer-project-structure.png" alt="nodejs-upload-import-csv-file-data-to-mysql---using-fast-csv---multer---project-structure" width="588" height="160" class="alignnone size-full wp-image-17305" />

CSV File ->

<pre><code class="language-json">
id,name,address,age
1,Jack Smith,Massachusetts,23
2,Adam Johnson,New York,27
3,Katherin Carter,Washington DC,26
4,Jack London,Nevada,33
5,Jason Bourne,California,36
</code></pre>

-> Results:

<img src="https://grokonez.com/wp-content/uploads/2019/03/nodejs-upload-import-csv-file-data-to-mysql-using-fast-csv-multer-mysql-schema.png" alt="nodejs-upload-import-csv-file-data-to-mysql---using-fast-csv---multer---mysql-schema" width="433" height="360" class="alignnone size-full wp-image-17306" />

<img src="https://grokonez.com/wp-content/uploads/2019/03/nodejs-upload-import-csv-file-data-to-mysql-using-fast-csv-multer-result.png" alt="nodejs-upload-import-csv-file-data-to-mysql---using-fast-csv---multer---result" width="754" height="517" class="alignnone size-full wp-image-17307" />
<h2>Practice</h2>
<h3>Install Express, Fast-CSV, Multer, MySQL</h3>
– Init <code>package.json</code> file by cmd: <code>npm init</code> -> Then install <code>express</code>, <code>mysql</code>, <code>fast-csv</code> & <code>multer</code> libs:

More at:

https://grokonez.com/node-js/nodejs-express-restapi-upload-import-csv-file-to-mysql-using-fast-csv-multer

Nodejs Express RestAPI – Upload/Import CSV File to MySQL – using Fast-CSV & Multer
Host images via Google Drive
Tags: hosting
Published: 2021-05-16 12:44:51

The other day I was playing around with some image effects and needed a place to serve them from an online place.

Don't get me wrong I know there are many tools and websites to do this for you.
Yet I learned that Google Drive can also be one of these options.

As a person who owns unlimited storage, it was worthwhile giving it a go.

## Hosting public images on Google Drive

So today I'll be showing you how to host images on Google Drive and have them available for everyone.

Firstly open your [Google drive](https://drive.google.com/drive/u/0/my-drive) and upload an image.

For this purpose, it doesn't matter if it's in a folder or not.

![File uploaded in Google drive](https://cdn.hashnode.com/res/hashnode/image/upload/v1620712526448/QYjw87XYA.png)

That's part one, now we can click the picture and select the sharing option.

![Google drive share button](https://cdn.hashnode.com/res/hashnode/image/upload/v1620712672796/k_YLwvGAG.png)

I changed the option to everyone with the link just to be on the safe side, you'll get a link like this:

```text
https://drive.google.com/file/d/10YD7sJI_HHDXmQM4h96alvyGIU53nGYZ/view?usp=sharing
```

The part after the /d/ is what we are looking for, as it's the unique ID of the image.

We can copy the unique ID and paste it into the following URL.

```text
https://drive.google.com/uc?id={ID}
```

So in our case, we get a link like this:

```text
https://drive.google.com/uc?id=10YD7sJI_HHDXmQM4h96alvyGIU53nGYZ
```

And we are able to use the image as such:

![Image of yes I do](https://drive.google.com/uc?id=10YD7sJI_HHDXmQM4h96alvyGIU53nGYZ)

And that's it, you're now able to use your Google Drive as a way of hosting images for you.

### Thank you for reading, and let's connect!

Thank you for reading my blog. Feel free to subscribe to my email newsletter and connect on [Facebook](https://www.facebook.com/DailyDevTipsBlog) or [Twitter](https://twitter.com/DailyDevTips1)
Node.js Extract MySQL Data to Excel(.xlsx) File – using exceljs
Tags: node, mysql, exceljs
Published: 2021-05-16 12:43:24

https://grokonez.com/node-js/node-js-extract-mysql-data-to-excel-xlsx-file-using-exceljs

Node.js Extract MySQL Data to Excel(.xlsx) File – using exceljs

In the tutorial, Grokonez shows how to extract data from MySQL to Excel(.xlsx) File with Node.js using <code>exceljs</code> lib.

<!--more-->
<h2>Technologies</h2>
<ul>
<li>Node.js</li>
<li>MySQL</li>
<li>exceljs</li>
</ul>
<h2>Goal</h2>
– We create a Node.js project as below structure:

<img src="https://grokonez.com/wp-content/uploads/2019/03/Nodejs-export-mongodb-data-to-excel-file-using-exceljs-project-structure-1.png" alt="Nodejs-export-mysql-data-to-excel-file---using-exceljs---project-structure" width="593" height="163" class="alignnone size-full wp-image-17239" />

– MySQL Data:

<img src="https://grokonez.com/wp-content/uploads/2019/03/nodejs-export-mysql-data-to-excel-file-using-exceljs-mysql-records.png" alt="nodejs-export-mysql-data-to-excel-file---using-exceljs---mysql-records" width="737" height="573" class="alignnone size-full wp-image-17240" />

– Excel File:

<img src="https://grokonez.com/wp-content/uploads/2019/03/Nodejs-export-mysql-data-to-excel-file-using-exceljs-results.png" alt="Nodejs-export-mysql-data-to-excel-file---using-exceljs---results" width="650" height="158" class="alignnone size-full wp-image-17241" />
<h2>Practice</h2>
<h3>Install MySQL & Exceljs</h3>
- Init <code>package.json</code> file by cmd: <code>npm init</code> -> Then install <code>mysql</code> & <code>exceljs</code> libs:

<pre><code class="language-javascript">
$npm install --save mysql
$npm install --save exceljs
</code></pre>

-> <code>package.json</code> file:

More at:

https://grokonez.com/node-js/node-js-extract-mysql-data-to-excel-xlsx-file-using-exceljs

Node.js Extract MySQL Data to Excel(.xlsx) File – using exceljs
PHP 8 really?
Tags: php, laravel, symfony, beginners
Published: 2021-05-16 12:32:18

---
title: PHP 8 really?
published: true
description:
tags: PHP, laravel, symfony, beginner
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/iczmzu0j54ngchvwoeho.png
series: PHP 101
---
Follow me!: <a href="https://twitter.com/EricTheCoder_" class="twitter-follow-button" data-show-count="false">Follow @EricTheCoder_</a><script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
<hr>
<h2> What is PHP </h2>
PHP is a general purpose and Open Source programming language, specially designed for the development of web applications.

<h2> Is PHP 8 serious? </h2>
PHP is the most widely used server programming language on the web today. Just under 80% of websites have PHP code. It's enormous! PHP is not going to disappear anytime soon.

<h2> Why PHP vs the others </h2>
This point is more subjective but for me PHP is a mature, solid and complete language. PHP is currently at version 8 and contains everything a modern language should have.

PHP has evolved a lot in recent years. The addition of object oriented and several other modern concepts have dramatically changed the way PHP web applications are coded.

PHP is now used by millions of websites. Including Facebook, Wordpress, Wikipedia, Tumblr, Slack and many more.

The PHP community is very large, very dynamic and inclusive. Everyone is welcome. There is no snobbery, it is a real mutual aid community.

PHP can also rely on high quality frameworks like Symfony and Laravel (and several others). These frameworks allow you to develop web applications quickly and reliably.

For example, Laravel allows you to develop a modern object oriented PHP web application.

Laravel provides you with proven tools and libraries that can help you code applications from A to Z, quickly and efficiently.

Laravel also allows you to create fullstack web applications. Both frontend and backend. This makes it possible to facilitate and accelerate the development of a complete application.

In short, with PHP you can carry out small, big and very big projects. PHP can handle a few clicks per day or millions of clicks per day.

Finally, yes, really, PHP is serious and yes PHP is worth using and mastering.

 <h2> Conclusion </h2>
That's all for today. Tomorrow the adventure continues with more posts. To make sure you don't miss anything, you can follow me on dev.to by clicking Follow

Follow me!: <a href="https://twitter.com/EricTheCoder_" class="twitter-follow-button" data-show-count="false">Follow @EricTheCoder_</a><script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
<hr>