Recent Notes

Displaying keyword search results 41 - 46
Created by Dr. Xi on January 07, 2010 23:47:36    Last update: January 07, 2010 23:47:36
This is a utility to generate a "create role" script for Oracle for an existing schema. import java.io.*; import java.sql.*; pub...
Created by Dr. Xi on November 19, 2008 00:22:27    Last update: January 07, 2010 23:00:36
There is a open source project named [ini4j] for processing Windows .ini configuration files. However, I found it an overkill for my purposes. So here is my simple implementation of a .ini parser. It mimics the standard java.util.Properties class with enhancements to get and set properties by section name. There are only a few simple rules: Leading and trailing spaces are trimmed from section names, property names and property values. Section names are enclosed between [ and ] . Properties following a section header belong to that section Properties defined before the appearance of any section headers are considered global properties and should be set and get with no section names. You can use either equal sign ( = ) or colon ( : )...
Created by Dr. Xi on October 09, 2009 02:56:44    Last update: October 09, 2009 02:56:44
The Luhn algorithm is used to validate credit card numbers. This class provides two methods: one to validate that a number passes the Luhn algorithm validation, the other to generate a check digit that makes a number pass the Luhn validation. public class Luhn { public static void main...
Created by Dr. Xi on February 09, 2009 23:14:15    Last update: February 09, 2009 23:14:15
This example demonstrates the general steps in creating a custom Java class loader. Normally a class loader would consult its parent class loader when asked to load a class. If it's not loaded by the parent class loader, then the class loader would try to load the class on its own. This class loader tries to load the requested class on its own first, and delegates to the parent only when a java.lang.SecurityException is thrown (which happens when it tries to load core Java classes such as java.lang.String ). The classes are loaded from CLASSPATH through the getResourceAsStream call. It's important to note that when a class is loaded with a certain class loader, all classes referenced from that class are also loaded through the...
Created by Dr. Xi on October 16, 2008 23:09:28    Last update: October 17, 2008 03:30:38
import java.io.*; public class TestMSOffice...
Created by Dr. Xi on October 15, 2008 18:34:17    Last update: October 15, 2008 18:34:17
class InitializeStringArray { public static...
Previous  1 2 3 4 5 Next