teleren/devto huggingface dataset:
Javascript Interview Questions - Entry Level
Tags: javascript
Published: 2021-06-17 11:55:09

Everyday i will be sharing few Javascript Interview Questions to help you understand the languauge even better.

So lets get started with basic questions that are asked in the interview.

1> what is typeOf operator ?
Ans.  typeOf operator examines the value and tells you what type the value is.

Ex: var a =14;
typeof(a); //returns Number.

2> What is object type ?

Ans. An object type is nothing but a collection of properties with name and value pair.

Ex: var obj = {
        a : "Hello",
        b : 45
}
obj.a //"Hello" accessed with doted notation
obj.b //45

obj["a"]  //"Hello "accessed with bracket notation
obj["b"]  //45

Bracket notation is also helpful if you want to access a property/key but the name is stored in an another variable, such as:

obj b= "a"

obj[b]   //"Hello"
obj["b"] //45

3> Explain array in javascript.

Ans. An array is an object that holds value(of any type) not particularly in named properties/key, but rather in numerically indexed positions. 

var arr = ["hello", 1 , true]
arr[0] // "hello
arr[1] // 1
arr[2] // true

typeof(arr) // "object"

4> what is scope in javascript ?

Ans. Each Function gets its own scope. So Scope is basically a collection of variables as well as the rules for how those variables are accessed by names.
only code inside that function can access the function's scoped variable.

5> Explain equality in javascript.
Ans. Javascript have both strict and type-converting comparions:

strict comparison (eg === checks for value equality without coercion)
Abstract comparison (eg == checks for value with coercion allowed)

Ex:
var a = "42"
var b = 42

a === b // false
a == b  // true

6> what is let keyword in javascript ?

Ans. Es6 lets you declare variable within the individual blocks (pairs of {...}) using the let keyword.

let will not let you declare same variable within the same scope whereas var will simply replace it.

Self Study : Try to understand temporal dead zone, Hoisting 

7> Explain null and undefined.

Ans. null means that it is Currently unavilable.
     undefined means it hasnt been initialized.
 
8> What is Strict Mode ?

Ans. Strict Mode is a new Feature in ECS5 that allows you to place a program or a function in a "Strict" operating context. Strict context prevents from certain action to be taken and throws more exceptions.

Ex. function(){
    "use Strict"
}

9> what is a polyfill ?

Ans. Polyfil is  a piece of code or a plugin that allows the functionality that works on modern browser to also work on older browsers.

10> Explain event bubbling and how one may prevent it.

Ans. Event Bubbling is the concept in which an event triggers at the deepest possible element and trigers on parent elements in nesting order. 

one way to handle event bubbling is event.stopPropgation()

11> what does "use strict" do ?

Ans "use strict" is written at a top of a function or a program that helps you write a safer code and throws error if a global variable is created by mistake.
Auth0 Levels Up Analytics Experience
Tags: security
Published: 2021-06-17 11:53:52

##### With the refresh, customers have access to actionable insights that give them a high-level understanding of their tenant data without the overhead of third-party tools.

