teleren/devto huggingface dataset:
I built a petrol expenditure and vehicle mainetanace tracker app, to help me save money.
Tags: showdev, dotnet, csharp
Published: 2020-05-03 13:00:04

Hello world ;)

I work full time but still enjoy working on passion projects for fun, but also to showcase what I can do, as well as use them to improve upon my skill set. For the past two years or so I’ve been working on a product called ImprezGarage that is, as I dub it: an “An all-in-one vehicle maintenance and petrol expenditure tracker application”.

It’s a WPF application that I started working on when I left my previous company and started at my current one. It’s been a great way to see where I was and where I am now. Like many passion projects by developers, I use it quite regularly myself, to keep track of how much I spend on petrol for my car. Now that I’ve recently changed cars, it has been great to visualise just how much I am saving.

So why am I on here today telling you this? Well I’ve got to a really good point now and think it would be great for others to take a look and see. Maybe even use it themselves to visualize their own petrol expenditure. Or keep record of when they do any maintenance on the vehicle.

I also would love some feedback. Let’s face it, at work there’s always feedback and besides maybe fixing bugs and re-writing code, I’m not sure where else to take it. My first thought is that with it being a desktop application, this might limit the amount of users who would adopt it. Therefore a web application would be better. But as that's not currently my forte I've stuck to the desktop application for now.

I’ve also been reading about other people's successes on here (as well as other sites) and I think to myself: “I could also do that”.

If this interests you please head over to imprezgarage.com and take a look.
JavaScript Operators and Conditionals simply explained for Beginners 🎬
Tags: javascript, codenewbie, beginners, tutorial
Published: 2020-05-03 12:51:28

In this video you will learn with **simple examples and visualizations everything about conditionals, comparison and logical operators in JavaScript**. 👊🏽

I explain in detail:
- ❶ What comparison operators are, like equality (===) and greater/less than (>, <) and how to use them.
- ❷ Next I show how if else statements in javascript work and also explain why those javascript conditionals are useful. 
- ➌ Last but not least you will learn logical operators (&&, ||), which combine conditionals.

{% youtube qK3yEwXqaAc %}

-----------------

✅ I will upload a **complete JavaScript Tutorial for absolute beginners**. So if you are completely new to programming this will give you a step by step guide to learn JavaScript. You can subscribe on Youtube to get notified 🙂 ✅

