<?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'><id>tag:blogger.com,1999:blog-7382210576807037285</id><updated>2009-12-27T03:43:37.802+08:00</updated><title type='text'>Deepblue Spaces</title><subtitle type='html'>fragments of thoughts...</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://deepbluespaces.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7382210576807037285/posts/default'/><link rel='alternate' type='text/html' href='http://deepbluespaces.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/7382210576807037285/posts/default?start-index=26&amp;max-results=25'/><author><name>Wang Jinbo</name><uri>http://www.blogger.com/profile/04493443437090990980</uri><email>noreply@blogger.com</email></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>48</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7382210576807037285.post-6529389042674569607</id><published>2008-12-24T20:19:00.004+08:00</published><updated>2008-12-24T20:57:23.020+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Misc'/><category scheme='http://www.blogger.com/atom/ns#' term='Internet'/><title type='text'>How Should I Use Flickr?</title><content type='html'>After I uploaded a picture to flickr and wanted to post it in my blog, I found the flowing tips:&lt;br /&gt;&lt;blockquote&gt;Remember! Flickr Community Guidelines specify that if you post a Flickr photo on an external website, the photo must link back to its photo page. (So, use Option 1.)&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Flickr provides two kinds of HTML code. The first links to flickr page, like this:&lt;br /&gt;&lt;a href="http://www.flickr.com/photos/ggggqqqqihc/3133269506/" title="Flower by ggggqqqqihc, on Flickr"&gt;&lt;img src="http://farm4.static.flickr.com/3209/3133269506_6d6c83b9ac_m.jpg" width="240" height="180" alt="Flower" /&gt;&lt;/a&gt;&lt;br /&gt;The second is the URL of the picture, like this:&lt;br /&gt;http://farm4.static.flickr.com/3209/3133269506_6d6c83b9ac_m.jpg&lt;br /&gt;&lt;br /&gt;The flickr guidelines tell us that we must provide a link from each photo or video back to its page on Flickr. So I think the second code is not allowed. But why flickr provides it?&lt;br /&gt;&lt;br /&gt;I used to link the full size picture's URL and show the small size picture in my blog. So visitors can get the original picture directly. Like this:&lt;br /&gt;&lt;a href="http://farm4.static.flickr.com/3209/3133269506_c5d94c4faa_o.jpg"&gt;&lt;img src="http://farm4.static.flickr.com/3209/3133269506_6d6c83b9ac_m.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Up to now, it has no problem. But I'm not sure. Can anyone tell me that can I use flickr like this?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7382210576807037285-6529389042674569607?l=deepbluespaces.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deepbluespaces.blogspot.com/feeds/6529389042674569607/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=7382210576807037285&amp;postID=6529389042674569607' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7382210576807037285/posts/default/6529389042674569607'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7382210576807037285/posts/default/6529389042674569607'/><link rel='alternate' type='text/html' href='http://deepbluespaces.blogspot.com/2008/12/how-should-i-use-flickr.html' title='How Should I Use Flickr?'/><author><name>Wang Jinbo</name><uri>http://www.blogger.com/profile/04493443437090990980</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13637564873325294609'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7382210576807037285.post-9112249080187807751</id><published>2008-09-22T18:53:00.002+08:00</published><updated>2008-09-22T19:09:05.513+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Adsense'/><title type='text'>Received Google AdSense PIN</title><content type='html'>This morning I received a card from Google. It is the Google AdSense PIN. I remembered that my AdSense income reached over $10 last month. To my surprise, it is not very large and it came from Mountain View. After lunch I came back to my dormitory, then login to my AdSense account and entered the PIN code. The second is the telephone verification. After I entered my telephone number, in less 3 seconds, the telephone rang. I got an code from the phone and entered it in my AdSense account.&lt;br /&gt;&lt;br /&gt;The process is very easy. This mail is the first mail that I received from Google. I hope I will receive the first earning from Google in some day.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7382210576807037285-9112249080187807751?l=deepbluespaces.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deepbluespaces.blogspot.com/feeds/9112249080187807751/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=7382210576807037285&amp;postID=9112249080187807751' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7382210576807037285/posts/default/9112249080187807751'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7382210576807037285/posts/default/9112249080187807751'/><link rel='alternate' type='text/html' href='http://deepbluespaces.blogspot.com/2008/09/received-google-adsense-pin.html' title='Received Google AdSense PIN'/><author><name>Wang Jinbo</name><uri>http://www.blogger.com/profile/04493443437090990980</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13637564873325294609'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7382210576807037285.post-3233423410349096733</id><published>2008-08-27T01:44:00.003+08:00</published><updated>2008-08-27T02:07:45.642+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Adsense'/><category scheme='http://www.blogger.com/atom/ns#' term='Blog'/><title type='text'>Adsense, Adsense...</title><content type='html'>More than twenty days have gone since August 1st. I am very glad that the Adsense in this blog give me more than $5. Although it is not much, it is the best result since I used Adsense. Adsense gave me dreams before, now I hope the dreams will come true.&lt;br /&gt;&lt;br /&gt;Up to now, I have got 12 clicks from this blog in August. A strange thing is that all the clicks are from the right sidebar instead of the big rectangle below every article. I thought the big rectangle would give me more income. But it seems that I was wrong.&lt;br /&gt;&lt;br /&gt;I know to get more income, I should to get more traffic. I think the value of a blog not only depends on its traffic but also its contents. Providing useful information is the most important thing. So I should put my heart into writing better contents. Several days ago I posted a thread on DigitalPoint that said I wanted to earn $10/month with Adsense. I believe it is not just a dream any more.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7382210576807037285-3233423410349096733?l=deepbluespaces.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deepbluespaces.blogspot.com/feeds/3233423410349096733/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=7382210576807037285&amp;postID=3233423410349096733' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7382210576807037285/posts/default/3233423410349096733'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7382210576807037285/posts/default/3233423410349096733'/><link rel='alternate' type='text/html' href='http://deepbluespaces.blogspot.com/2008/08/adsense-adsense.html' title='Adsense, Adsense...'/><author><name>Wang Jinbo</name><uri>http://www.blogger.com/profile/04493443437090990980</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13637564873325294609'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7382210576807037285.post-3826226773341905852</id><published>2008-08-19T23:55:00.002+08:00</published><updated>2008-08-20T00:08:20.098+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Internet'/><title type='text'>New Site</title><content type='html'>My new blog site: &lt;a href="http://www.programmingnote.com/"&gt;Programming Note&lt;/a&gt; has launched! I choose WordPress as the blog program, since WordPress is written by PHP and there are many plugins to extends its functions. Also, I have added AdSense to that site. I hope it can give me more income.&lt;br /&gt;&lt;br /&gt;As its title. Most topics on &lt;a href="http://www.programmingnote.com/"&gt;Programming Note&lt;/a&gt; are about programming in the future, since I like programming and like to write something about it. With plugins, WordPress is fit for pasting code. This is much better than Blogger. However, it doesn't mean that this blog is dead. I will update this blog in the future.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7382210576807037285-3826226773341905852?l=deepbluespaces.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deepbluespaces.blogspot.com/feeds/3826226773341905852/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=7382210576807037285&amp;postID=3826226773341905852' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7382210576807037285/posts/default/3826226773341905852'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7382210576807037285/posts/default/3826226773341905852'/><link rel='alternate' type='text/html' href='http://deepbluespaces.blogspot.com/2008/08/new-site.html' title='New Site'/><author><name>Wang Jinbo</name><uri>http://www.blogger.com/profile/04493443437090990980</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13637564873325294609'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7382210576807037285.post-5988051495931182459</id><published>2008-08-17T00:13:00.008+08:00</published><updated>2008-08-17T01:13:27.376+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Misc'/><category scheme='http://www.blogger.com/atom/ns#' term='Internet'/><title type='text'>Is a Domain Name Important?</title><content type='html'>One of my friends bought some domain names. He said that owning a domain was very important. One of his domain names is hcn.name and he made a Chinese weblog on blog.hcn.name. However, I couldn't understand how important a proper domain name is and why he was so interested in it. I think domain names are just used to make up URLs. Many people don't want to try to remember your domain name. I think they like bookmarks or Google better. For me, if I want to find something, Google is enough. If I find a good website, I will add it to my bookmarks. So I seldom remember a website's domain name.&lt;br /&gt;&lt;br /&gt;Some people advised me to buy a domain name for this blog. But I don't know what and  how much a domain name can give me. I mean, owning a domain name, not web space. Traffic, pagerank, or Adsense don't seem to have to do with a domain name. Therefore, I still use this sub domain of blogspot.com.&lt;br /&gt;&lt;br /&gt;Is it really important that owning a domain name? Or if you think it would be better to buy a domain name for this blog, what domains names are the best? Thank you for leaving your comments.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7382210576807037285-5988051495931182459?l=deepbluespaces.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deepbluespaces.blogspot.com/feeds/5988051495931182459/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=7382210576807037285&amp;postID=5988051495931182459' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7382210576807037285/posts/default/5988051495931182459'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7382210576807037285/posts/default/5988051495931182459'/><link rel='alternate' type='text/html' href='http://deepbluespaces.blogspot.com/2008/08/is-domain-name-important.html' title='Is a Domain Name Important?'/><author><name>Wang Jinbo</name><uri>http://www.blogger.com/profile/04493443437090990980</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13637564873325294609'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7382210576807037285.post-3813586453118541010</id><published>2008-08-13T01:42:00.007+08:00</published><updated>2008-10-18T12:57:41.351+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='Software'/><title type='text'>Gedit as an Editor for Programmers</title><content type='html'>Gedit is a lightweight and powerful text editor. It is included in Ubuntu Linux. Gedit supports plugins, so you can add some plugins to extend your editor. With plugins, Gedit is not only a simple text editor.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://farm4.static.flickr.com/3014/2759415762_71d0735325_o.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px;" src="http://farm4.static.flickr.com/3014/2759415762_71d0735325_o.png" alt="" border="0" /&gt;&lt;/a&gt;As a programmer's editor, it should show line numbers, enable automatic indentation, etc. Open "Edit" -&gt; "Preferences". There are for tabs in the dialog. You'd better go to "View" tab and check "Display line numbers" and "Highlight matching bracket". Next, check "Enable automatic indentation" in the "Editor" tab.&lt;br /&gt;&lt;br /&gt;"Plugins" tab is used for enabling and disabling Gedit's plugins. Open "Plugins" tab, then you can find the installed plugins. So please check which plugins you have installed firstly. If what you need has not been installed, please visit &lt;a href="http://live.gnome.org/Gedit/Plugins"&gt;http://live.gnome.org/Gedit/Plugins&lt;/a&gt;. To install a plugin is very easy. Just extract the files to ~/.gnome2/gedit/plugins/ then restart Gedit. I think the following plugins are useful for programming:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Code comment&lt;/span&gt;: It adds "Comment code" and "Uncomment code" to the "Edit" menu. It can help you comment and uncomment code quickly.&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Color Picker&lt;/span&gt;: If you enable this plugin, "Pick color..." will be added to the "Tools" menu. It opens gcolor2 to help you to choose color. If you don't have "gcolor2", you need to run "sudo apt-get install gcolor2" to install it first..&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Embedded Terminal&lt;/span&gt;: It adds a terminal frame in the bottom pane. You can use "Ctrl+F9" to toggle it.&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;File Browser Pane&lt;/span&gt;: It adds a simple file browser into the left pane.&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Indent Lines&lt;/span&gt;: After turn on this plugins, you will find "Indent" and "Unindent" options in the "Edit" menu. It can increase or decrease indentation quickly.&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Split View 2&lt;/span&gt;: "Toggle Split View" will be added to the "View" menu. You can split the document frame and see more that one file at the same time.&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Symbol Browser&lt;/span&gt;: It is added to left pane. When you open a source code file, it can show the classes and functions, etc. It is very useful for programming.&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Tag List&lt;/span&gt;: Some common tags for HTML, XML, etc.&lt;/li&gt;&lt;/ul&gt;Gedit plugins can be written in C or Python. If you want to write your own plugins, read &lt;a href="http://live.gnome.org/Gedit/NewMDIPluginHowTo"&gt;C plugin howto&lt;/a&gt; and &lt;a href="http://live.gnome.org/Gedit/PythonPluginHowTo"&gt;Python plugin howto&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7382210576807037285-3813586453118541010?l=deepbluespaces.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deepbluespaces.blogspot.com/feeds/3813586453118541010/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=7382210576807037285&amp;postID=3813586453118541010' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7382210576807037285/posts/default/3813586453118541010'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7382210576807037285/posts/default/3813586453118541010'/><link rel='alternate' type='text/html' href='http://deepbluespaces.blogspot.com/2008/08/gedit-as-programmers-editor.html' title='Gedit as an Editor for Programmers'/><author><name>Wang Jinbo</name><uri>http://www.blogger.com/profile/04493443437090990980</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13637564873325294609'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7382210576807037285.post-6044542048817329007</id><published>2008-08-10T23:57:00.007+08:00</published><updated>2008-08-11T00:36:13.985+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='Software'/><title type='text'>Some Problems of Tomcat on Ubuntu 8.10</title><content type='html'>I found that Tomcat 5.5 package of Ubuntu Linux had some serious problems.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Normal users can't control Tomcat server.&lt;/span&gt; If you want to start/restart/shutdown Tomcat, you must use "sudo". For developers, restarting Tomcat is very frequent, therefore, typing "sudo" again and again becomes a dirty work.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Problems about MySQL connection.&lt;/span&gt; The default bootstrap of Tomcat is /etc/init.d/tomcat5.5 and it starts Tomcat server automatically. But the serious problem is: Tomcat con't connect to MySQL database! I don't know why. However, if I start Tomcat with /usr/share/tomcat5.5/bin/startup.sh, Tomcat can connect to MySQL. Why the two methods to start Tomcat are different?&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Class loading problems.&lt;/span&gt; I wrote my first servlet that can connect MySQL with JDBC and found some strange problems. I create three files:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Database.java: the database class, which encapsulates some database operations;&lt;/li&gt;&lt;li&gt;DBTestServlet.java: the servlet class that calls Database class to operate database.&lt;/li&gt;&lt;/ul&gt;All files (class file, jar file, web.xml, etc) are located in proper directory. But Tomcat said it can't find the JDBC driver class (Database class has a method that calls DriverManager.getConnection() to get a database connection), although I had put mysql-connector-java-5.1.6-bin.jar in WEB-INF/lib. But if I used JDBC API in DBTestServlet class directly, no problem happened. However, the stranger is: if I started Tomcat from root account (I need to enable root accout and use "su" to switch to root, see &lt;a href="http://deepbluespaces.blogspot.com/2008/07/enable-and-disable-root-on-ubuntu-linux.html"&gt;Enable and Disable "root" on Ubuntu Linux&lt;/a&gt;) instead of using "sudo", no problem happened, even if I used Database class. That's very strange.&lt;br /&gt;&lt;br /&gt;I don't know why Ubuntu's Tomcat package has so many problems. Perhaps the best solution is to download Tomcat from &lt;a href="http://tomcat.apache.org/"&gt;http://tomcat.apache.org/&lt;/a&gt; and extract it to a directory instead of using "sudo apt-get install tomcat5.5".&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7382210576807037285-6044542048817329007?l=deepbluespaces.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deepbluespaces.blogspot.com/feeds/6044542048817329007/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=7382210576807037285&amp;postID=6044542048817329007' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7382210576807037285/posts/default/6044542048817329007'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7382210576807037285/posts/default/6044542048817329007'/><link rel='alternate' type='text/html' href='http://deepbluespaces.blogspot.com/2008/08/some-problems-of-tomcat-on-ubuntu-810.html' title='Some Problems of Tomcat on Ubuntu 8.10'/><author><name>Wang Jinbo</name><uri>http://www.blogger.com/profile/04493443437090990980</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13637564873325294609'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7382210576807037285.post-7694831911487298593</id><published>2008-08-05T10:57:00.003+08:00</published><updated>2008-08-05T11:36:59.502+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='Software'/><title type='text'>Unix Searching Tool -- find</title><content type='html'>The command "find" exists on almost all Unix. It is used for searching files. "find" can help you find files with specified attributes. In many conditions, "find" can work with other programmes well. Here I will take some examples to show the power of "find".&lt;br /&gt;&lt;br /&gt;Suppose you have a directory named "shop" which contains many PHP files, but it contains some sub-directories, so you cannot use "ls *.php" to show all the PHP files. "find" can solve the problem:&lt;br /&gt;&lt;blockquote&gt;find shop -name '*.php'&lt;/blockquote&gt;"find" searches all the sub-directores recursively and find all files whose names match the pattern "*.php" and print their paths. The argument "-name" means matching the filename.&lt;br /&gt;&lt;br /&gt;If you need to calculate how many PHP files there are in the "shop" directory, just need use "wc" command to count the number of lines that "find" produced.&lt;br /&gt;&lt;blockquote&gt;find shop -name '*.php' | wc -l&lt;/blockquote&gt;It proves that Unix "pipe" is very powerful and useful.&lt;br /&gt;&lt;br /&gt;Beside matches file name, find can accept other conditions, for example, last modified time. In my computer, Tomcat (a JSP/Servlet container with a web server) generates log files on /var/log/tomcat5.5/. If I want to show the log files which are modified more than 2 days ago, I can use "-mtime" argument:&lt;br /&gt;&lt;blockquote&gt;find /var/log/tomcat5.5/ -mtime +2&lt;/blockquote&gt;"-mtime" means "last modified time" and "+2" means "more than 2 days". Furthermore, I want to delete all the Tomcat log files which is generated more than 2 days ago. I can use "xargs" to combine "find" with "rm":&lt;br /&gt;&lt;blockquote&gt;find /var/log/tomcat5.5/ -mtime +2 -print | xargs rm -f&lt;/blockquote&gt;"find" also supports logical operators. For the example above, if I need find the log files whose last modified time is more than 5 days or less than 3 days, I can use "find" as below:&lt;br /&gt;&lt;blockquote&gt;find /var/log/tomcat5.5/ -mtime +5 -or -mtime -3.&lt;/blockquote&gt;"find" supports three logical operators: -not, -and, -or.&lt;br /&gt;&lt;br /&gt;Certainly, the functions of "find" are too many to talk about. All the information about "find" can be finded by "man find", although it is not easy to read.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7382210576807037285-7694831911487298593?l=deepbluespaces.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deepbluespaces.blogspot.com/feeds/7694831911487298593/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=7382210576807037285&amp;postID=7694831911487298593' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7382210576807037285/posts/default/7694831911487298593'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7382210576807037285/posts/default/7694831911487298593'/><link rel='alternate' type='text/html' href='http://deepbluespaces.blogspot.com/2008/08/unix-searching-tool-find.html' title='Unix Searching Tool -- find'/><author><name>Wang Jinbo</name><uri>http://www.blogger.com/profile/04493443437090990980</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13637564873325294609'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7382210576807037285.post-6713167987861134647</id><published>2008-08-03T00:10:00.007+08:00</published><updated>2008-08-03T01:01:28.675+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><title type='text'>Making Executable JAR</title><content type='html'>As a Java programmer, you probably need to make JAR file, a compressed file which contains all necessary .class files, like tar (a widely used file format in Unix). For some reasons, you may want to make executable JAR file, which can run by "java -jar &lt;span style="font-style: italic;"&gt;filename.jar&lt;/span&gt;" or just double click it on Windows. Here are the steps about how to make an executable JAR.&lt;br /&gt;&lt;br /&gt;Suppose these are the source code:&lt;br /&gt;&lt;blockquote&gt;src/com/wjb/goose.java&lt;br /&gt;src/com/wjb/dog.java&lt;br /&gt;src/com/wjb/zoo.java&lt;/blockquote&gt;Each source file contains only one class (except inner class) and belongs to the package "com.wjb".&lt;br /&gt;&lt;br /&gt;For convenience, you'd better put the .class file into another directory, for example, classes. Here, directory classes and src are in the save level. The best way to do it is using "-d" argument. Open the terminal (or "command line prompt" on Windows), typing these commands:&lt;br /&gt;&lt;blockquote&gt;cd src # Enter source code directory&lt;br /&gt;javac -d ../classes com/wjb/goose.java&lt;br /&gt;javac -d ../classes com/wjb/dog.java&lt;br /&gt;javac -d ../classes com/wjb/zoo.java&lt;/blockquote&gt;-d ../classes means put the .class file into ../classes directory and build proper sub-directories according to the package name. For this example, it will make classes/com/wjb and all the class file will be put there.&lt;br /&gt;&lt;br /&gt;Now suppose the Zoo class has the main method, i.e. it is the starting point of the whole programs. If you want to make executable JAR, you must specify the class that has the main method. So you need a special file: manifest.txt.&lt;br /&gt;&lt;br /&gt;Create a text file named manifest.txt and save it in "classes" directory. This file has only one line:&lt;br /&gt;&lt;blockquote&gt;Main-Class: com.wjb.Zoo&lt;/blockquote&gt;&lt;span style="font-weight:bold;"&gt;Note that there is a blank character after the colon ":" and you must use its full class name (containing package name).&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Next, go to "classes" directory and execute this command:&lt;br /&gt;&lt;blockquote&gt;jar -cmvf manifest.txt zoo.jar com&lt;/blockquote&gt;If everything is OK, the zoo.jar will be created. It is executable. You can use "&lt;span style="font-weight: bold;"&gt;java -jar zoo.jar&lt;/span&gt;" to test it or just double click its icon if you are using Windows.&lt;br /&gt;&lt;br /&gt;In addition, the simple usage of "jar" to create a JAR file is:&lt;br /&gt;&lt;blockquote&gt;jar -cmvf &amp;lt;manifest.txt&amp;gt; &amp;lt;filename.jar&amp;gt; &amp;lt;input files&amp;gt;&lt;/blockquote&gt;&lt;br /&gt;Here, "&amp;lt;input files&amp;gt;" are files or directories. You can specify more than one file or directory if you want to add many files into JAR. If you need the complete reference, please read the jar manual.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7382210576807037285-6713167987861134647?l=deepbluespaces.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deepbluespaces.blogspot.com/feeds/6713167987861134647/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=7382210576807037285&amp;postID=6713167987861134647' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7382210576807037285/posts/default/6713167987861134647'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7382210576807037285/posts/default/6713167987861134647'/><link rel='alternate' type='text/html' href='http://deepbluespaces.blogspot.com/2008/08/making-executable-jar.html' title='Making Executable JAR'/><author><name>Wang Jinbo</name><uri>http://www.blogger.com/profile/04493443437090990980</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13637564873325294609'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7382210576807037285.post-2905670376530811791</id><published>2008-07-29T00:29:00.004+08:00</published><updated>2008-07-29T15:01:36.049+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>Why Do You Use Linux?</title><content type='html'>My &lt;a href="http://deepbluespaces.blogspot.com/2008/07/ubuntu-linux-is-much-better-than.html"&gt;last post&lt;/a&gt; was submitted to &lt;a href="http://www.tuxmachines.org/node/29037"&gt;here&lt;/a&gt; and received many comments. Because I didn't introduce myself clearly, some people misunderstand me. I think I am not a linux beginner and I have tried some distros such as Fedora, Debian, Gentoo for more than 3 years... I found that many people ignore an important question: why do you use it (linux)?&lt;br /&gt;&lt;br /&gt;Don't say freedom and open source. I don't think source code is useful for normal users. Linux, of cource, is simply one kind of operation systems. I choose it only because it can work well. Why do people use computer? People need its help. Why the "Linux supporters" intend to explore Linux itself, not to how to use it to finish our work more effectively?&lt;br /&gt;&lt;br /&gt;I've seen some people who have play with Linux for several years. But to my surprise, they don't know how to use Linux to finish their work. Linux is just an advanced toy. They often install some new distributions and compare them. They spend too much time on something unuseful, such as 3D-desktop, window animation... If you like Linux only because of these, Linux is just a toy for you.&lt;br /&gt;&lt;br /&gt;Linux is just an OS, software. From a programmer's perspective, it's just a collection of programs, binary code ... It isn't special. But Linux has many distributions. Choosing one to start isn't an easy work. But the same thing: they are Linux! I think the most thing for a person who is working with Linux is to learn Linux/Unix commands. If he can use command line to solve most problems, many Linux distributions is "same" for him. But the goal is: finishing his work better.&lt;br /&gt;&lt;br /&gt;If you are using Linux or plan to go to Linux world, think over this question: why do you use Linux?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7382210576807037285-2905670376530811791?l=deepbluespaces.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deepbluespaces.blogspot.com/feeds/2905670376530811791/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=7382210576807037285&amp;postID=2905670376530811791' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7382210576807037285/posts/default/2905670376530811791'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7382210576807037285/posts/default/2905670376530811791'/><link rel='alternate' type='text/html' href='http://deepbluespaces.blogspot.com/2008/07/why-do-you-use-linux.html' title='Why Do You Use Linux?'/><author><name>Wang Jinbo</name><uri>http://www.blogger.com/profile/04493443437090990980</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13637564873325294609'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7382210576807037285.post-6428374671442611498</id><published>2008-07-28T00:05:00.000+08:00</published><updated>2008-07-28T00:06:32.483+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>Ubuntu Linux is Much Better than Windows</title><content type='html'>I have worked with Ubuntu Linux for about 2 months and find that Ubuntu is much better than Windows. My computer is Thinkpad T43 laptop. The reasons that Ubuntu is better are:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Wireless network supported.&lt;/span&gt; My laptop's wireless network card is Intel PRO/Wireless 2200BG. After booting from Ubuntu live CD, the wireless network is usable. Even you can install Ubuntu and surf the Internet at the same time. However, Windows XP doesn't support the wireless network adapter. So I have to download the driver from other computer and copy it to my laptop. Obviously, it is dirty work.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;No need to look for software all over the world.&lt;/span&gt; Ubuntu, or any Debian-based Linux distribution, uses APT to manager the software packages. If you need to install some software, for example, apache2, you don't have to look for a download site but just execute "sudo apt-get install apache2". Ubuntu will download all necessary packages from its repositories. Installation and configuration are done by APT, the software package manager. If you don't know the package's name you want, you can use Synaptic Package Manager to find one. It is a GUI front-end of APT.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Perfect Chinese supported.&lt;/span&gt; Ubuntu 8.04 give me more beautiful Chinese fonts than 7.10. After installation, go to "System -&gt; Administration -&gt; Language Support" and check the Chinese option and the "Enable support to enter complex characters" option. Then you will get some Chinese fonts and input methods. It is extremely easy.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Anti-virus software is no need.&lt;/span&gt; When I used Windows, I have to install an anti-virus tool after installation. However, I think it isn't necessary for Linux. The viruses on Linux are much fewer than those on Windows. Since I don't install anti-virus software, my computer runs faster.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;More useful softwares.&lt;/span&gt; After installation you can get many useful softwares. OpenOffice, GIMP, Pidgin... you can work immediately. However, on Windows, you have to install MS Office, GTalk or MSN Messenger... after Windows installation. Some people may not like so, they prefer to controlling their computer completely, so they don't like these softwares Ubuntu provides. No problem, just use "Applications -&gt; Add/Remove..." to remove those you don't like.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Free and easy to use.&lt;/span&gt; Almost all the Linux distributions are free to use. Most softwares for Linux are also free. It makes people who are using Linux save lots of money. Besides, I think Ubuntu is easier to use than other Linux distributions, even Windows! No cost doesn't mean low-quality.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7382210576807037285-6428374671442611498?l=deepbluespaces.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deepbluespaces.blogspot.com/feeds/6428374671442611498/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=7382210576807037285&amp;postID=6428374671442611498' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7382210576807037285/posts/default/6428374671442611498'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7382210576807037285/posts/default/6428374671442611498'/><link rel='alternate' type='text/html' href='http://deepbluespaces.blogspot.com/2008/07/ubuntu-linux-is-much-better-than.html' title='Ubuntu Linux is Much Better than Windows'/><author><name>Wang Jinbo</name><uri>http://www.blogger.com/profile/04493443437090990980</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13637564873325294609'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7382210576807037285.post-4167173339503723105</id><published>2008-07-27T11:53:00.003+08:00</published><updated>2008-07-27T12:32:37.167+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>Install Ubuntu 8.04 from Hard Disk</title><content type='html'>According to Ubuntu official website, installing Ubuntu 8.04 or upgrade to Ubuntu 8.04 from older version need CD. But in fact, burning a CD is not necessary. If you have installed a distribution of Linux but have no CD writer, you can also install Ubuntu 8.04 by the ISO file. I installed it from hard disk just now and now I am going to write something about how to do it.&lt;br /&gt;&lt;br /&gt;First, make sure that you have more than one partitions (except swap partition). For example, I have two partitions /dev/sda1 (mounted as /) and /dev/sda5 (mounted as /home). Since I planned to install Ubuntu 8.04 on /dev/sda1. I downloaded the desktop iso file from &lt;a href="http://www.ubuntu.com/getubuntu/download"&gt;here&lt;/a&gt; and save it in /home, the /dev/sda5 partition. So the full path of the ISO file is: /home/ubuntu-8.04.1-desktop-i386.iso.&lt;br /&gt;&lt;br /&gt;Second, extract /casper/vmlinuz and /casper/initrd.gz from the ISO file. Since I had installed Ubuntu 7.10, I need to execute the following commands:&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;cd /home&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;sudo mount -o loop ubuntu-8.04.1-desktop-i386.iso /media/cdrom0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;sudo cp /media/cdrom/casper/vmlinuz .&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;sudo cp /media/cdrom/casper/initrd.gz .&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now edit the grub configuration file /boot/grub/menu.lst. Add this item:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;title Install Ubuntu&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;root &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);font-family:courier new;" &gt;(hd0,4)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;kernel /vmlinuz boot=casper iso-scan/filename=/ubuntu-8.04.1-desktop-i386.iso&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;initrd /initrd.gz&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Note: the red text (hd0,4) means the fifth partition on the first hard disk. i.e. it means /dev/sda5. The partition number of grub is from zero, not one.&lt;br /&gt;&lt;br /&gt;Save menu.lst and reboot your computer. You can start Ubuntu 8.04 live CD from grub and install it to your hard disk as using CD. The only thing you must care about is that you mustn't format the partition which contains the ISO file. In my installation, the ISO file is at /sda5 so I can't format it. In addition, I mounted /home onto /dev/sda5.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7382210576807037285-4167173339503723105?l=deepbluespaces.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deepbluespaces.blogspot.com/feeds/4167173339503723105/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=7382210576807037285&amp;postID=4167173339503723105' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7382210576807037285/posts/default/4167173339503723105'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7382210576807037285/posts/default/4167173339503723105'/><link rel='alternate' type='text/html' href='http://deepbluespaces.blogspot.com/2008/07/install-ubuntu-804-from-hard-disk.html' title='Install Ubuntu 8.04 from Hard Disk'/><author><name>Wang Jinbo</name><uri>http://www.blogger.com/profile/04493443437090990980</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13637564873325294609'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7382210576807037285.post-6562658939258579326</id><published>2008-07-20T20:47:00.002+08:00</published><updated>2008-07-20T21:00:48.664+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>Enable and Disable "root" on Ubuntu Linux</title><content type='html'>On Ubuntu Linux, the "root" account is disabled by default. Normal users can use "&lt;span style="font-family: courier new;"&gt;sudo &lt;span style="font-style: italic;"&gt;&lt;command&gt;&lt;/span&gt;&lt;/span&gt;" to when he has to run a programe as root. This provides a bit more safety but sometimes typing "sudo" is dirty work. On other Linux distributions, you can use "su" to switch into root account. You can enable the function on Ubuntu.&lt;br /&gt;&lt;br /&gt;Set the root's password:&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;sudo passwd root&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Enter the password twice. Now you can use "&lt;span style="font-family: courier new;"&gt;su&lt;/span&gt;" to enter root account.&lt;br /&gt;&lt;br /&gt;But how to disable root's account? The answer is "passwd". In your normal account, type "&lt;span style="font-family: courier new;"&gt;sudo passwd -l root&lt;/span&gt;". Here, the argument "-l" means "lock". It locks the root account. However, you can unlock the root account by typing "&lt;span style="font-family: courier new;"&gt;sudo passwd -u root&lt;/span&gt;" if you have set the root's password. Here, the "-u" means "unlock".&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7382210576807037285-6562658939258579326?l=deepbluespaces.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deepbluespaces.blogspot.com/feeds/6562658939258579326/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=7382210576807037285&amp;postID=6562658939258579326' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7382210576807037285/posts/default/6562658939258579326'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7382210576807037285/posts/default/6562658939258579326'/><link rel='alternate' type='text/html' href='http://deepbluespaces.blogspot.com/2008/07/enable-and-disable-root-on-ubuntu-linux.html' title='Enable and Disable &quot;root&quot; on Ubuntu Linux'/><author><name>Wang Jinbo</name><uri>http://www.blogger.com/profile/04493443437090990980</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13637564873325294609'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7382210576807037285.post-6477363430849531604</id><published>2008-07-18T23:29:00.004+08:00</published><updated>2008-07-19T00:07:31.572+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>Windows on Linux</title><content type='html'>I have used Ubuntu Linux for about one month and I feel I like Linux better than Windows. But sometimes I need to work on Windows, for example, some online banks only support IE. So I have to use Windows. I think it is good to install Windows with virtual machine. At last I chose VirtualBox, a virtual machine software with a user friendly GUI. On Ubuntu Linux, just use "sudo apt-get install virtualbox" to install it. Next, add my user account to group "vboxusers". My computer's memory is 512MB, not too much, but Windows runs well in VirtualBox.&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a href="http://www.flickr.com/photos/ggggqqqqihc/2680215896/" title="Screenshot-Windows XP [Running] - VirtualBox OSE-1 by ggggqqqqihc, on Flickr"&gt;&lt;img src="http://farm4.static.flickr.com/3066/2680215896_6b1df36a17_m.jpg" alt="Screenshot-Windows XP [Running] - VirtualBox OSE-1" height="201" width="240" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Creating a new virtual machine with VirtualBox wizard is very easy. VirtualBox can use the real CD drive directly, but to make installation faster, I make an ISO image file from my Windows CD. Making ISO image file is very easy with Linux. On my laptop the CDROM is /dev/scd0. What I need to go is inserting the Windows CD into the CD drive and executing "&lt;span style="font-weight: bold; font-family: courier new;"&gt;cat /dev/scd0 &gt; windows.iso&lt;/span&gt;". After a while I got the ISO file -- windows.iso. Then modify the virtual machine's properties to make it use the ISO image instead of the real CD drive. Click the "Settings" button and configure "CD/DVD ROM" as below:&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a href="http://www.flickr.com/photos/ggggqqqqihc/2680260034/" title="Screenshot-Windows XP - Settings by ggggqqqqihc, on Flickr"&gt;&lt;img src="http://farm4.static.flickr.com/3150/2680260034_7a9f0bc765_m.jpg" alt="Screenshot-Windows XP - Settings" height="205" width="240" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;When the virtual Windows is running, right Ctrl+F turns on/off the full-screen mode. When working in full-screen, it is almost the same with the real Windows.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7382210576807037285-6477363430849531604?l=deepbluespaces.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deepbluespaces.blogspot.com/feeds/6477363430849531604/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=7382210576807037285&amp;postID=6477363430849531604' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7382210576807037285/posts/default/6477363430849531604'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7382210576807037285/posts/default/6477363430849531604'/><link rel='alternate' type='text/html' href='http://deepbluespaces.blogspot.com/2008/07/windows-on-linux.html' title='Windows on Linux'/><author><name>Wang Jinbo</name><uri>http://www.blogger.com/profile/04493443437090990980</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13637564873325294609'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7382210576807037285.post-5608693930491596747</id><published>2008-07-12T22:59:00.006+08:00</published><updated>2008-07-12T23:50:35.689+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>Installing Tomcat on Ubuntu Linux</title><content type='html'>I installed Tomcat on my laptop which runs Ubuntu Linux. APT package manager makes it very easy to install many software packages.&lt;br /&gt;&lt;br /&gt;Firstly, make sure that you have configured software sources correctly. Go to "System"--"Administration"--"Software Sources" and do it as below:&lt;br /&gt;&lt;a href="http://www.flickr.com/photos/ggggqqqqihc/2654932486/" title="Screenshot-Software Sources by ggggqqqqihc, on Flickr"&gt;&lt;img src="http://farm4.static.flickr.com/3269/2654932486_aa04e6be23_m.jpg" width="240" height="222" alt="Screenshot-Software Sources" /&gt;&lt;/a&gt;&lt;br /&gt;If you skip this step, apt-get may not find tomcat package.&lt;br /&gt;&lt;br /&gt;Before installing tomcat, I have to install Java programming environment. Just use "&lt;span style="font-weight:bold;"&gt;sudo apt-get install sun-java6-jdk sun-java6-jre&lt;/span&gt;" to install JDK and JRE. I suggest choosing Sun JDK or JRE. If you have more than one, you'd better use "&lt;span style="font-weight:bold;"&gt;sudo update-alternatives --config java&lt;/span&gt;" and "&lt;span style="font-weight:bold;"&gt;sudo update-alternatives --config javac&lt;/span&gt;" to choose Sun Java interpretor and compiler as default.&lt;br /&gt;&lt;br /&gt;Then you can install tomcat-5.5 with "&lt;span style="font-weight:bold;"&gt;sudo apt-get install tomcat5.5&lt;/span&gt;". After that, Tomcat will start. The default port is 8180. i.e. you can visit http://localhost:8180 to test your tomcat. If you see a blank page, it means tomcat works.&lt;br /&gt;&lt;br /&gt;One of configure files is &lt;span style="font-weight:bold;"&gt;/etc/tomcat5.5/server.xml&lt;/span&gt;. I want to make tomcat use port 8080. Open it and find:&lt;br /&gt;&amp;lt;Connector port="8180" maxHttpHeaderSize="8192" .... /&amp;gt;&lt;br /&gt;Change ""8180" to "8080", save it and use "sudo /etc/init.d/tomcat5.5 restart" to restart tomcat.&lt;br /&gt;&lt;br /&gt;The last step you should specify a directory as web root directory. Go to /etc/tomcat5.5/Catalina/localhost directory, add an XML file (for example: ROOT.xml) which contains:&lt;br /&gt;&amp;lt;Context path="/" docBase="/home/albert/Programs/JavaEE" reloadable="true" /&amp;gt;&lt;br /&gt;Put a JSP file (test.jsp) in /home/albert/Programs/JavaEE/, which contains:&lt;br /&gt;&amp;lt;% out.println("It works"); %&amp;gt;&lt;br /&gt;Restart tomcat and visit http://localhost:8080/test.jsp to test it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7382210576807037285-5608693930491596747?l=deepbluespaces.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deepbluespaces.blogspot.com/feeds/5608693930491596747/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=7382210576807037285&amp;postID=5608693930491596747' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7382210576807037285/posts/default/5608693930491596747'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7382210576807037285/posts/default/5608693930491596747'/><link rel='alternate' type='text/html' href='http://deepbluespaces.blogspot.com/2008/07/installing-tomcat-on-ubuntu-linux.html' title='Installing Tomcat on Ubuntu Linux'/><author><name>Wang Jinbo</name><uri>http://www.blogger.com/profile/04493443437090990980</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13637564873325294609'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7382210576807037285.post-3255597643058495417</id><published>2008-07-09T11:16:00.002+08:00</published><updated>2008-07-09T11:31:44.695+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>A Problem of Gvim on Ubuntu Linux</title><content type='html'>My ubuntu linux is version 7.10. I installed Gvim (Vim for X Window) yesterday, but it has a serious problem: I cannot enter correct character with keyboard. For instance, I press 'g', but it shows 'h'. I've searched this problem on Google and found a very simple solution.&lt;br /&gt;&lt;br /&gt;Just use your favourite text editor to open /etc/vim/gvimrc and find the lines:&lt;br /&gt;if has('gui_gtk2')&lt;br /&gt;  set guifont=Bitstream\ Vera\ Sans\ Mono\ 12&lt;br /&gt;else&lt;br /&gt;  set guifont=-misc-fixed-medium-r-normal--14-130-75-75-c-70-iso8859-1&lt;br /&gt;endif&lt;br /&gt;&lt;br /&gt;The five lines should be commented with quotes. Just remove it. Now save it and restart Gvim. If everything is OK, it should work.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7382210576807037285-3255597643058495417?l=deepbluespaces.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deepbluespaces.blogspot.com/feeds/3255597643058495417/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=7382210576807037285&amp;postID=3255597643058495417' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7382210576807037285/posts/default/3255597643058495417'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7382210576807037285/posts/default/3255597643058495417'/><link rel='alternate' type='text/html' href='http://deepbluespaces.blogspot.com/2008/07/problem-of-gvim-on-ubuntu-linux.html' title='A Problem of Gvim on Ubuntu Linux'/><author><name>Wang Jinbo</name><uri>http://www.blogger.com/profile/04493443437090990980</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13637564873325294609'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7382210576807037285.post-3223763919688231795</id><published>2008-06-07T20:39:00.002+08:00</published><updated>2008-06-07T20:58:03.752+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='Misc'/><title type='text'>Switching to Linux</title><content type='html'>I have been playing with Linux these days. Windows has gone. Although I met Linux about 5 years ago, I also used Windows at the same time. But Windows became slower and slower and there are too many viruses. Several days ago I can't bear the speed of Windows, so I decided to remove Windows and install Linux. I won't want to return the Windows world.&lt;br /&gt;&lt;br /&gt;There are too many Linux distributions to choose. I think Gentoo Linux is the best one. Because its software package management is very elegant. It is a distribution based on source code. i.e. all the software is built from source code. So it is very suitable for programming. But it is hard to install. At last I choose Ubuntu, a desktop Linux distribution. Its installation is very easy and after 1 hour I got a whole operating system.&lt;br /&gt;&lt;br /&gt;There are many interesting things in Linux. I will write something about it in the future.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7382210576807037285-3223763919688231795?l=deepbluespaces.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deepbluespaces.blogspot.com/feeds/3223763919688231795/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=7382210576807037285&amp;postID=3223763919688231795' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7382210576807037285/posts/default/3223763919688231795'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7382210576807037285/posts/default/3223763919688231795'/><link rel='alternate' type='text/html' href='http://deepbluespaces.blogspot.com/2008/06/switching-to-linux.html' title='Switching to Linux'/><author><name>Wang Jinbo</name><uri>http://www.blogger.com/profile/04493443437090990980</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13637564873325294609'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7382210576807037285.post-6585274524663090776</id><published>2008-05-30T08:35:00.009+08:00</published><updated>2008-05-30T16:41:50.372+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Programming'/><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><title type='text'>CakePHP: Working with View</title><content type='html'>In the &lt;a href="http://deepbluespaces.blogspot.com/2008/05/cakephp-hello-world.html"&gt;last article&lt;/a&gt;, I wrote a 'Hello World' program.&lt;br /&gt;&lt;?php&lt;br /&gt;class TestersController extends Controller{&lt;br /&gt;&amp;nbsp;&amp;nbsp;var $uses=null;&lt;br /&gt;&amp;nbsp;&amp;nbsp;var $autoRender=false;&lt;br /&gt;&amp;nbsp;&amp;nbsp;function sayHello(){&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;echo 'Hello, CakePHP!';&lt;br /&gt;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;}&lt;br /&gt;?&gt;&lt;br /&gt;&lt;br /&gt;But it has a problem. According to MVC pattern, a controller shouldn't be used for displaying. However, that example uses 'echo' statement in the controller. It is a bad style. In MVC, view is used for showing data. So today I will write something about how to use view to display a page.&lt;br /&gt;&lt;br /&gt;A view is usually a file containing much HTML but bit of PHP code. In CakePHP, a controller is associated with some views, depending on its name. For instance, the controller "Testers", its class name is "TestersController" and it must be located in app/controllers/testers_constroller. Its view must be located in app/views/testers/. Each action can have its view. For example, the view of TesterConstroller::sayHello() is app/views/testers/say_hello.thtml. No more to say, let's have a look at the view's content (say_hello.thtml):&lt;br /&gt;Hello, &lt;?php echo $name; ?&gt;!&lt;br /&gt;&lt;br /&gt;You see, it's very simple, just displays a variable $name. Now the questing is: how to pass the variable from the controller? The answer is "set()". Modify the controller class above:&lt;br /&gt;&lt;?php&lt;br /&gt;class TestersController extends Controller{&lt;br /&gt;&amp;nbsp;&amp;nbsp;var $uses=null;&lt;br /&gt;&amp;nbsp;&amp;nbsp;function sayHello(){&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$this-&gt;set('name','Woody');&lt;br /&gt;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;}&lt;br /&gt;?&gt;&lt;br /&gt;Here, $this-&gt;set('name','Woody') set the variable $name. You see, now the controller don't contain output statement. It just set some variables and pass them to a view (because I removed "$autoRender=false", CakePHP will execute app/views/testers/say_hello.thtml). Now open http://localhost/cake/testers/sayHello (suppose your CakePHP project is in WEBROOT/cake/ directory), you will see "Hello, Woody!".&lt;br /&gt;&lt;br /&gt;But there's is another problem. The result contains some more we don't want, like the big title "CakePHP Rapid Development" and the CakePHP's logo on the bottom right. Why is it? The answer is "layout". A layout is similar to a view. Considering a real website. It may contain many pages. But all the pages have some same elements, such as top banner, header text, CSS, etc. We don't need to put these things into all views. Just need layout once. Layout is used for sharing common view elements and it is usually a completed HTML file. Since we haven't create our layout, CakePHP will use its own.&lt;br /&gt;&lt;br /&gt;Now let's create a default layout. Its file path is "/app/views/layouts/default.thtml". The content:&lt;br /&gt;&amp;lt;html&amp;gt;&lt;br /&gt;&amp;lt;head&amp;gt;&lt;br /&gt;&amp;lt;title&amp;gt;&amp;lt;?php echo $title_for_layout; ?&amp;gt;&amp;lt;/title&amp;gt;&lt;br /&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;&amp;lt;h1&gt;Learn CakePHP&amp;lt;/h1&amp;gt;&lt;br /&gt;&amp;lt;?php echo $content_for_layout; ?&amp;gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;br /&gt;And then change the sayHello action into:&lt;br /&gt;function sayHello(){&lt;br /&gt;&amp;nbsp;&amp;nbsp;$this-&gt;pageTitle='This is the title for the layout.';&lt;br /&gt;&amp;nbsp;&amp;nbsp;$this-&gt;set('name','Woody');&lt;br /&gt;}&lt;br /&gt;Then run the action and check the brower's title bar.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;How does a controller get data from a view?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Usually, views contain some forms to get users' input. According to MVC, the input data will be passed to controllers. Since it needs more examples, I plan to write something about it in some day in the future.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7382210576807037285-6585274524663090776?l=deepbluespaces.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deepbluespaces.blogspot.com/feeds/6585274524663090776/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=7382210576807037285&amp;postID=6585274524663090776' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7382210576807037285/posts/default/6585274524663090776'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7382210576807037285/posts/default/6585274524663090776'/><link rel='alternate' type='text/html' href='http://deepbluespaces.blogspot.com/2008/05/cakephp-working-with-view.html' title='CakePHP: Working with View'/><author><name>Wang Jinbo</name><uri>http://www.blogger.com/profile/04493443437090990980</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13637564873325294609'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7382210576807037285.post-752934016671094960</id><published>2008-05-28T20:35:00.010+08:00</published><updated>2008-05-28T22:06:53.049+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Adsense'/><category scheme='http://www.blogger.com/atom/ns#' term='Blog'/><title type='text'>Integrating Adsense into Blogger (for Experts)</title><content type='html'>Blogger is a famous free blog service provider (BSP). It belongs to Google.com. Although it is free to use, you can use Adsense on you blog to make money. Inserting adsense is very easy. But sometimes we need more. For example, I want to show a 468 x 60 banner above the first article in the index page or achive pages. But I don't want it to be shown in a single post page. Moreover, I want to show another 468 x 60 banner below the article in each single post page only, but it won't appear in the index page or achive pages, etc. See below:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://farm3.static.flickr.com/2408/2530342413_0cc9a4b4d4_b.jpg"&gt;index page screenshot&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://farm3.static.flickr.com/2073/2531165958_785bff2ce9_b.jpg"&gt;single post page screenshot&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;So the simple way won't work. How to solve it?&lt;br /&gt;&lt;br /&gt;First we need some software tools. What I will use are Firefox, Firebug extension for Firefox, a text editor (Notepad++). That's all. Now let's begin.&lt;br /&gt;&lt;br /&gt;Go to your Blogger -&gt; Layout -&gt; Edit HTML. Download the full template and use your editor to open it. Then use Firefox to visit your blog. Enable Firebug (right click its icon and make sure "Disable Firebug" isn't selected). Then click the icon and you can see the its interface. Click "Inspect" button (top left), and move your mouse on the webpage to find the right HTML code segment. Here's &lt;a href="http://farm3.static.flickr.com/2404/2531203944_6777aa0f53_o.png"&gt;the screenshot&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I used Firebug to find out that the main content is located in a "div" whose id is "content". Then open your editor to find &amp;lt;div id='content'&amp;gt;. Add these lines after it:&lt;br /&gt;&amp;lt;b:if cond='data:blog.pageType != &amp;amp;quot;item&amp;amp;quot;'&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;div id='index_banner'&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;b:section id='index-banner-only' locked='false' preferred='yes'&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/b:section&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;/b:if&amp;gt;&lt;br /&gt;&lt;br /&gt;Save and upload it. Then go to Layout -&gt; Page Elements. You will see a new "Add a Page Element" above the blog posts area. You can add an Adsense banner. This banner won't appear in any single post page.&lt;br /&gt;&lt;br /&gt;Now let's add the article page ads. In the same way, use Firebug to find the right HTML code. And then search it in your text editor. Or you can search for "&amp;lt;data:post.body/&amp;gt;". data:post.body stands for the content text. Add these lines below it:&lt;br /&gt;&amp;lt;b:if cond='data:blog.pageType == &amp;amp;quot;item&amp;amp;quot;'&amp;gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;your adsense code&lt;/span&gt;&lt;br /&gt;&amp;lt;/b:if &amp;gt;&lt;br /&gt;Because I want to add Adsense below the article, just add Adsense code below it. But it won't work. You must use &lt;a href="http://www.eblogtemplates.com/blogger-ad-code-converter/" target="_blank"&gt;Ad Code Converter&lt;/a&gt; to convert your Adsense code, and then put it into your template.&lt;br /&gt;&lt;br /&gt;OK. Now save your template and upload it. Go to "Page Elements" panel to add an Adsense banner. This banner will only display in the index page and archive pages, etc. It won't display in a single post page. However, if you open a single page, the ads below the content will appear.&lt;br /&gt;&lt;br /&gt;PS: I think this trick will increase the Adsense CTR.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7382210576807037285-752934016671094960?l=deepbluespaces.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deepbluespaces.blogspot.com/feeds/752934016671094960/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=7382210576807037285&amp;postID=752934016671094960' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7382210576807037285/posts/default/752934016671094960'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7382210576807037285/posts/default/752934016671094960'/><link rel='alternate' type='text/html' href='http://deepbluespaces.blogspot.com/2008/05/integrating-adsense-into-blogger-for.html' title='Integrating Adsense into Blogger (for Experts)'/><author><name>Wang Jinbo</name><uri>http://www.blogger.com/profile/04493443437090990980</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13637564873325294609'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7382210576807037285.post-7733478707075592995</id><published>2008-05-26T22:38:00.004+08:00</published><updated>2008-05-27T10:09:41.646+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Software'/><title type='text'>Foxit Reader: A Better PDF Viewer</title><content type='html'>I have used Adobe Reader as my PDF viewer many years. But Adobe Reader became fatter and fatter recently. Today when I opened three PDF files with it, my computer became very busy and slow. I open the task manager of Windows. To my surprice, the Adobe Reader used over 100 MB memory space! So I wanted to look for another PDF viewer.&lt;br /&gt;&lt;br /&gt;I found Foxit Reader just now. Many people think it's better than Adobe Reader because it's smaller and faster. I have tried it. Very fast even I open five PDF files. That's it.&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a href="http://www.flickr.com/photos/ggggqqqqihc/2524678886/" title="Foxit_Reader by ggggqqqqihc, on Flickr"&gt;&lt;img src="http://farm4.static.flickr.com/3244/2524678886_cb2441864c_m.jpg" alt="Foxit_Reader" height="168" width="240" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;The disadvantage of Foxit Reader is the font is not as clear as Adobe Reader. I don't know why it is.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7382210576807037285-7733478707075592995?l=deepbluespaces.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deepbluespaces.blogspot.com/feeds/7733478707075592995/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=7382210576807037285&amp;postID=7733478707075592995' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7382210576807037285/posts/default/7733478707075592995'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7382210576807037285/posts/default/7733478707075592995'/><link rel='alternate' type='text/html' href='http://deepbluespaces.blogspot.com/2008/05/foxit-reader-better-pdf-viewer.html' title='Foxit Reader: A Better PDF Viewer'/><author><name>Wang Jinbo</name><uri>http://www.blogger.com/profile/04493443437090990980</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13637564873325294609'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7382210576807037285.post-3369246991474310686</id><published>2008-05-26T17:16:00.006+08:00</published><updated>2008-05-26T22:56:37.768+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Web'/><category scheme='http://www.blogger.com/atom/ns#' term='Programming'/><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><title type='text'>XAMPP is The Best Choice for Programmers</title><content type='html'>&lt;a href="http://www.apachefriends.org/en/xampp.html" target="_blank"&gt;XAMPP&lt;/a&gt; is an open source suit of Apache, MySQL, PHP/Perl. To many people, installing Apache, MySQL and PHP is difficult. XAMPP integrates them into one package. Moreover, it can run on many operating systems, such as Linux, Windows, Mac OS X and Solaris. With XAMPP, you don't need to edit any configuration file, just unpacking it, even no need to install, you can run your Apache web server with PHP and MySQL support.&lt;br /&gt;&lt;br /&gt;Why did I say the XAMPP is appropriate for Programmers? Here are some reasons. First, XAMPP can run on many platforms, you needn't change your program or configuration files if you want to change the operating system. Second, the default configuration of XAMPP is convenient for debug program. So it is not appropriate for the final products. Third, XAMPP provides some add-ons to extend its function. Now you can integrate Perl and Tomcat into XAMPP. Besides, XAMPP contains much PHP extensions, for example, libjpeg, libpng, gdbm, zlib, expat, Sablotron, libxml, etc.&lt;br /&gt;&lt;br /&gt;The current version of XAMPP is 1.6.6a. The Windows distribution contains:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Apache HTTPD 2.2.8 + Openssl 0.9.8g&lt;/li&gt;&lt;li&gt;MySQL 5.0.51a&lt;/li&gt;&lt;li&gt;PHP 5.2.5&lt;/li&gt;&lt;li&gt;PHP 4.4.8&lt;/li&gt;&lt;li&gt;phpMyAdmin 2.11.4&lt;/li&gt;&lt;li&gt;FileZilla FTP Server 0.9.25&lt;/li&gt;&lt;li&gt;Mercury Mail Transport System 4.52&lt;/li&gt;&lt;/ul&gt;Do you want a try? Click &lt;a href="http://www.apachefriends.org/en/xampp.html" target="_blank"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Update:&lt;/span&gt; I received the comments. I agree with them, too. I think a good PHP programmer should know how to configure Apache, PHP and MySQL, etc. I think XAMPP is the best because it makes the work very easy. So it can save much time. Certainly, unstanding how they work is necessary for a good programmer.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7382210576807037285-3369246991474310686?l=deepbluespaces.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deepbluespaces.blogspot.com/feeds/3369246991474310686/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=7382210576807037285&amp;postID=3369246991474310686' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7382210576807037285/posts/default/3369246991474310686'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7382210576807037285/posts/default/3369246991474310686'/><link rel='alternate' type='text/html' href='http://deepbluespaces.blogspot.com/2008/05/xampp-is-best-choice-for-programmers.html' title='XAMPP is The Best Choice for Programmers'/><author><name>Wang Jinbo</name><uri>http://www.blogger.com/profile/04493443437090990980</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13637564873325294609'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7382210576807037285.post-3242473701211694813</id><published>2008-05-25T20:04:00.006+08:00</published><updated>2008-05-26T14:23:50.080+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Web'/><category scheme='http://www.blogger.com/atom/ns#' term='Internet'/><category scheme='http://www.blogger.com/atom/ns#' term='Blog'/><title type='text'>Get Traffic to My Blog</title><content type='html'>Traffic is the life of a website or a blog. I have been thinking of how to get more traffic to my blog these days. I don't like many people's advice, such as submitting my blog to many directory sites or sending lots of links to forums and so on. I'm not good at it. Since I like programming and I am good at web programming or software. Why could I use my advantages to reach the goal? Just now I found an e-book called &lt;a href="http://www.box.net/shared/5englvmgws"&gt;&lt;span style="font-style: italic;"&gt;77 Ways to Get Traffic&lt;/span&gt;&lt;/a&gt;. I think some ideas are so good.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Join &lt;a href="http://en.wikipedia.org/" target="_blank"&gt;Wikipedia&lt;/a&gt;. Wikipedia is a very successful website and it has much traffic. Especially, anyone can edit it. Althought Wikipedia don't allow anyone to submit spam likes. Fortunately my blog and articles are related to some wikipedia items, I can add the links into the "external links" section. But be careful, don't add spam links.&lt;/li&gt;&lt;li&gt;Develop some software. I can make some shareware and freeware and I can add my site link to the software. I believe, by this way, more and more people will know me.&lt;/li&gt;&lt;li&gt;Make some playful plugins or gadgets. This method is similar to the above one. But plugins or gadgets are much easier to develop. For example, I can make some WordPress plugins and Google gadgets. I think this is a wonderful thing because I like programming and the more people use my software, the more I am excited.&lt;/li&gt;&lt;li&gt;Contribute to some professional websites. Many technology websites accept users' contribution, for example, &lt;a href="http://www.codeguru.com/" target="_blank"&gt;CodeGuru&lt;/a&gt; and &lt;a href="http://www.codeproject.com/" target="_blank"&gt;CodeProject&lt;/a&gt;. I think it is acceptable that put my website's link in the end of my article.&lt;/li&gt;&lt;li&gt;Submit some posts to the shareing website, such as &lt;a href="http://digg.com/"&gt;Digg&lt;/a&gt; or &lt;a href="http://del.icio.us/"&gt;Del.icio.us&lt;/a&gt;. I have used it for nearly a month. But unfortunately, the effect doesn't seem good. I think it is more suitable for the websites who have much traffic already.&lt;/li&gt;&lt;/ul&gt;Certainly, the most is the contents. If you want to build a meaningful website, original and useful contents are most important. Don't think about "garbage sites", whose all contents are copied from other sites. I hate them and I think Google hates them, too.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7382210576807037285-3242473701211694813?l=deepbluespaces.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deepbluespaces.blogspot.com/feeds/3242473701211694813/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=7382210576807037285&amp;postID=3242473701211694813' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7382210576807037285/posts/default/3242473701211694813'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7382210576807037285/posts/default/3242473701211694813'/><link rel='alternate' type='text/html' href='http://deepbluespaces.blogspot.com/2008/05/get-traffic-to-my-blog.html' title='Get Traffic to My Blog'/><author><name>Wang Jinbo</name><uri>http://www.blogger.com/profile/04493443437090990980</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13637564873325294609'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7382210576807037285.post-6054110423420861950</id><published>2008-05-24T13:01:00.009+08:00</published><updated>2008-08-14T20:03:21.927+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Blog'/><title type='text'>Integrating ShareThis into Blogger</title><content type='html'>Look at the end of each post. I integrated "ShareThis" button into my blog this morning. "ShareThis" is a bookmark widget for bloggers. It can make your visitors share your contents more easily. Now let me tell you how to integrate it into your blog hosted by Blogger.com.&lt;br /&gt;&lt;br /&gt;Click &lt;a href="http://sharethis.com/publisher" target="_blank"&gt;here&lt;/a&gt; to get the code. It advises you to create an account. But it is not necessary. If you want to obtain the code only, just click "No Thanks" button. Then you can custom the button's appearance. I think the default is not bad for me. So I skipped this step and click the "Get ShareThis Code" button. You'd better copy the code to your favourite editor so that you can use it after a while.&lt;br /&gt;&lt;br /&gt;Go to your Blogger administration panel and open "Layout" tab. Then click "Edit HTML" and check "Expand Widget Templates". See below:&lt;br /&gt;&lt;a href="http://www.flickr.com/photos/ggggqqqqihc/2518023038/" title="sharethis_blogger_1 by ggggqqqqihc, on Flickr"&gt;&lt;img src="http://farm3.static.flickr.com/2299/2518023038_8026ec322c_m.jpg" alt="sharethis_blogger_1" width="240" height="100" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Add the code in &amp;lt;head&amp;gt;...&amp;lt;/head&amp;gt;. It's better to use HTML comment to mark the code.&lt;br /&gt;&lt;a href="http://www.flickr.com/photos/ggggqqqqihc/2517213851/" title="sharethis_blogger_2 by ggggqqqqihc, on Flickr"&gt;&lt;img src="http://farm3.static.flickr.com/2255/2517213851_c282e43577_m.jpg" alt="sharethis_blogger_2" width="240" height="107" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Search for "&amp;lt;data:post.body&amp;gt;" in the template. Add the code below following it:&lt;br /&gt;&amp;lt;p&amp;gt;&lt;br /&gt;&amp;lt;script language='javascript' type='text/javascript'&amp;gt;&lt;br /&gt;SHARETHIS.addEntry({&lt;br /&gt;title: '&amp;lt;data:post.title/&amp;gt;',&lt;br /&gt;url: '&amp;lt;data:post.url/&amp;gt;'&lt;br /&gt;}, {button:true} );&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;/p&amp;gt;&lt;br /&gt;&lt;a href="http://www.flickr.com/photos/ggggqqqqihc/2517233875/" title="sharethis_blogger_3 by ggggqqqqihc, on Flickr"&gt;&lt;img src="http://farm4.static.flickr.com/3115/2517233875_2be547fd76_m.jpg" alt="sharethis_blogger_3" width="240" height="73" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;That's OK. The function "SHARETHIS.addEntry" will create an instance, i.e. the ShareThis button. "title" and "url" are two useful arguments. They specify the post URL and the title. If they are omitted, the current URL and the HTML title are used instead. &amp;lt;data:post.title/&amp;gt; and &amp;lt;data:post.url/&amp;gt; are the Blogger template tags. They stand for the post's title and its permanent URL. If you want to know more about "ShareThis" API, please see &lt;a href="http://sharethis.com/publisher?type=stapi" target="_blank"&gt;the manual&lt;/a&gt;.&lt;/data:post.body&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7382210576807037285-6054110423420861950?l=deepbluespaces.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deepbluespaces.blogspot.com/feeds/6054110423420861950/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=7382210576807037285&amp;postID=6054110423420861950' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7382210576807037285/posts/default/6054110423420861950'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7382210576807037285/posts/default/6054110423420861950'/><link rel='alternate' type='text/html' href='http://deepbluespaces.blogspot.com/2008/05/integrating-sharethis-into-blogger.html' title='Integrating ShareThis into Blogger'/><author><name>Wang Jinbo</name><uri>http://www.blogger.com/profile/04493443437090990980</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13637564873325294609'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7382210576807037285.post-1123625102083155006</id><published>2008-05-22T15:47:00.003+08:00</published><updated>2008-05-22T16:08:58.362+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Software'/><title type='text'>PowerShadow: Protect Your Computer</title><content type='html'>&lt;a href="http://www.powershadow.com/" target="_blank"&gt;PowerShadow&lt;/a&gt; is similar to recovery card. When PowerShadow is running, it seems that you are working on a 'shadow' of the operation system. All changes of files on the hard disk will disappear after rebooting the computer. So you don't afraid of virus any more. Here is a screenshot:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.shadownow.com/img/viewimage.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px;" src="http://www.shadownow.com/img/viewimage.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The current edition of PowerShadow costs $39.00. If you don't mind the older edition, you can use PowerShadow 2.6, it is free to use. Mine is PowerShadow 2.6. It can be downloaded from my box.net. Click &lt;a href="http://www.box.net/shared/98pj1irk0g"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The free registration information is:&lt;br /&gt;Username: PowerShadow&lt;br /&gt;Serial Number: VVR29E-R4WCK2-K4T111-V1YHTP-4JYJDD&lt;br /&gt;&lt;br /&gt;PS: PowerShadow is not anti-virus software. It can only protect your files from being changed or deleted. It can't guarantee that your private information not to be leaked out.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7382210576807037285-1123625102083155006?l=deepbluespaces.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deepbluespaces.blogspot.com/feeds/1123625102083155006/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=7382210576807037285&amp;postID=1123625102083155006' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7382210576807037285/posts/default/1123625102083155006'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7382210576807037285/posts/default/1123625102083155006'/><link rel='alternate' type='text/html' href='http://deepbluespaces.blogspot.com/2008/05/powershadow-protect-your-computer.html' title='PowerShadow: Protect Your Computer'/><author><name>Wang Jinbo</name><uri>http://www.blogger.com/profile/04493443437090990980</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13637564873325294609'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7382210576807037285.post-1394489618733961882</id><published>2008-05-22T09:59:00.005+08:00</published><updated>2008-05-22T10:31:48.568+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Web'/><category scheme='http://www.blogger.com/atom/ns#' term='Internet'/><title type='text'>Inserting Math Formula</title><content type='html'>Although there has been a markup language for mathematics called MathML, it is not convenient because it needs some browser plugins to display math formula, for example, MathPlayer. Up to now, the best way to insert math formula into web pages is converting them into images.&lt;br /&gt;&lt;br /&gt;But how to describe a math formula with pure text? The answer is TeX. TeX is a publishing tool for scientist and it is developed by Donald E. Knuth. To use it, you must learn some things about TeX. For example, the square root of 2 can be written as '\sqrt{2}'.&lt;br /&gt;&lt;br /&gt;MimeTeX and MathTeX are famous for converting TeX texts into images. If you have your own server, you'd better setup it on the server, although it is a hard work. But what is you haven't your own server? Fortunately, there is a public server, &lt;a href="http://www.forkosh.dreamhost.com"&gt;forkosh&lt;/a&gt;, providing MimeTeX and MathTeX for free. e.g. if you want to write the squre root of 2, you need to write this HTML:&amp;lt;img src="http://www.forkosh.dreamhost.com/mimetex.cgi?\sqrt{2}" /&amp;gt; or &amp;lt;img src="http://www.forkosh.dreamhost.com/mathtex.cgi?\sqrt{2}" /&amp;gt;. i.e. you need to pass TeX text as the mimetex.cgi or the mathtex.cgi's argument. If you know TeX, inserting formula is very easy.&lt;br /&gt;&lt;br /&gt;Now let's have look. The TeX text is 'x_{1,2}=\frac{-b\pm\sqrt{b^2-4ac}}{2a}'.&lt;br /&gt;&lt;br /&gt;MimeTeX.cgi:&lt;br /&gt;&lt;img src="http://www.forkosh.dreamhost.com/mimetex.cgi?x_{1,2}=\frac{-b\pm\sqrt{b^2-4ac}}{2a}" /&gt;&lt;br /&gt;&lt;br /&gt;MathTeX.cgi:&lt;br /&gt;&lt;img src="http://www.forkosh.dreamhost.com/mathtex.cgi?x_{1,2}=\frac{-b\pm\sqrt{b^2-4ac}}{2a}" /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7382210576807037285-1394489618733961882?l=deepbluespaces.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deepbluespaces.blogspot.com/feeds/1394489618733961882/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=7382210576807037285&amp;postID=1394489618733961882' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7382210576807037285/posts/default/1394489618733961882'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7382210576807037285/posts/default/1394489618733961882'/><link rel='alternate' type='text/html' href='http://deepbluespaces.blogspot.com/2008/05/inserting-math-formula.html' title='Inserting Math Formula'/><author><name>Wang Jinbo</name><uri>http://www.blogger.com/profile/04493443437090990980</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13637564873325294609'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>2</thr:total></entry></feed>