teleren/devto huggingface dataset:
Data Structure Interview Questions
Tags: database, career, guide
Published: 2021-12-03 14:25:46

Consistently numerous software engineering graduates go after positions identified with programming, coding and programming improvement in enormous tech organizations like Google, Microsoft, Amazon, Netflix, and so forth, however many alumni have no clue about what sort of programming questions they may have a need to look in the interview.

![Data Structure Interview Questions](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/akvnv6xw18o6q0md7vlq.png) 

Most of the coding interviews are mainly comprised of Data Structure and algorithms questions because these topics are very basic and every computer science graduate is supposed to know these topics.

## Top Data Structure Interview Questions
Here I've compiled frequently asked Questions in interview. Know their answers from this blog on [Data Structure Interview Questions](https://www.techgeekbuzz.com/data-structure-interview-questions/)

 1. What is Data Structure?
 2. What is the key difference between File Structure and Storage Structure?
 3. Name all the basic operations we can apply in Data Structures?
 4. When can we use a binary search on Data Structure?
 5. What is the key difference between the Breadth-First Search and Depth First Search Algorithm?
 6. What is a Linked List?
 7. What is Stack and tell some of its applications?
 8. How can we traverse an Array?
 9. What is Queue and how it is different from the Stack?
 10. What are Arrays?
 11. Where do we apply the data structure?
 12. What do you understand by LIFO and FIFO?
 13. What are binary trees?
 14. What is Dynamic Memory allocation and how it helps in managing data?
 15. Which data structure is Recursion used to perform its task?
 16. What is a Binary Search Tree?
 17. What is the key difference between NULL and Void?
 18. What are Multidimensional Arrays?
 19. What is the difference between PUSH and POP?
 20. What is an ordered list?
 21. How does the variable declaration affect memory allocation?
 22. What are linear and Non-Linear Data Structures?
 23. What is Merge sort?
 24. Explain Data Abstraction and how it is different from Data Encapsulation?
 25. What are the key advantages of a Linked List over an array?

Please add more questions and answers in the comment section so that it will help to crack the Data Structure & Algorithms (DSA) interview.
Parameterizing Ansible roles
Tags: automation, ansible, ansiblecollections, ansibleroles
Published: 2021-12-03 14:06:09

We often talk about how high-quality Ansible content enables us to enforce the desired state on target hosts. Module parameters play a crucial role here because we use them to describe the expected result. But what about Ansible roles that do not have parameters? 

Ansible roles use variables to customize their behavior. And since variables serve as parameters in Ansible roles, we, Ansible content creators, should document them with the same care as we document module parameters. The rules we should follow when describing role variable are: 

1. Each variable must have a short description. 
2. Variables with default values must note what the default value is and why we chose it. 
3. If the valid variable values come from a predefined set, we must list that set's content. 

Where should we put this information? Right now, the best places are the reference section of the documentation site or the top-level README file in the Ansible Collection. That last one is incredibly convenient since Ansible Galaxy displays the README file content.
Karta
Tags: fintech
Published: 2021-12-03 13:56:10

I want to introduce the new service: smart cards for business.
At Karta, we offer a simple tool for the automation of business expenses. Our solution allows you to centrally see all of your company's expenses in one place and in real-time, prepare financial reports, issue cards and set limits on these cards.
Learn more at https://karta.io/
Advent of Code 2021 - Day 1: Puzzle 2
Tags: adventofcode, java, programming
Published: 2021-12-03 13:41:57

Hi all!

Here is my solution of the second puzzle of Advent of Code, Day 1.

```java
package main;

import java.io.File;
import java.util.*;

public class Puzzle {

  public static void main(String[] args) {
    try {
      File input = new File("/Users/files/input.txt");
      Scanner scanner = new Scanner(input);
      List<Integer> numbers = new ArrayList<>();

      while (scanner.hasNextLine()) numbers.add(Integer.parseInt(scanner.nextLine()));

      int count = 0;

      for (int i = 1; i < numbers.size() - 2; i++) {
        int value = numbers.get(i) + numbers.get(i + 1) + numbers.get(i + 2);
        int previousValue = numbers.get(i - 1) + numbers.get(i) + numbers.get(i + 1);
        if (value > previousValue) count++;
      }
      System.out.println(count);
    } catch (Exception e) {
      System.out.println("Exception!");
    }
  }
}
```
Generating random Colors Using JavaScript
Tags: html, css, javascript, beginners
Published: 2021-12-03 13:38:54


