Tutorials
Golang : How to join strings?
Apart from using fmt.Sprint()
function to combine strings together. There is another way to concatenate string from different strings. One….... read more
Golang : Squaring elements in array
Problem :
You need to calculate the square values of the elements in an array or slice.
Solution :
….... read moreGolang : Generate MD5 checksum of a file
This is an update to the previous tutorial on how to generate checksum for a file, except that….... read more
Golang : Generate random elements without repetition or duplicate
Problem :
How to generate a map with random elements without repetition or duplicate items in the map?
Solution :
….... read moreGolang : File system scanning
Problem :
How to scan all the files located inside a root directory in Golang?
Solution :
Use the filepath.Walk
….... read more
Golang : Find duplicate files with filepath.Walk
Sometimes we downloaded a lot of files in a directory and although the files have different names, they could be….... read more
Golang : Find file size(disk usage) with filepath.Walk
Need to determine which file is taking up all the disk space? Maybe this small Golang program can be useful….... read more
Golang : Validate email address
Problem :
You need a quick way to validate if a user has entered a valid email address without knowing….... read more
JQuery : Calling a function inside Jquery(document) block
Problem :
Saw this error message in the browser's console while attempting to call a function inside JQuery(document) section resulted….... read more
Swift : Convert (cast) String to Double
Helping out a colleague to solve this simple task of converting string value to double today. Putting down this solution….... read more
Golang : Regular Expression find string example
This is a simple tutorial on how to use Golang's regexp package to find certain string value in a string.….... read more
Swift : Convert (cast) Float to String
Problem :
You have a float value and you need to convert the float into string type in Swift.
Solution….... read more
Golang : Count number of runes in string
This just a note for myself and perhaps it can be useful to you as well.
To count a….... read more
AWS S3 : Prevent Hotlinking policy
Problem :
Hosting a lot of photos or video files on AWS S3? Don't want other websites to link to….... read more
Golang : Read from buffered reader until specific number of bytes
Problem :
You have a buffered reader streaming in with data. You want to limit each read to a specific….... read more
Elastic Search : Mapping date format and sort by date
While working on the job board for Socketloop.com recently, I need to sort the Elastic Search result based….... read more
Golang : Extract sub-strings
To extract sub-strings from a string in Golang, it can be done by determining a common delimiter and tokenize each….... read more
Golang : Securing password with salt
Every now and then we will hear some companies or banks database got compromised and the hackers will publish the….... read more