<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-32943832</id><updated>2012-02-17T08:57:54.103-08:00</updated><category term='regular-expressions'/><category term='WinXP tricks'/><category term='References'/><category term='YUI'/><category term='Query'/><category term='Java'/><category term='reusability'/><category term='RTTI - Java'/><category term='database'/><category term='JDBC'/><category term='oracle'/><title type='text'>Point De Vue</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://prameelanair.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32943832/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://prameelanair.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Prameela</name><uri>http://www.blogger.com/profile/01285225189046416100</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='19' src='http://1.bp.blogspot.com/_ng9ElICtvac/TAin5dwNdoI/AAAAAAAABlo/76ZK41KYuaw/S220/ATT00023.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>25</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-32943832.post-9105667693049441027</id><published>2012-02-17T08:57:00.001-08:00</published><updated>2012-02-17T08:57:54.116-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Query'/><category scheme='http://www.blogger.com/atom/ns#' term='database'/><title type='text'>DB: Insert with a select</title><content type='html'>Inspite of so many years into db i still found i didnt knew this one :)&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Aim:&lt;/b&gt; To write an insert after selecting from some other table.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;SQL:&lt;/b&gt;&lt;br /&gt;
INSERT INTO A (column1, col2, col3)&lt;br /&gt;
SELECT otherCol1, otherCol2, otherCol3&lt;br /&gt;
From table&lt;br /&gt;
Where &lt;i&gt;condition here&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;To Note:&lt;/b&gt; no use of the normal 'VALUES' kyword&lt;div class="blogger-post-footer"&gt;TechnicalBlog&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32943832-9105667693049441027?l=prameelanair.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prameelanair.blogspot.com/feeds/9105667693049441027/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32943832&amp;postID=9105667693049441027&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32943832/posts/default/9105667693049441027'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32943832/posts/default/9105667693049441027'/><link rel='alternate' type='text/html' href='http://prameelanair.blogspot.com/2012/02/db-insert-with-select.html' title='DB: Insert with a select'/><author><name>Prameela</name><uri>http://www.blogger.com/profile/01285225189046416100</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='19' src='http://1.bp.blogspot.com/_ng9ElICtvac/TAin5dwNdoI/AAAAAAAABlo/76ZK41KYuaw/S220/ATT00023.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32943832.post-3753657982936899051</id><published>2011-05-27T05:24:00.000-07:00</published><updated>2011-05-27T05:30:25.083-07:00</updated><title type='text'>The arrow anti pattern</title><content type='html'>Check it &lt;a href="https://docs.google.com/document/pub?id=1ZVdlWdeeyAsfKsX6VW6ZMlZB7PAf-vYsYqPirJscNLE"&gt;here&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;TechnicalBlog&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32943832-3753657982936899051?l=prameelanair.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prameelanair.blogspot.com/feeds/3753657982936899051/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32943832&amp;postID=3753657982936899051&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32943832/posts/default/3753657982936899051'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32943832/posts/default/3753657982936899051'/><link rel='alternate' type='text/html' href='http://prameelanair.blogspot.com/2011/05/arrow-anti-pattern.html' title='The arrow anti pattern'/><author><name>Prameela</name><uri>http://www.blogger.com/profile/01285225189046416100</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='19' src='http://1.bp.blogspot.com/_ng9ElICtvac/TAin5dwNdoI/AAAAAAAABlo/76ZK41KYuaw/S220/ATT00023.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32943832.post-1294151562680625958</id><published>2011-05-27T04:44:00.001-07:00</published><updated>2011-05-27T04:45:50.341-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Query'/><category scheme='http://www.blogger.com/atom/ns#' term='oracle'/><title type='text'>Finding the primary keys for a table</title><content type='html'>SELECT cols.table_name, cols.column_name, cols.position, cons.status, cons.owner&lt;br /&gt;
FROM all_constraints cons, all_cons_columns cols&lt;br /&gt;
WHERE cons.constraint_type = 'P'&lt;br /&gt;
 AND cons.constraint_name = cols.constraint_name&lt;br /&gt;
 AND cons.owner = cols.owner&lt;br /&gt;
 and upper(cons.constraint_name) = 'SYS_C009448' --name of the constarint that got violated&lt;br /&gt;
&lt;br /&gt;
ORDER BY cols.table_name, cols.position;&lt;div class="blogger-post-footer"&gt;TechnicalBlog&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32943832-1294151562680625958?l=prameelanair.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prameelanair.blogspot.com/feeds/1294151562680625958/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32943832&amp;postID=1294151562680625958&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32943832/posts/default/1294151562680625958'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32943832/posts/default/1294151562680625958'/><link rel='alternate' type='text/html' href='http://prameelanair.blogspot.com/2011/05/finding-primary-keys-for-table.html' title='Finding the primary keys for a table'/><author><name>Prameela</name><uri>http://www.blogger.com/profile/01285225189046416100</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='19' src='http://1.bp.blogspot.com/_ng9ElICtvac/TAin5dwNdoI/AAAAAAAABlo/76ZK41KYuaw/S220/ATT00023.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32943832.post-8837685473753959468</id><published>2011-05-15T08:32:00.000-07:00</published><updated>2011-05-15T08:32:17.031-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Query'/><category scheme='http://www.blogger.com/atom/ns#' term='oracle'/><title type='text'>Query - Combination of columns</title><content type='html'>select * FROM
tmpTable sc
WHERE sc.file_id = 681
and (sc.colA,sc.colB) in (('ABC',55), ('FED',54));&lt;div class="blogger-post-footer"&gt;TechnicalBlog&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32943832-8837685473753959468?l=prameelanair.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prameelanair.blogspot.com/feeds/8837685473753959468/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32943832&amp;postID=8837685473753959468&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32943832/posts/default/8837685473753959468'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32943832/posts/default/8837685473753959468'/><link rel='alternate' type='text/html' href='http://prameelanair.blogspot.com/2011/05/query-combination-of-columns_15.html' title='Query - Combination of columns'/><author><name>Prameela</name><uri>http://www.blogger.com/profile/01285225189046416100</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='19' src='http://1.bp.blogspot.com/_ng9ElICtvac/TAin5dwNdoI/AAAAAAAABlo/76ZK41KYuaw/S220/ATT00023.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32943832.post-5371560684853651218</id><published>2010-03-17T07:11:00.000-07:00</published><updated>2010-03-17T07:20:16.761-07:00</updated><title type='text'>Javascript Prototype object</title><content type='html'>basics of the javascript prototype object &lt;a href="http://docs.google.com/View?id=ddztwnpf_29c75659cj"&gt;here &lt;/a&gt;

