teleren/devto huggingface dataset:
What is the execution context in JS?
Tags: javascript
Published: 2020-09-06 17:12:52

If you've written any code in Javascript, you've interacted with the execution context and execution stack. It's a high-level concept that happens behind the scenes of javascript. You don't need to know anything about it to start coding in Javascript. But understanding the basics will help you avoid code that won't execute, and understanding it well will help you debug code that executes in a way you don't expect.

Loading a javascript file into a browser creates a global execution context. Every time a function in that global context is called, a new function execution context is added to the execution stack. The last function called is the first function to be cleared off the stack. This is referred to as **Last In First Out (LIFO)**. 

The execution context is removed from the stack after executing a return statement, or all code has been parsed. There can only ever be one execution context running at a time, but that execution context may be paused at any time to enter a new execution context. [ECMAScript refers to this as the *running execution context*.](https://www.ecma-international.org/ecma-262/#sec-execution-contexts)

___ 

An execution context contains at least three properties: a variable object, a scope chain, and thisBinding. 


#### Variable Object
The variable object contains the variables and functions declared inside of the current execution context, and if this execution context was created by a function it also contains the function arguments. This is when hoisting happens, [you can read my article about that](https://dev.to/javila35/hoisting-4b80).

#### Scope Chain
Contains the current variable object as well as the variable object of the outer context *(execution context on the stack one below the current execution context)* variable object. If the current execution context is the global execution context there is no outer context.

#### thisBinding
Gives the current execution context access to `this` keyword.
Sunday Night CSS
Tags: codenewbie, beginners, css
Published: 2020-09-06 19:12:00

Here we are on a Sunday night, and I'm undertaking a tedious task - trying to draw the HTML5 logo (above) using pure CSS and no images.
As someone with a background in CAD and at least a basic grasp of photoshop, it feels like having both hands tied behind my back and painting a picture with my toes...
Having said that, the task has done what it set out (I hope) to do, and I am infinitely more comfortable with CSS's graphic potential than I was this time two days ago. 
It seems that even though CSS's primary use was never intended to be for making colourful shapes, there are enough little loopholes in it that some clever folk started making punchy little elements in an array of shapes.
You have the 4 bordered edges of a traditional "block" shape which can be manipulated to form triangles and trapeziuses, standard squares with "transform" to make rhomboids and diamonds, the radius  property to make circles and soft edges.
Then you have the option of using an element's inherent pseudo-elements ::before and ::after to give extra little details, make more complex shapes by overlaying the originals, or even whole new shapes. 

https://www.popwebdesign.net/drawing-unconventional-shapes-with-css.html is a great visual explanation of border-based and shadow-based shapes.
CSS-tricks has a good article with examples on using ::before & ::after: https://css-tricks.com/the-shapes-of-css.
And this lady just has fabulous skills as a CSS artiste: https://blog.prototypr.io/how-i-started-drawing-css-images-3fd878675c89.

Is there any real merit in designing shapes purely in CSS? Would it be an indication of a sub-par dev if I was to import images I had drawn in photoshop and place them on a site? I can see it's good to know and useful on occasion (to overlay a "Sale" sticker or similar) to use the CSS, but surely when making graphics using an intuitive graphical interface like photoshop (or even trusty old MS paint) has to be the best option. Open to opinions!
"How to realize that" question
Published: 2020-09-06 18:57:14

Hi everyone, I launched a review website recently and while was looking through my competitors in the niche found this one guy https://www.talkaboutsleep.com/. If you press any link from that website pointing to Amazon you'll get to .uk,.de etc. zones, depending on your current location. And I bet that thing boost conversion rate a lot, so my question is about how it can be realized. I was told that when you're becoming approval from amazon to participate in an affiliate program they provide you with some solutions like that. Probably that's the thing, but I am not 100% sure
The worst captcha ever, Squat captcha!
Tags: javascript, faceapi, api, captcha
Published: 2020-09-06 18:34:57

---
title: The worst captcha ever, Squat captcha!
published: true
description: The best way to validate if the user is a real person.
tags: javascript, faceapi, api, captcha
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/dt2903po0tqrhikm46s6.png
---

## Information

This captcha forces you to do 10 squats to continue.

This demo works with chrome/firefox, desktop environment and also a webcam is required.

## Demo

[Simple form with Squat Captcha](https://vivirenremoto.github.io/squat_captcha/sample-form.html)

Click the button and enable the webcam to try this infamous captcha.

## Video

{% youtube n_m60OrM2C4 %}

## Technologies

- Javascript
- [face-api.js by Vincent Mühler](https://github.com/justadudewhohacks/face-api.js/)

## Chrome extension for Amazon

Prevent compulsive purchases on amazon, after installing this extension you are forced to do 10 squats to buy any product on amazon.

To install unzip the file and load it on chrome as unpacked extension.

[https://github.com/vivirenremoto/squat_captcha/raw/master/chrome_amazon_squats.zip](https://github.com/vivirenremoto/squat_captcha/raw/master/chrome_amazon_squats.zip)

## Source code

[https://github.com/vivirenremoto/squat_captcha](https://github.com/vivirenremoto/squat_captcha)
Frustration learning MERN from LAMP
Tags: php, react, node, database
Published: 2020-09-06 18:34:25

16 years ago my journey into PHP started with a Lynda PHP tutorial and some basic HTML/CSS from school and LAMP server. Took 10 years but eventually reached my goal of creating a successful SaaS product.

Every now and again new trends popup and from where I'm sitting MERN is the next step, but let's look at what I know:
- MongoDB: No more structure just JSON "collections" and indexes for optimization
- Express: APIs, probably the thing I should learn the most about yet know the least about
- React: Reusable components. HTML/CSS/JS = a Button or List or Card. Data goes down the component tree, events go up the component tree. Git repos for components sounds cool. fml
- Node: If chrome was running a on my hosting

For fun let's compare that to LAMP:
- Linux: an IP address, a username usually root and a password then google for commands, but always first "sudo apt update" then "sudo apt upgrade"
- Apache: something people used to fight about if it's better than nginx, but then they stopped
- PHP: <?php echo "just the best"; ?>
- MySQL: /phpmyadmin

As SaaS is high value task building a user authentication system with a few different tiers is always a good start and in LAMP this would be as simple as copy a few lines of code from my latest project, $_SESSION=['PAID'] and off to the races.

In MERN basically everything is stored in the browser so you need JWT to authenticate anything stored in the server-side database that is protected. This is frying my brain going through all the different methods. The moment your API key makes it way to the browser its game over so my guess is Node renders a token into the session... Don't want to pass it to a 3rd party to handle authentication, simple email and password is the goal.

Keeping the database safe (if more than 3000 records are lost you legally have to disclose) is my #1 concern. Client-side seems so much more difficult in MERN.

What am I missing?
Golang Web - HTTP Method: GET & POST
Tags: go, programming, backend, webdev
Published: 2020-09-06 18:29:43

A route handler usually accepts any type of request, in that sense: regardless of the type of HTTP method, it will still enter one handler (such as POST, GET, etc.).

# PRACTICE
So learn and practice this code.

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

Struct *http.Request have a Method name material that can be used to check the method rather than the Request that`s in motion.

In the above example, the request to the route / method POST will generate the text POST output, while the method GET will produce the text GET output.

# TEST
Use the POSTMAN or tools to encourage testing. Here is a sample of the request by Method GET.

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

While below is Method POST

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

If the method is instead of the GET and POST, then per the source code above, the request should have produced a response 400 Bad Request. Below are the example of the request by method PUT

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/1a3bbyb7lnvpr1iwq2sn.JPG)

So finally! Enjoy it.
Run GitHub Actions locally
Tags: github, actions, docker, cicd
Published: 2020-09-06 18:28:23

GitHub Actions are a great way to run continuous integration and continuous deployment tasks. Actions are defined using YAML files and there are tons of existing ones which you can use to develop a pipeline. However Actions should be run on GitHub to know the output, which means at development it is not possible to run Actions and test them.

[act](https://github.com/nektos/act) provides a way to run Actions locally. This simplifies the development of actions and running them locally. Therefore this gives faster feedback for the developer.

## Installation

```
$ brew install nektos/tap/act #for macOS
$ curl https://raw.githubusercontent.com/nektos/act/master/install.sh | sudo bash
$ choco install act-cli #for choco
$ scoop install act #for scoop
```

## Usage

Make sure you have Actions defined in `.github/workflows/` directory

To confirm this run,

```
$ act -l
```

To run all

```
$ act
```

To run a specific job, use `-j` flag,

```
$ act -j test
```

To invoke an event,

```
$ act pull request
```

The complete list of flags are available [here](https://github.com/nektos/act#flags).
Five 10-second tips to help you win your next technical interview
Tags: webdev, interview, jobs, tips
Published: 2020-09-06 18:12:57

1. **Use a 2-minute timer**: After each question, set a timer for 2 minutes. If you're still talking when it hits 0, that's your cue to ask, "Have I answered your question?"
1. **Silence is death. Keep thinking aloud**: When attempting to solve a technical problem, the goal of the Hiring Manager isn't to see your solution. Their goal is to learn how you think and talk.
1. **This isn't real-world. Make sure they know you know**: During the interview, you'll get a white board, yourself, and one-two hours. On the job, you'll get the internet, co-workers, and a full day. Don't let them misjudge you based on all the corners you must cut in order to solve their challenge.
1. **Admit you don't know. Then sell them on what you do know**: If you are smart, you're applying for a job that's a bit beyond your skill level. If you're smarter, you understand that, and you understand how you can fill gaps in their team in return for knowledge transfer. Admit your skill set, and persuade them by knowing theirs.
1. **Observe them closely in search of joy**: If you sense a lack of passion, eagerness, imagination, empathy, or any other qualities you would want in leadership, management or mentors...beware of accepting any offers. What you observe likely represents a team culture you may not want to join.
Coaching and mentoring
Tags: coaching, mentoring, career
Published: 2020-09-06 18:09:13

---
title: Coaching and mentoring
published: true
description: Opportunity for free coaching and mentoring 
tags: coaching, mentoring, career
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/xk13q03avsip8wsdlpbj.jpeg
---
One of the most valuable boosts you can get in your engineering career is the guidance of a good coach or mentor. This isn’t always easy to achieve. Not many companies and managers, especially in smaller businesses, take this role as seriously as they should. I’ve seen the difference it can make and I now have the opportunity to assist others. 

So, I’m offering three monthly coaching slots for engineers who want that boost.  These sessions will be free and run remotely. If we meet in person post-pandemic you can buy the coffee!

I’m giving priority to engineers from groups often underrepresented in engineering, be that on the basis of gender, religion, race, disability, etc. 

So if you’re interested drop me a message and I’ll arrange an initial chat. 

If you want to know a bit more about me take a look on LinkedIn: https://www.linkedin.com/in/adam-piechocki-brown-engineer/
A quick guide on LSTM and how to implement it using python
Published: 2020-09-06 18:06:21


[A quick guide on LSTM and how to implement it using python.](https://lnkd.in/gdN9_vC)

#machinelearning #python #datascience #scikitlearn #timeseriesanalysis #timeseriesforecasting #ai #timeseriesclassification
Ways to boost your Computer Vision Projects by using 5 Open-Source Facial Recognition Projects
Tags: computerscience, datascience, python, machinelearning
Published: 2020-09-06 18:05:17

###Read about some of the ways to boost your computer vision projects by using these Free Open-Source Facial Recognition projects.

[Ways to boost your Computer Vision Projects by using 5 Open-Source Facial Recognition Projects](https://lnkd.in/gBJSFEu)

#machinelearning #datascience #computervision #artificialintelligence #deeplearning #python #scikitlearn
Data science courses in Python, R, SQL, and more | DataCamp
Tags: machinelearning, python, computerscience, datascience
Published: 2020-09-06 18:03:10

###Having good theoretical knowledge is amazing but implementing them in code in a real-time machine learning project is a completely different thing.
###I have noticed that DataCamp is giving unlimited access to all the courses for free for one week starting from the 1st of September through 8th September 2020, 12 PM EST.
So this would literally be the best time to grab some yearly subscriptions which basically has unlimited access to all the courses and other things on DataCamp and make fruitful use of your time sitting at home during this Pandemic.
So go for it folks and Happy learning.

[Data science courses in Python, R, SQL, and more | DataCamp] (https://lnkd.in/g5f4daM)
#machinelearning #datascience #ai #scikitlearn #datacamp
A Quick Guide on Missing Data Imputation Techniques in Python(2020)
Tags: machinelearning, python, datascience, computerscience
Published: 2020-09-06 18:01:45

## machine learning algorithms expect complete and clean noise-free datasets, unfortunately, real-world datasets are messy and have multiples missing cells, in such cases handling missing data becomes quite complex.

[A Quick Guide on Missing Data Imputation Techniques in Python(2020)](https://lnkd.in/gFPHbwa)

## In this article, I have discussed various techniques to tackle and to deal with missing values in your dataset, also how you can impute missing values.

###Thanks
#datascience #machinelearning #python #scikitlearn # #ai #algorithms #artificialintelligence # #data
Top 5 Open-Source Transfer Learning Machine Learning Projects
Tags: machinelearning, python, computerscience, opensource
Published: 2020-09-06 17:59:01

##Transfer-Learning makes the training of your model easy and also increases your accuracy!

##Read about some of the best open-source transfer learning projects you can use to learn and implement in your projects.

[Top 5 Open-Source Transfer Learning Machine Learning Projects](https://lnkd.in/gi3UwGW)

[#machinelearning #datascience #ai #python #deeplearning #artificialintelligence #training #scikitlearn #computervision #transferlearning #ml]
100DaysOfCode | Day 31, 32
Tags: challenge, python, beginners, 100daysofcode
Published: 2020-09-06 17:50:18

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

Hey everyone, first of all, I wanna say thank you so much for following me and supporting me in the community.
Let's talk about my progress since 2 days ago ...
My homie [Amir](https://dev.to/amirdarx) and I, are working on a project which is a web application that is so incredible.
I'm working as a back-end developer and he's doing front-end and UX and UI.
This is the first project that we are working together as co-workers :)
So excited to share with you the final project, I promise that it will be so amazing.

I'm really working hard on it because that's the first time that I'm working with  Flask, I had no experience with back-end and things like that, so I need to work as hard as I can to understand the concepts.

I have to learn __SQL__ too, cause It would be necessary for me as a back-end developer, and at the same time, I need to improve my problem-solving.


![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/oae0jfkf53f8sjasuomg.jpg)<figcaption>__Remember this sentence forever!__</figcaption>

#Keep Moving Forward ツ

##Enjoy Your Journey 👊

##Code with 💛

__🅑🅐🅝🅙🅘__
Insert something in the middle of an array
Tags: beginners, webdev, javascript, codenewbie
Published: 2020-09-06 17:41:15

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

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

Micro-Learning ● Web Development ● Javascript ● MERN stack  
**[codedrops.tech](https://www.codedrops.tech/)**
Visualising documentation: JavaScript array.map
Tags: javascript, beginners, tutorial, codenewbie
Published: 2020-09-06 17:39:34

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

Today’s function is array.map(), mdn description [here](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map). 

Map applies the function it's given to every element in the array, and returns a new array with each transformed element inside it.

It's interesting to consider when to use map vs other core functions that could have the same effect, for example [array.from()](https://dev.to/charlottebrf_99/visualising-documentation-javascript-array-from-12n3). Would welcome comments on trade offs.

I've done my own version of the docs with sketches together. Here’s the folder for [array.map](https://github.com/cfereday/javascript-core-functions/tree/master/arrays/do%20not%20mutate/returns%20a%20new%20array/map). Check out the [readme](https://github.com/cfereday/javascript-core-functions/blob/master/README.md) to see how you can run the examples.
My #100DOC - Day 11
Tags: 100daysofcode, challenge, log
Published: 2020-09-06 16:42:00

### Day 11: September 6, 2020

#### **Today's Progress**: 
1. **[Worked on my Addicted Developer Twitter Bot project](https://github.com/pablohs1986/addictedDEV_TwitterBot)** (2h):<br>I modified the tweetMasters100DocProgress() method to reference the current date to set the challenge day. I also wanted that function to run once a day, for which I first tried with the [Node-Schedule](https://www.npmjs.com/package/node-schedule) package, which was not working inside Heroku :( so I changed it to [Node-Cron](https://www.npmjs.com/package/cron), which is working perfectly. I want implement more functionalities on the bot, but that will be later, now I want to focus on the courses.
2. **[Continued with The Complete JavaScript Course](https://github.com/pablohs1986/javaScriptCompleteCourse2020_Schmedtmann)** (32min):<br>In video 50 I reviewed the use of the ternary operator and I learned how to add, remove and toggle HTML classes.
    
#### **What I learned**: 
* How to handle dates in JavaScript.
* Schedule functions with amazing packages like [Node-Cron](https://www.npmjs.com/package/cron).
* Review of the ternary operator in JavaScript.
* Add, remove and toggle HTML classes in JavaScript.

#### **Total time**:
2h 32min.
Weekly Links – 8/13
Tags: uncategorized
Published: 2019-08-15 13:08:34

---
title: Weekly Links – 8/13
published: true
tags: Uncategorized
canonical_url: 
---

Hello all, I’m trying to resurrect this post type, and below are some links I found interesting.

### Cloud:

- [Better security with enhanced access control experience in Azure Files](https://azure.microsoft.com/en-us/blog/better-security-with-enhanced-access-control-experience-in-azure-files/)
- [Azure publishes guidance for secure cloud adoption by governments.](https://azure.microsoft.com/en-us/blog/azure-publishes-guidance-for-secure-cloud-adoption-by-governments/)

### DevOps / Development Tools:

- [Getting Insights into your team’s health with Azure Board Reports](https://devblogs.microsoft.com/devops/boards-analytics-reports/)
- [What’s new with Azure DevOps Sprint 155](https://devblogs.microsoft.com/devops/whats-new-in-azure-devops-sprint-155/)
- [Visual Code Update July 2019](https://code.visualstudio.com/updates/v1_37)

### Mobile:

- [Optimize your Xamarin.Android Builds](https://devblogs.microsoft.com/xamarin/optimize-xamarin-android-builds/)
- [Add Contact features in 4 lines of Code with Xamarin.Essentials](https://devblogs.microsoft.com/xamarin/contacts-app-email-sms-phone-navigation-with-xamarin-essentials/)

### Podcasts / Videos:

- [Ethics and Bias in AI with Amber McKenzie](https://www.dotnetrocks.com/default.aspx?ShowNum=1646)
- [A conversation about SLA for Azure SQL Database](https://channel9.msdn.com/Shows/Data-Exposed/A-conversation-about-SLA-for-Azure-SQL-Database)
- [Terraform on Azure Government](https://devblogs.microsoft.com/azuregov/terraform-on-azure-government/)
I want to share a Notion collection with 200+ resources to create websites
Tags: webdev, lists, collection, resources
Published: 2020-09-06 16:28:32

Hello, this is the first time I post here, I love this community, every week I just read so amazing posts of the community, but I've never had something to share until now. 

I am a web developer and I used to think the easiest and quickest way to create a landing page it was using WordPress, but in this pandemic, I learned so much about how to build a website and now I think completely different, now I know great frameworks like Gatsby, Nextjs, TailwindCSS or StrapiJS. This is why I wanted to create a collection of resources I just conserved on my bookmarks many of them help me to create websites and hopefully someone can use this collection to create their amazing next product. 


https://www.notion.so/Build-websites-is-easy-b3b8bf99c19a40f9928a936858fae416
Node JS Master Course
Tags: node, javascript
Published: 2020-09-06 16:19:48

---
title: Node JS Master Course 
published: true
description: Node JS Master Course 
tags: nodejs, javascript
cover_image: http://img.youtube.com/vi/Mu3zUZY3drA/0.jpg
---


https://www.youtube.com/watch?v=Mu3zUZY3drA&list=PLIGDNOJWiL18Rh8ymQgXnIwtg_Qx0fkXf

- Crash course Node JS 
- Node JS with Mongo DB
- Node JS with Mysql + sequelize ORM 
- Node JS with TypeORM, Typescript
- Node JS with NestJS 
- Node JS with Graphql 

I have covered everything about Node JS in detail which can help in any kind of development with Node JS