Hello Guys ✌️✌️✌️

Back after long time with another post.

Ever felt how cool it would be if random background colors would be applied to your page on just one click of button .

It is possible using Simple Javascript and few lines of code .

Lets start 👍👍

<b>Step -1 : HTML</b>
There's not much to write in HTML . You Just need to Create a an heading tag with an id . In this heading tag we will be printing the rbg value of the generated color. Second You need to create a button with an id . Also create a js file and link it in your html. That's It with our HTML. The HTML code is below :


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ur8xk0ghdl3zscvrf7dn.png)

<b>Step -2 : CSS</b>
Here I've applied some styling to the button created so that it looks good. You can add your own styling also. The CSS is below :



![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5a8aymlpj0q7af2up65w.png)


<b>Step -3 : JavaScript</b>
Now comes the important part . We would be using <b><u>Math.random()</u></b> . Math.random() generates a random number between 0 and 1. <b><u>Math.floor()</u></b> is another Math function that we are going to use . So the JavaScript Code is given below where I've created a functioned named generateColor() . 


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vuzmenlurgdkb01hvsx1.png)

You can see the Output Below How it generates random colors onclick of the button . 



![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6mt9yrq7kb9l15bdq295.gif)

So that's it for today .
meet You in next Post
Till then Happy Coding 👩‍💻👩‍💻👩‍💻
What Are Numeric Separators in JavaScript?
Tags: javascript, beginners, webdev, tutorial
Published: 2021-12-03 13:30:45

Writing performant code is not enough as a developer. We need to ensure that it is readable as well. And it is rare that an API change in a language introduces readability. Numeric Separators are one such rare change.

## Why Numeric Separators?

Reading this takes a few seconds:

    const number = 100000000;

Counting the number of zeroes is something nobody wants to do. It takes some mental capacity but there was no other way of writing them until now. With numeric separators, we can now use underscores to separate numeric literals.

## How?

    const number = 100_000_000;

The rules with separators are pretty obvious ones. The number cannot start or end with underscores and there cannot be two consecutive underscores in a literal.

Also, it can be applied to binary, octal and hex numbers too!

    const binary = 0b1_0000; // 16 const octal = 0o1_0_0_1; // 513 const hex = 0xA_B_C_0_0; // 703488