&lt;br/&gt;
&lt;span style="font-style:italic;"&gt;p.s. Still unable to directly refresh my blog thru google docs...sigh!!&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;TechnicalBlog&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32943832-5371560684853651218?l=prameelanair.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prameelanair.blogspot.com/feeds/5371560684853651218/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32943832&amp;postID=5371560684853651218&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32943832/posts/default/5371560684853651218'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32943832/posts/default/5371560684853651218'/><link rel='alternate' type='text/html' href='http://prameelanair.blogspot.com/2010/03/javascript-prototype-object.html' title='Javascript Prototype object'/><author><name>Prameela</name><uri>http://www.blogger.com/profile/01285225189046416100</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='19' src='http://1.bp.blogspot.com/_ng9ElICtvac/TAin5dwNdoI/AAAAAAAABlo/76ZK41KYuaw/S220/ATT00023.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32943832.post-1636514581280772608</id><published>2009-02-27T00:06:00.001-08:00</published><updated>2009-02-27T00:19:35.496-08:00</updated><title type='text'>MySQL tip - logging results in a file</title><content type='html'>While using a mySQL command line client has it ever happened that you fire a query and the result runs into pages scrolling your entire command line. Obviously you need some better way to view the results. probably redirecting result to a file would help. 
&lt;br/&gt;&lt;br/&gt;
Naah! traditional redirection operator does not work. Instead use this
&lt;strong&gt;mysql&gt; tee c:/result.txt&lt;/strong&gt;
&lt;br/&gt;&lt;br/&gt;
Thats it......&lt;br/&gt;
After this command everything you do on your client window will  be logged into the file c:/result.txt
&lt;br/&gt;&lt;br/&gt;
Its for your command line session obviously. For the next session, repeat the activity.
&lt;br/&gt;&lt;br/&gt;
&lt;em&gt;Disclaimer: Anything can be found on google. I just jot it down here again because this acts my repository. And yeah! I have a better memory if I write down things ;)&lt;/em&gt;
&lt;br/&gt;&lt;br/&gt;&lt;div class="blogger-post-footer"&gt;TechnicalBlog&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32943832-1636514581280772608?l=prameelanair.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prameelanair.blogspot.com/feeds/1636514581280772608/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32943832&amp;postID=1636514581280772608&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32943832/posts/default/1636514581280772608'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32943832/posts/default/1636514581280772608'/><link rel='alternate' type='text/html' href='http://prameelanair.blogspot.com/2009/02/mysql-tip-logging-results-in-file.html' title='MySQL tip - logging results in a file'/><author><name>Prameela</name><uri>http://www.blogger.com/profile/01285225189046416100</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='19' src='http://1.bp.blogspot.com/_ng9ElICtvac/TAin5dwNdoI/AAAAAAAABlo/76ZK41KYuaw/S220/ATT00023.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32943832.post-5967032465590530868</id><published>2008-10-20T09:19:00.000-07:00</published><updated>2008-10-20T09:32:08.295-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='oracle'/><title type='text'>Oracle and null values</title><content type='html'>I have a table say Employee with the following structure
&lt;br/&gt; 
Employee
(
 id number,
 name varchar2(50)
)
&lt;br/&gt; &lt;br/&gt; 
If i try inserting (1,'')into this above table guess what will be the name of the employee with id 1? Yeah its null. I thought that was weird, since i meant a 0-length string and not null. Alright, so i surrendered to the fact that Oracle would store a null every time I added a zero length string. 
&lt;br/&gt; &lt;br/&gt; 
But that's not done. Now assume, my table has the following values
&lt;br/&gt; 
Id - Name&lt;br/&gt; 
1 - null &lt;br/&gt; 
2 - Anita&lt;br/&gt; 
3 - null&lt;br/&gt; 
4 - Beena&lt;br/&gt; 
5 - Neha&lt;br/&gt; 
&lt;br/&gt; 

What would this query return - &lt;br/&gt; 
Select * from Employee 
where name not in('Anita', 'Neha');
&lt;br/&gt; &lt;br/&gt; 
If you thought it would return me 3 rows, you are wrong (as was I). it just returns one record -&lt;br/&gt; 
4 Beena&lt;br/&gt; 
Thats because when you fire a not in clause it will not consider null. So if you thought that null != Anita/Neha you are partially right but not completely
&lt;br/&gt; &lt;br/&gt; 


You have to explicitly change the above query as -
&lt;br/&gt; &lt;br/&gt; 
Select * from Employee 
where name not in('Anita', 'Neha') or name is null;
&lt;br/&gt; &lt;br/&gt; 
Morally of the story: Deal with null value columns carefully. A small mistake will be really difficult to debug
&lt;br/&gt; &lt;br/&gt;&lt;div class="blogger-post-footer"&gt;TechnicalBlog&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32943832-5967032465590530868?l=prameelanair.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prameelanair.blogspot.com/feeds/5967032465590530868/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32943832&amp;postID=5967032465590530868&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32943832/posts/default/5967032465590530868'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32943832/posts/default/5967032465590530868'/><link rel='alternate' type='text/html' href='http://prameelanair.blogspot.com/2008/10/oracle-and-null-values.html' title='Oracle and null values'/><author><name>Prameela</name><uri>http://www.blogger.com/profile/01285225189046416100</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='19' src='http://1.bp.blogspot.com/_ng9ElICtvac/TAin5dwNdoI/AAAAAAAABlo/76ZK41KYuaw/S220/ATT00023.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32943832.post-5164812132905538789</id><published>2008-08-20T08:37:00.000-07:00</published><updated>2008-08-20T08:44:55.579-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WinXP tricks'/><title type='text'>Modifying the right click in Win XP</title><content type='html'>Folks, this is no big deal and I am sure most of you already know about it but I always seem to forget the registry entry needed and waste time in googling it. Hence jotting it down at this place.
&lt;br/&gt;&lt;br/&gt;
&lt;span style="font-weight:bold;"&gt;1) To add the command prompt entry to your right click&lt;/span&gt;
Open Explorer -&gt; Tools(menu)  -&gt; Option  -&gt; FileTypes (tab)  -&gt; Folder

