Tutorials
Golang : Covert map/slice/array to JSON or XML format
Problem :
You have a data struct in map, slice or array format and you have to convert the data….... read more
Golang : How to get HTTP request header information?
Alright, as a webmaster sometimes we want to know about our visitors and then alert us if there is any….... read more
Golang : Whois examples
Whois a network utility to find out "who is" the owner behind a domain name. Some owners will display all….... read more
Golang : Get local time and equivalent time in different time zone
Problem :
You want to show your website visitor the local time(on your server) and the equivalent time in another….... read more
Golang : Display float in 2 decimal points and rounding up or down
We will cover 2 items for this tutorial.
First, we will learn how to display a float number in….... read more
Golang : Math pow(the power of x^y) example
No programming language will be complete without the power of
math function. This tutorial is a simple example on how….... read more
Golang : Convert(cast) int to float example
Problem :
You have a variable of type int and you want to convert/type cast it to float64 type. Also,….... read more
Golang : error parsing regexp: invalid or unsupported Perl syntax
Compiling and running Golang program will throw out some odd error messages sometimes. Got one today with this error message….... read more
Golang : Use regular expression to validate domain name
There are times when a user enter an invalid domain name as input and it is good to validate the….... read more
JavaScript: Add marker function on Google Map
Problem :
You want to create add marker Javascript function to put markers on Google Map canvas. How to do….... read more
Golang : Find location by IP address and display with Google Map
This tutorial is a follow up for the previous tutorial on how to detect a user location with….... read more
Javascript : How to loop over and parse JSON data?
This note is a short tutorial on how to loop over and parse JSON data with JQuery's each()
function and….... read more
Golang : Convert int(year) to time.Time type
Problem :
You have integer value such as a year and you want to convert the integer to time.Time type.….... read more
Golang : How to determine if a year is leap year?
A leap year is a year with 366 days instead of 365 days. The algorithm to calculate if a year….... read more
Golang : GORM create record or insert new record into database example
Continuing from previous tutorial on how to read record from database with GORM. This time we learn how….... read more
Golang : Error reading timestamp with GORM or SQL driver
Problem :
It is common for application to read from database these days and sometimes a missing parameter in the….... read more
Golang : Update database with GORM example
A simple tutorial on how to use GORM(Golang Object Relational Map) to connect to a MySQL/MariaDB database and UPDATE data.
….... read moreGolang : GORM read from database example
Just a simple tutorial on how to use GORM(Golang Object Relational Map) to connect to a MySQL/MariaDB database….... read more