teleren/devto huggingface dataset:
Can anyone guide me with Unreal VR development using VR box 2.0? or does anyone know any specific study video tutorial?
Tags: vr, unreal, explainlikeimfive, beginners
Published: 2018-03-21 08:10:40

---
title: Can anyone guide me with Unreal VR development using VR box 2.0? or does anyone know any specific study video tutorial?
published: true
description: 
tags: vr, unreal, explainlikeimfive, beginners
---
Continue goto in Golang
Tags: go
Published: 2018-03-21 07:14:37

---
title: Continue goto in Golang
published: true
description: 
tags: Golang
---

Sometimes We need to go out from loops or don't want to execute unnecessary part in the loop.
At that time, we use `continue` or `break`.

- `break` makes out from the inner the loop.
- `continue` makes not to execute after this line

But in nest loop, that'll be complicated like this

```go
list := []int{1,2,3,4,5,6,7,8,9,4,5,3,2,1}

anothers := []int{5,4,3,}
for _, item := range list {
	found := false
	for _, another := range anothers {
		if another == item {
			found = true
			break
		}
			
	}
	if found {
		continue;
	}
	fmt.Println("bingo", item)
}
```

https://play.golang.org/p/7Q0UMjVHcF-

Ya, of course it's a little bit ugly.

So you can try to change cleaner with `goto`

```go
list := []int{1,2,3,4,5,6,7,8,9,4,5,3,2,1}

anothers := []int{5,4,3,}
LabelLabel:
for _, item := range list {
	for _, another := range anothers {
		if another == item {
			continue LoopLabel
		}
	}
	fmt.Println("bingo", item)
}

```
https://play.golang.org/p/AB6ASJaL7TR

`continue Loop` goes out to LoopLabel loop, it's the outer loop, not the inner loop.


Then it's cleaner than previous one. So you can use `goto` in nested loops as `continue` .
How to center things with CSS
Tags: webdev, css, explainlikeimfive, tutorial
Published: 2018-04-05 21:15:32

---
title: How to center things with CSS
published: true
tags: #webdev, #css, #explainlikeimfive, #tutorial
canonical_url: https://flaviocopes.com/css-centering/
---

Centering things in CSS is a task that is very different if you need to center horizontally or vertically.