Click on the Advanced button. In the dialog box , click on the New Button. 
In the new dialog box that pops up&lt;br/&gt;
Action: Command Prompt (any title)&lt;br/&gt;
Application used to perform action : cmd.exe&lt;br/&gt;

Click all the Ok buttons and your work is done. Now everytime you right click on any folder, you will see the Command Prompt option which you can use to directly go to the command prompt.

&lt;br/&gt;&lt;br/&gt;
&lt;span style="font-weight:bold;"&gt;Note:&lt;span style="font-style:italic;"&gt;&lt;/span&gt;&lt;/span&gt; Instead of choosing ‘Folder’(Open Explorer  -&gt; Tools(menu)  -&gt; Option  -&gt; FileTypes (tab)-&gt; Folder) if you choose ‘File Folder’ you are in for some trouble.
Everytime now you double click a folder, instead of opening it , it will open the command prompt. Now  to solve this problem read point 2) below 

&lt;br/&gt;&lt;br/&gt;
&lt;span style="font-weight:bold;"&gt;2) To change the default action of a right click&lt;/span&gt;
Many times after you add/remove new actions to a right click it may so happen that because of some mistake your default folder behaviour is changed.

In my case every time I double clicked any folder it would open the command prompt (see note in point 1)). This is because some mistake of mine had affected the default behaviour of the folder double click.

Set the HKEY_CLASSES_ROOT\Directory\shell to none and this problem should go away.

&lt;br/&gt;&lt;br/&gt;

&lt;span style="font-weight:bold;"&gt;3) To remove the options added by various software’s when you install them. E.g. Winzip, Winmerge, etc&lt;/span&gt;

You have to delete them from -
HKEY_CLASSES_ROOT\*\shellex\ContextMenuHandlers

&lt;br/&gt;&lt;br/&gt;&lt;div class="blogger-post-footer"&gt;TechnicalBlog&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32943832-5164812132905538789?l=prameelanair.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prameelanair.blogspot.com/feeds/5164812132905538789/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32943832&amp;postID=5164812132905538789&amp;isPopup=true' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32943832/posts/default/5164812132905538789'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32943832/posts/default/5164812132905538789'/><link rel='alternate' type='text/html' href='http://prameelanair.blogspot.com/2008/08/modifying-right-click-in-win-xp.html' title='Modifying the right click in Win XP'/><author><name>Prameela</name><uri>http://www.blogger.com/profile/01285225189046416100</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='19' src='http://1.bp.blogspot.com/_ng9ElICtvac/TAin5dwNdoI/AAAAAAAABlo/76ZK41KYuaw/S220/ATT00023.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32943832.post-5086253044431069064</id><published>2008-05-01T18:19:00.000-07:00</published><updated>2008-05-01T18:21:55.604-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='regular-expressions'/><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><title type='text'>Regular Experssions and Java</title><content type='html'>What happens when you do the following – &lt;br/&gt;

Example 0) &lt;br/&gt;
String str = “someString”; &lt;br/&gt;
str.replaceAll(“*”,”#”);&lt;br/&gt;

&lt;br/&gt;&lt;br/&gt;
The above snippet would replace all ‘*’ characters in the String str by ‘#’, simple, isn’t it?
Well, if it’s so straight why is it here ;)
&lt;br/&gt;&lt;br/&gt;

The replaceAll() API in String class  has the following syntax –
&lt;a href="file:///G:/ProgramFiles/JavaDocs/docs/api/java/lang/String.html#replaceAll%28java.lang.String,%20java.lang.String%29"&gt;replaceAll&lt;/a&gt;(&lt;a title="class in java.lang" href="file:///G:/ProgramFiles/JavaDocs/docs/api/java/lang/String.html"&gt;String&lt;/a&gt; regex, &lt;a title="class in java.lang" href="file:///G:/ProgramFiles/JavaDocs/docs/api/java/lang/String.html"&gt;String&lt;/a&gt; replacement)
&lt;br/&gt;&lt;br/&gt;

Yeah, I hope the term regex caught your attention. The first String is treated as a regular expression by Java and as a result the above snippet gives you a lovely error -
&lt;br/&gt;&lt;br/&gt;

Exception in thread "main" java.util.regex.PatternSyntaxException: Dangling meta character '*' near index 0
&lt;br/&gt;&lt;br/&gt;

Lovely, because it uses the word dangling ;)

&lt;br/&gt;
If you know regular expressions even a little the character ‘*’ has a special meaning – it means zero/more times.
Let’s take some examples so that this is clear
&lt;br/&gt;&lt;br/&gt;
Example  1) &lt;br/&gt;
String str = "the Blue Umbrella is bllue in collor"; &lt;br/&gt;
System.out.println(str.replaceAll("ll*","?")); &lt;br/&gt;
&lt;br/&gt;
Output: the B?ue Umbre?a is b?ue in co?or&lt;br/&gt;

Explanation: the regular expression ll* searches for strings {l, ll, lll,….} etc and the code replaces them with ? &lt;br/&gt;
Note: simple l* will search for {emptyString,  l, ll, lll, ….}
&lt;br/&gt;&lt;br/&gt;

Example  2) &lt;br/&gt;
String str = "the Blue Umbrella is blue in color";&lt;br/&gt;
System.out.println(str.replaceAll("rella.*","???")); &lt;br/&gt;
Output = the Blue Umb??? &lt;br/&gt;
Explanation: ‘.’(dot) means any character, so .* would mean any character zero/more times. Hence everything from rella… gets replaced with ??? &lt;br/&gt;

