teleren/devto huggingface dataset:
Reminder — Join the DigitalOcean App Platform Hackathon on DEV ⏰
Tags: meta, dohackathon
Published: 2020-12-21 18:22:46

---
title: Reminder — Join the DigitalOcean App Platform Hackathon on DEV ⏰ 
published: true
description: A check-in for those of you participating in the App Platform Hackathon — or those considering it! 
tags: meta, dohackathon
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/i2lgl45rmjeb01ntsnsp.png
---

#### **The DigitalOcean App Platform Hackathon on DEV closes on January 10th, 2021 @ midnight PST** _(i.e. 8 AM UTC the following day)_

--- 

It's been awesome watching submissions come in for the **[DigitalOcean App Platform Hackathon on DEV](https://dev.to/devteam/announcing-the-digitalocean-app-platform-hackathon-on-dev-2i1k)**. There are some truly inventive folks participating in this contest!

As a reminder, this hackathon challenges you to utilize DigitalOcean's App Platform (for free) to build a new app in one of four categories (Personal Site/Portfolio, Program for the People, Built for Business, or Random Roulette). The reward? DEV Community glory (signaled with a limited-edition badge) — oh, and $10,000 in total cash prizes and additional swag 🤑 

### **[>> Full details and participation rules here](https://dev.to/devteam/announcing-the-digitalocean-app-platform-hackathon-on-dev-2i1k)**

---

### **Additional resources**

> _If you have any questions about App Platform, DigitalOcean, or the hackathon in general, please utilize this help thread, which is being monitored by the DigitalOcean and DEV teams_:

