teleren/devto huggingface dataset:
How to get started with Golang and Visual Studio Online
Tags: go, vscode
Published: 2019-11-05 19:07:13

Today I decided I wanted to write something in go using Microsoft's new [Visual Studio Online](https://online.visualstudio.com/). I won't be going over how to setup this up, because Azure can be a pain in the rear and because it deserves it's own article.

To get started, open up the environment you want to use.

## Step One: Installation

First, we are going to download the latest version of Go:
```bash
vsonline:~/workspace$ wget https://dl.google.com/go/go1.13.4.linux-amd64.tar.gz
```

Once you have that downloaded, go ahead and extract it:
```bash
vsonline:~/workspace$ tar -xvf go1.13.4.linux-amd64.tar.gz
```

Now that you have extracted the `go` folder, we are going to move it to `/usr/local`
```bash
vsonline:~/workspace$ sudo mv go /usr/local
```

## Step Two: Setup `GOROOT` and `GOPATH`

We are going to two create two new environment variables, and then modify another.

In your terminal, enter the following:
```bash
vsonline:~/workspace$ vim ~/.bashrc
```
This will open up your bash profile in a command-line editor called **Vim**. For those who don't know how to use vim, or are scared of it, don't worry. I will guide you keypress by keypress.

Vim Steps:
- hold `Shift` + `G` and release
- press `o`
- press `enter`
(you are now in editing mode)
add the following lines where your cursor is:
```bash
export GOROOT=/usr/local/go
export GOPATH=$HOME/workspace
export PATH=$GOROOT/bin:$GOPATH/bin:$PATH
```
- press `Esc`(`Escape`)
- hold `Shift` and double tap the `Z` key

You have successfully escaped Vim, and saved your file. You should now be back at your terminal prompt.

Enter the following command:
```bash
vsonline:~/workspace$ source ~/.profile
```

*Vous voilà!*

## Step Three: Make sure it works

The last step, is to make sure everything we did took hold.

```bash
vsonline:~/workspace$ go version
go version go1.13.4 linux/amd64
vsonline:~/workspace$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/vsonline/.cache/go-build"
GOENV="/home/vsonline/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/vsonline/workspace"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build921856996=/tmp/go-build -gno-record-gcc-switches"
```

If your output looks like mine, you're good to go! You've successfully installed Golang in VSOnline :-)

Happy Hacking!
Defining Drupal - What is Drupal, anyway?
Tags: drupal, webdev
Published: 2019-11-05 18:53:05

