teleren/devto huggingface dataset:
Install PostgreSQL Server on Mac in 1 minute
Published: 2018-09-05 07:44:51

---
title: Install PostgreSQL Server on Mac in 1 minute
published: true
description: It might take an entire morning to upgrade your PostgreSQL version to 10 via homebrew, but you can download DBngin and get it run for like 1 minute.
tags: 
---

To install PostgreSQL on Mac, the two most common ways are Docker and Homebrew service. But Docker might be too big and eat up a large portion of memory, or sometimes you feel clumsy configuring the local server using the command line.

On the other hand, it's really hard to install and manage multiple versions of PostgreSQL on your computer.

In this post, we are going to use [DBngin](https://dbngin.com/), a free tool for database version management on Mac. 

DBngin is a user-friendly Mac app designed to help you deploy multiple database management systems including MySQL, PostgreSQL, Redis of various versions on your Mac within a click.

Moreover, DBngin will automatically create a new database cluster and a database which can be managed via a simple server controller.


* First, go to [DBngin](https://dbngin.com/), download and install the app on your Mac.

* Open DBngin and click on + New Server button.

* Choose PostgreSQL from the drivers' list, choose the PostgreSQL version and name your server to create a new server. You can edit the server and change the port later on.

![Create a new local PostgreSQL server](https://dbngin.com/resources/images/new-server@2x.png)

Now you already have a local PostgreSQL server running on your computer.

![Server Control](https://dbngin.com/resources/images/welcome@2x.png)

With DBngin, you can install and manage multiple servers of not only PostgreSQL but MySQL, Redis. You can turn on and off any database server by a click. Turn it on when you need and quit when you're done. No dependencies.
What do you think of the future of Java?
Tags: discuss
Published: 2018-09-05 04:40:32

---
title: What do you think of the future of Java?
published: true
description: 
tags: #discuss
---

I am Java developer. Most of application are built on top of application. I find this programming extremely awesome.

* One class for one file generally
* Awesome IDE. Eclipse, Intellij
* Awesome library and support. Apache, Red hat, google, Netflix and Dell/EMC are providing awesome libraries for java developer. Awesome Library would include Apache Commons, Spring, Hibernate, MyBatis, Apache Camel, Spring Boot ...
* Awesome Tools. Maven, Gradle, Ant, JConsole, Visualvm...
* Awesome Specification. JMS, JMX, JPA


Nowadays, there are a lot of programming language such as C#, C++, C, PHP, JavaScript(node), python, go, ruby... Many and many programming language are trying to replace java. 

**As a Java developer, what do you think of the future of java?**

For me, I am very biased. I like Java just because I get used to be. As a developer, I need to study other programming language and also framework, tools and other knowledge and all which can be helpful for development. It would be very helpful even for your development in Java.

# As a developer, Other Programming Language is required

As a developer, there is no doubt that you need to study other programming language. But Java would help you a lot when you are studying other Programming Language.
 
                           | JavaScript               | Java             | C#
---------------------------|--------------------------|------------------|-----------
Dependency Manager & Build | NPM/Yarn & Wepack        | Maven            | Nuget
MVC Framework              | ExpressJs                | Spring           | ASP MVC
Entity Framework           | SequelizeJs              | Hibernate/MyBatis| Entity Framework
IDE                        | Atom/Visaul Studio Code  | Eclipse/IntelliJ | Visual Studio
Server                     | NodeJs                   | Tomcat/JBoss/Websphere/Weblogic | IIS
Serverless                 | NodeJs                   | Spring Boot      | (I do not know)
 

Different Programming Language would have different purpose. For Front End Programming, There are no doubt that you must study **JavaScript**. For Game Development, I think C# is necessary if you want to use Unity3D.

Purpose     | Programming Language
------------|------------------------
Front End   | JavaScript
Game        | C# (Unity3D)
Android     | Java
iOS         | Objective C

Therefore, you are required to study other programming language if you would like to do programming on these areas. 


# Moat of Java

* Enormous Amount of Existing Java-based Systems
* Mature Ecosystem
* Enormous Amount of Developers
* Enormous Amount of Supporters
How to Generate Bar Code with PHP
Tags: php, webdev, programming, html
Published: 2018-09-05 03:58:42

---
title: How to Generate Bar Code with PHP
published: true
description: How to Generate Bar Code with PHP
tags: #php #webdev #programming #html
---

Post Link : <a href="https://www.skptricks.com/2017/09/how-to-generate-bar-code-with-php.html" > How to Generate Bar Code with PHP </a>

A barcode is an optical, machine-readable, representation of data; the data usually describes something about the object that carries the barcode. Originally barcodes systematically represented data by varying the widths and spacings of parallel lines.


Barcodes were initially scanned by special optical scanners called barcode readers. Later application software became available for devices that could read images, such as smartphones with cameras.

Now a days barcodes are used by various e-commerce application that simplify the product inventory management. E-commerce sites like flipkart, amazon, snapdeal etc are using these barcode features and this barcode is available in their Invoice Bill.

<img src="https://4.bp.blogspot.com/-Bv03PTpKplw/WbTDjZBQoZI/AAAAAAAAA5M/wrFoP8Q5t7oWt0SqCHI6aOz2eje0uMfxQCLcBGAs/s320/barcode.PNG" />

<a href="https://www.skptricks.com/2017/09/how-to-generate-bar-code-with-php.html" > View Source Code </a>
How to get started on functional programming?
Tags: learning, carreer, junior, functional
Published: 2018-09-05 03:34:47

---
title: How to get started on functional programming?
published: true
description: 
tags: learning, carreer, junior, functional
---

I do not know anything about FP, and have done OOP all my developers life. I thought it would be a good idea to explore other paradigms just to learn. Could you give me some resources to start learning Functional programming? Which language should i use to do so? I have a background in Js and C# .Net. 
Thanks!
List of Open-Source Software for Business, you and me 
Tags: opensource, business, software
Published: 2018-09-04 23:26:38

---
title: List of Open-Source Software for Business, you and me 
published: true
description: a little list with description of open-source software for business and your environment. 
tags: open-source, business, software
---

Hello, I always like to start a post with a "hello" to all.


Today I write a little list of open-source software for Business, for you and everyone.

For the Business 

_Server OS_: CentOS/RHEL 7 or Ubuntu; or pay for RedHat or Opensuse Enterprise and go to sleep?

_Email Server_:Postfix+Dovecot

_Webmail Server_:RoundCube or Squirrelmail (webmail for nuts! xD) 

_AntiSpam_: Spamassassin

_Web Server_: LAMP (or LEMP, or you know xD)

_Email client_: Thunderbid

_CardDav server_: Radicale
 
_Data safety backup_: Seafile

**edited**
_Office Suite_: LibreOffice, Open365 in your Server... or Google Docs (free but not opensource; thx _Antony Garand_ )
**end edit**
_For the social networks guys_: Gimp

And for big enterprises company's:Containers+Orchestration.

Unfortunately many of the users of my company need Microsoft Excel, macros and functions that are not compatible with the other programs, but step by step, will change

and if you do not agree with this, and you need sleep: AWS, Google, Microsoft and etc solutions :) .

For me:
Ubuntu and Linux Mint <3
Visual Code Studio
GIMP
LibreOffice
Seafile
Thunderbird
Filezilla
Telegram ?
Git
All the open-source framework's and libraries to make the unbelievable software.


comment your open-source software's, maybe you can help someone solve a problem.
We are a community.

PD: My english is bad :P
Gatsby.js V2 Dimension Starter
Tags: gatsby, react, javascript
Published: 2018-09-04 23:00:14

---
title: Gatsby.js V2 Dimension Starter
published: true
description: An update to the Gatsby.js Starter Dimension to V2
tags: gatsbyjs, react, javascript
---

<a href="https://next.gatsbyjs.org/" target="_blank">Gatsby.js V2</a> is in beta and has a `next` release that's available to use. I've updated my Gatsby.js starter, called Dimension, to use the latest Gatsby.js V2 code. Here is the source code for the new starter: https://github.com/codebushi/gatsby-starter-dimension

Here is a preview of the site: http://gatsby-dimension-v2.surge.sh/

If you are new to Gatsby.js and would like to learn more, check out my [get started](https://codebushi.com/gatsby-starters/#getStarted) guide.
Swift computed properties in a nutshell
Tags: swift, ios, beginners, learning
Published: 2018-09-04 22:48:56

---
title: Swift computed properties in a nutshell
published: true
description: Computed properties in a nutshell using swift
tags: swift, ios, beginners, learning
cover_image: https://thepracticaldev.s3.amazonaws.com/i/ns1y1ifdff3b9vbv3bk4.png
---

Hello everyone. Today I have a free hour, so I've decided to write a little post about some essential and exciting Swift features. And since today, I needed to use computed properties in my job; I want to share that knowledge with whoever is starting in the world of programming as well as in iOS and Swift. With nothing more to add, let's begin.

###What are computed properties?

Sometimes in our classes, some properties are not so simple as to be only quantities or values ​​represented in a variable (such as the value of a string, integer, etc.). Some times in execution time, we need some business logic behind some properties for its correct operation. Instead of encapsulating that logic in functions, we can also do it in the so-called computed properties. Every time we access this kind of property, its value is recalculated, this brings many advantages, and it's also straightforward to use in Swift! Let's see an example:

The use case that I was facing today was a computed property representing the total value of the selected pieces within a group of data. As the selected pieces can change on the fly, it's necessary to do the calculation again by iterating and adding the price of the chosen pieces to the total every single time the property is accessed. The way to do this in Swift is to open brackets right after declaring the property, and inside the getter, we should write the logic necessary for it to work:

{% gist https://gist.github.com/eleazar0425/acb9d9ea037676dd0a19357ed374a7d9 %}

Each time the "total" property is accessed, it iterates recalculating the value based on the selected pieces. As you can see, the advantages are several, starting with having a more concise code and always having the property value updated. You can also create "writable" computed properties using the keyword "set," do you want to try it out? 

This has been my mini post for today, and I hope you enjoyed it. If you have any questions, please leave a comment below. Goodbye!
今まで楽天で買い物した総額を算出する
Tags: javascript
Published: 2017-11-16 13:11:42

---
title: 今まで楽天で買い物した総額を算出する
published: true
description: 今まで楽天で買い物した総額を算出する
tags: JavaScript,ブックマークレット
---

Amazonのそれが再度熱を帯びているので、楽天市場の方も。

参考にしたサイト
http://blog.kantan-life.com/article/412662083.html

このサイトに記載しているコードでも充分に動くが、肝心の総額は計算されない。またChromeだと動作しない。
そこで、このサイトに掲載されているコードを改良し、ブックマークレット化した。
ブックマークレット化には「Closure Compiler」を用いている。
http://closure-compiler.appspot.com/home

－－－以下ブックマークレット
javascript:(function(){function c(a){a="number"!==typeof a?0:a;if(0===a&&($("<div/>").css({position:"fixed",left:0,top:0,width:"100%",height:"100%",zIndex:1E3,backgroundColor:"rgba(0,0,0,.7)",color:"#fff",fontSize:30,textAlign:"center",paddingTop:"15em"}).attr("id","___overlay").text("\u697d\u5929\u5e02\u5834\u3044\u304f\u3089\u4f7f\u3063\u305f\uff1f").appendTo("body"),e=2012,!/^[0-9]+$/.test(e)))return alert("\u6b63\u3057\u3044\u6570\u5024\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044"),$("#___overlay").remove(),
!1;var b=h(a+1);$("#___overlay").text("\u96c6\u8a08\u4e2d\u2026  / "+(a+1)+"\u30da\u30fc\u30b8\u76ee");b.done(function(k){f+=k;c(a+1)}).fail(function(){for(var a=alert,b=(new String(f)).replace(/,/g,"");b!=(b=b.replace(/^(-?\d+)(\d{3})/,"$1,$2")););a("\u3042\u306a\u305f\u306f\u5408\u8a08"+b+"\u5186\u5206\u306e\u8cb7\u3044\u7269\u3092\u697d\u5929\u5e02\u5834\u3067\u3057\u307e\u3057\u305f\uff01");$("#___overlay").remove()})}function h(a){var b=$.Deferred();l(a).done(function(a){a=$.parseHTML(a);var c=
0;$(a).find(".price").each(function(){var a=$(this).text().match(/[0-9]/g),b=0;null!=a&&(b=Number(a.join("")));c+=b});0===c?b.reject():b.resolve(c)});return b.promise()}function l(a){var b=$.Deferred();$.ajax({url:"https://order.my.rakuten.co.jp/?page=myorder&fidomy=1&display_month=0&search_item=&page_num="+a+"&search_sender=&search_shop=",success:function(a){b.resolve(a)}});return b.promise()}var f=0,e="2012";if("function"!==typeof $){var g=document,d=g.createElement("script");d.src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js";
d.onload=c;g.body.appendChild(d)}else c()})();﻿
－－－以上ブックマークレット

あとは楽天の購入履歴のサイトへ移動し、
https://order.my.rakuten.co.jp
上記ブックマークレットをURL欄にペースト、頭にjavascript:を追加して実行するだけで計算される。
ちなみに私は300万弱と計算された。怖い。


Amazonの方もそうだが、案外この手のものは既存のものを少し改良（クラス名を変更するだけなど）することにより、様々なものを計算することが出来る。
いろんなサイト向けのものを作ってみよう。
Docker on Windows or Ubuntu for development?
Tags: discuss, docker, containers
Published: 2018-09-04 22:19:19

---
title: Docker on Windows or Ubuntu for development?
published: true
description: I'm trying to choose my environment
tags: discuss, docker, containers
---

Hello!

I am trying to decide which operating system to adopt to work with Docker.

I currently use Windows 10, and I know it's weird, but I like the system.
The problem is that I have the "Home" version and it does not allow me to use "Hyper-V".

Now I'm thinking about acquiring Windows 10 Pro (cheap for ebay), but I wonder if it would be worth it or better to do a dual boot and install Ubuntu.

My question is whether Docker works equally well in Windows or has some limitations (such as the linux subsystem in Win10).

I would like to read your experiences.

**Update**
In case anyone is interested, end up buying Windows 10 Pro. I will update this to tell if it was a good choice or not.
Remote Jobs: How-to, and the Downsides
Tags: help
Published: 2018-09-04 22:16:27

---
title: Remote Jobs: How-to, and the Downsides
published: true
tags: help
---

I've always wanted to work a remote job. My current job is in Portland, Oregon, but I live somewhat far away (about a 1 hour commute). Remote work has always sounded like a good fit for me, I feel like I am good at managing my time, and can hold myself responsible for things.

But it seems like the type of thing that is "too good to be true". What are the downsides? I feel like if it really was as awesome as sitting at home and coding all day, everyone would be doing it!

Also, if I do end up looking for a remote job, what should I be looking for? What should I avoid? Any guidance on landing a remote job would be super helpful.
Go tutorial: 1. Command Line Arguments and File I/O
Tags: go, beginners
Published: 2018-09-04 22:13:07

---
title: Go tutorial: 1. Command Line Arguments and File I/O
published: true
description: This article was originally published on https://github.com/cohhei/go-to-the-handson
tags: #go #beginners
---

_This article was originally published on [GitHub](https://github.com/cohhei/go-to-the-handson)._

## Setup

```sh
$ go get golang.org/x/tools/cmd/goimports
...
$ mkdir go-handson
$ cd go-handson

```

## Hello World

```sh
$ touch hello.go
```

```go
// hello.go
package main

import (
	"fmt"
)

func main() {
	fmt.Println("Hello World!")
}
```

```sh
$ $GOPATH/bin/goimports -w .
# Format and add packages that should be imported

$ go run hello.go
Hello World!

$ go build -o hello .

$ ./hello
Hello World!
```

## `flag` package

### Usage of `flag.StringVar`

```sh
$ touch flag.go
```

```go
// flag.go
package main

import (
	"flag"
	"fmt"
)

func main() {
	var name string
	flag.StringVar(&name, "opt", "", "Usage")

	flag.Parse()

	fmt.Println(name)
}
```

```sh
$ go run hello.go -opt option
option
```

If you want to know more about the `flag` package, please go to the https://golang.org/pkg/flag/

### Exercise 1-1

Create a CLI application which outputs `Hello World!` if no options are specified. And if a string option is specified as `-name`, it has to output `Hello [YOUR_NAME]!`

```sh
$ go run hello.go
Hello World!

$ go run hello.go -name Gopher
Hello Gopher!
```

The answer is [hello.go](https://github.com/cohhei/go-to-the-handson/blob/master/01/main/hello.go)

## `os` package

### Usage of `os.Args`

```sh
$ touch args.go
```

```go
// args.go
package main

import (
	"fmt"
	"os"
)

func main() {
	fmt.Println(os.Args)
	fmt.Println(os.Args[1])
}
```

```sh
$ go build -o args args.go 
$ ./args Gopher
[./args Gopher]
Gopher
```

### File I/O

#### Reading files
```go
file, err := os.Open(`/path/to/file`)
if err != nil {
	panic(err)
}
defer file.Close()

buf := make([]byte, BUFSIZE)
for {
	n, err := file.Read(buf)
	if n == 0 {
		break
	}
	if err != nil {
		panic(err)
	}

	fmt.Print(string(buf[:n]))
}
```

#### Writing files

```go
f, err := os.Create("/path/to/file")
if err != nil {
	panic(err)
}
defer f.Close()

b := []byte("Foo")
n, err := f.Write(b)
if err != nil {
	panic(err)
}
fmt.Println(n)
```

### Exercise 1-2

Create an application `file.go` which creates a file and write a string `Hello Writing to Files!` to it. And the file name has to be specified as a command line argument.

```sh
$ go run file.go file.txt
The number of bytes written:  23

$ cat file.txt
Hello Writing to Files!
```

The answer is [file.go](https://github.com/cohhei/go-to-the-handson/blob/master/01/main/file.go)

[NEXT](https://dev.to/cohhei/go-tutorial-2-create-an-http-request-and-server-1h82)
Suggest a WYSIWYG Editor for me
Tags: discuss
Published: 2018-09-04 21:55:06

---
title: Suggest a WYSIWYG Editor for me
published: true
description: 
tags: discuss
---
![WYSIWYG](https://thepracticaldev.s3.amazonaws.com/i/0s1gaq1yo4wm2vaa62ff.png)
RavenDB embedded with ASP NET Core web API
Tags: aspnet, net, aspnetcore, ravendb
Published: 2018-09-05 08:50:34

---
title: RavenDB embedded with ASP NET Core web API
published: true
tags: ASP.NET,.NET,ASP.NET Core,RavenDB
canonical_url: https://blogit.create.pt/ricardocosta/2018/09/04/ravendb-embedded-asp-net-core-web-api/
cover_image: https://i1.wp.com/blogit.create.pt/wp-content/uploads/2018/09/ravendb_logo.jpg?resize=1000,420
---

This post describes how you can set up a simple ASP NET Core web API with Visual Studio 2017 to use an embedded RavenDB. This is a step by step tutorial.

a) You need to create a new ASP.NET Core Web Application with Visual Studio 2017  
b) Choose .NET Core; ASP.NET Core 2.1; API  
c) Right click the new project -> Manage NuGet packages  
d) You have to add a new package source. Settings. New package source.

Name: [MyGet](https://www.myget.org/F/ravendb/api/v3/index.json)  
Source: https://www.myget.org/F/ravendb/api/v3/index.json

e) Choose the new source. Add:

RavenDB.Embedded – 4.1.1-nightly-20180904-0430  
RavenDB.Client – 4.1.1-nightly-20180904-0430

f) Create a DocumentStoreHolder class

```csharp
internal class DocumentStoreHolder
{ 
    private static Lazy<IDocumentStore> store = new Lazy<IDocumentStore>(CreateStore); 

    public static IDocumentStore Store => store.Value; 
    
    private static IDocumentStore CreateStore() 
    { 
        var serverOptions = new ServerOptions() 
        { 
            ServerUrl = "http://127.0.0.1:60956/", 
        }; 

        EmbeddedServer.Instance.StartServer(serverOptions); 
        
        return EmbeddedServer.Instance.GetDocumentStore("MyRavenDBStore"); 
    }
}
```

g) And that’s it ![🙂](https://s.w.org/images/core/emoji/11/72x72/1f642.png)

The post [RavenDB embedded with ASP NET Core web API](https://blogit.create.pt/ricardocosta/2018/09/04/ravendb-embedded-asp-net-core-web-api/) appeared first on [Blog IT](https://blogit.create.pt).
Live digit recognition with Tensorflow.js and React
Tags: showdev, javascript, react, deeplearning
Published: 2018-09-04 21:23:49

---
title: Live digit recognition with Tensorflow.js and React
published: true
description: Digit recognition with Tensorflow and React.js using Mnist dataset
tags: showdev, javascript, React, deeplearning
---

{% github ixartz/handwritten-digit-recognition-tensorflowjs %}
Explain Factory Pattern Like I'm Five
Tags: explainlikeimfive, factorypattern
Published: 2018-09-04 20:52:21

---
title: Explain Factory Pattern Like I'm Five
published: true
description: 
tags: #explainlikeimfive #factorypattern
---

Hi!

I don't understand Factory Pattern. I don't understand the difference of creating an object for my self, like:

```
var c = new Class();
```

than creating with Factory Pattern.


Thanks!
Should I learn Go?
Tags: discuss, go, career
Published: 2018-09-04 20:31:34

---
title: Should I learn Go?
published: true
description: 
tags: discuss, go, career
---

I have been a developer for around 10 years.
In the last few years I've been using especially Javascript and Scala for web development and data processing, I love functional programming.
There is a huge hype now around Go and the popularity is growing.
I am thinking giving it a "go" :P


Let me know what you think, pros/cons, anything...
Our Engineering Experience with React and Storybook
Tags: react, storybook, javascript, designsystems
Published: 2018-09-04 19:14:30

---
title: Our Engineering Experience with React and Storybook
published: true
description: Create modular and reusable components that can be shared across projects by building a component library with React and Storybook.
tags: #reactjs #storybook #javascript #designsystems
canonical_url: https://auth0.com/blog/our-engineering-experience-with-react-and-storybook/
---

In this blog post, we are going to explore how the Auth0's Account Center Team is using React and Storybook to optimize UI development and promote consistent branding by creating a component library that can be shared across different projects.

[Read on ⚛️📕](https://auth0.com/blog/our-engineering-experience-with-react-and-storybook/?utm_source=dev&utm_medium=sc&utm_campaign=aueng_react_storybook)

![Our Engineering Experience with React and Storybook](https://thepracticaldev.s3.amazonaws.com/i/s3mbimsv4cee7x8vysd2.png)
What's wrong with this code?
Tags: fun, javascript, nonsense
Published: 2018-09-04 16:39:32

---
title: What's wrong with this code?
published: true
description: Find the "logical" error in this code
tags: fun, javascript, nonsense
cover_image: https://thepracticaldev.s3.amazonaws.com/i/mf5x6sudtme57f6b2tji.jpg
---

_Photo by [Caroline Attwood](https://unsplash.com/photos/XktEKmetbzc?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText) on [Unsplash](https://unsplash.com/search/photos/groceries-turkey-egg?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText)._

### What's wrong with this code?

Can you find the *logical* error?
(_⚠️ As the tag shows, it's a non-sensical/fun question_)


```javascript

const { flour, eggs, turkey } = groceries

```


### Answer

.
.
.
.
.
.
.
.

You can't cook ingredients (_as they are constant thus can't cook them_) and have to eat'em raw 😛. 


### Background Story.

I was chatting with other developers and wanted to make sure if he understood JavaScript [Object Destructuring](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment#Object_destructuring) concept correctly.


```javascript
let { flour, eggs, turkey } = groceries
```

Someone suggested `const` instead of `let` promoting a better coding style.  
And the first thing popped in my mind was that you can't eat a raw 🦃.



### 👋 Parting Words

Hope it funny enough 😎.