teleren/devto huggingface dataset:
My First To-Do App And My Learning😎
Tags: career, webdev, javascript, todayi
Published: 2019-12-22 08:36:37

Hello folks, My name is Shahroz and I am going to be a professional MERN Stack developer soon😍.

Right Now, I am in the process of learning MERN Stack And Recently I have done with Front-End using HTML, CSS, And JavaScript(ES5) and this is my first post in dev.to community.

After the accomplishment of learning these languages I have advised by one of my mentor to make a To-Do App using all of the stuff I've learned and I know this is just a stereotype to make a todo.
 
When I started to make a todo app I taught that It was just a waste of time, there are billions of todos on the internet nowadays and honestly far better than mine ones.

But, while building the app I realize that No, It was not like that what I was thought before and then I end up with some interesting things which happen to me.

# Curiosity:

While building the app I realize that when I make a button my mind says to me "Hey Shahroz 🤔" Why you don't try to add a hover effect to your button or when I add up the functionality to clear the tasks, "Again Mind says" Why don't you try to add a button to clear all the tasks at once? and many many things like that. 

# Hands-On Learning:

I have learned all frontend technologies from book or tutorials and the fact is that I know the methods, properties, and tags but Don't even have a sense that where to use them perfectly, building the app helps me to think that what I can use here to achieve what I exactly want.

#Logic Building:

The logic building is the hottest topic amongst programmers and I was also the one who has the fear of logic building and takes it so difficult and doesn't know how to achieve this skill of building logic but trust me logic building comes from trying to build something. When you take a project and start working on it you have a picture in mind that what feature you want to add and then you try a number of times to mold your thought with programming syntax and that's how your logic building skills increases.

# Sense of Achievement:

Many of the programmers relate with my this statement that "When you are learning to code and you print your first hello world it makes you feel proud" and when you build a working project, "even if it is small" it makes you feel proud and satisfactory, that you are capable of building something and if you build this you can also build facebook like web apps too🤓.

# My Todo App:

Finally, that's how my todo looks😍

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/5riw0tnimq24ftd98yxe.JPG)


So, Folks, this is my experience as a newbie in the programming world. I hope you will like it. I invite you all to share your first project experience.
Manually Adding DbContext for an Integration Test
Tags: csharp, testing, entityframeworkcore
Published: 2019-12-22 08:13:27

In EF Core, there is an extension method that allows you to add a DBContext, called <a href="https://docs.microsoft.com/en-us/dotnet/api/microsoft.extensions.dependencyinjection.entityframeworkservicecollectionextensions.adddbcontext?view=efcore-3.1">AddDBContext</a>.  This is a really useful method, however, in some cases, you may find that it doesn't work for you.  Specifically, if you're trying to inject a DBContext to use for unit testing, it doesn't allow you to access the DBContext that you register.

Take the following code:

```csharp
services.AddDbContext<MyDbContext>(options =>
                options.UseSqlServer());
```

I've <a href="https://www.pmichaels.net/2018/09/16/unit-testing-with-entity-framework-and-entity-framework-core-2-1/">previously written</a> about using UseInMemoryDatabase.  However, this article covered unit tests only - that is, you are able to instantiate a version of the DBContext in the unit test, and use that.  

As a reminder of the linked article, if you were to try to write a test that included that DBContext, you might want to use an in memory database; you might, therefore, build up a DBContextOptions like this:

```csharp
var options = new DbContextOptionsBuilder<MyDbContext>()
                .UseInMemoryDatabase(Guid.NewGuid().ToString())
                .EnableSensitiveDataLogging()
                .Options;
var context = new MyDbContext(options);
```

But in a scenario where you're writing an integration test, you may need to register this with the IoC.  Unfortunately, in this case, AddDbContext can stand in your way.  The alternative is that you can simply register the DbContext yourself:

```csharp
var options = new DbContextOptionsBuilder<MyDbContext>()
                .UseInMemoryDatabase(Guid.NewGuid().ToString())
                .EnableSensitiveDataLogging()
                .Options;
var context = new MyDbContext(options);
AddMyData(context);
services.AddScoped<MyDbContext>(_ => context);
```

AddMyData just adds some data into your database; for example:

```csharp

private void AddTestUsers(MyDbContext context)
{            
    MyData data = new MyData()
    {
        value1 = "test",
        value2 = "1"                
    };
    context.MyData.Add(subject);
    context.SaveChanges();
}
```