![Drupal logo](https://i.imgur.com/V4pnoRR.png)
Drupal is an open-source content management system, similar to Wordpress. It allows you to easily make changes to content on your website, and allows for non-technical users to make these changes too. You can add modules (like a Wordpress plugin) for a variety of user-created features. For the more technical user, you can use Drupal’s API to create your own custom module to add needed features or applications using PHP. 

Drupal’s flexibility is key to its success and allows both low-tech users and high-tech users to create highly successful websites. It’s ideal for large corporations, educational institutions and government agencies that have a lot of information to organize and often a number of low-tech employees that manage these pages.

As a Drupal developer, you have direct control over how the site looks, functions and connects with other API. It’s a great way to create, maintain and manage your website.

##History of Drupal

Drupal was created by two Dutch students in 2000 as a very basic content framework. In 2001, they released their framework on the web. Since then, there have been 8 significant releases, with two current Drupal versions that are commonly used: Drupal 7 and Drupal 8. You can read more here: https://www.drupal.org/about/history
Drupal 9 is due to be released in June 2020.

##Why use Drupal?

Because it’s awesome! But seriously, this is a question I get regularly from people who primarily use Wordpress and find Drupal difficult to use. I won’t dispute that! Compared to the accessibility of Wordpress, Drupal can be tricky to set up and maintain. It doesn’t help that Drupal 7 and 8 are significantly different and it can take a little while to understand how everything works together. But Drupal is also super powerful and customizable right out of the box. As a developer, I also feel like the sites you can create are a lot less cookie-cutter than Wordpress. Ultimately it comes down to what you’re comfortable with. Over the next few weeks, I’ll be blogging about the basics of Drupal, how to set up a site, how to get around the administration menus, some module recommendations, and more. Overall I hope to show you that there’s nothing to fear with Drupal; it’s just one more (powerful) tool for your web developer toolbox.
TypeScript 3.7 has been released today
Tags: typescript
Published: 2019-11-05 18:46:51

Has is stated in this Tweet, the release of 3.7 is out today

https://twitter.com/typescript/status/1191766259035189249

This new release brings:
- Optional Chaining & Coalescing
- Assertion Functions
- .d.ts Emit From .js Files
- Smarter Control Flow Analysis
- Flatter Error Messages

More info here:
https://devblogs.microsoft.com/typescript/announcing-typescript-3-7/
💫 [VideoSnippet] Como usar SASS no React
Tags: react, sass, node, videosnippet
Published: 2019-11-05 18:44:57

#react #node #videosnippet


[🤩 Participe da nossa lista de devs 🤩](http://bit.ly/34qy8e3)

No snippet de hoje, você vai aprender como usar o SASS em uma aplicação React!

Espero que gostem!

[![VideoSnippet; Como usar SASS no React](http://i3.ytimg.com/vi/6XvFAZqNxDY/maxresdefault.jpg)](https://www.youtube.com/watch?v=6XvFAZqNxDY)



[📚 Leitura recomendada "Evolua ou entre em Extinção"](http://bit.ly/35sqiSu)
[➜ Veja as dicas no Instagram](https://www.instagram.com/emersonbrogadev/)
[➜ Assista nosso canal no YouTube](https://www.youtube.com/c/emersonbroga/)
[➜ Curta nossa página no Facebook](https://www.facebook.com/emersonbrogadev/)
[➜ Não perca as atualizações no Twitter](https://www.twitter.com/emersonbrogadev/)
[➜ Veja os repositórios no Github](https://www.github.com/emersonbrogadev/)
Top 5 DEV Comments from the Past Week
Tags: bestofdev
Published: 2019-11-05 18:11:34

---
title: Top 5 DEV Comments from the Past Week
published: true
description: Highlighting some of the best DEV comments from the past week.
tags: bestofdev
cover_image: https://res.cloudinary.com/practicaldev/image/fetch/s--7VrAA2ln--/c_imagga_scale,f_auto,fl_progressive,h_420,q_auto,w_1000/https://thepracticaldev.s3.amazonaws.com/i/qmb5wkoeywj06pd7p8ku.png
---

This is a weekly roundup of awesome DEV comments that you may have missed.  You are welcome and encouraged to boost posts and comments yourself using the **[#bestofdev](/t/bestofdev)** tag.

We start things off with a great reply in the **[Explain Vue to Me](https://dev.to/ben/explain-vue-to-me-3moj)** thread.  @saurabhdaware offers an explanation:
{% devcomment hbb7 %}

@scottydocs adds their proposal to the **[Best 404 Page Found Till Now! What do you say?](https://dev.to/realabbas/best-404-page-found-till-now-what-do-you-say-5c9l)** discussion.  Lots of amazing candidates in that post:
{% devcomment h7k5 %}

In theme with Halloween, people shared their tales in **[What's your spookiest coding story?](https://dev.to/ben/what-s-your-spookiest-coding-story-3c0d)**  @cjbrooks12 hits on the true _terror_ of certain situations:
{% devcomment h6mn %}

In **[The Future of DEV](https://dev.to/devteam/the-future-of-dev-160n)**, Ben shared some pull request contribution states.  While the number of PRs was a tidy milestone in base-10, @isaacdlyman points out that it was just off the mark for an even `2^9`:
{% devcomment hbj2 %}

Book-end'ing this week's top comments is another explanation thread, this time about React in **[Explain React to Me](https://dev.to/ben/explain-react-to-me-2jji)**.  @matthewbdaly offers a great rundown:
{% devcomment ha19 %}

See you next week for more great comments ✌
Deploying with Ansible - Building SaaS #13
Tags: python, django, saas
Published: 2019-11-05 18:02:36

{% youtube qJ97g_j0tlg %}

In this episode, I walked through the deployment process to put the updated web application onto the live site.

We took a slight detour to discuss Continuous Integration when it seemed like Vagrant was broken, but we got back on track and focused on Ansible and how it's used to push code onto the internet.

Show notes for this stream are at [Episode 13 Show Notes](https://www.mattlayman.com/building-saas/deploying-with-ansible/).

To learn more about the stream, please check out [Building SaaS with Python and Django](https://www.mattlayman.com/building-saas/).
ExtendedConsole now available on Nuget
Tags: csharp, dotnet, opensource, console
Published: 2019-11-05 17:59:36

One of my earliest posts here on Dev (and the [very first post on my blog](https://zoharpeled.wordpress.com/2019/09/07/easy-way-to-customize-your-console-apps/)) was about an open source project I've written to help creating console applications:

{% link https://dev.to/peledzohar/do-you-still-write-console-applications-1did %}

Well, I'm glad to announce that this project is now available on Nuget.Org - my first ever Nuget package published to the world (not counting in-house Nuget packages of course) - available as [ExtendedConsole](https://www.nuget.org/packages/ExtendedConsole).

I hope someone will find it useful.
The Angular Event Service
Tags: angular, events, typescript
Published: 2019-11-05 16:42:36

An Event Service is a service that only contains events. It is imported into any loaded component wanting to subscribe to or emit content. It allows cross component communication for any and all loaded components.

The image above shows how a component subscribes to an event in the event service. Any other component which emits to that event is now communicating to all listeners.

**Create A New Service**

Step 1) Create a new service in the proper folder using this syntax.

 ![generate service](https://thepracticaldev.s3.amazonaws.com/i/8nundtgyv5ursvrq55ot.PNG)

Step 2) Define your events in the service class just created:

![define events](https://thepracticaldev.s3.amazonaws.com/i/y0l3wy9ec6ashumat3i9.PNG)

**The EventEmitter**

The generic form of the EventEmitter is found in the Angular/core module. 
 
EventEmitters can send data (or no data) as shown in the examples above.  In the "NewProcessPostResponseEvent" we define a type of data all listeners should expect as well as all emitters have to follow. This allows us to see what type to expect on the Subscribe side, very nice for taking guess work out. 

Step 3) Subscribe to the event. Note **you must import** your event service!

![subscribe](https://thepracticaldev.s3.amazonaws.com/i/xlgicq983si3d1712wgx.PNG)

The EventService is imported to alls components wanting to communicate, either to emit or (listen) for data updates. (see the private declaration in the constructor?) The best part is the service automatically loads at load-time making all components able to communicate. 

**Decorators?**
Sure... just put this into the event service.

![decorator](https://thepracticaldev.s3.amazonaws.com/i/ojagxe1o0g18y9axbvs8.PNG)

Call it like this:

![notify](https://thepracticaldev.s3.amazonaws.com/i/zg66jn8qprsqxezwsmp6.PNG)


JWP2019
Python SnakeBytes: Unpacking
Tags: python, coding
Published: 2019-11-05 17:41:14

---
title: Python SnakeBytes: Unpacking
published: true
description: Learn a Python trick in a minute or less!
tags: python, coding
series: Python SnakeBytes
cover_image: https://thepracticaldev.s3.amazonaws.com/i/48xzce3q3ffqmuxzwcz2.jpg
---

Collections, and most other iterables, can be *unpacked* into individual names, by assigning the collection to a comma-separated list of names.

```python
composers = ['Dvorak', 'Tian', 'Richter', 'Beethoven', 'Holst', 'Elgar']

first, second, third, fourth, fifth, sixth = composers
print(first)  # prints 'Dvorak'
print(second)  # prints 'Tian'
print(third)  # prints 'Richter'
print(fourth)  # prints 'Beethoven'
print(fifth)  # prints 'Holst'
print(sixth)  # prints 'Elgar'
```

There must be enough names on the left side of the assignment operator to hold all the values. Otherwise, a `ValueError` is raised.

A single *starred expression*, a name preceded with an asterisk, may be used in the list of names to capture multiple values.

```python
first, second, third, *rest = composers
print(first)  # prints 'Dvorak'
print(second)  # prints 'Tian'
print(third)  # prints 'Richter'
print(rest)  # prints ['Beethoven', 'Holst', 'Elgar']
```

All of the non-starred names will be assigned to first, and the remainder placed in the starred name.

The name `_` is conventionally used for values that are being ignored.

```python
first, _, _, _, _, last = composers
print(first)  # prints 'Dvorak'
print(last)  # prints 'Elgar'
```

Like any name, `_` can also be starred:

```python
first, *_, last = composers
print(first)  # prints 'Dvorak'
print(last)  # prints 'Elgar'
```

Unpacking is also employed in `for` loops, generator expressions, and argument lists. Anywhere an iterable is being assigned, unpacking can be used.

> **CAUTION:** Do not attempt to unpack an infinite iterator using starred expressions. It can cause the interpreter (or even the whole system) to lock up.
Explain Explain to Me
Tags: explainvuetome, explainreacttome, explainangulartome
Published: 2019-11-05 17:18:01

---
title: Explain Explain to Me
published: true
description: 
tags: Explain Vue to Me, Explain React to me, Explain Angular to me
---

Continuing off the React, Vue and Angular posts made by Ben from Dev.to I was impressed to see the SEO rankings go straight to number one on google.  

So Explain => Explain to me "post was born" to test this formula against engine rankings.

Also this was made for fun, to see the power of Dev.to's weight on the engines, and the "recursion" one could find so easily with title phrases about a topic like this. 


https://dev.to/ben/explain-react-to-me-2jji
https://dev.to/ben/explain-vue-to-me-3moj
https://dev.to/ben/explain-angular-to-me-j5m

Happy coding <3

Since youre here, and my fun post hasnt been flagged for poor grammar or bad humor, consider subscribing to my youtube channel because Im only 5 subs away from 100 sub fame!  Im not above grovelling or mispells to get your attention. -

Make my day by subbing here => https://www.youtube.com/watch?v=kWJcJ9UFzjk

Thanks - Chad
Software conference newbie needs some advice from the community
Tags: advice, newbie, webdev, devsummit
Published: 2019-11-05 17:10:33

---
title: Software conference newbie needs some advice from the community
published: true
description: I am heading to my first Software Conference this week
tags: advice, newbie, webdev, devsummit
cover_image: https://thepracticaldev.s3.amazonaws.com/i/kz0dialc6xrqmwoe01g2.jpg
---

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/6jqnqsvep76vxsdr3ahc.png)

Hello everyone, I am heading to **my first Software conference this week**.

 - AfroTech (November 7 - 10) - https://experience.afrotech.com/

 - Chrome Dev Summit (November 11-12) - https://developer.chrome.com/devsummit/

Well, I am actually going to two back to back conferences in San Francisco/Oakland. I know, I know, I’m crazy... but as they say, “Go big or go home”! I need some advice from the community so that I can maximize this experience.

## Questions:

1. What was the name of the conference(s) you attended?

2. What are some of the things you wish you knew before attending?

3. Is there something you learned or experienced at a conference that has had a positive influence on your life or career?

4. Is anyone here attending these (AfroTech or Chrome Dev Summit) conferences this year?

5. Any other random tips you can offer? 

Thanks in advance.

Cheers!
Using React with Electron - For Beginners!
Tags: react, electron, boilerplate
Published: 2019-11-05 17:05:30

I created this boilerplate after working on electron for one of my own apps. This is aimed at beginners and is a raw boilerplate built with create-react-app.

It contains some scripts i added to simplify usage for beginners. Do take a look!

[Repository - Click to view](https://github.com/burhanuday/electron-react-boilerplate)

This is an example electron/create-react-app application, and serves as an example of how to structure your project if you want to share pieces of your codebase between electron and react.

## Usage

- Clone the repository
- cd into the directory and run `npm install`
- Delete git files `rm -rf .git`

## Development

- Run `npm start` to start the react development server
- After that, run `npm run start-electron` in a different terminal to start the electron app

## Build and package

- Run `npm run package` to compile react, copy files and then package your app
- A new `dist` folder will be created in the root of your project containing the executable files
- NOTE: add `--mac` to the `postpackage` script besides `--win` if you are on a mac computer

## Project structure

- `electron/`: Code for the main Electron process
- `src/react/`: Code for the React renderer process
- `src/shared/`: Code shared between React and Electron
- `package.json`: Contains scripts for running the app in development, building it, and packaging it for production using electron-builder
Is learning Lisp still worth it ?
Tags: discuss
Published: 2019-11-05 17:00:46

---
title: Is learning Lisp still worth it ?
published: true
description: About learning Lisp
tags: discuss
---

Paul Graham is quite famous and he loves Lisp. He wrote that http://www.paulgraham.com/avg.html : programming languages vary in power and Lisp is at the top.
And a lot of people say learning Lisp will make you a better programmer.
Is that still true in 2019 ?

I want to learn something new, and am considering Lisp. Is that a good choice ?
Data Binding in Angular
Tags: databinding, class, property, attribute
Published: 2019-11-05 16:51:23

Data Binding is used bind the View (Html content) with Controller’s (Component’s) field. That is whenever we display dynamic data on a view (HTML) from Component, data binding is used.

Angular provides various types of data binding
1.Property 2.Attribute 3.Class 4.Style

1.Property Binding
Here we bind a property of a DOM element to a field which is a property we define in our component typescript code.
Example:
![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/rkwnytwf4uq3grayoat1.png)


2.Attribute Binding
Here we bind attribute of an element with the field of a component.
Example:
![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/taz6cs6nlix4pj5isukq.png)


3.Class Binding
Class binding is used when we want to add additional classes to an element based on some condition.
Example :
![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/37pvvgonyo5aq6x7eum4.png)

4.Style Binding
Here we bind a component field to our inline HTML styles.
Example :
![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/o2kk5o1m3n4ytmeu4qy2.png)
Show DEV: Introducing tslib-cli : maximum overkill for typescript and javascript library authors
Tags: showdev, npm, typescript, react
Published: 2019-11-05 16:28:14

Aloha Dev.to community 👋

I want to introduce [tslib-cli](https://tslib-cli.js.org/) to awesome dev.to community!! It's not exactly a brand new effort, but I wanted to have a stable tool before introducing it here.

Here is a TL;DR version of what [tslib-cli](https://tslib-cli.js.org/) attempts to provide: 

- **OcJS - Rollup + Jest + Typescript + TSLint + Prettier**
- **Best Practices setup for build, format, lint and publish workflows**
- **Save Hours setting up tooling to release a library to NPM.**

Considering best practices might differ for teams, [tslib-cli](https://tslib-cli.js.org/) also provide an **`eject`** command. Read more about [`eject` here](https://tslib-cli.js.org/).

By now, [tslib-cli](https://tslib-cli.js.org/) powers a lot of internal libraries at my `$work` and some of the OSS projects I've recently started.

## 🔗 Project Documentation

[https://tslib-cli.js.org/](https://tslib-cli.js.org/)

## 🔗 Github Repo

[https://github.com/osdevisnot/tslib-cli](https://github.com/osdevisnot/tslib-cli)

Feel free to 🌟 the github repo. **Give it a try next time you want to publish a package to NPM**

Also, feel free to follow me on [twitter](https://twitter.com/osdevisnot) for future updates.

**Don't forget to be Awesome !!**
Front-End Challenges Club - 001
Tags: codepen, html, a11y, beginners
Published: 2019-11-05 16:21:45

---
title: Front-End Challenges Club - 001
published: true
tags: codepen, Html5, accessibility, beginner
cover_image: https://thepracticaldev.s3.amazonaws.com/i/iycnampkvs6dy2yoz5i8.jpg
---



{% codepen https://codepen.io/giandomenico/pen/ZEExWNV %}
Text classification tools for fighting spam
Tags: meta, discuss
Published: 2019-11-05 16:06:53

---
title: Text classification tools for fighting spam 
published: True
description: Does anyone have recommended text classification tools (APIs, services, etc) for fighting spam here on DEV?
tags: meta, discussion, help
---
Does anyone have recommended text classification tools (APIs, services, etc) for fighting spam here on DEV? 

We have spam measurements in place but we’d like to mature our toolbelt with text classification. We’re not interested in working with services that rely on providing the poster’s IP address (such as Akismet), and ideally we’d want to use something open source.

Look forward to hearing everyone’s thoughts!