I'm happy to connect with you on
- [Twitter](https://twitter.com/Njuchi_)
- [YouTube](https://www.youtube.com/channel/UCdngmbVKX1Tgre699-XLlUA?sub_confirmation=1)
- [Instagram](https://www.instagram.com/techworld_with_nana/)
Placeholder title
Tags: twiliohackathon
Published: 2020-05-03 12:39:59

[Comment]: # (All of this is placeholder text. Use this format or any other format of your choosing to best describe your project.)

[Reminder]: # (Make sure you've submitted the Twilio CodeExchange agreement: https://ahoy.twilio.com/code-exchange-community)

[Important]: # (By making a submission, you agree to the competition's terms: https://www.twilio.com/legal/twilio-dev-hackathon-terms)


## What I built
#### Category Submission: 


## Demo Link
 

## Link to Code


## How I built it (what's the stack? did I run into issues or discover something new along the way?)


## Additional Resources/Info
Use InputSystem package for tvOS in Unity 2019.
Tags: unity3d
Published: 2020-05-03 12:22:01

---
title: Use InputSystem package for tvOS in Unity 2019.
published: true
description: 
tags: Unity
---

# Use InputSystem package for tvOS in Unity 2019.

If you are trying to build games for tvOS with Unity 2019 with new InputSystem package. You'll see compile error and fails to build.
I found a solution about this.

## TL;DR;

Drop a line with `com.unity.modules.vr` from `Packages/manifest.json` on your project.

## Details

First, create a 3D game project with Unity 2019.3.

Then add InputSystem package.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/1hs4yko0ie1u5r3v37te.png)

Switch target platform to tvOS.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/7zmilutado7igpw1r6gv.png)

You'll see error messages in console when you hit a play button to build.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/4zvlciao8xy6udfvpys7.png)

```
Library/PackageCache/com.unity.inputsystem@1.0.0/InputSystem/Plugins/XR/TrackedPoseDriver.cs(153,17):
error CS1069: The type name 'XRDevice' could not be found in the namespace 'UnityEngine.XR'. 
```

It means `UnityEngine.XR.XRDevice` couldn't be found in `XR` namespace.

[TrackedPoseDriver.cs:153](https://github.com/Unity-Technologies/InputSystem/blob/fe0953cec872a0c85619612c652500e3e35f281c/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/TrackedPoseDriver.cs#L153) is looks like this.
```cs
        protected virtual void OnDestroy()
        {
#if UNITY_INPUT_SYSTEM_ENABLE_VR
            if (HasStereoCamera())
            {
                UnityEngine.XR.XRDevice.DisableAutoXRCameraTracking(GetComponent<Camera>(), false);
            }
#endif
        }
```



You may found that `UNITY_INPUT_SYSTEM_ENABLE_VR` is used in a preprocessor directive in `TrackedPoseDriver.cs` 

And let's take a look at [Assembly Definitions](https://docs.unity3d.com/Manual/ScriptCompilationAssemblyDefinitionFiles.html) of this package.

[Packages/com.unity.inputsystem/InputSystem/Unity.InputSystem.asmdef#L45-L47](https://github.com/Unity-Technologies/InputSystem/blob/585047ccb5138dff1e2662cd0be453193a585f6f/Packages/com.unity.inputsystem/InputSystem/Unity.InputSystem.asmdef#L45-L47)

```json
    "versionDefines": [
        {
            "name": "com.unity.modules.vr",
            "expression": "1.0.0",
            "define": "UNITY_INPUT_SYSTEM_ENABLE_VR"
        },
```

This says `UNITY_INPUT_SYSTEM_ENABLE_VR` is set when `com.unity.modules.vr:1.0.0` available.

There is no VR support for tvOS yet. So I dropped this without hesitation. 

Tada!!

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/ue1ps1pv426zt579dbxi.png)

Now I can use InputSystem package.

It's a bit weird solution but works.
This error only happens on tvOS. Maybe available classes are different between platforms even if same `com.unity.modules.vr` packages are listed in `manifest.json`. 

This article is originally posted on [medium](https://medium.com/@TETRA2000/use-inputsystem-package-for-tvos-in-unity-2019-acf810aa92c7).
TensorFlow.js: Machine Learning in JavaScript by Jason Mayes (Google)
Tags: javascript, machinelearning, python, news
Published: 2020-05-03 12:14:59


TensorFlow. js is an open-source hardware-accelerated JavaScript library for training and deploying machine learning models. Develop ML in the Browser. Use flexible and intuitive APIs to build models from scratch using the low-level JavaScript linear algebra library or the high-level layers API.  Join us for a short introductory talk to learn more about machine learning in JavaScript and some of the superpowers you gain by using TensorFlow.js in the browser and beyond.


Please RSVP here https://www.meetup.com/TFUG-Mysuru/events/270417132/
What are options for Multi-platform desktop app builder?
Tags: discuss, electron, webdev, help
Published: 2020-05-03 12:10:38

Some of the options I know,

- Deliver HTML/CSS/JS directly, without a backend
- [Electron builder](https://www.electron.build/multi-platform-build) + MacOS + Docker with Wine
- Build for Window with Docker Wine
- Deliver shadow JAR / fat JAR
- Build on Travis CI / Appveyor + GH_TOKEN (I don't know how to do this)

What are other options, if I want to use web framework, but want to avoid Electron?
Linux üzerinde brcm80211 sürücüsünü tanıtma
Tags: brcm80211, wifi
Published: 2020-05-03 12:05:15

Çeşitli cihazlarda bulunan "brcm80211" sürücüsü çoğu zaman Linux üzerinde çalışmıyor gibi algılanabilmektedir. Fakat oldukça basit bir çözümü bulunmaktadır.

Öncelikle efi sistemi ile açmadığınız bir oturumda aşağıdaki gibi bağlantı kurabilirsiniz. Eğer sistemi zaten efi'li olarak açtıysanız bunu yapmanız gerekmemekte.

```bash
mount -t efivarfs none /sys/firmware/efi/efivars
```

İlgili kısımda "nvram-" ile başlayan bir dosya ile karşılaşacaksınız. (örneğin: **/sys/firmware/efi/efivars/nvram-74b00bd9-805a-4d61-b51f-43268123d113** ) Bu dosya içinde wifi cihazıyla ilgili de bilgi bulunmaktadır. Dolayısıyla cihazdan cihaza fark etmektedir.

Daha sonra ilgili dosyayı aşağıdaki konuma taşıdığınızda sistemde wifi modülünüzü kullanabilirsiniz

```bash
cat /sys/firmware/efi/efivars/nvram-74b00bd9-805a-4d61-b51f-43268123d113 > /lib/firmware/brcm/brcmfmac43241b5-sdio.txt
```
Daily Developer Jokes - Sunday, May 3, 2020
Tags: jokes, dailydeveloperjokes
Published: 2020-05-03 12:00:13

---
title: "Daily Developer Jokes - Sunday, May 3, 2020"
description: "Check out today's daily developer joke! (a project by Fred Adams at xtrp.io)"
series: "Daily Developer Jokes"
cover_image: "https://private.xtrp.io/projects/DailyDeveloperJokes/thumbnail_generator/?date=Sunday%2C%20May%203%2C%202020"
published: true
tags: #jokes, #dailydeveloperjokes
---

Generated by Daily Developer Jokes, a project by [Fred Adams](https://xtrp.io/) ([@xtrp](https://dev.to/xtrp) on DEV)

___Read about Daily Developer Jokes on [this blog post](https://xtrp.io/blog/2020/01/12/daily-jokes-bot-release/), and check out the [Daily Developer Jokes Website](https://dailydeveloperjokes.github.io/).___
### Today's Joke is...
![Joke Image](https://private.xtrp.io/projects/DailyDeveloperJokes/public_image_server/images/5e1258ab6087f.png)

---
*Have a joke idea for a future post? Email ___[xtrp@xtrp.io](mailto:xtrp@xtrp.io)___ with your suggestions!*

*This joke comes from [Dad-Jokes GitHub Repo by Wes Bos](https://github.com/wesbos/dad-jokes) (thank you!), whose owner has given me permission to use this joke with credit.*

<!-- 
Joke text:
___Q:___ Where did the parallel function wash its hands?

___A:___ Async
 -->
Badge Generator of "Available on Store"
Tags: javascript, webdev, ios, android
Published: 2020-05-03 11:38:10

---
title: Badge Generator of "Available on Store"
published: true
description: You can create a Badge Download on Store with this Generator
tags: javascript, webdev, ios, android
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/74po9zgpkyegnj1whbc9.png
---

Hi!
I love consistency. I decided to create a badge generator for the buttons "available on the store". The official buttons are all different fonts, spacing, sizes and it is something that in 2020 I can no longer accept. I like homogeneous things.

Tool available here: https://availableon.badge.ptkdev.io/

## 💡 Features
* [✔️] Easy to use
* [✔️] MIT License
* [✔️] Configurable: sizes, font, spacings, margins, texts

## 👔 Screenshot
![Badge Generator of Available on Store](https://dev-to-uploads.s3.amazonaws.com/i/dsicntbl26xszezeo7ax.png)

# ❤️ Thanks! Leave a feedback!
Lambda function 301 redirects
Tags: lambda, aws, serverless, node
Published: 2021-12-20 18:30:12

---
title: Lambda function 301 redirects
published: true
date: 2020-05-03 10:53:04 UTC
tags: lambda,aws,serverless,node
canonical_url: https://jamesmiller.blog/lambda-function-301-redirects/
cover_image: https://i2.wp.com/jamesmiller.blog/wp-content/uploads/2020/05/lambdaRedirectTidbit.jpg
---

Using lambda function 301 redirects from a www subdomain to the root domain is common practice , in this post I’ll show how this is done with Lambda functions in a serverless architecture.

#### Step 1

![Lambda function 301 redirects](https://i2.wp.com/jamesmiller.blog/wp-content/uploads/2020/04/1.jpg?resize=640%2C532&ssl=1)
_Create a cloudfront CDN that is linked to any S3 bucket (it doesn’t matter as the contents of that bucket will never get accessed) and create a lambda function in N. Virginia with the below code (be sure to adjust the domain name to the appropriate target)._

#### Step 2

![Lambda function 301 redirects](https://i2.wp.com/jamesmiller.blog/wp-content/uploads/2020/04/Screen-Shot-2020-04-27-at-21.47.03.png?resize=640%2C532&ssl=1)
_Attach the lambda@edge access policy (see code below) to that lambda function, then click the ‘Deploy to Lambda@Edge’ using the actions button and ensure it is attached to the right CDN with the options ‘Origin Request’ selected._

#### Step 3

![Lambda function 301 redirects](https://i2.wp.com/jamesmiller.blog/wp-content/uploads/2020/05/3.jpg?resize=640%2C532&ssl=1)
_Try accessing the www sub domain of your chosen url and you will be redirected to the root domain version of your site. The full url will be copied from the original request, just without the “www.”._

I’ve posted this scripts below (with comments) so you can now use lambda function 301 redirects. I’ve also written a similar post to this on how to [solve an obsure rooting issue with cloudfront](https://jamesmiller.blog/lambda-routing-fix-for-cloudfront/), that you may find helpful! Enjoy! ![😀](https://s.w.org/images/core/emoji/13.1.0/72x72/1f600.png)

### Lambda function

```
exports.handler = async (event) => {
 // get the request
  const request = event.Records[0].cf.request;

  // if the headers of that address contain www.jamesmiller.blog
  if (request.headers.host[0].value === 'www.jamesmiller.blog') {
    // return the new set of headers containing the redirect
    return {
      status: '301',
      statusDescription: `Redirecting to apex domain`,
      headers: {
        location: [{
          key: 'Location',
          value: `https://jamesmiller.blog${request.uri}`
        }]
      }
    };
  }
  
  return request;
};
```

### Lambda permission role’s trust relationship

```
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Principal": {
        "Service": [
          "lambda.amazonaws.com",
          "edgelambda.amazonaws.com"
        ]
      },
      "Action": "sts:AssumeRole"
    }
  ]
}
```
Rpm package install problem
Tags: centos, rpm, fedora, package
Published: 2020-05-03 10:29:50

Hi Everyone,
I cross-compiled my own program on centos. After that packaged the output with rpmbuild. You can see the file tree in the following lines. But when I want to install it to yocto build image on the device, It gives an error like this. But libQt5Positioning.so.5 is on the device. What is the problem?

root@obu:~# dnf install obu-fs-1.el7.cortexa9hf_neon.rpm Error:  Problem: conflicting requests   - nothing provides libQt5Positioning.so.5 needed by obu-fs-1.el7.cortexa9hf_neon

metin@ubuntu:~$ rpm2cpio ./obu-fs-1.el7.cortexa9hf_neon.rpm | cpio -idmv ./opt/test/aa ./opt/test/aa/bin ./opt/test/aa/bin/XX.OBU ./opt/test/aa/configs ./opt/test/aa/configs/AppSettings_XXOBU.json ./opt/test/aa/configs/LogConfig_XX.OBU.json ./opt/test/aa/plugins ./opt/test/aa/plugins/logTargets ./opt/test/aa/plugins/logTargets/libLogTargetConsole.so ./opt/test/aa/plugins/logTargets/libLogTargetFile.so ./opt/test/aa/plugins/logTargets/libLogTargetSyslog.so ./opt/test/aa/plugins/logTargets/libLogTargetUDP.so 2366 blocks
Use html5 emmet inside of markdown (VSCODE)
Tags: vscode, emmet, html
Published: 2020-05-03 09:50:34

## Description

If you want a great way to view your readme markdown easily, you'd want to include a dropdown menu. Readmes can get super long.

Luckily, html5 has a great way to do that via the details tag. But writing all that html5 is tedious especially since there's a thousand lists in a good readme.

So how can we get html5 emmet scripts to populate markdown?

The docs say you need to map the property in the emmet.includeLanguages property in settings.json.

That's not the only thing you have to do because markdown doesn't share the same defaults as html.
You need tab completion and quick suggestions. You also need emmet to not exclude markdown explicitly. Below is the file.

### TLDR : _Below is the code necessary to get it working_

- Set the below in your settings.json of vscode.
```json
"editor.tabCompletion": "on",
"emmet.excludeLanguages": [],
"emmet.includeLanguages": {
   "markdown": "html"
},

"[markdown]": {
    "editor.wordWrap": "on",
    "editor.quickSuggestions": true
}
"emmet.showSuggestionsAsSnippets": true
```

- Now type `details[open=true]>summary`

Great! This should fully expand the snippet.
Still, it's a little wordy. 
I want a custom code snippet. Type vcdd and expand it naturally.

* Set the following code to the settings.json section of vscode
 `"emmet.extensionsPath": "~/SOME_DIRECTORY/"`

* Create a snippets.json in that directory defined in the previous section

* Set the following code inside snippets.json

```json
{
  "html": {
    "snippets": {
      "vcdd":"details[open=true]>summary"
    }
  }
}
```

Great! Now every time you type in vcdd, the custom emmet snippet will trigger the snippet which will then trigger the emmet specific html snippets.

* Caveats

- emmet.extensionsPath only points to the directory that snippets.json resides.
- No runners watch snippets.json. In order to see a change, you need to 
settings.json to do a manual reload. Just delete a random character in your settings.json. Save it. Then add the same character back in the same place inside settingsjson. Save it. That should reload `snippets.json`.



## References
---
https://code.visualstudio.com/docs/editor/emmet#_using-custom-emmet-snippets
https://github.com/Microsoft/vscode/issues/32702
Escape Loading Animation - Feeling Good Because of CSS
Tags: css, webdev, saas, design
Published: 2020-05-03 09:45:11

Hi there, I hope you all are in a good mood.
Today when I was surfing in Dribbble, I faced a cool loading animation, a fantastic loop animation. it drew my attention, and I could not ignore it. as far as I remember I was just gazing at it's GIF for 10-12 minutes and that gave me good feelings.

The design belongs to [Vitaly Silkin](https://dribbble.com/colder), and he shared this on his Dribble profile about 2 years ago.

**[You can read the main version on bhnmzm.com](https://bhnmzm.com/blog/escape-loading-animation-css)**

Anyway, I decided to code it. It took almost 3 hours and 30 minutes but was genuinely enjoyable and be worth it. I was code with pure CSS then added it to the [**practical front-end projects collection**](https://bit.ly/pfep-2020) as a new cool member.

[**You can see the demo here.**](https://bit.ly/2KVz3vu) Also, you can customize the [source on Codepen](https://codepen.io/bhnmzm/pen/WNQXbMz) too.

When it's done, I wrote an email to Mr. Silkin and I thanked him because of his beautiful design. Also, I wrote to him that I hope he doesn't be mad at me for doing it without permission. and I closed the email with this: Your potential friend, Behnam ;)

Sometimes a simple design, a short sentence, or a short story can make us happy so much more than we expected. especially in these difficult days and in the middle of that much works.

Comment your feelings and make me happy more ;)
A Little Collection of Free Developer Resources 🚀
Tags: webdev, career, beginners, codenewbie
Published: 2020-05-03 09:33:10

---
title: A Little Collection of Free Developer Resources 🚀 
published: true
description: A short post just listing off some free resources you can use to keep learning without spending a penny. The internet is a treasure trove of free information but finding valuable content can take…
tags: webdev, career, beginners, codenewbie
cover_image: https://i.imgur.com/H38FhMp.png
---

A short post just listing off some free resources you can use to keep learning without spending a penny.

The internet is a treasure trove of free information but finding valuable content can take time. The list of content here are things I have used throughout my career to learn and upskill.

I have avoided the usual *YouTube* channels as I had covered my favourites in a past post [here](https://medium.com/@nialljoemaher/learn-to-code-for-free-with-youtube-2018-2019-8c9e1b969c07).

📚 Books
-----

-   [Free Ebook Foundation](https://github.com/EbookFoundation/free-programming-books)
-   [DevFreeBooks](https://devfreebooks.github.io/)
-   [App Developer Magazine](https://appdevelopermagazine.com/list-of-completely-free-programming-books-/) --- *Article listing free developer books*

📹 Video Resources
---------------

-   [Computer Science Video Courses](https://github.com/Developer-Y/cs-video-courses)
-   [edX](https://www.edx.org/)
-   [MIT Open Courseware](https://ocw.mit.edu/index.htm)
-   [Coursera](https://www.coursera.org/)

📝 Cheat Sheets
------------

-   [DevHints](https://devhints.io/)
-   [OverAPI](http://overapi.com/)

🤓 Blogs
-----

-   [SitePoint](http://www.sitepoint.com/)
-   [Dev](https://dev.to/)
-   [Scotch](https://scotch.io/)
-   [Joel on Software](https://www.joelonsoftware.com/)

📈 Best Practices
----------

-   [Best Websites a Programmer Should Visit](https://github.com/sdmg15/Best-websites-a-programmer-should-visit#general-coding-advice)
-   [The Clean Code Blog](http://blog.cleancoder.com/)

💼 Interviews and Coding Practice
----------

-   [Runhe Tian Coding Practice](https://tianrunhe.wordpress.com/)
-   [Project Nayuki](https://www.nayuki.io/category/programming)
-   [Algo-Geeks](http://algo-geeks.blogspot.com/?m=1)
-   [Codewars](https://www.codewars.com/)
-   [CareerCup](https://www.careercup.com/)

📦 Miscellaneous
---------------

- [Color & Fonts](colorsandfonts.com)


Got recommendations I should add? Leave a comment below!

---

[Follow me on Twitter](https://twitter.com/nialljoemaher)

Subscribe on [Codú Community](https://www.youtube.com/c/Cod%C3%BACommunity)
Bootstrap studio crash course 
Published: 2020-05-03 09:29:35

I have just purchased the bootstrap studio app and is presently looking to replicate the apple and tesla websites which in my opinion are awesome projects to pursue.
Thankfully bootstrap studio has done this and provided the code to make it repeatable and check my work. 
I am a newbie to bootstrap and my HTML and CSS are mid-level, however i feel something is missing and want advise on how I can pursue this.
I am looking to partly dump WordPress and move on with bootstrap because of its capabilities for reusing code and making awesome changes effectively.

Any wise words will be appreciated
Day 9 of #100DaysOfCode: engage CI for building and validation with Travis-CI
Tags: travisci, javascript, cicd, 100daysofcode
Published: 2020-05-03 09:17:09

## Introduction
Travis CI is the Leader continuous integration platform. It starts in 2011 in open source, move to paid and enterprise.

Travis-CI is Github based. Github will notify Travis CI when the developer push the code. Travis will pull code from Github and run test automatically.

## Steps
1.Login to https://travis-ci.com/
2.Click *Settings* from the dashboard. It redirects to Github.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/fsd8fos1q89lipiwlelc.png)

3.Select repositories from **Repository access**
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/v12ip6y9xj3sdpvae2oa.png)

4.Add **.travis.yml** in the root folder. This is the template for Python.
````yml
language: python
python:
  - 3.6
install:
  - pip install -r requirements.txt
  - npm install
  - npm build  
script:
  - npm test
````
5.Travis-CI will build the repository when we push code to Github
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/kbyn81n24292miksk41y.png)

## Articles
There are some of my articles. Feel free to check if you like! 
* My blog-posts for software developing: https://medium.com/a-layman
* My web resume: https://jenhsuan.github.io/ALayman/cover.html
* Facebook page: https://www.facebook.com/imalayman