It is widely supported as well. IE is the only browser that does not have support. You can see the complete list [here](https://caniuse.com/mdn-javascript_grammar_numeric_separators).

Let us go and make our numbers easier to read!

*Originally published at [https://www.wisdomgeek.com](https://www.wisdomgeek.com/development/web-development/javascript/numeric-separators-in-javascript/) on June 17, 2021.*
HIRING FRONTEND DEV
Published: 2021-12-03 13:29:15

Hi everyone,

We are small tourism SaaS company based in Serbia.
We have big need for professional frontend dev.

Currently we have 2 tasks:

1. Adobe XD Design of the booking engine to code html/css/js. Our devs will do php and other stff.
2. Figma Design to html/css/js. This is our new website redesigned. SImple website where is presentation of our system.

After that we have various tasks and offer possibility of hiring.

It is important that you are real professional with pixel perfect look and standardized and commented code.


You can send all details here or on email office@otasync.me

Thanks,
Ilija
AWS re:Invent 2021 — A deeper look at SageMaker Canvas
Tags: analytics, automation, enterprise, aws
Published: 2021-12-09 11:44:08

---
title: AWS re:Invent 2021 — A deeper look at SageMaker Canvas
published: true
date: 2021-12-03 13:28:05 UTC
tags: analytics,automation,enterprise,aws
canonical_url: https://julsimon.medium.com/aws-re-invent-2021-a-deeper-look-at-sagemaker-canvas-cd8d8be7f205
---

### AWS re:Invent 2021 — A deeper look at SageMaker Canvas

In this video, I demo the newly launched SageMaker Canvas, ““a visual, no-code interface to build accurate machine learning models”. This builds upon a [first (skeptical) review](https://dev.to/juliensimon/aws-reinvent-2021-a-first-look-at-sagemaker-canvas-mao).

This time, I start from a CSV dataset for fraud detection on insurance claims. I first load and join the dataset in Canvas. Then, I train models and inspect metrics. Next, I take a look at the underlying AutoML job running in SageMaker AutoPilot. Finally, I share the model in SageMaker Studio.

{% youtube _qgNMirKq6A %}

⭐️⭐️⭐️ Don’t forget to subscribe to be notified of future videos ⭐️⭐️⭐️

- Dataset: [https://gitlab.com/juliensimon/amazon-studio-demos/-/tree/master/sagemaker\_fridays/season4/s04e10](https://gitlab.com/juliensimon/amazon-studio-demos/-/tree/master/sagemaker_fridays/season4/s04e10)
- SageMaker Friday episode where we used this dataset to train models with AutoGluon: [https://youtu.be/7NA5aNrye0s](https://youtu.be/7NA5aNrye0s)
DevTips Daily Update 03/12/21
Tags: devtipsdaily, beginners, javascript
Published: 2021-12-03 13:25:27


So in this week's videos on DevTips Daily, we were carrying on with our full end to end project and we did a bit more work on the API in terms of setting up the redirect endpoint in Express. We then moved on to setting up a deployment pipeline with a GitHub action and finished up by starting to configure our Digital Ocean droplet to accept out code.

Here's a link to each individual tutorial:

[Sending POST requests with Postman](https://youtu.be/RrRXdNAVFpk)
{% youtube RrRXdNAVFpk %}

[Redirect Endpoint in Express](https://youtu.be/1y_RbcJ0eKk)
{% youtube 1y_RbcJ0eKk %}

[CI/CD Pipeline Overview](https://youtu.be/bW_JV7jeJxE)
{% youtube bW_JV7jeJxE %}

[Creating a GitHub action](https://youtu.be/2AD8-uYlTQA)
{% youtube 2AD8-uYlTQA %}

[Installing and Building in the GitHub action](https://youtu.be/mWw7XrBy-Aw)
{% youtube mWw7XrBy-Aw %}

[Adding a new User on the server](https://youtu.be/DOocQ-yrT5g)
{% youtube DOocQ-yrT5g %}

[Setting / Resetting a user's password](https://youtu.be/h7HY6cwMY0M)
{% youtube h7HY6cwMY0M %}

Next week we're going to be carrying on with the project again, we're going to be finishing off setting up the server and getting our pipeline to push our code to the server!

Thanks for watching 👍
How to Create Accordion with HTML CSS
Tags: css, tutorial, webdev, beginners
Published: 2021-12-03 13:01:22

{% youtube qgYYg4unBFw %}

How to create accordion using only html and css.
In this tutorial I will show you how to create accordion with only html css, no javascript

---

🔗 Essential links
-----------------------------
[Font - Quicksand](https://fonts.google.com/specimen/Outfit)
[Ionicon](https://ionic.io/ionicons)
[Source Code](https://www.patreon.com/codewithsadee)

---

👤 Like - Follow & Subscribe Me
-----------------------------
Twitter : https://twitter.com/codewithsadee
Github : https://github.com/codewithsadee
YouTube : [codewithsadee](https://www.youtube.com/channel/UC1PZHWV6VvICTL1LgFUZq6g)
Patreon : https://www.patreon.com/codewithsadee

---

[![Buy Me A Coffee](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9kn6vwn4mulhsx6o69is.png)](https://www.buymeacoffee.com/codewithsadee)
Geolocation with Postgresql+Nestjs+Typeorm
Tags: postgres, javascript, programming, tutorial
Published: 2021-12-03 12:41:13

Hi everyone. It's been a long time since I last posted something.

Some time ago I needed create an application that using geolocation to find ads nearby. 

In my search, I take the easy solution which was to use Firebase.

Integration was easy because it was a new project. I did some testing and this worked great. I don't have much experience with `Firebase`.

Some problems I had were the following:

- Try modeling tables in `Firebase` collections.
- Thinking about the cost.
- Difficulty trying to query multiple related collections

If I had more experience with Firebase this would be easy for me, but it is not the case.

So I found another solution that I think is easy to integrate.

[Geo postgresql](https://postindustria.com/postgresql-geo-queries-made-easy/). You can visit the original publication and see in more detail all the explanations.


I did an example with [Nestjs](https://github.com/ronnymedina/geolocalizacion-con-postgresql-and-nodejs).

You can download this repository and run `docker-compose up -d`, this should get the server up. And you can access url `/docs`.


I hope this publication is helpful to you. I made a video tutorial in Spanish.

{% youtube yK8wK2O7Ge0 %}
Why are companies shifting from manual payroll processing to automated Payroll Management System?
Published: 2021-12-03 12:38:09

Payroll Management System in itself is the process of managing the monetary records of a company’s employees. It consists of employees’ details like Basic salaries, HRA,, bonuses, incentives and all other earnings and deductions. An employer must track the payroll and manage these records with accuracy, as per the law. If employers fail to comply with the laws of Income Tax related to employee records or delay their payroll tax filing, they can be subject to legal penalties and fines.

Devoted employees are the lifeblood of any business. One of the basic yet very important steps that you can take to ensure your employees are happy is that you process your payrolls efficiently and in time. Small business owners, HR executives, or HR departments have this extremely important process to complete month on month. It’s a cumbersome task with a number of variables and factors in play. A lot of time and money goes into ensuring the completion of this step.

For all the small and mid-sized business owners, payroll processing is a comprehensive process and often a challenge. Payroll Management System is an ongoing process and includes statutory component deductions like Provident Fund (PF), Labour Welfare Fund (LWF), Professional Tax (PT), Employee State Insurance (ESI), and Tax Deduction at Source (TDS), etc. And, any error in the process may lead to critical legal implications.

Some common problems related to payrolls that organizations face are listed below:

Time-consuming delaying payroll processing
Unnecessary associated cost
Human errors while processing details
Failing to keep regulatory/tax changes up to date
Un-organized setup and insecure data.
To resolve the above problems why not switch to Payroll Management System. Help your HR department reduce its overhead cost and cut out a significant amount of time in processing your payrolls. Leysha.ai has a fully configurable payroll generation feature using which you can automate the entire process. It provides multiple configurations, eliminates errors, and generates payrolls with ensuring strict statutory compliance in just one click. Also, it secures the data within your organization.

Read below the benefits of Leysha [Payroll Management System](https://www.leysha.ai/hr-management-software/)

• Real-time attendance from multiple locations and devices into a central location eliminates any errors.
• Insightful HR reports.
• Supports any number of fixed / flexi and semi flexi shifts in a day.
• Leaves Management
• Holiday Calendar
• Expenses allocation and management
• Automated Payrolls with pre-defined deductions or incentives.
• Automated emailing of pay slips.
• Integrated employee and resource management.

Read more about what Leysha can do for your business at https://leysha.ai/features/, Schedule a no-obligation FREE demo NOW. Call +91 70007 47714
Full Stack Interview Help
Published: 2021-12-03 12:36:53

Hi all,

I have a Interview with Full Stack which requires NodeJS and ReactJs next weekend. I have worked with them for Freelance projects up until a year ago.

The interview has pair coding round it seems. Now, I want to know the **best coding practices to used for let's say a MERN stack** application. Any good open source projects for coding practices will be helpful.

Also a good resource for interview questions preparation will be very helpful.

Thanks in advance,
CNN in Computer Vision
Tags: cnn, convolutionalneuralnetwork, machinelearning, computervision
Published: 2021-12-03 12:33:13

CNN in Computer Vision stands for the convolutional neural network. Convolutional Neural Network is a concept emerged from human Neuron. Human Neuron consists of Dendrites, Cell body, Axon and synaptic Terminal. Dendrites are basically input, Cell body is the thinking machine, axons transfer the input and synaptic terminal is basically the output. 

Perceptron
Is an algorithm for supervised learning of binary classifiers. Perceptron rule : automatically learn optimal weight coefficients. Perceptron recieves multiple input signals sum them up and if the sum is greater than threshold it returns output, else it don’t return any signal.

Convolutional Neural Network
CNN is used in computer vision for the purpose of what values should be used in a matrix so it provide a best filter. For example if we have to identify edges in an image where there are only vertical edges present, and we are providing horizental edge detection kernel, then it is of no use. While Convolutional neural network learn from the training set and apply on the test set what best fits on it.

CNN in Computer vision has Input Layer consists of matrix of an image. Weights connect to input layer and Output layer connects to Weights.

There are many values we get after we do convolution. For example if we have 9×9 image and we do convolution on it using 3 filters, We will get three 7×7 images. Which are 147 values. To deal with this we Use Max Pooling.

To read more visit https://hecodesit.com/cnn-in-computer-vision/
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lbztvwo2gx5gz09hjous.png)
Array - ArrayList / Array List - Linked List
Tags: java
Published: 2021-12-03 12:20:09

## Array and Array Lists

### Arrays
- Fixed length
- Anything => Primitives (integer, long, boolean) and also Objects (string, Dog, etc) 

### ArrayList
- Dynamic length
- Only hold objects. ArrayList<int> => Error! but can you can use its class wrapper, e.g.: Integer for int.

- Access elements
`array[1];`
`arrayList.get(1);`
- Get length
`array.length;`
`arrayList.size();`
- Add elements
`Cannot do it with Arrays`
`arrayList.add("New element"));`
- Set an element
`array[0] = "New element";`
`arrayList.set(0, "New element");`
- Remove elements
`Cannot be done it in arrays`
`arrayList.remove(1)`
or
`arrayList.remove("Name of element to be removed")`

## Array Lists and Linked Lists

- They are both part of the Collection framework and they implement the List interface.

### LinkedList
- Each element is called a node and it has a reference / pointer to the next  and the previous node.
- The linked list start with a pointer to the first element (HEAD).
- They are not in contiguous memory spots.

### ArrayList
- Good performance for random access.
- Not so good when adding or removing new elements, because it needs to run over all the array for changing only one element.
Why you can't trust setTimeout
Tags: javascript, discuss, programming, codenewbie
Published: 2021-12-03 12:15:34

## setTimeout in JavaScript takes time in millisecond so it must be very accurate right?
**Well not necessarily.** In this article let's explore why.

We all know that JavaScript is single-threaded. Meaning that it can only calculate one thing at a time.
But now imagine you have a setTimeout that is suppose to fire after 10000ms or 10s. So now JS have to keep track of the time passed. But in between that 10s the user might do some interaction with your page. Now JavaScript have to react to them as well.

But if JavaScript is single threaded how it's gonna keep track of passed time while reacting to user activity? That would be performing multiple calculation at the same time right?
Well not really because JavaScript is not keeping track of time. In fact JavaScript doesn't natively support setTimeout even. Then how are we able to use setTimeout? Well these special asynchronous functions like setTimeout, setInterval are provided to JS by the environment it is currently running on. For example in case of Chrome JavaScript runs on the [V8](https://v8.dev/) engine, and Fire Fox uses [SpiderMonkey](https://spidermonkey.dev/) as its JavaScript engine etc.

So basically when you call setTimeout, JavaScript under the hood tells its environment/the engine its running on that once all the synchronous code is done executing set a timer and once the timer reaches the given time execute the function.
Now notice that I said "**once all the synchronous code is done executing**". And this is where the problem lives. The timer for setTimeout won't start until all the normal synchronous codes like dom manipulations, loops etc. aren't fully executed.
And those synchronous codes might take some time to execute.
Here's a dummy code that takes couple of milliseconds to execute.
```js
//JS hack: +new Date() will give you current time in milliseconds 😉
let currentTime = +new Date()
//Dummy long loop
for(let i = 0; i < 999999999; i++){}
//Current time after the loop is over
let endTime = +new Date()
console.log("Ran after: " + (endTime - currentTime) + "ms")
```
![JavaScript get code execution time](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xz0d7sniu5merz5lvc6t.png)
And so if we had a setTimeout out in our code that is suppose to run after lets say 50ms, it might run a few milliseconds late
```js
let currentTime = +new Date()
setTimeout(function(){
    let endTime = +new Date()
    console.log("Ran after: " + (endTime - currentTime) + "ms")
}, 50)
for(let i = 0; i < 99999999; i++){

}
```
![JS setTimeout running late](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/azcvr03j2jw569nsv7nr.png)
## Conclusion
> Although setTimeout is fine to use most of the time, but for very time sensitive task it might not be the ideal choice  

Make sure you checkout my other articles and [YouTube channel](https://www.youtube.com/c/AngleBrace)
{% user 0shuvo0 %}
## Was it helpful? Support me on Patreon
[![Patreon Logo](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7vnw8g7vs5pok3jwgtgv.png)](https://www.patreon.com/0shuvo0)