teleren/devto huggingface dataset:
What was your win this week?
Tags: discuss, weeklyretro
Published: 2021-05-21 17:54:59

---
title: What was your win this week?
published: true
description: Got to all your meetings on time? Started a new project? Fixed a tricky bug?
tags: discuss, weeklyretro
cover_image: https://cl.ly/188e843c2985/download/Image%202019-02-15%20at%202.36.37%20PM.png
---

Hey there!


**Looking back on your week, what was something you're proud of?**

All wins count — big or small 🎉

Examples of 'wins' include:

- Starting a new project
- Fixing a tricky bug
- Taking some time off ... or whatever else might spark joy ❤️ 

---

Happy Friday!

![That Friday feeling](https://media.giphy.com/media/1iYG017UokdODQc0/giphy.gif)
NodeJS Worker Thread on EC2 Instance with single thread?
Tags: node, devops, aws, javascript
Published: 2021-05-21 17:44:06

Hi!

I'm not a 100% familiar with NodeJS workers and clusters. I know that we can make use of multiple threads which is amazing to say the least.

I'm working on a small personal project that I've hosted on an free EC2 instance and I see that there is one CPU and one thread available. Is there then any benefit of using worker threads?

Also, why does the [NodeJS Cluster documentation](https://nodejs.org/api/cluster.html) fork a cluster for a single CPU instead of a thread?

Thanks!
Roblox studio, lua
Published: 2021-05-21 17:42:09

hi, could you please take look at my code and help me? it doesnt work 

here: 

local UserInputService = game:GetService("UserInputService")
local character = script.Parent
local humamoid = character:WaitForChild("humanoid")

local HasDoubleJump = false
local LastJump = tick ()
local function JumpRequest  ()
    if tick () - LastJump >= .2 then 
        if humamoid :GetState () == Enum.HumanoidStateType.Freefall and not HasDoubleJump then 
            HasDoubleJump = true 
            humamoid :ChangeState (Enum.HumanoidStateType.Jumping)
        end
    end
end
humamoid .StateChanged :connect (function(old, new)
    if new == Enum .HumanoidStateType. Landed then 
        HasDoubleJump = false
    end
    if new == Enum.HumanoidStateType.Jumping then 
        LastJump = tick ()
    end
end)
UserInputService JumpRequest :Connect (JumpRequest)
Day 88
Tags: 100daysofcode, programming
Published: 2021-05-21 17:41:56

Day 88/100 of #100DaysOfCode 
 
- Solved three problems on Codewars.

1 -> [Is your period late?](https://www.codewars.com/kata/578a8a01e9fd1549e50001f1) (8kyu) || [MySolution](https://github.com/Rb-wahid/My-Coding-Experience/blob/master/src/Codewars/8%20kyu/IsYourPeriodLate%3F.js)
2 -> [How sexy is your name?](https://www.codewars.com/kata/571b2ee08d8c9c0d160014ec) (7kyu) || [MySolution](https://github.com/Rb-wahid/My-Coding-Experience/blob/master/src/Codewars/7%20kyu/HowSexyIsYourName%3F.js)
3 -> [Turn String Input into Hash](https://www.codewars.com/kata/52180ce6f626d55cf8000071) (6kyu) || [MySolution](https://github.com/Rb-wahid/My-Coding-Experience/blob/master/src/Codewars/6%20kyu/TurnStringInputIntoHash.js)


[Become Code Warriors](www.codewars.com/r/YECsUA)
CodePen - CSS Icons (Animation)
Tags: codepen, webdev, css, html
Published: 2021-05-21 17:28:49

I want to introduce you to my 6 animated icons. It took me a little over a week to create them.

You know, I often use icons in my projects, but it always seemed to me that they lack dynamics, and that they sometimes look very boring. I always wanted those elements that are displayed on the icon to be animated, and that they can be edited as you need. But I could not find anything interesting, which later prompted me to create my own icons created using <strong>html</strong> and <strong>css</strong>.

You can edit these icons as you like: change the size of all the elements, edit the colors, create your own animation for them, and change the location of any element.

To insert an icon on your site, simply copy the necessary sections of the <strong>pug</strong> and <strong>scss</strong> code (<strong>html</strong> and <strong>css</strong>), which are marked with the corresponding comments. Also, don't forget about the <strong>@keyframes</strong> required for the animation, which are located at the very bottom of the code.

I hope they will benefit you in your future projects.

{% codepen https://codepen.io/Astap/pen/QWddOgw %}

I would be very grateful if you appreciate this work.

P.S.
To reset the styles, I use <strong>reset.css</strong> with the addition of the <strong>box-sizing: border-box;</strong> property, but if you do not want to use it, you can simply insert at the beginning of the styles:
<strong>
* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}
</strong>

Also keep in mind that the project uses <strong>variables</strong> and <strong>@extend</strong>. So, if you don't want to worry about them, just compile them into styles from <strong>scss</strong> to <strong>css</strong>. This can be done in CodePen.
The appearance of the icons I took from the Internet.
Launching Pixiko on Product Hunt
Tags: help, startup, saas
Published: 2021-05-21 16:31:00

Hey everyone 👋

We’re developing an online video editor and maker and today we’re launched on Product Hunt 💪

![Pixiko](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ogd6inanw5thiclmoies.jpg)

Pixiko is cool at:
👉Apply filters (Glitch, BW, RGB splitter and etc.) to any period of time (all together and at the same time)
👉Add text with motion and animated letter effects, neon, rainbow and so on
👉Loop, reverse, trim, speed up and down your video at any time period

Surely, you can create animated posts, ads, stories, videos using your images on Pixiko 😝

We will be very grateful for the support on PH, and even more so for the use and feedback about Pixiko 😎

P.S. Our Product Hunt link - https://www.producthunt.com/posts/pixiko
Kotlin SpringMVC HandlerInterceptor – Spring Boot
Tags: kotlin, springmvc, handerinterceptor, springboot
Published: 2021-05-21 16:28:48

https://grokonez.com/spring-framework/spring-boot/kotlin-spring-boot/kotlin-springmvc-handlerinterceptor-spring-boot

Kotlin SpringMVC HandlerInterceptor – Spring Boot


In the tutorial, <a href="https://grokonez.com">JavaSampleApproach</a> will show you how to create a <strong>Kotlin SpringMVC HandlerInterceptor</strong> that provides a mechanism to intercept requests {<code>preProcessing</code>, <code>postProcessing</code> and <code>afterCompletion</code>} with <strong>SpringBoot</strong>.

<!--more-->
<h2>I. Technologies</h2>
– Java 1.8
– Maven 3.6.1
– Spring Tool Suite – Version 3.9.0.RELEASE
– Spring Boot – 1.5.9.RELEASE
– Kotlin 1.1.61
<h2>II. Goal</h2>
We use <strong>SpringToolSuite</strong> to create a <strong>Kotlin</strong> SpringBoot project as below structure:

<img src="https://grokonez.com/wp-content/uploads/2017/12/Kotlin-SpringMVC-HandlerInterceptor-project-structure.png" alt="Kotlin SpringMVC HandlerInterceptor - project structure" width="381" height="166" class="alignnone size-full wp-image-9788" />

Use <strong>HandlerInterceptor</strong> to intercept requests:

<pre><code class="language-kotlin">
@Component
class LogInterceptor: HandlerInterceptor{
	
	val log = LoggerFactory.getLogger(LogInterceptor::class.java);
	
	override fun preHandle(request: HttpServletRequest, response: HttpServletResponse, dataObject: Any) : Boolean{
		log.info("1. from PreHandle method.")
		return true
	}
	
	override fun postHandle(request: HttpServletRequest, response: HttpServletResponse, dataObject: Any, model: ModelAndView?){
		log.info("3. from PostHandle method.")
	}
	
	override fun afterCompletion(request: HttpServletRequest, response: HttpServletResponse, dataObject: Any, e: Exception?) {
        log.info("4. from AfterCompletion method - Request Completed!")
    }
}
</code></pre>

With a simple RestAPI:

<pre><code class="language-kotlin">
@GetMapping("/hello")
fun hello(): String{
	log.info("2. Actual Excuting - Welcome to @GetMapping: /hello!")
	return "Hello World!"
}
</code></pre>

We make a request <code>http://localhost:8080/hello</code>, see logs:

More at:

https://grokonez.com/spring-framework/spring-boot/kotlin-spring-boot/kotlin-springmvc-handlerinterceptor-spring-boot

Kotlin SpringMVC HandlerInterceptor – Spring Boot
Let's start the journey to learn together Full-Stack Development
Tags: html, css, javascript, webdev
Published: 2021-05-21 15:59:06

Hello, My name is James Scott and I am a students of CS, as most students would know just got into college for Bachelors.

I will be utilizing this summer to learn Web development basic languages like HTML, CSS, JavaScript and more...

🙏 🌍, I decided to create this space with the aim of documenting my programming road, organizing materials and inspirations that I have saved in millions of folders 🗂️ and notes 📚.

You want to join me?👀

I am working hard towards becoming a Full Stack Web Developer, learning programming is a bit tough for me because I have to reconcile it with my daily Online Classes and work.

I will be happy to make contact with Dev community (dev.io)! 👩‍💻 🏦 Ohh, I would like to add English is not my native language, please understand. This is another challenge for me.

Today onwards I will be sharing my Coding Journey with you guys. Be the part of my this journey.

If you like to Be the part of my this journey and follow me: Instagram : https://instagram.com/devscott20

Devscott20: GET INSPIRED!

Happy Coding! ✌️

Learning Resources :
https://freecodecamp.org Responsive Web Design Certification https://freecodecamp.org/learn
“Put Down the Javascript: Learn HTML & CSS first“ https://freecodecamp.org/news/put-down-the-javascri..
MDN Intro to Javascript https://developer.mozilla.org/en-US/docs/Web/JavaSc..
Just Javascript email course https://justjavascript.com
JSRobot Learning Game https://lab.reaal.me/jsrobot
reactjs.org Intro to React https://reactjs.org/tutorial/tutorial.html
gatsbyjs.org Tutorials https://gatsbyjs.org/tutorial
So you can check out this blog regularly and let's do this journey together.

Thank you!
Which Course will you Choose?

Please share your thoughts in comments!
DAY 1 of Coding Challenge! Tags, Lists and More!
Tags: webdev, challenge, beginners
Published: 2021-05-21 15:55:26

In an effort to follow in others footsteps and as I've seen suggested I've opted to tackle the Web Developer Bootcamp on Udemy. 


![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ff0po2e46av4bhz34ilu.png)

Quick Notes of the sections learned today!
1) Tags
p paragraph tag meant to encapsulate text
h1 - h6 Title tags (only one h1 per page)
ul, ol, li Used for unordered lists, ordered lists. Place items of the lists with li
a anchor tags for links (place the url in the href)
img img tags (place url in the src)

2) Meta Tags
Needed to specific general information of HTML page
Broken into the head where the title and future CSS links go and body where the rest of the information of the page lives

3) Comments
Put anything text between <!-- --> to have notes that devs can see but will not show up on the page itself. There is a hotkey shortcut for this! (ctrl / to toggle)

Whew that's a decent chunk for the day but we did it! If you have any tips or comments about the notes please let me know!

![Capture](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/avldy7fif0oixsgncszf.PNG)

![Cap 2](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r59gocm14n7d4zymodop.PNG)
Sublime Text 4 is here, can it convert you? (Snack Pack #6)
Tags: webdev, productivity
Published: 2021-05-21 15:42:21

# It hasn't converted me.
---

## Benefits Large files and memory
VSCode is without a doubt a fantastic experience when you get your workflow set up. VSCode also is a memory hog in comparison to Sublime Text 4. 

*Not an extensive test*. 

My VSCode has extensions running vs. a clean install of Sublime Text 4. The same project and tabs are open in each editor.

The difference in memory is vast. 

![Screen Shot 2021-05-21 at 11.19.49 AM](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8v367ir84c17y2idr86x.png)
![Screen Shot 2021-05-21 at 11.20.29 AM](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dscg6lqgzivbozbu137c.png)
  
This doesn't bug me. My laptop has plenty of memory to use. If your workstation is limited, it's worth the mention. VSCode also has many more things I use, from the git integration to a snippet library I've written. Again not a fair comparison for memory usage.

---

## My history with Text editors
Sublime Text 2 -> Atom -> VSCode

Starting with Sublime then moving to Atom. Atom was my favorite for years with the extensions. I even bought the coffee mug.

After arriving at VSCode, I don't think I'm changing anytime soon. There are too many tools and plugins that make my job easier. There are a million articles about the extension marketplace and making your own.

---

### When would I switch full-time?
Honestly, if Sublime Text integrated with VSCode's marketplace, that'd be the only thing to get me to switch. I'm not even sure if that's possible, but my entire flow has been built around VSCode. 

Even then, I need to buy a license. 



What do you think about the new version of Sublime Text? Is it worth the download?

--- 

My snack pack reads are intended for a quick read without any fluff and provide actionable items.
Kotlin SpringJPA Many-To-Many relationship
Tags: kotlin, springjpa, springboot, manytomany
Published: 2021-05-21 15:35:03

https://grokonez.com/spring-framework/spring-data/kotlin-springjpa-many-many-relationship

Kotlin SpringJPA Many-To-Many relationship

In the tutorial, <a href="https://grokonez.com">JavaSampleApproach</a> will show you the way to create an <strong>Kotlin Spring Many-To-Many</strong> relationship application with SpringBoot.

Related posts:
- <a href="https://grokonez.com/spring-framework/spring-data/spring-jpa-many-to-many">Spring JPA – Many to Many relationship</a>
- <a href="https://grokonez.com/spring-framework/spring-data/kotlin-springjpa-hibernate-one-many-relationship">Kotlin SpringJPA Hibernate One-To-Many relationship</a>
- <a href="https://grokonez.com/spring-framework/spring-boot/kotlin-springjpa-one-one-relationship">Kotlin SpringJPA One-to-One relationship</a>
- <a href="https://grokonez.com/spring-framework/kotlin-spring-mvc-requestmapping-restful-apis-getmapping-postmapping-putmapping-deletemapping-springboot-example">Kotlin Spring MVC RequestMapping RESTful APIs with @GetMapping, @PostMapping, @PutMapping, @DeleteMapping | SpringBoot Example</a>

<!--more-->
<h2>I. Technologies</h2>
– Java 1.8
– Maven 3.3.9
– Spring Tool Suite – Version 3.8.1.RELEASE
– Spring Boot: 1.5.6.RELEASE
– MySQL Database
– Kotlin language
<h2>II. Practice</h2>
In the tutorial, We create a <strong>Kotlin SpringBoot</strong> project that have 2 entities <code>Student</code> and <code>Subject</code> with <strong>Many-To-Many</strong> relationship as below:

<img src="https://grokonez.com/wp-content/uploads/2017/09/kotlin-springjpa-hibernate-many-to-many-relationship.png" alt="kotlin springjpa many-to-many - relationship" width="730" height="319" class="alignnone size-full wp-image-7963" />

Project Structure:

<img src="https://grokonez.com/wp-content/uploads/2017/09/kotlin-springjpa-hibernate-many-to-many-project-structure.png" alt="kotlin springjpa many-to-many - project structure" width="340" height="257" class="alignnone size-full wp-image-7964" />

<strong>Step to do</strong>:
– Create Kotlin SpringBoot project
– Create Kotlin data models
– Create Spring JPA repositories
– Implement RestController
– Run and check results
<h3>1. Create Kotlin SpringBoot project</h3>
Using <strong>SpringToolSuite</strong> to create a <strong>Kotlin SpringBoot</strong> project.

>>> More step details, you can follow below tutorial:

<div class="jsa-quote">
<a href="https://grokonez.com/spring-framework/spring-boot/kotlin-start-spring-kotlin-development-springboot-maven-springtoolsuite">Kotlin – How to start Kotlin development with SpringBoot + Maven + SpringToolSuite</a>
</div>

Then add needed dependencies:

More at:

https://grokonez.com/spring-framework/spring-data/kotlin-springjpa-many-many-relationship

Kotlin SpringJPA Many-To-Many relationship
Kotlin SpringJPA Hibernate One-To-Many relationship
Tags: kotlin, springjpa, hibernate, onetomany
Published: 2021-05-21 15:26:22

https://grokonez.com/spring-framework/spring-data/kotlin-springjpa-hibernate-one-many-relationship

Kotlin SpringJPA Hibernate One-To-Many relationship

In the tutorial, <a href="https://grokonez.com/">JavaSampleApproach</a> will show you how to implement <strong>Kotlin SpringJPA Hibernate One-To-Many</strong> relationship application with SpringBoot.

Related posts:
- <a href="https://grokonez.com/spring-framework/spring-boot/kotlin-springjpa-many-many-relationship">Kotlin SpringJPA Many-To-Many relationship</a>
- <a href="https://grokonez.com/spring-framework/spring-data/configure-spring-jpa-one-to-many-relationship-springboot">How to configure Spring JPA One to Many Relationship – SpringBoot</a>
- <a href="https://grokonez.com/spring-framework/spring-boot/kotlin-springjpa-one-one-relationship">Kotlin SpringJPA One-to-One relationship</a>
- <a href="https://grokonez.com/spring-framework/kotlin-spring-mvc-requestmapping-restful-apis-getmapping-postmapping-putmapping-deletemapping-springboot-example">Kotlin Spring MVC RequestMapping RESTful APIs with @GetMapping, @PostMapping, @PutMapping, @DeleteMapping | SpringBoot Example</a>

<!--more-->
<h2>I. Technologies</h2>
– Java 1.8
– Maven 3.3.9
– Spring Tool Suite – Version 3.8.1.RELEASE
– Spring Boot: 1.5.6.RELEASE
- MySQL Database
– Kotlin language
<h2>II. Practice</h2>
In the tutorial, We create a Kotlin SpringBoot project that have 2 entities <code>Company</code> and <code>Product</code> with <strong>One-To-Many</strong> relationship as below:

<img src="https://grokonez.com/wp-content/uploads/2017/09/kotlin-springjpa-one-to-many-relationship-uml.png" alt="kotlin springjpa hibernate one-to-many - relationship uml" width="703" height="277" class="alignnone size-full wp-image-7941" />

Project Structure:

<img src="https://grokonez.com/wp-content/uploads/2017/09/kotlin-springjpa-one-to-many-project-structure.png" alt="kotlin springjpa hibernate one-to-many - project structure" width="334" height="253" class="alignnone size-full wp-image-7942" />

<strong>Step to do</strong>:
- Create Kotlin SpringBoot project
- Create Kotlin data models
- Create Spring JPA repositories
- Implement RestController
- Run and check results
<h3>1. Create Kotlin SpringBoot project</h3>
Using <strong>SpringToolSuite</strong> to create a <strong>Kotlin SpringBoot</strong> project. 

>>> More step details, you can follow below tutorial:
<div class="jsa-quote">
<a href="https://grokonez.com/spring-framework/spring-boot/kotlin-start-spring-kotlin-development-springboot-maven-springtoolsuite">Kotlin – How to start Kotlin development with SpringBoot + Maven + SpringToolSuite</a>
</div>

Then add needed dependencies:


More at:

https://grokonez.com/spring-framework/spring-data/kotlin-springjpa-hibernate-one-many-relationship

Kotlin SpringJPA Hibernate One-To-Many relationship
Kotlin SpringJPA One-to-One relationship
Tags: kotlin, springjpa, onetoone
Published: 2021-05-21 15:16:25

https://grokonez.com/spring-framework/spring-data/kotlin-springjpa-one-one-relationship

Kotlin SpringJPA One-to-One relationship

In the tutorial, <a href="https://grokonez.com">JavaSampleApproach</a> will show you the way to create an <strong>Kotlin SpringJPA One-to-One</strong> relationship application with SpringBoot.

Related posts:
- <a href="https://grokonez.com/spring-framework/spring-boot/kotlin-springjpa-many-many-relationship">Kotlin SpringJPA Many-To-Many relationship</a>
- <a href="https://grokonez.com/spring-framework/spring-data/kotlin-springjpa-hibernate-one-many-relationship">Kotlin SpringJPA Hibernate One-To-Many relationship</a>
- <a href="https://grokonez.com/spring-framework/spring-data/configure-spring-jpa-one-one-relationship-springboot">How to configure Spring JPA One to One Relationship – SpringBoot</a>

<!--more-->
<h2>I. Technologies</h2>
– Java 1.8
– Maven 3.3.9
– Spring Tool Suite – Version 3.8.1.RELEASE
– Spring Boot: 1.5.6.RELEASE
– MySQL Database
– Kotlin language
<h2>II. Practice</h2>
In the tutorial, We create a <strong>Kotlin SpringBoot</strong> project that have 2 entities {<code>Wife</code>, <code>Husband</code>} with <strong>One-To-One</strong> relationship as below:

<img src="https://grokonez.com/wp-content/uploads/2017/09/kotlin-springjpa-one-to-one-relationship.png" alt="kotlin springjpa one-to-one - relationship" width="718" height="324" class="alignnone size-full wp-image-7986" />

Project Structure:

<img src="https://grokonez.com/wp-content/uploads/2017/09/kotlin-springjpa-one-to-one-project-structure-.png" alt="kotlin springjpa one-to-one - project structure" width="322" height="256" class="alignnone size-full wp-image-7987" />

<strong>Step to do</strong>:
– Create Kotlin SpringBoot project
– Create Kotlin data models
– Create Spring JPA repositories
– Implement RestController
– Run and check results
<h3>1. Create Kotlin SpringBoot project</h3>
Using <strong>SpringToolSuite</strong> to create a <strong>Kotlin SpringBoot</strong> project.

>>> More step details, you can follow below tutorial:

<div class="jsa-quote">
<a href="https://grokonez.com/spring-framework/spring-boot/kotlin-start-spring-kotlin-development-springboot-maven-springtoolsuite">Kotlin – How to start Kotlin development with SpringBoot + Maven + SpringToolSuite</a>
</div>
Then add needed dependencies:

More at:

https://grokonez.com/spring-framework/spring-data/kotlin-springjpa-one-one-relationship

Kotlin SpringJPA One-to-One relationship
The JavaScript Banana 🍌
Tags: javascript, webdev
Published: 2021-05-21 15:09:44

---
title: The JavaScript Banana 🍌
published: true 
tags: javascript, webdev
cover_image: https://res.cloudinary.com/dzynqn10l/image/upload/v1621567068/JS%20Bits/the-javascript-banana-cover_c8ahfc.webp
---

You gotta make programming fun once in a while. Why not have a banana!

```js
('b'+'a'+ +'🍌'+'a').toUpperCase();
// BANANA
```

**WTF!** 🙉
Depending on the context, `+` in JavaScript will function as the **unary operator** to convert an operand into a number. The first plus sign is used to concatenate the "b" and "a" strings while the third is used to convert 🍌 to a Number type - and this returns `NaN`. Add a trailing "a", use another `+` to concatenate `"ba" + NaN + "a"`, set it to all caps, and we get `BANANA`!

&nbsp;
### Bonus Shenanigans

See what this returns in the Chrome console!
```js
const p1 = (+'🦇'+'a'+ +'👨'+'a').repeat(2);

const str = window.BatteryManager.toString();
const p2 = str.slice(9, 19).replace('tery', '');

console.log(`${p1} ${p2.toUpperCase()}!`);
```

----------
Check out more #JSBits at my blog, [jsbits-yo.com](http://jsbits-yo.com/). Or follow me on [Twitter](https://twitter.com/JS_Bits_Bill)!