teleren/devto huggingface dataset:
How to hide/unfollow #tags on Dev.to?
Tags: help, meta
Published: 2019-03-29 11:25:36

---
title: How to hide/unfollow #tags on Dev.to?
published: true
tags: help, meta
---

Does **Dev.to** is able to **hide/follow** some **tags**?

Sorry 😢, but I think it's too many questions on [#help](https://dev.to/t/help) are so low quality, so I just want to hide them from my feed if possible.

**Dev.to** for me is a blogging platform for **telling** // **learning** // **discussing** that means it does not about posting your bugs and small things 😢 but I would prefer them to read [How to ask good questions as a developer](https://dev.to/frontendmentor/how-to-ask-good-questions-as-a-developer-51j5) 🤗
JavaScript · Destructuring Assignment with Default Values
Tags: javascript, tip, beginners
Published: 2019-03-29 11:24:28

---
title: JavaScript · Destructuring Assignment with Default Values
published: true
cover_image: https://thepracticaldev.s3.amazonaws.com/i/139w5thlxizw6bzklvhf.png
canonical_url: https://zaiste.net/javascript_destructuring_assignment_default_values/
description: The destructuring assignment is a new syntax to get a part of an array or of an object and assign it to a variable in a more convenient way.
tags: 
- javascript
- tip
- beginners
---

The destructuring assignment is a new syntax to get a part of an array or of an object and assign it to a variable in a more convenient way. It is also possible to set default values when using destructuring assignment.

```js
const user = {
  name: 'Zaiste',
}
const { name, age } = user;

console.log(age); // undefined
```

`const` creates variables, so in the previous example `age` is `undefined`.

```js
const user = {
  name: 'Zaiste',
}
const { name = 'Basia', age = 21 } = user;

console.log(name); // Zaiste
console.log(age); // 21
```

Default values in destructuring assignement only work if the variables either don't exist or their value is set to `undefined`. Any other value, including `null`, `false` and `0`, bypasses the default values in the destructuring statement.

```js
const dummy = {
  name: undefined
}

const { name = 'Basia' } = dummy;
console.log(name) // Basia
```

while for `null`:

```js
const dummy = {
  name: null
}

const { name = 'Basia' } = dummy;
console.log(name) // null
```

You can combine default values with renaming in the destructuring assignment.

```js
const user = {
  name: 'Zaiste',
}
const { name: author = 'Basia', age = 21 } = user;

console.log(author); // Zaiste
```

This creates `author` variable, while `name` is just a label to specify the field to destruct against - it doesn't exist as a separate variable.
My First Go Program !
Tags: go
Published: 2019-03-29 09:35:51

---
title: My First Go Program !
published: true
description: A post about my first try with Go !
tags: go
cover_image: https://upload-images.jianshu.io/upload_images/1669444-7265fc3651ce2d25.jpg?imageMogr2/auto-orient/
---

This is my first post so i will introduce myself a bit before writing about this program.

So... i'm a French PHP Developer, working at Paris in a Telecom Company. I'm a big fan of Google and i want to learn Go for a long time and i've just found a "project" for myself who can be done in GO. It's a good training i hope !

Let's talk about this one.

The project, is to made a "I did" list. It's a bit like a todo list but, in this i only write what i've done. Everything is store in a simple file. I fact, like that i can remember everything i've done in a day, and share with other people if wanted.

I've choose to write this program in Go to learn a bit about this wonderful language and to get out all the other language i already know.

I've made it in about 2 hours and it was a great experience ! I'm not sure everything is clean because it's my first try in Go, but i think it's almost good !

