Today's Question:  What does your personal desk look like?        GIVE A SHOUT

 ALL


  A simple example on implementing progress bar in GoLang

Sometimes when handling a long running process, there would be need to track the progress so that people know something is still running instead of doubting something goes wrong. In this case, a progress bar which indicates the current status and progress would be desired.This post will show an example on how to implement progress bar using GoLang. Let's take a look at the final outcome first before jumping into the implementation detail.The key in the implementation is actually just the \r control flag for fmt.Printf(). \r is actually the carriage return control which tells the cursor to move...

21,198 5       TUTORIAL EXAMPLE GOLANG PROGRESS BAR


  A simple example of drawing bar chart with label using d3.js

D3.js is a very popular graph library to help developers draw various kind of charts using JavaScript in a webpage. It utilizes the SVG format supported by all major modern browsers and can help developers get rid of the old age of Flash or server side graph drawing libraries.In this post, we will introduce some simple examples of drawing bar chart with labels using D3.js. First, let's see what will be the final look of the graph drawn.Below is the complete source code for this example.let data = { "FACEBOOK": 30, "GITHUB" : 44, "GOOGLE" : 64, "TWITTER" : 17, "WEIBO" : ...

22,443 0       TUTORIAL LABEL BAR CHART D3 JAVASCIPT


  Simple tutorial on git cherry-pick

It is a common operation to move code from one branch to another branch in a multi-branch git repository. Normally there are two scenarios:Want to move all changes in one branch to another branch, now it's called git merge Want to move only some change/changes from one branch to another branch, now it's called git cherry-pickUsageThe purpose of git cherry-pick is to apply some change from one branch to another branch. git cherry-pick [commitHash]The above command is to apply the commit commitHash to the current working branch. It will create a new commit in the current working b...

8,249 0       TUTORIAL GIT CHERRY-PICK GIT


  A guide on installing and setting up GitLab server on Ubuntu

GitHub, GitLab and BitBucket are the three most famous code hosting platform in the world. They have different features which allow teams or individuals to share code with others remotely. In case you want to build your own code hosting server so that you can host and share the code by yourself, you can install and set up your own server. In this post, we will walk you through a guide on installing and setting up GitLab server on Linux environment.gitlab is a web based code hosting tool which is open sourced to everyone. Below we start the installation and setup process. The Linux system we ar...

4,936 0       GITLAB TUTORIAL UBUNTU


  Set up Superset on ubuntu 16.04 LTS

Apache Superset (incubating) is a modern, enterprise-ready business intelligence web application. Compared with business-focused BI tool like Tableau, superset is more technology-navy. It supports more types of visualization and able to work in distributed manner to boost the query performance. Most importantly, it is free of charge!An example dashboard:Let’s go and set it up.Create a virtualenvAssume Anaconda is installed for python management.# create a virtualenv with python 3.6conda create -n superset python=3.6Install in virtualenventer the virtual environment and follow the of...

6,973 1       SUPERSET UBUNTU TUTORIAL


  How to write your own DSL in Ruby

DSL(Domain Specific Language) is a language defined to fulfill some domain specific requirements to ease people's work. It can be used to define attributes and actions of a domain easily and cleanly. And it is often created based on some common observations or micro patterns of some domain.In Ruby world, there are quite a few places people can find DSL. For example, Ruby itself, Chef recipes.To create a class in Ruby, the traditional OOP way would look like.class User @name = nil @email = nil def name @name end def name=(val) @name = val end def email @email end def email=(va...

7,515 0       TUTORIAL RUBY DSL


  Sass Style Guide: A Sass Tutorial on How to Write Better CSS Code

Writing consistent and readable CSS that will scale well is a challenging process. Especially when the style sheets are getting larger, more complex, and harder to maintain. One of the tools available to developers to write better CSS are preprocessors. A preprocessor is a program that takes one type of data and converts it to another type of data, and in our case CSS preprocessors are preprocessing languages which are compiled to CSS. There are many CSS preprocessors that front-end developers are recommending and using, but in this article we will focus on Sass. Let’s see what...

2,961 0       TUTORIAL CSS SASS


  Different types of keystore in Java -- DKS

Domain KeyStore(DKS) is a keystore of keystore. It abstracts a collection of keystores that are presented as a single logical keystore. Itself is actually not a keystore. This new keystore type is introduced in Java 8. There is a new class DomainLoadStoreParameter which closely relates to DKS.To load different keystores into the single logical keystore, some configuration is needed. Here is the format of the configuration for grouping different keystores.domain [ ...] { keystore [ ...] ; ...};Below is one sample configuration for domain domain.domain app1 { keystore app1-...

12,835 0       JAVA TUTORIAL KEYSTORE DKS