teleren/devto huggingface dataset:
Reviewing Three Asp.Net Core Tutorials
Tags: dotnet, webdev, javascript, tutorial
Published: 2020-01-06 13:27:05

In my process of learning, in parallel to my C# projects, I am going forward with Asp.Net core, researching current practice and future trends. I came across three interesting tutorials, that combine these.

I try to be less elaborate with the review, just not to confuse the reader with too many details. Try all tutorials, and provide your feedback about them! I am a fan of learning from multiple sources, gradually, increasing complexity and depth step by step.
![Asp.Net Core logo](https://thepracticaldev.s3.amazonaws.com/i/jlgbk66cg01snow6oosc.png)

A. https://codinginfinite.com/creating-admin-panel-asp-net-core-mvc-tutorial/#choosing-template

This one, is aiming to build a nice admin LTE background, and use several practical HTML/JS tips.

The part I *liked* in this tutorial:
1. uses MySQL instead of MS SQL, with EF Core
2. Introduces Logging
3. Uses admin lte template, with all css/js dependencies, and uses also a custom login page
4. provides code repo on GitHub.
5. I see this tutorial as the most impactful to my activities, due to the business-like layout and approach.

What I *didn't like* about this tutorial:
1. Towards the end of it, it becomes superficial in explanation, hard to follow and understand
2. When I started to host the published version - somehow the admin lte is not working, and displays a mess.
3. The Role-Based Authorization part - I am not able understand this, something more detailed and systematic is needed, with better, step-by step explanations.

B.https://www.jerriepelser.com/tutorials/airport-explorer/

This aims combining Asp.Net Core Razor pages with lots of javascript APIs from the internet, especially those focused on maps and geolocation. I find this tutorial very high quality and easy to follow.

The *pros* of this tutorial:
1. Combines lots of internet APIs together with Asp.Net Core/Razor
2. Easy to follow despite its complexity
3. Very high quality explanations and step-by-step approach;
4. Provides GitHub Repo with code.

Some of the *hardships*:
1. Some complexity especially on the Javascript part;
2. The libraries and .net core version seem to be old;

C. https://youtu.be/8DNgdphLvag
This is Tim Corey's next tutorial, an easy introduction to Blazor Server Side. This is some very new technology and his explanations are easy to follow and shared lots of best practices.

The *pros*:
1. Latest technology;
2. Very easy to follow, excellent explanation;
3. Shares some nice best practices with organizing the code and database access;
4. Code provided.

The *cons*:
1. The example seems to be very simplistic, I would like to see a more complex application presented.(maybe a next version for him)
2. The technology presented is still not widespread. Waiting to see how Blazor proves to be in 2020 and later. Clearly Blazor Server Side is more stable, but Client side is not yet production ready.

What kind of similar tutorials would you recommend? I am especially interested in the combination of html/js/css with Razor pages (not Blazor, yet) with a focus for business applications.
React Guides on Pluralsight
Tags: javascript, react
Published: 2020-01-06 13:24:02

# Here's a roundup of my 2019 React guides I wrote for Pluralsight.

### [Working with Bootstrap's Modals in React](https://pluralsight.pxf.io/eXGVQ)

### [Fetching Data and Updating State in a React Class](https://pluralsight.pxf.io/AeDJa)

### [Validating React-Bootstrap Forms with Formik](https://pluralsight.pxf.io/1B3qz)

### [Fetching Data and Updating State with Hooks](https://pluralsight.pxf.io/JXaEv)

### [Working with React-bootstrap Buttons](https://pluralsight.pxf.io/gBVZX)
I wrote a Thank You Page and You Should Too
Tags: webdev, opensource
Published: 2020-01-06 13:16:25

The number of personal blogs has skyrocketed in the last few years. Just a few years ago, Medium, Tumblr, Blogger, or Wordpress were the go-to blogging platforms. They were easy for anyone to pick up but frequently came with a few serious drawbacks.  In 2018 or 2019 we saw personal blogs get a breath of fresh air.  Everybody was setting up their own self-hosted blog and in many cases migrating existing content off of the popular blogging platforms. There are a few reasons that come to mind why this is the case.  

Owning your own content has proven incredibly valuable.  Medium and other blogging services that create paywalls are frustrating to readers and create ambiguity about who owns that data.  There are a few high-profile blogs, such as [FreeCodeCamp](https://www.freecodecamp.org/forum/t/we-just-launched-developer-news-heres-how-you-can-use-it/279929), that have removed their content from a slow, reader-hostile platform and relaunched on their own platform. When you control the content and the experience, you can create your blog the best way for the writers and the readers. 

Another force driving the personal blogging scene is just how much easier it is to create a personal blog because of all the hard work put in by the open-source community and the services that support them.  What previously would have meant spinning up a LAMP stack on a virtual private server is now taken care of by pushing a Markdown file to a git repo which runs a webhook to tell Netlify to trigger a fresh build and redeploy static HTML, CSS and JS to a CDN.  They give this workflow to you and what it requires is [gluing some software together](https://www.drewtown.dev/post/setting-up-gridsome-with-gitlab-netlifycms-and-netlify/) that already plays well together.

So to all the library authors and service providers that make this blog and many more like it possible…

![Thank You](https://media.giphy.com/media/86nJuFHH25Uu4/giphy.gif)

I originally got this idea from [Nick Taylor](https://twitter.com/nickytonline) who created a great [Thanks](https://www.iamdeveloper.com/thanks) page on his personal blog. And like all great developers I borrowed his idea for myself.

It’s not required, no one expects it, but it is a nice gesture to acknowledge the hard work done to make all developers’ lives easier.

[Thank you!](https://www.drewtown.dev/thanks)
On.NET Episode: Azure Service Bus from the ground up
Tags: dotnet, azure, messaging, microservices
Published: 2020-01-06 13:16:10

In this episode, we're joined by [Ashish Chhabria](https://twitter.com/ashishc1) who is a Program Manager on the Azure Service Bus team. He's here to talk to us about where Service Bus fits in the Azure messaging landscape and also explain some of its target use cases.

{% youtube FRzMPqViwuY %}

If you liked this video and would like to see some more of our .NET content, please subscribe to our [.NET Developers YouTube Channel](https://www.youtube.com/channel/UCvtT19MZW8dq5Wwfu6B0oxw).


## Useful Links
* [What is Azure Service Bus](https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-messaging-overview?WT.mc_id=ondotnet-devto-cephilli)
* [Choose between Azure messaging services](https://docs.microsoft.com/en-us/azure/event-grid/compare-messaging-services?WT.mc_id=ondotnet-devto-cephilli)
* [Messaging Patterns](https://docs.microsoft.com/en-us/azure/architecture/patterns/category/messaging?WT.mc_id=ondotnet-devto-cephilli)
Laravel blogs to follow via RSS
Tags: laravel, rss, follower, blog
Published: 2020-01-06 13:15:04

---
title: Laravel blogs to follow via RSS
published: true
description: List of people writing and resources about Laravel to follow via RSS
tags: laravel, rss, follower, blog
canonical_url: https://martinbetz.eu/articles/laravel-rss-to-follow
---

There are many high quality blogs on Laravel and related topics, such as Tailwind, Livewire, AlpineJS and VueJS. There are some well-known bloggers, such as Freek and Matt Stauffer, but also some lesser-known yet excellent ones.

Here are the direct links to the RSS feeds, the list is sorted alphabetically:

- [Amit Merchant](https://www.amitmerchant.com/feed)
- [Ben Furfie's Blog](https://benfurfie.co.uk/feed)
- [Caleb Porzio](http://calebporzio.com/feed/)
- [Christoph Rumpel](http://christoph-rumpel.com/feed.xml)
- [Coder's Tape](https://www.youtube.com/feeds/videos.xml?channel_id=UCQI-Ym2rLZx52vEoqlPQMdg)
- [Dayle Rees](http://daylerees.com/feed/)
- [Diving Laravel](https://divinglaravel.com/feed)
- [Dries Vints](https://driesvints.com/blog/feed.atom)
- [Dyrynda](https://dyrynda.com.au/blog/feed)
- [freek.dev](https://murze.be/feed/)
- [Jason McCreary](https://jasonmccreary.me/feed.atom)
- [Jonathan Reinink](https://reinink.ca/rss)
- [Laravel Daily](http://laraveldaily.com/feed/)
- [Laravel News Links](https://feedpress.me/laravel-links)
- [Laravel News](https://feed.laravel-news.com/)
- [LaraShout](https://www.larashout.com/feed)
- [Laravel-Tricks](http://www.laravel-tricks.com/feed)
- [Martin Betz](https://martinbetz.eu/blog/feed.atom)
- [Matthew Daly's Blog](https://matthewdaly.co.uk/rss.xml)
- [Matthias Geniar](https://ma.ttias.be/blog/index.xml)
- [MattStauffer.com](http://mattstauffer.co/blog/feed.atom)
- [Maurizio Bonani](https://mauricius.dev/index.xml)
- [Mohamed Said](https://themsaid.com/feed)
- [Oh See Media](https://ohseemedia.com/feed)
- [Paulund](http://feeds2.feedburner.com/Paulundcouk)
- [pociot.dev](https://pociot.dev/feed)
- [Sebastian De Deyne](https://sebastiandedeyne.com/index.xml)
- [Shawn McCool](http://shawnmc.cool/feed)
- [stitcher.io](https://www.stitcher.io/https://www.stitcher.io/rss)
- [Tighten Blog](https://tighten.co/blog/feed.atom)
- [Tim MacDonald](https://timacdonald.me/feed.xml)


If you know more Laravel blogs to follow, just write a comment and I'll add them.

Updates:
- 20-01-13: Fixed Jonathan Reinink, added Matthias Geniar and LaraShout
- 20-01-08: Fixed link for Caleb Porzio
Write everything down
Tags: writing, notes, thoughts, ideas
Published: 2020-01-06 13:08:37

---
title: Write everything down
published: true
description: why you should write down any thought that comes to you
tags: writing, notes, thoughts, ideas
cover_image: https://thepracticaldev.s3.amazonaws.com/i/jzxdffqdp4rx702v3rvt.jpg
---
If you have any thought, even if it doesn't appear to be interesting at first, try to write it down. This way you can keep a history of your discoveries.

Otherwise, if you have a brilliant idea and it's in the way of something else (i.e. current work) , writing it down can eliberate the burden that you had and you actually will be able to focus on the tasks at hand, knowing that your idea is safely stored and that you can come back to it later.

Once you gain an experience of quickly writing down something you'll find that your ideas become much better formed and more polished. You'll also be able to communicate them to other people in a more clear manner.

Make sure that you have at all times something to write on, or that your writing app is one tap away, that it will open a note right away and the only thing that is left for you is to write down your thought. It also should provide an easy way to categorize, tag and find your notes.

There is only one disadvantage—it takes time. But this disadvantage is still easily beaten by a potential regret of a missed thought (that could have transformed to something interesting).

Write everything down!
Font Display Property 
Tags: html, css, react, java
Published: 2020-01-06 13:05:09

The font display property has five potential values.

font-display: auto;

The default value, the font display mode is set by the browser and chosen from the four options below.

font-display: block;

The browser will show invisible text for up to 3 seconds, it will then display the Google Font if it has downloaded.

font-display: swap;

The browser will initially show a fallback font, then once the Google Font has downloaded it will swap the fonts.

font-display: fallback;

The browser will initially show a fallback font, if the Google Font is downloaded within 3 seconds it will swap the fonts. If the Google Font can’t download in 3 seconds or less it will continue using the fallback.

font-display: optional;

This mode is very similar to fallback, except the wait time is a lot lower. If a font hasn’t downloaded in 100ms the fallback will persist. To realistically load in 100ms a Google Font must already be in the visitors cache.
Learning ReactJS Need of the Hour
Tags: react, reactnative
Published: 2020-01-06 13:00:06


ReactJS is a declarative, efficient JavaScript framework used to build interactive user interfaces (UI) with greater ease and flexibility. React’s advantages exceed its disadvantages manifolds in making it a robust and adaptable programming library.

In a shorter span of time <a href="https://codersera.com/blog/why-learning-reactjs-makes-sense-in-2020/">ReactJS</a> has gained spotlight amongst developers and is emerging as the top choice for businesses and brands because of the innumerable benefits it offers. Top developers recommend learning ReactJS in 2020 to budding developers because of the many advantages in building highly engaging web applications and user interfaces in lesser time, where they create large scale apps with frequently changing data.

<img src="https://codersera.com/blog/wp-content/uploads/2019/12/React-developer.jpg">

Apparently, ReactJS is strongly associated with successful brands like BBC, Instagram, Netflix, PayPal, and many such popular brands. According to a Similar tech survey, the United States of America is the leading country globally hiring react developers, as compared to other nations like Japan, China, Russia, UK, etc.

It provides many advantages in designing simple views for different states in an application and greater ease in updating and rendering the right components efficiently just when the data changes.

Lets check few of the many advantages of ReactJS:

<ol>
<li>Amazing front-end development experience</li>
<li>Suitable for both start-ups as well as established businesses</li>
<li>Better productivity</li>
<li>Better Code stability</li>
<li>SEO friendly environment</li>
<li>Ease of learning</li>
</ol>

Businesses are rapidly implementing this technology because of the simplicity it offers and the ability to learn in bare minimum time. Code reusability with hassle-free addition/modification of functionalities in the existing system meant allocating very less time and budget on the development and building larger teams in tandem.

React’s benefits of being robust, advanced, responsive,non-risky, user-friendly far exceed its disadvantages and developers and organizations understand React’s relevance in the market, so they are promoting its learning and deployment wholeheartedly.
Mac: bluetooth reset via terminal
Tags: mac, bluetooth, mxmaster
Published: 2020-01-06 12:37:07

---
title: Mac: bluetooth reset via terminal
published: true
description: a cli fix for when your bluetooth mouse disconnects
tags: #mac #bluetooth #mxmaster
---

I love my Logitech MX Master mouse because I have it programmed to 3 PCs and I can switch with the simple press of a hardware button. However, sometimes the mouse bluetooth connection to my Mac gets lost and I'm forced to either plug in a new mouse or remove my Mac from its dock (its under my desk) which is a hassle. Thanks to a [little research](https://trevorsullivan.net/2019/07/30/control-bluetooth-on-apple-macbook-pro-from-the-command-line/) and some good old fashioned unix tools, I have an ez solution! Simply put, this solution will quickly reset your Mac's bluetooth. For me this was enough to grab the mouse again.

### Setup:

**Install blueutil**: `brew install blueutil`

**Map reset command**: `alias bt_reset="blueutil -p 0 && sleep 1 && blueutil -p 1"`

_Set that `alias` wherever you manage your aliases. I have mine set to `~/.alias` which is sourced by `~/.zshrc`._

### Tips:

When you need to run this you may find that your terminal is inaccessible. Here are some keyboard shortcuts to help:

**Start a terminal**: `command` + `space bar`, then type terminal

**Restore a minimized terminal**: `command` + `tab`(hold tab), when you have selected the terminal, press `up arrow` then `space bar`. Now your terminal is selected~

**Run the reset**: just type `bt_reset` and boom! You've found your mouse
Getting mongodb _id for go
Tags: go, mongodb
Published: 2020-01-06 12:30:48

---
title: Getting mongodb _id for go
published: true
description: Get _id in a simple way.
tags: go,mongo
---


For this we use the **primitive** part under **bson**.

```golang

import (
  "log"
  "go.mongodb.org/mongo-driver/bson/primitive"
)

type User struct {
  ID    primitive.ObjectID `bson:"_id" json:"id,omitempty"`
  Email string             `json:"email"`
}
```

We are retrieving **_id** or **id** fields using `ObjectID`.

Let's use it now.

```golang

// Connection check

clientOptions := options.Client().ApplyURI("mongodb://localhost:27017")
client, err := mongo.NewClient(clientOptions)

if err != nil {
  log.Fatal(err)
}

err = client.Connect(context.Background())

if err != nil {
  log.Fatal(err)
}

// Connection check end


// Get collection and findOne example object
collection := client.Database("example").Collection("users")
doc := collection.FindOne(context.TODO(), bson.M{})

// decode user model.
var user User
doc.Decode(&user)

// Print user JSON
log.Println(user)
```

And let's see the result.

```json
{
  "id": "5e0fa7c3739e65ceaf6a3020", // yes!
  "email": "yasaricli@gmail.com"
}
```

Thanks.
Froala WYSIWYG HTML Editor -  Best Features
Published: 2020-01-06 11:57:04

Push web editing limits further and further with the new version of Froala WYSIWYG Editor. It has smart editing features for every user to provide simplicity and ease of editing content being either online and offline. Not only this it also has several other features such as building blocks for beautiful websites, JavaScript web editor, Basic Styling, Class Styling and much more.

To give a try visit https://bit.ly/2QSmx23

#JavaScriptPageBuilder, #WYSIWYGHTMLEditor, #WebPageDesign,
What are SQL Indexes and how to create one? (For Beginners) 
Tags: sql, howindexworksinsql, sqlindexexample, sqlindexesexplained
Published: 2020-01-06 11:51:14

---
title: What are SQL Indexes and how to create one? (For Beginners) 
published: true
description: indexes are lookup table that when used speed up data retrival within a enormous table. 
tags: SQL, how index works in SQL, SQL index example, SQL Indexes explained
---

Indexes are lookup tables that when used speed up data retrival within a voluminous table. 

![Index SQL 1](https://thepracticaldev.s3.amazonaws.com/i/jwpermxdvk91sm5wws1a.jpg)


![Index SQL 2](https://thepracticaldev.s3.amazonaws.com/i/qjzshvya35dnx3kudgra.jpg)




![Index SQL 3](https://thepracticaldev.s3.amazonaws.com/i/eq9ggpmf6fl73k5z84i7.jpg)


I'll appreciate your feedback so I can improve on the sketches.
Configuring PurgeCSS for Use With Nuxt
Tags: purgecss, nuxt, css, performance
Published: 2020-01-06 13:40:56

[PurgeCSS](https://www.purgecss.com/) is a tool for removing unused CSS. It achieves this by cross-checking the compiled CSS with a list of selectors that are extracted from the content files (e.g. HTML files, JavaScript modules, and Vue components).

Using PurgeCSS out of the box with Nuxt resulted in styles included via `@import` statements being correctly purged – both from 1st- and 3rd-party sources. However, due to the configuration of the default [extractors](https://www.purgecss.com/extractors), styles authored within Vue component `<style>` blocks were incorrectly preserved.

Configuring the [PurgeCSS PostCSS plugin](https://github.com/FullHuman/postcss-purgecss) as follows remedies the problem:-

```js
// nuxt.config.js
export default {
  build: {
    postcss: {
      plugins: {
        "@fullhuman/postcss-purgecss": {
          extractors: [
            {
              extractor: content =>
                content
                  .replace(/<style[\s\S]*>[\s\S]*<\/style>/gi, "")
                  .match(/[\w-/:]+/g) || [],

              extensions: ["vue"]
            }
          ]
        }
      }
    }
  }
};
```

Ideally this extraction behaviour would be consolidated within a tested and maintained package such as `purge-from-vue`. That way it could be used in all Vue-based projects.

**UPDATE** (2020-03-21): Reflect change to extractor format in [PurgeCSS `v2.0` release](https://github.com/FullHuman/purgecss/releases/tag/v2.0.5).
Boilerplate for nodejs, typescript - simple folder structure
Tags: typescript, node, postgres, slonik
Published: 2020-01-06 11:27:58

This is a simple boilerplate application to start the project from scratch using typescript and nodejs.

If you are working on freelance projects and wanted to quickstart the project with all the initial setup having simple architechture, use this setup and finish requirement on time :-)

{% github lineldcosta/typescript-node-rest-api-boilerplate %}

It uses the best approaches available to create typescript-nodejs API.


### Requirements

 * NodeJS

### Install global TypeScript and TypeScript Node

 ```
 npm install -g typescript ts-node 
 ```

### Clone this repository 
 ```
 git@github.com:lineldcosta/typescript-node-rest-api-boilerplate.git

```

### Then install the dependencies
 ```
 npm install
```

###To Run the application in production mode
``` 
 yarn start-prod
```

### To Run the application in development mode
 ```
 yarn start-dev
```

### To Run the tests
 ```
 Yarn jest
```


Happy coding...! If you like then don't forget to star itt!!!
Looking for PHP Internship or Training in Ahmedabad?
Tags: php, phptraining, phptraininginahmedabad
Published: 2020-01-06 11:24:02

Do you want to learn PHP in Ahmedabad? TopCode Academy provides PHP training/internship in Ahmedabad on multiple live projects. TopCode- Best IT training center in Ahmedabad, provides a training certificate after completion of course. 


**Advantages of Joining PHP course in TopCode**

1. Job-oriented training
2. Theoretical and practical training with TopCode PHP experts
3. Opportunity to work on multiple live projects
4. Professional and motivational environment.

Call 079 48965111 or visit the website to join the TopCode internship program.
Visit: [PHP training in Ahmedabad](https://www.topcodeacademy.com/php-training-ahmedabad)
How to add an attachment to a JIRA issue using REST API?
Published: 2020-01-06 11:14:04

Following is the process of uploading an attachment to an issue via the 
REST API using the curl command.

```js
curl -D- -u {username}:{apikey} -X POST -H "X-Atlassian-Token: nocheck" 
-F "file=@{path/to/file}" 
http://{base-url}/rest/api/3/issue/{issue-key}/attachments
```
Hope this helps some of you who struggled like me.
Happy Coding!
Another var vs let vs const
Tags: javascript, beginners, webdev, community
Published: 2020-01-06 11:11:00

---
title: Another var vs let vs const
published: true
tags: javascript, beginners, webdev, community
---

During these days I see many articles about this "stuff" declarations war.

I think we can summarise everything in a few lines:
- `var`: why? if you can avoid it, do it;
- prefer `const` usage if possible of course (together with an immutable approach when updating objects)! But don't be scared using `let`, especially if the scope of your variables is small, for example inside a function.

Immutable things are cool when they really help, but just keep in mind that (imho) the most important thing is to have maintainable and readable software because we are a community of devs, teammates.

Happy new year! :tada: