[50] Results

Golang : Loop each day of the current month example

golang loop-date number-of-days-in-month


You need to get the current month, find out the number of days in the month programmatically and loop….... read more

Golang : Find age or leap age from date of birth example

golang date-of-birth month-to-integer leap-year-age

Alright, here is a simple tutorial on how to calculate a person's age by a given date of birth string.….... read more

Golang : Changing a RGBA image number of channels with OpenCV

golang bgr number-of-rgba-channels opencv-cvtcolor create-image


Golang image packages deal with RGBA ( 4 channels ) and OpenCV deals with BGR ( 3 channels ).….... read more

Generate Random number with math/rand in Go


Random number is useful in many application. One such example is salting password to make in more secure. In this tutorial, we will learn how….... read more

Random number generation with crypto/rand in Go


Random number is useful in many applications. From salting password to enabling secure transactions. In this tutorial, we will learn how to generate random number….... read more

Golang : How to get year, month and day?

golang year-month-day time-now-date

Problem :

You want to extract the year, month and day from today's date. How to do that?

Solution :

.... read more

Golang : Check if integer is power of four example

golang math-pow power-of


You need to test if a given integer is a power of 4. For example, if given number =….... read more

Golang : Integer is between a range

golang minmax in-between-range integer


You need to check if a given integer is in between a range of integer. How to do that?

.... read more