This allows you to register your own, in memory, DbContext in your IoC.
Taking a look at CFPs for NodeTLV. I'll see you there, right?
Tags: node, conf, nodetlv, cfp
Published: 2019-12-22 08:11:47

---
title: Taking a look at CFPs for NodeTLV. I'll see you there, right?
published: true
description: NodeTLV is Israel's first International Node.js Conference in Tel Aviv
tags: nodejs, conf, nodetlv, cfp
cover_image: https://thepracticaldev.s3.amazonaws.com/i/8e40vsqox9vf19rsbdpf.jpg
---

Did you hear about Node.js? What about Tel Aviv? Any reason why you shouldn't enjoy both of them?
I agree. No reason indeed :-)

In the summer of 2019, the Israeli Node.js community have announced [the first international Node.js conference in Tel Aviv](https://www.nodetlv.com/), which will happen on 3/3/2020 🎉 This is the result and the work of the amazing local community in Israel for Node.js and the [Node.js IL meetup group](https://www.meetup.com/NodeJS-Israel).

![NodeTLV Israel Node.js conference](https://thepracticaldev.s3.amazonaws.com/i/dwta2h2gqi9sa9qsogrx.jpg)

As I was part of the content team, I did a little number crunching on the CFP submissions, and I think it would be interesting to look at the result.

## CFP Analysis

The CFP opened on August 2019 and ended in November 2019. In total, NodeTLV received 171 talk proposal applications and as is pretty common with human beings, and perhaps programmers in particular, these said creatures have procrastinated their applications to the very last month before the CFP deadline closes. Odd creatures, engineers are.

![NodeTLV Israel Node.js conference CFP talk proposal applications](https://thepracticaldev.s3.amazonaws.com/i/2qp19lqkkqeldzegbi7q.jpg)

How bad do programmers procrastinate? Let's find out!

Following is a plotted chart of talk proposal by day of the month of being submitted.

Y’all just had to wait till the last minute to submit, huh? Typical!

![NodeTLV Israel Node.js conference CFP applications by day of the month](https://thepracticaldev.s3.amazonaws.com/i/8e40vsqox9vf19rsbdpf.jpg)

We have an amazing [speaker line-up](https://www.nodetlv.com) for you with a mix from both local community heroes as well as internationally recognized speakers and stewards of the Node.js ecosystem. You're not going to be bored, that's for sure!


![NodeTLV Israel Node.js conference speaker line-up](https://thepracticaldev.s3.amazonaws.com/i/cc3mt2wmrkhp9oum2b6o.jpg)

Not convinced yet? Look! It's right there on Tel Aviv beach. How can you pass on that?

![NodeTLV Israel Node.js conference](https://thepracticaldev.s3.amazonaws.com/i/ae963mpzmu89n5og3hc2.jpg)

I'll be there too, and I warmly invite you to [grab your ticket](https://www.nodetlv.com) and join us.

Hoping to see you soon,
Liran.
Advent of Code 2019 Solution Megathread - Day 22: Slam Shuffle 
Tags: adventofcode, challenge, adventofcode2019, spoilers
Published: 2019-12-22 08:07:15

---
title: Advent of Code 2019 Solution Megathread - Day 22: Slam Shuffle 
published: True
description: Playin' solitaire till dawn with a deck of 119315717514047
tags: adventofcode,challenge, adventofcode2019, spoilers
series: Advent of Code 2019 Solutions
cover_image: https://i.imgur.com/Hn2EwDf.png
---

Time to relax a little with enormous decks of space cards.

### [Day 22 - The Problem](https://adventofcode.com/2019/day/22)
Now that our droids are happily fixing our hull problems, we've got some time on our hands. Luckily, we're able to indulge in our favorite hobby: shuffling space cards.

Part 1 has us implementing a basic solution for shuffling 10007 cards in our fine-tuned method.

Unfortunately, we aren't happy with just shuffling the standard deck of cards.  No, we need to deal with a very large number of cards being shuffled a very large number of times. Part 2 will probably require we find a way to cheat our way through!

### Ongoing Meta

#### Dev.to List of Leaderboards

* `120635-5c140b9a` - provided by [Linda Thompson](https://dev.to/lindakatcodes) 

 If you were part of [Ryan Palo](https://dev.to/rpalo)'s leaderboard last year, you're still a member of that! 

If you want me to add your leaderboard code to this page, reply to one of these posts and/or send me a DM containing your  code and any theming or notes you’d like me to add. (You can find your private leaderboard code on your "[Private Leaderboard](https://adventofcode.com/2019/leaderboard/private)" page.)

I'll edit in any leaderboards that people want to post, along with any description for the kinds of people you want to have on it. (My leaderboard is being used as my office's leaderboard.) And if I get something wrong, please call me out or message me and I’ll fix it ASAP.

There's no limit to the number of leaderboards you can join, so there's no problem belonging to a "Beginner" *and* a language specific one if you want.
TIL: Destructuring Property Assignment
Tags: javascript, todayilearned, webdev
Published: 2019-12-22 07:37:17

---
description: How to assign destructured properties to variables
---

_This article was originally published on [my blog](https://ncjamieson.com/til-destructuring-property-assignment/)._

---

Until recently, I wasn't aware of the JavaScript syntax for destructuring property assignment.

I knew that I could destructure array elements and object properties in variable declarations, like this:

```js
const [vowel] = ["a", "e", "i", "o", "u"];
console.log(vowel); // a

const { name } = { name: "Alice" };
console.log(name); // Alice
```

And I knew that I could destructure an array and assign an element to a previously declared variable, like this:

```js
let vowel;
[vowel] = ["a", "e", "i", "o", "u"];
console.log(vowel); // a
```

But I didn't know how to destructure an object and assign a property to a previously declared variable. I tried this:

```js
let name;
{ name } = { name: "Alice" };
```

But this error was effected:

```text
SyntaxError: Unexpected token '='
```

The problem was that the braces surrounding the `name` variable were parsed as a block. To be parsed as [destructuring property assignment](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment), the assignment expression needs to be surrounded by parentheses, like this:

```js
let name;
({ name } = { name: "Alice" });
console.log(name); // Alice
```

It's worth noting that if you rely upon [automatic semicolon insertion](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#Automatic_semicolon_insertion), you may need to precede the parentheses with a semicolon to prevent the assignment expression from being used to execute a function on the previous line.

For example, this usage:

<!-- prettier-ignore -->
```js
let name
console.log("assigning")
({ name } = { name: "Alice" })
```

Will effect this error:

```text
TypeError: console.log(...) is not a function
```

---

_Title photo by Florian Klauer on Unsplash._
Breaking down JSX
Tags: react, javascript
Published: 2019-12-22 06:27:34


![](https://dab1nmslvvntp.cloudfront.net/wp-content/uploads/2017/10/1506909912jsx.jpg)

JSX might seem like some fancy term but it's nothing more than syntactic sugar for the **React.createElement()** API.

React.createElement takes three parameters, i.e., type, props and children.


```js
React.createElement(type, props, children)
```

```js
<button color="red">Click!</button>
```
So, this is our JSX- a button with a color property. The HTML element/Component is our type here, color is our prop, and the text "Click" is children of our component. 


The compiled code would look like this.
```js
React.createElement("button", { color: "red" }, "Click!")
```

## What actually happens under the hood ?

[Babel](https://babeljs.io), the transpiler is mainly responsible for allowing us to use JSX because we know that in order for the browser to understand, the code has to be converted into ES5, and that's what Babel is doing. Any ES6 thing like arrow function, class, let etc. will be handled by Babel. 


```js
const App = (props) => {
    return (
        <div>
            `Hello, my name is {props.name}`
        </div>
    )
}

ReactDOM.render(<App name="Sam" />, document.getElementById("root")) // suppose we have index.html and there's an element with an id of root in which we are rendering our application
```


Babel compiles the above code in the "form" that only browser can understand.


```js
var App = function App(props) {
    return React.createElement("div", {name: "Sam"}, "hello")
}

ReactDOM.render(React.createElement(App,
 {name: "Sam"}
 ), document.getElementById("root"))
```

Thank You for reading this article!!!

Follow me on [Twitter](https://twitter.com/_himalayan_) for more updates.
New personal website using GatsbyJS
Tags: javascript, gatsby, webpack, react
Published: 2019-12-22 06:11:45

---
title: New personal website using GatsbyJS
published: true
description: 
tags: javascript, gatsbyjs, webpack, react
cover_image: https://thepracticaldev.s3.amazonaws.com/i/mn3sop1whop76fucyxvs.png
---

Just built my new personal website using GatsbyJS.

Very cool framework that allows a backend services engineer like myself to easily use all the slick, new, front-end tech(react, graphql, webpack, etc) out of the box.

Definitely recommend checking it out if you need to crank out a static website(https://www.gatsbyjs.org/).

https://chris-anatalio.dev 😁
The Year of More
Published: 2019-12-22 19:52:43

---
title: The Year of More
published: true
date: 2019-12-22 05:05:13 UTC
tags: 
canonical_url: https://cohan.dev/more/
---

The year of more. As if spinning plates all through 2019 wasn’t exhausting enough?!

Well, yeah.. tires were spun, the engine was revved, gears were ground.. but what was there to show for it? A bunch of abandoned projects and [Hosted](https://cohan.dev/project/hosted) sort of coming together in the last month or so! Ooooh well done, me. So proud.

In 2020, the year of the future, I’m going to release something. Multiple somethings. Publicly. It don’t count if nobody sees it.

Each project has 1 month before going public. If it sucks, it sucks. Do it better next time. Release date is 18:00 on the last day of each month. Time for previous months’ projects to be maintained and supported needs to be factored in.

If any take off\*, the year of more may (but isn’t obliged to) end.

\* ‘take off’ defined as `yearly revenue > current salary`

Get the latest on the current project over on the [/now/](https://cohan.dev/now) page.

Things to do in 2020:

- Hosted MVP (Release end of Jan 2020)
- Next project tbc (Release end of Feb 2020)
- and so on

Also to do:

- Personal podcast (Ep 1 to release 1st Jan 2020)
- [Live stream a bunch of it!](https://cohan.dev/live/)
- Blog it, all of it. Something like once a week.
- [Embrace failure](https://www.patreon.com/join/cohan/checkout?rid=4353410) on [Patreon](https://cohan.dev/patreon).

Lets see how this goes eh!

Heavily inspired by (read: it’s basically the exact same thing as) [@levelsio](https://twitter.com/levelsio)’s [12 Startups in 12 Months](https://levels.io/12-startups-12-months/).

“Yearly theme” comes from [Cortex’s Theme System](https://www.thethemesystem.com/) and related [podcast](https://relay.fm/cortex)
The (Python) Road to Async (Part 0)
Tags: python, async, asyncio
Published: 2019-12-22 03:37:03

# Ever wondered what's going in with `async`/`await`?

A long while back, I was confused by when using asynchronous programming in python - how can it even be that you need a library (the `asyncio` library) to use a function declared with nothing but python native keywords?

I did understand how to use `async` and `await` in the context of a framework, but I felt like I was missing something. I couldn't seem to find a satisfying explanation of how `async`/`await` and `asyncio` *work*.
I also couldn't find any blog posts that helped.

Once I finally felt I got the hang of it (not too long ago!), I decided to write a series of posts to explain the topic.

### Why a series?

I'm writing a series of posts instead of a standalone blog post. And it will be a long series. I plan to start a long way from the asynchronous coroutine. I'm going to cover sequences, iterables and iterators, generators (a special kind of iterator), generator based coroutines, and finally, the awaitable coroutine. And let's not forget "magic methods" (also called "dunder methods").

There is a reason for this. To explain how a the awaitable coroutine works, I want to mention - and explain - a lot of concepts, starting rather simple, so (hopefully) anyone can understand `async`/`await` just by reading the series. By starting with relatively simple constructs (constructs that *gave rise* to the awaitable coroutine), I am able to introduce these concepts much slower, and thereby, more digestible.

### Prerequisites

Before reading this series, you should probably be

+ familiar with Python, or at least another programming language
+ familiar with classes, including the Python kind, where you pass around `self` all the time.

Now that I've explained the topic and the motivation, let's begin!
Easy and FREE ways to publish a website in 2020!🥳
Tags: webdev, beginners, devops, banana
Published: 2019-12-22 03:19:14

There are too-many-to-count ways to publish a website in 2019 and there will be more in 2020. I've scoured the internet for free web hosting and deployment services. I've tried many and these are my personal picks for easy and FREE web hosting in 2020!

#### GitHub pages - [https://pages.github.com/](https://pages.github.com/)

> Websites for you and your projects. Hosted directly from your  GitHub repository . Just edit, push, and your changes are live.

Free site hosting, custom domain support and free SSL certificates to show you care about security! 

#### surge.sh - [https://surge.sh](https://surge.sh)

> Simple, single-command web publishing. Publish HTML, CSS, and JS for free!

Don’t like to leave the command line? Fear not! Surge.sh to the rescue. Easy publishing without leaving your terminal. 

#### Zeit - [https://zeit.co](https://zeit.co)

> ZEIT Host your web projects with zero configuration, automatic SSL, and global CDN.

ZEIT is a cloud platform for static sites and Serverless Functions. Easy, free, what more do you want?

#### Netlify - [https://netlify.com](https://netlify.com)

> Deploy modern static websites with Netlify. Get CDN, Continuous deployment, 1-click HTTPS, and all the services you need.

I’m a fan of how simple it is to deploy a site with netlify. Connect to your GitHub repo or drop a folder onto their website; super simple!

#### AWS Amplify - [https://aws.amazon.com/amplify/console/](https://aws.amazon.com/amplify/console/)

> Hosting for fullstack serverless web apps with continuous deployment_A fantastic and free (for a year) service from Amazon.

If you’re familiar with AWS products you’ll love amplify, integrates with the rest of the amazon stack; do it all from one browser tab!

#### Google Cloud Platform - [https://cloud.google.com](https://cloud.google.com)

> Build, Test & Deploy With Ease. Get $300 To Try Google Cloud Now. Deploy in Minutes.

Google cloud platform is overkill for small and simpler projects. If you need server less services like, databases or lambda functions; GCP is a solid choice.

--
Enjoyed the post? Let me know! 💛🦄🔖
How to Code Neat Machine Learning Pipelines?
Tags: python, machinelearning, architecture
Published: 2019-12-22 03:15:35

Have you ever coded an ML pipeline which was taking a lot of time to run? 

Or worse: have you ever got to the point where you needed to save on disk intermediate parts of the pipeline to be able to focus on one step at a time by using checkpoints? 

Or even worse: have you ever tried to refactor such poorly-written machine learning code to put it to production, and it took you months? 

Well, we’ve all been there working on machine learning pipelines for long enough. 

So how should we build a good pipeline that will give us flexibility and the ability to easily refactor the code to put it in production later?

Read the full post here: 
https://www.neuraxio.com/en/blog/neuraxle/2019/10/26/neat-machine-learning-pipelines.html
Top level await in Dev tools
Tags: chromedevtools, javascript
Published: 2019-12-22 02:19:32

---
title: Top level await in Dev tools
published: true
description: 
tags: chrome-devtools, javascript
---


Many times when you are writing code you may want to do a simple fetch request and see the response. Doing this is quite annoying from dev tools (because fetch API returns promise which you then have to resolve to get response). Fortunately for us Chrome dev tools support top level **await** without needing async function. Meaning you can do this

```
> const response = await fetch('https://jsonplaceholder.typicode.com/todos/1')
> await response.json()
```

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/mu4r4ujyvyr6h5mmrtqf.png)
basic calculator
Tags: codepen
Published: 2019-12-22 02:03:31

---
title: basic calculator
published: true
tags: codepen
---



{% codepen https://codepen.io/claive-alvin-polo-acedilla/pen/wvBJENg %}

https://github.com/cabpacedilla/boyet/blob/master/calculator
https://bitbucket.org/cabpa/boyet/src/bb70c0b9e422e7b13f874b4abb1eaf7bcece6b67/calculator
What’s new in Virtual User Generator 2020?
Tags: loadrunner, microfocus, performancetesting
Published: 2019-12-24 15:40:47

---
title: What’s new in Virtual User Generator 2020?
published: true
date: 2019-12-22 01:47:49 UTC
tags: LoadRunner,Micro Focus,Performance Testing
canonical_url: 
---

If you are not aware, there are changes in the Micro Focus LoadRunner Family, you can check it out my previous [blog post](https://qainsights.com/welcome-to-loadrunner-family/) about the changes. This blog post will give you an overview about what's new in VuGen 2020.

# Visual Changes

* Redesigned File Menu 
* New icons in the Toolbar
* New Integration where you can upload your scripts to LoadRunner Enterprise (formerly known as Performance Center)
* No VuGen Help Locally

![LoadRunner Enterprise](https://cdn.statically.io/img/qainsights.com/wp-content/uploads/2019/12/Upload-to-LoadRunner-Enterprise.png)

# Protocol Changes

* New WCF Toolkit for Webservices protocol
* SAP Web Protocol now supports: Recording Report, Asycn Communication, new predefined DFE, and HAR file generation after replay
* Newer versions support of Fiddler and Wireshark


The post [What’s new in Virtual User Generator 2020?](https://qainsights.com/whats-new-in-virtual-user-generator-2020/) appeared first on [QAInsights](https://qainsights.com).