In this post I explain the most common scenarios and how to solve them. If a new solution is provided by [Flexbox](https://flaviocopes.com/flexbox/) I ignore the old techniques because we need to move forward, and Flexbox is supported by browsers since years, IE10 included.

## Center horizontally

### Text

Text is very simple to center horizontally using the `text-align` property set to `center`:

```css
p {
  text-align: center;
}
```

### Blocks

The modern way to center anything that is not text is to use Flexbox:

```css
#mysection {
  display: flex;
  justify-content: center;
}
```

any element inside `#mysection` will be horizontally centered.

![Center horizontally](https://flaviocopes.com/css-centering/flexbox-horizontal-center.png)

* * *

Here is the alternative approach if you don’t want to use Flexbox.

Anything that is not text can be centered by applying an automatic margin to left and right, and setting the width of the element:

```css
section {
  margin-left: 0 auto;
  width: 50%;
}
```

the above `margin-left: 0 auto;` is a shorthand for:

```css
section {
  margin-top: 0;
  margin-bottom: 0;
  margin-left: auto;
  margin-right: auto;
}
```

Remember to set the item to `display: block` if it’s an inline element.

## Center vertically

Traditionally this has always been a difficult task. Flexbox now provides us a great way to do this in the simplest possible way:

```css
#mysection {
  display: flex;
  align-items: center;
}
```

any element inside `#mysection` will be vertically centered.

![Center vertically](https://flaviocopes.com/css-centering/flexbox-vertical-center.png)

## Center both vertically and horizontally

Techniques to center vertically and horizontally can be combined to completely center an element in the page.

```css
#mysection {
  display: flex;
  align-items: center;
  justify-content: center;
}
```

![Center both vertically and horizontally](https://flaviocopes.com/css-centering/flexbox-center.png)
This is my dream language. Is it real?
Tags: help
Published: 2018-03-21 02:32:56

---
title: This is my dream language. Is it real?
published: true
description: I've been looking for so long and come up with nothing.
tags: help
---

For a while, I've had a vision for my "dream" language. ((Sorry @mortoray, I don't think it's Leaf, still love your content))

The syntax I've come up with is inspired by JavaScript but with some added flair that would make it (best case scenario) compatible with ASM and WASM compilation.
I've left some sample code below, and I was wondering if anyone knew if a language similar to the snippet below exists.

```js
import { sqrt, pow } from "math"

export class Point {
    struct {
        Int x,
        Int y
    }
    constructor(Int a, Int b) {
        this.x = a;
        this.y = b;
    }
    constructor(Int a) {
        this(a, a);
    }
    constructor() {
        this(0, 0);
    }
    distanceTo(Point pt) -> Float {
        return sqrt(pow(pt.x - this.x, 2) + pow(pt.y - this.y, 2));
    }
}

export class Circle {
    struct {
        Point center,
        Int radius
    }
    constructor(Point c, Int r) {
        this.center = c;
        this.radius = r;
    }
    constructor(Int r) {
        this(new Point(0, 0), r);
    }
    constructor() {
        this(1);
    }
    intersects(Point pt) -> Boolean {
        return pt.distanceTo(this.center) <= this.radius;
    }
}
```

Thanks in advance for any help!

----
In hindsight this looks a lot like a real Java-Script like syntax but I was still curious if anyone knew if this existed before I went out and tried to start making a compiler for a project that's already been worked on :)
悪質な通販スパムの台頭について、DuckDuckGoのすすめ
Tags: duckduckgo, web
Published: 2018-08-01 01:21:33

---
title: 悪質な通販スパムの台頭について、DuckDuckGoのすすめ
published: true
tags: duckduckgo,web
canonical_url: https://takimura.hateblo.jp/entry/2018/03/21/091038
---

[Google](http://d.hatena.ne.jp/keyword/Google)検索で調べ物をしていると、海外[ドメイン](http://d.hatena.ne.jp/keyword/%A5%C9%A5%E1%A5%A4%A5%F3)と思われるが日本語でテキストが書かれている通販サイトのようなものが出てくるようになりました。キュレーションサイトは以前から問題になっていますが、こちらはまだあまり大きく問題にはされていないようです。  
  
[SNS](http://d.hatena.ne.jp/keyword/SNS)上等ではすでに問題があるとして迷惑しているというつぶやきが目立っていますが、[Google](http://d.hatena.ne.jp/keyword/Google)からは何の対応をするという情報もありません。もしかするともう[Google](http://d.hatena.ne.jp/keyword/Google)検索全体が、使えない[検索エンジン](http://d.hatena.ne.jp/keyword/%B8%A1%BA%F7%A5%A8%A5%F3%A5%B8%A5%F3)になりつつあるのかもしれません。  
  
私としても[Google](http://d.hatena.ne.jp/keyword/Google) Personal Blocklistに設定しているリストを公開して、迷惑な結果に出てこないようにしています。

[https://coron.tech/db/google-personal-blocklist/](https://coron.tech/db/google-personal-blocklist/)

しかしながら、[Yahoo!](http://d.hatena.ne.jp/keyword/Yahoo%21)でも[Google](http://d.hatena.ne.jp/keyword/Google)検索を利用していますし、bingはインデックスの速度が遅いというのが難点です...

[Read more](https://takimura.hateblo.jp/entry/2018/03/21/091038)
what language should I write my programming blog post in?
Tags: blog, technicalwriting, language, discuss
Published: 2018-03-20 19:40:04

---
title: what language should I write my programming blog post in?
published: true
description: Question I'm asking myself about programming blog post 
tags: blog, technical-writing, language, Discuss
---

My question is weird, but here is it:

My background 

I'm a native French speaker and a software engineer, I studied in a french speaking country and grew up there speaking French. 

**My Question is which language should I use for my technical blog posts?**

**_On one hand_**:

French could be easier for me to write in It can allow me to make a difference by transferring knowledge from English to the French speaker.
Cons: much less audience and I always think that the beauty of computer science or technology can only be viewed in English.


**_On Other Hands English_**:

it's a bit harder for me to write a blog in (I have written 2 blogs in 6 months) and I'm afraid that not mastering the language could hold me back many times.
But with English, I could target much larger audience and improve my writing skills.
What do you think?
Ideas are welcome...
Welcome Thread - v10
Tags: welcome
Published: 2018-03-20 18:15:36

---
title: Welcome Thread - v10
published: true
description: Introduce yourself to the community!
tags: welcome
---
Hey there! Welcome to dev.to!

![A penguin waves and says, "Hello!"](https://media.giphy.com/media/Cmr1OMJ2FN0B2/giphy.gif)

# Welcome!
1. Leave a comment below to introduce yourself! You can talk about what brought you here, what you're learning, or just a fun fact about yourself.

2. Reply to someone's comment, either with a question or just a hello. 👋

Go, go, go! 🐧
Passion
Tags: cars, passion
Published: 2018-03-20 18:01:41

---
title: Passion
published: true
description: Is passion something you pursue or it is something else 
tags: cars, passion
cover_image: https://thepracticaldev.s3.amazonaws.com/i/6kq0ax6kt196t52k9z7n.jpg
---

Often I walk the streets thinking what am I really passionate about. Today, I bumped into this 1970’s model Toyota Publica parked somewhere in a street near Banani Bazar (that's in Dhaka City of Bangladesh) and realized passion cannot only be for a single thing. We are all passionate about many things and sometimes “Pursue your passion” can be a real misdirection. There are some passions which are to be discovered and not pursued.

More old publica pics - 
<img src="https://thepracticaldev.s3.amazonaws.com/i/600k6ujjzxa9yivbasxx.jpg"/>
<img src="https://thepracticaldev.s3.amazonaws.com/i/zqexjz8b08w1wnzb9dq0.jpg"/>
<img src="https://thepracticaldev.s3.amazonaws.com/i/6kq0ax6kt196t52k9z7n.jpg"/>
Membina Function Berantai Dalam Javascript
Tags: javascript
Published: 2018-03-20 07:35:10

---
title: Membina Function Berantai Dalam Javascript
published: true
description: let a = Aku.buat().ini().dapat().itu();
tags: javascript
---

Setelah bertahun-tahun mengadap javascript sebagai seorang web-developer, baru-baru ni terfikir hendak tahu bagaimana hendak membuat Chaining Function. Selalu menggunakan tetapi tidak pernah sendiri buat.

Untuk sesetengah orang, Fungsi Berantai ini pernah diguna cuma tidak dikenali apakah namanya. Jadi paling mudah tengok sahaja code dibawah yang diambil dari dokumentasi MomentJS:

     let a = moment().add(7, 'days')
                     .subtract(1, 'months')
                     .year(2009)
                     .hours(0)
                     .minutes(0)
                     .seconds(0);

 Setiap fungsi atau method class Moment() itu dipanggil berterusan. Selepas add(), dipanggil substract(), kemudian year(), selepas itu minutes() dan akhir sekali hasil seconds() diumpukkan ke pembolehubah a. Ianya tidak dipanggil berasingan seperti:

     let a = moment().add(7, 'days');
         a = a.subtract(1, 'months');
         a = a.year(2009);
         a = a.hours(0)
         a = a.minutes(0)
         a = a.seconds(0);

Hasil kedua-dua contoh code di atas sama tetapi tentunya lebih mudah untuk membaca yang menggunakan Chain Method.

Bagaimana kita hendak membuat Chain Method ini? Tidak susah sebenarnya. Cuma function itu perlu return sesuatu yang ada function yang akan dipanggil seterusnya. Lihat contoh dibawah: 

 

     class Header {
         constructor(  ) {
           this.tajuk = "Tajuk baru";
           this.lebar = "100%";
           this.warna = "#000";
         }

         tukarWarna(warna) {
            this.warna = warna;
            return this;
         }

         tukarLebar(lebar) {
            this.lebar = lebar;
            return this;
         }

         tukarTajuk(tajuk) {
            this.tajuk = tajuk;
            return this;
         }

         paparkan() {
            return `<div style="width:${ this.lebar }; 
                                background-color: ${ this.warna };"
                    >${ this.tajuk }</div>`;
         }
     }

        let myHeader = new Header()
                    .tukarTajuk("Ini First")
                    .tukarWarna("#fff")
                    .tukarLebar("80%");

        console.log(myHeader.paparkan());
 

Method-method dalam Header() ini akan memulangkan instance object itu sendiri. Jadi apabila tukarTajuk() dipanggil ia memulangkan instance object Header dan memanggil pula tukarWarna(). tukarWarna() pula akan memulangkan instance object yang dikemaskini dan memanggil pula method tukarLebar() pada instance itu. Akhirnya instance Header itu akan diumpukkan kepada pembolehubah myHeader.

Mudah saja kan. :D
Build Robust Apps with Mithril and Auth0
Tags: javascript, mithril, webdev, frontend
Published: 2018-03-20 17:29:50

---
title: Build Robust Apps with Mithril and Auth0
published: true
description: Mithril is a small, fast JavaScript framework for building Single Page Applications, and can be learned in just 10 minutes.
tags: #javascript #mithril #webdev #frontend
canonical_url: https://auth0.com/blog/build-robust-apps-with-mithril-and-auth0/
---
Mithril is a small, fast JavaScript framework for building Single Page Applications, and can be learned in just 10 minutes.

In this tutorial, we are going to use Mithril to build a fairly complex web interface to store data about conferences and authenticate it with Auth0. 

[Read on 💻](https://auth0.com/blog/build-robust-apps-with-mithril-and-auth0/?utm_source=dev&utm_medium=sc&utm_campaign=mithriljs)

![Build Robust Apps with Mithril and Auth0](https://thepracticaldev.s3.amazonaws.com/i/7w9ktvtytr0teydikccu.png)
How do you go about conducting a/b tests?
Tags: discuss
Published: 2018-03-20 16:17:52

---
title: How do you go about conducting a/b tests?
published: true
description: 
tags: discuss
---

What processes/tools/approaches do you or your team take in coordinating a/b tests in collaboration with biz efforts? How do you avoid breaking the interface or causing performance degridation?

P.S. Any horror stories of this process gone wrong?
Career first experience and struggle as a software engineer
Tags: career, engineering
Published: 2018-03-20 15:10:37

---
title: Career first experience and struggle as a software engineer
published: true
description: can't find the right position
tags: career, engineering
cover_image: https://thepracticaldev.s3.amazonaws.com/i/sh8jcmoaolef9pa4n2rg.jpg
---

I just started a new job in a small startup after spending 18 months at a big public company (my first experience ever). I was working with a nice team but there was no senior devs and no interesting projects and sometimes no projects at all so I was just maintaining an ePayment website that I made with another junior dev. I was really frustrated there because I couldn’t see any possibility to improve myself as a developer and become a senior one day by working with a real dev team. So I moved to this new startup (with a bigger salary), I found that the web app was already made, some devs were maintaining the backend and some were migrating the frontend to react, I still don’t know what I will be working on but it seems to me that the big work is done, so we will be doing only maintenance and some small additions. 

I’m frustrated because I can’t find the right company and team where I will be learning and improving myself, I’m stuck at the part where I can only work on small apps by myself, but I definitely can’t work on bigger apps in the right way. I feel like my goal to become a software architect is threatened.

I have an engineering degree in information systems, so what I like is building systems from the ground up starting from the analysis, the design and then development, I don't want to be just a java expert or a react guru.

So what would you advice me to get the most out my experiences to achieve my goal? Am I worrying too much?
What audiobook did you last listen to?
Tags: discuss
Published: 2018-03-20 12:14:58

---
title: What audiobook did you last listen to?
published: true
tags: discuss
---

I listened to [The Dispatcher](https://www.audible.com/pd/Sci-Fi-Fantasy/The-Dispatcher-Audiobook/B01KKPH1VA) by John Scalzi and it was awesome. My thoughts are [here](http://blog.katpadi.ph/listened-dispatcher-awesome/).

What did you last listen to?
How do you use your Tech skills to help people?
Tags: tech, helping, nonprofit, discuss
Published: 2018-03-20 02:32:21

---
title: How do you use your Tech skills to help people?
published: true
description: 
tags: tech, helping, non-profit, discuss
---

I've been interested in programming since Grade 8. I used to "give back" by helping out strangers online. I had an online forum where I helped people from south asia make websites. 

Lately, I've been feeling like a clog in the machine, just writing code that barely has any real impact on anyone (I work for a bank).

What are some of the ways you use your knowledge/skills to help people? I've volunteered as mentor for new immigrants, junior devs, and helped fix computer at community centres, but it looks like that's all I can offer with tech skills.
Apple Screenshots Made Easy
Tags: screenshots, automation, lifehacks, protips
Published: 2018-03-19 23:15:22

---
title: Apple Screenshots Made Easy
published: true
description: conveniently organize and automate screenshots. It will make it easier to report issues and send images to your team!
tags: screenshots, automation, lifehacks, protips
---

I try not to store a lot of things on my desktop, and it’s not a convenient place for me to store any screenshots that I might take in order to quickly email when I have all kinds of other windows up. I wanted a way to be able to just click and drag my most recent screenshot into whatever I might be working with. For this purpose, I looked into how to change the default screenshot location and found out it was very easy thanks to OSX Daily. For my purposes, I’m using the location of a folder named Screenshots on my desktop, but you could put anything in the file path specified. The very cool part is that this screenshots folder is sitting on my dock and is sorted by date added. What this means is I can just CMD-SHIFT-4 and badda-bing, badda-boom have a screenshot ready to work with. Want to do the same? Just open up terminal and type the following: 

`defaults write com.apple.screencapture location ~/Desktop/Screenshots/`
`killall SystemUIServer`

and if you wanted to switch back to the regular path, you could type the following
`defaults write com.apple.screencapture location ~/Desktop/
`killall SystemUIServer`

Bonus protip: add that folder to your dock and sort it by date added. Your most recent screenshots will be a click away
Sketch Template for Prototyping Semantic UI
Tags: semanticui, webdesign, showdev, sketch
Published: 2018-03-19 22:42:53

---
title: Sketch Template for Prototyping Semantic UI
published: true
description: The goal of this styleguide is to document all the Semantic UI components as a Sketch symbol library to make the prototyping of SUI projects easier.
tags: semantic ui, web design, showdev, sketch
cover_image: https://thepracticaldev.s3.amazonaws.com/i/ubchff5lthflk5witqkm.png
---

The goal of this styleguide is to document all the [**Semantic UI**](http://semantic-ui.com) components as a **Sketch symbol library** to make the prototyping of SUI projects easier. The mission is to strive to follow the same standards Semantic UI sets forth with it's semantic and atomic basis for it's design system. 

Inside you'll find a **components** that are **made up of several different symbols**. The different symbols allow for the same flexibility you receive from the semantic orientated structure of the CSS framework. Need a different background color? Maybe your button needs to change state? Simply click your component and customize it in Sketch's righthand panel.

This file is also capable of **generating a complete style guide** for you, based on the way you customize your symbols. All your colors, text style, buttons, inputs, etc can be exported as PDFs, SVGs, or more from the Styleguide pages.

## Instructions

### Using the Sketch File

1. Make a new page
2. Click Insert on the top bar, 
3. Then hover over Symbols
4. Find whichever component you need.

It's recommended you play with combining symbols to create components. Some symbols, like Cards or even Buttons, are comprised of many symbols that make up the final product. For example, the conditional button is simply a left only and right only button, with the conditional shape and text in the middle. Components like labeled buttons are achieved in this same way, with one labeled button and another regular one stacked underneath.

### Customizing the Styleguide

1. Open file
2. Go to Symbols page
3. Follow instructions there to customize

Since Semantic does some interesting things Sketch doesn't like, we have a few containers/borders that are specialized for Semantic. You can find special instruction for those on bottom of the last step.

You'll also find that Sketch doesn't allow you to change things such as text color or justification from the side panel. This is why I've created (in some cases), extra buttons that have font color and weight variations.

## Contributing

Feel free to fork this and add your own components. I'll try my best to merge them all into this master file. 

You can check the *CHANGELOG* to get an idea of what's been worked on. Whatever hasn't been converted to a symbol yet on the "Old Semantic Converted" page is a priority.


## Download

[**Download the Sketch file** here on Github](http://stayregular.net/resources/semantic-ui-sketch-styleguide)


Hope that helps!
Stay regular,
Oscar
Make a P2P connection in 10 minutes
Tags: javascript, web, node, descentralized
Published: 2018-03-19 22:19:54

---
title: Make a P2P connection in 10 minutes
published: true
description: This is a short guide on how to make a P2P connection with ease
tags: #javascript, #web, #nodejs, #descentralized
---

![Distributed Network](https://thepracticaldev.s3.amazonaws.com/i/9galmhzvf6ysjit4mfzt.png)

This is a short guide on how to make a P2P chat. My aim is to give you only a taste if you like I could write a deeper article explaining how all these things work. That said, let's start.

#Preparation

The only thing you will need is the latest NodeJS and your favorite editor, mine is Visual Studio Code. Now create a folder for our project, open a command line, initialize an npm repo with npm init and install some libraries we will need with:

```bash
npm i --save discovery-swarm dat-swarm-defaults portfinder get-port
```

# Our first P2P connection

Let's start by doing a simple P2P connection, thanks to some great libraries from the Node.js community it is too simple:

{% gist https://gist.github.com/carloslfu/ec389a3d55e07edbf48e23fbd8d65689 %}

Run this code in two consoles and this is it!. Now you can run it in other device right in your LAN and should work even without internet, also you can share and run this script in any other computer or device with internet around the world and it just works, so nice!

# How it works?

This code uses the technology behind the [Dat Project](https://datproject.org/). All communications are decentralized and work over a P2P network.

...

I love feedback. Ask me questions, comment on your experience with P2P technologies and share your ideas! Thanks for reading :)

This series is possible thanks to the awesome tools delivered by the DatProject, Webtorrent and the NodeJS community.

Follow me on here and on Twitter if you want to know more about tech and distributed P2P networks: https://twitter.com/carloslfu