teleren/devto huggingface dataset:
Learning GitHub Runner Self-Hosting with Windows Desktop Application
Tags: github, beginners, tutorial
Published: 2022-08-29 14:21:00


In the previous post, I talked about running .NET application using CLI. Now, we can use GitHub actions and run unittest for the desktop application.

GitHub provides action runner, so we can use their runners without self-hosting a runner. At my work, we were not able to use GitHub provided runners. Therefore, we had to self-host a runner to introduce CI.

GitHub provides a very gentle introduction to setup a runner. All we need to do is copy and paste their instruction.

#GitHub Settings
We can construct a runner by simply visiting GitHub settings.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qqayfl25qtrq2o231xle.png)

Since I am working on Windows Desktop App, I chose Windows Runner Image.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1kxunjrn7kt86t2ia5qx.png)

We need to download the runner package and then, configure a runner on your computer.

After proper setup of the the runner, we should be able to use the runner we just configured. In my case, I see "TestRunner".

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



#Configure yml file
We can use the runner in the workflow. We setup the workflow for .NET 6 Windows Forms application. 


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

```yml
name: .NET Framework Desktop
on:
  push:
    branches: [ "master" ]
  pull_request:
    branches: [ "master" ]

jobs:

  build:
    #The runs-on below needs to match the tags of the runner.  
    runs-on: [self-hosted, Windows,x64]

    steps:
    - uses: actions/checkout@v1
      name: Checkout Code
      
    - name: Add msbuild to PATH
      uses: microsoft/setup-msbuild@v1.1

    # Execute all unit tests in the solution
    - name: Execute unit tests
      run: dotnet test
```

The workflow syntax can be found in their [official documentation](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions), so I will not go into details of it.

In the last line of the yml file, this is what I wanted to achieve in this post.
I want to run the test everytime I push my code to this repository.
The Usage of Semicolons in JavaScript
Tags: programming, javascript, dev, webdev
Published: 2022-08-30 00:17:55

---
title: The Usage of Semicolons in JavaScript
published: true
date: 2022-08-29 14:16:08 UTC
tags: programming,javascript,dev,webdevelopment
canonical_url: https://javascript.plainenglish.io/the-usage-of-semicolons-in-javascript-c7f2d17d94b1
---

