SupportWriter space ↗
REFERENCE LIBRARY

References from other publishers

Republished articles with source attribution. This collection is separate from Diary Coding’s original guides and does not display ads.

Read original guides → · Editorial policy

FOR YOUR CURIOSITY

Latest notes.

CORE API / NOTES</>↗
Core API23 Oct 2019

How do I set the time of java.util.Date instance to 00:00:00?

The following code snippet shows you how to remove time information from the java.util.Date object. The static method removeTime() in the code snippet below will take a Date object as parameter and will return a new Date object where the hour, minute, second and millisecond information hasbeen reset to zero. To do this, we use […]

Wayan · 2 min read
OS X / NOTES</>↗
OS X28 Mar 2019

How to Install Consolas Font in Mac OS X?

Here are the instructions to install Microsoft Consolas Font on Mac OS X. You need to install brew first. Type-in the following commands. brew install cabextract cd ~/Downloads mkdir Consolas cd Consolas curl -LO https://sourceforge.net/projects/mscorefonts2/files/cabs/PowerPointViewer.exe cabextract PowerPointViewer.exe cabextract ppviewer.cab open CONSOLA*.TTF Press Install Font button to install the fonts.

Wayan · 1 min read
TOOLS / NOTES</>↗
Tools14 Feb 2019

How do I clear the current command line in terminal?

You have typed a long line of command in terminal. But now you want to clear or delete the entire line. Deleting each character in the command will take sometime and bored you. So are there any keyboard shortcuts that allow you to do this? Yes there are some hotkeys to the rescue. Hotkeys Description […]

Wayan · 1 min read
APACHE COMMONS / NOTES</>↗
Apache Commons06 Feb 2019

How do I generate random alphanumeric strings?

The following code snippet demonstrates how to use RandomStringGenerator class from the Apache Commons Text library to generate random strings. To create an instance of the generator we can use the RandomStringGenerator.Builder() class build() method. The builder class also helps us to configure the properties of the generator. Before calling the build() method we can […]

Wayan · 2 min read
BASIC / NOTES</>↗
Basic29 Jan 2019

Why do I get ArrayIndexOutOfBoundsException in Java?

The ArrayIndexOutOfBoundsException exception is thrown to indicate that an array has been accessed with an illegal index. The index is either negative or greater than or equal to the size of the array. For example see the code snippet below: String[] vowels = new String[]{"a", "i", "u", "e", "o"} String vowel = vowels[10]; // throws […]

Wayan · 2 min read
MYSQL / NOTES</>↗
MySQL17 Jan 2019

How to create a read-only MySQL user?

Introduction There are times when you need to create a user only to have read-only access to a database. The user can view or read the data in the database, but they cannot make any changes to the data or the database structure. Creating a New User Account To create a read-only database user account […]

Wayan · 2 min read
✳

Knowledge grows when shared.

Stay curious. There is always something new to learn.

Explore notes ↗
Putu Adi Guna Permana
ABOUT THE AUTHOR

Dr (C). Ir. Putu Adi Guna Permana, S.Kom., M.Kom., IPM., ASEAN Eng.

Writer and founder of Diary Coding — sharing notes, tutorials, and experiences about programming for anyone who wants to keep learning.