If you want to see how it works and look at the code, you can find the repo on Github: [Idid repo](https://github.com/BtKent/idid).

You are free to share with me (and everyone else) what's wrong with this program !

Thank's you for reading !
Opt The Best in VW, Hill Surrey, Sand Rail And UTV Parts And Extras!
Tags: mooreautoparts
Published: 2019-03-29 08:56:45

---
title: Opt The Best in VW, Hill Surrey, Sand Rail And UTV Parts And Extras!
published: true
description: When looking for the best in performance and affordability, our aftermarket parts are a great value! Free shipping on ALL orders NO PURCHASE MINIMUMS(contiguous USA).
tags: Moore auto parts
---
With regards to adrenaline and speed, you can't beat the rush of sand autos, hill carriages, road racers, or any custom dashing vehicle. In the case of going after a prize or for its basic delight, this is a side interest numerous individuals devote their time and vitality to for amusement only. When searching for the best in VW like <a href="https://www.mooreparts.com/">Moore vw parts</a>, hill surrey, sand rail and UTV parts and extras, we have to choose the best.


At Moore Parts Source, we are respected to be your hotspot for all your car requirements for your most loved road, strip or going mud romping vehicle. Our extensive stock of parts and extras includes the main names in the business for quality and execution you can trust. Browse such staples in the car world as Empi, Deaver Springs, VDO, Autometer, and some more. With our wide determination of reasonable individual parts, you are certain to discover precisely what you have to keep your vehicle running at pinnacle execution. 

We offer sturdy, top notch parts to cover the whole extent of your vehicle, including the motor, brake and suspension frameworks, fuel framework, and that's only the tip of the iceberg.

The majority of the parts and accessories we offer are made with the most noteworthy models of assembling for trusted results you can depend on. From camshafts and sparkle attachments to carburetors and the most recent in tire innovation, we have everything! 

We additionally have the outside components you have to make a custom vehicle that mirrors the mentality of the driver. Look over a variety of light bars, OEM imitation lights, reception apparatuses, hubcaps, wheels tires and <a href="https://www.mooreparts.com/">Moore auto parts</a> to make your vehicle stand-out. Regardless of what part you are searching for, odds are we have you secured!
How To Find EIN(Tax ID Number)
Tags: irseinapplication
Published: 2019-03-29 08:48:50

---
title: How To Find EIN(Tax ID Number)
published: true
description: Want to know how to get a Tax ID number for your business? Let us clear out some points regarding this. 
tags: irs ein application
---

Want to know <a href="https://www.irs-ein-tax-id.com/">how to get a tax id number</a> for your business? Let us clear out some points regarding this. The Internal Revenue Service have made it mandatory for companies to have an EIN. Another name for EIN is Federal Tax Identification Number and Tax ID Number. You can also get EIN for your business online.

If you already have EIN for your business but you don’t remember it, then you can directly call IRS EIN helpline and speak to support representative for the desired help regarding IRS <a href="https://www.irs-ein-tax-id.com/">irs ein application</a>.

If you want to verify EIN that has been issued to you, then you can use Tax ID Number lookup tool to find it. You can locate EIN Number on W-2 Tax Forms.

If the structure or the ownership of a business has been changed, then you might be needing a new EIN. You can confirm it through IRS official website and look for the page “Do I need a new EIN”.

If you check EIN numbers every now and then, then it will be a wise idea to subscribe to an online database service where you can find all the information in a managed way. Generally, EIN database providers offers special discounts and may also grant you some free searches before subscribing to their plan.

EIN is very essential for business transactions as it helps in filing tax returns and getting business loans. Make sure you keep your Tax ID Number handy or use EIN Number lookup to keep track of it.
What is a function?
Tags: beginners, tutorial, learning, devtips
Published: 2019-05-31 10:03:12

---
title: What is a function?
published: true
tags: beginners, tutorial, learning, devtips
canonical_url: https://www.codetips.co.uk/beginner/what-is-a-function/
---

> A function is a predefined block of code that can be executed to perform a specific task

 ![What is a function?](https://www.codetips.co.uk/content/images/2019/03/function_cooking.jpg)

Have you ever completed a task and wished there was a way to automate it so you never have to do it again? We have those same problems in programming.

Whenever we encounter tasks like this we can write a function once, and have it perform the task as many times as we need.

What if you have a favourite recipe, originally planned for three people, but you frequently have different numbers of guests and have to manually work out the right ingredient amounts every time?

The calculation you'd have to perform is:

- Divide the original ingredient amount by three (to get the amount needed per person).
- Take the amount per person and multiply it by the number of guests coming. 

<!--kg-card-begin: markdown-->
```
getIngredientAmount(amount, people) {
    (amount / 3) * people
}
```
<!--kg-card-end: markdown-->

Let's break the above code snippet down to make it easier to understand (we'll go into even more detail afterwards so if you don't understand, just stick with it):

- `getIngredientAmount` is the function name.
- The parenthesis after the function name (`()`) represent things we can pass into the function. In this example, we're passing in `amount` and `people`
- The curly brackets (`{}`) represent the function body. This is where all the repetitive tasks take place. 

Let's take it a step further and use the new function we've just created. Imagine we've got seven people coming to dinner tonight:

<!--kg-card-begin: markdown-->
```
getIngredientAmount(300, 7)
```
<!--kg-card-end: markdown-->

These values ( `300` and `7`) then get passed to the `getIngredientAmount` function, which uses these values in place of `amount` and `people`, similar to how a variable name/value works. The function would then run this calculation:

`(300 / 3) * 7)`

Now we've written this function, we can use it as many times as we want.

<!--kg-card-begin: markdown-->
```
//-- Get recipe amounts for 5 people --//

// original recipe requires 4 parsnips
getIngredientAmount(4, 5)

// 20 grams of sugar
getIngredientAmount(20, 5)

// and 12 eggs
getIngredientAmount(12, 5)
```
<!--kg-card-end: markdown-->

What if we have written 100's of these calculations, and we suddenly realise that the original recipe was actually written for four people!?

That's easy. We just update the function.

<!--kg-card-begin: markdown-->
```
getIngredientAmount(amount, people) {
    (amount / 4) * people
}
```
<!--kg-card-end: markdown-->

Now anything using this function will also use the updated requirement.

This was just a very simple introduction to functions. There are more complex things we can do with them, but we'll cover that in a later article.
“DevOps engineer” is really just a title used to hire sysadmins?
Tags: discuss, dev, devops, ops
Published: 2019-03-29 08:04:46

---
title: “DevOps engineer” is really just a title used to hire sysadmins?
published: true
description: 
tags: discuss, dev, devops, ops
---

Companies are now rebranding their outdated sys admins as "DevOps Engineers" as a quick way to make shareholders happy.

What are your thoughts?
Why Web Applications Are Becoming Popular Than Standalone Applications?
Tags: webapplication, webapps, webappdevelopment, whywebappsarepopular
Published: 2019-03-29 07:51:55

---
title: Why Web Applications Are Becoming Popular Than Standalone Applications?
published: true
description: Internet came into existence about 25 years ago and has become an inevitable part of our society. All of us are familiar with web sites and standalone applications that we have used in our systems for performing a different set of tasks, now those standalone software’s are being embedded into websites and one can use that software with a simple web browser application.  
tags: web application, web apps, web app development, why web apps are popular,
---
<img src="https://thepracticaldev.s3.amazonaws.com/i/f4yneb7khb6pw7e16f35.jpg" />

Internet came into existence about 25 years ago and has become an inevitable part of our society. All of us are familiar with web sites and standalone applications that we have used in our systems for performing a different set of tasks, now those standalone software’s are being embedded into websites and one can use that software with a simple web browser application. These websites which behave and work as a native application are being called as web apps (web applications). 

What is web application development?
The process of creating software application programs that are stored on distant remote servers and renders the software application program on user’s device through the internet over a sophisticated web browser is called Web app (Web applications) development. The websites with dynamic behaviour created after going through this procedure are called Web apps (Web applications).

Why web applications are becoming more popular than standalone applications?
Standalone applications expose companies and users to dozens of problems that can be solved if they move the application to the web development platform.

Read Full Article here: <a href="https://www.decipherzone.com/blog-detail/Why-Web-Applications-Are-Becoming-Popular-Than-Standalone-Applications->lWhy Web Applications Are Becoming Popular Than Standalone Applications?</a>
I am an Industrial Automation engineer, Ask Me Anything!
Tags: ama
Published: 2019-03-29 06:59:32

---
title: I am an Industrial Automation engineer, Ask Me Anything!
published: true
tags: ama
---

I've worked with Siemens, and Rockwell Automation controllers(10+ years).
Not sure how many PLC techs or automation engineers frequent dev.to but ask me anything.

I've worked mainly in the oil, and gas industry for one of the biggest OEM worldwide. Now I work for another big OEM/operator in the land rigs area. As far as the automation type this is heavy equipment, so yeah lots of moving parts, hydraulics, pneumatics, tons of IO sensors. Full time job for OEM.

Before working in the oil and field, I've worked briefly in food manufacturing, and plastipack packaging. All, in all a little bit of everything conveyors, sorting, etc.

I also spent 4 years in the Navy as an Interior Comms Tech, in Norfolk, VA.

Note: If you want to learn about programming plc's, I suggest you install CodeSys it is free and IEC compliant with hundreds of manufacturers. In addition you can simulate programs without needing hardware. Also codesys support raspberry pi.

Edit 1: As per Blaine's comment.
Edit 2: Added CodeSys information.
TicTacToe Unity3d Game Book for Beginners
Tags: tutorial, unity3d, games
Published: 2019-03-29 05:56:54

---
title: TicTacToe Unity3d Game Book for Beginners
published: true
description: 
tags: tutorial, unity3d, games
cover_image: https://thepracticaldev.s3.amazonaws.com/i/42nd4324ckmk6ax3i94o.png
---

I am happy to announce the first rough draft of TTT Book. A short introduction to game design. Still in the early phase, but if you are into game dev I sure would love to hear some feedback. You can complete a TTT game in Unity3d game engine except for the scoring, audio, and finishing touches. This is my first time attempting to write a book, please be gentle. I will be writing the remaining topics soon, just want some feedback to know that I am moving in the right direction.

Any feedback would be much appreciated!

Shout out to igamemaker for letting me use the awesome art assets!


[Book](https://www.dropbox.com/s/ynvx8gqgohqtf53/TicTacToe%20Tutorial.pdf?dl=0)
[Art Assets](https://www.dropbox.com/s/5y4snm8v9agrbus/TTT_Assets.zip?dl=0)

![enter image description here](https://thepracticaldev.s3.amazonaws.com/i/42nd4324ckmk6ax3i94o.png)
Hackerearth hiring coding challenge
Tags: node, javascript
Published: 2019-03-29 04:15:10

---
title: Hackerearth hiring coding challenge
published: true
description: Hotel Problem hackerearth challenge
tags: node.js, javascript
---

*Hotel Problem*

>Management wants to optimize the usage of electricity consumption and also ensure that there is no inconvenience caused to the guests and staff. So, it has installed Motion Sensors at appropriate places and has approached you to program a Controller which takes inputs from these sensors and controls various equipment

The way the hotel equipment are organized and the requirements for the Controller are listed below.

● A Hotel can have multiple floors.

● Each Floor can have multiple main corridors and sub-corridors

● Both main corridor and sub corridor have one light each.

● Both main and sub corridor lights consume 5 units of power when ON.

● Both main and sub corridor have independently controllable ACs.

● Both main and sub corridor ACs consume 10 units of power when ON.

● If there is no movement in particular sub corridors then turn off light and turn on AC for that sub-corridor.

● If there is movement in particular sub corridors then turn on the light and turn off AC for that sub-corridor.

● Allowed Power Consumption (15 * Number of main corridors + 10 * Number of Sub Corridors) units per floor. If it is exceeding then turn off AC of Sub Corridors.


**Take initial inputs:**
 ***Number of Floors: 2
 Main Corridors per floor: 4
 Sub Corridors per floor: 2***
**External inputs from the sensor:**

https://github.com/abhi11210646/hotel-problem
Introducing contributors-img: Keep contributors in README.md
Tags: opensource, showdev, github, tools
Published: 2019-03-29 03:55:59

---
title: Introducing contributors-img: Keep contributors in README.md
published: true
description: generate an image to display contributors of your GitHub repository.
tags: opensource, showdev, github, tools
---

Hey folks! I introduce a web app I've created, **contributors-img**. 
It generate an image to display contributors of your GitHub repository.

![image](https://thepracticaldev.s3.amazonaws.com/i/2by6h6z64d79gka4ncsd.png)

https://contributors-img.web.app/

## Why image?

Because images are only way to embed dynamic content in README.md on GitHub. 

Once you paste the generated image's URL in README.md, it will keep contributors list in sync without any effort. 

It's FREE to use for open source!

Technically, contributors-img is built on top of Google Cloud Functions / Puppeteer / Angular / GitHub APIs. 

## Caveats

- A repo having too many contributors takes a long time to generate an image.
- For each repository, images are generated once in a day and it will be cached for later requests. 

Thanks!
Googol Game or "You should learn when to quit!" - A JavaScript game.
Tags: game, theory, javascript
Published: 2019-03-29 03:09:30

---
title: Googol Game or "You should learn when to quit!" - A JavaScript game.
published: true
description: Googol Game or "You should learn when to quit!" - A JavaScript game.
tags: game, theory, javascript
canonical_url: https://github.com/victorqribeiro/googol
cover_image: https://thepracticaldev.s3.amazonaws.com/i/1jndvv1ctf8zpibqwrnv.png
---

# Googol Game

...or "You should learn when to quit"! - A JavaScript game.

![screenshot](https://thepracticaldev.s3.amazonaws.com/i/1jndvv1ctf8zpibqwrnv.png)

Play it [here](https://victorribeiro.com/googolGame)

## About

After watching [this video](https://www.youtube.com/watch?v=OeJobV4jJG0), that tells you a good time to quit gambling, I decided to create a game to test the theory. 

This game is very simple: given N numbers, that could have the value 0 to googol (10 ** 100 | the number 1 with 100 zeros), you choose a number. You can go home with that number (if you think that is the biggest one) or you could choose another from the options. You last choice is your number! If you got a big number and decided to pick another one, you can't go back to the one you already had. When you think you have the biggest number, click "I'm done" and the game will answer if you have the biggest one or not.


## The experiment

The experiment on the video says that if you take all your options (N) and divede it to the euler's number e and round that to the next integer, the result will give you a good sample of all the values. So you keep picking numbers until you get one that is bigger than the ones you got from the sample. The video says that you'll then have a 1/3 probability of winning. Cool, right?! No?! Don't want to play? Ok, just click "Computer" and let the computer play for you.

## How to play

On the right top corner, where it says "Plays", it's the amount of numbers you already choosen.

Next to it, is a "history" log, with all the number you've selected, being the first one (the red line) your current number.

Bellow all that is the numbers: 1 - N, you just click one to select a number.

When you think you have the biggest number of all, click "I'm done" to see if you got it right.

The "Computer" button makes the computer play the game for you (it wins a lot).


Check out the code [here](https://github.com/victorqribeiro/googol).
Ubuntu で日本語キーボード
Tags: ubuntu, keyboard, japanese, 日本語
Published: 2019-03-29 02:13:54

---
title: Ubuntu で日本語キーボード
published: true
description: 
tags: Ubuntu, Keyboard, Japanese, 日本語 
---

Ubuntu 18.04 では比較的簡単に日本語入力の設定ができるのだが、キーボードレイアウトがUSのままだと、全角半角ボタンでIMEオンオフができなかったり、`@` の場所が違ったりして使いづらいため、キーボードのレイアウトを日本語にしたい。

## コンソールで使うキーボードの設定

    sudo dpkg-reconfigure keyboard-configuration

`Generic 105-key PC (intl.)` → `Japanese` → `Japanese` → `The default for the keyboard layout` → `No compose key` → `Yes` と入力する。

## X(GUI)で使うキーボードの設定

    gnome-session-properties

`Add` → `setxkbmap -layout jp` → `Save`
ちなみに、`Caps Lock`キーを`Ctrl`として使いたければ

    setxkbmap -layout jp -option ctrl:nocaps

![Screenshot from 2019-03-27 12-06-49.png](https://qiita-image-store.s3.amazonaws.com/0/36973/138983fc-7518-901c-042f-558fe25973df.png)

なお `Ctr-Alt-F3` でコンソールへ一時的に切り替えて、
また `Ctr-Alt-F2` でX GUIに戻ると、キーボードレイアウトが
USになるバグがあるので、ターミナルに

     setxkbmap -layout jp

で解決。

## キーボードレイアウトの確認

    $ setxkbmap -print -verbose 10 | grep layout
    layout:     jp

Ubuntuの設定ツールで見ると
![Japanese Keyboard layout](https://thepracticaldev.s3.amazonaws.com/i/nx178ryk7i2latbxa3iz.png)