teleren/devto huggingface dataset:
Creating a Subscription Application with Nodejs and MongoDB
Published: 2020-08-04 19:21:03

Hey There, 
This tutorial will take you step-by-step through building a fully functional subscription-based platform. Along the way, you’ll learn about Express.js a web application framework for Node.js.

**What we are building.**
We want to build a subscription-based platform, where customers will need to subscribe to one of our plans to access our content some of our plans include Weekly, monthly plans.

**This article will be broken into Modules.**

1:Overview of dependencies, project setup, and server setups.

2:Authentication

3:Cron job setup

**Main Dependencies**

1:Nodejs must be installed

2:MongoDB database

3:Momentjs

4:node-cron 

5:v-response 

So guy's let get our hands dirty 

**S**erver.js file 
 Where we will be starting our development server,
 On a successful server setup in your console, you should have 
 this logged.

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

**N**ow let's create our plan model file
 
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/835ghoan82438sdysjac.png)

**N**ow let's create our plan controller file

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

**N**ow let's create our plan route file
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/3ijav7u83ojzqw5zvdi4.png)

**N**ow we need to create our helper file for payment and calculating user next payment date 

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

**N**ow let's create our Signup model file
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/irmfguyqww7b83uxkp3c.png)

**N**ow let's create our Signup controller file where we will write our logic to register a user as well as charge the user 
for the payment, we will be using paystack but feel free to use any payment gateway.

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

**S**o we need to configure our login to only allow subscribed users 
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/4zt858jau5mua8xvtjdv.png)

At this point, we need to set up a cron job to deactivate account once the subscription ends

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


Other Features that can be added to this includes but not limited to :
Auto-renewal 
Notification 

