where to handle Checked exception ? and where-not ?
Java's checked exceptions have become highly controversial and it seems to be accepted in the Java community that checked exceptions should only be used when the exceptions can be handled in the application.
Exceptions that cannot be handled in any meaningful way by application code should be allowed to go on unchecked. for ex : SQLException is a checked exception, application code must handle it, either catching it and doing something with it or explicitly throwing it to calling code.
Tuesday, April 11, 2006
Checked Exception ?
Posted by Vetriselvan at 4/11/2006 07:48:00 PM 0 comments
Thursday, April 06, 2006
Tuesday, April 04, 2006
Work around
select TO_NUMBER ('13,000.09', '99G999D99','nls_numeric_characters = ''.,''') from dual
select TO_NUMBER ('13.000,09', '99G999D99','nls_numeric_characters = '',.''') from dual
Posted by Vetriselvan at 4/04/2006 08:42:00 PM 0 comments
Wednesday, March 29, 2006
get the top n rowns from M rows of a Resultset
select *
from ( select a.*, rownum rnum
from ( YOUR_QUERY_GOES_HERE -- including the order by ) a
where rownum <= MAX_ROWS ) where rnum >= MIN_ROWS
Posted by Vetriselvan at 3/29/2006 04:06:00 PM 0 comments
Tuesday, March 28, 2006
The smart way of coding
I had an requirement like
":,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,"
i have to replace the first : with 1 and the second : with 2 and it goes on.....
the solution for that was
select max(sys_connect_by_path(l,',')) from
(select level l
from dual
connect by level <= length(replace(':,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,',',')))
start with l=1
connect by l = prior l+1
could have done this way , it would have been better.
i was forced to type manually , LOL [reason : to make sure it is correct.]
it sucks, always.. use ur skills instead of manual service.
for that only we have been hired ;)
Posted by Vetriselvan at 3/28/2006 02:32:00 PM 1 comments
Thursday, February 09, 2006
Its true, re-read the old things , u will find lot of new in there :)
for rationale
Private virtuals can be overridden in C++
Posted by Vetriselvan at 2/09/2006 05:41:00 PM 0 comments