<?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-8248064105559402376</id><updated>2011-04-21T12:23:04.711-07:00</updated><category term='AD HOC'/><category term='WINDOWS'/><category term='TCP/IP'/><category term='SQL'/><category term='JAVA'/><category term='Tech Life'/><category term='QA'/><title type='text'>About Techs</title><subtitle type='html'>This blog focus on all the techs I used, studied, researched, even touched.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://maggie-zhou.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8248064105559402376/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://maggie-zhou.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Maggie Zhou</name><uri>http://www.blogger.com/profile/07771044397884684418</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_p_6KRGlK6fY/SM2vDJf4vTI/AAAAAAAAE6w/5MRpQYD_ogo/S220/y1p2sW1F1UDZ1csoTymKJV4rl3ASE4im1y9u9o3NUwG69FCG9rdDey5lIDa5pF1U8W_6NyQHK9gEIk.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>12</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8248064105559402376.post-5837628807108435887</id><published>2008-11-18T15:15:00.000-08:00</published><updated>2008-11-18T15:22:53.966-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JAVA'/><title type='text'>Reference variable vs. Real object</title><content type='html'>This example shows what happens for the instance method, static method, variable in the inheritance.&lt;br /&gt;&lt;br /&gt;======================== Code ======================== &lt;br /&gt;public class Sub extends Super{ &lt;br /&gt;&lt;br /&gt; int x = 15;&lt;br /&gt; static int y = 25;&lt;br /&gt; public static void main(String args[]){&lt;br /&gt;&lt;br /&gt;       //super reference and super object&lt;br /&gt;              Super t = new Super();&lt;br /&gt;       out.println(t.x + " " + t.y);&lt;br /&gt;       t.methodOne();&lt;br /&gt;       t.methodTwo();&lt;br /&gt;&lt;br /&gt;              //super reference and sub object&lt;br /&gt;       Super ts = new Sub ();&lt;br /&gt;       out.println(ts.x + " " + ts.y);&lt;br /&gt;       ts.methodOne();&lt;br /&gt;       ts.methodTwo();      &lt;br /&gt;&lt;br /&gt;       //sub reference and sub object&lt;br /&gt;       Sub s = new Sub();&lt;br /&gt;       out.println(s.x + " " + s.y);&lt;br /&gt;       s.methodOne();&lt;br /&gt;       s.methodTwo();    &lt;br /&gt; }&lt;br /&gt; static void methodOne() {out.println("Sub methodOne()");}&lt;br /&gt; void methodTwo() {&lt;br /&gt;  out.println("Sub methodTwo()");&lt;br /&gt;  methodOne(); &lt;br /&gt; }&lt;br /&gt;} &lt;br /&gt;&lt;br /&gt;class Super{&lt;br /&gt; int x = 10;&lt;br /&gt; static int y = 20;&lt;br /&gt; static void methodOne() {out.println("Super methodOne()");}&lt;br /&gt; void methodTwo() {&lt;br /&gt;  out.println("Super methodTwo()");&lt;br /&gt;  methodOne(); &lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;================================================ &lt;br /&gt;&lt;br /&gt;======================== Answer ======================== &lt;br /&gt;10 20&lt;br /&gt;A methodOne()&lt;br /&gt;A methodTwo()&lt;br /&gt;A methodOne()&lt;br /&gt;10 20&lt;br /&gt;A methodOne()&lt;br /&gt;B methodTwo()&lt;br /&gt;B methodOne()&lt;br /&gt;15 25&lt;br /&gt;B methodOne()&lt;br /&gt;B methodTwo()&lt;br /&gt;B methodOne()&lt;br /&gt;================================================ &lt;br /&gt;&lt;br /&gt;======================== Conclusion ======================== &lt;br /&gt;static methods and variables are based on the reference type&lt;br /&gt;Real object type determines which overridden method is used at runtime&lt;br /&gt;================================================&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8248064105559402376-5837628807108435887?l=maggie-zhou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maggie-zhou.blogspot.com/feeds/5837628807108435887/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8248064105559402376&amp;postID=5837628807108435887' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8248064105559402376/posts/default/5837628807108435887'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8248064105559402376/posts/default/5837628807108435887'/><link rel='alternate' type='text/html' href='http://maggie-zhou.blogspot.com/2008/11/reference-variable-vs-real-object.html' title='Reference variable vs. Real object'/><author><name>Maggie Zhou</name><uri>http://www.blogger.com/profile/07771044397884684418</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_p_6KRGlK6fY/SM2vDJf4vTI/AAAAAAAAE6w/5MRpQYD_ogo/S220/y1p2sW1F1UDZ1csoTymKJV4rl3ASE4im1y9u9o3NUwG69FCG9rdDey5lIDa5pF1U8W_6NyQHK9gEIk.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8248064105559402376.post-6819960310535405971</id><published>2008-11-11T17:01:00.001-08:00</published><updated>2008-11-11T17:39:13.559-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JAVA'/><title type='text'>SCJP</title><content type='html'>Those are my study note of the SCJP. I used those notes to prepare the SCJP exam. Wish myself have luck for the exam.&lt;br /&gt;&lt;br /&gt;&lt;object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="481" height="402" id="player"&gt;&lt;param name="movie" value="http://www.authorstream.com/player.swf?p=106528_633620274796746250" /&gt;&lt;param name="allowfullscreen" value="true" /&gt;&lt;param name="allowScriptAccess" value="always"/&gt;&lt;embed src="http://www.authorstream.com/player.swf?p=106528_633620274796746250" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="481" height="402"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br&gt;&lt;font size='2'&gt;Uploaded on authorSTREAM by &lt;a href="http://www.authorstream.com/User-Presentations/maggie.zhou/" target="_blank" title="More presentations by maggie.zhou on authorSTREAM"&gt;maggie.zhou&lt;/a&gt;&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="481" height="402" id="player"&gt;&lt;param name="movie" value="http://www.authorstream.com/player.swf?p=106521_633620272994246250" /&gt;&lt;param name="allowfullscreen" value="true" /&gt;&lt;param name="allowScriptAccess" value="always"/&gt;&lt;embed src="http://www.authorstream.com/player.swf?p=106521_633620272994246250" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="481" height="402"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br&gt;&lt;font size='2'&gt;Uploaded on authorSTREAM by &lt;a href="http://www.authorstream.com/User-Presentations/maggie.zhou/" target="_blank" title="More presentations by maggie.zhou on authorSTREAM"&gt;maggie.zhou&lt;/a&gt;&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="481" height="402" id="player"&gt;&lt;param name="movie" value="http://www.authorstream.com/player.swf?p=106522_633620273295340000" /&gt;&lt;param name="allowfullscreen" value="true" /&gt;&lt;param name="allowScriptAccess" value="always"/&gt;&lt;embed src="http://www.authorstream.com/player.swf?p=106522_633620273295340000" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="481" height="402"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br&gt;&lt;font size='2'&gt;Uploaded on authorSTREAM by &lt;a href="http://www.authorstream.com/User-Presentations/maggie.zhou/" target="_blank" title="More presentations by maggie.zhou on authorSTREAM"&gt;maggie.zhou&lt;/a&gt;&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="481" height="402" id="player"&gt;&lt;param name="movie" value="http://www.authorstream.com/player.swf?p=106524_633620273594246250" /&gt;&lt;param name="allowfullscreen" value="true" /&gt;&lt;param name="allowScriptAccess" value="always"/&gt;&lt;embed src="http://www.authorstream.com/player.swf?p=106524_633620273594246250" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="481" height="402"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br&gt;&lt;font size='2'&gt;Uploaded on authorSTREAM by &lt;a href="http://www.authorstream.com/User-Presentations/maggie.zhou/" target="_blank" title="More presentations by maggie.zhou on authorSTREAM"&gt;maggie.zhou&lt;/a&gt;&lt;/font&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8248064105559402376-6819960310535405971?l=maggie-zhou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maggie-zhou.blogspot.com/feeds/6819960310535405971/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8248064105559402376&amp;postID=6819960310535405971' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8248064105559402376/posts/default/6819960310535405971'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8248064105559402376/posts/default/6819960310535405971'/><link rel='alternate' type='text/html' href='http://maggie-zhou.blogspot.com/2008/11/scjp.html' title='SCJP'/><author><name>Maggie Zhou</name><uri>http://www.blogger.com/profile/07771044397884684418</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_p_6KRGlK6fY/SM2vDJf4vTI/AAAAAAAAE6w/5MRpQYD_ogo/S220/y1p2sW1F1UDZ1csoTymKJV4rl3ASE4im1y9u9o3NUwG69FCG9rdDey5lIDa5pF1U8W_6NyQHK9gEIk.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8248064105559402376.post-4451361681680938009</id><published>2008-11-10T13:52:00.001-08:00</published><updated>2008-11-10T15:09:14.622-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='QA'/><title type='text'>SQA</title><content type='html'>To understand what SQA doing, I create this note. The SQA is not same as quality control, it isn't testing. It is a process control to ensure the quality of software products. Hope my slides can explain the above points with details.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" id="player" width="481" height="402"&gt;&lt;param name="movie" value="http://www.authorstream.com/player.swf?p=105765_633619278686468949"&gt;&lt;param name="allowfullscreen" value="true"&gt;&lt;param name="allowScriptAccess" value="always"&gt;&lt;embed src="http://www.authorstream.com/player.swf?p=105765_633619278686468949" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="481" height="402"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;Uploaded on authorSTREAM by &lt;a href="http://www.authorstream.com/User-Presentations/maggie.zhou/" target="_blank" title="More presentations by maggie.zhou on authorSTREAM"&gt;maggie.zhou&lt;/a&gt;&lt;/span&gt;&lt;img style="visibility: hidden; width: 0px; height: 0px;" src="http://counters.gigya.com/wildfire/IMP/CXNID=2000002.0NXC/bHQ9MTIyNjM1Mzg3NDM*MyZwdD*xMjI2MzUzOTI3OTUzJnA9MjEzNDQxJmQ9Jm49YmxvZ2dlciZnPTEmdD*mbz*5NzNkZTUzNjhhOTE*MTc*YjA4NGNmZmYwMmMyZWYzZg==.gif" width="0" border="0" height="0" /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8248064105559402376-4451361681680938009?l=maggie-zhou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maggie-zhou.blogspot.com/feeds/4451361681680938009/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8248064105559402376&amp;postID=4451361681680938009' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8248064105559402376/posts/default/4451361681680938009'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8248064105559402376/posts/default/4451361681680938009'/><link rel='alternate' type='text/html' href='http://maggie-zhou.blogspot.com/2008/11/sqa.html' title='SQA'/><author><name>Maggie Zhou</name><uri>http://www.blogger.com/profile/07771044397884684418</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_p_6KRGlK6fY/SM2vDJf4vTI/AAAAAAAAE6w/5MRpQYD_ogo/S220/y1p2sW1F1UDZ1csoTymKJV4rl3ASE4im1y9u9o3NUwG69FCG9rdDey5lIDa5pF1U8W_6NyQHK9gEIk.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8248064105559402376.post-5173181008522679580</id><published>2008-10-28T21:48:00.001-07:00</published><updated>2008-11-10T15:09:40.245-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>SQL</title><content type='html'>One of my study notes about SQL. It covers all the concepts about SQL syntax, database design, query, etc.&lt;br /&gt;&lt;br /&gt;&lt;object id="player" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="481" height="402"&gt;&lt;param name="_cx" value="10181"&gt;&lt;param name="_cy" value="8509"&gt;&lt;param name="FlashVars" value=""&gt;&lt;param name="Movie" value="http://www.authorstream.com/player.swf?p=100890_633608325477500000"&gt;&lt;param name="Src" value="http://www.authorstream.com/player.swf?p=100890_633608325477500000"&gt;&lt;param name="WMode" value="Window"&gt;&lt;param name="Play" value="-1"&gt;&lt;param name="Loop" value="-1"&gt;&lt;param name="Quality" value="High"&gt;&lt;param name="SAlign" value=""&gt;&lt;param name="Menu" value="-1"&gt;&lt;param name="Base" value=""&gt;&lt;param name="AllowScriptAccess" value="always"&gt;&lt;param name="Scale" value="ShowAll"&gt;&lt;param name="DeviceFont" value="0"&gt;&lt;param name="EmbedMovie" value="0"&gt;&lt;param name="BGColor" value=""&gt;&lt;param name="SWRemote" value=""&gt;&lt;param name="MovieData" value=""&gt;&lt;param name="SeamlessTabbing" value="1"&gt;&lt;param name="Profile" value="0"&gt;&lt;param name="ProfileAddress" value=""&gt;&lt;param name="ProfilePort" value="0"&gt;&lt;param name="AllowNetworking" value="all"&gt;&lt;param name="AllowFullScreen" value="true"&gt;&lt;embed src="http://www.authorstream.com/player.swf?p=100890_633608325477500000" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="481" height="402"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;Uploaded on authorSTREAM by &lt;a title="More presentations by maggie.zhou on authorSTREAM" href="http://www.authorstream.com/User-Presentations/maggie.zhou/" target="_blank"&gt;maggie.zhou&lt;/a&gt;&lt;/span&gt;&lt;img style="visibility: hidden; width: 0px; height: 0px;" src="http://counters.gigya.com/wildfire/IMP/CXNID=2000002.0NXC/bHQ9MTIyNTI1NTY4Njc1MCZwdD*xMjI1MjU1NzA*OTUzJnA9MjEzNDQxJmQ9Jm49YmxvZ2dlciZnPTEmdD*mbz1hZTVmMTk3ZmQ3Mjg*NzdjOGM2OTdkMjRjMTU*ODk5YQ==.gif" width="0" border="0" height="0" /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8248064105559402376-5173181008522679580?l=maggie-zhou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maggie-zhou.blogspot.com/feeds/5173181008522679580/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8248064105559402376&amp;postID=5173181008522679580' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8248064105559402376/posts/default/5173181008522679580'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8248064105559402376/posts/default/5173181008522679580'/><link rel='alternate' type='text/html' href='http://maggie-zhou.blogspot.com/2008/10/sql.html' title='SQL'/><author><name>Maggie Zhou</name><uri>http://www.blogger.com/profile/07771044397884684418</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_p_6KRGlK6fY/SM2vDJf4vTI/AAAAAAAAE6w/5MRpQYD_ogo/S220/y1p2sW1F1UDZ1csoTymKJV4rl3ASE4im1y9u9o3NUwG69FCG9rdDey5lIDa5pF1U8W_6NyQHK9gEIk.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8248064105559402376.post-8913465070661952998</id><published>2008-10-28T21:03:00.001-07:00</published><updated>2008-11-10T13:46:53.180-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='TCP/IP'/><title type='text'>IPSec</title><content type='html'>I present the basic concept of IPSec. Let you know about what are differnets between the Transport mode and Tunnel mode, what are differents between ESP and AH, etc.&lt;br /&gt;&lt;object id="player" height="402" width="481" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"&gt;&lt;param name="_cx" value="10181"&gt;&lt;param name="_cy" value="8509"&gt;&lt;param name="FlashVars" value=""&gt;&lt;param name="Movie" value="http://www.authorstream.com/player.swf?p=100883_633608313477500000"&gt;&lt;param name="Src" value="http://www.authorstream.com/player.swf?p=100883_633608313477500000"&gt;&lt;param name="WMode" value="Window"&gt;&lt;param name="Play" value="-1"&gt;&lt;param name="Loop" value="-1"&gt;&lt;param name="Quality" value="High"&gt;&lt;param name="SAlign" value=""&gt;&lt;param name="Menu" value="-1"&gt;&lt;param name="Base" value=""&gt;&lt;param name="AllowScriptAccess" value="always"&gt;&lt;param name="Scale" value="ShowAll"&gt;&lt;param name="DeviceFont" value="0"&gt;&lt;param name="EmbedMovie" value="0"&gt;&lt;param name="BGColor" value=""&gt;&lt;param name="SWRemote" value=""&gt;&lt;param name="MovieData" value=""&gt;&lt;param name="SeamlessTabbing" value="1"&gt;&lt;param name="Profile" value="0"&gt;&lt;param name="ProfileAddress" value=""&gt;&lt;param name="ProfilePort" value="0"&gt;&lt;param name="AllowNetworking" value="all"&gt;&lt;param name="AllowFullScreen" value="true"&gt;&lt;embed src="http://www.authorstream.com/player.swf?p=100883_633608313477500000" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="481" height="402"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;Uploaded on authorSTREAM by &lt;a title="More presentations by maggie.zhou on authorSTREAM" href="http://www.authorstream.com/User-Presentations/maggie.zhou/" target="_blank"&gt;maggie.zhou&lt;/a&gt;&lt;/span&gt;&lt;img style="VISIBILITY: hidden; WIDTH: 0px; HEIGHT: 0px" height="0" src="http://counters.gigya.com/wildfire/IMP/CXNID=2000002.0NXC/bHQ9MTIyNTI1Mjk3NDM1OSZwdD*xMjI1MjUyOTkwNDIxJnA9MjEzNDQxJmQ9Jm49YmxvZ2dlciZnPTEmdD*mbz1hZTVmMTk3ZmQ3Mjg*NzdjOGM2OTdkMjRjMTU*ODk5YQ==.gif" width="0" border="0" /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8248064105559402376-8913465070661952998?l=maggie-zhou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maggie-zhou.blogspot.com/feeds/8913465070661952998/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8248064105559402376&amp;postID=8913465070661952998' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8248064105559402376/posts/default/8913465070661952998'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8248064105559402376/posts/default/8913465070661952998'/><link rel='alternate' type='text/html' href='http://maggie-zhou.blogspot.com/2008/10/ipsec.html' title='IPSec'/><author><name>Maggie Zhou</name><uri>http://www.blogger.com/profile/07771044397884684418</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_p_6KRGlK6fY/SM2vDJf4vTI/AAAAAAAAE6w/5MRpQYD_ogo/S220/y1p2sW1F1UDZ1csoTymKJV4rl3ASE4im1y9u9o3NUwG69FCG9rdDey5lIDa5pF1U8W_6NyQHK9gEIk.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8248064105559402376.post-7888055916287072518</id><published>2008-10-08T01:45:00.000-07:00</published><updated>2008-11-10T15:12:32.959-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='AD HOC'/><title type='text'>Ad hoc Network protocols</title><content type='html'>This note presents three important Ad hoc network routing protocol. These three protocol are the typical routing types which inspired other protocols. Once you understood these three, you will easily get the key point from others.&lt;br /&gt;&lt;br /&gt;&lt;object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="481" height="402" id="player"&gt;&lt;param name="movie" value="http://www.authorstream.com/player.swf?p=maggie.zhou-93557-ad-hoc-network-protocols-0602-science-technology-ppt-powerpoint" /&gt;&lt;param name="allowfullscreen" value="true" /&gt;&lt;param name="allowScriptAccess" value="always"/&gt;&lt;embed src="http://www.authorstream.com/player.swf?p=maggie.zhou-93557-ad-hoc-network-protocols-0602-science-technology-ppt-powerpoint" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="481" height="402"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br&gt;&lt;font size='2'&gt;Uploaded on authorSTREAM by &lt;a href="http://www.authorstream.com/User-Presentations/maggie.zhou/" target="_blank" title="More presentations by maggie.zhou on authorSTREAM"&gt;maggie.zhou&lt;/a&gt;&lt;/font&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8248064105559402376-7888055916287072518?l=maggie-zhou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maggie-zhou.blogspot.com/feeds/7888055916287072518/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8248064105559402376&amp;postID=7888055916287072518' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8248064105559402376/posts/default/7888055916287072518'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8248064105559402376/posts/default/7888055916287072518'/><link rel='alternate' type='text/html' href='http://maggie-zhou.blogspot.com/2008/10/ad-hoc-network-protocols.html' title='Ad hoc Network protocols'/><author><name>Maggie Zhou</name><uri>http://www.blogger.com/profile/07771044397884684418</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_p_6KRGlK6fY/SM2vDJf4vTI/AAAAAAAAE6w/5MRpQYD_ogo/S220/y1p2sW1F1UDZ1csoTymKJV4rl3ASE4im1y9u9o3NUwG69FCG9rdDey5lIDa5pF1U8W_6NyQHK9gEIk.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8248064105559402376.post-7745078760621588861</id><published>2008-10-08T00:23:00.000-07:00</published><updated>2008-10-08T00:47:06.081-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WINDOWS'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>Lost root password in MySQL</title><content type='html'>&lt;p&gt;If you lost the root password of MySQL, there are several to get over it. On Windows, you can use the following steps to reset a new password. &lt;/p&gt;&lt;p&gt;1. close currrent running MySQL: you can go to windows task manager(by press Ctrl+ALT+DEL), and end the process: mysqld-nt.exe&lt;/p&gt;&lt;p&gt;2, open a dos command window&lt;/p&gt;&lt;p&gt;3, set path as your mysql installation path, and into bin, mine is:&lt;/p&gt;&lt;p&gt;c:/program files/mysql/bin &lt;/p&gt;&lt;p&gt;4, Input command:&lt;/p&gt;&lt;p&gt;mysqld-nt --skip-grant-tables &lt;/p&gt;&lt;p&gt;&lt;br /&gt;if there is nothing shows up, it means everything is ok&lt;/p&gt;&lt;p&gt;5, Then, you need open another dos command window&lt;/p&gt;&lt;p&gt;6, Still, set the same path: c:/program files/mysql/bin&lt;/p&gt;&lt;p&gt;7, input: &lt;/p&gt;&lt;p&gt;mysql&lt;/p&gt;&lt;p&gt;then press ENTER key, to get into mysql&lt;/p&gt;&lt;p&gt;if you see: &lt;/p&gt;&lt;p&gt;mysql&gt; &lt;/p&gt;&lt;p&gt;then so far so good&lt;/p&gt;&lt;p&gt;8. After the previous steps, please input: &lt;/p&gt;&lt;p&gt;&lt;br /&gt;use mysql;&lt;br /&gt;update user set password=password("123456") where user="root";&lt;br /&gt;flush privileges; &lt;/p&gt;&lt;p&gt;12345 is you new password for root user, please don't forget the semicolon and use double quote for both password and user name root&lt;br /&gt;&lt;/p&gt;&lt;p&gt;9. Quit mysql by input&lt;br /&gt;\q&lt;br /&gt;&lt;/p&gt;&lt;p&gt;10, On Final step, you need to log out then login windows. &lt;/p&gt;&lt;p&gt;Now, you can use the new password to login mysql in the normal way.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8248064105559402376-7745078760621588861?l=maggie-zhou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maggie-zhou.blogspot.com/feeds/7745078760621588861/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8248064105559402376&amp;postID=7745078760621588861' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8248064105559402376/posts/default/7745078760621588861'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8248064105559402376/posts/default/7745078760621588861'/><link rel='alternate' type='text/html' href='http://maggie-zhou.blogspot.com/2008/10/lost-root-password-in-mysql.html' title='Lost root password in MySQL'/><author><name>Maggie Zhou</name><uri>http://www.blogger.com/profile/07771044397884684418</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_p_6KRGlK6fY/SM2vDJf4vTI/AAAAAAAAE6w/5MRpQYD_ogo/S220/y1p2sW1F1UDZ1csoTymKJV4rl3ASE4im1y9u9o3NUwG69FCG9rdDey5lIDa5pF1U8W_6NyQHK9gEIk.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8248064105559402376.post-8022669379686497005</id><published>2008-09-16T00:05:00.000-07:00</published><updated>2008-09-16T00:33:46.384-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JAVA'/><title type='text'>A great Thread example from Nikos Pugunias(http://nikojava.wordpress.com/)</title><content type='html'>Hi Zhou!&lt;br /&gt;You should be 100% certain that wait() is a method of Object.Consider 2 threads: Thread A carries out a loooong task. Thread B must wait for A's result to go on with its job.This trick between threads happens with a single object that both threads can access: a token. it's like the piece of wood that the athletes running 4x100m in the Olympics: Runner 1 starts, Runner 2 waits for the token from Runner 1, as soon as he gets it Runner 2 starts and so on...&lt;br /&gt;&lt;br /&gt;//Here's the first runner,&lt;br /&gt;&lt;strong&gt;class Runner1 extends Thread { }&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;//that holds a wooden stick.&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&lt;pre&gt;class Runner1 extends Thread {&lt;br /&gt;   Object stick;&lt;br /&gt;   public Runner1(Object stick) { this.stick = stick; }&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;//This runner has a loooong task to do,&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&lt;pre&gt;class Runner1 extends Thread {&lt;br /&gt;   Object stick;&lt;br /&gt;   public Runner1(Object stick) { this.stick = stick; }&lt;br /&gt;   public void run() { // perform a loooooong task here }&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;//and then he will give the token to another runner.&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&lt;pre&gt;class Runner1 extends Thread {&lt;br /&gt;   Object stick;&lt;br /&gt;   public Runner1(Object stick) { this.stick = stick; }&lt;br /&gt;   public void run() {&lt;br /&gt;      synchronized (stick) {&lt;br /&gt;         // perform a loooooong task here stick.notify();&lt;br /&gt;      }&lt;br /&gt;   }&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;//Here's the second runner&lt;br /&gt;&lt;strong&gt;class Runner2 extends Thread { }&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;//that can also receive a wooden stick.&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&lt;pre&gt;class Runner2 extends Thread {&lt;br /&gt;   Object stick;&lt;br /&gt;   public Runner2(Object stick) { this.stick = stick; }&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;//This second runner has also something to do,&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&lt;pre&gt;class Runner2 extends Thread {&lt;br /&gt;   Object stick;&lt;br /&gt;   public Runner2(Object stick) { this.stick = stick; }&lt;br /&gt;   public void run() {&lt;br /&gt;      // I want to do something after&lt;br /&gt;      // the first runner has finished.&lt;br /&gt;   }&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;// but he'll have to wait for the token first.&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&lt;pre&gt;class Runner2 extends Thread {&lt;br /&gt;   Object stick;&lt;br /&gt;   public Runner2(Object stick) { this.stick = stick; }&lt;br /&gt;   public void run() {&lt;br /&gt;      // wait for Runner1&lt;br /&gt;      synchronized (stick) {&lt;br /&gt;          try { stick.wait();&lt;br /&gt;          } catch (InterruptedException e) { }&lt;br /&gt;      }&lt;br /&gt;      // I want to do something&lt;br /&gt;      //after the first runner has finished.&lt;br /&gt;   }&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;//+++++++++++++++++++++++++++&lt;br /&gt;//Here's the complete code.&lt;br /&gt;//+++++++++++++++++++++++++++&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&lt;pre&gt;public class Run {&lt;br /&gt;   public static void main(String[] args) {&lt;br /&gt;      Object token = new Object();&lt;br /&gt;      new Runner1(token).start();&lt;br /&gt;      new Runner2(token).start();&lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;class Runner1 extends Thread {&lt;br /&gt;   Object stick;&lt;br /&gt;   public Runner1(Object stick) { this.stick = stick; }&lt;br /&gt;   public void run() {&lt;br /&gt;      synchronized (stick) {&lt;br /&gt;        // perform a loooooong task here stick.notify();&lt;br /&gt;      }&lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;class Runner2 extends Thread {&lt;br /&gt;   Object stick;&lt;br /&gt;   public Runner2(Object stick) { this.stick = stick; }&lt;br /&gt;   public void run() {&lt;br /&gt;      // wait for Runner1&lt;br /&gt;      synchronized (stick) {&lt;br /&gt;         try { stick.wait();&lt;br /&gt;         } catch (InterruptedException e) { }&lt;br /&gt;      }&lt;br /&gt;      // at this point Runner1 is guaranteed&lt;br /&gt;      // to have finished his work&lt;br /&gt;   }&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;//*************** Conclusion: ***************//&lt;br /&gt;Using a single object, two threads may schedule in what order they will run in accuracy.In the question you have posted, there two threads: Job and main. They schedule themselves based on the [B]thread[B] instance.It's just a choice to use this instance instead of any other object.Review:When thread A calls token.notify() it says: You may take the token.When thread B calls token.wait() it is waiting to take the token.Always synchronize on the token.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8248064105559402376-8022669379686497005?l=maggie-zhou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maggie-zhou.blogspot.com/feeds/8022669379686497005/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8248064105559402376&amp;postID=8022669379686497005' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8248064105559402376/posts/default/8022669379686497005'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8248064105559402376/posts/default/8022669379686497005'/><link rel='alternate' type='text/html' href='http://maggie-zhou.blogspot.com/2008/09/great-thread-example-from-nikos.html' title='A great Thread example from Nikos Pugunias(http://nikojava.wordpress.com/)'/><author><name>Maggie Zhou</name><uri>http://www.blogger.com/profile/07771044397884684418</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_p_6KRGlK6fY/SM2vDJf4vTI/AAAAAAAAE6w/5MRpQYD_ogo/S220/y1p2sW1F1UDZ1csoTymKJV4rl3ASE4im1y9u9o3NUwG69FCG9rdDey5lIDa5pF1U8W_6NyQHK9gEIk.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8248064105559402376.post-7088778178605303859</id><published>2008-09-13T16:58:00.000-07:00</published><updated>2008-09-13T17:10:43.881-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JAVA'/><title type='text'>First Java step: set classpath</title><content type='html'>From website: &lt;a href="http://mindprod.com/jgloss/classpath.html"&gt;http://mindprod.com/jgloss/classpath.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The CLASSPATH is an &lt;a href="http://mindprod.com/jgloss/environment.html"&gt;environment&lt;/a&gt; variable that tells the Java compiler &lt;a href="http://mindprod.com/jgloss/javacexe.html"&gt;javac.exe&lt;/a&gt; where to look for class files to import or &lt;a href="http://mindprod.com/jgloss/javaexe.html"&gt;java.exe&lt;/a&gt; where to find class files to interpret.&lt;br /&gt;&lt;br /&gt;In contrast, the PATH is an environment variable that tells the command processor the where to look for executable files, e.g. *.exe, *.com and *.bat files. The Classpath is one of the most confusing things in Java. Unfortunately, you must master it to even compile HelloWorld.&lt;br /&gt;&lt;br /&gt;&lt;a name="RECIPES"&gt;&lt;/a&gt;CLASSPATH And File Naming RecipesHere are my simplified rules for using CLASSPATH and naming the files on the javac.exe and java.exe command line:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;br /&gt;Put every class in a &lt;a href="http://mindprod.com/jgloss/package.html"&gt;package&lt;/a&gt;. Don’t use the default package. &lt;/li&gt;&lt;li&gt;&lt;br /&gt;Use the latest &lt;a href="http://mindprod.com/jgloss/jdk.html"&gt;JDK&lt;/a&gt;. It will be the one everyone you ask help from is familiar with. Two dangling prepositions in one sentence. Churchill would be proud. &lt;/li&gt;&lt;li&gt;Configure your SET CLASSPATH= in the environment to clear it out.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;You don’t need to explicitly include rt.jar:&lt;br /&gt;rt.jar system class files :&lt;br /&gt;in &lt;a href="file:///C:/Program%20Files/java/jre1.6.0_07/lib/rt.jar"&gt;C:\Program Files\java\jre1.6.0_07\lib\rt.jar&lt;/a&gt; in the JRE 1.6.0 on your local hard disk.&lt;br /&gt;in &lt;a href="file:///J:/Program%20Files/java/jdk1.6.0_07/jre/lib/rt.jar"&gt;J:\Program Files\java\jdk1.6.0_07\jre\lib\rt.jar&lt;/a&gt; in the in the JDK 1.6.0 on your local hard disk.&lt;br /&gt;in &lt;a href="file:///C:/Program%20Files/java/jre1.5.0_16/lib/rt.jar"&gt;C:\Program Files\java\jre1.5.0_16\lib\rt.jar&lt;/a&gt; in the older JRE 1.5.0 on your local hard disk.&lt;br /&gt;in &lt;a href="file:///J:/Program%20Files/java/jdk1.5.0_16/jre/lib/rt.jar"&gt;J:\Program Files\java\jdk1.5.0_16\jre\lib\rt.jar&lt;/a&gt; in the in the older JDK 1.5.0 on your local hard disk.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;unless you are using &lt;a href="http://mindprod.com/jgloss/jikes.html"&gt;Jikes&lt;/a&gt;, where you need to add it to the JIKESPATH, but not the CLASSPATH.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;In all that follows, everything is strictly case sensitive.&lt;br /&gt;&lt;/p&gt;&lt;ol&gt;&lt;li&gt;To compile a HelloWorld.java app in the default package in C:\MyDir, use cd \MyDir&lt;br /&gt;javac.exe -classpath . HelloWorld.java&lt;br /&gt;&lt;/li&gt;&lt;li&gt;To run a HelloWorld.class app, in the default package in C:\MyDir, use cd \MyDir&lt;br /&gt;java.exe -classpath . HelloWorld&lt;br /&gt;&lt;/li&gt;&lt;li&gt;To compile a HelloWorld.java app in C:\com\mindprod\mypackage, in package com.mindprod.mypackage, use c:&lt;br /&gt;cd \&lt;br /&gt;javac.exe -classpath . com\mindprod\mypackage\HelloWorld.java&lt;br /&gt;rem alternatively&lt;br /&gt;e:&lt;br /&gt;cd E:\com\mindprod\mypackage&lt;br /&gt;javac.exe -classpath .;C:\ HelloWorld.java&lt;br /&gt;&lt;/li&gt;&lt;li&gt;To run a HelloWorld.class app in C:\com\mindprod\mypackage, in package com.mindprod.mypackage, use c:&lt;br /&gt;cd \&lt;br /&gt;rem not you do not do cd \com\mindprod\mypackage!!&lt;br /&gt;java.exe -classpath . com.mindprod.mypackage.HelloWorld&lt;br /&gt;&lt;/li&gt;&lt;li&gt;To compile a HelloWorld.class app in C:\com\mindprod\mypackage, in into a jar called helloworld.jar in package com.mindprod.mypackage, use&lt;br /&gt;&lt;/li&gt;&lt;li&gt;To run a HelloWorld.class app in C:\com\mindprod\mypackage, in a jar called helloworld.jar in package com.mindprod.mypackage, use CD \dirwherejaris&lt;br /&gt;java.exe -classpath helloworld.jar com.mindprod.mypackage.HelloWorld&lt;br /&gt;rem or if your Main-Class manifest points to HelloWorld.class.&lt;br /&gt;java.exe -jar helloworld.jar&lt;br /&gt;rem or if your *.jar extension is set to invoke java.exe&lt;br /&gt;helloworld.jar&lt;br /&gt;If for any reason the examples shown do not work with your version of java.exe, try replacing the \ in com\mindprod\mypackage\HelloWorld with / mypackage/HelloWorld.If you stare long enough at those examples, you may understand the logic behind them, and then you can create variants. If you can’t, just slavishly copy the closest matching example.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8248064105559402376-7088778178605303859?l=maggie-zhou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maggie-zhou.blogspot.com/feeds/7088778178605303859/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8248064105559402376&amp;postID=7088778178605303859' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8248064105559402376/posts/default/7088778178605303859'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8248064105559402376/posts/default/7088778178605303859'/><link rel='alternate' type='text/html' href='http://maggie-zhou.blogspot.com/2008/09/first-java-step-set-classpath.html' title='First Java step: set classpath'/><author><name>Maggie Zhou</name><uri>http://www.blogger.com/profile/07771044397884684418</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_p_6KRGlK6fY/SM2vDJf4vTI/AAAAAAAAE6w/5MRpQYD_ogo/S220/y1p2sW1F1UDZ1csoTymKJV4rl3ASE4im1y9u9o3NUwG69FCG9rdDey5lIDa5pF1U8W_6NyQHK9gEIk.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8248064105559402376.post-6225366828329971835</id><published>2008-09-12T21:25:00.001-07:00</published><updated>2008-09-12T21:35:56.287-07:00</updated><title type='text'>Java.io.Console</title><content type='html'>&lt;p&gt;&lt;strong&gt;Make easy to accept input from and output to command line. &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;import java.io.Console;&lt;br /&gt;Console c = System.console();&lt;br /&gt;String readLine()&lt;br /&gt;char[] readPassword(): for security purpose&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8248064105559402376-6225366828329971835?l=maggie-zhou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maggie-zhou.blogspot.com/feeds/6225366828329971835/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8248064105559402376&amp;postID=6225366828329971835' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8248064105559402376/posts/default/6225366828329971835'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8248064105559402376/posts/default/6225366828329971835'/><link rel='alternate' type='text/html' href='http://maggie-zhou.blogspot.com/2008/09/javaioconsole.html' title='Java.io.Console'/><author><name>Maggie Zhou</name><uri>http://www.blogger.com/profile/07771044397884684418</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_p_6KRGlK6fY/SM2vDJf4vTI/AAAAAAAAE6w/5MRpQYD_ogo/S220/y1p2sW1F1UDZ1csoTymKJV4rl3ASE4im1y9u9o3NUwG69FCG9rdDey5lIDa5pF1U8W_6NyQHK9gEIk.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8248064105559402376.post-6620785725593945675</id><published>2008-09-12T15:29:00.000-07:00</published><updated>2008-10-28T21:08:55.153-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JAVA'/><title type='text'>== vs. equals() in Java</title><content type='html'>In JAVA, you may be confused with "==" and equals() all the time. What are they all about?&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;"==":&lt;/strong&gt;&lt;br /&gt;For primitive: check the velue&lt;br /&gt;&lt;br /&gt;For String:&lt;br /&gt;1.if see any new(means String s = new String("xxx"); --&gt;check if they pointing to same object&lt;br /&gt;2.if see only ""(means String s = "xxx"; ) --&gt;check the string content&lt;br /&gt;&lt;br /&gt;For Wrapper:&lt;br /&gt;1. same as String, see any new --&gt; check if they pointing to same object&lt;br /&gt;2, if there is not, then tricky things coming:&lt;br /&gt;2.1, if it is byte, short, int and the value is &lt;=127, --&gt;check the value&lt;br /&gt;2.2, otherwise check the if they pointing to same object&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;equals():&lt;/strong&gt;&lt;br /&gt;For primitive: no way to use this&lt;br /&gt;&lt;br /&gt;For general Object:&lt;br /&gt;1.must override it to compare the key attribute(s) of object;&lt;br /&gt;2,if collection is Hashxxx, you need override hashCode() too, otherwise equals won't effect&lt;br /&gt;&lt;br /&gt;For String and wrappers:&lt;br /&gt;they have well overridden equals() and hashCode()&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8248064105559402376-6620785725593945675?l=maggie-zhou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maggie-zhou.blogspot.com/feeds/6620785725593945675/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8248064105559402376&amp;postID=6620785725593945675' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8248064105559402376/posts/default/6620785725593945675'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8248064105559402376/posts/default/6620785725593945675'/><link rel='alternate' type='text/html' href='http://maggie-zhou.blogspot.com/2008/09/in-java-sometimes-you-may-be-confused.html' title='== vs. equals() in Java'/><author><name>Maggie Zhou</name><uri>http://www.blogger.com/profile/07771044397884684418</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_p_6KRGlK6fY/SM2vDJf4vTI/AAAAAAAAE6w/5MRpQYD_ogo/S220/y1p2sW1F1UDZ1csoTymKJV4rl3ASE4im1y9u9o3NUwG69FCG9rdDey5lIDa5pF1U8W_6NyQHK9gEIk.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8248064105559402376.post-5417214278279417289</id><published>2008-09-12T15:04:00.000-07:00</published><updated>2008-09-12T15:21:21.747-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tech Life'/><title type='text'>Start to blog all my techs articles</title><content type='html'>I am always thinking to put all my tech related articles on a seperate blog. So from now on, I start to put all my research, study issues, results on this blog.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8248064105559402376-5417214278279417289?l=maggie-zhou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maggie-zhou.blogspot.com/feeds/5417214278279417289/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8248064105559402376&amp;postID=5417214278279417289' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8248064105559402376/posts/default/5417214278279417289'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8248064105559402376/posts/default/5417214278279417289'/><link rel='alternate' type='text/html' href='http://maggie-zhou.blogspot.com/2008/09/start-to-blog-all-my-techs-articles.html' title='Start to blog all my techs articles'/><author><name>Maggie Zhou</name><uri>http://www.blogger.com/profile/07771044397884684418</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_p_6KRGlK6fY/SM2vDJf4vTI/AAAAAAAAE6w/5MRpQYD_ogo/S220/y1p2sW1F1UDZ1csoTymKJV4rl3ASE4im1y9u9o3NUwG69FCG9rdDey5lIDa5pF1U8W_6NyQHK9gEIk.jpg'/></author><thr:total>0</thr:total></entry></feed>
