Tutorials
Golang : How to get time from unix nano example
Just an add on to previous tutorial on how to get time in milliseconds. This is a short….... read more
Golang : How to get time in milliseconds?
Helping out a friend to calculate millisecond from a given date today. Apparently, there is no direct function in Golang's….... read more
Fix Google Analytics Redundant Hostnames problem
Google Analytics alerted me to a "redundant hostnames" problem today. From the message, appparently, Google Analytics is receiving data streaming….... read more
Swift : substringWithRange() function example
A quick tutorial as add on from previous tutorial on how to get sub-string with rangeOfString() function. Another….... read more
Swift : Get substring with rangeOfString() function example
Problem :
You have a string and you want to get(extract) the sub string from start to {0} and from….... read more
Golang : Get sub string example
Getting sub string is a common task in extracting details from a larger set of information. Here is a quick….... read more
Swift : Convert string array to array example
Problem :
You have a string array and you want to convert it to array. How to do that?
Solution….... read more
Golang : Output or print out JSON stream/encoded data
Problem :
You need to produce JSON stream or JSON encoded data to web browser or client. How to do….... read more
Golang : Populate or initialize struct with values example
A quick and short example on how to populate or initialize a struct with values. Pretty straight forward, but it….... read more
Golang : Count JSON objects and convert to slice/array
Problem :
You have an array of JSON objects and you want to count the number of JSON objects. You….... read more
JavaScript/JQuery : Detect or intercept enter key pressed example
Problem :
You created a text input box and want detect(or rather intercept) if the user pressed the enter button.….... read more
Golang : Get checkbox or extract multipart form data value example
This tutorial is a slight modification on the previous tutorial on the how to upload multiple files and….... read more
Golang : Load ASN1 encoded DSA public key PEM file example
In this tutorial, we will learn how to get the DSA public key from a ASN1 encoded PEM file generated….... read more
Golang : Load DSA public key from file example
Continue from previous tutorial on generating DSA private and public key. For this tutorial, we will learn how….... read more
Golang : Generate DSA private, public key and PEM files example
For this tutorial, we will build on the previous tutorial on how to save private and public key….... read more
Golang : Close channel after ticker stopped example
This is an example on how to close channel after the time.NewTicker()
function - ticker stopped. i.e close the channel….... read more
Golang : Change date format to yyyy-mm-dd
Problem :
Your Golang program is producing date in long form that look like this :
2015-08-11 17:21:52.776537624 +0800 MYT
Javascript : Empty an array example
Problem :
You have an array in JavaScript and you need to empty it. How to do that?
For instance….... read more