Tutorials
Golang : Get remaining text such as id or filename after last segment in URL path
Problem:
Retrieving the last segment/part or the remaining text after a slash in the URL or filename in a path….... read more
Golang : Convert string slice to struct and access with reflect example
Writing this down here for my own future references. Basically, what this code does is to convert a given string….... read more
Golang : Sort words with first uppercase letter
Problem:
You use the sort.Strings()
function to sort a slice of words. However, you noticed that words with the first….... read more
Golang : Sort lines of text example
Here is an example of how to convert lines of text into a slice in Golang, sort them in descending….... read more
Golang : Find the shortest line of text example
Continue from previous tutorial on how to find the longest line in a given text. This example demonstrates how to….... read more
Golang : Convert spaces to tabs and back to spaces example
A simple example on how to convert spaces to tabs and convert back the tabs to spaces again in a….... read more
Golang : Find the longest line of text example
Ability to find the longest find in a given text file can be useful in a situation where you want….... read more
Android Studio : Simple input textbox and intercept key example
A GUI(Graphical User Interface) such as Android OS has input text box to allow users to enter text and able….... read more
Javascript : Push notifications to browser with Push.js
Problem:
Instead of RSS, you want to send notifications to your visitor's computer through their browser about the latest updates….... read more
Golang : ROT47 (Caesar cipher by 47 characters) example
Here is an example of how to implement the ROT47 - Rotate 47 characters algorithm in Golang. ROT47 is a….... read more
Golang : Frobnicate or tweaking a string example
A simple example of how to frobnicate(tweaking) a string with UTF-8 characters. Useful in obscuring plain text in embedded….... read more
Golang : ROT32768 (rotate by 0x80) UTF-8 strings example
Previously we learned how to implement ROT13, ROT5 and ROT47 character substitution algorithms in Golang. However, these implementations….... read more
Golang : Rot13 and Rot5 algorithms example
Continuing from our previous ROT47 tutorial, we will now learn how to implement the ROT13 + ROT5 algorithms. ROT13….... read more
Golang : Reverse text lines or flip line order example
Problem:
You are given lines of text and you need to reverse the lines order before encrypting the text. Reversing….... read more
Android Studio : Highlight ImageButton when pressed on example
There are times when we want to spice up our Android app with buttons that are aware of being pressed….... read more
Golang : Allow Cross-Origin Resource Sharing request
Problem:
You have a client JavaScript code that want to make XHR(XMLHttpRequest) request to another Golang server which is also….... read more
Golang : Humanize and Titleize functions
Humanize function takes multiple words separated by a given separator and changes them to spaces. Titleize converts a given string….... read more
Golang : Ordinal and Ordinalize a given number to the English ordinal numeral
Two functions that will convert a given number to the English ordinal numeral. Can be handy in developing chat bot….... read more