&lt;br/&gt;&lt;br/&gt;
So in Example 0) to replace * with # you have to tell Java that do not take * in the regular expression term but as it is; so do a str.replaceAll(“\*”,”#”)….just escape your *….thats all!!!!&lt;div class="blogger-post-footer"&gt;TechnicalBlog&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32943832-5086253044431069064?l=prameelanair.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prameelanair.blogspot.com/feeds/5086253044431069064/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32943832&amp;postID=5086253044431069064&amp;isPopup=true' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32943832/posts/default/5086253044431069064'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32943832/posts/default/5086253044431069064'/><link rel='alternate' type='text/html' href='http://prameelanair.blogspot.com/2008/05/regular-experssions-and-java.html' title='Regular Experssions and Java'/><author><name>Prameela</name><uri>http://www.blogger.com/profile/01285225189046416100</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='19' src='http://1.bp.blogspot.com/_ng9ElICtvac/TAin5dwNdoI/AAAAAAAABlo/76ZK41KYuaw/S220/ATT00023.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32943832.post-2851652746404880684</id><published>2008-04-09T18:04:00.000-07:00</published><updated>2008-04-09T18:14:43.212-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='References'/><title type='text'>Java Object References</title><content type='html'>&lt;p&gt;Someone was writing a parser and while unit testing he got bugged because the two lists that he was creating using the same objects was getting modified without he explicitly doing so. After having a look at the code it turned out to be a simple problem. In java, you deal with object references as against objects. So if you have&lt;/p&gt;&lt;p&gt;Object o1 = new Object();
Object o2 = o1;
Object o3 = o1;
You have a single object but 3 references.
//heres a snippet of what my colleague was actually trying to do. He complained that list1 and list2 were getting modified on their own…Really??? Have a look &lt;/p&gt;&lt;p&gt;import java.util.ArrayList;

class Emp
{
private int code;
public Emp(int c)
{
code = c;
}

public void setCode(int c)
{
code = c;
}

public String toString()
{
return ""+code;
} &lt;/p&gt;&lt;p&gt;}
public class References {

public static void main(String[] args)
{
ArrayList&lt;emp&gt; list1 = new ArrayList&lt;emp&gt;();
ArrayList&lt;emp&gt; list2 = new ArrayList&lt;emp&gt;();

Emp e1 = new Emp(100);
Emp e2 = new Emp(200);
Emp e3 = new Emp(300);

list1.add(e1);
list1.add(e2);
list1.add(e3);

list2.add(e1);
list2.add(e2);
list2.add(e3);


System.out.println(list1);
System.out.println(list2);

e2.setCode(900);

System.out.println("--------");
System.out.println(list1);;
System.out.println(list2);
}
}&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt;p.s.  Sorry about teh formatting....this stupid doesnt maintain the format that i write in and i am too lazy to use html tags and google docs is not working....so just pick the snippet and paste in a decent browser. it will work ;)&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;TechnicalBlog&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32943832-2851652746404880684?l=prameelanair.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prameelanair.blogspot.com/feeds/2851652746404880684/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32943832&amp;postID=2851652746404880684&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32943832/posts/default/2851652746404880684'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32943832/posts/default/2851652746404880684'/><link rel='alternate' type='text/html' href='http://prameelanair.blogspot.com/2008/04/someone-was-writing-parser-and-while.html' title='Java Object References'/><author><name>Prameela</name><uri>http://www.blogger.com/profile/01285225189046416100</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='19' src='http://1.bp.blogspot.com/_ng9ElICtvac/TAin5dwNdoI/AAAAAAAABlo/76ZK41KYuaw/S220/ATT00023.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32943832.post-3699929652858155576</id><published>2007-06-07T10:12:00.000-07:00</published><updated>2007-06-07T10:28:15.712-07:00</updated><title type='text'>Reading a file using PL/SQL</title><content type='html'>Alright if the title sounds too infant to match your level I would suggest you skip going ahead because it is indeed not something fantastic. I am into converting some data and storing it as CLOB and the amateur that I am it needed me to do a lot of things before I could get it right. And to begin I had to first write a procedure to read data from a file. And that is what this blog contains.
&lt;br /&gt;
Its got nothing fancy and a simple google would yield the needed info. Then the use of this blog? If thats what you were thinking....Folks googling , you will faind the info distributed. I have tried my best to put everything at one place.
&lt;br /&gt;
&lt;p class="MsoNormal"&gt;   &lt;b style=""&gt;&lt;i style=""&gt;I am assuming an oracle database on a windows machine;&lt;/i&gt;&lt;/b&gt;
 &lt;/p&gt; &lt;p class="MsoNormal"&gt;   The compact algorithm is - &lt;/p&gt; &lt;p class="MsoNormal"&gt;   Step1: Entry in your init.ora file -&gt;&lt;span style="font-family:Wingdings;"&gt;&lt;span style=""&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="txt"&gt;utl_file_dir = dirPath&lt;/span&gt; &lt;/p&gt;  &lt;p class="MsoNormal"&gt;   Step2: Create virtual directory mapping for oracle which points to the actual physical
directory where the files are stored &lt;/p&gt; &lt;p class="MsoNormal"&gt;   Step3: Grant appropriate permissions on the virtual directory. &lt;/p&gt; &lt;p class="MsoNormal"&gt;   Step4: Create the file you would like to read thru PL/SQL, on the physical location &lt;/p&gt;  &lt;p class="MsoNormal"&gt;   Step5: Write a procedure which would use the “utl_file” package of Oracle to read/write
to a file&lt;/p&gt;
&lt;p class="MsoNormal"&gt;To get the details of this algo please click &lt;a href="http://docs.google.com/Doc?id=ddztwnpf_21fk2xhr"&gt;here&lt;/a&gt;
&lt;/p&gt;&lt;p class="MsoNormal"&gt;
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;TechnicalBlog&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32943832-3699929652858155576?l=prameelanair.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prameelanair.blogspot.com/feeds/3699929652858155576/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32943832&amp;postID=3699929652858155576&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32943832/posts/default/3699929652858155576'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32943832/posts/default/3699929652858155576'/><link rel='alternate' type='text/html' href='http://prameelanair.blogspot.com/2007/06/reading-file-using-plsql.html' title='Reading a file using PL/SQL'/><author><name>Prameela</name><uri>http://www.blogger.com/profile/01285225189046416100</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='19' src='http://1.bp.blogspot.com/_ng9ElICtvac/TAin5dwNdoI/AAAAAAAABlo/76ZK41KYuaw/S220/ATT00023.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32943832.post-6039074201179669912</id><published>2007-03-25T07:21:00.000-07:00</published><updated>2007-03-25T07:25:31.595-07:00</updated><title type='text'>Generics</title><content type='html'>Java 1.5 introduced this thing and its nice. Something that helps you to get rid of all ClassCastExceptions. Also it allows you to create better and elegant systems. I have just started off with this and liked it....The negative aspect of generics (if any) havent yet been spotted and i would really like ur comments if u know of anything.
&lt;br /&gt;
Everything about genrics is &lt;a href="http://docs.google.com/Doc?id=ddztwnpf_20cqjbzx"&gt;here&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;TechnicalBlog&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32943832-6039074201179669912?l=prameelanair.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prameelanair.blogspot.com/feeds/6039074201179669912/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32943832&amp;postID=6039074201179669912&amp;isPopup=true' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32943832/posts/default/6039074201179669912'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32943832/posts/default/6039074201179669912'/><link rel='alternate' type='text/html' href='http://prameelanair.blogspot.com/2007/03/generics.html' title='Generics'/><author><name>Prameela</name><uri>http://www.blogger.com/profile/01285225189046416100</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='19' src='http://1.bp.blogspot.com/_ng9ElICtvac/TAin5dwNdoI/AAAAAAAABlo/76ZK41KYuaw/S220/ATT00023.jpg'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32943832.post-6615829373997390758</id><published>2007-03-21T00:36:00.000-07:00</published><updated>2007-03-21T00:41:13.755-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='YUI'/><category scheme='http://www.blogger.com/atom/ns#' term='reusability'/><title type='text'>YUI</title><content type='html'>All web developers would be glad for this to Yahoo. Distributed under the BSD Yahoo User Interface(YUI) library is a set of controls and utilities to develop rich web applications.
The scoring point apart from the fact that we need not reinvent the wheel is its rich documentation which is generally the bane of most shared projects.

