Tutorials
PHP : Send HTML email
Sending email with PHP is easy and in this tutorial, we will learn how to send HTML based email with….... read more
Golang : Parsing or breaking down URL
Golang provides an easy way to consume and parse URL. It has a very neat package ( http://golang.org/pkg/net/url….... read more
Golang : Get URI segments by number and assign as variable example
Coming from PHP and CodeIgniter(framework for PHP) background. One thing that I missed is the URI helper's $this->uri->segment(n)
where it….... read more
Golang : On enumeration
In Golang, it is fairly simple to declare enumeration. Just group the similar items into a const
group and use….... read more
Golang : Error handling methods
Couple of days ago I attended a Golang meetup for the first time nearby where I live. There are developers….... read more
Javascript : How to get JSON data from another website with JQuery or Ajax ?
A very common task for developing front-end. I used to write this a lot but some how forgotten about it….... read more
Golang : What is the default port number for connecting to MySQL/MariaDB database ?
Problem :
How to determine which port number when trying to connect to a database with https://github.com/go-sql-driver/mysql and….... read more
Golang : Connect to database (MySQL/MariaDB) server
Database is the main workhorse powering most dynamic content websites today and yet most of the time a database is….... read more
Golang : How to check if a connection to database is still alive ?
Problem :
How to check if a connection to database is still alive ?
Solution :
Swift : Convert (cast) String to Float
Problem :
You have a string value and you need to convert the string into type float.
Solution :
Use….... read more
Unix/Linux : How to archive and compress entire directory ?
While writing tutorial on how to untar a gzipped tar ball archive with Golang today, I was lost….... read more
Golang : Upload file from web browser to server
Recently, I came across a question on Go programming language Facebook group on how to upload file with .... read more
Golang : Concurrency and goroutine example
Golang has concurrency build into the core design and this is one of the main features that attracted many veteran….... read more
Golang : Check if os.Stdin input data is piped or from terminal
There are times we need to write a program that need to behave in one way according to input from….... read more
Golang : Read file and convert content to string
Problem :
You want to read a file content and convert the content into string.
Solution :
Read the file….... read more
Golang : Sort and reverse sort a slice of integers
Problem :
How to sort and reverse sort a slice of integers ?
Solution :
Use sort.Ints and sort.Sort functions.….... read more
Golang : Sort and reverse sort a slice of runes
Problem :
How to sort and reverse sort a slice of runes ?
Solution :
Sorting runes depends on the….... read more
Golang : Sort and reverse sort a slice of bytes
Problem :
How to sort and reverse sort a slice of bytes ?
Solution :
Import "github.com/cznic/sortutil"
Use the ByteSlice….... read more