Java
10 Object Oriented Design Principles
Posted May 29th, 2008 by administrator
Every now and then when I review code, I see developers write code that does not conform to the basis OO design principles and this eventually make it difficult to understand, maintain, extend blah blah..... Basically its just keeps on adding a layer of un-necessary complexity that you have to deal with. So what do you do? I guess you end-up refactoring the code( Did I said, I love refactoring?
How to get the Temp Directory Path in Java?
Posted April 1st, 2008 by administrator
The path to the temp directory in Java can be retreived via the sytem property as mentioned below:
System.getProperty("java.io.tmpdir");
Find the Calling Class
Posted March 28th, 2008 by administrator
Here is a simple snippet to find out the calling Java Class.
Class.forName(new Throwable().getStackTrace()[2].getClassName()));
How to view all Stored Procedures in a schema?
Posted January 31st, 2008 by administrator
The following sql list the name of all the routines in a given database.
SELECT ROUTINE_NAME
FROM INFORMATION_SCHEMA.ROUTINES
WHERE ROUTINE_TYPE="PROCEDURE" AND ROUTINE_SCHEMA="dbname";
How to convert ISAM table to MYISAM?
Posted January 31st, 2008 by administrator
The table types have changed from ISAM to MYISAM from Mysql version 4.x to 5.x.
In order to convert a table from ISAM to MyISAM, simply issue a statement like
ALTER TABLE tblname ENGINE=MYISAM.
Recursively Convert Gif Images To Jpg
Posted December 26th, 2007 by administrator
Converting images from gif to jpg for web or other reason can be done easily using the ImageIO package. The following snippet convert all the gif images in directory rootDir to jpg images.Compile this class and execute using java command line. This utility class is also available as part of the Livrona Tools Project.The following is the code for the Image Converter.
Eclipse Java Project for Beginners
Posted December 21st, 2007 by administrator
A very simple tutorial that walks through the process of creating a Java Project using the Eclipse IDE. It also gives overview about writing a java class along with simple and helpful tip for beginners.
How to debug Java programs using the Debugger in Eclispe?
Posted December 8th, 2007 by administrator
This is very simple tutorial about how to use built in Eclipse Debugger for Java Programs.
SSL made easier for Testing By Dummy SSL
Posted December 7th, 2007 by administrator
Introduction
JDK 1.4.2 and above JSSE allows to plugin the implementation of the ssl security provider.
Sometimes its difficult to get the ssl/jsse working correctly due to a number of reasons.
Specially in testing applications, where the url's are accessible via ssl , parts or all of the the ssl implementation/provider can be swapped sith a custom
if the server certificate is a self signed cert, not valid or not a trusted cert.
Clash of the Technology Titans - A Recap
Posted December 5th, 2007 by administrator
Introduction
Interestingly enough this power clash has been going on for more than a year now. Even though nothing concrete has come up from it. Even with the latest news about Yahoo and Ebay working together in Japan does not change a thing. EBay withdrew from Japan in 2002 after only two years of operation.Could not compete with well established site Yahoo Japan and Rakuten.