So next time, you want a calendar control first go to YUI and check if they have already done your work. It's easy and really good.

Click &lt;a href="http://developer.yahoo.com/yui/"&gt;here &lt;/a&gt;to know more&lt;div class="blogger-post-footer"&gt;TechnicalBlog&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32943832-6615829373997390758?l=prameelanair.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prameelanair.blogspot.com/feeds/6615829373997390758/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32943832&amp;postID=6615829373997390758&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32943832/posts/default/6615829373997390758'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32943832/posts/default/6615829373997390758'/><link rel='alternate' type='text/html' href='http://prameelanair.blogspot.com/2007/03/yui.html' title='YUI'/><author><name>Prameela</name><uri>http://www.blogger.com/profile/01285225189046416100</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='19' src='http://1.bp.blogspot.com/_ng9ElICtvac/TAin5dwNdoI/AAAAAAAABlo/76ZK41KYuaw/S220/ATT00023.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32943832.post-2102930274856067592</id><published>2007-02-20T02:40:00.000-08:00</published><updated>2007-02-20T02:49:06.912-08:00</updated><title type='text'>An interesting problem</title><content type='html'>&lt;p class="MsoNormal"&gt;An interesting problem that someone had asked me -&lt;o:p&gt;
&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;You have a set of 300 pages that are numbered with you. The pages are in any random order. Suddenly the window opens and a single page flies out(don’t ask me why only a single page :P). Now the rule says that you can go thru the numbered pages exactly once and you can’t jot down the page numbers anywhere. How would you find the missing page number&lt;span style="font-style: italic;"&gt;?&lt;/span&gt;&lt;/p&gt;  &lt;p style="font-style: italic;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;      &lt;p class="MsoNormal"&gt;&lt;span style="font-style: italic;"&gt;Solution:&lt;/span&gt; Let’s generalize the problem to ‘n’ pages. Find the sum of 1 to n. Call this x.
Now as you can go thru the pages exactly once calculate the total of the page numbers as you go thru them. Call this total y.
The missing page is obviously x – y;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;TechnicalBlog&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32943832-2102930274856067592?l=prameelanair.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prameelanair.blogspot.com/feeds/2102930274856067592/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32943832&amp;postID=2102930274856067592&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32943832/posts/default/2102930274856067592'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32943832/posts/default/2102930274856067592'/><link rel='alternate' type='text/html' href='http://prameelanair.blogspot.com/2007/02/interesting-problem.html' title='An interesting problem'/><author><name>Prameela</name><uri>http://www.blogger.com/profile/01285225189046416100</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='19' src='http://1.bp.blogspot.com/_ng9ElICtvac/TAin5dwNdoI/AAAAAAAABlo/76ZK41KYuaw/S220/ATT00023.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32943832.post-5028010394157874251</id><published>2007-01-17T00:35:00.000-08:00</published><updated>2007-01-17T00:40:18.859-08:00</updated><title type='text'>Event Delegation Model explained</title><content type='html'>Event delegation model for Java was a good design as against the  previous 1.0 model that SUN had come up with.But as is the case with all design models/patterns we need to understand it properly to utilize the model/pattern as it was intended by the creator. My attempt to explain to a junior why the event-delegation model is better over its counterpart. Takes a very simple example to understand the model.
&lt;br /&gt;&lt;br /&gt;

Click &lt;a href="http://docs.google.com/View?docid=ddztwnpf_18dx28md&amp;amp;revision=_published"&gt;here &lt;/a&gt;for the document.

&lt;br /&gt;&lt;br /&gt;

For detailed info on the same plzz visit the SUN link &lt;a href="http://java.sun.com/j2se/1.3/docs/guide/awt/designspec/events.html"&gt;here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;TechnicalBlog&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32943832-5028010394157874251?l=prameelanair.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prameelanair.blogspot.com/feeds/5028010394157874251/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32943832&amp;postID=5028010394157874251&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32943832/posts/default/5028010394157874251'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32943832/posts/default/5028010394157874251'/><link rel='alternate' type='text/html' href='http://prameelanair.blogspot.com/2007/01/event-delegation-model-explained.html' title='Event Delegation Model explained'/><author><name>Prameela</name><uri>http://www.blogger.com/profile/01285225189046416100</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='19' src='http://1.bp.blogspot.com/_ng9ElICtvac/TAin5dwNdoI/AAAAAAAABlo/76ZK41KYuaw/S220/ATT00023.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32943832.post-6934007789268890446</id><published>2007-01-10T00:57:00.000-08:00</published><updated>2007-01-10T01:04:21.273-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JDBC'/><title type='text'>First step towards JDBC</title><content type='html'>A junior asked me a few doubts about JDBC and while clearing his doubts i realized that there were many things that i had overlooked while learning about JDBC myself. So the reasearch that went behind why-somethings-are-done-the-way-they-are  saw me uploading a new document that specifies the first step towarsd JDBC.
&lt;br /&gt;&lt;br /&gt;