And if you will like to Have this in part two of this article do let me know in the comment section 

 [Source code](https://github.com/waletayo/SubscriptionBasedApp)
Machine Learning Log: how Python works in 1 minute or less
Tags: python, beginners
Published: 2020-08-04 19:16:59

Python is a general purpose programming language that is popularly used for Machine Learning, so I am spending some time getting acquainted with its syntax, before continuing my exploration of Machine Learning. 

Today I will start with a brief explanation of how Python works behind the scenes. How does the computer know what to do with the instructions you write in Python?

Python is a high level programming language, which means that it doesn't communicate directly with the computer. Because Python's syntax is similar to natural language, it is pretty easy to write code in, compared to a language like C, which requires more instructions to get the computer to do something. This means less lines of code for the programmer to write, which makes it a time-saver. 

After the programmer writes the source code, the code is translated into something called bytecode, and then executed on a Virtual Machine (rather than being translated into binary and being executed by the CPU). The machine completes the tasks that are laid out in the code, and the programmer sees the results.  

So, for example, let's say we write an extremely simple program: 

print('Hey there, does this make any sense?')

The compiler takes that and translates it into bytecode. The btyecode is executed by an interpreter. And then we see this on the screen: 

Hey there, does this make any sense? 

And that's a very basic overview of how Python works behind the scenes.
🖌 Handle CSS in webpack | Index
Tags: webpack, css, javascript, beginners
Published: 2020-08-04 19:16:58

# - Index -

|    🔎 Focus on     |     🖌  CSS Handling      | Parts |
|:----------------:|:-----------------------:|:-----:|
|       (**Index**)   |                       |    📌   |
| *development only* |        *inline CSS*    |[1️⃣](https://dev.to/didof/handle-css-in-webpack-inline-css-fho)|
|  *both dev & prod* | *mini-css-extract-plugin*|[2️⃣](https://dev.to/didof/handle-css-in-webpack-extract-css-3i4g)|
|  *production only* |       *CSS modules*    |3️⃣|

# Introduction
One of the first challenges you encounter when approaching *webpack* is understanding how to manage style, especially **CSS**.
In this trilogy three different ways of managing CSS are studied, including each one in its own context of use.

> take a handful of attention - will be worth it

---

## Example code 📜
1. [webpack-inline-css](https://github.com/didof/webpack-inline-css)
2. available soon
3. available soon

---

## [Let's go 🚀](https://dev.to/didof/handle-css-in-webpack-inline-css-fho)
Day 19: Add Habits function
Tags: 100daysofcode, javascript
Published: 2020-08-04 19:14:14

After my one day vacation I am back to work. Took on the initially frustrating add habits function. This is how worked around it.

I wrapped the inputs in a form with an Id of form. In the index.js file I'll get this form element and chain an event listener. I'll pass in a submit event and a function as parameters. The function takes event as a parameter and perform the following operations
* Prevents default action of submit event.
* Gets the value of my inputs and saves them to a variable
*I tried using different variable names other than the database properties and the data wasn't being saved. I don't know why but atleast i know it doesn't work.*
* Passes the captured variables as properties of an object(habit) 
* Sends a post request with a URL and the the object 
* And Lastly reloads the page. 
```javascript
const form = document.getElementById('form');

form.addEventListener('submit', async (event) => {
    event.preventDefault();

    const title = document.getElementById('habit').value;
    const description = document.getElementById('description').value;

    const habit = { title, description }

    const response = await axios.post('http://localhost:4000/habittracker/habits', habit)
     
    location.reload()
  })
```
The results.

{% vimeo 444573790 %}


A shout out to @nathanbarrett for the pointers.

_That's it for Day 19!_
Docker
Tags: docker, basics
Published: 2020-08-04 19:07:34

To start learning you need to have environment, so lets create our lab where you can practice the code.
We gonna setup the lab on Redhat 8
So where you will have Redhat 8 then, well you can use virtualbox or AWS or Google Cloud or Azure, I leave upto you.
I am using Google Cloud, where I have spin up an Redhat Enterprise Edition 8 instance. We call this as our Host machine.

Lets set up the the docker.

# Install Docker on Redhat 8
Officially you cannot setup Docker on Redhat 8, with below steps you can do it.

**Step1:** *Create docker repository* 
sudo dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo

**Step2:** *Install stable docker version*
yum install docker-ce --nobest

ce - represents Community Edition
--nobest - will install the latest stable version

**Step3:** *Enable and validate your Docker*
Once you install your docker, you want it to continuously run, for that enable the docker with below commands.

**sudo systemctl enable --now docker**

This will enable the docker permanently, if you restart your host, your docker will keep running.

After enabling, you can validate with below commands.

**systemctl is-enabled docker**
**systemctl is-active docker**
 
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/zfm87wjghi0j4315c8r5.png)

Now lets check docker version:
**docker version**

If you want to have more information about the docker installed, use 
**docker info**

Thats it, you have your lab ready!!!!
No Risk Negotiation Phrase?
Tags: career, hiring, negotiation, womenintech
Published: 2020-08-04 19:02:24

I was recently asked how to negotiate if the initial offer exceeds one's expectations, which is especially likely if you were previously underpaid, or are the first in your community to go into tech and encounter these kinds of compensation packages. How do you ensure you don't leave money on the table without risking an otherwise fantastic offer getting rescinded?

In my experience, offers don't get rescinded if you go about the negotiation in the right way, meaning: be polite, be direct, and most importantly have a real-time conversation.

It might feel easier to write an email, but that short, stressful negotiation conversation can be a game-changer.

In this video I role play the conversation so that you can practice ahead of time, and be less stressed and more effective in a real negotiation. 

Try it on for size, and let me know how it goes.

VIDEO LINKS:
☆ Don't Let These Six Obstacles Stop You From Negotiating Job Offers:
        https://www.youtube.com/watch?v=mDoltVg6xhw
☆ 22 Phrases to Successfully Negotiate Salary After Receiving a Job Offer:
        https://www.youtube.com/watch?v=FiDcUaoODJE

{% youtube PJTHNbG_hds %}

----

CANDIDATE PLANET:
Empowering candidates to ace interviews, negotiate offers and advocate for themselves at work. Leave a comment or email Lusen@CandidatePlanet.com with questions you want me to answer.

PLEASE SUBSCRIBE \o/:
☆ Youtube ☆ https://youtube.com/CandidatePlanet
☆ Newsletter ☆ http://newsletter.candidateplanet.com/
☆ LinkedIn ☆ https://linkedin.com/in/lus

ONE-ON-ONE COACHING:
Schedule a one-on-one coaching session with me: https://lusen.youcanbook.me/

SALARY NEGOTIATION PLAYLIST:
☆ https://www.youtube.com/playlist?list=PLY0uEDNh-Haqes9eEvyGtzrUWOHv-c1op

ACE YOUR INTERVIEWS PLAYLIST:
☆ https://www.youtube.com/playlist?list=PLY0uEDNh-HarP6UtKFYRJZnkXzz4ICi73
Dólar cierra la semana cambiaria con un ascenso del 1, 56%
Published: 2020-08-04 18:51:19

Al cierre de la semana cambiaria, el viernes último, 17 de julio de 2020, el dólar tuvo un incremento del 1, 56% con relación al día anterior, en el que se cotizaba a G. 6796,40, cerrando su cotización a G. 6.902,74. 
Teniendo en cuenta el comportamiento del dólar en la última semana, se observa un incremento del 2,78%, acumulando aún un alza del 14,88% en términos interanuales. Asimismo, comparando este dato con el de días anteriores, esta divisa ha acumulado ganancias en cinco jornadas consecutivas. 
Por otro lado, haciendo referencia a la volatilidad de los últimos siete días, esta fue menor a la acumulada en el año último, por lo que se observa un comportamiento más estable de lo habitual en relación a los últimos días.
Finalmente, mirando la foto anual, y como la divisa norteamericana llegó a cotizarse en un valor máximo de G. 6.902,74, y un mínimo de G. 6.318,34, esta moneda se encuentra más cerca de su máximo que de su valor mínimo.
Visita mis sitios de información de cotización de monedas
https://cotizacion.com.py/ y https://www.tipo-de-cambio.com/ y https://www.ipparaguay.com.py/telebingo-triple-talisman/ https://www.ipparaguay.com.py/codigo-postal-paraguay/ https://www.ipparaguay.com.py/senete/ https://www.marcasdecoches.info/
CoreLMS: Let's Build a Cleanish, SOLIDish LMS From Scratch in ASP.Net Core
Tags: dotnet, webdev, csharp, learning
Published: 2020-08-04 18:44:59

(I love cheesy stock photos.)

Woo! My first project to be detailed here on Dev (and built [live on Twitch](https://twitch.tv/fitzycodesthings), step by step).

My primary client is a provider of continuing education, primarily online, for professionals, and our legacy PHP web app that acts as both Learning Management System and ecommerce platform is long, long overdue for a ground-up overhaul.

**So let's build it!**

Or part of it, at least. 

## Get the Git

{% github FitzyCodesThings/core-lms no-readme %}

## Project Overview

My goal for this project is to build a functional, basic, and open source learning management system including basic e-commerce functionality.

(I'll then take that core system and build on our more extensive customizations and business processes in closed source.)

**This is a learning project for me.**

My intent is to practice building according to a number of common patterns and best practices that I have less-than-ideal experience with (detailed below), so A) don't expect it to be perfect, and B) follow along and help me get it right!

## Super High-Level Specs:
- Build as a monolithic application (for now)
    - System design lends well to a microservices architecture for possible future exploration
- Basic Stack:
    - ASP.Net Core MVC (starting with 3.1, plan to move to 5.0)
    - Entity Framework Core (ditto)
- Build with base Bootstrap 4 (5?) to support easy theming in the future

## Learning/Demonstration Goals:

I have a number of best practices and patterns that I want to implement (some for the first time) in this production-ready system.

These include:
- SOLID adherence
- Clean Code Architecture
- Repository-ish Pattern with EF Core
- Unit and Integration Testing
- Proper logging (with Serilog?)
- CI/CD
- SPA for course access using Blazor (secondary goal)

## Follow Along, Take Part!

As mentioned at the top, I'll be developing this project live on Wednesdays on Twitch (and possibly other days as my schedule allows). I may occasionally wrap up boring bits off-stream, but all code will be published for open source use at the Github repo above.

I'd be *honored* for you to take part: join the conversation here or on Twitch, drop issues on Github, whatever you like.

## Wrapping Up

Since I already kicked off the planning and early development last week, I'll have another post up very shortly going over the thinking there and with a link to the archived broadcast.

Other than that, I'll be [live tomorrow (Wednesday August 4) at 12pm CT / 5pm UTC](https://twitch.tv/fitzycodesthings) to build a few more entities, start the first business logic service, and add the first unit tests (following TDD as best I can as I learn).

Hope to see you around, and more than anything, I hope it helps ANYONE else get caught up or just learn a few things like I've been needing to!

Cheers,
John / Fitzy
Using Sass in a create-react-app Application
Tags: react
Published: 2022-02-01 13:54:35

---
title: Using Sass in a create-react-app Application
date: 2020-08-04 18:43:06 UTC
tags: react
published: true
canonical_url: https://sabinadams.hashnode.dev/using-sass-in-a-create-react-app-application
cover_image: https://cdn.hashnode.com/res/hashnode/image/upload/v1596566585409/M5hr41m-6.png
---

CSS preprocessors have many cool features such as mixins, nesting, and importing other files that allow for more powerful and organized styling. Although the general rule of thumb in React is to completely segregate components and their styles so they can work independently, which lessens the power of many css preprocessing features, you may still find yourself wanting to use a preprocessor, in this case Sass, for features such as style nesting. This tutorial will show you how!

* * *

## Starting the Project

First off, we’ll need to start a `create-react-app` application. I have a quick tutorial [here](https://blog.sabinthedev.com/starting-a-react-project-with-create-react-app-ckdgdjprt009qeks17xwe11fu) that walks you through the setup. It only takes a few minutes!

* * *

## Install `node-sass`

To use Sass, all you need to do is install the `node-sass` node module. To do that, open up a terminal, navigate into your project folder and run this command:

```
npm install --save node-sass

```

* * *

## Conclusion

Once that has installed, you can go through and rename all of your stylesheets from .css to .scss, although both will work fine. You may now use .scss files wherever you’d like!

Thanks for the read, happy styling!
How to Create React, Vue or TS/JS Projects from the Address Bar 🤯
Tags: typescript, react, vue, javascript
Published: 2020-08-04 18:39:49

Did you know that you could just type [react.new](https://react.new) in the address bar to create a React project? The same applies for Vue, TypeScript and JS too!

Try it!

- [vue.new](https://vue.new)
- [ts.new](https://ts.new)
- [js.new](https://js.new)
- [react.new](https://react.new)

All thanks to CodeSandbox, I bet there are more but I couldn't find a list. 

Did you know about this? Do you know if there are more special URLs?
Curating news and tutorials on technology.

Tags: technology
Published: 2020-08-04 18:26:18

  
https://www.javelynn.com/

Javelynn deals with great content in terms of user generated stories and guest-posts featuring Technology. If you are a blogger, experienced technical writer or a developer who is looking to showcase your work and/or share your knowledge, you have reached the right place.

  We accept articles as Opinions, Tutorials, Reviews, News, Interviews and Analysis – all focused towards Technology. At Javelynn, we take pride in creating a valuable knowledge resource and celebrate sharing.
India's best online shopping website to buy wide range of Original Car and Bike Accessories.

Tags: spareparts
Published: 2020-08-04 18:24:10

https://www.flybhp.com/ 

On Flybhp.com you will find one of the largest collections of car & bike spare parts accessories online. You can find car accessories from trusted brands at affordable prices. Flybhp.com India offers a wide range of aftermarket bike & car filters manufactured by trusted brands. Flybhp.com is your one stop online shop for all your car and bike accessory needs.

FlyBHP.com committed to offer only original branded products in our catalogue online. Say goodbye to cheap quality counterfeit products/brands, and say hello to only original car and bike accessories.
Celebrating 10k followers
Tags: personal
Published: 2020-08-04 18:16:56

Apparently I've reached 10k followers here on DEV. 🎉

I'm usually not someone who's very concerned about the number of followers because I see them as a side effect - I write primarily for myself in order to get better at it, share things I've learned or feelings I've experienced.

If you follow me because you've found the things I'm publishing useful, or you relate to some of the thoughts I've expressed, thank you. 💗 I appreciate it. 🙏

If you follow me but haven't yet read some of my posts, thank you too 💗. I'm looking forward to meeting you in some of my future posts.

### Some stats

I've been on the platform for a little over a year. Have joined on Jun 21, 2019. During that period I've published 36 posts (excluding this one). There's only one in draft. So my published/drafts ratio is actually quite good :)

My most viewed post is:

{% post https://dev.to/dzhavat/flexbox-cheatsheet-inside-vs-code-4d61 %}

A post that didn't get much attention but is dear to my heart:

{% post https://dev.to/dzhavat/making-an-impact-213h %}

So thanks everyone. I really enjoy coming to DEV to meet new people and read a lot of awesome posts. I've learned a lot from you! See you around 🙂

---

<span>Photo by <a href="https://unsplash.com/@gaellemarcel?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Gaelle Marcel</a> on <a href="https://unsplash.com/s/photos/celebration?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></span>.
The 7 Most Popular DEV Posts from the Past Week
Tags: top7
Published: 2020-08-04 18:09:38

---
title: The 7 Most Popular DEV Posts from the Past Week
published: true
description: A round up of the most-read and most-loved contributions from the community this past week.
tags: icymi
cover_image: https://thepracticaldev.s3.amazonaws.com/i/sfwcvweirpf2qka2lg2b.png
---
Every Tuesday we round up the previous week's top posts based on traffic, engagement, and a hint of editorial curation. The typical week starts on Monday and ends on Sunday, but don't worry, we take into account posts that are published later in the week. ❤️

### Ship it in style
@chrissiemhrk shared a very helpful, straight-to-the-point post on writing a high-quality commit message, which is more important than you might think. 
{% link https://dev.to/chrissiemhrk/git-commit-message-5e21 %}

### Be the change!
@misslorsx made the leap from room leader for 3-5-year-olds to web-developer! Their experience practicing empathy in childcare/childhood studies is just what we need in tech.
{% link https://dev.to/misslorsx/changing-career-at-29-childcare-web-development-5h26 %}

### We need all the voices

Thanks, @vtrpldn for this awesome post on how to communicate in English when it's not your first language. This is the kind of advice that definitely transcends tech. 

{% link https://dev.to/vtrpldn/technical-writing-tips-for-non-native-english-speakers-4fno %}

### console.log("%cWARNING: you will be obsessed with folklore")
@lizziepika compares Taylor Swift's most recent album (Folklore) to 6 lesser-known JavaScript console methods. Tune in! 

{% link https://dev.to/twilio/6-javascript-console-methods-like-taylor-swift-folklore-lyrics-3h0k %}

### Solicited advice
Thanks, @jcsmileyjr for this collection of sage advice for landing a web-development job from folks who really know what they're talking about!

{% link https://dev.to/jcsmileyjr/what-steps-do-you-need-to-take-as-an-aspiring-web-developer-in-order-to-increase-your-chances-of-landing-a-job-3ih5 %}

### Questions, anyone?
@ashleemboyer shares 10 helpful questions to ask your hiring manager before even doing an interview. These will give you keen insight into what it's actually like to work somewhere before either party spends time on an interview! 

{% link https://dev.to/ashleemboyer/10-questions-i-m-asking-all-companies-before-scheduling-any-interviews-1aoi %}


_That's it for our weekly wrap up! Keep an eye on dev.to this week for daily content and discussions...and if you miss anything, we'll be sure to recap it next Tuesday!_
21 Machine Learning Project Ideas [ Podcast ]
Tags: podcast, machinelearning, datascience, codenewbie
Published: 2020-08-04 18:08:00

Hey there!
   New podcast episode out!
{% spotify spotify:episode:3guNU6V4ZjRjMr0AvO4zFX %}

This is Tharun. In the Developer Tharun Podcast, I talk about programming, web development and related fields.

Thank you for Listening

In this Episode We will discuss about 21 projects that you can do in your final year of engineering I have also told about my Final Year Project and the experience with it So these Machine learning projects will give you an idea about what to do about your own project. I have also given some tips on how to choose and complete a final year project
And more...

Special credits to ml.india from Instagram

{% user developertharun %}
Real time Javascript Object GUI Editor
Tags: showdev, javascript, typescript, news
Published: 2020-08-04 17:53:08

# Object GUI

This is the editor that will be used in the upcoming [tsParticles](https://github.com/matteobruni/tsparticles) options editor.

With this library you'll easily create a realtime javascript objects editor.

This editor supports themes too (for now 'dark', 'light', 'red', 'blue', 'green').

If you want to contribute to this project feel free to join.

---

You can try it yourself, it's available on npm too

{% github matteobruni/object-gui %}

---

Checkout this CodePen sample

{% codepen https://codepen.io/matteobruni/pen/oNxNvja %}

Do you want to see it in action in a big object?

Checkout the tsParticles editor

{% codepen https://codepen.io/matteobruni/pen/mdVOPyL %}