teleren/devto huggingface dataset:
NODE.JS: Interview Questions
Tags: javascript, node, programming, tutorial
Published: 2022-12-05 21:25:57

Have you ever found that technical interviews are a bit tricky? Well, the first reason why many people find coding interviews hard is that they lack the fundamental knowledge of the topic in question. 

I have come up with some basic typical interview questions for Node.js, so let's get started!!
![get started](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hqolqkagn953woj3as6m.gif)


## What is Node JS?
- Node.js is an open source server environment.
- Node.js is a platform built on Chrome's JavaScript runtime for easily building fast and scalable network applications.
- It is a single threaded, non-blocking and event driven.

## When to use Node JS?
- Considering the main features of Node.js and its strengths, we can say data-driven, I/O-driven, event-driven, and non blocking applications benefit the best from a Node.js implementation.
- It can be used to create:

_=>_ Web servers.
_=>_ Real Time applications (chat applications, streaming, online games).
_=>_ Command line applications.
_=>_ Creating APIs.

**As you just said Nodejs is a single threaded then how Nodejs is fast?**
- Node js uses an event loop that handles the asynchronous tasks.
- The event loop makes our program non-blocking.
- We can handle multiple request at a time in parallel - that's the reason why node js fast.

**Is it possible to access DOM in Node Js?**
- No.

**What is Express Js?**
- Express is a node js web application framework that provides broad features for building web and mobile applications.
- It's a layer built on the top of the Node js that helps manage servers and routes.

**What is Package.json file?**
- The package.json file is the heart of any Node project.
- In package.json file we keep all the details of the projects that hold various metadata relevant to the project like version, description, dependencies, run scripts, license and all pm packages.
- Without this package, your project will not work.

**What is Event Loop?**
- The event loop makes the code async.
- Behind the scene when our code run asynchronously then there are containers that are:

_=>_ call-stack,
_=>_ call-back queue,
_=>_ web API and
_=>_ micro task queue.

- The purpose of event loop is to execute the async task as per priority.

That's it for now. Let me know what you think in the comments. 
![cheers](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gark5dmezv5au1iqnavu.png)
#PowerAutomate – Flow to use Open Trivia Database questions in a Microsoft Teams bot 🤖 6/N
Tags: englishpost, microsoftteams, opentriviadatabase
Published: 2022-12-06 14:56:19

---
title: #PowerAutomate – Flow to use Open Trivia Database questions in a Microsoft Teams bot 🤖 6/N
published: true
date: 2022-12-05 21:18:34 UTC
tags: EnglishPost,EnglishPost,MicrosoftTeams,OpenTriviaDatabase
canonical_url: 
---

#### PowerAutomate – Flow to use Open Trivia Database questions in a Microsoft Teams bot 🤖 Series