The document is in an algorithmic form and just tells u the reasons behind the order of calls of the JDBC API's. It stops when u have created a Statement and can fire queries, essentially the point where SQL queries take over JAVA. How to fire queries, ect would soon be appended to the document.
&lt;br /&gt;&lt;br /&gt;

The document can be viewed &lt;a href="http://docs.google.com/View?docid=ddztwnpf_17fv2pbz"&gt;here&lt;/a&gt;

&lt;br /&gt;&lt;br /&gt;
&lt;i&gt;Everytime i upload a document I dont forget to say thanx to google. Its made   sharing of docs/ideas so much easier&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;TechnicalBlog&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32943832-6934007789268890446?l=prameelanair.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prameelanair.blogspot.com/feeds/6934007789268890446/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32943832&amp;postID=6934007789268890446&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32943832/posts/default/6934007789268890446'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32943832/posts/default/6934007789268890446'/><link rel='alternate' type='text/html' href='http://prameelanair.blogspot.com/2007/01/first-step-towards-jdbc.html' title='First step towards JDBC'/><author><name>Prameela</name><uri>http://www.blogger.com/profile/01285225189046416100</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='19' src='http://1.bp.blogspot.com/_ng9ElICtvac/TAin5dwNdoI/AAAAAAAABlo/76ZK41KYuaw/S220/ATT00023.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32943832.post-773380243563740292</id><published>2007-01-04T01:45:00.000-08:00</published><updated>2007-01-04T01:52:05.971-08:00</updated><title type='text'>Using Eclipse to create a web-based project</title><content type='html'>A little curiousity and self study saw me installing eclipse 3.1 and executing my web-pages thru it.  To execute just  a normal html page I had to do a lot of settings and that was a reason enough to write a doc to help out the newbies.
&lt;br /&gt;
&lt;br /&gt;
The doc has been uploaded on net and can be accessed &lt;a href="http://docs.google.com/View?docid=ddztwnpf_7dsx3r6"&gt;here &lt;/a&gt;
&lt;br /&gt;
&lt;br /&gt;



Incase you want me to add/modify anything do lemme know.


&lt;em&gt;&lt;span style="font-size:12;"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shapetype id="_x0000_t75" coordsize="21600,21600" spt="75" preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f"&gt;  &lt;v:stroke joinstyle="miter"&gt;  &lt;v:formulas&gt;   &lt;v:f eqn="if lineDrawn pixelLineWidth 0"&gt;   &lt;v:f eqn="sum @0 1 0"&gt;   &lt;v:f eqn="sum 0 0 @1"&gt;   &lt;v:f eqn="prod @2 1 2"&gt;   &lt;v:f eqn="prod @3 21600 pixelWidth"&gt;   &lt;v:f eqn="prod @3 21600 pixelHeight"&gt;   &lt;v:f eqn="sum @0 0 1"&gt;   &lt;v:f eqn="prod @6 1 2"&gt;   &lt;v:f eqn="prod @7 21600 pixelWidth"&gt;   &lt;v:f eqn="sum @8 21600 0"&gt;   &lt;v:f eqn="prod @7 21600 pixelHeight"&gt;   &lt;v:f eqn="sum @10 21600 0"&gt;  &lt;/v:formulas&gt;  &lt;v:path extrusionok="f" gradientshapeok="t" connecttype="rect"&gt;  &lt;o:lock ext="edit" aspectratio="t"&gt; &lt;/v:shapetype&gt;&lt;v:shape id="_x0000_i1025" type="#_x0000_t75" style="'width:230.25pt;"&gt;  &lt;v:imagedata src="file:///C:\DOCUME~1\PRAMEE~1\LOCALS~1\Temp\msohtml1\01\clip_image001.png" title=""&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;/span&gt;&lt;/em&gt;&lt;div class="blogger-post-footer"&gt;TechnicalBlog&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32943832-773380243563740292?l=prameelanair.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prameelanair.blogspot.com/feeds/773380243563740292/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32943832&amp;postID=773380243563740292&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32943832/posts/default/773380243563740292'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32943832/posts/default/773380243563740292'/><link rel='alternate' type='text/html' href='http://prameelanair.blogspot.com/2007/01/using-eclipse-to-create-web-based.html' title='Using Eclipse to create a web-based project'/><author><name>Prameela</name><uri>http://www.blogger.com/profile/01285225189046416100</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='19' src='http://1.bp.blogspot.com/_ng9ElICtvac/TAin5dwNdoI/AAAAAAAABlo/76ZK41KYuaw/S220/ATT00023.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32943832.post-8918487327128763131</id><published>2006-12-25T01:48:00.000-08:00</published><updated>2006-12-25T01:50:40.803-08:00</updated><title type='text'>:)</title><content type='html'>The last blog told u about my repeated failed attempts to try and publis my blog about ANTs. Google docs came to my rescue and here i am publishing my document online

Visit  &lt;a class="tabcontent" target="_blank" href="http://docs.google.com/View?docid=ddztwnpf_0fzwb69"&gt;http://docs.google.com/View?docid=ddztwnpf_0fzwb69&lt;/a&gt; to access the document.

