Tutorials

golang.pngGolang : How to get URL port?

31st March 2015

From the previous tutorial on how to break down a URL string, a reader emailed me wanting to….... read more



golang.pngGolang : How to generate QR codes?

31st March 2015

In this short tutorial, we will learn how to generate QR codes with the https://godoc.org/code.google.com/p/rsc/qr package. QR codes….... read more



golang.pngGolang : Generate QR codes for Google Authenticator App and fix "Cannot interpret QR code" error

31st March 2015

This is a supplement tutorial for the previous tutorial on how to generate QR codes with Golang and….... read more



golang.pngGolang : Convert []byte to image

31st March 2015

There are times when you need to convert []byte to image for saving into file purpose. I encountered one of….... read more



golang.pngGolang : Return multiple values from function

30th March 2015

One of the features that I like about Golang is the ability to return multiple values from a function (Python….... read more



golang.pngGolang : Check if IP address is version 4 or 6

26th March 2015

Problem :

Your Golang program needs to determine if a given IP address is version 4 or 6.

Solution….... read more



golang.pngGolang : Validate hostname

26th March 2015

Problem :

You need to validate if a given string is a valid hostname or not. Hostnames such as :

.... read more



golang.pngGolang : Validate IP address

26th March 2015

Problem :

You need to validate if a given IP address string is a valid IP address.

Solution :

Use….... read more



golang.pngGolang : Split strings into command line arguments

25th March 2015

Problem :

You have a string and you want to split the string into command line arguments in Golang.

Solution….... read more



golang.pngGolang : How to shuffle elements in array or slice?

25th March 2015

Problem :

You have an array or slice with elements in natural order and you want to shuffle the elements.

.... read more



golang.pngGolang : Null and nil value

25th March 2015

Programmers coming from different programming languages to Golang might wonder how does one deal with NULL values. I put down….... read more



golang.pngGolang : Get constant name from value

25th March 2015

Problem :

How to find out the constant name associated with a value? For example, if the a constant value….... read more



golang.pngGolang : Detect variable or constant type

25th March 2015

Problem :

You have a variable or constant and you want to know which type the variable belongs to.

Solution….... read more



golang.pngGolang : Strings comparison

25th March 2015

Given that mostly backend services deal with text data. There bound to be times when there is a need to….... read more



golang.pngGolang : Convert(cast) string to int64

25th March 2015

Problem :

You want to convert(cast) a string to big integer value(int64) for display.

Solution :

Use strconv.ParseInt() function to….... read more



golang.pngGolang : How to check if a string contains another sub-string?

25th March 2015

Problem :

How to check if a string contains another sub-string in Golang?

Solution :

Use the strings.Contains() function.

.... read more



codeigniter.jpgCodeIgniter : How to check if a session exist in PHP?

25th March 2015

Problem :

How to check if a CodeIgniter or PHP session exist or not?

Solution :

From the official PHP….... read more



codeigniter.jpgCodeIgniter : "Fatal error: Cannot use object of type stdClass as array" message

25th March 2015

There are times when the error message returned by the interpreter or compiler just don't make sense. Today I encountered….... read more



Advertisement