- [Intro to Open Trivia Database API](https://dev.to/azure/powerautomate-flow-to-use-open-trivia-database-questions-in-a-microsoft-teams-bot-1n-1h1e)
- [How to process the API Response and send a question to Teams](https://dev.to/azure/powerautomate-flow-to-use-open-trivia-database-questions-in-a-microsoft-teams-bot-2n-3dlm)
- [How to validate the user response in teams with the Trivia Question correct answer](https://elbruno.com/?p=35989)
- [Sort and mix the possible answers to the question](https://elbruno.com/?p=36003)
- [Trigger the flow from a new message in a Teams channel, and validate the trigger start](https://elbruno.com/?p=36018)
- [Live Reactor Event – Let’s build this online !](https://elbruno.com/?p=36035)

Hi !

Now that we have all the necessary steps to play with a Trivia question using Power Automate and Microsoft Teams, I think it will be nice to have an online event to build this all together.

That’s will I’ll host an event, on Dec 15th to explain and show the step-by-step for this.

## [Setting up a Trivia Game with Power Automate and Microsoft Teams](https://developer.microsoft.com/en-us/reactor/events/17761/)

> Do you like trivia games? Are you looking for some online trivia games? We’ve got you covered! In this session we are going to build our own Trivia Game using the Open Trivia Database API, Microsoft Power Automate and Microsoft Teams. Building our own Trivia Game is a great way to learn about Power Automate and also a great way to engage with your family members, friends, coworkers and colleagues!

See you there !

Happy coding!

Greetings

El Bruno

More posts in my blog [ElBruno.com](https://www.elbruno.com).

* * *
MySQL 8: short syntax for select all
Tags: sql, mysql, news
Published: 2022-12-05 21:13:37

Since MySQL 8 you can use pretty short query to select all data from table. 
Just use `TABLE a;` instead `SELECT * FROM a;` and get same result

```
mysql> table a;
+===+===+
| m | n |
+===+===+
| 1 | 2 |
| 2 | 3 |
| 3 | 4 |
+---+---+

mysql> table b;
+===+===+
| m | n |
+===+===+
| 1 | 2 |
| 1 | 3 |
| 3 | 4 |
+---+---+

mysql> table c;
+===+===+
| m | n |
+===+===+
| 1 | 3 |
| 1 | 3 |
| 3 | 4 |
+---+---+
```
The `TABLE` statement can be used with `ORDER BY` and `LIMIT` statements

```
mysql> table a order by n;
+===+===+
| m | n |
+===+===+
| 1 | 2 |
| 2 | 3 |
| 3 | 4 |
+---+---+

mysql> table b limit 2;
+===+===+
| m | n |
+===+===+
| 1 | 2 |
| 1 | 3 |
+---+---+

```
This syntax also can be used with `UNION` statement

```
mysql> table a union all table b union all table c;
+===+===+
| m | n |
+===+===+
| 1 | 2 |
| 2 | 3 |
| 3 | 4 |
| 1 | 2 |
| 1 | 3 |
| 3 | 4 |
| 1 | 3 |
| 1 | 3 |
| 3 | 4 |
+---+---+
```

[SQLize.online - free online SQL environment](https://sqlize.online/sql/mysql80/5aa46e4d632d3edeacc937fa562d3e67/)
How do college football teams advance? --an ML story.
Tags: nlp, openai, search, webdev
Published: 2022-12-05 20:40:30

Yes, this is another chat.openai post. The post demonstrates a real-world use case that highlights the power of LLMs and potentially next-gen search.

**TLDR;**
<blockquote class="twitter-tweet"><p lang="en" dir="ltr">GPT is better than Google for many queries. Comes right at a time when Google search is so packed with ads it’s borderline unusable.</p>&mdash; cdixon.eth (@cdixon) <a href="https://twitter.com/cdixon/status/1598698730642845696?ref_src=twsrc%5Etfw">December 2, 2022</a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

## The task at hand
### How do college football teams advance?
Last week I learned that Ohio State still has a shot at the championship after the loss to Michigan on November 26th because USC dropped the ball. This didn't make sense so I started searching 

### Google Search
For fear of being laughed at by friends I furiously googled 
for an answer during the first day and still did not find a satisfactory answer. 



Day 1: 30mins                     |  Day 2: 10 mins
:--------------------------------:|:-------------------------:
![Take 1](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6jwi6rxyucg4kk5wee8l.jpg) |![Tale 2](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8d9916dgh71a1enf7kc2.jpg)


Admitting defeat I asked my friends... I should have known better. See the succinct response below:
![Friends response](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xl7gyq9g9929txmdzb5o.jpg)

### Andi Search
Okay then, let/s see what andi.search (a promising conversational search engine) can tell me...
![AndiSearch results](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gigo587hhplkc1457l0w.jpg)


**Close but no caviar!**
### Enter ChatGPT
At this point, I had just been blown away by [Frederic Besse turning ChatGPT into a Virtual Machine](https://www.engraved.blog/building-a-virtual-machine-inside/) and started looking to auto-generate some code for some Oauth [Schleping](http://paulgraham.com/schlep.html) 

![chatGPT codegne](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o17gsy1ed9oxstjbg9h3.jpg)

:( I guess that is codex domain. Then it hit me, let me see what this bad boy can do with my recent query about college teams.
### Enter chatGPT as search
This is where the story gets exciting! 
> **I managed to learn more in 5 minutes than my combined effort so far.**


![ChatGPT 1](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/43wtez24w2h2ogxaudtk.jpg)


![ChatGPT 2](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h3az7xjhd19r6vnix26a.jpg)


![ChatGPT 2](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r4xolrgq7grtqvuavirf.jpg)


After this experience, I'm asking Santa for an Andi like search experience backed by chatGPT. It is during moments like this where you realize just how bad our 'good enough' solutions actually are.
The Difference Between ChatGPT and GPT-3
Tags: ai, gpt3, openai
Published: 2022-12-05 20:18:25

[ChatGPT](https://chat.openai.com/) was announced a few days ago, and it has been a big topic of discussion in the tech world, for good reason.

In case you have been following along, and were confused about the difference between ChatGPT, which is a new demonstration of this type of technology, and GPT-3, which had already been in use in a variety of contexts.

***

I asked ChatGPT about that difference, and this is what it said:

ChatGPT and GPT-3 are both large language models trained by OpenAI, but they have some key differences. GPT-3, or **Generative Pretrained Transformer 3**, is the third generation of OpenAI's GPT language model, and it is one of the most powerful language models currently available. It can be fine-tuned for a wide range of natural language processing tasks, including language translation, text summarization, and question answering.

ChatGPT, on the other hand, is a **variant of the GPT-3 model specifically designed for chatbot applications**. It has been trained on a large dataset of conversational text, so it is able to generate responses that are more appropriate for use in a chatbot context. ChatGPT is also capable of inserting appropriate context-specific responses in conversations, making it more effective at maintaining a coherent conversation.

In terms of performance, **ChatGPT is not as powerful as GPT-3**, but it is better suited for chatbot applications. It is also generally faster and more efficient than GPT-3, which makes it a better choice for use in real-time chatbot systems. Overall, ChatGPT and GPT-3 are both powerful language models, but they are designed for different purposes and have different strengths and weaknesses.

_Emphasis is my own_.
Explorazor - Data exploration on steroids!
Tags: analytics, dashboards
Published: 2022-12-05 20:16:12

Explorazor is a data exploration product built for sales and marketing teams at Consumer Goods and Pharma companies. Explorazor unifies primary sales, secondary sales, market research, and media data into one single dataset and helps users identify issues and opportunities to grow revenue, via a simple search interface.

[https://www.vphrase.com/explorazor](https://www.vphrase.com/explorazor)
Get-ViperBomb (PowerShell)
Tags: csharp, dotnet, programming, devops
Published: 2022-12-05 20:03:09

Greetings everyone,

I've been developing a module for **[PowerShell]** that uses a variety of advanced techniques and styles, particularly those used in **CSharp**, **.NET**, and **Xaml**... but all of it being done in **[PowerShell]**.

A little over a month ago, I made a video of the various utilities that I'd left on the backburner, utilities that relate to <u>system management</u>, <u>administration</u>, and <u>graphical user interface design elements</u>:

{% embed https://youtu.be/S7k4lZdPE-I %}

My end goal is simply put, to create a module that interfaces directly with **(Razor/Blazor/ASP.NET/C#)** for the internet. Though to be clear, there's still a bit of development ahead of me before it gets to that stage.

In the video demonstration above, I cover a variety of (functions/utilities) that are part of the module. 

The module itself uses a variety of (GUI+CLI) components (in some cases both), and is meant to _enhance_ the <u>experience</u> of the **(USMT/<u>user state migration tool</u>)**, <u>virtualization</u>, <u>post-installation migration tasks</u>, <u>package distribution</u>, <u>deployment</u>, and general all-around OOBE, etc.

The reason for THIS post in particular, is to cover a document that I've recently written, about the utility that will eventually be used to provide <u>post-installation migration activities</u>... as well as various other odds and ends which fall within the scope of categories specified above.

I may be getting ahead of myself describing everything... 
But- to be clear, this document is QUITE LONG.
There are also nested links to OTHER documents.

Here's the PDF of the utility
[https://github.com/mcc85s/FightingEntropy/blob/main/Docs/2022_1202-(Get-ViperBomb).pdf]

This video demonstration here covers the PXE portion of the module from the server end, which I recorded <u>exactly a year ago</u>.

{% embed https://youtu.be/6yQr06_rA4I %}  

This demonstration showcases the module's ability to control the installation of Windows on <u>child item virtual machines</u> from **(inception -> desktop)** through the **PXE** process, by using the **[Microsoft Deployment Toolkit]** by **(Microsoft/Michael T. Niehaus + others)** as well as the **[PowerShell Deployment]** modification by **(FriendsOfMdt/Deployment Bunny/Johan Arwidmark/Mykael Nystrom + others)**.

At some point when the utility I've covered in the PDF linked above is ready, I will record a new demonstration that shows the process from beginning to end.

Enjoy.
Take care
MCC
What is Password Hashing Algorithm?
Tags: password, hashing, encryption, security
Published: 2022-12-08 21:07:07

---
title: What is Password Hashing Algorithm?
published: true
date: 2022-12-05 19:34:26 UTC
tags: password,hashing,encryption,security
canonical_url: https://guptadeepak.com/password-hashing-algorithms-101/
---

 ![What is Password Hashing Algorithm?](https://guptadeepak.com/content/images/2022/12/hashing-algorithm-deepak-gupta-com.jpeg)

Password hashing algorithms are used to store and securely protect user passwords. They are a vital part of the authentication process and must be implemented correctly to ensure the system's security. In this article, we will discuss the various password hashing algorithms, their pros and cons, and how they can be used to protect users' accounts.

First, let's take a look at what a password-hashing algorithm is. It is a mathematical process that takes a plain text password and transforms it into an unintelligible string of characters. This string, or hash, is then stored in the database instead of the plain text password. This process is known as one-way encryption, as the original plain text password cannot be retrieved from the hash, making it impossible for hackers to access the user's account.

The most common password hashing algorithms are PBKDF2, bcrypt, and script.

- **PBKDF2** (Password-Based Key Derivation Function 2) is a widely used algorithm that employs a salt to protect against brute force attacks. 
- **Bcrypt** is a more advanced version of PBKDF2 and uses a high iteration count to slow down brute-force attempts. 
- **Scrypt** is a memory-hard algorithm that requires a large amount of RAM and processing power to generate a hash.

Each of these algorithms has its pros and cons. PBKDF2 is simple to implement but is considered to be less secure than more advanced algorithms. Bcrypt is more secure but is more resource-intensive. Scrypt is the most secure but is also the most resource-intensive.

When it comes to security, it is essential to choose the most secure algorithm for your system. Generally, bcrypt is considered to be the best choice. It is highly secure and is also relatively simple to implement.

Finally, it is essential to note that password-hashing algorithms are not foolproof. If an attacker can gain access to the database, they may still be able to crack the hashes and gain access to the user's accounts. To prevent this, it is essential to implement other security measures, such as two-factor authentication and strong passwords.

In conclusion, password-hashing algorithms are essential to the authentication process. They provide an extra security layer and help protect user accounts from unauthorized access. When selecting a password hashing algorithm, it is crucial to choose one that is secure and simple to implement.
What is Polybase?
Tags: webdev, web3, nft, blockchain
Published: 2022-11-22 14:09:37

Polybase is a web3 database that is faster and cheaper than any blockchain. You can think of Polybase as a drop-in replacement for Firebase Firestore with a decentralized backend.

Features of Polybase:

web3 Native: Use Polybase from smart contracts or dApps and verify zk proofs of the data.

Blazing Fast: Integrated storage and indexing mean low latency writes and queries.

Wallet Authentication: Use existing wallets to login and encrypt data for “non-custodial data”.

Horizontal Scalability: Collections are sharded with configurable replication.

**What can you build using Polybase?**

Social and chat:
Give users web2-like speed and UX for truly decentralized alternatives.

DAO tooling:
Enable full decentralization for DAOs by combining off-chain data with on-chain actions, secured by zk proofs.

Large public datasets:
Derisk infra provider ToS changes by decentralizing datasets with integrated indexing and querying.

Data DAOs:
Crowdsource data with decentralized contribution, validation, and payment.

Oracle buffers:
Mitigate oracle attacks by validating data before it is fed into smart contracts with strict, immutable rules.

Non-custodial data:
Create a decentralized application where user data is stored on Polybase encrypted by their wallet.

**Modern dApp infrastructure**
Polybase can store any kind of structured data: user data, app state, and metadata. Compose it with smart contracts and file storage for truly decentralized applications.


**Non-custodial data**
Today, when you use an app or website, you load data from a far away centralized database. When the app or website becomes popular, these centralized databases become the bottleneck.

And as your data flows through centralized databases, it is captured and locked away. Your private data is abused for profit.

Polybase moves the database to your device and a decentralized peer-to-peer network. You control who can access your data. Not only is this faster and cheaper, but it enables new types of apps and services that were never possible before.

Our co-founders talked to a 100s of web3 developers and one important trade-off everyone was making is that they use a centralized database in order to improve UI/UX and the cost.

They felt this was a huge problem and decided to build Polybase which is a web3 native database. The entire idea of Polybase is to enable a web3 native database that is as performant and cost-efficient as a web2 database.

Here is our whitepaper for those who would be interested in going through our decentralized architecture.

Whitepaper: https://polybase.xyz/Polybase_A_Decentralised_Query_Index_and_Storage_Protocol-v2.0.pdf

Feel free to hit us up with any questions you have got about Polybase and how we fit into the web3 tech stack, we would love to break them down for you.
Using Node.js to steal £10,000: Introduction
Tags: beginners, javascript, serverless, node
Published: 2022-12-05 19:30:09

*from yourself!

Last year I came across what's known as the 1p Savings Challenge. It's simple: on day 1 you save £0.01, then on day 2 £0.02, day 3 £0.03 and so on, for 365 days. The most you'll ever put aside on a single day is £3.65, but after you're finished you'll have saved £667.95. Pretty impressive.

Remembering to transfer tiny sums of money each day for a full year is, however, more effort than most people will bother with. So, automation of this process seemed like a perfect focus for a small programming project.

Rather than implementing the standard, predictable 1p Savings Challenge, I wanted to add some more interest to the end experience. I decided instead to build an app that would siphon unknown amounts of money from my bank account, in the middle of the night.  

After one year, £2,000 would have gone 'missing'. After 5 years, I'd 'lose' £10,000.

To create this app I used Node.js — and worked with [Serverless](https://www.serverless.com/), AWS Lambda, and cron jobs for the first time.

First things first, we need to take a look at the math behind the 1p savings challenge...
Projects you can build as a frontend web developer newbie
Tags: webdev, javascript, beginners, programming
Published: 2022-12-05 19:26:43

As a frontend web development newbie, you may want to start with smaller, simpler projects that will help you learn the basics of HTML, CSS, and JavaScript, and gain some practical experience with web development tools and techniques. Some ideas to consider include:

1. Building a static website using HTML and CSS, with a simple layout and design, and basic features such as navigation, links, and images.
2. Creating a responsive website that adjusts to different screen sizes and devices, using CSS media queries and responsive design principles.
3. Developing a simple web application that allows users to input data and see the results on the page, using basic JavaScript and DOM manipulation techniques.
4. Building a simple game, such as a puzzle or a quiz, that allows users to interact with the page and make choices, using JavaScript events and functions.
5. Creating a simple website or web application that utilizes a third-party API, such as a weather forecast app or a social media feed.
6. Building a simple web-based tool or utility, such as a calculator, a converter, or a random name generator, using basic JavaScript and HTML.

These are just a few examples of the many projects that you can build as a frontend web development newbie. As you gain more experience and skills, you can tackle more complex and challenging projects, and continue to learn and grow as a web developer.
React Utility Components
Tags: react, npm, typescript
Published: 2022-12-05 19:20:42

[Reusable react components](https://www.npmjs.com/package/@melmahdi/reactuc) to maximize your coding efficiency.

## Install

```shell
npm i @melmahdi/reactuc
```

## Components

- If
- Image
- Iterate
- Table

## Usage

### If

Conditional rendering component

```ts
import { If } from "@melmahdi/reactuc";

<If condition={condition: 1 | 0} otherwise={otherwise: ReactNode}>
  ...
</If>
```

### Image

Component to handle broken images

```ts
import { Image } from "@melmahdi/reactuc";

<Image fallback={...} src="..." alt="..." />
```

### Iterate

Component to handle iterations.

Display list of paragraph (with html tag):

```ts
import { Iterate } from '@melmahdi/reactuc';

<Iterate data={['...', '...', '...']} element="p" />;
```

Display list of objects (with component):

```ts
import { Iterate } from "@melmahdi/reactuc";

const cards = [
  { id: '75ebc192', title: 'Lira Fresh Optimization' },
  ...
];

<Iterate data={users} element={UserComponent} />;
```

### Table

Table component

```ts
import { Table } from "@melmahdi/reactuc";

const tableData = {
  head: ['First', <button type="button">Action</button>],
  body: [
    ['One', 'Two'],
    ...,
  ]
};

<Table {...data} />
```