havent yet figured out how to publish a blog directly using the docs but will do it soon.&lt;div class="blogger-post-footer"&gt;TechnicalBlog&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32943832-8918487327128763131?l=prameelanair.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prameelanair.blogspot.com/feeds/8918487327128763131/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32943832&amp;postID=8918487327128763131&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32943832/posts/default/8918487327128763131'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32943832/posts/default/8918487327128763131'/><link rel='alternate' type='text/html' href='http://prameelanair.blogspot.com/2006/12/blog-post_25.html' title=':)'/><author><name>Prameela</name><uri>http://www.blogger.com/profile/01285225189046416100</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='19' src='http://1.bp.blogspot.com/_ng9ElICtvac/TAin5dwNdoI/AAAAAAAABlo/76ZK41KYuaw/S220/ATT00023.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32943832.post-1227922944179136111</id><published>2006-12-25T01:15:00.000-08:00</published><updated>2006-12-25T01:19:53.711-08:00</updated><title type='text'>:(</title><content type='html'>Had written a blog offline to expalin the working of ANT. Since i had added a few examples which used XML formatting, the data is not shown correctly when i use it here. the browser messes up the XML completely inspite of me replacing '&lt;' and '&gt;'.
The blog still resides on my machine unpublished. If someone could tell me the way out i would be grateful :)&lt;div class="blogger-post-footer"&gt;TechnicalBlog&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32943832-1227922944179136111?l=prameelanair.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prameelanair.blogspot.com/feeds/1227922944179136111/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32943832&amp;postID=1227922944179136111&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32943832/posts/default/1227922944179136111'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32943832/posts/default/1227922944179136111'/><link rel='alternate' type='text/html' href='http://prameelanair.blogspot.com/2006/12/blog-post.html' title=':('/><author><name>Prameela</name><uri>http://www.blogger.com/profile/01285225189046416100</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='19' src='http://1.bp.blogspot.com/_ng9ElICtvac/TAin5dwNdoI/AAAAAAAABlo/76ZK41KYuaw/S220/ATT00023.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32943832.post-116495014231975342</id><published>2006-11-30T21:14:00.000-08:00</published><updated>2006-11-30T21:15:42.330-08:00</updated><title type='text'></title><content type='html'>Once upon a time I had studied RMI. Had implemented it too for my project purpose, but as is the case with many of our academic projects there was no proper design approach for using RMI. This time its not going to be so. I need to go through the entire concept theoretically as well as practically which would be my task over the weekend. Would write about it soon….&lt;div class="blogger-post-footer"&gt;TechnicalBlog&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32943832-116495014231975342?l=prameelanair.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prameelanair.blogspot.com/feeds/116495014231975342/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32943832&amp;postID=116495014231975342&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32943832/posts/default/116495014231975342'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32943832/posts/default/116495014231975342'/><link rel='alternate' type='text/html' href='http://prameelanair.blogspot.com/2006/11/once-upon-time-i-had-studied-rmi.html' title=''/><author><name>Prameela</name><uri>http://www.blogger.com/profile/01285225189046416100</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='19' src='http://1.bp.blogspot.com/_ng9ElICtvac/TAin5dwNdoI/AAAAAAAABlo/76ZK41KYuaw/S220/ATT00023.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32943832.post-116418167988117871</id><published>2006-11-21T23:47:00.000-08:00</published><updated>2007-02-08T01:07:21.103-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='RTTI - Java'/><title type='text'>Java and runtime identification</title><content type='html'>Because of the age old problem associated with xml-code and browser interpreatation of it this blog has been moved to a Google Document that can be accessed &lt;a href="http://docs.google.com/View?docid=ddztwnpf_19hck73h&amp;amp;revision=_published"&gt;here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;TechnicalBlog&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32943832-116418167988117871?l=prameelanair.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prameelanair.blogspot.com/feeds/116418167988117871/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32943832&amp;postID=116418167988117871&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32943832/posts/default/116418167988117871'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32943832/posts/default/116418167988117871'/><link rel='alternate' type='text/html' href='http://prameelanair.blogspot.com/2006/11/java-and-runtime-identification.html' title='Java and runtime identification'/><author><name>Prameela</name><uri>http://www.blogger.com/profile/01285225189046416100</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='19' src='http://1.bp.blogspot.com/_ng9ElICtvac/TAin5dwNdoI/AAAAAAAABlo/76ZK41KYuaw/S220/ATT00023.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32943832.post-116313518245719932</id><published>2006-11-09T21:02:00.000-08:00</published><updated>2006-11-09T21:06:22.470-08:00</updated><title type='text'>Some SCJP tips</title><content type='html'>Some SCJP oriented Java tips -

1) U can never make a non-static reference from a static reference.  So check for non static calls from main()

2) You can have a method name with the same name as that of the class and returns a value. Its perfectly acceptable. Its just that they would obviously not be the constructors. Take care for such methods

3) widening conversions are always acceptable. narrowing are never acceptable, hence, all narrowing conversions require an explicit cast. Short hand assignment operators make this by default.
e.g. 
 int i = 10;
 short s =  i; //compiletime error

 int k = 10;
 short s;
 s+= k ; //acceptable because this short hand conversion actually is s = (byte) (s+i)


 short s = 10; //perfectly legal as integer literals withing byte range can be directly     assigned

4)Garbage collection can never ever be forced . You can request it thru’ System.gc() or Runtime.getRuntime.gc(). 

5) The garbage collector is a low priority daemon thread that’s platform dependent. In fact Threads &amp; Garbage collection are the only 2 things in Java that are platform dependent.

6) For method Overloading you need to consider only the method name and parameter types. For over-riding you need to consider method name, parameters, return type and exception list.

e.g.
class Q7
{
 
 public int hello(){return 4;}
}

public class Question7 extends Q7
{
 public long hello(){return 5;}
 //compile time error for above ‘coz return type diff

 public long hello(String s){return 5;}
 //Perfectly legal ‘coz this becomes Overloading and not over riding
}
7) Throwing a Runtime Exception and/or Error is equivalent to not throwing an exception because RuntimeException and Error (and their sub classes) are unchecked exceptions.

8) legal identifiers in Java are of the form [$/[A-Z]/[a-z]/_]{ $/[A-Z]/[a-z]/_/[0-9]}*

9) String String = “String” //legal
   You could always use a class name, method name as legal identifiers.
  I never knew the compiler was so smart ;)

10) switch(a)  ;// a is byte/short/char/int and nothing else

11)The bitwise operators &amp; and | are not short circuited ever. so the two operands are always evaluated as against &amp;&amp; and || where the second operand may/not be evaluated

12)For positive value &gt;&gt; and &gt;&gt;&gt; yields the same result
  U better learn the shift operators in and out. There’s much more to    
  it which being an application developer I missed.



That’s it folks. I could go on and on if I keep writing but these were the first few and important ones that I learnt myself and hence thought of sharing. I promise to cover things section wise in one of my soon to arrive blogs ;)

One of my friends too has shared some handy tips which you would like to go thru’. Click &lt;a href="http://pappul.blogspot.com/2006/10/mission-scjp-accomplished.html"&gt;here&lt;/a&gt;

