When programmer writes a program to read data from a file continuously and sequentially with a fixed data type reading sequence (e.g. to read three integers then 2 doubles repeatedly), he or she may find the MappedByteBuffer from Java library is useful. … [Read more...]
WordPress: How To Add Table Into A Post
Wordpress' WYSIWYG post editor does not come with the functionality that allows user to create table when editing a post (like what you can do in Microsoft word). … [Read more...]
Java: Loading Large Data into JTable or JList
In software programming (especially Graphical User Interface or GUI programming), many times, we need to load data from file or database into a table or list to be displayed to user on computer screen. Most of the time, the size of the data can be determined only during runtime. The data could be very small to a few rows of record and could be very large to a few millions rows … [Read more...]
Java: Format Long Integer Into Hexadecimal String
In software programming, sometime you may want to convert a long integer or integer into hexadecimal string for viewing purpose or also as a text format to be stored in text file or database. The Java API itself does not have a class or function to convert a long into a fixed 16 characters hexadecimal string or an integer into fixed 8 characters hexadecimal string. The … [Read more...]
Java: Stop A Thread Correctly
In Java programming, it is very common to use threads to perform multi tasks simultaneously. Starting a thread is pretty easy but stopping a thread might be a headache for some programmers, especially when the thread needs to run a task that takes some times. … [Read more...]