We’re excited to announce the first availability of the new [Activity](https://auth0.com/docs/get-started/dashboard/activity) page in Auth0’s dashboard. With the refresh, customers have access to actionable insights that give them a high-level understanding of their tenant data without the overhead of third-party tools.

With [Activity](https://auth0.com/docs/get-started/dashboard/activity) analytics, developers can ensure that their Auth0 implementation is working and report back usage and utility. Security engineers can quickly gauge failed logins and monitor security events for potential audit. And product owners can easily understand usage and relay that information to relevant stakeholders.

The new [Activity](https://auth0.com/docs/get-started/dashboard/activity) page drives more data-driven outcomes by enabling customers to:

- Visualize metrics such as active users and failed logins
- Compare data across previous time periods
- Filter data by specific timeframes
- Segment active users across connections and applications (Coming Soon)


[Read more...](https://auth0.com/blog/auth0-levels-up-analytics-experience/?utm_source=content_synd&utm_medium=sc&utm_campaign=auth0_ux)
Assess your networking and security Skills
Tags: networking, security, skills, techexam
Published: 2021-06-17 11:52:20

![Assess your networking and security Skills](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vgbux79np94k6nx70ij6.png)


### Are you a networking guy? Do you want to brush your networking skills? 

Network security is the practice of preventing and protecting against unauthorized intrusion into corporate networks. As a philosophy, it complements endpoint security, which focuses on individual devices; network security instead focuses on how those devices interact, and on the connective tissue between them. 

According to the SANS institute Network security is the process of taking physical and software preventative measures to protect the underlying networking infrastructure from unauthorized access, misuse, malfunction, modification, destruction, or improper disclosure, thereby creating a secure platform for computers, users, and programs to perform their permitted critical functions within a secure environment. 

A brief network security consists of Three layers, Protection, Detection, and Reaction. This is a kind of defense-in-depth strategy. But a system should not rely on a single line of the defense system, rather it should have multiple defense strategies lined up. 

So how can you test your network and security skills, there are some perfect websites to validate your skills and prove yourself as a network and security expert.

You can visit [Free Tech Exams] (https://www.freetechexams.com/) website and attend CompTIA, A+, Network+, and Security+ Practice Test and Exam. They also provide certification on completion of your test. Each segment is consisting of 10 tests you can practice to.

Another one you can visit [Certiology's computer networking tutorials](https://www.certiology.com/tutorials/networking-tutorials.html). This website provides free computer networking tutorials, notes, and study guides.  Also, you can give quizzes to analyzing your networking skills from here. Most importantly there is a career help section on this website. There you will find many tips and tricks regarding your career. Also, there are sample resumes and cover letters. 

[Free resource to learn computer networking basics on tutorialology](https://www.tutorialology.com/computer-networking/) is one more website. Here you will find Computer Networking Tutorials in three sections. First, you will get The Open System Interconnection (OSI) model layers tutorials. Then Network Topology tutorials lastly TCP/IP tutorials in total fifty-eight tutorials on this website. Good luck with becoming a network expert.
Resources for enthusiasts - software dev. & cybersecurity
Tags: cybersecurity, beginners, devjournal, webdev
Published: 2021-06-17 11:15:19

Hey folks. Tell me if this happens to you as well.</br>
I find myself often torn up between my interests in web development and cybersecurity. I try to learn stuff in both the paths but it becomes very exhausting.
Sounds familiar?

When it comes to learning, multitasking is not really a friend. Better progress is made when we pick up one thing and achieve the target. But the FOMO (fear of missing out) on the other thing distracts too much.

![fear of missing out is real](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/owy6tl02rt2civhm1suu.gif)

</br>To deal with this, I at least try to stay up-to-date on the latest developments, outside of my learning time, through **podcasts**, **news-boards** & **twitter**.

Here are my go-to resources for cybersecurity:
* [Darknet Diaries podcast](https://darknetdiaries.com/)
* [Kaspersky Transatlantic Cable podcast](https://pod.link/909407206)
* [Lazarus Heist podcast](https://www.bbc.co.uk/programmes/w13xtvg9/episodes/downloads)
* [Malicious Life podcast](https://malicious.life/)
* [Software Engineering Daily podcast & newsboard](https://softwareengineeringdaily.com/)
* [DEV Discuss podcast](https://dev.to/devdiscuss)
* [Codenewbie podcast](https://www.codenewbie.org/podcast)
* [DarkReading](https://www.darkreading.com/)
* [ThreatPost](https://threatpost.com/)
* [Kaspersky Daily](https://www.kaspersky.co.in/blog/)

These podcasts and articles are the ones that help me & I hope you find them helpful as well.
Outlook PST에서 Mozilla Thunderbird MBOX 레코드를 여는 방법은 무엇입니까?
Published: 2021-06-17 11:09:48

사용중인 직원이 정보 불운에 직면하는 순간, 우리는 효과적인 MBOX Open Gmail 프로그래밍과 같이 진정으로 신뢰할 수있는 것을 제공합니다. MBOX 변환 도구 중 하나를 완벽하게 완벽하게 찾을 수 있습니다. MBOX 문서 성능 저하로 인해 MBOX 레코드에 저장된 중요한 정보를 잃게되는 몇 가지 이유가 있습니다. 우리의 도구는 모든 정보를 열고 Outlook PST 문서 구성으로 변경하도록 권장합니다. 추가 요소는 당사 제품이 MSG 및 EML 문서 디자인을위한 MBOX 레코드를 추가로 읽는다는 것입니다. <b><a href="https://www.gaintools.com/mbox/pst/">MBOX에서 PST로 변환 도구</a></b>

<b>MBOX 문서의 손상 이유 :</b>

1. 불량 섹터,

2. 일꾼을 끊으십시오

3. 표면 또는 심한 오류.

4. 알려지지 않은 정보의 감소.

5. 갑작스러운 구조 또는 근로자 폐쇄

6. 강렬한 감염 또는 트로이 목마 감염

7. 손상된 소프트웨어 또는 장비 오류.

<b>기능 평가</b>

제품 데모 양식을 사용하면 제품을 구입하거나 문제에 직면하지 않고도 제품의 기능을 경험할 수 있습니다. 데모를 통해 항복 고객은 Google MBOX 또는 손상된 문서를 열고 고객 콘솔에 표시된대로 최적의 레코드 디자인으로 변경할 수 있습니다.
NodeJS Basics: Fixing Dependency Security Issues
Tags: node, basics, security
Published: 2021-06-17 11:02:33


When hitting an issue with nodejs modules having security vunerabilties, I follow the below process. Assume the problematic module is sharp version 0.22.1

**Updating the module**

Check out the repository
 ``` npm ci ``` // That just makes sure we have every installed locally, same as the pipeline where this is failing

 ``` npm ls sharp``` // We should now see how and where this problematic module is being used. 

 ``` npm i sharp@0.28.2 ``` // Now we install the fixed version at the top of our package.json tree. This will also update the references lower down the tree to our version. This should also update our package-lock.json file too. 

 ``` npm ls sharp ``` // Lets verify that we have managed to update the module references correctly.

 ``` npm uninstall sharp ``` // If we dont use this module directly in our code (only in module dependancies, we can now remove it, but the version should be updated in our tree.

Make sure we now commit this package.lock to the repository, and our CI pipeline should have been sorted.
Node.JS Basics: Handling Cookies
Tags: node, basics
Published: 2021-06-17 10:54:34

Below is the test code I have for checking if my method for sending cookies is working.

**Example Cookie Parsing Server**

```javascript
const express = require("express");
const app = express();
const cookieParser = require("cookie-parser");

app.use(cookieParser());

app.get("/test-cookie", (req, res) => {
	console.log(req.cookies);
	// Here we should have access to the Cookies sent.
	res.status(204);
});

app.post("/login", (req, res) => {
	res.writeHead(200, 
		{
			"Set-Cookie": "token=encryptedstring; HttpOnly",
			"Access-Control-Allow-Credentials": "true"
		}
	).send();
});

app.listen(8080, () => {
	console.log("listening on port 8080 for Cookies...");
});
```
ActiveAnalytics: First-party, privacy-focused traffic analytics for Ruby on Rails applications.
Tags: ruby, rails, analytics, privacy
Published: 2021-06-17 10:31:55

We just released a new Ruby gem to measure your traffic without compromising on your users' privacy.
ActiveAnalytics is an open-source Rails engine directly mountable in your Ruby on Rails application. It doesn't reveal anything about specific visitors. It cannot be blocked by adblockers or other privacy-protecting extensions.

[Blog](https://www.basesecrete.com/active_analytics.html)

[Source on Github](https://github.com/BaseSecrete/active_analytics)
User Page
Published: 2021-06-17 10:29:26

Hi Friends, I need your guidance to complete my project.
I am working on a Brand Specific Ecomerce WebPage, to enable sellers to display their products.

The challenge I am having now is how to create a system so that a sellers can log in and create a page and upload their products in form of photos and videos. 
Then customers can also come to the website and view these products.
Onboarding-Prozess – Einarbeitung neuer Mitarbeiter
Tags: onboarding
Published: 2021-06-17 10:26:24

Heutzutage suchen Arbeitnehmer oft nach etwas weit mehr als nur einem Job und wechseln Ihre Arbeitgeber viel häufiger, arbeiten freiberuflich und gehen kürzere Arbeitsverträge und sogar Mini-Karrieren ein, bis sie zu eine für sie optimale Lösung finden. Daher sollte es nicht überraschen, dass Gallup herausfand, dass nur 12% der Mitarbeiter der Meinung sind, dass ihr Unternehmen beim Onboarding gute Arbeit geleistet hat. Auch 43 % der Personalmanager stimmten zu, dass „aufgrund ineffektiver Onboarding-Prozesse Zeit und Geld verschwendet werden“.

Es ist also nicht nur ein esoterisches Problem, Unternehmen verlieren mit schlechten Onboarding-Prozessen wirklich Geld.

Mehr lesen > https://www.ispringlearn.de/blog/onboarding-neuer-mitarbeiter
sync google contacts and calendar to filesystem
Tags: sync, google, calendar, contacts
Published: 2021-06-17 10:15:06

I just found this incredible piece of software called `vdirsync` where they have their own implementation for filesystem based carddav and caldav (contacts/calendar formats) that can, luckily, be read via another program `khald`.

1. Get relevant "sync urls" for each service, [contacts (carddav)](https://developers.google.com/contacts/carddav), [calendar (caldav)](https://developers.google.com/calendar/caldav/v2/guide)
Best structure for connected apps?
Tags: architecture, devops, node, backend
Published: 2021-06-17 10:13:08

---
title: Best structure for connected apps?
published: true
description: 
tags: architecture, devops, nodejs, backend
//cover_image: https://direct_url_to_image.jpg
---
We have a product that we're expanding upon. We want to build satellite products that have a completely different functionality and interface than the main product. Users will be able to create accounts on both products separately but will also be able to sign up with the main account's details.

What is the best way to do this? I've tried building them out as separate apps and creating a connection endpoint that moves the satellite account to the main database, but that seems really hacky.
Process to Generate Unique Slug Example in Laravel
Tags: laravel
Published: 2021-06-17 10:05:01

Hello,

In this tutorial we will go over the demonstration of laravel generate unique slug. This article goes in detailed on laravel create unique slug example. i would like to share with you laravel generate slug before save. i would like to share with you how to generate unique slug in laravel.

you can easily create unique slug in laravel 6, laravel 7 and laravel 8 version.

Sometime we need to create slug from title with your application. but you also need to create unique slug on that table. might be user will enter same title then it should automatically generate unique slug. i will give you simple example step by step how to generate unique slug in laravel using eloquent model events.

Let's see step by step to create unique slug in laravel example:

[Process to Generate Unique Slug Example in Laravel](https://www.codecheef.org/article/process-to-generate-unique-slug-example-in-laravel)
https://www.codecheef.org/article/please-provide-a-valid-cache-path-error-laravel-solved
TopFreelancer market
Tags: freelancermax
Published: 2021-06-17 10:04:08

Welcome to Best <a href="https://freelancer-max.com/">freelancer max</a> Market - Global freelance marketplace, where you can hire a freelancers who will fulfill your order quickly and efficiently! In computer graphics, vector tracing is the conversion of raster graphics into vector graphics. Raster graphics are represented by a dot matrix and often appear pixelated. Vector graphics retain all the colors and contours of shapes and lines, and so are more desirable for graphic design.
Apply rules and automations to your npm registries
Tags: webdev, npm, node, javascript
Published: 2021-06-17 10:03:49

Most developers would rather be coding than spend time managing dependencies. To keep up with the fast releases proper tooling is a necessity.

Manually monitoring dependencies for known vulnerabilities is both a time sink and a liability. Performing point-in-time checks will eventually mean you regret why you didn't do it automatically.

Spending time making sure that all teams and systems only use the same approved dependencies, across different environments, is also neither productive or fun.

[Managing dependencies securely and efficiently](https://dev.to/danielp/how-to-use-secure-private-npm-registries-36m9) involves the need of a tool that offloads some of the work for you. So you can focus on other things - and avoid human error. 

Watch this video to learn how [Plugins](https://docs.bytesafe.dev/plugins/) and [Policies](https://docs.bytesafe.dev/policies/) in Bytesafe let you apply business rules and automations for your secure private npm registries - so you don't have to.

{% youtube 6fqkKu51O94 %}

🧑‍💻 Sit back, relax and let Byteasafe's plugins & policies do the work for you.

🔍 **Here are just a few use cases:**

✅ Lock versions for a registry with [Freeze](https://bytesafe.dev/posts/freeze-registry-states/) - making sure every user gets the exact same versions from the registry that you used for development - A powerful way to lock dependencies after development is completed, before passing it to QA/Testing or build systems.

✅ [Block](https://docs.bytesafe.dev/policies/block/) specific packages or packages with known vulnerabilities

✅ [Auto increment](https://docs.bytesafe.dev/plugins/version-auto-increment/) package versions on publish to the registry - so you don’t have to manually step the version before every publish

✅ [Auto forward](https://docs.bytesafe.dev/plugins/forward/) package versions to linked upstream registries. Storing maintainer tokens securely in Bytesafe + using [Forward](https://docs.bytesafe.dev/plugins/forward/) plugins removes the need to share maintainer tokens (and avoid security risks).

There is more to discover! [Give Bytesafe a try](https://login.bytesafe.dev/signup).


[![Follow Bytesafe on Twitter](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/j3uehdo8j7i2g40bk382.png)](https://twitter.com/bytesafedev) <a href="https://www.producthunt.com/posts/bytesafe?utm_source=badge-featured&utm_medium=badge&utm_souce=badge-bytesafe" target="_blank"><img src="https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=300547&theme=light" alt="Bytesafe - A better way to control your software supply chain | Product Hunt" style="width: 250px; height: 54px;" width="250" height="54" /></a>
How to Choose a Scarf for Men?
Published: 2021-06-17 09:55:17


1. The Choice of Material
If you want a warm, casual style scarf, then choose a blend with lots of wool. If, on the contrary, you want a rather chic scarf to go out, hold back the scarves with shiny silk; the cashmere and silk blends add a touch of elegance and unparalleled softness.
If you want a warmer scarf, then it is better to favour combinations mainly in cotton.
To help you search on the La Fabrique d’écharpe website, each model has a temperature indicator to help you make your choice.
Necessary precision is also for men’s scarves. Even if we put all our know-how to weave quality scarves, silk remains a less resistant material for problematic beards.
It is better to favour scarves with many kinds of cotton, which will have a better lifespan for men who wear a beard.
2. The Choice of Colors
All colours can enjoy, but neutral colours such as black, grey, blue and beige remain essential colours for men.
Today, younger men are also very fond of originality, and they often prefer to stand out with more trendy colours, which give a unique style to the outfit.
This winter 2020 is the big trend of duck blue because it is so easy to wear: with jeans, with a grey coat, with a camel jacket, this colour can be associated with everything.
We bring a touch of pep to the outfit! The red colour in all its shades also represent a lot: burgundy, bright red, or clay, it becomes a basis for men.
Today men use the scarf as an absolute fashion accessory!
3. The Choice of the Pattern
For men’s scarves, we favour more sober patterns such as constantly different stripes: kinetic or urban themes and sophisticated geometric ones.
The polka dot revisited like an industrial nut.
As for the colours, the patterns are more original while keeping a certain discretion.
4. The Choice of Dimension
For humans, many dimensions are possible.
On the site of the Scarf Factory, you can find different sizes, small silk scarves to slip into a shirt collar, long scarves easy to wear or even more oversized scarves like chèches to roll up the neck and have warm.
The significant effect is also very trendy for men. Even if the size of a men’s scarf is essential, it is also the way to wear it, which is critical because it affirms the style of an outfit.READMORE <a href="https://www.beaucenter.com/scarf/">beaucenter</a>
𝗛𝗼𝘄 𝘁𝗼 𝗳𝗶𝗻𝗱 "UNUSED' 𝗝𝗔𝗩𝗔𝗦𝗖𝗥𝗜𝗣𝗧 𝗮𝗻𝗱 𝗖𝗦𝗦 𝗰𝗼𝗱𝗲 𝗼𝗻 𝘆𝗼𝘂𝗿 𝗽𝗮𝗴𝗲? 🤔

Tags: javascript, css, webdev, programming
Published: 2021-06-17 09:45:35


###You can find it using Chrome via "Dev Tools" 😊

1. Open dev tools (F12)
2. Type: Ctrl + Shift + P
3. Type: "Coverage" and select "show coverage" from the result.
4. New window with the "Coverage" tab will be shown
5. Click Icon "Start Instrumenting Coverage And Reload Page"

So it will reload the page and show the information in the table 
with "Url", "Type", "UnusedBytes", "Usage Visualization"

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

𝗨𝘀𝗮𝗴𝗲 𝗩𝗶𝘀𝘂𝗮𝗹𝗶𝘇𝗮𝘁𝗶𝗼𝗻:
1. Red section of the bar is unused bytes
2. Green section is used bytes.

𝗦𝗼 𝘄𝗵𝗮𝘁 𝘁𝗵𝗲 𝗻𝗲𝘅𝘁 𝘀𝘁𝗲𝗽? 🤨
Refactoring your codebase so that each page only ships the Javascript and CSS that it needs (this can be a tricky part 🙃)

Do share your thoughts and other suggestions in the comments