It feels good when you work hard and ur efforts pay off but it feels better when you realize you have gained more knowledge because you just were eager to learn more(this time no university bothered me with deadlines for my exam).....Cheers&lt;div class="blogger-post-footer"&gt;TechnicalBlog&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32943832-116313518245719932?l=prameelanair.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prameelanair.blogspot.com/feeds/116313518245719932/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32943832&amp;postID=116313518245719932&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32943832/posts/default/116313518245719932'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32943832/posts/default/116313518245719932'/><link rel='alternate' type='text/html' href='http://prameelanair.blogspot.com/2006/11/some-scjp-tips.html' title='Some SCJP tips'/><author><name>Prameela</name><uri>http://www.blogger.com/profile/01285225189046416100</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='19' src='http://1.bp.blogspot.com/_ng9ElICtvac/TAin5dwNdoI/AAAAAAAABlo/76ZK41KYuaw/S220/ATT00023.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32943832.post-116074130710174828</id><published>2006-10-13T05:07:00.000-07:00</published><updated>2006-10-13T05:08:27.113-07:00</updated><title type='text'>Learning (-) the way of life</title><content type='html'>I sometimes wonder what is it about criticism that scares us all. Why do we feel scared to say something just for the fear of being ridiculed? Wasn’t the person who kept on pestering the teacher with questions considered a snob during school days? As the school days pass and you enter the so called matured forms of schooling, the snob is replaced by the words - highly inquisitive’. 

I remember reading a friend’s blog where he mentioned that the basic problem that’s hindering the growth of mankind is ‘Failure to accept responsibility’. Somehow I connected to the statement immediately. People are scared to accept responsibility and that is what is leading to ever deteriorating standards of living. I have myself never escaped this situation, but when I realized that standing up for what you did/thought, is half the battle won, I changed my approach. Never be scared of critics, for they only help you make yourself better. Their criticism should be seen as an opportunity to help your individual growth. At the same time remember never to become the critic and take up the role of demoralizing the inquisitive lot. You may ask them to hunt for answers to their queries but never ever ridicule a question.  Remember there are never stupid questions only stupid people.

In the IT world you will often come across Gurus – as the intimidated call them. You will have a Java guru who can solve your EJB, servlet problems in a second or a UNIX guru who can fix up your UNIX based system in a jiffy. I have myself met many of them but I refuse to call them gurus for the simple reason that these brilliant people are learners all their life and that is what makes them better than the others. I am sure if probed deeper, all of them would confide their scare of criticism which they overcame when they decided to better themselves.

So the next time you are scared to open your mouth, I suggest you think about your overall growth than the momentary ridicule , the fear would automatically give way to the eagerness of knowing/learning something new.

&lt;span style="font-style:italic;"&gt;Welcome to the world of learners!!!!&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;TechnicalBlog&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32943832-116074130710174828?l=prameelanair.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prameelanair.blogspot.com/feeds/116074130710174828/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32943832&amp;postID=116074130710174828&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32943832/posts/default/116074130710174828'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32943832/posts/default/116074130710174828'/><link rel='alternate' type='text/html' href='http://prameelanair.blogspot.com/2006/10/learning-way-of-life.html' title='Learning (-) the way of life'/><author><name>Prameela</name><uri>http://www.blogger.com/profile/01285225189046416100</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='19' src='http://1.bp.blogspot.com/_ng9ElICtvac/TAin5dwNdoI/AAAAAAAABlo/76ZK41KYuaw/S220/ATT00023.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32943832.post-115943830642662949</id><published>2006-09-28T03:11:00.000-07:00</published><updated>2006-09-28T03:11:46.443-07:00</updated><title type='text'>Thoughts....</title><content type='html'>Newton once said, ``If others would think as hard as I did, then they would get similar results". If it was awfully humble of him to say so, I think u should re-read it again.
That’s what is fascinating about life and computers (that’s not a good analogy, but couldn’t resist it :D). You would get results if u think. In the beginning u may need time but as u learn to think u also learn what to think. And at no point should u cease being ignorant.

&lt;span style="font-style:italic;"&gt;That was just a self help tip &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;TechnicalBlog&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32943832-115943830642662949?l=prameelanair.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prameelanair.blogspot.com/feeds/115943830642662949/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32943832&amp;postID=115943830642662949&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32943832/posts/default/115943830642662949'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32943832/posts/default/115943830642662949'/><link rel='alternate' type='text/html' href='http://prameelanair.blogspot.com/2006/09/thoughts.html' title='Thoughts....'/><author><name>Prameela</name><uri>http://www.blogger.com/profile/01285225189046416100</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='19' src='http://1.bp.blogspot.com/_ng9ElICtvac/TAin5dwNdoI/AAAAAAAABlo/76ZK41KYuaw/S220/ATT00023.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32943832.post-115804427666108853</id><published>2006-09-11T23:56:00.000-07:00</published><updated>2006-09-11T23:57:56.670-07:00</updated><title type='text'>File creation date and Java</title><content type='html'>Sometimes u give such weird replies to questions.
A friend came to me and asked "Whats the easiest way to find the file creation date in Java" I looked at him and answered "Go check the File class, they will surely have some API". He grinned and said, "If they had, would i have asked you?".
Its only then i realized there isnt a default API to get the creation time of a file in Java although u do have an API for file modification time.

That got me into the thinking mode and i wrote a small code to get the creation time. All i did was to exec the command prompt and fire dir 'filename' /tc on the 'exec'ed process. The output was captured thru an inputStream and corresponding line tokenized to retrieve the date and time. Not a very neat way BUT it is one way ;)

It was a small code but it made me realize - N&lt;span style="font-style:italic;"&gt;ever assume Java being a HLL does everything for you :P&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;TechnicalBlog&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32943832-115804427666108853?l=prameelanair.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prameelanair.blogspot.com/feeds/115804427666108853/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32943832&amp;postID=115804427666108853&amp;isPopup=true' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32943832/posts/default/115804427666108853'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32943832/posts/default/115804427666108853'/><link rel='alternate' type='text/html' href='http://prameelanair.blogspot.com/2006/09/file-creation-date-and-java.html' title='File creation date and Java'/><author><name>Prameela</name><uri>http://www.blogger.com/profile/01285225189046416100</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='19' src='http://1.bp.blogspot.com/_ng9ElICtvac/TAin5dwNdoI/AAAAAAAABlo/76ZK41KYuaw/S220/ATT00023.jpg'/></author><thr:total>5</thr:total></entry></feed>