[![](https://cdn-images-1.medium.com/max/916/1*f8iuQRz0veQ6rNbO2yV-sQ.png)](https://javascript.plainenglish.io/the-usage-of-semicolons-in-javascript-c7f2d17d94b1?source=rss-17217f29618a------2)

Should you be using semicolons in JavaScript?

[Continue reading on JavaScript in Plain English »](https://javascript.plainenglish.io/the-usage-of-semicolons-in-javascript-c7f2d17d94b1?source=rss-17217f29618a------2)
NodeJS OAuth2.0
Tags: node, oauth, javascript
Published: 2022-08-29 14:09:00

**Introduction**

OAuth 2.0 is the successor to OAuth 1.0, and it's designed to work with HTTP, HTML5 and native mobile apps. It allows users to grant applications access to their data on other social networks like Facebook or Twitter (and even Slack), while keeping you in control of how much access is granted. In this article we'll look at how authentication works in OAuth 2.0 and what happens when a user grants an application permission to use their data. We'll also cover authorization parameters and how they're used by an application when making calls on behalf of another user.

**OAuth 2.0 is the successor to OAuth 1.0, and is designed to work with HTTP, HTML5, and native mobile apps.**

OAuth 2.0 can be used for authorization by a user agent (user browser) or as an authorizer for a service provider (service provider). The client application requests authorization from the server in order to access protected resources on behalf of the user; if successful, it may then use credentials issued by both the client application's own identity provider and any other third-party providers that have been authorized under this process (e.g., Google).

**Authorization happens when you send a signed request and obtain an Access Token, it to make API calls on behalf of a user.**

An access token is a string of characters that represents authorization. It's like an ID card, but it doesn't contain any personal information. When you send the signed request and obtain an access token from the authorization server, it means you're authorized to make API calls on behalf of a user.

**It's good practice to ensure that users can revoke your application's access at any time.**

To use OAuth 2 you need an authorization server that allows users to grant access from their accounts on behalf of third party applications such as yours. The service will check whether the requesting party has been authorized by the user before granting access—if not then they won't allow it!

**Getting started**
For practical purposes we are going to use a boilerplate created by wilsonwu, this boilerplate I consider is complete for understanding the OAuth protocol, but we are going to add some other cool stuffs to make an update example from library.

`https://github.com/wilsonwu/express-oauth2-demo`
Fewer Observations made than vector observation size - How To Fix
Tags: unity3d, machinelearning, mlagents, sensor
Published: 2022-08-29 14:04:50

Hi !

Let's make it short : 

If you're having this error, it's because your GameObject has two (or more) Agent scripts attached to it.

You can verify that in that in the Inspector, check if there's another Agent script existing.

Happy coding !
How to amend and update a git commit
Tags: webdev, github, git
Published: 2022-08-29 14:03:27

Have you ever made a `commit` message with `git commit` like this?
```shell
git commit -m "Fixed CSS"
```

Only to remember the hundreds of articles you've read on writing "real" commit messages, and to immediately regret your decision? If you've ever done this, you can undo your commit, but an easier way to update your git message is with `--amend`:

```shell
git commit --amend -m "feat-new-ui: Updated margins by 0.25rem"
```

Now you can easily update your commit messages by simply adding `--amend` to your git command.

## Other uses for git commit --amend
Not only can `git commit --amend` be used to make changes to a git message, but we can also use it to add files to an already committed change. For example, let's say you forgot to add the file `style.css` to your commit, but you want it all to exist on the same commit.

All you have to do, is use `git add` to add the file as you normally would like so, and use `git commit --amend --no-edit` to add the file to your existing `git commit`. Simple!
```shell
git add style.css
git commit --amend --no-edit
```

Now your already made commit will have the file `style.css` included, and the message for that commit will remain the same.
Music Monday — What are you listening to? (Chill Edition)
Tags: watercooler, discuss, music
Published: 2022-08-29 13:57:34

_cover image source: [Adventure Time](https://giphy.com/gifs/adventure-time-jake-VJxNm7zrm3K4E)_

**Okie doke! This week we're gonna focus in on a theme. For this particular edition, I want you all to respond with whatever music ya like to chill out to.**

![Monkey chilling, sitting on a sink, being combed by a human](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jm2t1n3olag1h4yh4fpq.gif)

***

## How we do 

In this weekly series, folks can chime in and drop links to whatever it is they've been listening to recently + browse others suggestions.

If you like talking about music, consider following the org [#music discussions](https://dev.to/music-discussions) for more conversations about music!

{% embed https://dev.to/music-discussions %}

***

So, wanna share some tunes that you like to chill to? _Note: you can embed a link to your song on most platforms using the following syntax `{% embed https://... %}`._

I look forward to listening to y'all's suggestions! 👂 🎶
Why 0.1+0.2==0.3 False?
Tags: javascript, tutorial, beginners, codenewbie
Published: 2022-08-29 13:51:29

Hello Everyone today i will be discussing this famous question 
Why 0.1 + 0.2 === 0.3 is false?

Let's get started...

I am using Javascript to show this but this comparison of floating point can be seen in other programming languages as well where they also return false for this comparison.

## Code Example - 
```js
console.log(0.1 + 0.2 === 0.3)
//output - false
```
* It returned false but 0.1 + 0.2 = 0.3 then it why it didn't returned true?
* Well These floating point numbers cannot be precisely represented in Base 2 floating point number.This Explaination of base 2 concept is quite complicated to show but i will show you the simple reason why it happened.

```js
console.log(0.1 + 0.2)
// output - 0.30000000000000004
```

* The actual output of those 2 numbers is 0.30000000000000004 that's why it returned false because we are comparing this
```js
console.log(0.3 === 30000000000000004)
// false
```
* Now you understand why it returned false.

```js
console.log(0.1 + 0.2 === 0.30000000000000004)
//output - true
```

* This time it will return true

THANK YOU FOR CHECKING THIS POST ❤❤

You can contact me on -
Instagram -https://www.instagram.com/supremacism__shubh/
LinkedIn - https://www.linkedin.com/in/shubham-tiwari-b7544b193/
Email - shubhmtiwri00@gmail.com

^^You can help me by some donation at the link below Thank you👇👇 ^^
☕ --> https://www.buymeacoffee.com/waaduheck <--

Also check these posts as well
https://dev.to/shubhamtiwari909/js-push-and-pop-with-arrays-33a2/edit

https://dev.to/shubhamtiwari909/tostring-in-js-27b

https://dev.to/shubhamtiwari909/join-in-javascript-4050

https://dev.to/shubhamtiwari909/going-deep-in-array-sort-js-2n90
Which Company Inspires?
Tags: beginners, career, inspiration
Published: 2022-08-29 13:47:00

I decided to participate in the Hashnode event - "4 Articles in 4 Weeks - Hashnode Writeathon". In my case, it will be 3 articles, because I joined later. In this article, I will explain which companies You should look at and why.

### Reason to Join
Usually, I write articles according to my interests or knowledge. This time I decided to challenge myself by writing articles, that I was not used to. In this case, I can become a better writer.

### Company Size
In some advertisements, small companies can pay good money without having meaningful differences compared to bigger companies. If You are an introvert it is even better to work in smaller companies, because in Your work routine You will communicate with fewer people. Also, if You are a beginner or intermediate developer in a small group senior developer would have more time to answer questions and provide some tips. Bigger companies can provide benefits such as gym, free food, transport, etc. Keep this in mind before applying if this is important for You.

### Important to Know
Before signing up a contract try to find reviews about the company, or ask people who were working with this company. Important to look at: if salary paid in time, how friendly is team, or not friendly at all. Maybe there are insane deadlines, Holidays only from Your wallet, technology stack, small salaries, etc.

### Conclusion
Important to find a company with benefits, that fit You. In most cases, company size is not important. Before signing up a contract check advantages and disadvantages by reading reviews and asking previous / existing workers' opinions. One of the most important advantages is working with friendly or at least not toxic team members.

I am available on social media:
[Twitter](https://twitter.com/Oscar_Sherelis)
[LinkedIn](https://www.linkedin.com/in/oscar-sherelis)
[Instagram](https://www.instagram.com/oscar_sherelis)

Support me:
https://www.buymeacoffee.com/oscarWeb
How to configure git for the first time? - Linux environment
Tags: git, linux, tutorial, productivity
Published: 2022-08-29 13:38:00

## Commands we will use

`git config —list` = list your git configuration

`git config —system` = git configuration for the machine in general

`git config —global` = user configuration for any project

The first thing you should do when installing Git is to configure your username and email address. This is important because each commit uses this information, and it is immutably stamped on the commits you start creating:

```
$ git config --global user.name ramirezmz
$ git config --global user.email ramirezmz@exemplo.br
```

## Other configs that help in everyday life

**Your favorite editor**

When there is a need to edit messages and/or other things that need text editing, git will use some editor by default, but you can already tell git which one to use, in my case, I prefer to use neovim.

```
git config --global core.editor nvim
```

**Autocomplete git**

Let's say you mistyped or forgot the command to add items, git will recommend commands similar to what you tried to type. Also, the correct command will be executed after the x seconds you put

![git suggestion](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m3rqet5o6f4y6n03p369.png)

```
git config --global help.autocorrect 20
```

**Default branch**

```
git config --global init.defaultbranch=master
```

## Links

https://git-scm.com/docs/git-config
HotChocolate:To apply Sort/filter using extended attribute from stitched schema
Tags: dotnet, graphql
Published: 2022-08-29 13:17:26

[GraphQl]: Here is the problem statement
We have performed schema stitching using the federated approach in hot chocolate.
Say we have three downstream services(i.e separate APIs) Customer, Order, and Product. A scenario that we are trying to handle is that the Order must be sorted/filtered using the field which is extended from the Product(Say product serial number). Basically, I need to apply sort/filter on the parent node based on child attributes where the child node is extended from stitched schema.
Structure of Query 1:

```
Order(order: {ProductSerialNumber: DESC}){
  OrderNumber
  Products{. // Products is extended from product services using schema stitching
    ProductName
    ProductPrice
    ProductSerialNumber
  }
}
```
Structure of Query 2:

```
Order(order: {ProductSerialNumber: DESC}){
  OrderNumber
  ProductSerialNumber// This is extended from product service using schema stitching
}
```
How to handle anyone/both of the above-mentioned queries?
Redis Trail - Redis Hackathon
Tags: redishackathon, springboot, kotlin, redis
Published: 2022-08-29 13:15:57

### Overview of My Submission
Redis Trail is an effective audit trail solution can be crucial to an organization's security and data integrity as it can help find the who, what, and when. This helps organizations keep track of changes and investigate potential mistakes or violations of policy. Redis Trail is built as an audit trail application using Spring Boot framework for the backend and Redis as stream storage. And, the client application can integrate with Redis Trail using RESTful API to keep and monitor track of change.

### Submission Category: 

Wacky Wildcards - Redis Trail will records all the data change record and enable the client application to fetch and filter data changes.

### Video Explainer of My Project

You can view our video here.
{% embed https://youtu.be/q-ouExtPMpQ %}

### Language Used

We use Spring Boot Framework with Kotlin Programming Language.

### Link to Code

You can visit our source code via [Redis Trail](https://github.com/soramitsukhmer-lab/redis-trail)

### Additional Resources / Info

- [Spring Boot](https://spring.io/projects/spring-boot/)
- [Spring Data Redis](https://docs.spring.io/spring-data/redis/docs/current/api/)

### Collaborators

- @thayouly
- @jessy_oeung
- @huongsakada
- @luciferrevenant 
- @lonelypotato 
- @svannak 

- - - 

In conclusion, we'd like to thank Redis and the community that create this amazing hackathon. We are really thrilled about our Redis Trail and hope our application can help someone or some organization in their business needs.

* _Check out [Redis OM](https://redis.io/docs/stack/get-started/clients/#high-level-client-libraries), client libraries for working with Redis as a multi-model database._
* _Use [RedisInsight](https://redis.info/redisinsight) to visualize your data in Redis._
* _Sign up for a [free Redis database](https://redis.info/try-free-dev-to)._
Talend Data Management Services - Artha Solutions
Published: 2022-08-29 13:11:51

We have been a part of the Talend ecosystem for over a decade with our experience over the years of the Talend’s product portfolio. We provide [Talend Data Management Services](https://www.thinkartha.com/services/talend/
) and solutions such as big data, MDM, data governance, data integration, and data quality for both cloud-based and on-premises implementations.
Data Insights Platform - Artha Solutions
Published: 2022-08-29 13:10:14

Artha’s [Data Insights Platform (https://www.thinkartha.com/services/data-insights-platform/
) (DIP)*, a powerful AI-driven solution that simplifies and accelerates data governance processes to deliver data-driven insights. DIP provides a set of processes to manage company data as a strategic asset, ensuring that data is used, accessed transparently and consistently for business activities.
Introduction to Python for Data Engineering
Tags: python, data, etl, panda
Published: 2022-08-29 13:09:04



Python has become one of the world's most popular programming languages. Python is becoming the usual programming language for completing numerous data engineering jobs as the demand for data engineers grows. One of the key reasons for its popularity is that it is one of the most widely used languages in data science. Python modules such as Pandas, NLTK, scikit-learn, matplotlib, and others are ideal for accomplishing various data engineering and data science jobs.

**Why study Python?**

1.It is easy to learn and use

The Python language is extremely simple to use and learn for novices and beginners. Python is one of the most approachable programming languages available due to its simple syntax and lack of complexities.
2.It has hundreds of libraries

Python includes fantastic libraries that you can use to save time and effort throughout the early development cycle. Several cloud media providers provide cross-platform support via library-like tools, which can be quite useful.
3.Aids in Automation

The Python programming language may greatly assist with work automation because there are numerous tools and modules accessible, making things much more convenient. It's remarkable to realize that by simply applying for the proper Python programs, one may easily achieve an advanced level of automation.
4.It has a wide supportive community

Python was founded more than 30 years ago, which is a long time for any programming language ecosystem to evolve and mature enough to serve developers at all levels, from novice to expert. A wealth of material, guidelines and video tutorials are available for the Python programming language that learners and developers of all skill levels and ages can utilize to improve their language knowledge.
5.It is efficient

Any python developer will tell you that the python language is more efficient, dependable, and speedier than most modern languages. Python can be used in almost any setting, and there will be no performance loss regardless of the platform on which it is utilized.

**What Python skills does a Data Engineer need to learn?**

Basic Python

1). Maths Expressions
2). Strings
3). Variables
4). Loops
5). Functions.
6). List, Tuples, Dictionary, and sets

Connecting With Databases.
1). Boto3
2). Psycopg2
3). MySQL

Working with Data
1). JSON
2). JSONSCHEMA
3). DateTime
4). Pandas
5). Numpy

Connecting to APIs
1). Requests


**What do Data Engineers use Python for?**

1. Data collection through the use of multiple APIs.
2. Importing data from several file formats
3. Using DAGs to build ETL/ELT pipelines
4. Data processing with Python packages such as NumPy, Pandas, and others.

**CONCLUSION**
This blog discussed how the Python programming language is useful when working with Big Data. Learning about cloud platforms such as AWS, Google Cloud Platform, and Microsoft Azure. Learning SQL and NoSQL are key steps in becoming a data engineer.
YAY! The featured speakers of Devoxx Morocco 2022 are now on the website. Do you know someone among them?
Tags: webdev, techtalks, java, programming
Published: 2022-08-29 13:00:00


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/28vl2oexyx0nlh95e7yy.png)
3 days• +150 speakers• +120 sessions & 1 incredible conference by developers for developers
Join us for 3 days of learning, networking and fun in the vibrant city of Agadir 🏖️
Get Your Ticket Now🔥: https://register.devoxx.ma
Use cases for Windows Cloud Desktop
Published: 2022-08-29 12:58:07

Remote Worker
A VDI environment makes it easy for remote workers to access your organization's standard desktop environment from a variety of devices. With [Windows Cloud Desktop](https://www.clouddesktoponline.com/), you can control access to core software systems and grant access to remote workers in remote locations with minimal investment. Regardless of location, each team member can access the same corporate network and resources while maintaining centralized access and application control.

Call Center
The main advantage of non-persistent desktops is the ease of using the default desktop from a pool of identical desktops. A typical call center is a great example of how this model directly supports the needs of a team of people. Each member of the team only needs to complete a specific set of tasks that do not require the desktop to deviate from the norm. If you can scale your headcount, you can minimize the overhead of provisioning individual physical desktops for her machine by allowing employees to simply log on to available desktops during working hours.

Contract Employee
When a contingent worker joins a team, she needs access to several critical resources and team members, but security is an important consideration. With Windows Cloud Desktop, you can control access to company resources while providing a connection point for temporary employees. Contractors can perform tasks that use organizational resources without accessing systems unrelated to the contract. 

Conclusion:
Apps4Rent is one of the best hosting providers that allows users to work remotely on [M365 Business Premium](https://www.o365cloudexperts.com/microsoft-365-business-premium/) by providing unlimited access to the platform from any internet-connected device anywhere.
How to set default value to query param in jax-rs
Tags: java, rest, api, codever
Published: 2022-08-29 12:46:05

Use the `DefaultValue` annotation parameter (accepts **strings**) where you set the default value alongside the `QueryParam` annotation

```java
@GET
@Path("/bookmarks")
@Produces(MediaType.APPLICATION_JSON)
@Operation(
    summary = "Return bookmarks from repository",
    description = "Return bookmarks from repository")
@ApiResponses({
    @ApiResponse(responseCode = "200", description = "OK"),
    @ApiResponse(responseCode = "403", description = "Forbidden")
})
@RolesAllowed(ADMIN_ROLE)
public void getAllBookmarks(
    @Parameter(description = "max number of returned bookmarks")
    @DefaultValue(Integer.MAX_VALUE + "")
    @QueryParam("maxResult") Integer maxResult) {
  bookmarksService.getBookmarks(maxResult);
}
```

<hr>

> Shared with :heart: from [Codever](https://www.codever.dev/snippets/630c963fe8e6db43eab06439/details). Use :point_right: [**copy to mine**](https://www.codever.dev/snippets/630c963fe8e6db43eab06439/details) functionality to add it to your personal snippets collection.