How To Enable/ Disable Auto Reconnect in MySQLJuly 20th, 2007 What is auto reconnect in MySQL?
The MySQL client library can perform an automatic reconnect to the server if it finds that the connection is down when you attempt to send a statement to the server to be executed. In this case, the library tries once to reconnect to the server and send the statement again.
Java Coding: How To Find Number of Characters in a String (!= String.length())November 7th, 2005 Length of string can be interpreted variously -
number of chars in the string
number of characters in the string
number of bytes in the string
String.length() gives you the number of chars in the string accurately. However a char is not necessarily a complete character.
J2SE 5: New wine in new bottle with old corkMarch 15th, 2005 J2SE stands for Java 2 Standard Edition. The 2 stands for version 2 of the platform.
JDK1.5 - Painful bugs: SolvedAugust 29th, 2004 Defects in early release of jdk.5 which have been solved.
Java Quiz: Why StringBuilder Should be Used Instead of StringBuffer?August 23rd, 2008 First tell me what is the best way to concatenate large number of String objects? Is it a + b?
Most Java developers know not to use a + b (+ operator) because of huge performance problems, they use StringBuffer instead. In fact I did some tests in the past which confirms this folklore.
Java SE Goes Beta (Feature Complete). Download Now.February 17th, 2006 Java SE 6 Beta offers the first feature complete version of next major release of the Java SE platform. Sun expects to ship the final release of Java SE 6 in the fall of 2006.
Three Free Notable Java Software / APISeptember 8th, 2005 GMail API for Java
GMailer API for Java (g4j) is set of API that allows Java programmer to communicate to GMail. With G4J programmers can made Java based application that based on huge storage of GMail.
Java Popularity Statistics (from JavaOne 2008)May 7th, 2008 Sun revealed the following statistics about Java at JavaOne 2008:
1. 90% of Personal Computers on Internet have Java
2.
Gripe: Java blog aggregator: javablogs.comFebruary 16th, 2004 Few Gripes on Java.blogs:
After few days with java.blogs I realized I don't want a few things. For example I am not interested in knowing anything about IDEA releases.
Java EE 6 HighlightsMay 6th, 2008 The key features of Java EE 6 (Java Enterprise Edition version 6) are:
Modular Platform - Java EE 6 introduces profiles targeted for particular segment of users like web developers or mobile developers. Java Profiles allows you to select Java EE 6 features to be included in a profile.
Java Card Platform for Contactless Smart CardsNovember 26th, 2005 Smart cards are used for applications including access control, banking, and mobile-phone subscriber identification. Typically the size of a credit card, they contain an embedded microprocessor with a secure operating system that can establish an encrypted connection with a card reader.
Java Blogger's in IndiaDecember 11th, 2005 I want to create a list of Java blogger's in India or of Indian origin. If you are one please state so with your url in the comment below.
Top 10 Java LiesMarch 6th, 2006 Here are the top ten Java lies I have heard over the years. Feel free to add yours in the comments.
How To Pass Command Line Arguments To Ant Task / ScriptAugust 17th, 2008 Ant is a popular, high quality Java based build and deployment tool from Apache Foundation. You can invoke Java programs in ant using the java task.
Java Framework To Create Java FrameworksJanuary 26th, 2006 I have seen way too many java frameworks, way beyond my limits of tolerance. And I have found a perfect solution.
June 11th, 2007 at 8:42 pm
This doesn’t work with postgres (at least, when I last tried it). Instead, I use:
PreparedStatement insert = conn.prepareStatement(”insert into thetable (owner, created) values (?,?); select currval(’thetable_id_seq’)”;
…
insert.execute();
if (insert.getUpdateCount() == 1 && insert.getMoreResults()) {
ResultSet res = insert.getResultSet();
int id = res.getInt(1);
}
June 12th, 2007 at 12:34 am
Thanks for sharing. I have tested my code on MySQL.