teleren/devto huggingface dataset:
A free website to learn how to learn any chord!
Tags: showdev, music, gatsby, react
Published: 2020-01-11 04:03:10

---
title: A free website to learn how to learn any chord!
published: true
description: 
cover_image: https://thepracticaldev.s3.amazonaws.com/i/nnu4jc7e4tzobcnw6vc5.png
tags: #showdev #music #gatsby #react
---

Hi everybody Shayan here!

As a musician and a an engineer I've always wanted to combine my two passions 🎸👨‍💻. 

For the past week I've been working on a microsite on my [app's website Solfej](https://www.solfej.io/), that lets you search for any chord imaginable. (Link is at the bottom if TLDR :) )

This means every note x every chord type x every tension! (Ends up being around 6000 chords after getting rid of some of the whacky or duplicate ones.)

Once you pick the chord you can find the respective's chord notes, intervals, scales that it belongs to, and piano/guitar fingerings.

Here's an example: 👇
![Solfej chord search](https://thepracticaldev.s3.amazonaws.com/i/mbsqov5al1g007qptd17.png)


To create a page for each of the ~6000 chords mentioned above, I create a big JSON file of chords (about 200mb) with notes, scales, intervals, and guitar fingerings mapped to each one.

I mainly use [Tonal.js](https://github.com/tonaljs/tonal) for the music theory operation, but I ended up having to clean up a lot of stuff on my own.

After that I loop through that JSON file using [Gatsby](https://www.gatsbyjs.org/) and make a page for each one.

I'm super excited to share this with the community. Check it out and let me know what you think!

That being said I'm so excited to share this with the community. Check it out and let me know what you think! 

👉 https://www.solfej.io/chords
Angular 8 Install Jquery Example
Published: 2020-01-11 11:26:36

---
title: Angular 8 Install Jquery Example
published: true
date: 2020-01-11 03:41:10 UTC
tags: 
canonical_url: https://www.itsolutionstuff.com/post/how-to-install-jquery-in-angular-8example.html
---

This article will provide you step of angular 8 install jquery i will give you example of how to use jquery in angular 8 we will just include jquery in angular 8 using npm package and i will give you alert example of angular jqueryFew days ago i posted how to install bootstrap 4 in angular 8 ap
Python: What is a keyword argument?
Tags: python, beginners, learning
Published: 2020-01-11 03:19:33

---
title: Python: What is a keyword argument?
published: true
description: Understanding keyword arguments in Python.
tags: python, beginners, learning
---

Say we have a Python function which enables a user to introduce themself, with parameters for first, middle, and last names:
```python
def my_name_is(first, middle, last):
   print(f"Hello, my name is {first} {middle} {last}.")
```

Calling the function with appropriate _positional arguments_ yields the expected introduction:
```
>>> my_name_is("Margaret", "Heafield", "Hamilton")
Hello, my name is Margaret Heafield Hamilton.
```

Since we're passing _positional arguments_ to our function, the position of the arguments matters:
```
>>> my_name_is("Heafield", "Hamilton", "Margaret")
Hello, my name is Heafield Hamilton Margaret.
```

We could, instead, pass _keyword arguments_ to the same function:
```
>>> my_name_is(first="Margaret", middle="Heafield", last="Hamilton"):
Hello, my name is Margaret Heafield Hamilton.
```

Since we are now passing _keyword arguments_ to our function, the position of the arguments does _not_ matter:
```
>>> my_name_is(middle="Heafield", last="Hamilton", first="Margaret")
Hello, my name is Margaret Heafield Hamilton.
```

More detailed information on keyword arguments can be found in the [Python documentation](https://docs.python.org/3/tutorial/controlflow.html#keyword-arguments).

Learn more about [Margaret Hamliton](https://en.wikipedia.org/wiki/Margaret_Hamilton_(software_engineer)).

---

Was this helpful? Did I save you some time?

## {% cta https://www.adamlombard.com/support-me %} 🫖 Buy Me A Tea! ☕️ {% endcta %}

---
First Neural Network
Tags: machinelearning, computerscience
Published: 2020-01-11 02:46:07

So, today I (finally!!) built my first neural network. It was quite confusing to understand how backpropagation work, but in the end it turned out to be not as hard as I thought.
Now I'm thinking of moving on to Deep Learning, so if anyone has good resources on it feel free to share it 🙂
Beautiful software and infrastructure architecture
Tags: architecture, azure, microservices, technology
Published: 2020-01-11 01:59:25

The last 2.5 years I’ve been working with design and development of an EdTech CMS/LMS for a major publishing house in Norway - Gyldendal Norsk Forlag. It's a huge system with 150+ content creators creating content on all subjects for the public school in Norway. From 1st to 10th. There is a lot of diversity between the needs for content for a 1st grade student class and a 10th grade class and in addition there is regulatory requirements from the government, and the need implement adaptability now and in the future. A dream job for any system and solution architect. 

A little while ago I took a screenshot of the application from the Application Insights Application Map that looked like this

![Azure Application Insights Application Map](https://thepracticaldev.s3.amazonaws.com/i/28zt2m2aqozxuhcq7f5z.jpg)

The architectural principle I designed this around is a “Choreographed Services Architecture” principle and seeing it in full blossom just makes me happy and smile.

Getting there was a roller coaster with feelings from euphoria to despair and everything in between, but seeing it – and knowing that it works from repository, through automated CI/CD pipeline to it’s API endpoints makes me happy. Seeing how well both Azure Service Fabric and Azure Kubernetes Services perform just makes me smile.

To create all this we used a multitude of services in Microsoft Azure Cloud (App Services, Functions, Data Lake, Storage, CosmosDb (SQL, Cassandra, Gremlin), DataBricks, Search, Service Fabric, Kubernetes Services, KeyVault, AAD, Network, VMSS, RBAC, NSG, ARM), Azure DevOps (Repositories, Pipelines, Artifacts), Docker,  .NET Core 2.1, 2.2 (& 3.0), C#, Solr. 

To create the frontend for the editors we applied a microservice mindset and developed a React solution based on “micro frontend” principles. We created an application that handled authentication and authorization and implemented a messaging infrastructure so that web app  self-hosted web components could do their job based on the "master" application authentication and authorization rules. Each "plugin" or self hosted component could use security context and messaging/event subsystem to relay messages and events to other plugins.

This has by far been the most exciting software project I've ever been part of throughout my career. How often to you start in a new job to find out that the the whole self developed product portfolio is in such a bad shape that the technical debt alone would strangle any development department. And from that be given the mandate and opportunity design something new, from scratch based on modern architectural principles and technologies - with NO legacy code to worry about. Truly awesome.
Basic Latin Emoji-Style Pound Sign is Reserved
Tags: coldfusion, utf8, emoji, cfml
Published: 2020-01-11 01:40:15

While writing a ColdFusion unit test and using some Emojis, I encountered some strange ColdFusion errors. CF apparently treats the [Basic Latin emoji-style  KeyKap pound sign](https://en.wikipedia.org/wiki/Basic_Latin_(Unicode_block)#Variants) like a [regular "reserved" pound sign](https://helpx.adobe.com/coldfusion/developing-applications/the-cfml-programming-language/using-expressions-and-number-signs/using-number-signs.html).

The only way I could work around the error was to use [CFSaveContent](https://cfdocs.org/cfsavecontent) to render the character (without using CFOUTPUT) and then substitute the variable wherever the emoji was to be used.

Adobe may want to consider adding this emoji to their "[Special Characters](https://helpx.adobe.com/coldfusion/developing-applications/the-cfml-programming-language/elements-of-cfml/special-characters.html)" page.

## DEMO

[View demo with TryCF](https://www.trycf.com/gist/8787000b1905babb62ca6da68e6eff8e)

## SOURCE
{% gist https://gist.github.com/JamoCA/8787000b1905babb62ca6da68e6eff8e %}
Getting over the hump is hard... and rewarding!
Tags: gamedev
Published: 2020-01-11 00:51:45

So, I am one of those people that wrote a game engine from scratch, in Java. While I'm glad I got it as far as I did, with the advent of Java 9 modularity and lacking Windows hardware... that path was quickly becoming a dead-end. Making matters worse: Huge inertia for Swing GUIs hindering my ability to think in terms of traditional game engines.

Switched to a traditional one despite this (Love2D)... and once I overcame the initial learning curve, I realized what I'd been missing: joypad support, easily going full screen, and the ability to release for mobile devices. Wow! I should have taken that risk sooner, but my brain was stuck inside a box and couldn't see the exit though it was right in front of me the whole time...

Now I'm working on 2 games in this new engine, and the nice thing about doing that is learning something for one game often helps the other one, too - meaning faster progress for the pair together than separately.
Tracking Service Updates for MS Dynamics 365 CE in calendar
Tags: powershell, dynamics365
Published: 2020-01-11 00:06:00

Another script from a couple of months ago

> With Microsoft pushing "Service Update XX" almost every week it became hard to track down when particular update is going to be released.

> Powershell script uses application registered in AAD with privileges to read messages from Office 365 Communication API and access D365 to create appointments. Appointments are set category and subcategory to identify unique messages without customizations. Recipients of the appointment are defined as a list of activity parties.

{% gist https://gist.github.com/milolav/6d7175975972b229971b37734b2668c4 %}
pre-commit autoincrement for c# projects
Tags: git, autoincrement
Published: 2020-01-11 00:05:03

I was trying to figure out how to have autoincrement for c# projects that would work in the background, that would locally and that will not change on every build allowing you to build an app with the version stored in source control. And the result is this pre-commit script. It’s not perfect but it works for me. To use, put the file into .git\hooks\ folder in your project.
{% gist https://gist.github.com/milolav/d1d7d2f37d275df2134ceae3eddf157a %}
MSB4236 The SDK Microsoft.NET.Sdk specified could not be found
Tags: dotnetcore, dotnet, msbuild
Published: 2020-01-25 22:43:45

---
title: MSB4236 The SDK Microsoft.NET.Sdk specified could not be found
published: true
date: 2020-01-11 00:00:00 UTC
tags: dotnetcore,dotnet, msbuild
canonical_url: https://solrevdev.com/2020/01/11/error-msb4236-the-sdk-microsoftnetsdk-specified-could-not-be-found.html
---

### Background

Recently I was working on a website built before dotnetcore was even a thing It was targeting an older version of the original .NET Framework.

I am slowly modernising it. Firstly I upgraded the nuget packages and re-targeted it to .NET Framework version 4.8.

Next, as the solution was split into many projects I was able to migrate many of these projects to be netstandard.

The idea is that all that is left is to think about upgrading the website to a Razor Pages aspnetcore project from the classic model view controller website.

### Missing SDK Build Error

While I was doing this a build script was failing.

![2020-01-11-15.00.04.png](https://solrevdev.com//media/2020-01-11-15.00.04.png)

The error was _error MSB4236 The SDK Microsoft.NET.Sdk specified could not be found_ and is because the project now includes dotnetcore projects that need building.

### The solution

After some googling the answer was to upgrade the `Microsoft Visual Studio 2019 Build Tools` installed on that server.

![2020-01-11-14.57.39.png](https://solrevdev.com//media/2020-01-11-14.57.39.png)

Select `.NET Core Build Tools` and/or `Web development build tools` and install

![2020-01-11-14.59.06.png](https://solrevdev.com//media/2020-01-11-14.59.06.png)

Once this was done the build worked.

Success 🎉
Laravel 6 Typeahead Search | Laravel Autocomplete Search Example
Published: 2020-01-13 10:25:05

---
title: Laravel 6 Typeahead Search | Laravel Autocomplete Search Example
published: True
date: 2020-01-11 00:00:00 UTC
tags: 
canonical_url: 
---

Hi GuysIn this tutorialI will create very simple example of Ajax autocomplete search in Laravel 6 You can easily make text box field autocomplete in Laravel 6 applicationHow to implement autocomplete search with Database in laravel 6 app with jquery typeahead js In this laravel tutorial
GitHub API Authentication - Introduction
Tags: github, octokit
Published: 2020-01-10 23:44:44

This is the first post of a series about different Authentication strategies for [GitHub's APIs](https://developer.github.com/). The different strategies that I plan to write about are

1. Personal Access Tokens
2. GitHub Actions
3. Username & Password (Basic)
4. OAuth
5. Webhooks
6. GitHub Apps
7. CLI

Authenticating requests is required for [GitHub's GraphQL API](https://developer.github.com/v4/) and strongly encouraged for [GitHub's REST API](https://developer.github.com/v3/).

While it is possible to send unauthenticated REST API requests, only 60 requests per hour are permitted. Unauthenticated requests are rate limited based on IP addresses, so if you sent them from virtual servers such as most CI environments they are likely depleted most of the time.

# Example

Sending an anonymous request responds with `X-RateLimit-*` headers stating that less than 60 more requests can be sent until the rate limit is reset. For this example, I'm using [curl](https://curl.haxx.se/)

```shell
curl --head https://api.github.com/repos/octokit/core.js/releases/latest
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 59
X-RateLimit-Reset: 1578690442
```

Sending the same request with an authorization header shows the increased rate limit

```shell
curl --head \
     --header "Authorization: token 70e98949b567d678f62ed81866a1cd54aaeee400" \
     https://api.github.com/repos/octokit/core.js/releases/latest
X-RateLimit-Limit: 5000
X-RateLimit-Remaining: 4999
X-RateLimit-Reset: 1578690903
```

The string `70e98949b567d678f62ed81866a1cd54aaeee400` is an example of a personal access token, which I wrote about in [the next post of this series](https://dev.to/gr2m/github-api-authentication-personal-access-tokens-53kd).
Day 68 : The Return
Tags: hiphop, code, coding, lifelongdev
Published: 2020-01-10 23:16:52

_liner notes_:
- Professional : Returned to CodeMash for day 2! Since we handed out everything yesterday, I got a chance to catch a talk. It was pretty interesting. It was about how the speaker used code and technology to come up with some solutions to help out his community. I have some pics up at https://dwane.in/codemash2020 . It was even better because the room the presentation was taking place was right next to where we had set up. So right before the talk and afterwards, I was able to stand by our sign and answer any questions people had. After that, we went to have lunch. Returned back to the table and spoke with more people. Also, I got to record a 360 video of the venue and all the sponsors table. It took forever to download off my GoPro and get onto my computer. Then GoPro Max decided to split my video recording into 2 parts with no way to join them in the mobile app. Thanks GoPro! I just uploaded them to YouTube which took some time also to export from the GoPro app and upload. I've got to find a better work flow. I also created a "regular" non 360 video that I will speed up and post to Twitter and Instagram.

- Personal : Left the venue and headed back to the airport. Luckily, it looks like I left at just the right time because I didn't hit any real traffic. Now, I'm sitting in the airport waiting on my flight. Did some work, took a 360 photo that should be up on the travel site. The second video is rendering right now. When that is done, I'll add it to the first one and speed it up so I can post to Twitter and Instagram. Trying to get as much done before the flight because I know I'll be tired when I get home.

![Cliffs of Maui, Hawaii](https://thepracticaldev.s3.amazonaws.com/i/i7rwvvtrlqn6vlpq0xn7.png)

Not much to say. Check out https://dwane.in/codemash2020 for pics and vids from my first trip as a JavaScript Developer Advocate. Got a lot of stuff to do during the weekend. Radio show and finish up a presentation at the Orlando Devs meetup on Monday! I'm out. Almost time to board the plane.

Have a great night and weekend!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube E2GV7ErWNPo %}
Alt Text Decision Tree - Quick Helper
Tags: html, webdev, a11y
Published: 2020-01-10 22:46:03


One of the first things we often learn about good web development and HTML is that we need to add `alt` text to images. But when it comes to actually deciding what that `alt` text should be, it can be so difficult to know!

Here's a quick visual to help you decide. If you're interested to dive deeper, you'll find a more detailed exploration on [Up Your A11y](https://www.upyoura11y.com/images-icons-and-emojis/)

![Alt text decision tree illustration, visit the link mentioned above for the full article](https://thepracticaldev.s3.amazonaws.com/i/6czgckyqabn8wtgfmigf.png)


--------
*Did you find this post useful? Please consider [buying me a coffee](https://www.buymeacoffee.com/mgkZuRU) so I can keep making content* 🙂
Adding Facebook Sign In for Web Applications with AWS Amplify
Tags: aws, webdev, oauth, authentication
Published: 2020-01-10 23:08:41

---
title: Adding Facebook Sign In for Web Applications with AWS Amplify
published: true
description: How to create and configure Facebook sign in / OAuth with AWS Amplify for web applications.
tags: aws, webdev, oauth, authentication
---

In this 8 minute video, you'll learn how to create a new Facebook app ID, create an authentication service with AWS Amplify, and enable sign in with Facebook in a web application.
If . . .
Tags: javascript, beginners
Published: 2020-01-10 23:07:13


There's more than one way to skin a cat.

In JS, there is more than one way to return the result of an `if`.
---

## Standard

There are further permutations, but here's the tried and true, simple and basic:
```
if (sky == "blue") {
	setLabel(clearday)
} else {
	setLabel(weather)
}
```
---

## Ternary
The [`ternary`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Conditional_Operator) operator can cleanly take the place of a simple `if` like the one above. It is concise and immediately readable. 

```
(sky === "blue") ? setLabel(clearday) : setLabel(weather)

```
1. `Expression`: It must be in parenthesis, and must be a true/false result.
1. `?` and then what to do with a true or truthy result from the `expression.`
1. `:` and then what to do with a false or falsey result from the `expression.`

This can also be used as a simple way to perform a quick `ifExists` kind of thing.

```
(sun) ? setLabel(daytime) : null;
```
If `sun` has a value, then do a thing. Else, do nothing.

---

## Short Circuit

`null`ing a ternary is neat and all, but it can get better. `if` can be 'short circuited' into something smaller that does an `ifExists` as well as acting on it.

```
let clouds = ["fluffy", "thin", "feathery"];

if (clouds && clouds.map(type => console.log(type))) {}
```

Line 1: set an array. 

Line 2 says: `if` `array is set` `and` `array method can run` `then` `do nothing`

Except we're not doing nothing here. We want the `clouds.map` to be the final result, but only if the `clouds` array has data.

For `and` comparisons like this to return true, *both sides* must be true. Well, when JS sees that there are no `clouds`, it short circuits and moves on to the next step. 

So, when there's data in clouds, and it returns `truthy`, then the map can run successfully, which will also return `truthy` . . . and we've tricked JS into doing something, *and* a kind of bonus action of what is in the brackets.

In vanilla JS this is *merely* ok. IMO it's more clever than it is useful.

However, its most practical use lay in React, where short circuiting can be used to show an iterating component when it exists. 

```
{clouds && clouds.map(type => {
    <Clouds type={type} />
})}
```
Override the included gem method by using hock. 
Tags: rails
Published: 2020-01-10 22:14:47

## 💎 I did it with [DeviseInvitable](https://github.com/scambra/devise_invitable)

```ruby
gem 'devise_invitable'
```

### 🦄 There is a great hook!!
![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/v3i0i0occz9kpimq6hys.png)

## 👍 How to use it?
- I give a block to the super.
  - `super do` is the same as `super(attributes, invited_by) do`. 
- Then, the block will be evaluated at [the yeild](https://github.com/scambra/devise_invitable/blob/master/lib/devise_invitable/models.rb#L326) method.


```ruby
def self.invite!(attributes = {}, invited_by = nil, &block)
  super do |invitable|
    invitable.user = special_user
  end
end
```

## 🔗 Parent Note
{% link n350071/my-rails-note-47cj %}
using node to generate / serve dynamic css and dynamic js
Tags: node, dynamic, css, javascript
Published: 2020-01-10 22:07:43

they said it couldnt/shouldnt be done !

see https://stackoverflow.com/questions/26094297/serve-dynamic-javascript-file-with-nodejs

works for me ! 

see https://osde8info-opensky.glitch.me/

BUT if you know how i should code this please let me know
What is Syntactic Sugar
Tags: javascript, cleancode, syntacticsugar
Published: 2020-01-10 19:49:27

Today I wanted to talk about syntactic sugar and how it improves you and your team coding life.

In computer science, **syntactic sugar** is syntax within a programming language that is designed to make things easier to read or to express.

Let's look at this example. I have an array of items. And I want to check every item is selected or not?

##### Classic Javascript Loop

<a href="https://ibb.co/nnMQWDR"><img src="https://i.ibb.co/qWYmZRx/example-1.png" alt="example-1" border="0"></a>
#### Javascript array method - .every()
<a href="https://ibb.co/g38DfTz"><img src="https://i.ibb.co/vHWJTPZ/example-3.png" alt="example-1" border="0"></a>

Which one do you prefer using? I think **.every()** is cleaner and it explains itself.

Let's look at example two. This time I want to select all items if all items are not selected. If all items are selected, I want to remove all items.

##### Classic Javascript Loop

<a href="https://ibb.co/4Vyj3H2"><img src="https://i.ibb.co/RDnCdqN/example-4.png" alt="example-2" border="0"></a>
#### Javascript array method - .forEach()
<a href="https://ibb.co/prV2GH8"><img src="https://i.ibb.co/93KnzxL/example-5.png" alt="example-2" border="0"></a>

It is not shorter too much. But still, it is shorter and it is self-explanatory.


# Conclusions

Syntactic sugar improves your coding life. Believe me every line matters.
If you are using React or Vue you will have many methods and JSX or Templates in a single component. That is for this post.
rails credentials -e in Docker
Tags: rails
Published: 2020-01-10 21:54:13

## 🤔 Situation
I met an error when I tried to edit the credentials file.

```sh
$ rails credentials -e

error message
```

(Sorry, I've forgotten to note the error message. if you had one, it's great help for me that you'd paste it at the comment 🦄)


## 👍 How did I resolve?
Add this line on your `Dockerfile`.

```sh
## install vim
RUN apt-get update && apt-get install apt-file -y && apt-file update && apt-get install vim -y
```

## 🔗 Parent Note
{% link n350071/my-rails-note-47cj %}