iTunes 10.5 High CPU (100%) – On Windows
iTunes 10.5 on windows might cause a high CPU usage.
You would most likely see the iTunes consuming 50%
and AppleMobileDeviceService.exe could consume another 50%.
Resolution:
In the command prompt enter the below command and RESTART your computer.
netsh winsock reset
How to convert local timestamp to UTC in Java?
The below code can be used to convert the local timestamp to UTC in Java. Converting to any other timezone is very easy by changing the below UTC into the target timezone.
public static String getCurrentUTCTimestamp() {
SimpleDateFormat dateFormatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss z");
final TimeZone utc = TimeZone.getTimeZone("UTC");
dateFormatter.setTimeZone(utc);
return dateFormatter.format(new java.util.Date());
}
Convert DocX to Doc in Windows
If you have word 2007 or higher and would like to do a batch conversion of docx to any save as format of word, here is a wonderful article that helps you do that with few steps in the word using macros. It is not tough, it is very easy for anybody do this.
So here is the URL that can help you do the batch conversion from docx to doc. Happy converting and more importantly, it is 100% free that is built by you for you!
org .apache .xerces .dom Deferred Document Impl getXmlStandalone Exception
java.lang.AbstractMethodError:
org.apache.xerces.dom.DeferredDocumentImpl.getXmlStandalone()Z
Resolution:
This error occurs when there is NO xercesImpl.jar in the class path.
Remove the xerces.jar from the classpath and add xercesimpl.jar in the classpath.
Good luck!
A Program on your computer has corrupted your default search provider setting for Internet Explorer (IE 8) – Resolved
Most of the people those who upgraded to Internet Explorer 8 (IE
might run into the issue of seeing the error message on the start up of the IE saying “A Program on your computer has corrupted your default search provider setting“. If it is an one time alert, then it might be fine. But this would popup every time the internet explorer 8 is being opened. It would be an frustrating experience to have this happen.
Here is the possible solution (or work around) until Microsoft fixes this issue.
Click here for Solution to fix the corrupted default search engine provider. Even though it is a working solution, I would still like to warn you that use it at your own risk.
Java Exceptions Hierarchy
In Java, exceptions are objects, when you throw an exception, you are throwing an object. You can’t throw just any object as an exception as Exceptions needs to be in the inheritance hierarchy of Throwable. Throwable is the base class for the Exceptions.
The Hierarchy is like below. Throwable is the base class. Error and Exceptions are extended from the Throwable.
The below shows the hierarchy of the java exception.
Throwable
———————
| |
Error Exception
What is Exception?
The Exception is a way to handle the abnormal condition in Java. Exceptions are abnormal conditions and are recoverable. For example, say, a method is expecting a String object based on some condition. Now, the passed parameter is a List object. It is a abnormal condition and we throw need to throw back an exception saying, it is not a valid parameter. I would throw an IllegalArgumentException.
What is Error?
Errors are system errors. When there is an abnormal condition in the Java Virtual Machine, then the system throws the Error. Errors are more likely non-recoverable ones unlike the Exceptions. For example, Out of memory is an error. In this case, the system will not be able to recover as there is no memory to proceed.
Failed to open stream: no such file or directory in PHP
Failed to open stream: no such file or directory in PHP
This is usually a very common issue. The same code will work in the local machine and it often fails when gets uploaded to the Actual web server.
Possible Causes
- The File might be missing.
- The file might not have the read access
- The file name is case sensitive. Make sure, whatever is included in the PHP has the exact name as in the file directory of the PHP file. This is the most likely cause in many occasions. For example AClass.php might be stored there as aclass.php. include(“test/class/AClass.php”) will not work where as include (“test/class/aclass.php”) will work.
Cursor Is Closed Exception In Java – Fixed (Resolved)
In java, when there is a stored procedure call which returns the Cursor as a ResultSet, there is a possibility that, Cursor is closed exception might occur.
Here is the stack trace which shows that.
java.sql.SQLException: Cursor is closed.
at oracle.jdbc.driver.T4CResultSetAccessor.getCursor(T4CResultSetAccessor.java:323)
at oracle.jdbc.driver.ResultSetAccessor.getObject(ResultSetAccessor.java:85)
at oracle.jdbc.driver.OracleCallableStatement.getObject(OracleCallableStatement.java:1401)
at com.ibm.ws.rsadapter.jdbc.WSJdbcCallableStatement.getObject(WSJdbcCallableStatement.java:443)
Solution to over come the “Cursor is closed” exception is.
If you are not using the Stored Procedure, then make sure the ResultSet is not closed. If the ResultSet is closed, then the underlying cursor is closed as well. So make sure, you are not closing the ResultSet and then using it again. Even closing the Statement would close the ResultSet internally. So just need to be careful while closing the ResultSet.
Make sure the cursor is opened in the Stored Procedure. There may be an exception the Stored procedure where in the When Others Block they might have missed to Open the Cursor. Anytime this occurs, there is a huge possibility of not opening the cursor in any of the condition in the Stored Procedure.
Ref Cursor or the Reference Cursor is pretty useful to pull a huge dataset but need to be careful when it is being opened. It is best advised to open a the cursor at the top of the procedure and reopen with the actual data whenever required (make sure, you close it before reopening it).
Yoksha Birthday On its way!!!
My Sweet Little Yoksha‘s birthday is coming here on 25th of May. We have a party at Minerva, Gaithersburg.
Here is Yoksha’s third birthday invitation.