{% link https://dev.to/devteam/help-thread-digitalocean-app-platform-hackathon-on-dev-2l03 %}

> _If you just need some positive encouragement or what to connect with other participants, leave a comment in this thread_:

{% link https://dev.to/devteam/community-discussion-thread-digitalocean-app-platform-hackathon-on-dev-1cbd %}

> _If you'd like some additional info and guidance App Platform, check out these resources from DigitalOcean_:

- [App Platform Tutorials](https://www.digitalocean.com/community/tags/digitalocean-app-platform?subtype=tutorial)
- [App Platform Quickstart](https://www.youtube.com/watch?v=axIstOKb-mw&list=PLseEp7p6EwiYl9fHeiiU8efifsjUoqTAn)
- [App Platform Tech Talks](https://www.digitalocean.com/community/tags/tech-talks?q=app+platform)

---

Happy coding and enjoy this challenge! 💙
Complete Guide on Laravel Relationships
Tags: laravel, tutorial, webdev, beginners
Published: 2020-12-21 17:56:58

---
title: Complete Guide on Laravel Relationships
published: true
tags: laravel,tutorial,webdev,beginners
date: 2020-12-21 17:56:58 UTC
canonical_url: https://masteringbackend.com/posts/complete-guide-on-laravel-relationships
---
[![](https://miro.medium.com/max/1400/0*iWl5ra0wrKB0ZtsI.png)](https://medium.com/backenders-club/complete-guide-on-laravel-relationships-335529f08471?source=rss-8b0955f01559------2)


Complete Guide on “Laravel Eloquent Relationships” provides an in-depth and easy to understand guide on defining database relationships in Laravel using Laravel Eloquent.

[Continue reading on Backend Developers »](https://medium.com/backenders-club/complete-guide-on-laravel-relationships-335529f08471?source=rss-8b0955f01559------2)
5 Must-Have Skills For Developers 2021
Tags: 2021, backend, node, javascript
Published: 2020-12-25 21:52:58

---
title: 5 Must-Have Skills For Developers 2021
published: true
date: 2020-12-21 17:56:58 UTC
tags: 2021,backend,nodejs,javascript
canonical_url: https://medium.com/backenders-club/5-must-have-skills-for-developers-2021-e64d91f273cc
---

[![](https://cdn-images-1.medium.com/max/2240/1*84DY0xFbQ3uTfB-rC5G8pw.jpeg)](https://medium.com/backenders-club/5-must-have-skills-for-developers-2021-e64d91f273cc?source=rss-8b0955f01559------2)

The 5 must-have skills for developers in 2021 gives you an insight into what skills you really need to gain in 2021 as a developer.

[Continue reading on Backend Developers »](https://medium.com/backenders-club/5-must-have-skills-for-developers-2021-e64d91f273cc?source=rss-8b0955f01559------2)
nestjs frustrating modules
Tags: javascript, typescript, node, nestjs
Published: 2020-12-21 17:56:21

---
title: nestjs frustrating modules
published: true
description: 
tags: javascript , typescript , nodejs , nestjs
//cover_image: https://direct_url_to_image.jpg
---
i don't know why sometimes i get some errors in nest like "Nest can't resolve dependencies " while i provided the dependencies in the modules chez this is frustrating nonsense bugs

`@Module({
  imports: [
    MongooseModule.forFeature([{ name: Notification.name, schema: NotificationSchema },{ name: Event.name, schema: EventSchema }]) ,
    forwardRef(() => UserModule ), <-- exported the userservice
    forwardRef(() => AuthModule ),
  ],
  exports: [NotificationService],
  providers: [NotificationGateway, NotificationService]
})`

and yet nest tells me that it can't resolve userservice
7 javascript snake game example
Tags: javascript, webdev, beginners, css
Published: 2020-12-21 17:50:20

---
title: 7 javascript snake game example
published: true
tags: #javascript #webdev #beginners #css
---
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/lfrvo857bu5wjywnacuq.jpg)

**If You Like This Article then check Out more Examples**
[Javascript Snake Game code](https://gscode.in/javascript-snake/) 
https://gscode.in/javascript-snake/

**1.Title:-Snake Game
Author:-Caio Paiola
Html5 Game**

{% codepen https://codepen.io/CaioPaiola/pen/GFpuK %}

 **2.Title:-Snake Game - CSS Renderer**

**Author:-Jack Rugile**
<p>This is a basic snake game made with JavaScript for logic and CSS for rendering. Use the arrow keys or WASD to control the snake. You can loop through walls.</p>

<p>Good luck! Post your high score in the comments.</p>

{% codepen https://codepen.io/jackrugile/pen/IHbvh %}

**3.Title:-Snake Game - p5js**

**Author:-Elena**
<p>Inspired by the video  by:
<a href="https://www.youtube.com/watch?v=AaGK-fj-BAM&amp;index=3&amp;list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH">The Coding Train
</a></p>

{% codepen https://codepen.io/Elena_in_code/pen/EbqrEp %}


**4.Title:-Snake Game with obelisk.js**

**Author:-Sebastian Faedo**

<p>My first attempt to make a game with obelisk.js
Hope you like it :D </p>

<p>If the keys doesn't work, click on the game to gave it focus. </p>

<p>The movement is relative to the snake, so you use only de left and right keys. </p>

<p>Enjoy!</p></b>

{% codepen https://codepen.io/sfaedo/pen/AwGjg %}

**5.Title:-IK Snake Game**

**Author:-Danie Clawson**
<p>Using a bit of inverse kinematics for a fancy snake game</p></b>

{% codepen https://codepen.io/cl4ws0n/pen/pjVqbY %}

**6.Title:-Classic SNAKE game in BRICK GAME style**
**Author:-Nooray Yemon**


{% codepen https://codepen.io/yemon/pen/LzZYZe %}

**7.Title:-interactive snake game**

<b>Author:-Heiko</b>

{% codepen https://codepen.io/heiko_de/pen/qyKRoY %}


**If You Like This Article then check Out more Examples**
[Javascript Snake Game code](https://gscode.in/javascript-snake/) 
https://gscode.in/javascript-snake/
Introducing React Rapid, a light weight CLI Tool 🛠️ for rapid scaffolding of React apps with CRA under the hood. ⚛️
Tags: react
Published: 2020-12-21 17:34:40

I have built an interactive CLI tool 🛠, [Rapid React](https://www.npmjs.com/package/rapid-react) which automates the repetitive steps involved every time a new React app is setup. Usually developers 👨🏻‍💻go through a time consuming process which involves waiting for create-react-app to finish it’s boilerplate setup, followed by installation of dependencies & dev dependencies, setup of folder structure, routing, state management, e.t.c. before it can finally start working on the app. 🚧

Well, now you can grab a cup of ☕️ while **Rapid React** scaffolds the app for you! 😌

Features 🎉

- As light as 15.6 KB, minified and gzipped.
- Supports both JavaScript and TypeScript. 😍
- Installs both dependencies and dev dependencies.
- Supports popularly used CSS preprocessor SASS! 🔥
- Choose from commonly used folders (assets, components, hooks, services, utils, e.t.c.) to scaffold.
- Scaffolds custom folder as well.
- Choose preferred export type: named/default. 🤔
- Setups routing with user defined routes.
- Setups Redux state management with user defined reducers along with:- Redux Saga- Redux Form- Redux Logger
- Setups MobX state management with user defined stores.
- ...and much more! 🎉

Check the package here: https://www.npmjs.com/package/rapid-react
Check the repository here: https://github.com/vinaysharma14/rapid-react#readme

Try it out and let me know your thoughts! 🥳

```bash
$ npm install rapid-react
$ rapid-react
```
Promise.reject()
Tags: javascript, codenewbie, beginners, webdev
Published: 2020-12-21 17:32:09

```js
new Promise((resolve, reject) => reject("Error"))
  .then((value) => console.log(value))
  .catch((error) => console.log(error)); // 'Error'

// Instead do this,

Promise.reject("Error")
  .then((value) => console.log(value))
  .catch((error) => console.log(error)); // 'Error'
```

---

**Thanks for reading 💙**  
Follow **@codedrops.tech** for daily posts.  
[Instagram](https://www.instagram.com/codedrops.tech/) ● [Twitter](https://twitter.com/codedrops_tech) ● [Facebook](https://www.facebook.com/codedrops.tech/)

Micro-Learning ● Web Development ● Javascript ● MERN stack ● Javascript  
**[codedrops.tech](https://www.codedrops.tech/)**
Chatwow - Social Networking Made Easy!
Tags: react, node, mongodb, express
Published: 2020-12-21 17:24:57

## What I built
Social Networking web application made on top of MERN stack which allows user to login, signup, create new posts, Delete posts, Follow and unfollow users, like and comment on other posts, update profile pic and much more like a real social media app

## Stack:
MERN Stack Project


**App Link**
https://chatwow.herokuapp.com/signin


## Screenshots
**1.) Login Page**

![Login Page](https://dev-to-uploads.s3.amazonaws.com/i/pw6euma654day9u8ednp.png)

**2.)Signup Page**

![Signup](https://dev-to-uploads.s3.amazonaws.com/i/nklk4e3jexrtc95r3p64.png)

**3.)Home Page**

![Home](https://dev-to-uploads.s3.amazonaws.com/i/w0yvkzvs55t6vp8i0w6i.png)
 
**4.)Profile Page**

![Profile](https://dev-to-uploads.s3.amazonaws.com/i/ia9wacqpskvdmoweld4w.png)

**5.)Create Post Page**

![Create Post](https://dev-to-uploads.s3.amazonaws.com/i/h37osmab3noom5qiymkg.png)

**Link to Source Code**
https://github.com/Jackent2B/chat_wow

### Permissive License
All Rights Reserved


## How I built it 
Used ReactJS as a Frontend Framework along with state management using Context APIs and Hooks to handle client-side, Node.js, and Express.js as the Backend Framework and MongoDB Atlas for maintaining the database. Deployed it using Heroku Cloud Service. 

*Your Feedback is highly appreciated!*

*Happy Coding!*

*-Jayant Khandelwal*

<a href="https://www.buymeacoffee.com/jackent2b" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" style="height: 60px !important;width: 217px !important;" ></a>
Advent of Code 2020 Solution Megathread - Day 21: Allergen Assessment
Tags: adventofcode, challenge
Published: 2020-12-21 17:23:58

---
title: Advent of Code 2020 Solution Megathread - Day 21: Allergen Assessment
published: true
description: Checking ingredients using exceptionally unreliable ingredient marking information.
tags: adventofcode, challenge
series: Advent of Code 2020
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/zam5u87mhzyzmowac572.png
---

Whew.  Finals weekend this weekend put me way off my pace.  I'm still trying to finish up the math one from a few days ago.  But I'm not giving up!  Four more days!  It looks like I'm not the only one either, with only two submissions yesterday!  It definitely was a tough one.

## The Puzzle

In [today’s puzzle](https://adventofcode.com/2020/day/21), we're simply trying to feed ourselves, but it's not going to be easy.  The foods are listed with some of the allergens that are present.  But not *all*, necessarily.  So.  Deal with that uncertainty. 

## The Leaderboards

As always, this is the spot where I’ll plug any leaderboard codes shared from the community.

```
Ryan's Leaderboard: 224198-25048a19
```

If you want to generate your own leaderboard and signal boost it a little bit, send it to me either in a DEV message or in a comment on one of these posts and I'll add it to the list above.

## Yesterday’s Languages

Updated 09:23AM 12/21/2020 PST.

| Language   | Count |
|------------|-------|
| Python     |     1 |
| JavaScript |     1 |

Merry Coding!
Guide to Deploying Applications to Akash DeCloud
Tags: akashnetwork, blockchain, decentralizedcloud, deployment
Published: 2020-12-25 10:57:15

---
title: Guide to Deploying Applications to Akash DeCloud
published: true
date: 2020-12-21 17:22:04 UTC
tags: akashnetwork,blockchain,decentralizedcloud,deployment
canonical_url: https://medium.com/coinmonks/guide-to-deploying-applications-to-akash-decloud-b35dc97e5ca4
---

[![](https://cdn-images-1.medium.com/max/2600/0*t94ZM0Q8tPwpP9f0)](https://medium.com/coinmonks/guide-to-deploying-applications-to-akash-decloud-b35dc97e5ca4?source=rss----721b17443fd5---4)

Learn to deploy any containerized application on the decentralized cloud

[Continue reading on Coinmonks »](https://medium.com/coinmonks/guide-to-deploying-applications-to-akash-decloud-b35dc97e5ca4?source=rss----721b17443fd5---4)
Skelton Hunter Card | Design to Html CSS Begginers
Tags: html, css, codenewbie, codepen
Published: 2020-12-21 17:16:41

 Skelton Hunter Card | Design to Html CSS 

 Demo=> https://codepen.io/Bilal1909/pen/zYBWEpg

<img src="https://i.postimg.cc/QtNWM34Z/Pngtree-creative-halloween-cartoon-character-painting-5507843.png" alt="">
Creating a Youtube Channel on Coding for Noobs
Tags: youtube, html, css, react
Published: 2020-12-21 17:11:57

Hi there! Hope this post reaches you out well! I am relatively new to this world. To put it in a nutshell, after losing my job as a Content Marketer some months ago, I attended a 3-month bootcamp on coding and few weeks after I found a job as a frontend web developer. And every single day  I am learning new cool things!

I decided to open a YouTube Channel to help people like me, who were completely unaware of how cool all this is. You know, to help people dive in. That's why I thought the name Dev4Noobs was quite appropriate.

I wanted to write this post to ask you for some kind of advice: what type of content would you suggest me doing? Long or short videos? Do you thing there is a lack of videos on any specific topic worth looking at? 

This is the account so far:
https://www.youtube.com/channel/UCtxh0DXIjizByJ1Rzq72Qog

Thanks in advance for your time!
Stay safe!
The process of using Apollo Client from scratch and thinking of a better cache implementation.
Tags: react, graphql
Published: 2020-12-21 17:09:43

## 1. When graphql doesn't need a cache.
Basically, it uses InMemoryCache in the first place, so by default it will be saved automatically.

```tsx
const client = new ApolloClient({
  cache: new InMemoryCache({});
});
```

I have not used the so-called cache control methods such as `readQuery`, `readFragment`, etc. much.
In fact, I was at a loss to figure out how to use this method successfully in a case where my app needed rich data binding.

## 2. Initially
I achieved my goal by putting data into `useReactive` and then updating this data cleanly when it changed.

```tsx
const cache = useReactive(userCache);

// Updated...
const updatedUser = ...
userCache(cache, { ...updatedUser } ); // It's hardest when it's nested.
```

However, it is a pain in the ass to change the data in this way. In the first place, there are so many times to change the data that it becomes a little difficult to handle. For example, graphql returns an array of data from related tables that are nested more than 5 layers deep, and it is stupid to change them honestly every time.

## 3. The next thing I thought of was `refetch`.
This is the most reliable method now, but the worst in terms of performance.

```tsx
const { refetch } = useQuery(USER);

// Updated...
refetch().then();
```

As before, we no longer have to foolishly update the data, we only have to throw another query to bring the data up to date.

## 4. In the end
I settled on caching the data in the `InMemoryCache` on initial load, and refetching the data with `cache-only` when updating the data.

#### initial load
```tsx
const { loading, data } = useQuery(USER, {
  fetchPolicy: 'no-cache',
});
```

#### updated
```tsx
const { refetch } = useQuery(USER, {
  fetchPolicy: 'cache-only',
});

// Updated...
refetch().then();
```

I don't know what approach I will change to in the future, as I am still working on Apollo currently. I'm still learning every day.
To be honest, I know that I should study the Fragment area properly, but I haven't been able to do so yet.

I'm happy to say that I've managed to avoid the worst case scenario of data inconsistency.

## Finally
If anyone reading this knows of a better caching strategy for the Apollo Client, a good document (other than the official one), or an easy way to do it, I would be very happy to hear about it.
Solving day 21 of Advent of Code 2020 in JavaScript
Tags: challenge, adventofcode, javascript, video
Published: 2020-12-21 17:09:31

---
title: Solving day 21 of Advent of Code 2020 in JavaScript
published: true
description: JavaScript walkthrough of Advent of Code 2020 (day 21)
tags: challenge, AdventOfCode, javascript, video
series: Advent of Code 2020 in Javascript
---

{% youtube neyVqICk-a8 %}
Java: How to work with files? Lifehacks for beginners
Tags: java, file, tutorial
Published: 2020-12-21 17:09:16

**What does it mean "file" or "usage of files"?**

Working with files means reading from a file and outputting into a file, not working with the console.

**Can you work with the console and files at the same time?**
 Of course, you can. 

Usually, the files are in _txt_ format, so make two files "input" and "output" (or every name you like), better in the folder of project, otherwise you need to write then the direction of file. 

**And here are the lifehacks how to deal with them:**

*1. There can be a mistake while trying to read your file. Make sure you've written file "location" correctly.

*2. Moreover, if you are sure, there will be no mistakes, USE
try&catch, otherwise your program is not correct.

_Here is the example:_
`try (...) { ... } catch (IOException e) {  e.printStackTrace(); }`

*3. Better to work with _BufferedReader_. 

`String inputFileName = "input.txt";`

 `try (BufferedReader reader = new BufferedReader(new FileReader(inputFileName))) { ...`

And so with a writer: work with _FileWriter_

`try(FileWriter writer = new FileWriter("output.txt", false) { ...`
      
 `catch(IOException ex){ System.out.println(ex.getMessage()); }`

*4. If you are writing into a file during "for" or "while", remember to start your _try_ before.

*5. So if you work with line reading, you have more opportunities than with symbol reading. There are more and better functions for _string_.

*6. You can use this "try" for writing once. Why? Because you close "try" and then start a new one, so... you start writing into your file like for the first time.

*7. How do we read with lines? 
`while ((line = reader.readLine()) != null) {}`

While your line (a simple string) is not empty. It takes a line from a file every time until it is empty, so you work with lines.

*8. How do we write?
`writer.write(line);`
`writer.flush();`

Remember, that numeric symbols should be converted into string before writing

That is a small help for all beginners, that want to get accouanted with files, everything else is the same. If you need some help, you can write me anytime. Good luck in your job!
The accidental rollback before the holidays
Tags: devjournal, webdev
Published: 2020-12-21 16:59:46

Twas the day before holiday break, when all through the repo,
Not a pull request was stirring, not even a fix for a typo;

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

The week’s feature updates were shipped early in the week with care,
In hopes that Friday would be a day without deployment fare;
The new chart behind a feature flag, while the backend fixed data strays, 
And Sofia shipping new design work, and I with one last polish pre-holidays,
Had just settled in for a Friday of meetings,
Thinking the only things to send were holiday greetings-

<br/>
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/b0xetc9qcmz3p7mr7f4i.png)
<br/>


When out of the feedback Slack channel there arose such a clatter,
That Sofia and I sprang to see what was the matter.
Through the code we traced like a flash,
Threw open the deployment logs, threw up the Rollbar dash.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/2dxp8ny51vomrs8iepbg.png)

Tall bars shadowed the day the network config change was shipped,
Gave the illusion that a change on a different platform had slipped,
When, what to the clouding platforms and services view would clear,
But a different version of the network config in the deploy logs should appear;

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

With some help of a publishing yaml file with a developer email,
We learned who the rollback had come from, the specific individual;
More rapid than eagles the @ tags they came,
To the person who deployed, did you mean to make this change?
With the questions, so lively and quick,
The person knew they had messed up with that one click.

<br/>
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/asz22n7qf6env2potn64.png)
<br/>

As dry leaves before the wild hurricane fly,
So after releasing the latest version, the error report was dry;
Such holiday cheer to not be stuck in an error trance,
Of each little failed network POST request,
As I drew in my head, and again the merge request board was clear,
Happy Holidays, and the accidental rollback was fixed before the New Year!
<br/>
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/dbmthwcqkhff5hw0m6ty.png)
<br/>

> Based on “A Visit from St. Nicholas”, by Anonymous in 1823 

> Original digital art using XP-PEN and Krita 

> Featuring Sofia Levin, my teammate

> Dedicated to Johnathan Angarita Romero: To my teammate in the international worker struggle, Happy Holidays!
How come no one told me about Codingame's Clash of Code?!
Tags: javascript, programming, games, practice
Published: 2020-12-21 16:54:57

# What's [Clash of Code](https://www.codingame.com/multiplayer/clashofcode)?
Clash of Code is a game to improve your coding efficiency by _solving short programming problems with other people, at the same time._ Players share their solution at the end of a game to help other players improve their coding skills.

## Cool features
* Improve your problem-solving skills
* Learn from other people’s code
* Practice coding interview questions

### [I thought about making a similar game](http://jamstackattack.com)

What are you waiting for? [Go play now!](https://www.codingame.com/multiplayer/clashofcode)
🔥 How to check if something is an array in JavaScript
Tags: javascript
Published: 2020-12-21 16:47:23

Internally, there is no type called “array” in JavaScript. When used on an array, `typeof` returns `"object"` instead.

To check if something is an array, use `Array.isArray()` instead.

```js
// `typeof` an array returns “object” because JS has no type called “array”.
typeof ['a', 'b', 'c']                     // ⇒ "object"

// The array is treated like this equivalent object.
typeof { 0: 'a', 1: 'b', 2: 'c' }          // ⇒ "object"

// Use `Array.isArray` instead of `typeof` to test if something is an array.
Array.isArray(['a', 'b', 'c'])             // ⇒ true
Array.isArray({ 0: 'a', 1: 'b', 2: 'c' })  // ⇒ false
```