<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4108962141379684163</id><updated>2012-01-23T17:01:07.178-06:00</updated><category term='linux'/><category term='matlab'/><category term='gnuplot'/><category term='think'/><category term='visualization'/><category term='ns-2'/><category term='git'/><category term='ai'/><category term='shell'/><category term='python'/><category term='octave'/><category term='EE'/><category term='programming'/><category term='mac'/><category term='mayavi'/><category term='labview'/><category term='lamp'/><category term='music'/><category term='freebsd'/><category term='computational neuroscience'/><category term='rpm'/><category term='eecs'/><category term='vtk'/><category term='life'/><title type='text'>Forrest Sheng Bao's Mirrored Blog</title><subtitle type='html'>This is a backup of my blog on my website. Technical posts older than 3 years may not be valid any more.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://forrestbao.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default?start-index=101&amp;max-results=100'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>257</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-4756085597996740592</id><published>2012-01-18T00:11:00.001-06:00</published><updated>2012-01-18T20:41:40.361-06:00</updated><title type='text'>The Internet is on Strike!</title><content type='html'>200+ years ago, American Founding Fathers fought for liberty. Today, their legacy continues. &lt;br /&gt;&lt;br /&gt;Google is doing something. &lt;a href="http://www.google.com/landing/takeaction/"&gt;http://www.google.com/landing/takeaction/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.google.com/landing/takeaction/"&gt;&lt;img src="https://www.google.com/landing/takeaction/takeaction.png" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Wikipedia is doing something. &lt;a href="http://en.wikipedia.org/wiki/Wikipedia:SOPA_initiative/Learn_more"&gt;http://en.wikipedia.org/wiki/Wikipedia:SOPA_initiative/Learn_more&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://en.wikipedia.org/wiki/Main_Page"&gt;&lt;img src="http://upload.wikimedia.org/wikipedia/commons/9/98/WP_SOPA_Splash_Full.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Reddit is doing something.&lt;a href="http://blog.reddit.com/2012/01/stopped-they-must-be-on-this-all.html"&gt; http://blog.reddit.com/2012/01/stopped-they-must-be-on-this-all.html&lt;/a&gt;&lt;br /&gt;&lt;a href="http://blog.reddit.com/2012/01/stopped-they-must-be-on-this-all.html"&gt;&lt;img src="http://redditstatic.s3.amazonaws.com/sobrave.png" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;And more websites. &lt;br /&gt;&lt;br /&gt;Join them by doing something on your website.&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-4756085597996740592?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=4756085597996740592' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/4756085597996740592'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/4756085597996740592'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2012/01/internet-is-on-strike.html' title='The Internet is on Strike!'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-6760507002812086715</id><published>2012-01-12T23:44:00.004-06:00</published><updated>2012-01-17T23:50:32.501-06:00</updated><title type='text'>Mathematically, you are my 23-rd cousin!</title><content type='html'>I made a complain on my Facebook and Google+ status today. I arbitrarily assumed that any Asian is at least my 100-th cousin. Then I realized I made a big mistake - there aren't \( 2^{100} \) people in Asia + Asian population in the US and Canada!&lt;br /&gt;&lt;br /&gt;So, what ``degree'' of cousin are you to me? &lt;br /&gt;&lt;br /&gt;Let's assume all humans on planet Earth at this moment has a pair of common ancestors, according to either some religious documents (e.g., Biblical Adam and Eve) or some molecular biology hypotheses (e.g., &lt;a href="http://en.wikipedia.org/wiki/Y-chromosomal_Adam"&gt;Y-chromosomal Adam&lt;/a&gt; and &lt;a href="http://en.wikipedia.org/wiki/Mitochondrial_Eve"&gt;Mitochondrial Eve&lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;And, there are 6.5 billion people on planet Earth now. &lt;br /&gt;&lt;br /&gt;Let's assume every couple in the history of mankind has \( e= \lim_{n \rightarrow \infty}{\left (1 + \frac{1}{n}\right)^n} \approx 2.718\) children that can reproduce grandchildren on average. (&lt;i&gt;e&lt;/i&gt; is the mathematical constant a.k.a. Euler's number that can magically describe many phenomena in our universe.) &lt;br /&gt;&lt;br /&gt;Because the natural logarithm of 6.5 billion is around 23 (\(\ln(6.5\times 10^9) \approx 22.595\) ), everyone on planet Earth now is at least my 23-rd cousin.&lt;br /&gt;&lt;br /&gt;Thanks for reading this blog post from your 23-rd cousin.&lt;br /&gt;&lt;br /&gt;Dear NASA, please find my 100-th cousin on another planet and say hi to him/her for me. &lt;br /&gt;&lt;br /&gt;(This blog post contains math formulas rendered by &lt;a href="http://www.mathjax.org/"&gt;MathJax&lt;/a&gt; from &lt;a href="http://en.wikipedia.org/wiki/LaTeX"&gt;LaTeX&lt;/a&gt;. )&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-6760507002812086715?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=6760507002812086715' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/6760507002812086715'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/6760507002812086715'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2012/01/mathematically-you-are-my-23-nd-cousin.html' title='Mathematically, you are my 23-rd cousin!'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-54557088159778041</id><published>2012-01-07T18:49:00.002-06:00</published><updated>2012-01-07T18:50:22.841-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='vtk'/><title type='text'>Double and Float types of data in VTK files</title><content type='html'>by Forrest Sheng  Bao http://fsbao.net&lt;br /&gt;&lt;br /&gt;I just realized that they are different, at least to python-vtk, the official Python wrapper for VTK library. If a scalar is of type Float, python-vtk will pad many digits after the decimal point. For example, 205187 in a pure ASCII VTK file becomes 0.20518699288368225. All Float data are padded to the 16-th digit after decimal point. However, if the type is Double, no such a problem. &lt;br /&gt;&lt;br /&gt;I don't know what VTK's semantics for Double and Float are. But it should be related.&lt;br /&gt;&lt;br /&gt;I am using python-vtk and Python2.7 that comes with Ubuntu Linux 11.10 64bit.&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-54557088159778041?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=54557088159778041' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/54557088159778041'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/54557088159778041'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2012/01/double-and-float-types-of-data-in-vtk.html' title='Double and Float types of data in VTK files'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-5906762133871258684</id><published>2012-01-05T23:55:00.001-06:00</published><updated>2012-01-05T23:56:27.347-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='shell'/><title type='text'>Trimming suffix or perfix of a string in Shell</title><content type='html'>by Forrest Sheng Bao http://fsbao.net&lt;br /&gt;&lt;br /&gt;How to trim/truncate a string in Linux? Especially when it is a path or file name?&lt;br /&gt;&lt;br /&gt;See this demo below. &lt;br /&gt;&lt;br /&gt;&lt;pre&gt;test="~/bin/test_label"&lt;br /&gt;&lt;br /&gt;echo ${test%_label} # the percentage sign means from the end&lt;br /&gt;&lt;br /&gt;echo ${test#?/*/} # the pound sign means from the start &lt;/pre&gt;&lt;br /&gt;Save it as a Shell script (e.g., test.sh) and test it on your Shell:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;$ sh test.sh &lt;br /&gt;~/bin/test&lt;br /&gt;test_label&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Got the idea?&lt;br /&gt;&lt;br /&gt;This is very simple string matching, where question mark and asterisk have their normal meanings in UNIX regular expression.&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-5906762133871258684?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=5906762133871258684' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/5906762133871258684'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/5906762133871258684'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2012/01/trimming-suffix-or-perfix-of-string-in.html' title='Trimming suffix or perfix of a string in Shell'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-885144812609091540</id><published>2012-01-04T21:10:00.001-06:00</published><updated>2012-01-04T21:10:29.660-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='vtk'/><title type='text'>Adding two SCALARS in POINTDATA for one vtkPolyData object in VTK</title><content type='html'>by Forrest Sheng Bao http://fsbao.net&lt;br /&gt;&lt;br /&gt;In VTK (either the file format or the library), we sometimes associate more than one scalars to points. I just figured out how to do this in VTK (in C++, similarly in its Python, Tcl or Java wrapper). &lt;br /&gt;&lt;br /&gt;Suppose I have a vtkPolyData pointer &lt;br /&gt;&lt;pre&gt;vtkPolyData* mesh;&lt;br /&gt;&lt;/pre&gt;and two vtkDoubleArray (you can consider a vtkDoubleArray as a list of scalars) pointers &lt;br /&gt;&lt;pre&gt;vtkDoubleArray* depth; &lt;br /&gt; vtkDoubleArray* curv; &lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;This is how I do it: &lt;br /&gt;&lt;br /&gt;&lt;pre&gt;depth-&gt;SetName("Depth");&lt;br /&gt;mesh-&gt;GetPointData()-&gt;SetScalars(depth);&lt;br /&gt;curv-&gt;SetName("Curvature");&lt;br /&gt;mesh-&gt;GetPointData()-&gt;AddArray(curv);&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;You may test this by writing &lt;code&gt;mesh&lt;/code&gt; into a VTK-format file:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;vtkPolyDataWriter* writer=vtkPolyDataWriter::New();&lt;br /&gt; writer-&gt;SetFileName("test_dump.vtk");&lt;br /&gt; &lt;br /&gt; writer-&gt;SetInput(mesh);&lt;br /&gt; writer-&gt;Update();&lt;br /&gt; writer-&gt;Write();&lt;br /&gt; writer-&gt;Delete();&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;My only question is whether the use of &lt;code&gt;AddArray()&lt;/code&gt; function is correct. What is I wanna set a Normal? or a Tensor?&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-885144812609091540?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=885144812609091540' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/885144812609091540'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/885144812609091540'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2012/01/adding-two-scalars-in-pointdata-for-one.html' title='Adding two SCALARS in POINTDATA for one vtkPolyData object in VTK'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-8067251819333509428</id><published>2012-01-01T20:22:00.000-06:00</published><updated>2012-01-01T20:22:26.806-06:00</updated><title type='text'>What Nimbus is</title><content type='html'>On Solaris 10 and 11, the default desktop theme is called Nimbus.&lt;br /&gt;&lt;br /&gt;That's the only thing I like about Solaris.&lt;br /&gt;&lt;br /&gt;So I did some googling to find out what it means. It means ``dark cloud'' in Latin&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-8067251819333509428?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=8067251819333509428' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/8067251819333509428'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/8067251819333509428'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2012/01/what-nimbus-is.html' title='What Nimbus is'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-7049465298593655447</id><published>2011-12-30T17:48:00.002-06:00</published><updated>2012-01-02T21:00:43.562-06:00</updated><title type='text'>Firefox plug-in container's problem</title><content type='html'>by Forrest Sheng Bao &lt;a href="http://fsbao.net/"&gt;http://fsbao.net&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Firefox's market share has just been passed by Chrome. If they wanna catch up, Firefox really needs to fix many problems of itself. Its plug-in container on Linux should be on top of their list. &lt;br /&gt;&lt;br /&gt;I use two important plug-ins in Firefox, Adobe PDF reader and flash player. But they sometimes do not work after having been used in Firefox for a while, e.g., after you open several tabs of PDF files.&lt;br /&gt;&lt;br /&gt;I am not alone. For example, ever since Ubuntu 9.10, the Firefox (around 3.0) shipped with Ubuntu Linux has had problem with Adobe PDF reader: &lt;a href="http://ubuntuforums.org/archive/index.php/t-1385589.html"&gt;http://ubuntuforums.org/archive/index.php/t-1385589.html&lt;/a&gt;&amp;nbsp; Somebody even created a ticket at Firefox Help: &lt;a href="http://support.mozilla.org/en-US/questions/891508"&gt;http://support.mozilla.org/en-US/questions/891508&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;And I also notice that when playing Flash movies, Firefox's plug-in container takes a lot of CPU resources. This does not happen on Chrome. &lt;br /&gt;&lt;br /&gt;I assume this plug-in container problem only happens on Linux platform. But since Linux is a growing market, it may not be a good idea to ignore this problem.&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-7049465298593655447?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=7049465298593655447' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/7049465298593655447'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/7049465298593655447'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2011/09/why-doesnt-firefox-make-deb-or-rpm.html' title='Firefox plug-in container&apos;s problem'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-1510622092518568587</id><published>2011-12-29T19:57:00.000-06:00</published><updated>2011-12-29T19:57:51.596-06:00</updated><title type='text'>How to kill H. pylori</title><content type='html'>$60 = &lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-mauLPJZuFV4/Tv0af-AQC4I/AAAAAAAAI1A/5KJ-1q5t-cw/s1600/PrevPac-1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://2.bp.blogspot.com/-mauLPJZuFV4/Tv0af-AQC4I/AAAAAAAAI1A/5KJ-1q5t-cw/s400/PrevPac-1.png" width="241" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-_5OqYQM3IDg/Tv0ag4mAWdI/AAAAAAAAI1I/ytqeyIX2wEU/s1600/PrevPac-2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://4.bp.blogspot.com/-_5OqYQM3IDg/Tv0ag4mAWdI/AAAAAAAAI1I/ytqeyIX2wEU/s400/PrevPac-2.png" width="243" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-1510622092518568587?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=1510622092518568587' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/1510622092518568587'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/1510622092518568587'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2011/12/how-to-kill-h-pylori.html' title='How to kill H. pylori'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-mauLPJZuFV4/Tv0af-AQC4I/AAAAAAAAI1A/5KJ-1q5t-cw/s72-c/PrevPac-1.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-2542169162089708634</id><published>2011-12-28T17:47:00.000-06:00</published><updated>2011-12-28T17:47:12.344-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='vtk'/><title type='text'>An incompatible problem between python-vtk and pyvtk</title><content type='html'>I am using python-vtk (official Python binding of VTK) and pyvtk (only for VTK-format file I/O) these days. It's not a pleasant experience. It took me a few hours to debug my code and found out the problem at somewhere I never expected - the incompatibility of the libraries I am using. On top of that, one of them has compatibility issue with Python2.7.&lt;br /&gt;&lt;br /&gt;I used python-vtk to read from VTK files (because I couldn't google out examples using pyvtk to do so). And then I used pyvtk to write into VTK files (because I couldn't google out examples using python-vtk to create scalar POINTDATA).&lt;br /&gt;&lt;br /&gt;The problem is that in python-vtk, &lt;code&gt;vtk.vtkDataSetReader().GetOutput().GetPoint()&lt;/code&gt; returns a 3-tuple, which is the X-, Y- and Z-coordinates of a POINT in DATASET POLYDATA block, whereas in pyvtk, &lt;code&gt;pyvtk.PolyData()&lt;/code&gt; takes in coordinates as a list, not a 3-tuple.&lt;br /&gt;&lt;br /&gt;I don't understand how this could cause problems, because lists and tuples are very similar in Python. After mandatory type conversion, the problem was gone.&lt;br /&gt;&lt;br /&gt;pyvtk also has problem with Python2.7. I haven't debugged out the cause. But I just know it does not work with Python2.7.&lt;br /&gt;&lt;br /&gt;PS: There is a great lack of resources on these two libraries. I use one library for reading VTK files and the other for writing VTK files, though each of them has the ability to do both. This "complimentary" combination is because I couldn't google out examples on using the opposite library for the opposite function. I really don't understand this. Without document, a software package is nothing.&lt;br /&gt;&lt;br /&gt;I didn't find any documentation on pyvtk's website. For python-vtk, released with VTK (C++ mainly, along with Tcl, Python and Java bindings), I still didn't find docs for Python. I had to use iPython to learn.&lt;br /&gt;&lt;br /&gt;Does anyone know why?&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-2542169162089708634?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=2542169162089708634' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/2542169162089708634'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/2542169162089708634'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2011/12/incompatible-problem-between-python-vtk.html' title='An incompatible problem between python-vtk and pyvtk'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-7832196860595293247</id><published>2011-12-26T15:57:00.013-06:00</published><updated>2011-12-29T02:51:51.089-06:00</updated><title type='text'>The RIGHT code to enable MathJax in your website</title><content type='html'>I started using &lt;a href="http://www.mathjax.org/"&gt;MathJax&lt;/a&gt; to display math on my blog (Drupal and Google Blogger) recently. OMG, my life is much easier. LaTeX is easier to type math than MathML and MathJax does not render math into pictures but vector symbols. &lt;br /&gt;&lt;br /&gt;But I noticed two problems. &lt;br /&gt;&lt;ol&gt;&lt;li&gt;Firefox for Linux has a little problem with the Javascript code on &lt;a href="http://www.mathjax.org/docs/1.1/start.html"&gt;MathJax official instruction&lt;/a&gt;. The fonts are odd - no such problem on Chrome for Linux. (See below)&lt;/li&gt;&lt;li&gt;MathJax's official instruction does not work for Blogger's HTML template.&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-HC-xI51zFTs/Tvwp70d6B0I/AAAAAAAAI00/Jw699cd4uKA/s1600/Screenshot+at+2011-12-19+02%253A20%253A26.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="344" src="http://2.bp.blogspot.com/-HC-xI51zFTs/Tvwp70d6B0I/AAAAAAAAI00/Jw699cd4uKA/s640/Screenshot+at+2011-12-19+02%253A20%253A26.png" width="640" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Problem 1: See how t' looks like on the left in Firefox, in contrast to how it looks like on the right in Chrome.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Then I found out this instruction that fixed both of my problems:&lt;br /&gt;&lt;a href="http://irrep.blogspot.com/2011/07/mathjax-in-blogger-ii.html"&gt;http://irrep.blogspot.com/2011/07/mathjax-in-blogger-ii.html&lt;/a&gt;  Though it says it is for Blogger, it should work for any CMS. &lt;br /&gt;&lt;br /&gt;So, this the right code to enable MathJax on your website:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&amp;lt;script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js" type="text/javascript"&amp;gt;&lt;br /&gt;    MathJax.Hub.Config({&lt;br /&gt;        extensions: ["tex2jax.js","TeX/AmsMath.js","TeX/AMSsymbols.js"],&lt;br /&gt;        jax: ["input/TeX","output/HTML-CSS"],&lt;br /&gt;        tex2jax: {&lt;br /&gt;            inlineMath: [ ['$','$'], ["\\(","\\)"] ],&lt;br /&gt;            displayMath: [ ['$$','$$'], ["\\[","\\]"] ],&lt;br /&gt;            processEscapes: true,&lt;br /&gt;        },&lt;br /&gt;        "HTML-CSS": { availableFonts: ["TeX"] }&lt;br /&gt;    });&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Please pay great attention to the escape sequences for inlineMath. Maybe you wanna disable the dollar quotations if you have more than one dollar sign in one post.&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-7832196860595293247?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=7832196860595293247' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/7832196860595293247'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/7832196860595293247'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2011/12/right-code-to-enable-mathjax-in-your.html' title='The RIGHT code to enable MathJax in your website'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-HC-xI51zFTs/Tvwp70d6B0I/AAAAAAAAI00/Jw699cd4uKA/s72-c/Screenshot+at+2011-12-19+02%253A20%253A26.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-977114536822552062</id><published>2011-12-19T01:52:00.005-06:00</published><updated>2011-12-19T02:06:57.228-06:00</updated><title type='text'>Happening sequence for plans with both simple and durative actions in PDDL2.1</title><content type='html'>by Forrest Sheng Bao http://fsbao.net&lt;br /&gt;&lt;br /&gt;I have been struggling with a definition in an important paper about temporal planning in past few weeks. And today i finally understand it with the help of one of the authors. In his words, this definition is sorta counter-intuitive. So I am now writing this blog and hope it will help others struggling with this as well. &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Some background&lt;/b&gt;: The paper defines a major revision of PDDL, the &lt;i&gt;de facto&lt;/i&gt; standard in &lt;a href="http://en.wikipedia.org/wiki/Automated_planning_and_scheduling"&gt;planning&lt;/a&gt;, a sub-field of AI. It's called ``&lt;a href="http://www.jair.org/media/1129/live-1129-2132-jair.pdf"&gt;PDDL2. 1: An extension to PDDL for expressing temporal planning domains&lt;/a&gt;'' by &lt;a href="http://personal.cis.strath.ac.uk/~maria/"&gt;Maria Fox&lt;/a&gt; and &lt;a href="http://personal.cis.strath.ac.uk/~derek/"&gt;Derek Long&lt;/a&gt;. The paper is published in Journal of AI Research, one of the few top AI journals, in 2003. &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Now let's begin.&lt;/b&gt; In Definition 16, the author defines the happening sequence of a plan, which implicitly includes both simple and durative actions as follows. &lt;br /&gt;&lt;br /&gt;If P is a plan, then the &lt;i&gt;happening sequence&lt;/i&gt; for P is \( \{t_i\}_{t=0...k}, \) the ordered sequence of the time points formed from the set of times &lt;br /&gt;&lt;br /&gt;$$\{t| (t,a)\in P~or~ (t, a[t'])\in P~or~(t-t', a[t'])\in P\}$$&lt;br /&gt;&lt;br /&gt;I don't understand why the 3rd disjunction (maybe in British English it's called ``disjunct.'') in the formula has $$t-t'$$ instead of $$t+t'$$ as the time point. &lt;br /&gt;&lt;br /&gt;Dr. Derek Long, the 2nd and last author of this paper, gave me two email replies and finally made me understood. &lt;br /&gt;&lt;br /&gt;Let's add something into the formula to see whether it helps. &lt;br /&gt;&lt;br /&gt;$$\{t| (t,a)\in P~or~ (t, a[t'])\in P~or~(t-t', a[t'])\in P, t\in \mathbb{R}\}$$&lt;br /&gt;&lt;br /&gt;So, for the 3rd disjunction, \( t \) is a real number, such that \( t-t' \) is the start of a durative action (by Definition 17) \( a \) whose duration is \( t' \).  Since \( t-t' \) is the start, and \( t' \) is the duration of the action \( a \), \( t \) is the end of the action \( a \). In this way, the finishing time points of durative actions are included in the set of \( t \) 's. &lt;br /&gt;&lt;br /&gt;Does it still sound ``counter-intuitive?'' If so, please write to me.&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-977114536822552062?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=977114536822552062' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/977114536822552062'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/977114536822552062'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2011/12/happening-for-plans-with-both-simple.html' title='Happening sequence for plans with both simple and durative actions in PDDL2.1'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-6121979175897530027</id><published>2011-12-18T03:11:00.000-06:00</published><updated>2011-12-18T03:11:41.530-06:00</updated><title type='text'>Indexing matrix elements of different indexes in different rows in Octave or MATLAB</title><content type='html'>Here is a tricky programming problem in Octave or MATLAB. Given a matrix A, and another array Y, how to build a new array Z such that &lt;code&gt;Z(i)=A(i, Y(i))&lt;/code&gt; without using loops? &lt;br /&gt;&lt;br /&gt;In other words I need to pick one (and only one) element per row while the indexes of elements vary in rows. This is easy if using loops but I am a ``&lt;a href="http://www.mathworks.com/support/tech-notes/1100/1109.html"&gt;vectorization&lt;/a&gt; freak.''&lt;br /&gt;&lt;br /&gt;Below is a solution I found out. A is the given matrix. Y is the array specifying the element of each row to be picked out. &lt;br /&gt;&lt;br /&gt;Please note I call trace() function in the end, because I don't really need the array Z but only its sum. So I simply need to sum the diagonal of the last square matrix. &lt;br /&gt;&lt;br /&gt;Comments are welcomed. Do you know any name for this operation? And does Octave or MATLAB already has a solution for this? &lt;br /&gt;&lt;br /&gt;&lt;pre&gt;octave:2&gt; A=magic(10)(:,1:4)&lt;br /&gt;A =&lt;br /&gt;&lt;br /&gt;    92    99     1     8&lt;br /&gt;    98    80     7    14&lt;br /&gt;     4    81    88    20&lt;br /&gt;    85    87    19    21&lt;br /&gt;    86    93    25     2&lt;br /&gt;    17    24    76    83&lt;br /&gt;    23     5    82    89&lt;br /&gt;    79     6    13    95&lt;br /&gt;    10    12    94    96&lt;br /&gt;    11    18   100    77&lt;br /&gt;&lt;br /&gt;octave:3&gt; Y=ceil(rand(10,1)*4)&lt;br /&gt;Y =&lt;br /&gt;&lt;br /&gt;   2&lt;br /&gt;   1&lt;br /&gt;   1&lt;br /&gt;   3&lt;br /&gt;   2&lt;br /&gt;   1&lt;br /&gt;   3&lt;br /&gt;   4&lt;br /&gt;   2&lt;br /&gt;   3&lt;br /&gt;&lt;br /&gt;octave:4&gt; A(:,Y)&lt;br /&gt;ans =&lt;br /&gt;&lt;br /&gt;    99    92    92     1    99    92     1     8    99     1&lt;br /&gt;    80    98    98     7    80    98     7    14    80     7&lt;br /&gt;    81     4     4    88    81     4    88    20    81    88&lt;br /&gt;    87    85    85    19    87    85    19    21    87    19&lt;br /&gt;    93    86    86    25    93    86    25     2    93    25&lt;br /&gt;    24    17    17    76    24    17    76    83    24    76&lt;br /&gt;     5    23    23    82     5    23    82    89     5    82&lt;br /&gt;     6    79    79    13     6    79    13    95     6    13&lt;br /&gt;    12    10    10    94    12    10    94    96    12    94&lt;br /&gt;    18    11    11   100    18    11   100    77    18   100&lt;br /&gt;&lt;br /&gt;octave:5&gt; Z=diag(A(:,Y))&lt;br /&gt;Z =&lt;br /&gt;&lt;br /&gt;    99&lt;br /&gt;    98&lt;br /&gt;     4&lt;br /&gt;    19&lt;br /&gt;    93&lt;br /&gt;    17&lt;br /&gt;    82&lt;br /&gt;    95&lt;br /&gt;    12&lt;br /&gt;   100&lt;br /&gt;&lt;br /&gt;octave:6&gt; trace(A(:,Y))&lt;br /&gt;ans =  619&lt;br /&gt;octave:7&gt; sum(diag(A(:,Y)))&lt;br /&gt;ans =  619&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-6121979175897530027?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=6121979175897530027' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/6121979175897530027'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/6121979175897530027'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2011/12/indexing-matrix-elements-of-different.html' title='Indexing matrix elements of different indexes in different rows in Octave or MATLAB'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-5686910375462066033</id><published>2011-12-17T14:18:00.001-06:00</published><updated>2011-12-17T14:23:21.419-06:00</updated><title type='text'>Adding model library in Cadence spectre2</title><content type='html'>To selecting device simulation model in Cadence Spectre for Cadence Affirma, here is how.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-lCiWwtPOS9c/Tuz5BDnBNKI/AAAAAAAAIcY/oPNckNAeyKM/s1600/spectre2_ModelLibrary_Setup.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-lCiWwtPOS9c/Tuz5BDnBNKI/AAAAAAAAIcY/oPNckNAeyKM/s1600/spectre2_ModelLibrary_Setup.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-5686910375462066033?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=5686910375462066033' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/5686910375462066033'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/5686910375462066033'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2011/12/adding-model-library-in-cadence.html' title='Adding model library in Cadence spectre2'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-lCiWwtPOS9c/Tuz5BDnBNKI/AAAAAAAAIcY/oPNckNAeyKM/s72-c/spectre2_ModelLibrary_Setup.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-7836540124799911821</id><published>2011-12-05T01:41:00.002-06:00</published><updated>2011-12-05T01:47:35.155-06:00</updated><title type='text'>A Chinese that do not speak Chinese</title><content type='html'>I just realized a very pathetic thing about myself minutes ago. &lt;br /&gt;&lt;br /&gt;I was text chatting with a friend (which later you will believe is a new supernova of AI) on Google Talks. We talked about some research stuff. We went thru some history and&amp;nbsp;new techniques in that field. Of course, again, I complained the slow development of symbolic AI now.&lt;br /&gt;&lt;br /&gt;Just at that moment, that very moment, I realized that I felt much comfortable to discuss research topics with him in English than in Chinese, though we are both native Chinese speakers. &lt;br /&gt;&lt;br /&gt;A few days ago, we did the similar thing. We talked about GPU computing, ensemble learning, academic career and academia vs. industry. &lt;br /&gt;&lt;br /&gt;But we did in Chinese. And it bugged me - coz 1) I type Chinese slowly 2) half of the words we used in chat are English words. 3) I don't understand or express well in that Pidgin Chinese. &lt;br /&gt;&lt;br /&gt;So, a feeling, a pathetic feeling, came up my mind. I am a Chinese guy who cannot discuss research topics in Chinese! Now my Chinese is only used for daily life, like, "I need an egg roll." I cannot express or understand well when talking about research - i even end up meeting Chinese faculty members in my university in English. &lt;br /&gt;&lt;br /&gt;But, this is not my fault. I will write a new blog post later to explain why. &lt;br /&gt;&lt;br /&gt;Oh, my friend. In 2010, his paper won the best paper award of AAAI, the best AI conference in the world. But he cannot find a faculty position all the time. So he ended up working for Google. If you are a member of faculty searching committee of a university, please do contact my talented friend Dr. Ruo-Yun Huang. Here is his homepage: &lt;a href="http://www.cse.wustl.edu/~huangr/"&gt;http://www.cse.wustl.edu/~huangr/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-7836540124799911821?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=7836540124799911821' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/7836540124799911821'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/7836540124799911821'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2011/12/chinese-that-do-not-speak-chinese.html' title='A Chinese that do not speak Chinese'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-4115081346633105498</id><published>2011-12-04T00:49:00.005-06:00</published><updated>2011-12-04T00:57:22.564-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='vtk'/><title type='text'>Reading VTK files in Python via python-vtk</title><content type='html'>by Forrest Sheng Bao &lt;a href="http://fsbao.net"&gt;http://fsbao.net&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Surprisingly, I noticed that there isn't a good document covering frequently-used functions of the Python module vtk (provided via python-vtk on Debian/Ubuntu Linux systems). So I decide to write a very simple one here, covering all functions that I have used. &lt;br /&gt;&lt;br /&gt;Note:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;This tutorial is for Python 2.X though slight changes can make it work with Python 3.X.&lt;/li&gt;&lt;li&gt;I assume you are familiar with VTK data format, thus you know what header, DATASET and POINT_DATA are.&lt;/li&gt;&lt;li&gt;Notations like &lt;code&gt;In [123]&lt;/code&gt; or &lt;code&gt;Out[123]&lt;/code&gt; are prompts in iPython (an interactive Python shell). They show a line of code and its output/effect, respectively. They should NOT appear in your code. And, when you use other Python interpreter/shell, you may not see it. &lt;/li&gt;&lt;li&gt;I did not use &lt;code&gt;print&lt;/code&gt; function in iPython when showing something. But when you write a Python program, you need &lt;code&gt;print&lt;/code&gt; to display.&lt;/li&gt;&lt;/ul&gt;&lt;b&gt;Step 1&lt;/b&gt;: Set up the reader. &lt;br /&gt;&lt;pre&gt;import vtk&lt;br /&gt;reader = vtk.vtkDataSetReader()&lt;br /&gt;reader.SetFileName("lh.sulc.fundi.from.pits.pial.vtk")&lt;br /&gt;reader.ReadAllScalarsOn()  # Activate the reading of all scalars&lt;br /&gt;reader.Update()&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The &lt;code&gt;reader&lt;/code&gt; is the top level object we use to access a VTK file. For example, you can know the header of a VTK file by&lt;br /&gt;&lt;pre&gt;In [119]: reader.GetHeader()&lt;br /&gt;Out[119]: 'Created by Mindboggle'&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;Step 2&lt;/b&gt;: Get data in &lt;code&gt;DATASET&lt;/code&gt; block.&lt;br /&gt;&lt;br /&gt;Again, &lt;code&gt;reader&lt;/code&gt; is the top level. To get data in &lt;code&gt;DATASET&lt;/code&gt; block, we need to call a method on &lt;code&gt;reader&lt;/code&gt;.&lt;br /&gt;&lt;pre&gt;data=reader.GetOutput()&lt;/pre&gt;&lt;br /&gt;We can know how many (not ``much'' here) data of each type are in the &lt;code&gt;DATASET&lt;/code&gt; by the function &lt;code&gt;GetNumberOf{VTK_Data_Type}()&lt;/code&gt;. For example, to know how may Points are there, we use:&lt;br /&gt;&lt;pre&gt;In [11]: data.GetNumberOfPoints()&lt;br /&gt;Out[11]: 128895&lt;/pre&gt;&lt;br /&gt;I used tab-completion function of iPython to find out all &lt;code&gt;GetNumberOf{VTK_Data_Type}()&lt;/code&gt; for &lt;code&gt;data&lt;/code&gt;:&lt;br /&gt;&lt;pre&gt;data.GetNumberOfCells   data.GetNumberOfPolys&lt;br /&gt;data.GetNumberOfLines   data.GetNumberOfStrips&lt;br /&gt;data.GetNumberOfPieces  data.GetNumberOfVerts&lt;br /&gt;data.GetNumberOfPoints  &lt;/pre&gt;&lt;br /&gt;After knowing the size of data of each type, we can access them using function &lt;code&gt;Get{VTK_DATA_Type}()&lt;/code&gt;. For example, to get the first point's coordinate, we can do this:&lt;br /&gt;&lt;pre&gt;In [136]: data.GetPoint(0)&lt;br /&gt;Out[136]: (-11.605026245117188, -97.47259521484375, 3.8222298622131348)&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;Step 3&lt;/b&gt;: get data in &lt;code&gt;POINT_DATA/CELL_DATA&lt;/code&gt; block. &lt;br /&gt;&lt;br /&gt;Data in &lt;code&gt;POINT_DATA&lt;/code&gt; and &lt;code&gt;CELL_DATA&lt;/code&gt; can be loaded via function &lt;code&gt;GetPointData()&lt;/code&gt; and &lt;code&gt;GetCellData()&lt;/code&gt;. For example, &lt;br /&gt;&lt;pre&gt;d=data.GetPointData()&lt;/pre&gt;&lt;br /&gt;We will use loading a scalar array from &lt;code&gt;POINT_DATA&lt;/code&gt; as an example below. &lt;br /&gt;Vectors and tensors can be accessed in similar way by different functions.&lt;br /&gt;&lt;br /&gt;All scalar arrays in a file can be viewed by:&lt;br /&gt;&lt;pre&gt;In [140]: reader.GetNumberOfScalarsInFile() # get number of scalars&lt;br /&gt;Out[140]: 5&lt;br /&gt;In [141]: reader.GetScalarsNameInFile(1) # get scalar name string&lt;br /&gt;Out[140]: curv&lt;/pre&gt;&lt;br /&gt;A scalar can be accessed by its name:&lt;br /&gt;&lt;pre&gt;In [38]: array=d.GetArray('curv') # 'curv' is the scalar name&lt;br /&gt;In [50]: array.GetValue(260957-260761+1)&lt;br /&gt;Out[50]: 0.043181419372558594&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;In the end, you should see the following variables:&lt;br /&gt;&lt;pre&gt;Variable   Type         Data/Info&lt;br /&gt;---------------------------------&lt;br /&gt;curv       vtkobject    vtkFloatArray (0x9e5cd38)&amp;lt;...&amp;gt;)\n  Array: 0x9f1a9a0\n\n&lt;br /&gt;d          vtkobject    vtkPointData (0x9789b50)\&amp;lt;...&amp;gt;  PedigreeIds: (none)\n\n&lt;br /&gt;data       vtkobject    vtkPolyData (0x9e6c650)\n&amp;lt;...&amp;gt;: 0\n  Ghost Level: 0\n\n&lt;br /&gt;reader     vtkobject    vtkDataSetReader (0x9c431&amp;lt;...&amp;gt; InputStringLength: 0\n\n&lt;br /&gt;vtk        module       &amp;lt; module 'vtk' from '/usr/&amp;lt;...&amp;gt;hon2.6/vtk/__init__.pyc'&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;The end.&lt;/b&gt; Comments and questions are welcomed.&lt;br /&gt;&lt;br /&gt;References:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.vtk.org/pipermail/vtkusers/2010-June/109492.html"&gt;http://www.vtk.org/pipermail/vtkusers/2010-June/109492.html&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://stackoverflow.com/questions/6684306/how-can-i-read-a-vtk-file-into-a-python-datastructure"&gt;http://stackoverflow.com/questions/6684306/how-can-i-read-a-vtk-file-into-a-python-datastructure&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-4115081346633105498?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=4115081346633105498' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/4115081346633105498'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/4115081346633105498'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2011/12/reading-vtk-files-in-python-via-python.html' title='Reading VTK files in Python via python-vtk'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-3996091259500975796</id><published>2011-11-26T20:13:00.004-06:00</published><updated>2011-12-04T01:06:44.257-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='git'/><title type='text'>1-minute Git tutorial/cheatsheet</title><content type='html'>by Forrest Sheng Bao &lt;a href="http://fsbao.net/"&gt;http://fsbao.net&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I assume that you have already had a Git repository somewhere, like Git hub.&lt;br /&gt;&lt;br /&gt;Get a clone:&lt;br /&gt;&lt;pre&gt;git clone git@github.com:ACCOUNT/REPOSITORY.git &lt;/pre&gt;&lt;br /&gt;Update changes:&lt;br /&gt;&lt;pre&gt;git add FILE&lt;br /&gt;git commit -m 'this is a change...'&lt;br /&gt;git push origin master&lt;/pre&gt;&lt;br /&gt;Remove a file from repository:&lt;br /&gt;&lt;pre&gt;git rm FILE&lt;br /&gt;git commit -m 'something is removed'&lt;br /&gt;git push origin master&lt;/pre&gt;&lt;br /&gt;References:&amp;nbsp;&lt;a href="http://help.github.com/"&gt;http://help.github.com/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-3996091259500975796?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=3996091259500975796' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/3996091259500975796'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/3996091259500975796'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2011/11/git-cheatsheet-for-myself.html' title='1-minute Git tutorial/cheatsheet'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-7699592156758974940</id><published>2011-11-06T18:47:00.000-06:00</published><updated>2011-11-06T18:47:39.612-06:00</updated><title type='text'>Assigning a column vector to a row of a matrix in Octave/MATLAB</title><content type='html'>I just feel this is somehow unsafe.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;octave:34&amp;gt; A=[1 2;3 4]&lt;br /&gt;A =&lt;br /&gt;&lt;br /&gt;   1   2&lt;br /&gt;   3   4&lt;br /&gt;&lt;br /&gt;octave:35&amp;gt; A(1,:) = [5; 6]&lt;br /&gt;A =&lt;br /&gt;&lt;br /&gt;   5   6&lt;br /&gt;   3   4&lt;br /&gt;&lt;br /&gt;octave:36&amp;gt;  [5; 6]&lt;br /&gt;ans =&lt;br /&gt;&lt;br /&gt;   5&lt;br /&gt;   6&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-7699592156758974940?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=7699592156758974940' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/7699592156758974940'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/7699592156758974940'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2011/11/assigning-column-vector-to-row-of.html' title='Assigning a column vector to a row of a matrix in Octave/MATLAB'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-8789724984706754943</id><published>2011-11-05T23:09:00.000-05:00</published><updated>2011-11-05T23:09:21.991-05:00</updated><title type='text'>Water recycling in City of Lubbock, Texas</title><content type='html'>I live in a city with around 500mm rain and 250mm snow per year. So, water is a big problem.&lt;br /&gt;&lt;br /&gt;A friend shocked me today. He said a main water source that Lubbock is relying on,&amp;nbsp;&lt;a href="http://en.wikipedia.org/wiki/Ogallala_Aquifer"&gt;Ogallala Aquifer&lt;/a&gt;, would run out in 10 years. ``10 years'' may not be the phrase that shocks you the most because Ogallala Aquifer is the WORLD's largest aquifer!&lt;br /&gt;&lt;br /&gt;Something that is WORLD's LARGEST will be gone in 10 years? And, Lubbock is the only place that I spent my entire grad school life at. I wish I can point a dot on the map and tell my&amp;nbsp;grandchildren&amp;nbsp;``this is the place grandpa got PhD.''&lt;br /&gt;&lt;br /&gt;So, I went to city website to look for some information. Thank God I can sleep well now. The city of Lubbock is building many canyon lakes,&amp;nbsp;reservoirs&amp;nbsp;and processing plants for possible water recycling. Two reservoirs, Canyon Lake #7 and Post (a small town near by) Reservoirs will become viable in next 20 years. ``Once these projects are complete, the City&amp;nbsp;will have the technology and infrastructure in&amp;nbsp;place to make wastewater recycling a reality.'' [Cite:&amp;nbsp;&lt;a href="http://water.ci.lubbock.tx.us/pdf/RateInsertMay09.pdf"&gt;http://water.ci.lubbock.tx.us/pdf/RateInsertMay09.pdf&lt;/a&gt;]&lt;br /&gt;&lt;br /&gt;On this map, you can see 3 canyon lakes in the city, Canyon Lakes #2, #3 and #6.&lt;br /&gt;&lt;br /&gt;&lt;iframe frameborder="0" height="700" marginheight="0" marginwidth="0" scrolling="no" src="http://maps.google.com/maps?f=q&amp;amp;source=s_q&amp;amp;hl=en&amp;amp;geocode=&amp;amp;q=Lubbock,+TX&amp;amp;aq=0&amp;amp;sll=37.0625,-95.677068&amp;amp;sspn=68.935839,92.548828&amp;amp;vpsrc=6&amp;amp;ie=UTF8&amp;amp;hq=&amp;amp;hnear=Lubbock,+Texas&amp;amp;t=m&amp;amp;ll=33.588812,-101.838198&amp;amp;spn=0.05005,0.077162&amp;amp;z=14&amp;amp;output=embed" width="900"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;small&gt;&lt;a href="http://maps.google.com/maps?f=q&amp;amp;source=embed&amp;amp;hl=en&amp;amp;geocode=&amp;amp;q=Lubbock,+TX&amp;amp;aq=0&amp;amp;sll=37.0625,-95.677068&amp;amp;sspn=68.935839,92.548828&amp;amp;vpsrc=6&amp;amp;ie=UTF8&amp;amp;hq=&amp;amp;hnear=Lubbock,+Texas&amp;amp;t=m&amp;amp;ll=33.588812,-101.838198&amp;amp;spn=0.05005,0.077162&amp;amp;z=14" style="color: blue; text-align: left;"&gt;View Larger Map&lt;/a&gt;&lt;/small&gt;&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-8789724984706754943?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=8789724984706754943' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/8789724984706754943'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/8789724984706754943'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2011/11/water-recycling-in-city-of-lubbock.html' title='Water recycling in City of Lubbock, Texas'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-2956729375562175147</id><published>2011-10-29T23:42:00.003-05:00</published><updated>2011-12-04T01:12:08.356-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='computational neuroscience'/><category scheme='http://www.blogger.com/atom/ns#' term='visualization'/><category scheme='http://www.blogger.com/atom/ns#' term='mayavi'/><title type='text'>Picking values from a point in Mayavi2</title><content type='html'>Sometimes we have scientific data, each point of which has multiple values associated with. If the data is visualized, we want to pick up values at certain points. I have been needing this features for too long. And today someone gave me some hints to figured it out.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step 1&lt;/b&gt; (optional): prepare your VTK file. Make sure you have &lt;code&gt;POINT_DATA&lt;/code&gt; and/or &lt;code&gt;CELL_DATA&lt;/code&gt; segment(s). Do NOT create multiple &lt;code&gt;POINT_DATA n&lt;/code&gt; and/or &lt;code&gt;CELL_DATA n&lt;/code&gt; lines in one file - VTK format is linear.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step 2&lt;/b&gt;: Start Mayavi2 GUI application and load the VTK file. There are two ways to do so.&lt;br /&gt;&lt;br /&gt;I am always lazy. So I run command like the one below from UNIX/Linux Shell. &lt;br /&gt;&lt;pre&gt;mayavi2 -d  ../Data/brains/50201_surf/lh.sulc.fundi.from.pits.inflated.final.vtk -m Surface&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;You can also use GUI menu in Mayavi2. This will take two steps. &lt;br /&gt;&lt;ol&gt;&lt;li&gt;Load the data: &lt;i&gt;File-&amp;gt; Load data -&amp;gt; Open file ...&lt;/i&gt;&lt;/li&gt;&lt;li&gt;Visualize: Suppose we want the surface of the data now. &lt;i&gt;Visualize-&amp;gt;Modules&lt;/i&gt;&lt;/li&gt;&lt;/ol&gt;&lt;b&gt;Step 3&lt;/b&gt;: Choose the proper data attribute. &lt;br /&gt;Click the data file in the &lt;a href="http://github.enthought.com/mayavi/mayavi/application.html#general-layout-of-ui"&gt;Engine Tree View&lt;/a&gt;. Select the proper data attribute in Mayavi object editor below. For example, I select &lt;i&gt;CmpntID&lt;/i&gt; in &lt;i&gt;Point scalars name&lt;/i&gt;.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-1k5M4PBbKr0/TqzxSx9jA3I/AAAAAAAAIOA/s8hDByK1WIw/s1600/SelectScalar.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/-1k5M4PBbKr0/TqzxSx9jA3I/AAAAAAAAIOA/s8hDByK1WIw/s1600/SelectScalar.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step 4&lt;/b&gt; (optional): Turn on LUT legend.&lt;br /&gt;Click the &lt;i&gt;Color and legends&lt;/i&gt;&amp;nbsp;below the VTK file in Engine Tree View. If the data attribute is scalar, select &lt;i&gt;Scalar LUT&lt;/i&gt; tab and check &lt;i&gt;Show legend&lt;/i&gt;. Then you will see a legend bar on the right of your scene.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-w_o7_EZhVus/TqzxntlOM7I/AAAAAAAAIOI/xTLcc6IHxB0/s1600/CheckLegend.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="640" src="http://3.bp.blogspot.com/-w_o7_EZhVus/TqzxntlOM7I/AAAAAAAAIOI/xTLcc6IHxB0/s640/CheckLegend.png" width="292" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step 5&lt;/b&gt;: Select points. This part a little bit tricky because 1) you are selecting a 3-D object on a 2-D interface and 2) the GUI of Mayavi2 isn't very user-friendly for this purpose.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/--xyamIWTcaE/TqzyToBn4II/AAAAAAAAIOQ/t0Exi5dD3xc/s1600/pick.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="552" src="http://1.bp.blogspot.com/--xyamIWTcaE/TqzyToBn4II/AAAAAAAAIOQ/t0Exi5dD3xc/s640/pick.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Move you mouse over a random place (or over your the point you wanna pick data) on the scene.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Press 'p' on your keyboard. A dialog box titled &lt;i&gt;Edit properties&lt;/i&gt;&amp;nbsp;will pop up.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Make sure that you selected Pick type as point_picker. And choose a small enough &lt;i&gt;Tolerance&lt;/i&gt; level. I don't know what it means but if it is smaller, it's easier to precisely pick up a point. The default tolerance is 0.025. I prefer 0.01.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Now click on somewhere you really wanna pick on the scene, and then click 'p'. There will be a 3-D crosshair. It is very useful because it tells you where you really selected.&amp;nbsp;&lt;/li&gt;&lt;li&gt;On the Edit properties window, there are some value. In our case, we care about the scalar (fundusID). It reads 41.0 on the snapshot, and it matches the value on legend bar for points of this color. If there is a mismatch, rotate the object and redo.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Repeat step 4 and 5 to find out scalar values you care at other places. Press 'p' every time after selecting somewhere. You should at least see coordinates changes when you select different places. The legend bar on the right can help you verify the scalar value you pick. You should read none for all fields if you move mouse out of the object.&amp;nbsp;&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;Troubleshooting:&amp;nbsp;&lt;/div&gt;&lt;div&gt;1. If coordinates do not change when your click different places, check whether the cursor falls in the &lt;i&gt;History&lt;/i&gt; box in &lt;i&gt;Edit Properties&lt;/i&gt; dialog box.) In that case, you shall see a lot of p's in the History box (on the top or at the end mostly).&lt;/div&gt;&lt;div&gt;2. If you keep missing a point while the mouse seems to be over it, rotate the object. Selection a 3-D subject in 2-D visualization means you will always miss on one dimension/axis.&amp;nbsp;&lt;/div&gt;&lt;div&gt;3. A help for the problem above is to press Alt+3 on the scene and put on a pair of 3-D anaglyph glasses. This will enable your real 3-D view.&amp;nbsp;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-2956729375562175147?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=2956729375562175147' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/2956729375562175147'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/2956729375562175147'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2011/10/picking-values-from-point-in-mayavi2.html' title='Picking values from a point in Mayavi2'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-1k5M4PBbKr0/TqzxSx9jA3I/AAAAAAAAIOA/s8hDByK1WIw/s72-c/SelectScalar.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-8865618882833534576</id><published>2011-10-28T03:57:00.000-05:00</published><updated>2011-10-28T03:57:13.256-05:00</updated><title type='text'>Finding files from Shell</title><content type='html'>A quick mini wiki of my frequency used options for find files on Shell.&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Find files containing a string in filenames, e.g., &lt;pre&gt;find ./src/ -name ".cxx"&lt;/pre&gt;This finds all files of suffix &lt;code&gt;.cxx&lt;/code&gt; under path &lt;code&gt;./src/&lt;/code&gt;, which is a folder on current Path.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Find files containing a string in filenames and delete them, e.g., &lt;pre&gt;find . -mindepth 1 -name '.*' -delete&lt;/pre&gt;&lt;/li&gt;&lt;li&gt;Find folders containing a string in filenames and delete them, e.g., &lt;pre&gt;find .  -name "CVS" -exec rm -rf {} \;&lt;/pre&gt;Please note the direction of slash in the line above. It's backslash, not forward slash. You can use the &lt;code&gt;-exec&lt;/code&gt; option to do everything you wanna do on the shell.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-8865618882833534576?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=8865618882833534576' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/8865618882833534576'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/8865618882833534576'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2011/10/finding-files-from-shell.html' title='Finding files from Shell'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-8780220774559312579</id><published>2011-10-24T21:48:00.000-05:00</published><updated>2011-10-24T21:48:36.812-05:00</updated><title type='text'>Deleting all FreeSurfer original files in surf folder</title><content type='html'>I need to delete, or purge, all original files in FreeSurfer's $subject/surf folder - because i only need my result files in that folder but not original ones.&lt;br /&gt;&lt;br /&gt;Here is a Shell script that i hope to help others, who also need to do the same. Please replace SUBJECT by the subject ID. I assume you have already setup &lt;code&gt;$SUBJECTD_DIR&lt;/code&gt; environment variable. You may also replace $D by a real path. You can also embed the script below into a loop block so you can process many surf folders at once. &lt;br /&gt;&lt;br /&gt;&lt;pre&gt;#!/bin/sh&lt;br /&gt;   $D=$SUBJECTS_DIR/SUBJECTID/surf&lt;br /&gt;   echo $D&lt;br /&gt;   rm $D/rh.smoothwm.C.crv&lt;br /&gt;   rm $D/ rh.smoothwm.FI.crv&lt;br /&gt;   rm $D/rh.smoothwm.H.crv&lt;br /&gt;   rm $D/rh.smoothwm.K1.crv&lt;br /&gt;   rm $D/rh.smoothwm.K2.crv&lt;br /&gt;   rm $D/rh.smoothwm.K.crv&lt;br /&gt;   rm $D/rh.smoothwm.nofix&lt;br /&gt;   rm $D/rh.smoothwm.S.crv&lt;br /&gt;   rm $D/rh.sphere&lt;br /&gt;   rm $D/rh.sphere.reg&lt;br /&gt;   rm $D/rh.sulc&lt;br /&gt;   rm $D/rh.thickness&lt;br /&gt;   rm $D/rh.volume&lt;br /&gt;   rm $D/rh.white&lt;br /&gt;   rm $D/lh.sphere&lt;br /&gt;   rm $D/lh.sphere.reg&lt;br /&gt;   rm $D/lh.sulc&lt;br /&gt;   rm $D/lh.thickness&lt;br /&gt;   rm $D/lh.volume&lt;br /&gt;   rm $D/lh.white&lt;br /&gt;   rm $D/rh.area&lt;br /&gt;   rm $D/rh.area.mid&lt;br /&gt;   rm $D/rh.area.pial&lt;br /&gt;   rm $D/rh.avg_curv&lt;br /&gt;   rm $D/rh.curv&lt;br /&gt;   rm $D/rh.curv.pial&lt;br /&gt;   rm $D/rh.defect_borders&lt;br /&gt;   rm $D/rh.defect_chull&lt;br /&gt;   rm $D/rh.defect_labels&lt;br /&gt;   rm $D/rh.inflated&lt;br /&gt;   rm $D/rh.inflated.H&lt;br /&gt;   rm $D/rh.inflated.K&lt;br /&gt;   rm $D/rh.inflated.nofix&lt;br /&gt;   rm $D/rh.jacobian_white&lt;br /&gt;  rm $D/rh.orig&lt;br /&gt;  rm $D/rh.orig.nofix&lt;br /&gt;  rm $D/rh.pial&lt;br /&gt;  rm $D/rh.qsphere.nofix&lt;br /&gt;  rm $D/rh.smoothwm&lt;br /&gt;  rm $D/rh.smoothwm.BE.crv&lt;br /&gt;  rm $D/lh.area&lt;br /&gt;  rm $D/lh.area.mid&lt;br /&gt;  rm $D/lh.area.pial&lt;br /&gt;  rm $D/lh.avg_curv&lt;br /&gt;  rm $D/lh.curv&lt;br /&gt;  rm $D/lh.curv.pial&lt;br /&gt;  rm $D/lh.defect_borders&lt;br /&gt;  rm $D/lh.defect_chull&lt;br /&gt;  rm $D/lh.defect_labels&lt;br /&gt;  rm $D/lh.inflated&lt;br /&gt;  rm $D/lh.inflated.H&lt;br /&gt;  rm $D/lh.inflated.K&lt;br /&gt;  rm $D/lh.inflated.nofix&lt;br /&gt;  rm $D/lh.jacobian_white&lt;br /&gt;  rm $D/lh.orig&lt;br /&gt;  rm $D/lh.orig.nofix&lt;br /&gt;  rm $D/lh.pial&lt;br /&gt;  rm $D/lh.qsphere.nofix&lt;br /&gt;  rm $D/lh.smoothwm&lt;br /&gt;  rm $D/lh.smoothwm.BE.crv&lt;br /&gt;  rm $D/lh.smoothwm.C.crv&lt;br /&gt;  rm $D/lh.smoothwm.FI.crv&lt;br /&gt;  rm $D/lh.smoothwm.H.crv&lt;br /&gt;  rm $D/lh.smoothwm.K1.crv&lt;br /&gt;  rm $D/lh.smoothwm.K2.crv&lt;br /&gt;  rm $D/lh.smoothwm.K.crv&lt;br /&gt;  rm $D/lh.smoothwm.nofix&lt;br /&gt;  rm $D/lh.smoothwm.S.crv&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-8780220774559312579?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=8780220774559312579' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/8780220774559312579'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/8780220774559312579'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2011/10/deleting-all-freesurfer-original-files.html' title='Deleting all FreeSurfer original files in surf folder'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-3472077378731916198</id><published>2011-10-20T22:00:00.000-05:00</published><updated>2011-10-20T22:00:08.542-05:00</updated><title type='text'>What is death?</title><content type='html'>A friend, a non-religious friend, lately had a conversation with me. Triggered by Steve Jobs's death, he gave me the best plain (no fancy scientific, philosophical or religious words) definition to death I have ever heard in my life.&lt;br /&gt;&lt;br /&gt;He said, "Death means that you can no longer do things you wanna do."&lt;br /&gt;&lt;br /&gt;That's right. That's a big reason when I was young I was so afraid of dying. I thought, "I will have to say bye to all my toys and all my games."&lt;br /&gt;&lt;br /&gt;We are all gonna die.&lt;br /&gt;&lt;br /&gt;We all have things we love to do and dreams we are chasing. But, "&lt;i&gt;your time is limited.&lt;/i&gt;"&lt;br /&gt;&lt;br /&gt;From the movie "Bridge to Terabithia," I learned a quote of Teddy Roosevelt that "&lt;i&gt;Far and away the best prize that life has to offer is the chance to work hard at work worth doing.&lt;/i&gt;"&lt;br /&gt;&lt;br /&gt;Cherish the time that we can still do things we wanna do. It's very luxury.&lt;br /&gt;&lt;br /&gt;PS: When I was young, i heard a Chinese proverb, saying "Given an inch of gold and an inch of time, you cannot buy the inch of time by the inch of gold." (一寸光阴一寸金，寸金难买寸光阴)&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-3472077378731916198?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=3472077378731916198' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/3472077378731916198'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/3472077378731916198'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2011/10/what-is-death.html' title='What is death?'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-6760943410688065426</id><published>2011-10-18T18:54:00.000-05:00</published><updated>2011-10-18T18:54:50.303-05:00</updated><title type='text'>Best Asian font ever. And it's on Mac.</title><content type='html'>I would have to admit that Apple makes high quality fonts, even for Asian languages.&lt;br /&gt;&lt;br /&gt;Here is an example.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-EGJ_z-UmwDo/Tp4RgOEP0cI/AAAAAAAAIM8/RGw7uwnnyTY/s1600/testfont.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/-EGJ_z-UmwDo/Tp4RgOEP0cI/AAAAAAAAIM8/RGw7uwnnyTY/s1600/testfont.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-6760943410688065426?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=6760943410688065426' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/6760943410688065426'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/6760943410688065426'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2011/10/best-asian-font-ever-and-its-on-mac.html' title='Best Asian font ever. And it&apos;s on Mac.'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-EGJ_z-UmwDo/Tp4RgOEP0cI/AAAAAAAAIM8/RGw7uwnnyTY/s72-c/testfont.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-422668454226359347</id><published>2011-10-18T00:00:00.003-05:00</published><updated>2011-10-18T00:08:15.761-05:00</updated><title type='text'>I love you, West Texas!</title><content type='html'>I finally, experienced the first sand storm in Lubbock. I have been waiting to see this&amp;nbsp;extraordinary&amp;nbsp;natural power for more than 4 years!&lt;br /&gt;&lt;br /&gt;A &lt;a href="http://www.kcbd.com/story/15715382/wall-of-dust-sweeps-across-south-plains?autoStart=true&amp;amp;topVideoCatNo=default&amp;amp;clipId=6359354#.Tpzs5hxcgXw.facebook"&gt;local news network reported&lt;/a&gt; that the wind lifted "one FedEx jumbo jet completely off its front wheels, pointing its nose toward the sky while it was still on the ground."&lt;br /&gt;&lt;br /&gt;The news network also shows how the sand storm invaded the city. OMG, when it came, i really couldn't see any light from the outside of the window.&lt;br /&gt;&lt;br /&gt;&lt;script src="http://www.KCBD.com/global/video/videoplayer.js?rnd=220431;hostDomain=www.KCBD.com;playerWidth=480;playerHeight=270;isShowIcon=true;clipId=6359354;flvUri=;partnerclipid=;adTag=News;advertisingZone=;enableAds=true;landingPage=;islandingPageoverride=false;playerType=STANDARD_EMBEDDEDscript;controlsType=overlay" type="text/javascript"&gt;&lt;/script&gt;&lt;br /&gt;&lt;br /&gt;Here are two videos I found on Youtube. You can find a lot more.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;object class="BLOGGER-youtube-video" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" data-thumbnail-src="http://3.gvt0.com/vi/CZ8XZ3L2Fe8/0.jpg" height="266" width="320"&gt;&lt;param name="movie" value="http://www.youtube.com/v/CZ8XZ3L2Fe8&amp;fs=1&amp;source=uds" /&gt;&lt;param name="bgcolor" value="#FFFFFF" /&gt;&lt;embed width="320" height="266"  src="http://www.youtube.com/v/CZ8XZ3L2Fe8&amp;fs=1&amp;source=uds" type="application/x-shockwave-flash"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;object class="BLOGGER-youtube-video" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" data-thumbnail-src="http://1.gvt0.com/vi/tauoBRoRlzU/0.jpg" height="266" width="320"&gt;&lt;param name="movie" value="http://www.youtube.com/v/tauoBRoRlzU&amp;fs=1&amp;source=uds" /&gt;&lt;param name="bgcolor" value="#FFFFFF" /&gt;&lt;embed width="320" height="266"  src="http://www.youtube.com/v/tauoBRoRlzU&amp;fs=1&amp;source=uds" type="application/x-shockwave-flash"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Allow me to be religious in this geeky blog. Praise the God, for the power He has and the wonder He made. May He bless my beloved West Texas, forever!&lt;br /&gt;&lt;br /&gt;Tonight, when I said I loved something BIG (like this) that you cannot see in Canada, a Canadian girl replied this back to me, which is also funny.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;object class="BLOGGER-youtube-video" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" data-thumbnail-src="http://3.gvt0.com/vi/9vxDDcTc64c/0.jpg" height="266" width="320"&gt;&lt;param name="movie" value="http://www.youtube.com/v/9vxDDcTc64c&amp;fs=1&amp;source=uds" /&gt;&lt;param name="bgcolor" value="#FFFFFF" /&gt;&lt;embed width="320" height="266"  src="http://www.youtube.com/v/9vxDDcTc64c&amp;fs=1&amp;source=uds" type="application/x-shockwave-flash"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-422668454226359347?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=422668454226359347' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/422668454226359347'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/422668454226359347'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2011/10/i-love-you-west-texas.html' title='I love you, West Texas!'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-1961066905845077233</id><published>2011-10-11T22:15:00.000-05:00</published><updated>2011-10-11T22:15:34.055-05:00</updated><title type='text'>Font matters, on papers and webpages</title><content type='html'>by Forrest Sheng Bao http://fsbao.net&lt;br /&gt;&lt;br /&gt;Kindle does not like Modern Serif fonts!&lt;br /&gt;&lt;br /&gt;I just got a Kindle 3 from a friend. I tried to read some PDF papers on it. But the experience was horrible! It took me longer than normal to recognize letters in words. They are so blur and dim to my eyes. Since those papers are written by myself, I thought that changing font type or size may help. So I studied fonts today, to the best of my time allowance and brain power.&lt;br /&gt;&lt;br /&gt;So a flash card about fonts&lt;br /&gt;&lt;ul&gt;&lt;li&gt;There are 4 major types of fonts, Serif, San Serif, typewritter and handwritten.&amp;nbsp;&lt;/li&gt;&lt;li&gt;On most publications (papers, newspapers, magazines) you see, &lt;a href="http://en.wikipedia.org/wiki/Sans-serif"&gt;San-Serif&lt;/a&gt; fonts are used for titles and &lt;a href="http://en.wikipedia.org/wiki/Serif"&gt;Serif&lt;/a&gt; fonts are used for contents, because most people feel (including me) Serif fonts more pleasant than San-Serif fonts.&lt;/li&gt;&lt;li&gt;Besides titles, San-Serif fonts are widely used at places where people should pay attention to, such as signs, presentation slides, trademarks, etc.&amp;nbsp;&lt;/li&gt;&lt;li&gt;In each of these 4 types, some can be classified as &lt;a href="http://en.wikipedia.org/wiki/Didot_(typeface)"&gt;Modern&lt;/a&gt;. Modern fonts have high contrast between thick and thin curves.&lt;/li&gt;&lt;li&gt;Also, in each of these 4 types, some have the name Mono in font name, meaning &lt;a href="http://en.wikipedia.org/wiki/Monospaced_font"&gt;monospaced&lt;/a&gt;, i.e., fixed width for all symbols, such as &lt;a href="http://en.wikipedia.org/wiki/Courier_(typeface)"&gt;Courier&lt;/a&gt;.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;Serif fonts look great on hardcopies but not always so on digital devices. The default LaTeX font, Computer Modern Serif looks horrible on Kindle. You may also notice many webpages in San-Serif fonts, such as &lt;a href="http://en.wikipedia.org/wiki/Helvetica"&gt;Helvetica&lt;/a&gt;. Even cell phone interfaces. Why? Because pixels on digital device are much larger than ink drops. Therefore, Serif fonts look blur and difficult to read. Serif fonts look even worse when they are magnified (e.g.,&amp;nbsp;&lt;a href="http://webdesignref.com/examples/textex.htm"&gt;http://webdesignref.com/examples/textex.htm&lt;/a&gt;).&amp;nbsp;Computer algorithms are also optimized for San-Serif fonts. Like below are font&amp;nbsp;appearance&amp;nbsp;settings of Ubuntu Linux.&lt;br /&gt;&lt;br /&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/-fFDsYyBW-Zs/TpT5LvIvZpI/AAAAAAAAIMY/e2LHzOwD4D4/s1600/Screenshot-Font+Rendering+Details.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="299" src="http://3.bp.blogspot.com/-fFDsYyBW-Zs/TpT5LvIvZpI/AAAAAAAAIMY/e2LHzOwD4D4/s320/Screenshot-Font+Rendering+Details.png" width="320" /&gt;&lt;/a&gt;&lt;/td&gt; &lt;td&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/-s5z29fnsKBg/TpT45cE_nxI/AAAAAAAAIMQ/H9vOOvXpR_k/s1600/Screenshot-Appearance+Preferences.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="271" src="http://4.bp.blogspot.com/-s5z29fnsKBg/TpT45cE_nxI/AAAAAAAAIMQ/H9vOOvXpR_k/s320/Screenshot-Appearance+Preferences.png" width="320" /&gt;&lt;/a&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;But since Serif fonts look more pleasant, some new Serif fonts have come out in the mobile era, such as Google's &lt;a href="http://en.wikipedia.org/wiki/Droid_(font)"&gt;Droid Serif&lt;/a&gt;. To me, with proper type and size, Serif fonts have no problem on digital devices.&lt;br /&gt;&lt;br /&gt;For similar reason, Modern fonts are not welcomed on digital device - too many details to render.&lt;br /&gt;&lt;br /&gt;So where to get pretty and open source fonts? Here are my recommendations:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Web fonts: Google Web Fonts&amp;nbsp;&lt;a href="http://www.google.com/webfonts"&gt;http://www.google.com/webfonts&lt;/a&gt;&amp;nbsp;&lt;/li&gt;&lt;li&gt;Publication fonts: LaTeX Font Catalogue:&amp;nbsp;&lt;a href="http://www.tug.dk/FontCatalogue/"&gt;http://www.tug.dk/FontCatalogue/&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Software fonts: Ubuntu Font Family:&amp;nbsp;&lt;a href="http://font.ubuntu.com/"&gt;http://font.ubuntu.com/&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;Many years ago, I started reading and writing (in LaTeX) papers. I noticed 3 interesting things.&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Letters on most papers looked blur on the computer screen (in PDF) but very clear after being printed out on papers.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Knuth spent much time on developing METAFONT and designing the font for LaTeX.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Papers prepared in&amp;nbsp;LaTeX's default font looked more appealing than papers in Micro$oft Times New Roman.&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;Now I've got all their answers.&lt;br /&gt;&lt;br /&gt;PS: Microsoft's Windows cannot even render their own fonts properly. See how zigzag the edges are. Image not scaled.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-4ChNPTeshgw/TpUEaeK32eI/AAAAAAAAIMg/UhrC_7Cs7V8/s1600/MicrosoftFont.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-4ChNPTeshgw/TpUEaeK32eI/AAAAAAAAIMg/UhrC_7Cs7V8/s1600/MicrosoftFont.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-1961066905845077233?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=1961066905845077233' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/1961066905845077233'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/1961066905845077233'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2011/10/font-matters-on-papers-and-webpages.html' title='Font matters, on papers and webpages'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-fFDsYyBW-Zs/TpT5LvIvZpI/AAAAAAAAIMY/e2LHzOwD4D4/s72-c/Screenshot-Font+Rendering+Details.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-3381402326311331828</id><published>2011-10-10T21:19:00.002-05:00</published><updated>2011-10-10T21:21:30.858-05:00</updated><title type='text'>Some very simple examples for Linux command ls</title><content type='html'>&lt;code&gt;ls&lt;/code&gt; is one of the few frequently used commands in my daily life. I decide to show some examples of it so my colleagues can easily pick up. &lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;code&gt;ls -rtl *.ac&lt;/code&gt;: Show all *.ac files and their details (&lt;code&gt;-l&lt;/code&gt;), sorted by their modification time (&lt;code&gt;-t&lt;/code&gt;) in ascending order (&lt;code&gt;-r&lt;/code&gt;)&lt;/li&gt;&lt;li&gt;&lt;code&gt;ls -rSl *.ac&lt;/code&gt;: Show all *.ac files and their details (&lt;code&gt;-l&lt;/code&gt;), sorted by their size (&lt;code&gt;-S&lt;/code&gt;) in ascending order (&lt;code&gt;-r&lt;/code&gt;) &lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;A note for using &lt;code&gt;ls&lt;/code&gt; on Mac OS X: Using option &lt;code&gt;-G&lt;/code&gt; will give folder and non-folder files different colors.&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-3381402326311331828?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=3381402326311331828' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/3381402326311331828'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/3381402326311331828'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2011/10/some-very-simple-examples-for-linux.html' title='Some very simple examples for Linux command ls'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-2527928964441664369</id><published>2011-10-03T14:41:00.001-05:00</published><updated>2011-10-03T14:42:06.945-05:00</updated><title type='text'>Giving $30 to Mozilla Foundation today</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-bTLuOKW_MVc/TooPY-IfifI/AAAAAAAAIH0/DZNAu8ZM2EY/s1600/Mozilla.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://3.bp.blogspot.com/-bTLuOKW_MVc/TooPY-IfifI/AAAAAAAAIH0/DZNAu8ZM2EY/s400/Mozilla.png" width="399" /&gt;&lt;/a&gt;&lt;/div&gt;I donated $30 to Mozilla Foundation today - because Firefox is so far the safest browser to me.&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-2527928964441664369?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=2527928964441664369' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/2527928964441664369'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/2527928964441664369'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2011/10/giving-30-to-mozilla-foundation-today.html' title='Giving $30 to Mozilla Foundation today'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-bTLuOKW_MVc/TooPY-IfifI/AAAAAAAAIH0/DZNAu8ZM2EY/s72-c/Mozilla.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-1562116068089979178</id><published>2011-09-24T16:30:00.000-05:00</published><updated>2011-09-24T16:30:56.857-05:00</updated><title type='text'>Windows 8 should not drastically change user interface</title><content type='html'>by Forrest Sheng Bao &lt;a href="http://fsbao.net/"&gt;http://fsbao.net&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;One last thing a developer should do when upgrading a software application is to drastically change the user interface (UI). Users' purpose of using software is not just to use it, but to get things done. Unless you make their lives easier, they will hate the change, and even go back to old versions.&lt;br /&gt;&lt;br /&gt;Sadly, Windows 8 made the mistake. To be short, I cannot find the place to restart the PC, nor can I find the Program menu after clicking Start button. Why would I use an OS that does not give me quick access to all my installed applications?&lt;br /&gt;&lt;br /&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-gufinRhNhmM/Tn5LcZK8UlI/AAAAAAAAIHU/UarEt1wHjKA/s1600/Poweroff.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="250" src="http://3.bp.blogspot.com/-gufinRhNhmM/Tn5LcZK8UlI/AAAAAAAAIHU/UarEt1wHjKA/s320/Poweroff.png" width="320" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;I cannot find anywhere to power off the computer.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;The new UI isn't making life easier. For example, Windows 8 puts soooooo many buttons around the Windows Explorer (the window you use to manage files). The space to view files is squeezed. And those buttons are very stupidly designed, like the one introduced in Micro$oft Office 2007. Too many stuff, too many layers. Are we flying a jet plane?&lt;br /&gt;&lt;br /&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-xnYEgDtWrkY/Tn5KOnaQTPI/AAAAAAAAIHM/Mh27JhqOqW8/s1600/Screenshot-Windows8+%255BRunning%255D+-+Oracle+VM+VirtualBox-2.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="300" src="http://4.bp.blogspot.com/-xnYEgDtWrkY/Tn5KOnaQTPI/AAAAAAAAIHM/Mh27JhqOqW8/s400/Screenshot-Windows8+%255BRunning%255D+-+Oracle+VM+VirtualBox-2.png" width="400" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Too many buttons.&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;The new UI is a very simple shell over old Windows. For example, the Control Panel on the entry interface cannot allow you to set everything. When you click "More settings", it brings you back to old Windows Control Panel. Then, what's the purpose of this? Why would someone pay, let's say $50 upgrading fee, just for that?&lt;br /&gt;&lt;br /&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-dSofrlXJ1uA/Tn5LTNUo34I/AAAAAAAAIHQ/XZenf-OCGUo/s1600/More-Settings.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="320" src="http://3.bp.blogspot.com/-dSofrlXJ1uA/Tn5LTNUo34I/AAAAAAAAIHQ/XZenf-OCGUo/s320/More-Settings.png" width="247" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;So, there is another Control Panel for More settings? &amp;nbsp;And the "S" in "settings" isn't capitalized as other options?&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;A good news is, Windows 8 will be a good chance for Mac OS X and Linux. When people are tired of Windows, they will look for alternatives.&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-1562116068089979178?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=1562116068089979178' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/1562116068089979178'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/1562116068089979178'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2011/09/windows-8-should-not-drastically-change.html' title='Windows 8 should not drastically change user interface'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-gufinRhNhmM/Tn5LcZK8UlI/AAAAAAAAIHU/UarEt1wHjKA/s72-c/Poweroff.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-9182639059600938093</id><published>2011-09-23T15:44:00.002-05:00</published><updated>2011-09-23T15:49:34.399-05:00</updated><title type='text'>Money, killing the fun part of a startup</title><content type='html'>“Being the richest man in the cemetery doesn’t matter to me … Going to bed at night saying we’ve done something wonderful… that’s what matters to me.” -Steve Jobs said in an interview with The Wall Street Journal, May 25, 1993&lt;br /&gt;&lt;br /&gt;by Forrest Sheng Bao http://fsbao.net&lt;br /&gt;&lt;br /&gt;I am interested in startups. I have a couple [of] ideas and energetic friends who may join me if I begin. But I never take any action.&lt;br /&gt;&lt;br /&gt;The reason is very simple, a startup will soon lose its fun part when people start thinking about monetization.&lt;br /&gt;&lt;br /&gt;A lot of people watched Facebook's F8 yesterday. I was kinda disappointed. I couldn't see anything wonderful or fun or awesome there. Actually, I was sorta pissed off when I saw several speakers dressing in suits. Thank God, Mark was wearing a T-shirt. New features of Facebook announced on F8 have little technology awesomeness. They only keep people from getting bored about Facebook. The ultimate goal of doing those, to the best of my intuition, is to make a lot of money from Wall Street investors in the potential IPO - because Google+ does not have so many users as of now.&lt;br /&gt;&lt;br /&gt;(Facebook's News Feed ranking algorithm, or their "People you may know" algorithm do not work very well, really.)&lt;br /&gt;&lt;br /&gt;When the focus of a startup shifts to making money from building something really cool, there is no fun at all. I am not saying that a startup should not make money. But money really shouldn't be the dominant focus.&lt;br /&gt;&lt;br /&gt;Money cannot buy everything. Money cannot buy fun. Fun in my life is a big reason I haven't committed suicide, seriously. Building something technologically creative and advancing is the fun part of a startup to me and that's the main reason I dream about my startup. &lt;br /&gt;&lt;br /&gt;Therefore, if I begin a startup, I will never pursue going to NASDAQ. Canonical, the company behind Ubuntu Linux, has shown me a good example. However, on the other side, Google has also shown me a good example after going public. Google is doing a lot of cool things, such as free hosting to open source projects at Google Code - for many small projects, Google Code is more suitable than SourceForge. &lt;br /&gt;&lt;br /&gt;When I have some money, I'll do something that will shape the world better, rather than turning money into expensive wine on the dinner table of the rich. Maybe a hungry kid in Africa needs a spoon of mashed potato more than how much a millionaire needs a glass of 100-year-old wine.&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-9182639059600938093?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=9182639059600938093' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/9182639059600938093'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/9182639059600938093'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2011/09/money-killing-fun-part-of-startup.html' title='Money, killing the fun part of a startup'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-3928443518392494447</id><published>2011-09-22T09:35:00.000-05:00</published><updated>2011-09-22T09:35:50.660-05:00</updated><title type='text'>scp and rsync: two cool UNIX commands for file transferring between computers</title><content type='html'>by Forrest Sheng Bao &lt;a href="http://fsbao.net/"&gt;http://fsbao.net&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This is a simple tutorial for my colleagues who need to transfer files between Linux/Mac OS X boxes. I love scp and rsync. They are both very simple and there is no need to start a GUI. &lt;br /&gt;&lt;br /&gt;&lt;h3&gt;scp&lt;/h3&gt;scp means "SSH copy". Thus you can copy a file from a server to you computer (or even another server) via SSH. It's syntax is very simple. &lt;br /&gt;&lt;pre&gt;scp OPTIONS SOURCE DESTINATION&lt;/pre&gt;For example, if I wanna copy all files under /data/MEG/MEG077 on example.com to my current computer, I will do this &lt;br /&gt;&lt;pre&gt;scp -r  example.com:/data/MEG/MEG077/* .&lt;/pre&gt;The &lt;code&gt;-r&lt;/code&gt; option means "recursive" that I need to copy everything in &lt;code&gt;MEG077&lt;/code&gt; hierarchically. &lt;br /&gt;&lt;br /&gt;&lt;h3&gt;rsync&lt;/h3&gt;rsync is good to synchronize files incrementally. "Incrementally" means only copying changed files. It's syntax is as simple as scp. &lt;br /&gt;&lt;pre&gt;rsync OPTIONS SOURCE DESTINATION OPTIONS&lt;/pre&gt;For example, if I wanna make sure everything under &lt;code&gt;/data&lt;/code&gt; on &lt;code&gt;example.com&lt;/code&gt;, except hidden files, is synchronized to my current folder, I will do this. &lt;br /&gt;&lt;pre&gt;rsync -azv --delete example.com:/data/ . --exclulde=".*"&lt;/pre&gt;&lt;br /&gt;In &lt;code&gt;-azv&lt;/code&gt; options, &lt;code&gt;z&lt;/code&gt; means compressing the transmission while &lt;code&gt;v&lt;/code&gt; means verbose. The &lt;code&gt;--delete&lt;/code&gt; option means deleting files that are not on the source but the destination. The &lt;code&gt;--exclude&lt;/code&gt; option specifies the filename pattern to avoid in synchronization. Since hidden files on Linux/Mac OS X begin their filename with a dot, &lt;code&gt;--exclulde=".*"&lt;/code&gt; means avoiding all hidden files. &lt;br /&gt;&lt;br /&gt;Please be aware of the last backslash (/) after &lt;code&gt;example.com:/data&lt;/code&gt;. When there IS a backslash, it means all &lt;b&gt;subfolders&lt;/b&gt; under that path. If there is none, it means the folder itself specified by the path. The same rule applies to both source and destination. &lt;br /&gt;&lt;br /&gt;You can also synchronize your local folder to remote servers, or even between two local folders, using rsync.&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-3928443518392494447?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=3928443518392494447' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/3928443518392494447'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/3928443518392494447'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2011/09/scp-and-rsync-two-cool-unix-commands.html' title='scp and rsync: two cool UNIX commands for file transferring between computers'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-6601370146783786542</id><published>2011-09-15T17:33:00.003-05:00</published><updated>2011-09-15T17:35:45.712-05:00</updated><title type='text'>Using your own symbols in geda/gschem</title><content type='html'>by Forrest Sheng Bao http://fsbao.net&lt;br /&gt;&lt;br /&gt;gEDA is a cool tool for making electronic circuits schematics and laying out PCBs. Sometimes, we create our own symbols. To use them, just set your &lt;code&gt;~/gEDA/gschemrc&lt;/code&gt; like this: &lt;br /&gt;&lt;pre&gt;(component-library "/forrest/work/Homework/Medical_Instruments/project/circuit")&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;You may also do this in system-wide or directory-wide manners.&lt;br /&gt;&lt;br /&gt;PS: For some reason, a lot of pages i found via googling said you need to edit &lt;code&gt;~/.gEDA/gafrc&lt;/code&gt;. But it doesn't work for me.&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-6601370146783786542?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=6601370146783786542' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/6601370146783786542'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/6601370146783786542'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2011/09/using-your-own-symbols-in-gedagschem_15.html' title='Using your own symbols in geda/gschem'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-5764689579471427909</id><published>2011-09-12T10:31:00.001-05:00</published><updated>2011-09-12T10:32:14.056-05:00</updated><title type='text'>Industry research or academia?</title><content type='html'>by Forrest Sheng Bao http://fsbao.net&lt;br /&gt;&lt;br /&gt;I got some cards, like postcards, from Google Research when I was at AAAI-11 last month in San Francisco. On those cards, scientists talk about the reason they chose Google Research, mostly, instead of academia. I like these quotes very much:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;"Research at Google is inspired by real problems." - Corinna Cortes&lt;/li&gt;&lt;li&gt;"I'm at Google because that's where the data is." - Peter Norvig&lt;/li&gt;&lt;li&gt;"Our lab is the whole Internet" - Fernando Pereira&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;Real data and real problems! I like to see how my research can come out with something that can change people's life. Like, I need some sort of feedback to my work. O/w, it would be like playing with a dummy pet that does not respond you.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;However, other than working for industry research, academia or non-profit research organizations, I think there is another way: starting up your business and funding your own research using your profit.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The cards!&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-xRtu9mkn2ec/Tm4gh5LeBNI/AAAAAAAAIBU/lmNeh2oOOXw/s1600/Cortes.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="463" src="http://3.bp.blogspot.com/-xRtu9mkn2ec/Tm4gh5LeBNI/AAAAAAAAIBU/lmNeh2oOOXw/s640/Cortes.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-z-qAry9-tks/Tm4gr2TAK8I/AAAAAAAAIBo/F4VqkVIUV0k/s1600/Welsh.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="464" src="http://1.bp.blogspot.com/-z-qAry9-tks/Tm4gr2TAK8I/AAAAAAAAIBo/F4VqkVIUV0k/s640/Welsh.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-sF465hc3yPg/Tm4gh6nosAI/AAAAAAAAIBY/58EfUaf8C-o/s1600/Pereira.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="466" src="http://1.bp.blogspot.com/-sF465hc3yPg/Tm4gh6nosAI/AAAAAAAAIBY/58EfUaf8C-o/s640/Pereira.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-4waB7mG_BbE/Tm4giYlRNdI/AAAAAAAAIBc/LJS3hMfwPsM/s1600/Petrov.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="464" src="http://3.bp.blogspot.com/-4waB7mG_BbE/Tm4giYlRNdI/AAAAAAAAIBc/LJS3hMfwPsM/s640/Petrov.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-1lNIKqmpz-I/Tm4giLfrsII/AAAAAAAAIBg/SZycyWju_Hs/s1600/Norvig.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="462" src="http://4.bp.blogspot.com/-1lNIKqmpz-I/Tm4giLfrsII/AAAAAAAAIBg/SZycyWju_Hs/s640/Norvig.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-FEdw41lTspg/Tm4giinAlaI/AAAAAAAAIBk/HNnDI5r4k8U/s1600/Thrun.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="464" src="http://2.bp.blogspot.com/-FEdw41lTspg/Tm4giinAlaI/AAAAAAAAIBk/HNnDI5r4k8U/s640/Thrun.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-5764689579471427909?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=5764689579471427909' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/5764689579471427909'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/5764689579471427909'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2011/09/industry-research-or-academia.html' title='Industry research or academia?'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-xRtu9mkn2ec/Tm4gh5LeBNI/AAAAAAAAIBU/lmNeh2oOOXw/s72-c/Cortes.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-992655481563297905</id><published>2011-09-11T15:52:00.004-05:00</published><updated>2011-09-11T20:39:25.473-05:00</updated><title type='text'>Meaning of #domain declaration in answer set programming</title><content type='html'>by Forrest Sheng Bao &lt;a href="http://fsbao.net/"&gt;http://fsbao.net&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I just notice that a weight constraint acts ``oddly'' for variables declared in &lt;code&gt;#domain&lt;/code&gt; declaration in answer set programming (ASP). My grounder and solver are lparse and smodels.&lt;br /&gt;&lt;br /&gt;Here is a demo program: &lt;br /&gt;&lt;pre&gt;const n=2.&lt;br /&gt;step(0..n).&lt;br /&gt;&lt;br /&gt;#domain step(S).&lt;br /&gt;block(a). block(b). &lt;br /&gt;&lt;br /&gt;#domain block(B).&lt;br /&gt;&lt;br /&gt;1{put(X,S):block(X)}1 :- step(S), S &amp;lt; n . % rule 1&lt;br /&gt;&lt;br /&gt;1{gen(B,S)}1 :- step(S), S &amp;lt; n .          % rule 2&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;I thought I should get one and only one &lt;code&gt;put/2&lt;/code&gt; and &lt;code&gt;gen/2&lt;/code&gt; literal, respectively, for each S, because the lower and upper bounds are both 1. But this is what I got:&lt;br /&gt;&lt;pre&gt;Stable Model: put(a,0) put(a,1) gen(b,0) gen(b,1) gen(a,0) gen(a,1) step(0) step(1) step(2) block(b) block(a) &lt;/pre&gt;&lt;br /&gt;For each step S, I got exactly one put/2 literal whereas I got two gen/2 literals. Thus, I have &lt;code&gt;gen(a,0)&lt;/code&gt;, &lt;code&gt;gen(b,0)&lt;/code&gt;, &lt;code&gt;gen(a,1)&lt;/code&gt; and &lt;code&gt;gen(b,1)&lt;/code&gt;. They are supported by Rules 1 and 2, respectively. A difference, which is the cause, between Rule 1 and Rule 2 is &lt;code&gt;X&lt;/code&gt; is not declared in &lt;code&gt;#domain&lt;/code&gt; declaration whereas &lt;code&gt;B&lt;/code&gt; is.&lt;br /&gt;&lt;br /&gt;With the help of Dr. Zhizheng Zhang, the reason was found out. Lparse manual explains the meaning of &lt;code&gt;#domain a(X)&lt;/code&gt;, "adding a(X) into the tails of all rules where X occurs." Thus, Rule 2 is actually: &lt;pre&gt;1{gen(B,S)}1 :- step(S), S &amp;lt; n, block(B).&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-992655481563297905?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=992655481563297905' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/992655481563297905'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/992655481563297905'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2011/09/weight-constraints-and-domain.html' title='Meaning of #domain declaration in answer set programming'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-8754512148932197328</id><published>2011-09-10T16:20:00.000-05:00</published><updated>2011-09-10T16:20:55.877-05:00</updated><title type='text'>When the Cloud messes with you</title><content type='html'>by Forrest Sheng Bao http://fsbao.net &lt;br /&gt;&lt;br /&gt;I think a big difference between cloud computing and grid or cluster computing is that you use Cloud as a storage that you frequently access. In this sense, Cloud is our great friend. However, today I realise this could be a point where Cloud messes with you.&lt;br /&gt;&lt;br /&gt;I created a lot of small files (in many deeply hiearchical folders) by mistake on a Dropbox-watching folder. I have 4 computers, all connected to Dropbox. When I was deleting files on one computer, Dropbox was adding them to another computer, and later, it synced the files I just deleted back!&lt;br /&gt;&lt;br /&gt;So I thought about the reason. This is what I got on my Linux server - where files are always synchronized with my dekstops by Dropbox.&lt;br /&gt;&lt;blockquote&gt;&lt;div style="text-align: left;"&gt;&lt;pre&gt;$ python ~/bin/dropbox.py status&lt;br /&gt;Uploading 13,904 files...&lt;br /&gt;Indexing 24,132 files...&lt;br /&gt;Downloading file list...&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/blockquote&gt;Too many files are the cause.&amp;nbsp; This is what happened, to the best of my brain power:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;When file F is deleted on computer A, it won't be removed from the Cloud unless local synchronzation client indexes it and/or has time to report the Cloud.&lt;/li&gt;&lt;li&gt;Before that, synchronization client on computer B will download F.&amp;nbsp;&lt;/li&gt;&lt;li&gt;After A reports the Cloud to remove F, it will take some time for the Cloud tells B to do the same. In my case, "some time" is long enough to cause problem.&lt;/li&gt;&lt;li&gt;It is very possible that before 3 happens, B indexes F and considers it as a new file and upload it. &lt;/li&gt;&lt;li&gt;Since F now is a new file recently uploaded, the Cloud will tell A to download F.&lt;/li&gt;&lt;li&gt;This may take forever - maybe even a dead loop. &lt;/li&gt;&lt;/ol&gt;The solution is very easy: No uploading, indexing and downloading file list at the same time. The lantency to go over all files may cause problems. I finally calmed everything down by connecting only one computer to Dropbox at one time. &lt;br /&gt;&lt;br /&gt;But Dropbox uses a non-conservative strategy for quick synchronization across computers.&lt;br /&gt;&lt;br /&gt;This purpose of this blog post is not to attack Dropbox, which, i have no doubt,&amp;nbsp; is a great company. But this is a problem when using Cloud as main storage.&lt;br /&gt;&lt;br /&gt;(Picture) My precious Saturday afternoon:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-Ie3Xxpkl10Q/TmvT3UDTSrI/AAAAAAAAIBQ/sUjuZfCUmLc/s1600/BadCloud.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="1" src="http://2.bp.blogspot.com/-Ie3Xxpkl10Q/TmvT3UDTSrI/AAAAAAAAIBQ/sUjuZfCUmLc/s1600/BadCloud.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;I may make mistaking in steps 1-5, please feel free to tell me. I didn't think very carefully. &lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-8754512148932197328?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=8754512148932197328' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/8754512148932197328'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/8754512148932197328'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2011/09/when-cloud-messes-with-you.html' title='When the Cloud messes with you'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-Ie3Xxpkl10Q/TmvT3UDTSrI/AAAAAAAAIBQ/sUjuZfCUmLc/s72-c/BadCloud.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-774559816140649550</id><published>2011-09-01T16:26:00.001-05:00</published><updated>2011-09-01T16:27:31.290-05:00</updated><title type='text'>Dropbox, not a version control choice</title><content type='html'>I lately need to work on a program back and forth between Mac OS X and Linux.&lt;br /&gt;&lt;br /&gt;So I copied everything into a Dropbox folder, to edit the source code in Linux and compile it in Mac OS X. Then I noticed that something went wrong all the time. Anyway, i could not compile it. The Makefile generated from ./configure was always weird. &lt;br /&gt;&lt;br /&gt;But if I used scp to sync files, nothing went wrong.&lt;br /&gt;&lt;br /&gt;I don't know the reason yet. But I think it is because how Dropbox handles symbolic links. &lt;br /&gt;&lt;br /&gt;In conclusion, don't expect to use Dropbox as a collaborative version control system.&lt;br /&gt;&lt;br /&gt;PS: The reason i need to work on Linux and compile the code on Mac OS X is because Mac OS X has not-strong-enough memory protection mechanism. So the code that causes segmentation fault on Linux can run well on Mac OS X. And I don't have time to fix the problem now. &lt;br /&gt;&lt;br /&gt;So, conclusion 2: Mac OS X (at least 10.5 or 10.6) isn't as secure as as Linux (at least 2.6 kernel) on memory protection. &lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-774559816140649550?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=774559816140649550' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/774559816140649550'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/774559816140649550'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2011/09/dropbox-not-version-control-choice.html' title='Dropbox, not a version control choice'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-2722280301085929831</id><published>2011-08-22T14:04:00.001-05:00</published><updated>2011-08-26T01:13:41.302-05:00</updated><title type='text'>Why we need automated reasoning systems</title><content type='html'>When I am woring on knowledge representation and reasoning, I keep asking myself a question: Why do we need automated reasoning systems? &lt;br /&gt;&lt;br /&gt;I believe this is a strong enough case: &lt;a href="http://en.wikipedia.org/wiki/Air_France_Flight_447"&gt;2009 Air France Flight 447&lt;/a&gt;, crashing into the Atlantic due to pilots' errors. &lt;br /&gt;&lt;br /&gt;More details can be found at &lt;a href="http://www.usatoday.com/NEWS/usaedition/2011-05-31-AirFrance31_ST_U.htm"&gt;http://www.usatoday.com/NEWS/usaedition/2011-05-31-AirFrance31_ST_U.htm&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Human beings have many volunable "features." We panic when unfamiliar emergency happens. And this causes our brain no longer rational. Therefore, we need a rational assistant for that kinda cases.&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-2722280301085929831?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=2722280301085929831' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/2722280301085929831'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/2722280301085929831'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2011/08/why-we-need-automated-reasoning-systems.html' title='Why we need automated reasoning systems'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-9074398195638123858</id><published>2011-08-16T18:29:00.003-05:00</published><updated>2011-08-18T14:47:45.265-05:00</updated><title type='text'>Configuring PyAIMS on (Ubuntu) Linux</title><content type='html'>I need to user &lt;a href="http://brainvisa.info/doc/pyaims-4.1/sphinx/"&gt;PyAIMS&lt;/a&gt; recently. But BrainVISA's &lt;a href="http://brainvisa.info/download.html"&gt;installation documentation&lt;/a&gt; does NOT mention any configurations for PyAIMS. I can't find solutions on Google. So I had to randomly try. And below are steps that worked for me.&lt;br /&gt;&lt;br /&gt;Step 1: Add &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;lt;BrainVISA_Installation_Path&amp;gt;/python&lt;/span&gt; into your &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;$PYTHONPATH&lt;/span&gt;&lt;br /&gt;Step 2: Add &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;lt;BrainVISA_Installation_Path&amp;gt;/lib&lt;/span&gt; into your &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;$LD_LIBRARY_PATH &lt;/span&gt;&lt;br /&gt;Step 3: Add &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;lt;BrainVISA_Installation_Path&amp;gt;/share&lt;/span&gt; into your &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;$BRAINVISA_SHARE &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;For example, in my ~/.bashrc, i have these two lines:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/forrest/bin/brainvisa4/lib&lt;br /&gt;export PYTHONPATH=$PYTHONPATH:/home/forrest/bin/brainvisa4/python&lt;br /&gt;export BRAINVISA_SHARE=/home/forrest/bin/brainvisa4/share&lt;/pre&gt;&lt;br /&gt;Update at 2011-08-18:&lt;br /&gt;If you still get errors (e.g., segmentation fault) after the configuration above, try&amp;nbsp; the Python interpreter at &lt;code&gt;&amp;lt;BrainVISA_Installation_Path&amp;gt;/bin&lt;/code&gt; instead of your system Python interpreter. &lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-9074398195638123858?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=9074398195638123858' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/9074398195638123858'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/9074398195638123858'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2011/08/configuring-pyaims-on-ubuntu-linux.html' title='Configuring PyAIMS on (Ubuntu) Linux'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-8794613841457043450</id><published>2011-07-20T18:55:00.000-05:00</published><updated>2011-07-20T18:55:27.627-05:00</updated><title type='text'>STEM are the best-paid majors</title><content type='html'>Frankly, i really don't understand why there are so many people believing that&amp;nbsp; finance or business major is more profitable than STEM (Science, Technology, Engineering and Mathematics) major.&lt;br /&gt;&lt;br /&gt;I just saw this in IEEE Job Alerts mailing list.&amp;nbsp; &lt;a href="http://www.mnn.com/money/personal-finance/stories/report-finds-rising-pay-in-science-and-tech-jobs"&gt;http://www.mnn.com/money/personal-finance/stories/report-finds-rising-pay-in-science-and-tech-jobs&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Think about it. It is reasonable for a STEM guy to get high payment. What can really move human civilization forward? What can really create things people wanna buy at high prices? And, an easier major means more graduates, each of which is less valuable.&lt;br /&gt;&lt;br /&gt;The world is fair. Stop dreaming about high payment with a degree from a major that allows you to party everyday.&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-8794613841457043450?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=8794613841457043450' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/8794613841457043450'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/8794613841457043450'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2011/07/stem-are-best-paid-majors.html' title='STEM are the best-paid majors'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-4972806774315558017</id><published>2011-07-09T20:56:00.000-05:00</published><updated>2011-07-09T20:56:56.733-05:00</updated><title type='text'>Even logicians cannot understand?</title><content type='html'>Zack: I don't get it. Leonard: A dolphin might. - The Big Bang Theory, Season 4 Episode 10 &lt;br /&gt;&lt;br /&gt;by Forrest Sheng Bao http://fsbao.net&lt;br /&gt;&lt;br /&gt;From a practical perspective, I would like to admit that the reason logic programming isn't popular (as popular as empirical programming) is because it involves a lot of math on logics whereas not many people are trained on logics.&lt;br /&gt;&lt;br /&gt;Today, I came across a paper, Logic Programming with Defaults and Argumentation Theories at &lt;a href="http://www.cs.sunysb.edu/%7Ekifer/TechReports/LPDA09.pdf"&gt;http://www.cs.sunysb.edu/~kifer/TechReports/LPDA09.pdf&lt;/a&gt; It was published in 2009, at ICLP, the top conference on logic programming.&lt;br /&gt;&lt;br /&gt;A modern development in logic programming is the introduction of default negation, which brings in nonmonotonicity and can facilitate common-sense reasoning. But this paper says:&lt;br /&gt;&lt;br /&gt;"&lt;i&gt;default negation is too low-level a concept to be safely entrusted to a knowledge engineer who is not a trained logician."&amp;nbsp;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Oops! On top of that, the authors continue:&lt;i&gt;&amp;nbsp;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;" Anecdotal evidence suggests that logicians are also not doing much better when it comes to modeling concrete application domains using default negation as a sole tool.&lt;/i&gt;"&lt;br /&gt;&lt;br /&gt;I guess we need someone or someones to evangelize logical programming to people who may be in need of it, in a made-easy way.&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-4972806774315558017?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=4972806774315558017' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/4972806774315558017'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/4972806774315558017'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2011/07/even-logicians-cannot-understand.html' title='Even logicians cannot understand?'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-5711345854367459669</id><published>2011-07-02T15:19:00.000-05:00</published><updated>2011-07-02T15:19:45.818-05:00</updated><title type='text'>The schematic for my ECG sampling circuit</title><content type='html'>by Forrest Sheng Bao http://fsbao.net&lt;br /&gt;&lt;br /&gt;So here is the schematic of my ECG sampling circuit. I designed the circuit in fall 2010. &lt;br /&gt;&lt;br /&gt;I would like to say that TI's(well, Burr-Brown's) instrumentation amplifier is awesome. You just put things together and then they rock. No need to tune the peripheral circuit. It's kinda like out-of-the-box solutions. Since the gain can be very high (10000 times linear), i think they can even be used for EEG sampling circuit. &lt;br /&gt;&lt;br /&gt;I did not build the ADC circuit and interface to computers, but used NI &lt;a href="http://www.ni.com/mydaq/"&gt;myDAQ&lt;/a&gt;. The power supply for this circuit is also provided by NI myDAQ. &lt;br /&gt;&lt;br /&gt;There are three electrodes connected to human body, the belly (ground), the left wrist (one input), and the right wrist (the other input). &lt;br /&gt;&lt;br /&gt;This circuit can also sample signals output from NI myDAQ back to test the property of the circuit. Since the lowest resolution to NI myDAQ is 100mV, i used an op-amp (OPA177) as a voltage divider to scale down the output signal from NI myDAQ to its 1/10 (in voltage amplitude). &lt;br /&gt;&lt;br /&gt;The schematic was drawn by &lt;a href="http://www.gpleda.org/"&gt;gEDA/gschem&lt;/a&gt;. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-AsCugsNZjG8/Tg99UHqKwLI/AAAAAAAAHDQ/Xc8S_G8Yezw/s1600/ECG_circuit_dual_power.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="445" src="http://1.bp.blogspot.com/-AsCugsNZjG8/Tg99UHqKwLI/AAAAAAAAHDQ/Xc8S_G8Yezw/s640/ECG_circuit_dual_power.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-5711345854367459669?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=5711345854367459669' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/5711345854367459669'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/5711345854367459669'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2011/07/schematic-for-my-ecg-sampling-circuit.html' title='The schematic for my ECG sampling circuit'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-AsCugsNZjG8/Tg99UHqKwLI/AAAAAAAAHDQ/Xc8S_G8Yezw/s72-c/ECG_circuit_dual_power.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-7163447224209390525</id><published>2011-06-26T03:57:00.004-05:00</published><updated>2011-08-24T03:35:18.612-05:00</updated><title type='text'>The Tale of Two pointers in C</title><content type='html'>by Forrest Sheng Bao http://fsbao.net&lt;br /&gt;&lt;br /&gt;The screenplay:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;// The Tale of Pointers in C: Demos to refer when using pointers in C&lt;br /&gt;// License: GPL v3.0 &lt;br /&gt;// Author: Forrest Sheng Bao http://fsbao.net Forrest dot His_last_name =aT= gmail.com&lt;br /&gt;&lt;br /&gt;#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;#include &amp;lt;string.h&amp;gt;&lt;br /&gt;&lt;br /&gt;int main(int argc, char *argv[])&lt;br /&gt;{&lt;br /&gt;        printf("\n\t Every story has a beginning.\n\n");&lt;br /&gt;        int i =10;&lt;br /&gt;        int* a = &amp;amp;i;&lt;br /&gt;        printf("\t We have an integer i=%d\n\n", i);&lt;br /&gt;        printf("\t It is stored in memory address %p.\n\n", a);&lt;br /&gt;        printf("\t To access the integer, we dereference the pointer: %d. \n\n", *a);&lt;br /&gt;&lt;br /&gt;        printf("\t For strings, it's a different story \n\n");&lt;br /&gt;&lt;br /&gt;        char *sdring;&lt;br /&gt;        if (argc &amp;gt; 1)&lt;br /&gt;        {&lt;br /&gt;                sdring = argv[1];&lt;br /&gt;                printf("\t The first parameter of this shell command is %s\n\n", argv[1]);&lt;br /&gt;&lt;br /&gt;                printf("\t The first character is: %c.\n\n", *argv[1]);&lt;br /&gt;&lt;br /&gt;                printf("\t The second character is: %c.\n\n", *(sdring+1));&lt;br /&gt;&lt;br /&gt;                printf("\t The string from the 2nd character is %s.\n\n", sdring+1);&lt;br /&gt;&lt;br /&gt;                *(sdring+10) = "Z";&lt;br /&gt;&lt;br /&gt;                printf("\t You won't see a Z: %c.\n\n", *(sdring+10));&lt;br /&gt;&lt;br /&gt;/*              printf("\t This will cause a segmentation fault %s", *sdring);*/&lt;br /&gt;        }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The final show&lt;br /&gt;&lt;pre&gt;$ gcc pointer.c&lt;br /&gt;pointer.c: In function ‘main’:&lt;br /&gt;pointer.c:32: warning: assignment makes integer from pointer without a cast&lt;br /&gt;$ ./a.out abcdef&lt;br /&gt;&lt;br /&gt;  Every story has a beginning.&lt;br /&gt;&lt;br /&gt;  We have an integer i=10&lt;br /&gt;&lt;br /&gt;  It is stored in memory address 0xbfe2646c.&lt;br /&gt;&lt;br /&gt;  To access the integer, we can dereference the pointer: 10. &lt;br /&gt;&lt;br /&gt;  For strings, it's a different story &lt;br /&gt;&lt;br /&gt;  The first parameter of this shell command is abcdef&lt;br /&gt;&lt;br /&gt;  The first character is: a.&lt;br /&gt;&lt;br /&gt;  The second character is: b.&lt;br /&gt;&lt;br /&gt;  The string from the 2nd character is bcdef.&lt;br /&gt;&lt;br /&gt;  You won't see a Z: U.&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-7163447224209390525?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=7163447224209390525' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/7163447224209390525'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/7163447224209390525'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2011/06/tale-of-two-pointers.html' title='The Tale of Two pointers in C'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-7003796735996773662</id><published>2011-06-23T15:12:00.000-05:00</published><updated>2011-06-23T15:12:23.099-05:00</updated><title type='text'>On recognizing human faces is not intelligence</title><content type='html'>by Forrest Sheng Bao http://fsbao.net &lt;br /&gt;&lt;br /&gt;I have worked on two aspects of AI, machine learning (ML) and knowledge representation and reasoning (KRR). I have used machine learning in several biomedical applications and got practical results. But i just do not feel it can be called intelligence. When I recognize a person's face, I do not feel that I am thinking. I wouldn't think a person recognizing other people's faces as intelligent - it's a natural instinct. &lt;br /&gt;&lt;br /&gt;Extracting knowledges and reasoning on them to figure out something new (e.g., getting inspired a new idea after reading papers), is what i feel more intelligent. And AI started from it half century ago. But i just do not understand why this field stalled in the past decade (or even longer). This field do not generate new developments as fast as ML nor lead to useful applications as many as ML now. Fewer younger people are joining this field. After the claps of expert system business and research around 1990, this field is not as hot as it used to be. Many AI researchers not working on this field do not know what is happening in this field now. This is really a good field but it might not be on the right track.&lt;br /&gt;&lt;br /&gt;I would say that narrow AI way is a reason causing the slow development in KRR. A common way of representing knowledge is to use logic rules. An expert system comprises a knowledge base and an inference engine for it. But the knowledge base is notoriously narrow on specific domains. Obtaining and maintaining massive rules are difficult jobs as well. This approach, which is not general, is very impractical in real applications. &lt;br /&gt;&lt;br /&gt;Probably when looking backward to the original goal of AI, can we find a better solution. When i saw ``returning to the original goals of the field'' on AGI 2011 website, i told myself that it was the conference i wanna go, to listen to thoughts on AGI, especially approaches to it. For example, i am interested in why it is so difficult to build a general AI agent and what enables human brain to be more general.&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-7003796735996773662?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=7003796735996773662' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/7003796735996773662'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/7003796735996773662'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2011/06/on-recognizing-human-faces-is-not.html' title='On recognizing human faces is not intelligence'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-2705678380550781457</id><published>2011-06-21T08:13:00.000-05:00</published><updated>2011-06-21T08:13:11.032-05:00</updated><title type='text'>When a tiger is not longer a tiger</title><content type='html'>by Forrest Sheng Bao http://fsbao.net&lt;br /&gt;&lt;br /&gt;I found out two old pictures today. They were shot in a zoo in China many many years ago. &lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-AfFje-fku2Y/TgCYzPi6Q6I/AAAAAAAAHBg/NAAl63DiA-E/s1600/tiger.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="640" src="http://4.bp.blogspot.com/-AfFje-fku2Y/TgCYzPi6Q6I/AAAAAAAAHBg/NAAl63DiA-E/s640/tiger.png" width="471" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Tigers in China are mostly in zoos. They are fed like ranch animals everyday. But visitors are unhappy. They want to see real tigers - the big cat that can kill other animals in melee fight, in bloody way. &lt;br /&gt;&lt;br /&gt;Therefore, the zoo i went to sent an Asian water buffalo to the cage of a tiger. But it just took forever for the tiger to kill the buffalo. It didn't know the right place to attach a buffalo. It didn't even have the teeth or mouth muscles to bite the buffalo to bleeding. The whole scene was like a game between the tiger and the buffalo.&lt;br /&gt;&lt;br /&gt;Then visitors felt bored and all left. And they complained to the zoo that they didn't see a real tiger.&amp;nbsp; &lt;br /&gt;&lt;br /&gt;This is the end of my story.&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-2705678380550781457?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=2705678380550781457' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/2705678380550781457'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/2705678380550781457'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2011/06/when-tiger-is-not-longer-tiger.html' title='When a tiger is not longer a tiger'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-AfFje-fku2Y/TgCYzPi6Q6I/AAAAAAAAHBg/NAAl63DiA-E/s72-c/tiger.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-7157945429524379631</id><published>2011-05-22T22:05:00.001-05:00</published><updated>2011-05-22T22:06:39.067-05:00</updated><title type='text'>Installing CTF MEG Suite on Ubuntu Linux 11.04 (64-bit)</title><content type='html'>by Forrest Sheng Bao &lt;a href="http://fsbao.net/"&gt;http://fsbao.net&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;Steps:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;install necessary packages&lt;pre&gt;sudo apt-get install rpm alien enscript xprint python-dialog libmotif4 lesstif2 libstdc++5&lt;/pre&gt;optional, do this on 64-bit system:&lt;br /&gt;&lt;pre&gt;sudo apt-get install ia32-libs&lt;/pre&gt;&lt;/li&gt;&lt;li&gt;Mount the CTF software ISO &lt;pre&gt;sudo mount ctf-5.2.1.iso -o loop /mnt/cdrom&lt;/pre&gt;&lt;/li&gt;&lt;li&gt;Run the installation script. &lt;pre&gt;sudo bash /mnt/cdrom/CTF.install&lt;/pre&gt;Please note that the &lt;code&gt;sudo&lt;/code&gt; is unnecessary if you do not install CTF software suite onto a directory which requires root privilege, such as default installation path &lt;code&gt;/opt/ctf/&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Type "y" for all questions. You will be asked a question about the hardware like this &lt;pre&gt;Select which electronics system is in use.&lt;br /&gt;&lt;br /&gt;CTF_MEG2000 -- Contains  DSQ-2041/DSQ-2043 DSP bank with DSQ-2010 SQUID Channel Units &lt;br /&gt;               and rack mounted ADC/Trigger units&lt;br /&gt;CTF_MEG2005 -- Contains  DSQ-2041/DSQ-2043 based DSP bank with DSQ-2010 SQUID Channel Units&lt;br /&gt;               and desktop Electronic Control Console&lt;br /&gt;&lt;br /&gt;Select "Skip" to skip installation of electronics specific files.&lt;br /&gt;&lt;br /&gt;1) CTF_MEG2000&lt;br /&gt;2) CTF_MEG2005&lt;br /&gt;3) Skip&lt;br /&gt;Select electronics system version :3&lt;br /&gt;&lt;/pre&gt;Unless you are installing on a computer that controls the MEG scanner, select 3 to skip. &lt;br /&gt;&lt;/li&gt;&lt;li&gt;download &lt;code&gt;libXm.so.3&lt;/code&gt; from &lt;a href="http://kurage.nimh.nih.gov/meglab/Meg/Ubuntu"&gt;http://kurage.nimh.nih.gov/meglab/Meg/Ubuntu&lt;/a&gt; and put it in your library loading path, e.g., &lt;br /&gt;&lt;pre&gt;sudo wget http://kurage.nimh.nih.gov/library/Meg/libXm.so.3 -O /usr/lib32/libXm.so.3&lt;br /&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li&gt;(optional) Add your CTF installation path into Linux environment variable &lt;code&gt;$PATH&lt;/code&gt;, e.g., &lt;pre&gt;echo export PATH="$PATH":/opt/ctf/bin &amp;gt;&amp;gt; ~/.bashrc&lt;/pre&gt;&lt;br /&gt;Log out and log in again. Or &lt;pre&gt;source ~/.bashrc&lt;/pre&gt;&lt;br /&gt;I do not like to change system-wide configuration files. So I set the &lt;code&gt;PATH.bashrc&lt;/code&gt;. But this is not mandatory. &lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;All set! I don't know why i can never make &lt;code&gt;ControlCenter&lt;/code&gt; display any botton on its main interface but my colleagues can always. But I really don't bother it. I simply run each individual program in CTF MEG Suite.&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-7157945429524379631?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=7157945429524379631' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/7157945429524379631'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/7157945429524379631'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2011/05/installing-ctf-meg-suite-on-ubuntu.html' title='Installing CTF MEG Suite on Ubuntu Linux 11.04 (64-bit)'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-8805944527140570456</id><published>2011-05-20T16:27:00.001-05:00</published><updated>2011-05-20T16:30:43.919-05:00</updated><title type='text'>PDFtk: the (free) PDF editor for Linux, and Mac OS X, and FreeBSD, and Windows, and Solaris</title><content type='html'>by Forrest Sheng Bao &lt;a href="http://fsbao.net/"&gt;http://fsbao.net&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I have been searching for a free software on Linux that can remove pages from a PDF file for me. Now I have found it. And I found it has many cool features.&amp;nbsp; &lt;br /&gt;&lt;br /&gt;It is called PDFtk. If I wanna remove the first and the last page of a 10-pages pdf, all i need to do is this:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;pdftk old.pdf cat 2-9 output new.pdf&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The project website is &lt;a href="http://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/"&gt;http://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Here is a simple tutorial: &lt;a href="http://www.linux.com/learn/tutorials/442414-manipulating-pdfs-with-the-pdf-toolkit"&gt;http://www.linux.com/learn/tutorials/442414-manipulating-pdfs-with-the-pdf-toolkit&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-8805944527140570456?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=8805944527140570456' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/8805944527140570456'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/8805944527140570456'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2011/05/pdftk-free-pdf-editor-on-linux.html' title='PDFtk: the (free) PDF editor for Linux, and Mac OS X, and FreeBSD, and Windows, and Solaris'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-3588778010871551253</id><published>2011-05-01T14:20:00.003-05:00</published><updated>2011-05-06T21:36:04.830-05:00</updated><title type='text'>How much does an OEM WIndows 7 license cost?</title><content type='html'>For quite a long time, I have been wondering how much does the OEM Windows 7 license cost, because the ``free as in free beer'' of Linux for consumers may not be really appealing if they buy Windows via purchasing a new computer.&amp;nbsp; &lt;br /&gt;&lt;br /&gt;Last night, I couldn't tolerate the poor graphic adapter of my Dell Mini 10 netbook any more. So i started looking for a replacement and I found this to answer my question:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-BULHV85BLPo/Tb2vYVX-c3I/AAAAAAAAG2o/yprf764Jsa4/s1600/UbuntuSave.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="5" src="http://1.bp.blogspot.com/-BULHV85BLPo/Tb2vYVX-c3I/AAAAAAAAG2o/yprf764Jsa4/s1600/UbuntuSave.png" /&gt;&lt;/a&gt;&lt;/div&gt;The only differences between the two Dell Vostro 130's are the OS and hard drive. The price difference between a 250GB/5400RPM mobile hard drive and a 320GB/7200RPM mobile hard drive could be around $20 - if you buy online. &lt;br /&gt;&lt;br /&gt;Conservatively, I would estimate the cost of a Windows 7 Home Premium OEM license is between $50 to $80. Please note that Dell will charge you extra $70 to upgrade from Windows 7 Home Premium to Business Professional.&lt;br /&gt;&lt;br /&gt;Could 15 minutes of trying Ubuntu save you 15% on your IT cost? - For those who do not live in the US, don't get nervous if you can't feel this question funny.&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-3588778010871551253?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=3588778010871551253' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/3588778010871551253'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/3588778010871551253'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2011/05/how-much-does-oem-windows-7-license.html' title='How much does an OEM WIndows 7 license cost?'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-BULHV85BLPo/Tb2vYVX-c3I/AAAAAAAAG2o/yprf764Jsa4/s72-c/UbuntuSave.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-1040646286486449646</id><published>2011-04-29T14:33:00.000-05:00</published><updated>2011-04-29T14:33:32.608-05:00</updated><title type='text'>Ranking education is not an easy job</title><content type='html'>I came across this article about ranking PhD programs in the States. Very good writing at least. http://chronicle.com/article/Too-Big-to-Fail/127212/&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-1040646286486449646?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=1040646286486449646' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/1040646286486449646'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/1040646286486449646'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2011/04/ranking-education-is-not-easy-job.html' title='Ranking education is not an easy job'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-8171371818946919784</id><published>2011-04-26T19:37:00.000-05:00</published><updated>2011-04-26T19:37:22.394-05:00</updated><title type='text'>the president's speech, at facebook</title><content type='html'>President Obama had a town hall meeting at facebook last week. One question he answered was about the Dream Act. He mentioned a lot about high-skilled immigrants. I tried to write down what he said.&lt;br /&gt;&lt;br /&gt;Here is it:"If we've got smart people who want to come here and start businesses and are PhDs in math and science and computer science, why don't we want them to stay? I mean, why would we want to send them someplace else? So those are potential job creators. Those are job generators. I think about somebody like Andy Grove of Intel. We want more Andy Groves here in the United States. We don't want them starting Intel in China, or starting it in France. We want them starting it here. So there is a lot that we can do for making sure that high-skilled immigrants who come here, study -- we've paid for their college degrees, we've given them scholarships, we've given them this training -- let's make sure that if they want to reinvest and make their future here in America that they can."&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-8171371818946919784?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=8171371818946919784' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/8171371818946919784'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/8171371818946919784'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2011/04/presidents-speech-at-facebook.html' title='the president&apos;s speech, at facebook'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-2707225293898789156</id><published>2011-04-23T12:31:00.003-05:00</published><updated>2011-04-23T12:35:07.488-05:00</updated><title type='text'>Killing your cell phone</title><content type='html'>I am reading Dr. Randy Pausch's time management talk again. He suggested to kill your TV. I think, we should also kill our cell phones if we really wanna do some wonderful technically and/or academically. &lt;br /&gt;&lt;br /&gt;I haven't been carrying a cell phone since i became a graduate student. I only use a prepaid cell phone when traveling out of the town. Why would I need a cell phone if I lock myself in an office all day long?&lt;br /&gt;&lt;br /&gt;Top one sin of cell phone: it interrupts the stream of thinking. I like to wire myself in while working.&lt;br /&gt;&lt;br /&gt;Cell phone also gives you the excuse to change schedule. I like to stick on schedule.&lt;br /&gt;&lt;br /&gt;I do not mean that you don't have to communicate, but, for technical or  academic things, you can use methods that won't interrupt you, such as  email (check only at&amp;nbsp; breaks), scheduled meeting, scheduled conference calls. &lt;br /&gt;&lt;br /&gt;Also, i don't like to chat with friends if i have nothing serious to discuss - this may sound very mean or cruel to a lotta people. But, "smart people say because they have something to say; foolish people say because they have to say something."&lt;br /&gt;&lt;br /&gt;According to Randy's talk, cell phone has another two bad outcomes - messy desktop and one thing extra to focus.&lt;br /&gt;&lt;br /&gt;Unless I am listed as someone's emergency contact, will I carry a cell phone with me daily.&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-2707225293898789156?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=2707225293898789156' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/2707225293898789156'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/2707225293898789156'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2011/04/killing-your-cell-phone.html' title='Killing your cell phone'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-271959966996379025</id><published>2011-04-22T20:51:00.000-05:00</published><updated>2011-04-22T20:51:32.474-05:00</updated><title type='text'>Public or Private? Is it a proper question?</title><content type='html'>In some countries, they have very high public (government) involvement in many things, from universities to airlines. On the other hand, the American private free-market business model is criticized for pursuing practical outcomes too much while neglecting long-term benefits - for example, it's very hard to find the environment like School of Athens in an American university. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I don't have time to write a long article to discuss it right now. But a week ago, I saw an article like this. &lt;a href="http://www.informationweek.com/news/global-cio/interviews/229400837"&gt;http://www.informationweek.com/news/global-cio/interviews/229400837&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-271959966996379025?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=271959966996379025' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/271959966996379025'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/271959966996379025'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2011/04/public-or-private-is-it-proper-question.html' title='Public or Private? Is it a proper question?'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-773503327910608982</id><published>2011-04-16T11:48:00.001-05:00</published><updated>2011-04-22T20:52:01.480-05:00</updated><title type='text'>3.2GHz and 3.6GHz, no big difference?</title><content type='html'>I had an interesting discovery about my AMD Phenom II X6 1090T CPU. I threw a very CPU intensive job to it. But the time (measured in Linux command ``time'') spent to finish the job was the pretty much the same when the CPU works at 3.6 GHz and 3.2 GHz (I played a trick in AMD Cool'n'Quite setting in my BIOS and verified the frequency for the core running my job by cat /proc/cpuinfo | grep -i "cpu Mhz"). &lt;br /&gt;&lt;br /&gt;So, I am wondering why. I do not think it is because of the bottleneck at the memory. My program only uses 3% of the memory which in total is 8 GB.&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-773503327910608982?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=773503327910608982' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/773503327910608982'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/773503327910608982'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2011/04/32-ghz-and-36-ghz-no-big-difference.html' title='3.2GHz and 3.6GHz, no big difference?'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-2379931040674357783</id><published>2011-04-15T12:39:00.001-05:00</published><updated>2011-04-19T21:33:14.515-05:00</updated><title type='text'>Chinese peasants: there could be another peasant revolution</title><content type='html'>I saw this report a while ago on USA Today. It's about Chinese peasants. I visited China in 2008 and 2010, and I was stunted by the poverty of lower class there - they can't afford too many essential things to live, including health care and clean living environment. The government squeezed every penny out of its people, leaving them very little. So I was wondering how long the gov can squeeze its people like that. &lt;br /&gt;&lt;br /&gt;And then, i saw this report on USA Today. One sentence really shocked me, said by an interviewed peasant: "If the government fails to solve the peasants' problems, there could be another peasant revolution."&lt;br /&gt;&lt;br /&gt;I really could not understand why the Chinese gov does not show any interest in reformation, e.g., giving people more freedom and maintain a fair free market. If they keep what they are doing now, a revolution could happen in a foreseeable future. &lt;br /&gt;&lt;br /&gt;Here is the full report: &lt;a href="http://www.usatoday.com/news/world/2011-03-25-chinaland25_ST_N.htm"&gt;&lt;b&gt;http://www.usatoday.com/news/world/2011-03-25-chinaland25_ST_N.htm&lt;/b&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-2379931040674357783?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=2379931040674357783' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/2379931040674357783'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/2379931040674357783'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2011/04/chinese-peasants-there-could-be-another.html' title='Chinese peasants: there could be another peasant revolution'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-4291374435683389841</id><published>2011-04-12T14:40:00.000-05:00</published><updated>2011-04-12T14:40:59.205-05:00</updated><title type='text'>Democrats saved the NIH from latest budget cut</title><content type='html'>I just saw this news on Huffington Post - and i don't believe it is a lie because the new budget proposal is a public government document:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;"They also prevented Republicans from slashing funds for the National  Institutes of Health: The agency will absorb a $260 million cut, rather  than the $1.6 billion cut sought by House Republicans. "&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;How dare Republicans try to cut $1.6 billion for NIH? They don't want to find cures to diseases to save Americans' lives? &lt;br /&gt;&lt;br /&gt;PS: Do Republicans forget this sentence in the Declaration of Independence, "and to secure these rights, governments are established among people" when they cut funds for improving local community on medical service, clean water, law enforcement, highway, etc. ?&lt;br /&gt;&lt;br /&gt;Among the most cut, are $400 million for community medical centers, $1 billion for HIV and prevent-disease fund, $1.6 billion for clean water and other projects in local community and Indian tribes. I thought Republicans are very religious. Which religion in the world does not tell us to respect human lives and help others for a better life?&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-4291374435683389841?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=4291374435683389841' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/4291374435683389841'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/4291374435683389841'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2011/04/democrats-saved-nih-from-latest-budget.html' title='Democrats saved the NIH from latest budget cut'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-5495809989371730327</id><published>2011-04-10T16:11:00.000-05:00</published><updated>2011-04-10T16:11:42.703-05:00</updated><title type='text'>Synctex with TeXMaker to jump between your LaTeX source and PDF output</title><content type='html'>Do you write long papers in LaTeX and you always want &lt;i&gt;instant&lt;/i&gt; jumps between lines in your LaTeX source and PDF output? For example, you notice a typo in your PDF, and you wanna go back to LaTeX source to fix it without locating it in your ``eye power''?&lt;br /&gt;&lt;br /&gt;I recently start using a new LaTeX IDE called &lt;a href="http://www.xm1math.net/texmaker/index.html"&gt;TeXMaker&lt;/a&gt;. It displays LaTeX source code and PDF output in parallel in one window. And, allows you to jump instantly between them, via synctex.&lt;br /&gt;&lt;br /&gt;Here is a video someone made to show you how it works. &lt;a href="http://www.youtube.com/watch?v=JfRdyUIkqls"&gt;http://www.youtube.com/watch?v=JfRdyUIkqls&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;You simply go to Options -&amp;gt; Configure Texmaker -&amp;gt; Commands. Then add &lt;code&gt;--synctex=1&lt;/code&gt; into the PdfLaTeX command options. Click OK. Now right (secondary) click on either your LaTeX source or PDF output and select "Jump to blah blah". Check the result!&lt;br /&gt;&lt;br /&gt;You need TeXMaker 2.2 or later to do so. On Ubuntu Linux 10.10, the TeXMaker version is 2.0. So u need to download later versions from TeXMaker &lt;a href="http://www.xm1math.net/texmaker/download.html"&gt;download page&lt;/a&gt;. The latest version is 3.0.&amp;nbsp;&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-5495809989371730327?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=5495809989371730327' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/5495809989371730327'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/5495809989371730327'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2011/04/synctex-with-texmaker-to-jump-between.html' title='Synctex with TeXMaker to jump between your LaTeX source and PDF output'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-798971304997786353</id><published>2011-04-04T22:43:00.000-05:00</published><updated>2011-04-04T22:43:29.257-05:00</updated><title type='text'>Giving readers of your papers easier lives</title><content type='html'>Many papers are very hard to read. One reason is that they use vocabularies or math notations that are not very recognized by readers.&lt;br /&gt;&lt;br /&gt;For a paper on knowledge representation and reasoning (KRR), the targeting readers are mostly AI researchers who may not be necessarily working on KRR. They may work on automated planning or robotics. If your vocabularies or math notations do not match their education background, they will feel very difficult to understand your paper.&lt;br /&gt;&lt;br /&gt;In the end, if you really give them a hard time, they will simply send your paper to a shredder.&lt;br /&gt;&lt;br /&gt;Then what is the purpose of writing an AI paper that researchers on other AI fields cannot even understand?&lt;br /&gt;&lt;br /&gt;And, KRR needs applications. The knowledge is from our common sense, maybe for a particular field, e.g., physics. The reasoning is assist us the better use of common sense knowledge. What if a biologist wants to use your work to help his research? You wanna scare him away in a way worse than how you treat other AI researchers? &lt;br /&gt;&lt;br /&gt;A compromising solution, may be, to provide two different ways of saying one thing. One is preferable by people in your field, very precise and professional. The other is understandable for any college science/engineering graduates. High school students cannot understand Einstein's paper about the Theory of Relativity. But they can understand the simplified version on their textbook. &lt;br /&gt;&lt;br /&gt;Do you like a dictionary that explains words in advanced words?&lt;br /&gt;&lt;br /&gt;When Steve Jobs asked his team to make an easy manual for Macintosh, his team said, it's easy, high school English level. Steve, said, no, i want elementary school level English. &lt;br /&gt;&lt;br /&gt;A few days ago I saw a joke. A customer rated his Windows laptop as 1 star because it didn't come with a Windows manual - he used to be a Mac user.&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-798971304997786353?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=798971304997786353' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/798971304997786353'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/798971304997786353'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2011/04/giving-readers-of-your-papers-easier.html' title='Giving readers of your papers easier lives'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-4060641352356247433</id><published>2011-04-04T00:49:00.002-05:00</published><updated>2011-04-04T00:58:08.559-05:00</updated><title type='text'>You shall read Knuth et al.'s minicourse for technical writing</title><content type='html'>When i am reading papers from one field, i cannot finish a page in an hour. I can read a single sentence for 10 times, and i still don't understand what that sentence means. The worst part is, that i couldn't remember what their papers say after a week. &lt;br /&gt;&lt;br /&gt;Tonight, I suddenly felt that it was not my problem. It's because they like to introduce new "awkward" notations, and they don't like to use the daily meanings of words. &lt;br /&gt;&lt;br /&gt;By awkward, I mean not following conventions. For example, in math, a superscript, most often, means the power. In the authors' language, it could mean something has nothing to do with power. &lt;br /&gt;&lt;br /&gt;By daily, i mean the meaning most people will come up in mind when hearing/seeing that word. What's the purpose of using the 5th or 6th meaning of a word (unless it is its meaning under the technical context)? For example, why do they use the word "reduct", an obsolete word in modern English (according to Merriam-Webster,&amp;nbsp; Wiktionary and my Firefox spell checking)? Can they use "reduce" or "reduction"? &lt;br /&gt;&lt;br /&gt;To verify whether i was wrong, I googled out Knuth et al.'s Minicourse for Technical Writing. Right, it's not my problem.&lt;br /&gt;&lt;br /&gt;For instance, point 6: "Think of a dialog between author and reader" Well, I completely cannot feel any dialog from sentences without "we" or connections.&lt;br /&gt;&lt;br /&gt;Another rule related to this point is, point 12: "Motivate the reader for what follows." Well, i cannot think about what's next if i can't even follow. &lt;br /&gt;&lt;br /&gt;Another example, point 16: "Display important formulas on a line by themselves." I really hate people squeezing formulas into lines with English, especially when formulas are more than half line width long.&amp;nbsp; &lt;br /&gt;&lt;br /&gt;Last example, point 13: "your sentences should flow smoothly when all but the simplest formulas are replaced by 'blah' or some other grunting noise." This is very important. Please give every new notation you introduce a name, intuitive ones. &lt;br /&gt;&lt;br /&gt;So, i recommend anyone who is writing papers with a lot of math to read that doc, which is published in 1987. A copy is here:&amp;nbsp; http://math.stanford.edu/~rubin/110/mathwriting.pdf&lt;br /&gt;You can google "Knuth Minicourse on technical writing" if that link above doesn't work.&lt;br /&gt;&lt;br /&gt;A note: The word "reduct" is called "reducing agent" or reducer in modern chemistry.&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-4060641352356247433?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=4060641352356247433' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/4060641352356247433'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/4060641352356247433'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2011/04/you-shall-read-knuth-et-als-minicourse.html' title='You shall read Knuth et al.&apos;s minicourse for technical writing'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-5650435294814248985</id><published>2011-03-29T21:54:00.000-05:00</published><updated>2011-03-29T21:54:37.319-05:00</updated><title type='text'>EPSON official Linux driver for scanners/printers/all-in-ones</title><content type='html'>I got a free scanner, EPSON Perfection 4490 Photo. So I plugged it into my Ubuntu 10.10 box. But it wasn't recognized automatically. When I planned to download the Windows driver for it to use it on a Windows box, i accidentally found out that EPSON subcontracted a company to make the official Linux driver, for it, as well as most of EPSON's other scanners, printers and All-in-ones. Here is what to do. &lt;br /&gt;&lt;br /&gt;First, go to the Epson's official Linux support page to select the device type. &lt;a href="http://www.epson.com/cgi-bin/Store/support/supAdvice.jsp?noteoid=162111"&gt;http://www.epson.com/cgi-bin/Store/support/supAdvice.jsp?noteoid=162111&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;After selecting your device (e.g., scanner for my case), EPSON will tell you to leave the current website. Click "Leave."&lt;br /&gt;&lt;br /&gt;Then, you will go to the Linux driver page for your selected device. For me, i went to the "Image Scan! for Linux," short as iscan. Scroll down to choose your device. I chose Perfection 4490 Photo. Now go to the bottom where you can select your Linux distribution, and distribution version. To my surprise, Ubuntu 10.10 was there. They have a helping page to help you determine which packages to download: &lt;a href="http://avasys.jp/eng/linux_driver/faq/id000651.php"&gt;http://avasys.jp/eng/linux_driver/faq/id000651.php&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;For EPSON scanners, you need to download three things. The iscan-data (data), iscan (core) and iscan-plugin (also core). Since I am using Ubuntu 10.10 32-bit. So I selected 32-bit deb packages. Specifically, for iscan and iscan-plugin, i selected "for Ubuntu 8.10 or later" ones. &lt;br /&gt;&lt;br /&gt;Finally, install those downloads as you install Linux software. Please install iscan-data first, then iscan and iscan-plugin at last. &lt;br /&gt;&lt;br /&gt;You may have to relogin or simply reboot your computer to load the new driver. &lt;br /&gt;&lt;br /&gt;After that, you can use xsane (&lt;a href="https://help.ubuntu.com/8.04/printing/C/scanning.html"&gt;https://help.ubuntu.com/8.04/printing/C/scanning.html&lt;/a&gt;) or Simple scan (&lt;a href="https://help.ubuntu.com/10.10/printing/C/scanning.html"&gt;https://help.ubuntu.com/10.10/printing/C/scanning.html&lt;/a&gt;) to acquire images from the scanner. The EPSON's Image Scan! for Linux also works. You can find all these applications in your Applications menu under Graphics, if you use GNOME desktop environment. &lt;br /&gt;&lt;br /&gt;Please do not open two programs using the scanner at the same time.&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-5650435294814248985?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=5650435294814248985' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/5650435294814248985'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/5650435294814248985'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2011/03/epson-official-linux-driver-for.html' title='EPSON official Linux driver for scanners/printers/all-in-ones'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-5868902261950154543</id><published>2011-03-29T02:20:00.003-05:00</published><updated>2011-03-29T21:55:07.345-05:00</updated><title type='text'>A set of good examples of VTK data format</title><content type='html'>&lt;a href="http://www.visitusers.org/index.php?title=ASCII_VTK_Files"&gt;http://www.visitusers.org/index.php?title=ASCII_VTK_Files&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-5868902261950154543?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=5868902261950154543' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/5868902261950154543'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/5868902261950154543'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2011/03/set-of-good-examples-of-vtk-data-format.html' title='A set of good examples of VTK data format'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-1169554632756279244</id><published>2011-03-15T21:41:00.003-05:00</published><updated>2011-03-15T21:42:11.843-05:00</updated><title type='text'>Python command in a Python program including filenames</title><content type='html'>I wrote a super complex two lines of code a while ago.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;PyCmd = "\"import vtk; vtk.fundi2VTK(\'" + SurfaceFile + "\',\'" + FundiFile + "\');&amp;nbsp; \""&lt;br /&gt;os.system("python -c " + PyCmd + '&amp;gt; '+ FundiFile&amp;nbsp; +'.inflated.vtk')&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Be careful. Don't drive yourself nuts by so many pairs of quotation marks.&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-1169554632756279244?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=1169554632756279244' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/1169554632756279244'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/1169554632756279244'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2011/03/python-command-in-python-program.html' title='Python command in a Python program including filenames'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-5582735794290549726</id><published>2011-03-14T20:23:00.000-05:00</published><updated>2011-03-14T20:23:38.432-05:00</updated><title type='text'>"Can the U.S. export freedom?"</title><content type='html'>I saw this article on Feb. 11's USA Today. I was transferring at Tokyo for my flight from Minneapolis to Shanghai. All newspapers offered in the airport were in Japanese. Thanks to Delta Air Lines who offered some English newspaper on their inter-Asian flight, I finally got to know what's going on in the world. It was a really interesting article. &lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.usatoday.com/news/opinion/forum/2011-02-10-column10_ST_N.htm"&gt;http://www.usatoday.com/news/opinion/forum/2011-02-10-column10_ST_N.htm&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-5582735794290549726?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=5582735794290549726' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/5582735794290549726'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/5582735794290549726'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2011/03/can-us-export-freedom.html' title='&quot;Can the U.S. export freedom?&quot;'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-7039455117904824986</id><published>2011-02-23T22:16:00.001-06:00</published><updated>2011-02-23T23:38:18.433-06:00</updated><title type='text'>Texas Tech VPN client on Ubuntu Linux</title><content type='html'>L2TP is made by Microsoft and Apple. It does NOT provide encryption  at all. IPSec does. Apple and Microsoft avoid telling people this. They  reinvented the wheel, poorly. For my taste, I prefer Cisco's PPTP. But I  have to live with it as my university uses it.&lt;br /&gt;&lt;br /&gt;1. Ubuntu does not support L2TP in NetworkManager, the one you use to  configure Ethernet and Wi-Fi. Don't panic. There is a good GUI to help  you.&lt;br /&gt;&lt;br /&gt;2. Please install Werner Jaeger's L2TP IPSec VPN Manager from &lt;a href="https://launchpad.net/%7Ewerner-jaeger/+archive/ppa-werner-vpn/+packages"&gt;https://launchpad.net/~werner-jaeger/+archive/ppa-werner-vpn/+packages&lt;/a&gt;  Just download the ones for your Ubuntu version. You can tell from the  Ubuntu codename at the end of package names. If you are not sure about  the codenames of Ubuntu releases, check out &lt;a href="https://wiki.ubuntu.com/DevelopmentCodeNames"&gt;https://wiki.ubuntu.com/DevelopmentCodeNames&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;3. If you have tried other L2TP/IPSec solutions you googled, you may need to reinstall the three packages.&lt;br /&gt;&lt;br /&gt;4. After that, log out and re-log in. You shall see an icon, like two computers stacked together, on your Ubuntu system tray. Right (secondary) click it and select "Edit Connections..."&lt;br /&gt;&lt;br /&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-x3jw0xW-dzw/TWXZQVtkIDI/AAAAAAAAG1U/T7w-QntLupM/s1600/VPN-0.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/-x3jw0xW-dzw/TWXZQVtkIDI/AAAAAAAAG1U/T7w-QntLupM/s1600/VPN-0.png" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Figure 1: L2TP IPSec VPN Manager on Ubuntu system tray&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;Then you will be asked to input Ubuntu system administrator password and see the interface below afterward.&lt;br /&gt;&lt;br /&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-qM4ZZvPq6h0/TWSAMTWQhzI/AAAAAAAAG1E/GRH0GEGyK2A/s1600/VPN-1.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="219" src="http://4.bp.blogspot.com/-qM4ZZvPq6h0/TWSAMTWQhzI/AAAAAAAAG1E/GRH0GEGyK2A/s320/VPN-1.png" width="320" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Figure 2: "VPN Connection" window&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;I already have a connection called "TTUVPN" there because i have created one. Now you need to create one if this is your first time using. Click "Add" and enter the name you wanna call the connection in the pop-up dialog box.&lt;br /&gt;&lt;br /&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-I-FfW6a2CL8/TWSAO6DspoI/AAAAAAAAG1I/civjMDph4Tw/s1600/VPN-2.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/-I-FfW6a2CL8/TWSAO6DspoI/AAAAAAAAG1I/civjMDph4Tw/s1600/VPN-2.png" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Figure 3: Name a new VPN connection&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;Click ok. You will return to "VPN Connections" window as shown in Fig. 2. Select the connection you just created and click "Edit." In "IPSec" tab, enter &lt;code&gt;vpn.ttu.edu&lt;/code&gt; for "Remote Server." For "User pre-shared key for authentication," enter &lt;code&gt;TTUnetVPN&lt;/code&gt;. &lt;br /&gt;&lt;br /&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-Y6BBvzgh3wQ/TWXXnTFu1ZI/AAAAAAAAG1M/LqNCBH6vP5I/s1600/VPN-3.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="320" src="http://3.bp.blogspot.com/-Y6BBvzgh3wQ/TWXXnTFu1ZI/AAAAAAAAG1M/LqNCBH6vP5I/s320/VPN-3.png" width="309" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Figure 4: Edit connection settings, IPSec tab&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;Now jump to the "PPP" tab. Check the last three options in "Allow these protocols." At "User name" and "Password," enter your E-raider username and password combination. Click "OK" when you are done. &lt;br /&gt;&lt;br /&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-KxHF7Zmn3rg/TWXXnjp9DcI/AAAAAAAAG1Q/Uz0F095nv7o/s1600/VPN-4.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="320" src="http://1.bp.blogspot.com/-KxHF7Zmn3rg/TWXXnjp9DcI/AAAAAAAAG1Q/Uz0F095nv7o/s320/VPN-4.png" width="309" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Figure 5: PPP settings for VPN&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;Finally, go back to your Ubuntu system tray. Right click on the "VPN" icon and select the connection you just configured for TTU VPN. A bubble will pop up showing that the connection is being established. After the connection is established, you will see another bubble notification. If error is encountered, you will also be notified.&lt;br /&gt;&lt;br /&gt;Enjoy!&lt;br /&gt;&lt;br /&gt;Please feel free to tell me how poor this guide is written. You can use my pictures if you say "Courtesy of Forrest" - pictures and texts are licensed under CC license at the bottom of this page.&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-7039455117904824986?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=7039455117904824986' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/7039455117904824986'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/7039455117904824986'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2011/02/texas-tech-vpn-client-on-ubuntu-linux.html' title='Texas Tech VPN client on Ubuntu Linux'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-x3jw0xW-dzw/TWXZQVtkIDI/AAAAAAAAG1U/T7w-QntLupM/s72-c/VPN-0.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-395994745132420048</id><published>2011-02-01T15:13:00.001-06:00</published><updated>2011-07-25T16:12:17.862-05:00</updated><title type='text'>Apple aluminium function key behavior configuration on Ubuntu Linux</title><content type='html'>By default, function keys (i.e., F1 to F19) of Apple aluminum keyboard are multimedia special keys, e.g., setting screen brightness or speaker volume. If you want to press a real function key, you need to press a function and the fn key above delete key. &lt;br /&gt;&lt;br /&gt;But, as a programmer who uses IDEs a lot, I don't wanna press fn - i don't wanna play piano on my computer keyboard.&lt;br /&gt;&lt;br /&gt;So, I googled around and found out the very easy solution at Ubuntu Wiki. &lt;a href="https://help.ubuntu.com/community/AppleKeyboard"&gt;https://help.ubuntu.com/community/AppleKeyboard&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I have tried it out and it worked as expected.&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-395994745132420048?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=395994745132420048' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/395994745132420048'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/395994745132420048'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2011/02/apple-aluminium-function-key-behavior.html' title='Apple aluminium function key behavior configuration on Ubuntu Linux'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-2946648991137884507</id><published>2011-01-31T12:28:00.004-06:00</published><updated>2011-01-31T19:17:42.161-06:00</updated><title type='text'>Giving up one of my animal instincts</title><content type='html'>by Forrest Sheng Bao http://fsbao.net&lt;br /&gt;&lt;br /&gt;(This blog post is NOT allowed to be republished anywhere else without the written or electronic approval from me. It is NOT licensed under any CC licenses or GNU FDL. All rights reserved.)&lt;br /&gt;&lt;br /&gt;ok, i made a decision tonight (Friday, Jan. 28, 2011). I am not gonna think about finding a wife until 30. There is a more than 50% chance that I will remain single until 35.&lt;br /&gt;&lt;br /&gt;You may say that I am crazy - well, you shouldn't be surprised because i've never asked a girl for a date, though I vow to find one everyday. If I am really gonna do something, I will do it rather than talking all the time. &lt;br /&gt;&lt;br /&gt;Life is like a buffet - not a box of chocolates here. My stomach has limited volume. So I can only eat dishes to which I have the strongest appetite.&lt;br /&gt;&lt;br /&gt;A male monkey may want to have a wife. By nature, we humans have a greater instinct, making dreams. We can scarify anything for dreams that we value. E.g., we can die for freedom. So I am gonna give up one of my animal instincts for what I want the most in my life over the next few year, as follows. &lt;br /&gt;&lt;br /&gt;1. Do some awesome research approaching some beautiful scientific and engineering dreams. &lt;br /&gt;2. Work with energized people on wonderful projects in quite a few high-tech startups. &lt;br /&gt;3. Devote some time on certain missions that are nontechnical but worth doing. &lt;br /&gt;&lt;br /&gt;Erica said to Mark, according to the movie The Social Network, "But you are gonna go through life thinking that girls don't like you because you're a nerd. And I want you to know from the bottom of my heart that that won't be true. It'll be because you are an asshole." &lt;br /&gt;&lt;br /&gt;So Mark ran back to the dorm and blogged "I need to do something to take my mind off her." Then he started the journey to build the one and only social network website, thefacebook - please drop the "the" on your own.&lt;br /&gt;&lt;br /&gt;Oh, The Social Network is really a great movie. You should watch it.&amp;nbsp; &lt;br /&gt;&lt;br /&gt;"Far and away the best prize that life offers is the chance to work hard at work worth doing." -Theodore Roosevelt, Labor Day address, 1903 &lt;br /&gt;&lt;br /&gt;"Being the richest man in the cemetery doesn't matter to me... Going to bed at night saying we've done something wonderful...that's what matters to me." - Steve Jobs, on Gates and Microsoft, Wall Street Journal, summer 1993&lt;br /&gt;&lt;br /&gt;"And most important, have the courage to follow your heart and intuition. They some how already know what you truly want to become." - Steve Jobs, ``Stay hungry, Stay foolish,'' Graduation Commencement of Stanford University, 2005 &lt;br /&gt;&lt;br /&gt;"Do you want to sell sugar water for the rest of your life, or do you want to come with me and change the world?" - Steve Jobs asked John Sculley when inviting John to join Apple from Pepsi.&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-2946648991137884507?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=2946648991137884507' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/2946648991137884507'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/2946648991137884507'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2011/01/giving-up-my-animal-instincts.html' title='Giving up one of my animal instincts'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-8708405420440799915</id><published>2011-01-23T01:43:00.000-06:00</published><updated>2011-01-23T01:43:05.748-06:00</updated><title type='text'>On citation numbers in Computer Science and Electrical Engineering</title><content type='html'>A fact we cannot ignore is that engineering fields have much lower citations than science fields, especially biology and medicine. &lt;br /&gt;&lt;br /&gt;Another fact is that in two fields, computer science and electrical engineering (more computer engineering), conferences are as important as, even more than, journals. Researchers submit full papers (with results) rather than abstracts to conferences. Top conferences can be very competitive. Citations on top conferences can by more than those on top journals. &lt;br /&gt;&lt;br /&gt;Here are some useful links. &lt;br /&gt;&lt;br /&gt;http://portal.acm.org/citation.cfm?id=1743569&amp;dl=ACM&amp;coll=DL&lt;br /&gt;http://www.timeshighereducation.co.uk/story.asp?storyCode=405789&amp;sectioncode=26&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-8708405420440799915?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=8708405420440799915' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/8708405420440799915'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/8708405420440799915'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2011/01/on-citation-numbers-in-computer-science.html' title='On citation numbers in Computer Science and Electrical Engineering'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-1437960536612640486</id><published>2011-01-12T17:56:00.002-06:00</published><updated>2011-01-12T21:01:59.421-06:00</updated><title type='text'>Useful programming languages</title><content type='html'>by Forrest Sheng Bao http://fsbao.net&lt;br /&gt;&lt;br /&gt;I have no interest on designing a *beautiful* programming language, but a *useful* one.&lt;br /&gt;&lt;br /&gt;By ``beautiful'' I mean that users get bored before they can see enough benefits of a language. By ``useful'' I mean that users&amp;nbsp;are growing their interest on the language in evaluating whether they should use it in the future, though sometimes they may have to spend a lot of time to learn it, e.g., LaTeX and its macros.&lt;br /&gt;&lt;br /&gt;Therefore, I don't care how many great theoretical ideas are behind the design of a language. If more than 50% of your target programmers (those who you think that should solve their problems in your language) think your new language is not "useful," you are like MySpace now (just laid off almost half of their employees).&lt;br /&gt;&lt;br /&gt;Please think about the reason we design a programming language. For use, right? Making programmers be happy about it, i.e., thinking that their life is easier. O/w, your language is a failure.&lt;br /&gt;&lt;br /&gt;Designing a programing language is like designing commercial products, e.g., a blender in the kitchen. No one likes to read the manual for a whole day before they can get press the power button. Of course, a programming language takes more time to learn than a blender. But programmers are your customers and customers are always right. If they are growing frustration, confusion and impatience in learning your language, they won't ask you to refund their time but simply giving up your language at certain point.&lt;br /&gt;&lt;br /&gt;If someone needs to read dozens of papers published in the past half century with great pains in order to use your language properly, this language shouldn't be designed from the beginning. Why do you design something that is apparently against your original goal, i.e., to make people use it?&lt;br /&gt;&lt;br /&gt;An example. In WWII, Germans used the Tiger tanks while Americans used the Sherman Tank. Sherman tank sucks in almost all aspects. But Americans won in most of the tank-to-tank battles, because Sherman tank is easy to use. Anyone who knows how to drive a car can drive the Sherman tank. The Tiger tank is designed too sophisticated.&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-1437960536612640486?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=1437960536612640486' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/1437960536612640486'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/1437960536612640486'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2011/01/please-design-useful-programming.html' title='Useful programming languages'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-4636251680730983715</id><published>2011-01-10T22:10:00.000-06:00</published><updated>2011-01-10T22:10:25.408-06:00</updated><title type='text'>Successful software and useful AI algorithms</title><content type='html'>by Forrest Sheng Bao http://fsbao.net&lt;br /&gt;&lt;br /&gt;A successful software &lt;i&gt;n.&lt;/i&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;The one shown on top of Google search result using the software name.&lt;/li&gt;&lt;li&gt;The software in Ubuntu Linux software repository, i.e., you can use &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;apt-get install the_software_name&lt;/span&gt; to install.&lt;/li&gt;&lt;li&gt;The software on top of Android Market or iTunes Store search result using the software name&lt;/li&gt;&lt;li&gt;Something equivalent to 1-3.&amp;nbsp; &lt;/li&gt;&lt;/ol&gt;The purpose we build software is to let people use it to make life easier. Hence, if no one uses it, it is useless. &lt;br /&gt;&lt;br /&gt;I was thinking about this because I saw a Google Goggle video showing how fast it can solve Soduko problems. There are a lot of people working on satisfiablity problems in AI. Do Google use any of their algorithms in their Goggle Soduku solver?&lt;br /&gt;&lt;br /&gt;If the industry do not use your algorithm for problems that your algorithm is claimed to solve, then either:&lt;br /&gt;&lt;br /&gt;1. Your algorithm sucks.&lt;br /&gt;2. You need to publicize your work - if that is your job and your collaborators do not wanna live on government welfare.&amp;nbsp; &lt;br /&gt;3. You should continue enjoying the beauty created by yourself - if &lt;i&gt;that&lt;/i&gt; is not your job or the future job of your graduate students.&lt;br /&gt;&lt;br /&gt;Artificial intelligence, is, a science to let computers act humanly with intelligence in real life, not only on toy problems. We wouldn't think a person who can only solve a bunch of toy problems as intelligent or smart. It's the same for a computer.&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-4636251680730983715?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=4636251680730983715' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/4636251680730983715'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/4636251680730983715'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2011/01/successful-software-and-useful-ai.html' title='Successful software and useful AI algorithms'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-7668743430801014701</id><published>2011-01-07T17:23:00.000-06:00</published><updated>2011-01-07T17:23:09.185-06:00</updated><title type='text'>Replanning matters</title><content type='html'>by Forrest Sheng Bao http://fsbao.net&lt;br /&gt;&lt;br /&gt;There is always a big distance between what we think will happen and what we are not aware of going to happen. That's why I always advocate the communication between the industry and academia, at least for engineering fields.&lt;br /&gt;&lt;br /&gt;Bad weather comes all the time. When it reaches an airport or a busy route, we need to be able to reschedule flights accordingly, and fast enough - otherwise, the airport will be turned into a refugee camp.&lt;br /&gt;&lt;br /&gt;Below is a picture I shot at Shenzhen on my trip to China this summer. On that day, a large area of southern China was under thunderstorms. So, flights were delayed. Even worse, flight control couldn't let flights take off soon after the storm warning was lifted. I shot the picture at around 7 PM when the storm had gone for 4-ish hours. But you can see how many flights were still delayed. Actually, those flights didn't leave the airport until late night. The waiting lounge was in a big mess. &lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_fp-pi6U0QKc/TSefyB-pqwI/AAAAAAAAG0o/w_WjXADTmBQ/s1600/S7003104.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="480" src="http://4.bp.blogspot.com/_fp-pi6U0QKc/TSefyB-pqwI/AAAAAAAAG0o/w_WjXADTmBQ/s640/S7003104.JPG" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-7668743430801014701?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=7668743430801014701' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/7668743430801014701'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/7668743430801014701'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2011/01/replanning-matters.html' title='Replanning matters'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_fp-pi6U0QKc/TSefyB-pqwI/AAAAAAAAG0o/w_WjXADTmBQ/s72-c/S7003104.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-1598179245044973695</id><published>2011-01-07T17:07:00.000-06:00</published><updated>2011-01-07T17:07:10.362-06:00</updated><title type='text'>Planning, not so well solved AI problems</title><content type='html'>by Forrest Sheng Bao http://fsbao.net&lt;br /&gt;&lt;br /&gt;A big area in artificial intelligence is planning, e.g., finding a configuration (mostly temporal) of using different resources to achieve a goal. Maybe you feel this is sorta linear programming you learned in your college algebra class. But the thing is, AI researchers want to find a universal automated way. For decades, they have been wanted to build a planner that can automatically handle all planning problems, humanly or rationally. Therefore, you don't have to model a problem into a constraint programming manually and do the same for a different planning problem. &lt;br /&gt;&lt;br /&gt;But this problem has been far from being solved. &lt;br /&gt;&lt;br /&gt;Apparently, commercial applications of planning algorithms do not work  well. The itinerary below is an example. United Airlines thought a good way  to fly from Singapore to China is to do a U-turn  in San Francisco over the Pacific Ocean via Japan. A five-year-old would even think this is very inhuman. Plus, it's very ``non-green.''&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_fp-pi6U0QKc/TSebe9XC01I/AAAAAAAAG0k/vjLqw1a3xJ8/s1600/Screenshot.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_fp-pi6U0QKc/TSebe9XC01I/AAAAAAAAG0k/vjLqw1a3xJ8/s1600/Screenshot.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-1598179245044973695?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=1598179245044973695' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/1598179245044973695'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/1598179245044973695'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2011/01/planning-not-so-well-solved-ai-problems.html' title='Planning, not so well solved AI problems'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_fp-pi6U0QKc/TSebe9XC01I/AAAAAAAAG0k/vjLqw1a3xJ8/s72-c/Screenshot.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-7265627477070653201</id><published>2010-12-27T04:47:00.000-06:00</published><updated>2010-12-27T04:47:41.895-06:00</updated><title type='text'>Should human knowledge be represented in logic?</title><content type='html'>by Forrest Sheng Bao http://fsbao.net&lt;br /&gt;&lt;br /&gt;Yes, knowledge representation is a big problem in AI. "In order for a program to be capable of learning something it must first be capable of being told it."&lt;br /&gt;&lt;br /&gt;But first, should knowledge be represented in languages? &lt;br /&gt;&lt;br /&gt;Second, does the language have to be based on logic?&lt;br /&gt;&lt;br /&gt;An example. Do a bunch of data and their labels represent some kind of knowledge? Let's say the data are X-ray images of chest cancer patients and normal people, and a label is 1 if the doctors diagnose the subject as a patient and 0 as a normal people. Is this a piece of human knowledge? Sure. Do we create a special language to represent it? Well, we can simply use matrices - this is the convention in pattern recognition community.&lt;br /&gt;&lt;br /&gt;Do we use logic? Probably not at all. Not all human knowledge can be easily represented in logic.&lt;br /&gt;&lt;br /&gt;Third, what if only a small portion of human knowledge can be represented in logic? &lt;br /&gt;&lt;br /&gt;Well, of course, it is also possible that a better way to represent human knowledge hasn't been invented yet.&amp;nbsp; &lt;br /&gt;&lt;br /&gt;So, I need to jump out of the box sometimes.&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-7265627477070653201?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=7265627477070653201' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/7265627477070653201'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/7265627477070653201'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2010/12/should-human-knowledge-be-represented.html' title='Should human knowledge be represented in logic?'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-6529831698723346109</id><published>2010-12-19T15:16:00.001-06:00</published><updated>2010-12-19T15:19:35.404-06:00</updated><title type='text'>Mathematics: a science for use</title><content type='html'>&lt;blockquote&gt;&lt;i&gt;Die ganzen Zahlen hat der liebe Gott gemacht, alles andere ist Menschenwerk (&lt;/i&gt;&lt;i&gt;God created the integers, all the rest is the work of man.) -- Leopold Kronecker, a mathematician&lt;/i&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;i&gt;"There is only one nature - the division into science and engineering is a human imposition, not a natural one. Indeed, the division is a human failure; it reflects our limited capacity to comprehend the whole." -- Bill Wulf, a computer scientist (Someones claim this to be a quote of Sir William&lt;/i&gt;&lt;span class="c33"&gt;&lt;span class="c37"&gt;&lt;span class="c32"&gt;&lt;span class="c37"&gt;&lt;span class="c32"&gt;&lt;span class="c37"&gt;&lt;span class="c32"&gt;&lt;span class="c37"&gt;&lt;span class="c32"&gt;&lt;span class="c37"&gt;&lt;span class="c32"&gt;&lt;span class="c37"&gt;&lt;span class="c32"&gt;&lt;span class="c37"&gt;&lt;span class="c33"&gt;&lt;span class="c37"&gt;&lt;span class="c32"&gt;&lt;span class="c37"&gt;&lt;span class="c33"&gt;&lt;span class="c37"&gt;&lt;span class="c32"&gt;&lt;span class="c37"&gt;&lt;span class="c32"&gt;&lt;span class="c37"&gt;&lt;span class="c36"&gt;&lt;span class="c37"&gt;&lt;i&gt; &lt;/i&gt;Cecil Dampier&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;i&gt;)&lt;/i&gt;&lt;/blockquote&gt;&lt;br /&gt;by Forrest Sheng Bao http://fsbao.net&lt;br /&gt;&lt;br /&gt;I had a talk with some guys this weekend. They believed that science and engineering are different. Their argument was that when we do science, we do not think about its use whereas for engineering, we have a ``clear'' useful purpose to serve. &lt;br /&gt;&lt;br /&gt;Well, then we should create a new word: mathematical engineer. &lt;br /&gt;&lt;br /&gt;A large portion of math is developed from our desire to use in real problems.&lt;br /&gt;&lt;br /&gt;Check these concepts below to see whether they are invented for use: &lt;br /&gt;&lt;ul&gt;&lt;li&gt;decimal numbers? &lt;/li&gt;&lt;li&gt;real numbers?&amp;nbsp;&lt;/li&gt;&lt;li&gt;negative numbers?&amp;nbsp;&lt;/li&gt;&lt;li&gt;imaginary numbers?&amp;nbsp; &lt;/li&gt;&lt;li&gt;geometry? The word geometry means ``earth measurement.''&lt;/li&gt;&lt;li&gt;the matrix?&lt;/li&gt;&lt;li&gt;calculus? &lt;i&gt;Calculus&lt;/i&gt; is a Latin word meaning pebble or stone used for counting.&lt;/li&gt;&lt;li&gt;differential equations? &lt;/li&gt;&lt;/ul&gt;We ``engineered'' those concepts out. Engineering (and the money it can bring) is a big driven force&amp;nbsp; to the development of science, especially computer science.&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-6529831698723346109?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=6529831698723346109' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/6529831698723346109'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/6529831698723346109'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2010/12/mathematics-science-for-use.html' title='Mathematics: a science for use'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-6853485129437117065</id><published>2010-12-19T14:26:00.000-06:00</published><updated>2010-12-19T14:26:47.202-06:00</updated><title type='text'>Will thinking humanly be easier?</title><content type='html'>by Forrest Sheng Bao http://fsbao.net&lt;br /&gt;&lt;br /&gt;In AI, &lt;a href="http://en.wikipedia.org/wiki/Automated_planning_and_scheduling"&gt;planning&lt;/a&gt; is a pain in the ass, because automated planner is not practical so far. We want the planner to find a rational solution of our problem. Then it takes a lot of time to find the rational plan. For example, it may take much longer time for an automated planner to find a plan to land several incoming jet in even a small airport than a human navigator. Aviation fuel is very expensive and if a jet run out of gas it will crash. &lt;br /&gt;&lt;br /&gt;What if we allow the planner to find an incorrect plan some time? I mean, humanly. Human beings make mistakes. Rationality is hard for us. Otherwise, we wouldn't create the word ``stupid,'' at least in Chinese, English and German. But we have been leaving with it for at least thousands of years according to documented history. &lt;br /&gt;&lt;br /&gt;If we could find a proper balance between computing time and correctness of the solution, then thinking humanly could be a better choice for automated planning.&lt;br /&gt;&lt;br /&gt;One step forward, do we really think (e.g., logic reasoning, satisfiability checking) when making a plan? If not, then we need to teach computers using our way to find a plan rather than teach them a new fancy way called ``think/act rationally.'' &lt;br /&gt;&lt;br /&gt;I think, therefore, I am? No, I am a human, therefore, I am.&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-6853485129437117065?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=6853485129437117065' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/6853485129437117065'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/6853485129437117065'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2010/12/will-thinking-humanly-be-easier.html' title='Will thinking humanly be easier?'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-2242799816110328827</id><published>2010-12-19T06:57:00.001-06:00</published><updated>2010-12-19T14:28:17.780-06:00</updated><title type='text'>When declarative programming does not make sense</title><content type='html'>by Forrest Sheng Bao http://fsbao.net &lt;br /&gt;&lt;br /&gt;Pretty much nothing we have created can make sense everywhere. It's very hard to make a universally useful tool. &lt;br /&gt;&lt;br /&gt;The term of &lt;a href="http://en.wikipedia.org/wiki/Declarative_programming"&gt;declarative programming&lt;/a&gt; has been out there for many years ago. Its idea is to only tell a computer what you  want without how to do it. The compute is supposed to just give you  want you want like a black box. Some has become successful, like HTML, SQL, LaTeX or &lt;a href="http://en.wikipedia.org/wiki/Prolog"&gt;Prolog&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;This idea sounds really cool, eh? Hold on one second. If we just need to declare what to do, then why do computer scientists spend so much time on developing algorithms? Why do we spend time on studying Quicksort or FFT? &lt;br /&gt;&lt;br /&gt;Oh, yes, HTML, LaTeX or SQL are not designed for these jobs. All right. Let's narrow down.&lt;br /&gt;&lt;br /&gt;One subset of declarative programming is called &lt;a href="http://en.wikipedia.org/wiki/Logic_programming"&gt;logic programming&lt;/a&gt;. Prolog is an example of logic programming languages. I am quite aware that logic programming is not popular at all when we have imperative ways to solve the same problem.&lt;br /&gt;&lt;br /&gt;Why haven't a lot of programmers embrace the declarative programming idea? &lt;br /&gt;&lt;br /&gt;Reason 1: It's slow.&lt;br /&gt;&lt;br /&gt;Logic programs are  solved using search algorithms (I guess this is the only way you can do it.) and the search in most cases takes  exponential time w.r.t. to the problem size. Just think about traversing a binary tree. Then why would you do that if a problem has a faster  algorithm?&lt;br /&gt;&lt;br /&gt;For example, sorting. Of course you can use search to find the result. Just prepare all combinations to order given numbers and then check all combinations until you find the sorted one. The time complexity is O(n!). Isn't that much slower than O(nlogn)?&lt;br /&gt;&lt;br /&gt;In such a case, using declarative programming does not make sense.&lt;br /&gt;&lt;br /&gt;Reason 2: It's hard to use.&lt;br /&gt;&lt;br /&gt;A world without loop? Sure, because you don't have to tell the computer how to do and loop is one kind of how-to-do. Instead, you are forced to use recursion because that is declarative. How to recursively do matrix multiplication? I would prefer the for-loop version. &lt;br /&gt;&lt;br /&gt;I don't mean a life without loop is sad. But human beings do not think in declarative ways when solving many problems. We prefer step 1, step 2, step 3, .... If programmers don't like that, there is not need to develop a new programming language or paradigm to make them change the way they think. Microsoft Windows sucks, but a lot of people get used to it and therefore Microsoft is still keeping Mac OS or Linux from being mainstream desktop OS. They will give up Microsoft Windows only if [(1 and 3) or (2 and 3)]:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Windows sucks too much and they can't tolerate any more&lt;/li&gt;&lt;li&gt;Mac OS or Linux is good and they can't resist&lt;/li&gt;&lt;li&gt;the cost of transition is affordable or worthy &lt;/li&gt;&lt;/ol&gt;Then the question is, in what case we shall use declarative programming. &lt;br /&gt;I don't know. I am still thinking. Come back some time later.&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-2242799816110328827?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=2242799816110328827' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/2242799816110328827'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/2242799816110328827'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2010/12/when-declarative-programming-does-not.html' title='When declarative programming does not make sense'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-5808157158496978552</id><published>2010-12-17T01:15:00.000-06:00</published><updated>2010-12-17T01:15:25.439-06:00</updated><title type='text'>Artificial intelligence is not all about thinking.</title><content type='html'>by Forrest Sheng Bao http://fsbao.net&lt;br /&gt;&lt;br /&gt;This article is rated as PG-17 by me because reading this article may cause the collapsing of your world view and/or religious faith, and consequently, a threatening to your life. &lt;br /&gt;&lt;br /&gt;I always thought that the introduction or the ending chapters of a textbook are not worth reading. Now I realize that I made such a big mistake on Russell and Norvig's famous AI textbook. I have been thinking about why symbolic AI is not developing fast since yesterday. And, now, I just realize that if i read those parts of the book, i don't have to swamp in Wikipedia pages about AI. I didn't read the 1st chapter and the 5th part of Russell and Norvig's famous AI textbook before I wrote this blog.&lt;br /&gt;&lt;br /&gt;OK, let's begin. &lt;br /&gt;&lt;br /&gt;Intelligence includes learning, right? But many people define AI as "a machine that can think." Like this one [1]. Thinking is not everything in learning.&lt;br /&gt;&lt;br /&gt;2000 years ago, a Chinese guy called Confucius said:"To study and not think is a waste. To think and not study is dangerous. (學而不思則罔，思而不學則殆)"&lt;br /&gt;&lt;br /&gt;I would change the definition of AI as "a machine that can perceive and think." Here, ``perceive'' includes learning. &lt;br /&gt;&lt;br /&gt;But this is not the end. In the famous Turing test (similar tests like Chinese Room), a machine is supposed to communicate with a human tester. Hence, the machine needs to take some actions according to the knowledge in his ``brain.'' Do you think Aristotle is intelligent if he spoke nothing? &lt;br /&gt;&lt;br /&gt;Therefore, I would like to revise my definition to AI into "a machine that can perceive, think and act."&lt;br /&gt;&lt;br /&gt;Then I saw Herbert Simon's words:"machines that think, that learn and that create."[2]&lt;br /&gt;&lt;br /&gt;And then I saw the title of the 5th part of Russell and Norvig's AI textbook:"Communicating, Perceiving and Acting." But I still would like to say that Russell and Norvig shouldn't put these ideas to the end of their book (before Conclusions). As I stated before, perceiving and acting are necessary parts of intelligence. &lt;br /&gt;&lt;br /&gt;I think that people working on symbolic intelligence (mostly logic and reasoning, in contrast to computational intelligence, e.g., machine learning, evolution computing, part of robotics) focus on formulating human logic into symbols and semantics too much. Knowledge acquisition and expression have been underestimated. &lt;br /&gt;&lt;br /&gt;References:&lt;br /&gt;[1] The website of Artificial General Intelligence Conference: "The original goal of the AI field was the construction of `thinking machines' " http://www.agi-conf.org/&lt;br /&gt;&lt;br /&gt;[2] Wikiquote page of Herbert A. Simon, http://en.wikiquote.org/wiki/Herbert_Simon&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-5808157158496978552?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=5808157158496978552' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/5808157158496978552'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/5808157158496978552'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2010/12/artificial-intelligence-is-not-all.html' title='Artificial intelligence is not all about thinking.'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-7875668081458967328</id><published>2010-12-12T21:02:00.002-06:00</published><updated>2010-12-12T21:07:51.705-06:00</updated><title type='text'>Reporting errors is a must-have feature of a good software</title><content type='html'>by Forrest Sheng Bao http://fsbao.net&lt;br /&gt;&lt;br /&gt;I happen to use two MATLAB toolboxes in one project now. Of course, you can make mistakes when using any software, e.g., giving the improper parameters. &lt;br /&gt;&lt;br /&gt;The very annoying thing happens on one of the toolboxes (let me call it "the unprofessional one"), which does not tell me the possible error i make. It's very like the blue screen of Windows - "all we can tell you is to restart your Windows box." Hold on, what is the problem? What can I do to avoid this?&lt;br /&gt;&lt;br /&gt;To solve the problem, I have to debug on my own, which is very time-consuming. Simply telling people the existence of error is not error reporting. &lt;br /&gt;&lt;br /&gt;So what is a good one? Let's take a look at the error reporting example below.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&amp;gt;&amp;gt; save_nii_series('dspm8_SUGER-HEALTH01_NBH-EPI_20100917_02',1000,4189)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; * - SPM8: rest_spm_vol&amp;nbsp; --------------------------------------------&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Unable to find file:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ..R-HEALTH01_NBH-EPI_20100917_02_1000.nii&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Please check that it exists.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -----------------------------------------&amp;nbsp; 20:48:19 - 12/12/2010&lt;br /&gt;&lt;br /&gt;??? Error using ==&amp;gt; rest_ReadNiftiImage at 104&lt;br /&gt;Meet error while reading data. Please restart MATLAB, this problem may be&lt;br /&gt;solved.&lt;br /&gt;&lt;br /&gt;Error in ==&amp;gt; save_nii_series at 18&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; data = rest_ReadNiftiImage(nii_name);&lt;/pre&gt;&lt;br /&gt;The last four lines of error are produced by the unprofessional one, which only tells me there is an error but not what kind of error. It also gives me an incorrect instruction, restarting MATLAB. Not to mention that it has English grammar errors in the error reporting.&lt;br /&gt;&lt;br /&gt;In contrast, the first a couple of lines of error are produced by SPM, a famous neuroimaging toolbox for MATLAB. It tells me the exact error, file path incorrectness.&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-7875668081458967328?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=7875668081458967328' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/7875668081458967328'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/7875668081458967328'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2010/12/reporting-errors-is-must-have-feature.html' title='Reporting errors is a must-have feature of a good software'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-4282092828217347041</id><published>2010-12-09T01:26:00.002-06:00</published><updated>2010-12-09T01:32:31.236-06:00</updated><title type='text'>A Git guide for myself</title><content type='html'>by Forrest Sheng Bao &lt;a href="http://fsbao.net/"&gt;http://fsbao.net&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;If you are referring this doc, you need to replace all capitalized letters by "real" letters. &lt;br /&gt;&lt;br /&gt;First, initialize Git and clone (formally fetch) existing code from Git server to local. When prompted, enter the password.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;$ git init&lt;br /&gt;Initialized empty Git repository in /home/forrest/forrest/work/BME/CTF_SAM_OUT/Code/.git/&lt;br /&gt;$ git clone ssh://USERNAME@PROJECTNAME.git.sourceforge.net/gitroot/PROJECTNAME/REPONAME&lt;br /&gt;Initialized empty Git repository in /home/forrest/forrest/work/BME/CTF_SAM_OUT/Code/REPNAME/.git/&lt;br /&gt;$ cd REPNAME/&lt;br /&gt;$ git config user.name "YOUR NAME"&lt;br /&gt;$ git config user.email "USERNAME@users.sf.net"&lt;/pre&gt;&lt;br /&gt;Move code you plan to push to Git server to current directory and add a push comment to them (like Summary in MediaWiki).&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;$ cp ../*.m .&lt;br /&gt;$ git add *&lt;br /&gt;$ git commit&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Push them into Git server finally. &lt;br /&gt;&lt;pre&gt;$ git remote add origin ssh://USERNAME@PROJECTNAME.git.sourceforge.net/gitroot/PROJECTNAME/REPONAME&lt;br /&gt;$ git config branch.master.remote origin&lt;br /&gt;$ git config branch.master.merge refs/heads/master&lt;br /&gt;$ git push origin master&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Done.&lt;br /&gt;&lt;br /&gt;Reference: &lt;a href="http://sourceforge.net/apps/trac/sourceforge/wiki/Git"&gt;http://sourceforge.net/apps/trac/sourceforge/wiki/Git&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-4282092828217347041?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=4282092828217347041' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/4282092828217347041'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/4282092828217347041'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2010/12/git-guide-to-myself.html' title='A Git guide for myself'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-1392849020361117582</id><published>2010-12-08T23:08:00.000-06:00</published><updated>2010-12-08T23:08:22.274-06:00</updated><title type='text'>Ubuntu Strong: Dual folder window and cloud synchronization everywhere</title><content type='html'>by Forrest Sheng Bao http://fsbao.net&lt;br /&gt;&lt;br /&gt;I have used many folder manager, Find on Mac OS X, IE on Windows, Nautilus on GNOME desktop environment of Linux. But, the latest Ubuntu (Linux) 10.10 modified Nautilus is the best I have ever used. &lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_fp-pi6U0QKc/TQBjAbGORaI/AAAAAAAAGz0/CHkhq2JA2bI/s1600/Sync_and_Twin_View.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="412" src="http://2.bp.blogspot.com/_fp-pi6U0QKc/TQBjAbGORaI/AAAAAAAAGz0/CHkhq2JA2bI/s640/Sync_and_Twin_View.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Two great features as shown above.&lt;br /&gt;&lt;br /&gt;First, you can show two different folder contents in parallel. This is very useful. How many of you have to deal with copying files between to folders? Are you tired of switching between windows?&lt;br /&gt;&lt;br /&gt;Second, I can synchronize any of my folder, no matter on which path, to Ubuntu One cloud. This is also very useful. Sometimes, we only need to backup files that are updated frequently in recent. And you don't wanna copy all files into the specified synchronization path, such as Dropbox folder. If you decide to not sync them anymore, easily uncheck the "Synchronize this folder" option.&amp;nbsp;&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-1392849020361117582?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=1392849020361117582' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/1392849020361117582'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/1392849020361117582'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2010/12/ubuntu-strong-dual-folder-window-and.html' title='Ubuntu Strong: Dual folder window and cloud synchronization everywhere'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_fp-pi6U0QKc/TQBjAbGORaI/AAAAAAAAGz0/CHkhq2JA2bI/s72-c/Sync_and_Twin_View.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-2787737361248724981</id><published>2010-12-06T16:36:00.001-06:00</published><updated>2010-12-12T22:26:38.163-06:00</updated><title type='text'>FreeSurfer surface-based work flow (Forrest version)</title><content type='html'>The Wiki of FreeSurfer is not well organized. Links are like Go-To statement. So instead of crawl over their links the next time, I would write done my own notes.&lt;br /&gt;&lt;br /&gt;First, I have a NIFTI format data under my current folder and it needs to converted into MGZ format. &lt;br /&gt;&lt;br /&gt;&lt;pre&gt;1$ ls&lt;br /&gt;s108921-0002-00000-000001-01.hdr&lt;br /&gt;s108921-0002-00000-000001-01.img&lt;br /&gt;$ mri_convert s108921-0002-00000-000001-01.img 290.mgz&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;After that, create a folder &lt;code&gt;290&lt;/code&gt; under &lt;code&gt;$SUBJECTS_DIR&lt;/code&gt;.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;$ mkdir ~/bin/freesurfer/subjects/290&lt;br /&gt;$ mkdir -p ~/bin/freesurfer/subjects/290/mri/orig&lt;br /&gt;$ cp 290.mgz ~/bin/freesurfer/subjects/290/mri/orig/&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Then do the reconstruction &lt;br /&gt;&lt;pre&gt;recon-all -all -s 290&lt;/pre&gt;&lt;br /&gt;Finally, check the surface&lt;br /&gt;&lt;pre&gt;~$ tkmedit 290 brainmask.mgz -aux T1.mgz -surfs&lt;/pre&gt;&lt;br /&gt;(if you want to see the segmentation result, add this option, &lt;code&gt;-segmentation aseg.mgz $FREESURFER_HOME/FreeSurferColorLUT.txt&lt;/code&gt; )&lt;br /&gt;&lt;br /&gt;and check the geometric features (left hemisphere) &lt;br /&gt;&lt;pre&gt;$ tksurfer 290 lh inflated&lt;/pre&gt;&lt;br /&gt;I played with some epileptic patients (structural/anatomical) MRI data. And come up with a new topic I can do later.&lt;br /&gt;&lt;br /&gt;References:&lt;br /&gt;http://surfer.nmr.mgh.harvard.edu/fswiki/FsTutorial/OutputData&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-2787737361248724981?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=2787737361248724981' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/2787737361248724981'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/2787737361248724981'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2010/12/freesurfer-work-flow-forrest-version.html' title='FreeSurfer surface-based work flow (Forrest version)'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-4434966726888126304</id><published>2010-12-03T21:42:00.003-06:00</published><updated>2010-12-04T16:03:32.881-06:00</updated><title type='text'>a five-minute tutorial on scp and rsync</title><content type='html'>by Forrest Sheng Bao http://fsbao.net&lt;br /&gt;&lt;br /&gt;scp and rsync are by default installed on any Linux distribution and Mac OS X.&lt;br /&gt;&lt;br /&gt;They are super easy tool to transfer files - you just need simple command. Beyond that, rsync only transfer files that have been changed or not complete. Both of them use SSH channel to protect your data against bad hackers.&lt;br /&gt;&lt;br /&gt;Scp is as easy as cp command on Linux and Mac OS X (for security reason, the usernames and IPs are replaced by XXX):&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;$ scp *.tar.bz2 XXX.XXX.XXX.XXX:/data/myback/&lt;br /&gt;XXX@XXX.XXX.XXX.XXX's password:&lt;br /&gt;290.tar.bz2         100%  635MB  19.8MB/s   00:32   &lt;br /&gt;363.tar.bz2         100%  609MB  19.6MB/s   00:31   &lt;br /&gt;498.tar.bz2         100%  462MB  17.8MB/s   00:26   &lt;br /&gt;558.tar.bz2         100%  380MB  31.6MB/s   00:12   &lt;br /&gt;711.tar.bz2         100%  720MB  36.0MB/s   00:20   &lt;br /&gt;815.tar.bz2         100%  457MB  22.8MB/s   00:20&lt;/pre&gt;&lt;br /&gt;See, it's very easy. You just need to add the destination IP ahead of the path. &lt;br /&gt;&lt;br /&gt;SCP is easy for transferring a couple of files. If you have a lot of files, you don't wanna re-transmit them as long as they never change. In this case, rsync is a good tool. &lt;br /&gt;&lt;br /&gt;The usage of rsync is the same as scp:&lt;br /&gt;&lt;pre&gt;$ rsync -azv --delete /dir1 XXX.XXX.XXX.XXX:/dir2/ --exclude=".*"&lt;br /&gt;XXX@XXX.XXX.XXX.XXX's password: &lt;br /&gt;sending incremental file list&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;In the example above, the local directory &lt;code&gt;dir1&lt;/code&gt; will be synchronized to remote directory &lt;code&gt;dir2&lt;/code&gt;. Attention, &lt;code&gt;dir1&lt;/code&gt; will be copied as a whole to &lt;code&gt;dir2&lt;/code&gt;. Therefore, after the synchronization, you will see a folder &lt;code&gt;dir1&lt;/code&gt; under the remote directory &lt;code&gt;dir2&lt;/code&gt;. Be careful on whether you need a forward slash (/) after the directory name. If we put a / after &lt;code&gt;dir1&lt;/code&gt; in the command, then everything under &lt;code&gt;dir1&lt;/code&gt; will be synchronized to remote directory &lt;code&gt;dir2/&lt;/code&gt; and hence you will not see a folder &lt;code&gt;dir1&lt;/code&gt; under &lt;code&gt;dir2&lt;/code&gt;. &lt;br /&gt;&lt;br /&gt;The &lt;code&gt;-azv&lt;/code&gt; option means to compress the transferring (useful for poor network connection) and display all steps. The &lt;code&gt;--delete&lt;/code&gt; option means to delete files that are no longer existing in the synchronization source. &lt;code&gt;--exclude=".*"&lt;/code&gt; means to exclude all files that satisfy the pattern in the quotation mark. You can add as many &lt;code&gt;--exclude&lt;/code&gt; blocks as you want.&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-4434966726888126304?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=4434966726888126304' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/4434966726888126304'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/4434966726888126304'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2010/12/five-minute-tutorial-on-scp-and-rsync.html' title='a five-minute tutorial on scp and rsync'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-3145967585044292375</id><published>2010-12-03T11:32:00.009-06:00</published><updated>2011-08-31T22:59:43.684-05:00</updated><title type='text'>Running MATLAB without graphic interface</title><content type='html'>&lt;h4&gt;Case 1: Interactive over SSH&lt;/h4&gt;Start MATLAB using the command:&lt;br /&gt;&lt;pre&gt;matlab -nodisplay -nojvm&lt;/pre&gt;&lt;h4&gt;Case 2: Just run a MATLAB script over SSH&lt;/h4&gt;In this case, you don't even need a MATLAB Prompt to interact with.&lt;br /&gt;&lt;pre&gt;matlab -nodisplay -nojvm -r a_code &amp;gt; matlab.out&lt;/pre&gt;&lt;br /&gt;Your MATLAB program should have the file name &lt;code&gt;a_code.m&lt;/code&gt; (you can change it to whatever name you like. But when you tell MATLAB to run it, omit the &lt;code&gt;.m&lt;/code&gt; suffix.) The &lt;code&gt;&amp;gt; matlab.out&lt;/code&gt; part redirects the output to a file rather than showing on your Linux/Mac OS X terminal. This way is preferred because you have a record on what is happening. &lt;br /&gt;&lt;h4&gt;Case 3: Run MATLAB script with input variables over SSH&lt;/h4&gt;First, go to the directory containing the MATLAB script that defines the function (or, fancier, add that directory into MATLAB PATH by editing your MATLABPATH environment variable or pathdef.m file). Then, run like this &lt;br /&gt;&lt;pre&gt;matlab -nodisplay -nojvm -r "my_function(10)"&lt;/pre&gt;Again, you can redirect the output to a file. &lt;br /&gt;&lt;br /&gt;You can also write a Shell, Perl or Python script to do so. MATLAB gives an example using Perl at &lt;a href="http://www.mathworks.com/help/techdoc/matlab_env/f8-4994.html"&gt;http://www.mathworks.com/help/techdoc/matlab_env/f8-4994.html&lt;/a&gt;&lt;br /&gt;&lt;h4&gt;Case 4: On Sun Grid Engine (SGE)-powered cluster&lt;/h4&gt;Write a job script below and submit it using &lt;code&gt;qsub&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;#!/bin/sh&lt;br /&gt;#$ -V&lt;br /&gt;#$ -cwd&lt;br /&gt;#$ -S /bin/bash&lt;br /&gt;#$ -N matlab&lt;br /&gt;#$ -o $JOB_NAME.o$JOB_ID&lt;br /&gt;#$ -e $JOB_NAME.e$JOB_ID&lt;br /&gt;#$ -q normal &lt;br /&gt;#$ -pe fill 12&lt;br /&gt;#$ -P hrothgar&lt;br /&gt;matlab -nodisplay -nojvm -r a_code &amp;gt; matlab.out&lt;/pre&gt;&lt;br /&gt;Your MATLAB program should have the file name a_code.m.&lt;br /&gt;&lt;br /&gt;For more options on starting MATLAB, please refer to its official doc at&lt;br /&gt;&lt;a href="http://www.mathworks.com/help/techdoc/ref/matlabunix.html"&gt;http://www.mathworks.com/help/techdoc/ref/matlabunix.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-3145967585044292375?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=3145967585044292375' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/3145967585044292375'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/3145967585044292375'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2010/12/running-matlab-code-on-sun-grid-engine.html' title='Running MATLAB without graphic interface'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-5240517282768366088</id><published>2010-12-02T06:01:00.000-06:00</published><updated>2010-12-02T06:01:58.557-06:00</updated><title type='text'>The sleeping experiment</title><content type='html'>Many years ago, when i first started working on brain imaging, I heard such a hypothesis: If a man uniformly distribute the sleeping hours into several slots (e.g., sleeping 1.5 hours after every 4.5 hours of working), then he has enough sleep while in total sleeps less. &lt;br /&gt;&lt;br /&gt;This is really a good hypothesis and I want to do an experiment to see whether it is true.&lt;br /&gt;&lt;br /&gt;So here is my plan. I will sleep from 7PM to 10 PM and 6AM to 9 AM every day. For the rest time, i will work.  In total, i only need 6 hours of sleeping every day. And I can increase my working hours to 18 per day. In such a way, I can have 136 hours of working per week - assuming that I am not gonna meet a pretty girl before I get my PhD. &lt;br /&gt;&lt;br /&gt;The benefit is obvious, I can be on during normal business hours while having a whole night quietly working - people in other labs make loud noise when their carts pass by my office door.&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-5240517282768366088?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=5240517282768366088' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/5240517282768366088'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/5240517282768366088'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2010/12/sleeping-experiment.html' title='The sleeping experiment'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-4668259383396696724</id><published>2010-11-25T18:16:00.001-06:00</published><updated>2010-11-25T18:17:51.371-06:00</updated><title type='text'>How come this ignorant lady used to be vice president candidate</title><content type='html'>by Forrest Sheng Bao http://fsbao.net&lt;br /&gt;&lt;br /&gt;I knew Sarah Palin had no idea on fixing this country in 2008. She only had slogans.&lt;br /&gt;&lt;br /&gt;But I really never expected her to be so ignorant. She even didn't know the difference between S. Korea and N. Korea.&lt;br /&gt;&lt;br /&gt;I got on Twitter today to check some news about N. Korea and then I saw a stunning news: &lt;b&gt;Sarah Palin says, "we’ve got to stand with our North Korean allies."&lt;/b&gt;&amp;nbsp; http://twitter.com/#!/saved-search/north%20korea%20sarah%20palin&lt;br /&gt;&lt;br /&gt;I found a formal version: http://blogs.wsj.com/iainmartin/2010/11/25/sarah-palin-says-us-must-stand-with-north-korean-allies/#&lt;br /&gt;&lt;br /&gt;How come this idiot used to be the vice president candidate in 2008 election? How come still so many people out there want her to run for president in 2012?&lt;br /&gt;&lt;br /&gt;That really makes sense that Barbara Bush wants her to stay at home. &lt;br /&gt;&lt;br /&gt;America, never ever give her the launch code. She will swipe out our allies, including Canadians.&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-4668259383396696724?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=4668259383396696724' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/4668259383396696724'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/4668259383396696724'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2010/11/how-come-this-ignorant-lady-used-to-be.html' title='How come this ignorant lady used to be vice president candidate'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-8550282650875618309</id><published>2010-11-23T21:31:00.003-06:00</published><updated>2010-12-04T15:54:39.377-06:00</updated><title type='text'>Measurement file header and NI Biomedical Start Kit</title><content type='html'>by Forrest Sheng Bao http://fsbao.net&lt;br /&gt;&lt;br /&gt;This semester, I am building an ECG sampling system (yes, like the one you can see in ER in Grey's Anatomy on TV) for my Medical Instrumentation class project. For the first time in my life, I amplified a signal by 5000 times! And, luckily, I had the chance to use a prototype NI myDAQ - yup, the one before released to the market. &lt;br /&gt;&lt;br /&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_fp-pi6U0QKc/TOx78fqut-I/AAAAAAAAGy0/jhsuG0HGgsw/s1600/myECG.PNG" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="212" src="http://4.bp.blogspot.com/_fp-pi6U0QKc/TOx78fqut-I/AAAAAAAAGy0/jhsuG0HGgsw/s320/myECG.PNG" width="320" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;This is my ECG of one beat! It doesn't look like textbook version though.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;Then I decided to use NI Biomedical Startup Kit to check the quality of my ECG. But something unpleasant. The ECG Feature Extractor of NI Biomedical Start Kit could only load the first 1 second of my data. Clearly, I had 2-minute long ECG recordings. Then I notice, the problem is on the header. The header of LVM file showed &lt;code&gt;Samples: 1000&lt;/code&gt;. In my LabVIEW program, I selected &lt;code&gt;One header only&lt;/code&gt; in &lt;code&gt;Segment headers option&lt;/code&gt; in &lt;code&gt;Save to Measurement file&lt;/code&gt; express VI. So I guess this might be the problem.&lt;br /&gt;&lt;br /&gt;Hence, I changed the Samples tag to 120000. Everything worked perfectly as expected!&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_fp-pi6U0QKc/TOyG9TXGK9I/AAAAAAAAGy4/Z5JYGMlWrIo/s1600/myECG_statistics.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="271" src="http://4.bp.blogspot.com/_fp-pi6U0QKc/TOyG9TXGK9I/AAAAAAAAGy4/Z5JYGMlWrIo/s320/myECG_statistics.PNG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;So, a reminder. If you are using NI Biomedical Start Kit out there, do select &lt;code&gt;One header per segment&lt;/code&gt; when saving measurement data. Or you can manually change the header as I did.&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-8550282650875618309?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=8550282650875618309' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/8550282650875618309'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/8550282650875618309'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2010/11/measurement-file-header-and-ni.html' title='Measurement file header and NI Biomedical Start Kit'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_fp-pi6U0QKc/TOx78fqut-I/AAAAAAAAGy0/jhsuG0HGgsw/s72-c/myECG.PNG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-1637786516550914376</id><published>2010-11-22T16:17:00.003-06:00</published><updated>2010-11-22T16:26:46.420-06:00</updated><title type='text'>I decide to rewrite flyback 0.4 code for a new project</title><content type='html'>by Forrest Sheng Bao http://fsbao.net &lt;br /&gt;&lt;br /&gt;Flyback (http://code.google.com/p/flyback/) is a very good backing up tool for Linux like Time Machine for Mac.&lt;br /&gt;&lt;br /&gt;But I really cannot stand the versions of flyback after v.0.4.&lt;br /&gt;&lt;ol&gt;&lt;li&gt;It uses Git instead of rsync (before v.0.4). Not to argue that rsync is small (file synchronization only) and Git is big (features for source code management), Git cannot handle files larger than the memory. I do medical image and signal processing. I have a lotta large files.&amp;nbsp;&lt;/li&gt;&lt;li&gt;flyback after v.0.4 is too complex. I can't even find where I can exclude a directory in backup. But Git actually provides such a function. I don't have the luxury to study the complex code to modify it.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Icannot set up timed backup now. For example, I want the code to be backed up twice a day. &lt;/li&gt;&lt;/ol&gt;I looked around other open source backup solutions. They are all too complex for me. After reading their websites for 1 minute, I still don't know how they work. For desktop users' simple requirement, we need simple solution: I tell the problem which directories to or not to back up and the program will back up for me incrementally, and even periodically. &lt;br /&gt;&lt;br /&gt;So I decide to work from flyback 0.4 source code which uses rsync and cp to do incremental backup. And create a new project which also uses GPL v2. &lt;br /&gt;&lt;ol&gt;&lt;li&gt;I wanna write a command line version of flyback 0.4. It will be designed very simple, just reading my configurations from a text file and calling basic Linux commands, e.g., rsync, chmod, cp and rm. This will be very easy and very useful on servers.&amp;nbsp;&lt;/li&gt;&lt;li&gt;I will simplify the flyback 0.4 code and add some new features, such as backup thru network using SSH.&amp;nbsp;&lt;/li&gt;&lt;li&gt;In such a way, the code can also work on Mac OS X. I can't stand the robustness of Time Machine. It sucks.&amp;nbsp; &lt;/li&gt;&lt;/ol&gt;I am quite busy now but I will slowly move this project as a hobby - which means I will have to eliminate my time on hanging out with girls :P .&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-1637786516550914376?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=1637786516550914376' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/1637786516550914376'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/1637786516550914376'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2010/11/i-decide-to-rewrite-flyback-04-code-for.html' title='I decide to rewrite flyback 0.4 code for a new project'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-6777766580499469267</id><published>2010-11-06T17:16:00.001-05:00</published><updated>2011-03-03T15:11:59.922-06:00</updated><title type='text'>Getting old version Google Docs back (no page or margins, like webpages)</title><content type='html'>I really don't like the new version of Google documents which creates new docs as on pieces of sized paper - what you see in a Word editor. I love the old one like webpages, without pages or margins. I want my content to be as wide as my computer screen. &lt;br /&gt;&lt;br /&gt;Google has an official way to go back the old style at the bottom of this help page: &lt;a href="https://docs.google.com/support/bin/answer.py?answer=176442"&gt;https://docs.google.com/support/bin/answer.py?answer=176442&lt;/a&gt;&lt;i&gt;.&lt;/i&gt;&lt;i&gt;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;The solution is to use this link to create new docs, in the old style:  &lt;a href="https://docs.google.com/?action=newdoc"&gt;https://docs.google.com/?action=newdoc&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-6777766580499469267?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=6777766580499469267' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/6777766580499469267'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/6777766580499469267'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2010/11/getting-old-version-google-docs-back-no.html' title='Getting old version Google Docs back (no page or margins, like webpages)'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-8810035631772682324</id><published>2010-11-04T14:42:00.001-05:00</published><updated>2010-11-04T14:42:51.869-05:00</updated><title type='text'>My ECG modulated on 60Hz</title><content type='html'>by Forrest Sheng Bao http://fsbao.net&lt;br /&gt;&lt;br /&gt;Below is a real ECG sampled from me! You can see the signal is highly polluted by 60Hz noise from our power system (60Hz in North America and 50Hz in elsewhere.) There are exactly 6 peaks of the same amplitude in 0.1 second. So, my ECG is modulated on a 60Hz base band signal. you can imagine my ECG by drawing a line from the middle of the 60Hz wave.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_fp-pi6U0QKc/TNJVHe_aNVI/AAAAAAAAGxs/5gvvzbLymbg/s1600/realECG_1.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="185" src="http://4.bp.blogspot.com/_fp-pi6U0QKc/TNJVHe_aNVI/AAAAAAAAGxs/5gvvzbLymbg/s640/realECG_1.PNG" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;I have also moved the circuit to a PCB prototyping matrix board. I used the analog I/O and power supply on NI ELVIS to test it with a simulated ECG signal. Wunderbarschon! &lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_fp-pi6U0QKc/TNJVHvJMGiI/AAAAAAAAGx8/650zHg0bKFo/s1600/S7003265.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="480" src="http://3.bp.blogspot.com/_fp-pi6U0QKc/TNJVHvJMGiI/AAAAAAAAGx8/650zHg0bKFo/s640/S7003265.JPG" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-8810035631772682324?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=8810035631772682324' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/8810035631772682324'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/8810035631772682324'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2010/11/my-ecg-modulated-on-60hz.html' title='My ECG modulated on 60Hz'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_fp-pi6U0QKc/TNJVHe_aNVI/AAAAAAAAGxs/5gvvzbLymbg/s72-c/realECG_1.PNG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-4845071751145263635</id><published>2010-10-31T14:43:00.003-05:00</published><updated>2010-10-31T22:56:31.422-05:00</updated><title type='text'>When shoudln't you use MATLAB Parallel Computing Toolbox</title><content type='html'>&lt;style&gt;span.keyword {color: #0000FF}span.comment {color: #228B22}span.string {color: #A020F0}&lt;/style&gt;&lt;br /&gt;&lt;br /&gt;by Forrest Sheng Bao http://fsbao.net&lt;br /&gt;&lt;br /&gt;Well, a line of code is more meaningful than a thousand sentences. Here is the beef! &lt;br /&gt;&lt;br /&gt;The MATLAB code:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;span class="comment"&gt;%%%%%%%%%%%%%% begin test 1 %%%%%%%%%%%%%%%%%%&lt;/span&gt;&lt;br /&gt;clear &lt;span class="string"&gt;all&lt;/span&gt;;&lt;br /&gt;clc&lt;br /&gt;&lt;br /&gt;scale = 8192*8192;&lt;br /&gt;&lt;br /&gt;A=zeros(1,scale);&lt;br /&gt;&lt;br /&gt;&lt;span class="keyword"&gt;for&lt;/span&gt; i=1:scale&lt;br /&gt;  A(i) = sin(i*2*pi/1024);&lt;br /&gt;&lt;span class="keyword"&gt;end&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;serial_time = toc&lt;br /&gt;&lt;br /&gt;tic&lt;br /&gt;&lt;br /&gt;&lt;span class="keyword"&gt;parfor&lt;/span&gt; i=1:scale&lt;br /&gt;  A(i) = sin(i*2*pi/1024);&lt;br /&gt;&lt;span class="keyword"&gt;end&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;parallel_time = toc&lt;br /&gt;&lt;br /&gt;&lt;span class="comment"&gt;%%%%%%%%%%%%%% END of test 1 %%%%%%%%%%%%%%%%%%&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="comment"&gt;%%%%%%%%%%%%%% BEGIN of test 2 %%%%%%%%%%%%%%%&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;clear &lt;span class="string"&gt;all&lt;/span&gt;;&lt;br /&gt;scale2 = 10;&lt;br /&gt;a= zeros(scale2);&lt;br /&gt;&lt;br /&gt;tic&lt;br /&gt;&lt;span class="keyword"&gt;for&lt;/span&gt; k = 1:scale2&lt;br /&gt;    a(k) = max(eig(rand(300)));&lt;br /&gt;&lt;span class="keyword"&gt;end&lt;/span&gt;&lt;br /&gt;serial_time2 = toc&lt;br /&gt;&lt;br /&gt;matlabpool &lt;span class="string"&gt;open&lt;/span&gt; &lt;span class="string"&gt;local&lt;/span&gt; &lt;span class="string"&gt;2&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;tic&lt;br /&gt;&lt;span class="keyword"&gt;parfor&lt;/span&gt; k = 1:scale2&lt;br /&gt;    a(k) = max(eig(rand(300)));&lt;br /&gt;&lt;span class="keyword"&gt;end&lt;/span&gt;&lt;br /&gt;parallel_time2 = toc&lt;br /&gt;&lt;br /&gt;matlabpool &lt;span class="string"&gt;close&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="comment"&gt;%%%%%%%%%%%%%% END of test 2 %%%%%%%%%%%%%%%&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The timing result:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;serial_time =&lt;br /&gt;&lt;br /&gt;    0.0048&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;parallel_time =&lt;br /&gt;&lt;br /&gt;    0.2451&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;serial_time2 =&lt;br /&gt;&lt;br /&gt;    3.8324&lt;br /&gt;&lt;br /&gt;Starting matlabpool using the 'local' configuration ... connected to 2 labs.&lt;br /&gt;&lt;br /&gt;parallel_time2 =&lt;br /&gt;&lt;br /&gt;    2.5019&lt;br /&gt;&lt;br /&gt;Sending a stop signal to all the labs ... stopped.&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Therefore, using &lt;code&gt;parfor&lt;/code&gt; does not guarantee speed up all the time.&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-4845071751145263635?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=4845071751145263635' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/4845071751145263635'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/4845071751145263635'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2010/10/when-shoudlnt-you-use-matlab-parallel.html' title='When shoudln&apos;t you use MATLAB Parallel Computing Toolbox'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-4914270866625672504</id><published>2010-10-31T14:19:00.000-05:00</published><updated>2010-10-31T14:19:17.903-05:00</updated><title type='text'>MATLAB uses multicores automatically on Unix?</title><content type='html'>by Forrest Sheng Bao http://fsbao.net&lt;br /&gt;&lt;br /&gt;Tested on Ubuntu Linux 9.10 and Mac OS X 10.6.&lt;br /&gt;&lt;style&gt;span.keyword {color: #0000FF}span.comment {color: #228B22}span.string {color: #A020F0}&lt;/style&gt;&lt;br /&gt;&lt;br /&gt;I am studying MATLAB Parallel Computing Toolbox these days. Then I notice an interesting thing. It seems MATLAB can use two cores automatically without the need for me to turn on parallel features, e.g., parfor.&lt;br /&gt;&lt;br /&gt;Here is a simple code&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;clear &lt;span class="string"&gt;all&lt;/span&gt;;&lt;br /&gt;scale2 = 120;&lt;br /&gt;a= zeros(scale2);&lt;br /&gt;&lt;br /&gt;tic&lt;br /&gt;&lt;span class="keyword"&gt;for&lt;/span&gt; k = 1:scale2&lt;br /&gt;    a(k) = max(eig(rand(300)));&lt;br /&gt;&lt;span class="keyword"&gt;end&lt;/span&gt;&lt;br /&gt;serial_time2 = toc&lt;br /&gt;&lt;br /&gt;matlabpool &lt;span class="string"&gt;open&lt;/span&gt; &lt;span class="string"&gt;local&lt;/span&gt; &lt;span class="string"&gt;2&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;tic&lt;br /&gt;&lt;span class="keyword"&gt;parfor&lt;/span&gt; k = 1:scale2&lt;br /&gt;    a(k) = max(eig(rand(300)));&lt;br /&gt;&lt;span class="keyword"&gt;end&lt;/span&gt;&lt;br /&gt;parallel_time2 = toc&lt;br /&gt;&lt;br /&gt;matlabpool &lt;span class="string"&gt;close&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The first part uses regular for loop while the second part uses the parallel for loop (parfor). I have only two cores. So I only open two local labs.&lt;br /&gt;&lt;br /&gt;But the information from "top" is funny. When the regular for loop runs, both cores are working, like this:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;top - 17:06:30 up 17 days, 21:06,  5 users,  load average: 2.27, 2.48, 2.47&lt;br /&gt;Tasks: 225 total,   1 running, 223 sleeping,   0 stopped,   1 zombie&lt;br /&gt;Cpu(s): 99.0%us,  0.7%sy,  0.0%ni,  0.0%id,  0.0%wa,  0.3%hi,  0.0%si,  0.0%st&lt;br /&gt;Mem:   2024568k total,  1296560k used,   728008k free,    36792k buffers&lt;br /&gt;Swap:  4200988k total,   350956k used,  3850032k free,   303616k cached&lt;br /&gt;&lt;br /&gt;  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND            &lt;br /&gt; 8042 forrest   20   0 1118m 335m  31m S  198 17.0  14:05.05 MATLAB  &lt;/pre&gt;&lt;br /&gt;On GNOME System Monitor, two cores are both running at 100%.&lt;br /&gt;&lt;br /&gt;When parallel loops are running, there are two jobs named MATLAB, each of which takes one core. &lt;br /&gt;&lt;br /&gt;&lt;pre&gt;top - 17:08:20 up 17 days, 21:08,  5 users,  load average: 2.83, 2.58, 2.50&lt;br /&gt;Tasks: 229 total,   2 running, 226 sleeping,   0 stopped,   1 zombie&lt;br /&gt;Cpu(s):  2.5%us,  1.0%sy,  0.0%ni, 95.9%id,  0.5%wa,  0.0%hi,  0.0%si,  0.0%st&lt;br /&gt;Mem:   2024568k total,  1477524k used,   547044k free,    36900k buffers&lt;br /&gt;Swap:  4200988k total,   350956k used,  3850032k free,   305192k cached&lt;br /&gt;&lt;br /&gt;  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND            &lt;br /&gt;16049 forrest   20   0  897m 137m  53m S   99  6.9   0:10.43 MATLAB             &lt;br /&gt;16055 forrest   20   0  873m 134m  54m S   97  6.8   0:10.19 MATLAB &lt;/pre&gt;&lt;br /&gt;Here is the timing result:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;serial_time2 =&lt;br /&gt;&lt;br /&gt;   31.9760&lt;br /&gt;&lt;br /&gt;Starting matlabpool using the 'local' configuration ... connected to 2 labs.&lt;br /&gt;&lt;br /&gt;parallel_time2 =&lt;br /&gt;&lt;br /&gt;   18.2054&lt;br /&gt;&lt;br /&gt;Sending a stop signal to all the labs ... stopped. &lt;/pre&gt;&lt;br /&gt;So, MATLAB seems to try to use two cores even when parallel codings are not used on UNIX machines. But it does not "fully" use two cores though two cores are both working 100% in regular for loops. I guess this has to do with the communication overhead.&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-4914270866625672504?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=4914270866625672504' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/4914270866625672504'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/4914270866625672504'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2010/10/matlab-uses-multicores-automatically-on.html' title='MATLAB uses multicores automatically on Unix?'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-6981311419756863566</id><published>2010-10-28T14:34:00.000-05:00</published><updated>2010-10-28T14:34:43.292-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='matlab'/><title type='text'>Anything like MATLAB profiler for Python?</title><content type='html'>I just saw an interesting feature of MATLAB today. It's called Profiler in Parallel Computing Toolbox (http://www.mathworks.com/help/toolbox/distcomp/bra51qt-1.html). Basically, it's very similar to profile command (http://www.mathworks.com/help/techdoc/ref/profile.html). &lt;br /&gt;&lt;br /&gt;You can know the time spending on each line of code. This is a very useful tool for scientific computing. I would like to know whether we have the similar stuff for Python.&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-6981311419756863566?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=6981311419756863566' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/6981311419756863566'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/6981311419756863566'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2010/10/anything-like-matlab-profiler-for.html' title='Anything like MATLAB profiler for Python?'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-3090911029280105059</id><published>2010-10-19T21:24:00.000-05:00</published><updated>2010-10-19T21:24:03.630-05:00</updated><title type='text'>Dropbox using Softlayer's cloud?</title><content type='html'>I was configuring the firefall to allow my colleagues get thru. But I saw an suspicious connection to a sub-sub-sub-sub domain of Softlayer.com What the heck! &lt;br /&gt;&lt;br /&gt;Then I saw it was Dropbox doing that. Geez! Does this mean that Dropbox is using the cloud provided by Softlayer.com ?&lt;br /&gt;&lt;br /&gt;This is a smart way to start business.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_fp-pi6U0QKc/TL5SrlX2zYI/AAAAAAAAGxQ/vmaUTkJ-DIk/s1600/Dropbox-Softlayer.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="342" src="http://2.bp.blogspot.com/_fp-pi6U0QKc/TL5SrlX2zYI/AAAAAAAAGxQ/vmaUTkJ-DIk/s400/Dropbox-Softlayer.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-3090911029280105059?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=3090911029280105059' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/3090911029280105059'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/3090911029280105059'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2010/10/dropbox-using-softlayers-cloud.html' title='Dropbox using Softlayer&apos;s cloud?'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_fp-pi6U0QKc/TL5SrlX2zYI/AAAAAAAAGxQ/vmaUTkJ-DIk/s72-c/Dropbox-Softlayer.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-8405964884523250063</id><published>2010-10-14T22:50:00.000-05:00</published><updated>2010-10-14T22:50:27.454-05:00</updated><title type='text'>high resolution ADC vs. high-gain amplifier: A lesson from Bode Analyzer of NI myDAQ</title><content type='html'>by Forrest Sheng Bao http://fsbao.net&lt;br /&gt;&lt;br /&gt;Around a month ago, I met an engineer from an EEG sampling system company. I asked him many specifications of their circuit. He told me that they only amplify the EEG signal by 20 or 30 times and then feed it to a 24-bit ADC. Besides noise issues,&amp;nbsp; did not understand why they chose high-resolution ADC over high-gain amplifier. Today I learned a lesson and figured out.&lt;br /&gt;&lt;br /&gt;I am using &lt;a href="http://www.ni.com/mydaq/"&gt;NI myDAQ&lt;/a&gt; these days to test the amplification (very high gain, expected to be 10,000 or 80dB) circuit I prepared for ECG data acquisition project. Of course, Bode plot is what I used to the check the gain and phase shift.&lt;br /&gt;&lt;br /&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;img border="0" height="640" src="http://1.bp.blogspot.com/_fp-pi6U0QKc/TLfNZjBdw6I/AAAAAAAAGw8/vo382Zx0_1U/s640/S7003158.JPG" style="margin-left: auto; margin-right: auto;" width="480" /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr align="justify"&gt;&lt;td class="tr-caption"&gt;My configuration. The chip on the left is an TI OPA177 used to divide  the input voltage of INA128 to as low as 1mV. The minimum resolution of  the Function Generator of NI myDAQ is 10mV and I wanted the signal  amplitude to be as low as raw ECG. The chip on the right is TI INA128,  with R_G set as 5 Ohm. The output signal of INA128 is filtered by an RC  bandpass filter and then goes to myDAQ. There was an error in the  circuit when I shot this picture. The ground of RC circuit was not  grounded. &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_fp-pi6U0QKc/TLfNZjBdw6I/AAAAAAAAGw8/vo382Zx0_1U/s1600/S7003158.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Any analog circuit has a setting time (at least the speed of light), e.g., to reach a feedback balance. When the gain of an amplifier goes very high, the setting time increases nonlinearly. According to the datasheet (&lt;a href="http://www.ti.com/lit/gpn/ina128"&gt;http://www.ti.com/lit/gpn/ina128&lt;/a&gt;) from Texas Instruments, the setting time of instrumentation amplifier INA128 is 9 us when gain is 100 while 80 us when gain is 1000. The gain of INA128 ranges from 1 to 10000. But the datasheet does not say what will happen for gain larger than 1000.  Why? Probably because the setting time is very long and varies from device to device.&lt;br /&gt;&lt;br /&gt;This is like many bivariate constraints in analog circuit design, e.g., gain-bandwidth product. Therefore, in Bode analysis, it needs to wait significant long enough time before you can measure the output and move the next frequency.&amp;nbsp; &lt;br /&gt;&lt;br /&gt;But the Bode Analyzer that comes with NI myDAQ (also used on NI ElVIS II/II+), does not give the circuit enough setting time. The software measures the output before the circuit can settle down from the input stimulus. &lt;br /&gt;&lt;br /&gt;What happened was, when gain is 1000, I saw this&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_fp-pi6U0QKc/TLfCA7voYTI/AAAAAAAAGww/MoX1XiSAPQI/s1600/INA128_1Hz_Bode_1000x.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://2.bp.blogspot.com/_fp-pi6U0QKc/TLfCA7voYTI/AAAAAAAAGww/MoX1XiSAPQI/s400/INA128_1Hz_Bode_1000x.PNG" width="338" /&gt;&lt;/a&gt;&lt;/div&gt;I said, what? Where are my signals over 14 Hz? But when I increase the gain to 5000 (well, from myDAQ's oscilloscope which now I assume has errors too because the theoretical gain for my configuration is 10,000.), I was thinking to withdraw this class:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_fp-pi6U0QKc/TLfCcO_p60I/AAAAAAAAGw0/UsnWNcTf1bk/s1600/INA128_1Hz_Bode_5000x.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://2.bp.blogspot.com/_fp-pi6U0QKc/TLfCcO_p60I/AAAAAAAAGw0/UsnWNcTf1bk/s400/INA128_1Hz_Bode_5000x.PNG" width="338" /&gt;&lt;/a&gt;&lt;/div&gt;The gain was constantly high before 10 Hz and dropped drastically after that. The phase shifting plot looked like stock market after that. According to the datasheet of INA128, the gain should not drop before 1kHz. &lt;br /&gt;&lt;br /&gt;Why? Now I know the answer, because the Bode Analyzer did not wait until the circuit to stabilize. It measured unstable output. As the gain goes higher, more waiting time is needed.&lt;br /&gt;&lt;br /&gt;But at that moment, I did not think about this. I tried another way to study the problem, using other instruments. I checked the waveform on the Oscilloscope of NI myDAQ while letting the Function Generator of myDAQ sweep from 1 Hz to 20Hz, with a step of 0.5 Hz. And, I let the signal stay at each frequency for 3 second, way enough for the circuit to stabilize. By comparing the Vp-p on the oscilloscope, I saw that my circuit wasn't as bad as the Bode plot showed. It was as designed. &lt;br /&gt;&lt;br /&gt;Below is a video I took when the Function Generator swept. I didn't save the original video for the output from INA128. Instead, I recorded the output waveform from an RC bandpass filter following the output of INA128 (blue line). The green line was the input to INA128. I set the cutoff frequency of the RC filter at 15Hz (which is not exact because the discrete components have 5% error each). As you can see, the signal drops gradually after 8Hz but not at a &amp;gt;100dB attenuation. Also, the phase shift wasn't as crazy as stock market. The shift was almost invisible. Of course, I need to fix the circuit because apparently, the -3-dB point was at 22Hz (not shown on the screen as I ended the screencast early).&lt;br /&gt;&lt;br /&gt;&lt;object height="385" width="480"&gt;&lt;param name="movie" value="http://www.youtube.com/v/Wdqp--pDniY?fs=1&amp;amp;hl=en_US"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/Wdqp--pDniY?fs=1&amp;amp;hl=en_US" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;So, go back to my question, why medical instruments prefer high-resolution ADC over high-gain amplifier, besides noise issues. Well, a high-gain amplifier takes long time to stabilize (INA128 takes 80us to set at G=1000), then the sampling rate cannot be high (for INA128, sampling rate can not be higher than 10kHz when G=1000). The setting time for amplifiers at high gain, is longer than the setting time of a high-resolution ADC (which can handle MHz signal).&lt;br /&gt;&lt;br /&gt;PS: Another interesting thing is that Bode Analyzer of myDAQ gave me this for TI INA101:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_fp-pi6U0QKc/TLfOJlNHeyI/AAAAAAAAGxA/O5yRyAnbLZU/s1600/INA101_1to20Hz.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://2.bp.blogspot.com/_fp-pi6U0QKc/TLfOJlNHeyI/AAAAAAAAGxA/O5yRyAnbLZU/s400/INA101_1to20Hz.PNG" width="338" /&gt;&lt;/a&gt;&lt;/div&gt;&amp;nbsp;I would like to know whether INA101 is really bad from 1 to 10 Hz or it's another problem of the Bode Analyzer of myDAQ.&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-8405964884523250063?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=8405964884523250063' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/8405964884523250063'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/8405964884523250063'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2010/10/high-resolution-adc-vs-high-gain.html' title='high resolution ADC vs. high-gain amplifier: A lesson from Bode Analyzer of NI myDAQ'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_fp-pi6U0QKc/TLfNZjBdw6I/AAAAAAAAGw8/vo382Zx0_1U/s72-c/S7003158.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-354862386001196224</id><published>2010-10-12T22:17:00.000-05:00</published><updated>2010-10-12T22:17:41.676-05:00</updated><title type='text'>64-bit Mac OS X pain with AFNI and libpng12.0.dylib</title><content type='html'>by Forrest Sheng Bao http://fsbao.net&lt;br /&gt;&lt;br /&gt;Once I felt that Mac OS X had no big difference from Linux. Geez, I was almost killed these weekend. A short version: Fink is way complex to use than Aptitude (like the apt-get on Ubuntu Linux, uhn? ).&lt;br /&gt;&lt;br /&gt;Long version - hope i will help other AFNI users on 64-bit Mac OS X 10.6 Snow Leopard. &lt;br /&gt;&lt;br /&gt;I thought I had AFNI already on my Mac. So I tried to study a function of it. I typed afni on the shell and this was my greetings:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;$ afni&lt;br /&gt;dyld: Library not loaded: /sw/lib/libpng12.0.dylib&lt;br /&gt;&amp;nbsp; Referenced from: /Users/forrest/sw/abin/afni&lt;br /&gt;&amp;nbsp; Reason: no suitable image found.&amp;nbsp; Did find:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /sw/lib/libpng12.0.dylib: mach-o, but wrong architecture&lt;br /&gt;Trace/BPT trap&lt;/pre&gt;&lt;br /&gt;I said, what? Then I dig down:&lt;br /&gt;&lt;pre&gt;$ file /sw/lib/libpng12.0.dylib&lt;br /&gt;/sw/lib/libpng12.0.dylib: Mach-O dynamically linked shared library i386&lt;br /&gt;$ file /Users/forrest/sw/abin/afni&lt;br /&gt;/Users/forrest/sw/abin/afni: Mach-O 64-bit executable x86_64&lt;/pre&gt;&lt;br /&gt;I said again, what? How come Fink compiled everything as 32-bit? &lt;br /&gt;&lt;br /&gt;Then I googled around religiously. I was the only unlucky guy. Many AFNI users had this problem. &lt;br /&gt;&lt;br /&gt;The Fink I installed was 32-bit so everything installed via Fink was 32-bit. Why couldn't Fink select the version automatically when I installed it? I am lazy guy who never take a look at on screen prompts but press Enter all the time. Sadly, the default setting was 32-bit. I guess the reason is because Fink does not have as many 64-bit packages as 32-bit packages. But this shouldn't be a problem for open source software. Well, probably compiling existing 32-bit code on 64-bit Mac OS X is a little tricky. See, this problem does not exist on Linux because everything open. &lt;br /&gt;&lt;br /&gt;Anywho (a lot people in west Texas do not understand this west Texas English word, meaning "anyway."), easiest solution: Remove everything under /sw and install everything from the scratch. So, I will go home now and leave the computer on.&lt;br /&gt;&lt;br /&gt;Detailed fixings:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;If you downloaded AFNI for Mac OS X 10.6 on 64-bit Intel Mac, you HAVE TO install 64-bit Fink. &lt;/li&gt;&lt;li&gt;Go to Fink's SourceForge page to download latest Fink source code. &lt;/li&gt;&lt;li&gt;Follow this link to install Fink: &lt;a href="http://www.finkproject.org/download/srcdist.php"&gt;http://www.finkproject.org/download/srcdist.php&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Remember to select 64-bit when you first start compiling Fink.&lt;/li&gt;&lt;li&gt;Follow AFNI installation procedures then. &lt;a href="http://afni.nimh.nih.gov/pub/dist/HOWTO/howto/ht00_inst/html/mac_10.6.shtml"&gt;http://afni.nimh.nih.gov/pub/dist/HOWTO/howto/ht00_inst/html/mac_10.6.shtml&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;Another thing I do not understand is that why my SelfUpdateTrees in /sw/etc/Fink.conf was set as 10.4 while the Distribution is 10.6. I don't know the meaning of SelfUpdateTrees anyway. So, I just pretend that there is no problem.&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-354862386001196224?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=354862386001196224' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/354862386001196224'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/354862386001196224'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2010/10/64-bit-mac-os-x-pain-with-afni-and.html' title='64-bit Mac OS X pain with AFNI and libpng12.0.dylib'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-6560086289794247288</id><published>2010-10-12T20:27:00.001-05:00</published><updated>2011-10-02T15:53:58.901-05:00</updated><title type='text'>Tracking changes in LaTeX</title><content type='html'>by Forrest Sheng Bao http://fsbao.net&lt;br /&gt;&lt;br /&gt;LaTeX is always a cool tool for technical writing. And change tracking in LaTeX is awesome - you can get professional track changing output in PDF. No need to bother with bubbles in Microsoft Word. (I really don't understand why Microsoft Word tracks changes on formatting (e.g., from bold to italic). If the document is professional, then that should be a mistake fixing rather than a change because a professional document has formatting standards.)&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://trackchanges.sourceforge.net/"&gt;http://trackchanges.sourceforge.net&lt;/a&gt;&amp;nbsp; This one even comes with a Python script that allows you to reject or accept change interactively.&amp;nbsp;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.ctan.org/tex-archive/support/latexdiff/latexdiff"&gt;http://www.ctan.org/tex-archive/support/latexdiff/latexdiff&lt;/a&gt; It generates a version highlighting insertions and deleting using different colors, fonts or underlines from two LaTeX files. This one also supports put all deletions into footnotes. I would recommend this one over TrackChanges. On Ubuntu (10.04 or later), apt-get can install for you. If you just download and use on previous version of Ubuntu, you need to install Perl &lt;code&gt;Algorithm::Diff&lt;/code&gt; package. &lt;/li&gt;&lt;li&gt;&lt;a href="http://wiki.lyx.org/Tips/ChangeTrackingLyx1-3-2"&gt;LyX&lt;/a&gt;: LyX is a LaTeX based WYSIWYG editor. It has GUI for tracking changes. The output can be in seen in final PDF. You can also use the GUI to accept or reject changes. I like this tool. Users don't need too much information about LaTeX. And a lotta people like GUIs.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;ok, show time - well, only latexdiff.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-PAmee4sqJJw/TojIhYHXmSI/AAAAAAAAIHs/vH-E0TR9NpQ/s1600/latex-diff-1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="116" src="http://2.bp.blogspot.com/-PAmee4sqJJw/TojIhYHXmSI/AAAAAAAAIHs/vH-E0TR9NpQ/s640/latex-diff-1.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-6560086289794247288?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=6560086289794247288' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/6560086289794247288'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/6560086289794247288'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2010/10/tracking-changes-in-latex.html' title='Tracking changes in LaTeX'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-PAmee4sqJJw/TojIhYHXmSI/AAAAAAAAIHs/vH-E0TR9NpQ/s72-c/latex-diff-1.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-3221799402275742548</id><published>2010-10-10T14:53:00.002-05:00</published><updated>2010-10-10T15:01:23.452-05:00</updated><title type='text'>Bureaucratic English are very unAmerican</title><content type='html'>by Forrest Sheng Bao http://fsbao.net&lt;br /&gt;&lt;br /&gt;I strongly dislike reading emails or papers in bureaucratic English, i.e., English of verbose structures of void words. &lt;br /&gt;&lt;br /&gt;For example, please do not say "I've made the decision." I prefer "I've decided." &lt;br /&gt;&lt;br /&gt;Bureaucratic sentences take me more time to read and long structures distract me. Longer emails or papers will also consume more natural resources in both soft and hard copies. I prefer to Go Green. &lt;br /&gt;&lt;br /&gt;Geroge Orwell pointed out this problem in 1946 in his essay "Politics and the English language." You can Google to read this essay. For example, "contact" is better than "make contact with". Why would you use 3 words whereas 1 word is equivalent? &lt;br /&gt;&lt;br /&gt;Besides this, I dislike another way to "prolong" sentences. Please do not say "I have modified some places on the basis of 2nd version. " I prefer to say "I have revised the 2nd version." - Actually, you don't wanna express whether the changes are major or minor.&lt;br /&gt;&lt;br /&gt;This problem is very particular in British English. I prefer papers written by international (not English language native) authors. Their sentences are very compact, without rhetoric or stylish stuffs.&lt;br /&gt;&lt;br /&gt;Chinese used in mainland China also have this problem. Communism propaganda machine has brainwashed people's way of critical thinking and speaking Chinese. Government official news are super long, full of bureaucratic and void words. They have also created many phrases that do not follow any Chinese grammar. A whole paragraph of their articles can express the same and tiny idea - like non-coding segments in a genome. One reason they do so may be to distract people in understanding their ideas and therefore prevent people from thinking the logic in their nonsense. Taiwanese or Singaporean gov docs are more concise and shorter.&lt;br /&gt;&lt;br /&gt;So, bureaucratic sentences are very British or Communism, thus, unAmerican. Go green, and please say concise sentences.&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-3221799402275742548?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=3221799402275742548' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/3221799402275742548'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/3221799402275742548'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2010/10/verbose-sentences-are-very-unamerican.html' title='Bureaucratic English are very unAmerican'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-896341433088017658</id><published>2010-10-08T19:12:00.001-05:00</published><updated>2010-10-08T19:13:12.728-05:00</updated><title type='text'>LabVIEW 2009 (or SP1) Installation on Ubuntu Linux 9.10/10.04</title><content type='html'>by Forrest Sheng Bao &lt;a href="http://fsbao.net/"&gt;http://fsbao.net&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;First, install rpm on your Ubuntu box&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;sudo apt-get install rpm&lt;/pre&gt;&lt;br /&gt;Then, mount the installation DVD. Since LabVIEW 2009, NI puts Linux version and Mac OS X version on the same DVD - Did they copy the idea from MATLAB? So it's a little bit tricky: &lt;a href="http://ubuntuforums.org/showthread.php?t=1223545"&gt;http://ubuntuforums.org/showthread.php?t=1223545&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I used this command. But it varies depending on your CDROM device name. &lt;br /&gt;&lt;pre&gt;sudo mount /dev/sr0 /media/cdrom1 -t hfsplus&lt;/pre&gt;&lt;br /&gt;Now you are ready. Go to the directory where LabVIEW installation RPMs are. Run these commands sequencially. You can copy and paste them into your Terminal. &lt;br /&gt;&lt;br /&gt;For LabVIEW 2009 SP1 (Spring 2010 update)&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;sudo rpm -ivh labview-2009-rte-9.0.1-1.i386.rpm --nodeps --force-debian&lt;br /&gt;sudo rpm -ivh labview-2009-core-9.0.1-1.i386.rpm --nodeps --force-debian&lt;br /&gt;sudo rpm -ivh labview-2009-appbuild-9.0.1-1.i386.rpm --force-debian&lt;br /&gt;sudo rpm -ivh labview-2009-desktop-9.0.1-1.i386.rpm --nodeps --force-debian&lt;br /&gt;sudo rpm -ivh nisvcloc-9.0.1-1.i386.rpm --nodeps --force-debian&lt;br /&gt;sudo rpm -ivh labview-2009-help-9.0.1-1.i386.rpm --force-debian&lt;br /&gt;sudo rpm -ivh labview-2009-examples-9.0.1-1.i386.rpm --nodeps --force-debian&lt;br /&gt;sudo rpm -ivh nilvmerge-9.0.1-1.i386.rpm --nodeps --force-debian&lt;br /&gt;sudo rpm -ivh nilvcompare-9.0.1-1.i386.rpm --nodeps --force-debian&lt;br /&gt;sudo rpm -ivh labview-2009-pro-9.0.1-1.i386.rpm --force-debian&lt;br /&gt;sudo rpm -ivh labview-2009-ref-9.0.1-1.i386.rpm --force-debian&lt;br /&gt;sudo rpm -ivh niwebpipeline20_dep-2.0-5.i586.rpm --nodeps --force-debian&lt;br /&gt;sudo rpm -ivh niexfinder-base-1.0-17.i386.rpm --nodeps --force-debian&lt;br /&gt;sudo rpm -ivh niexfinder-labview-2009-9.0.1-1.i386.rpm --nodeps --force-debian&lt;/pre&gt;&lt;br /&gt;For LabVIEW 2009 (Fall 2009 version), run below (just replacing version numbers in the filenames above accordingly):&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;sudo rpm -ivh labview-2009-rte-9.0.0-1.i386.rpm --nodeps --force-debian&lt;br /&gt;sudo rpm -ivh labview-2009-core-9.0.0-1.i386.rpm --nodeps --force-debian&lt;br /&gt;sudo rpm -ivh labview-2009-appbuild-9.0.0-1.i386.rpm --force-debian&lt;br /&gt;sudo rpm -ivh labview-2009-desktop-9.0.0-1.i386.rpm --nodeps --force-debian&lt;br /&gt;sudo rpm -ivh nisvcloc-9.0.0-1.i386.rpm --nodeps --force-debian&lt;br /&gt;sudo rpm -ivh labview-2009-help-9.0.0-1.i386.rpm --force-debian&lt;br /&gt;sudo rpm -ivh labview-2009-examples-9.0.0-1.i386.rpm --nodeps --force-debian&lt;br /&gt;sudo rpm -ivh nilvmerge-9.0.0-1.i386.rpm --nodeps --force-debian&lt;br /&gt;sudo rpm -ivh nilvcompare-9.0.0-1.i386.rpm --nodeps --force-debian&lt;br /&gt;sudo rpm -ivh labview-2009-pro-9.0.0-1.i386.rpm --force-debian&lt;br /&gt;sudo rpm -ivh labview-2009-ref-9.0.0-1.i386.rpm --force-debian&lt;br /&gt;sudo rpm -ivh niwebpipeline20_dep-2.0-5.i586.rpm --nodeps --force-debian&lt;br /&gt;sudo rpm -ivh niexfinder-base-1.0-15.i386.rpm --nodeps --force-debian&lt;br /&gt;sudo rpm -ivh niexfinder-labview-2009-9.0.0-1.i386.rpm --nodeps --force-debian&lt;/pre&gt;&lt;br /&gt;Then you should have LabVIEW ready. You may move on to install other NI software on the DVD.&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-896341433088017658?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=896341433088017658' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/896341433088017658'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/896341433088017658'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2010/10/labview-2009-or-sp1-installation-on.html' title='LabVIEW 2009 (or SP1) Installation on Ubuntu Linux 9.10/10.04'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-4126993817499702163</id><published>2010-07-17T06:40:00.010-05:00</published><updated>2010-07-17T16:10:38.594-05:00</updated><title type='text'>Another made-in-China: low quality research papers</title><content type='html'>by Forrest Sheng Bao&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Introduction&lt;/b&gt;: As many people are talking that China (excluding Republic of China, a.k.a Taiwan) is gonna catch the US (which I don't believe coz I spent 4 years in Chinese colleges), I want to let some data tell me the true story. Is China really doing good in terms of research publications?&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Methods&lt;/b&gt;: I use SJR (&lt;a href="http://www.scimagojr.com/"&gt;http://www.scimagojr.com&lt;/a&gt;) to rank papers published by authors from different countries, in different indexes (i.e., Citations, Self-Citations, Citations per doc, H Index and total docs), in several fields related to me (i.e., All Engineering, Computer Science, Medicine and Biology). Only countries with more than 1000 papers in each field are studied. The term ``Biology'' is short of Biochemistry, Genetics and Molecular Biology. &lt;br /&gt;&lt;br /&gt;H Index is introduced by &lt;a href="http://en.wikipedia.org/wiki/Jorge_E._Hirsch" title="Jorge E. Hirsch"&gt;Jorge E. Hirsch&lt;/a&gt; in his 2005 PNAS paper "&lt;a href="http://www.pnas.org/content/102/46/16569.full"&gt;An index to quantify an individual's scientific research output&lt;/a&gt;." If you have N papers (out of your M papers, M&amp;gt;N), each of which has more than N citations, your H Index is N. H Index is kinda like the new NIH proposal rule: you can put only 15 (or maybe 5, I heard it on a sleepy dinner.) papers in your publication list in grant proposal. &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Materials&lt;/b&gt;: The data used by SJR are from Elsevier's Scopus. Besides journal, it also includes top conferences, like IEEE INFOCOM, IEEE ICASSP, etc. &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Conclusions&lt;/b&gt;:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;China wins silver medals in total number of citable publications in all fields but medicine (9th), following United States. US publishes way tooooooooo many papers. &lt;/li&gt;&lt;li&gt;China is out of top 10, in citations-per-doc game, in all fields, after countries like Japan, UK, Germany, France, Canada.&lt;/li&gt;&lt;li&gt;In citation-per-doc competition, China's position is much worse than 11th. For example, in All Engineering, Computer Science and Biology, China ranks 56, 42 and 53, respectively.&lt;/li&gt;&lt;li&gt;In H Index race, China can get into G10. In 3 fields mentioned above, China ranks 10, 11, 21, respectively.&lt;/li&gt;&lt;li&gt;However, there are only two countries have more than half self-citations in all citations, the US and China. Most top 20 countries (ranked by number of publications) do not exceed 1/4. So, the actual positions of China are even worse. &lt;/li&gt;&lt;li&gt;In most cases, China can't do better than Taiwan. &lt;/li&gt;&lt;li&gt;So China cannot threaten US in research publications.&amp;nbsp; Neither other countries like UK, Canada, Germany, France, Japan and Taiwan.&amp;nbsp;&lt;/li&gt;&lt;li&gt;I would like to suggest Chinese government put more money in education than Olympic Games or World Expo. For example, every semester, a friend of mine can get thousands of US dollars for going to college because Uncle Sam does not want him to quit school for making money to relieve his family financial situation. Right on yesterday, he got $1300 federal financial aid for taking two classes during the summer in a community college. The pursuit of happiness is an unalienable right, endowed by our Creator, for everyone, equally, while an equal opportunity to access high-quality education is the most possible chance a kid from a low-income community to pursue happiness. Spending money, a lotta money, on public education is a must do for a People's government. &lt;/li&gt;&lt;/ol&gt;&lt;b&gt;Data analysis&lt;/b&gt;: Here are some snapshots I take during the study at SJR website, orded by citable docs. You can estimate the rank of countries in H Index or citations per doc by eyes.&amp;nbsp; Results can be repeated at &lt;a href="http://www.scimagojr.com/countryrank.php"&gt;http://www.scimagojr.com/countryrank.php&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Computer Science: &lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_fp-pi6U0QKc/TEGV8HyguMI/AAAAAAAAGuI/ueKAJ81Uz_U/s1600/CS.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="411" src="http://4.bp.blogspot.com/_fp-pi6U0QKc/TEGV8HyguMI/AAAAAAAAGuI/ueKAJ81Uz_U/s640/CS.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;All engineering:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_fp-pi6U0QKc/TEGWCeBz3kI/AAAAAAAAGuQ/PpRN--RHgeg/s1600/Engineering.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="410" src="http://4.bp.blogspot.com/_fp-pi6U0QKc/TEGWCeBz3kI/AAAAAAAAGuQ/PpRN--RHgeg/s640/Engineering.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Medicine:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_fp-pi6U0QKc/TEGXBp2H6KI/AAAAAAAAGuo/yTnYlcA5jho/s1600/medicine.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="412" src="http://1.bp.blogspot.com/_fp-pi6U0QKc/TEGXBp2H6KI/AAAAAAAAGuo/yTnYlcA5jho/s640/medicine.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Biology:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_fp-pi6U0QKc/TEGWktFJl3I/AAAAAAAAGug/l5C1EjjpfP4/s1600/biology.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="408" src="http://3.bp.blogspot.com/_fp-pi6U0QKc/TEGWktFJl3I/AAAAAAAAGug/l5C1EjjpfP4/s640/biology.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-4126993817499702163?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=4126993817499702163' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/4126993817499702163'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/4126993817499702163'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2010/07/another-made-in-china-low-quality.html' title='Another made-in-China: low quality research papers'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_fp-pi6U0QKc/TEGV8HyguMI/AAAAAAAAGuI/ueKAJ81Uz_U/s72-c/CS.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-3536319628156542803</id><published>2010-06-29T00:35:00.000-05:00</published><updated>2010-06-29T00:35:09.627-05:00</updated><title type='text'>Do computers know EEG reading?</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_fp-pi6U0QKc/TCmDQFCfc1I/AAAAAAAAGqM/xT77lGT_deA/s1600/EEGRuler.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="640" src="http://3.bp.blogspot.com/_fp-pi6U0QKc/TCmDQFCfc1I/AAAAAAAAGqM/xT77lGT_deA/s640/EEGRuler.png" width="296" /&gt;&lt;/a&gt;&lt;/div&gt;This is how neurologists check frequencies and amplitudes of EEG signals in the old days - I found this card from the back cover of a Japanese book (2006) about EEG reading.&lt;br /&gt;&lt;br /&gt;The method is matching boxes, e.g., 1-30, to EEG waves. If the number of peaks matches box n, then the frequency of the wave is n Hz. Of course, a wave can have many frequency components and thus matches several boxes on different amplitudes, like lower frequencies modulated onto higher frequencies - just imaging how sin(x)*sin(4x) look like in your high school math class.&lt;br /&gt;&lt;br /&gt;Now, with computerized EEG recordings, neurologists still are using this way to diagnose. The only difference is that the boxes on the card are replaced by different background rulers on computer screens. So are amplitude rulers. &lt;br /&gt;&lt;br /&gt;The question is, whether representing the knowledge and methods from physicians the only way we can teach computers to read EEG? If this is the only possible track, then how we can teach computers to identify different wave patterns, in time domain?&amp;nbsp; If the answer is yes, then a lotta work done in these years about spike detection is a killer approach.&lt;br /&gt;&lt;br /&gt;But, "do submarines swim?" "They just don't swim in the way you swim." Dr. Dijkstra, who served as Computer Science Department chair at UT Austin between 1984- 2000.&lt;br /&gt;&lt;br /&gt;So, another approach is to teach computers a whole new way to mathematically analyze EEG waveforms, not following the way that physicians use which identifies particular EEG patterns, like spike-slow waves. For example, we may teach computers that the skews in this EEG is different from skews in another EEG.&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-3536319628156542803?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=3536319628156542803' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/3536319628156542803'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/3536319628156542803'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2010/06/do-computers-know-eeg-reading.html' title='Do computers know EEG reading?'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_fp-pi6U0QKc/TCmDQFCfc1I/AAAAAAAAGqM/xT77lGT_deA/s72-c/EEGRuler.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-8535470840651312892</id><published>2010-05-24T21:05:00.001-05:00</published><updated>2010-05-24T21:07:08.756-05:00</updated><title type='text'>Compiling MLPY 2.1 on CentOS or RedHat Linux 5.4</title><content type='html'>by Forrest Sheng Bao http://fsbao.net&lt;br /&gt;&lt;br /&gt;You do NOT have to compile MLPY from source code because it has compiled binary installation pack for Ubuntu/Debian. That is way convenient than compilation. &lt;br /&gt;&lt;br /&gt;Step 1: Download MLPy from official download site.&lt;br /&gt;&lt;br /&gt;Step 2: Make sure you have &lt;a href="https://mlpy.fbk.eu/wiki/MlpyInstall"&gt;all required packages&lt;/a&gt;, especially Python &amp;gt;= 2.5 (&lt;span style="color: red;"&gt;the default Python version on CentOS/RHEL 5.4 is 2.4&lt;/span&gt; ). O/w, you will have &lt;a href="http://groups.google.com/group/mlpy-general/browse_thread/thread/8ea20abcf031c070"&gt;trouble like me&lt;/a&gt;. &lt;br /&gt;&lt;br /&gt;Step 3: Set environment variables. Take a look at &lt;a 1e13b9ec82e9e0c6="" browse_thread="" group="" groups.google.com="" href+http:="" href="" mlpy-general="" thread=""&gt;this&lt;/a&gt;. But be sure to delete those two variables after it. O/w, you will have weird problem with other compilation. &lt;br /&gt;&lt;br /&gt;Step 4: Run setup.py as you compile and install other Python modules. On my system, it is: &lt;br /&gt;&lt;pre&gt;python2.6 setup.py install --prefix=/home/bao/apps/Python-2.6&lt;/pre&gt;&lt;br /&gt;Please note that I used Python 2.6 interpreter.&lt;br /&gt;&lt;br /&gt;Step 5: Test, optional &lt;br /&gt;I tried &lt;a href="https://mlpy.fbk.eu/data/doc/irelief.html"&gt;this example&lt;/a&gt;. It worked!&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-8535470840651312892?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=8535470840651312892' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/8535470840651312892'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/8535470840651312892'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2010/05/compiling-mlpy-21-on-centos-linux-54.html' title='Compiling MLPY 2.1 on CentOS or RedHat Linux 5.4'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-4043943493474253839</id><published>2010-05-24T17:00:00.004-05:00</published><updated>2010-05-24T17:09:21.723-05:00</updated><title type='text'>Python and module paths after compilation and installation from source code</title><content type='html'>by Forrest Sheng Bao http://fsbao.net&lt;br /&gt;&lt;br /&gt;Like many supercomputers in the world, Grendel, the world's 175 fastest computer, forces me to install everything from compiling source code and does not allow me to mess up the beautiful /usr/local directory. I can only play around in my home directory and cannot enjoy apt-get to deploy all Python modules I need. &lt;br /&gt;&lt;br /&gt;So, i gotta install Python 2.6, and numpy, scipy, mlpy and pyml all from source code - the default version of Python on CentOS/RedHat Enterprise Linux 5.4 is 2.4. During this progress, I have figured out how Python and its modules are placed, or more precisely the directory structure. The feeling is like when I first figured out how things under /usr/local is for.&lt;br /&gt;&lt;br /&gt;1. Python (at least for Python 2.4 and Python 2.6)&lt;br /&gt;The source code package contains a configure script as the convention. When you run the configure script, you do things like this&lt;br /&gt;&lt;pre&gt;./configure --prefix=/home/bao/Python-2.6&lt;/pre&gt;And then your run &lt;br /&gt;&lt;pre&gt;make&lt;/pre&gt;and &lt;br /&gt;&lt;pre&gt;make install &lt;/pre&gt;&lt;br /&gt;After &lt;code&gt;make install&lt;/code&gt;, where is my Python 2.6? Denote the directory specified by &lt;code&gt;--prefix&lt;/code&gt; as &lt;code&gt;$PYTHON&lt;/code&gt;. The default value of &lt;code&gt;$PYTHON&lt;/code&gt; is &lt;code&gt;/usr/local/&lt;/code&gt;.  After &lt;code&gt;make install&lt;/code&gt;, $PYTHON contains four subdirectories, &lt;code&gt;bin&lt;/code&gt;, &lt;code&gt;include&lt;/code&gt;, &lt;code&gt;lib&lt;/code&gt; and &lt;code&gt;share&lt;/code&gt;, like the structure under &lt;code&gt;/usr/local/&lt;/code&gt;. Python 2.6 interpreter itself is under &lt;code&gt;$PYTHON/bin/&lt;/code&gt;, called &lt;code&gt;python2.6&lt;/code&gt; and/or &lt;code&gt;python&lt;/code&gt;. &lt;code&gt;include&lt;/code&gt;, &lt;code&gt;lib&lt;/code&gt; and &lt;code&gt;share&lt;/code&gt; sever the conventional purpose on UNIX systems, which are source files/heads, compiled shared/static libraries and documentations respectively.&amp;nbsp;&lt;code&gt;&lt;/code&gt; &lt;code&gt;lib&lt;/code&gt; could also include Python modules installed - I will detail this point in section 2.&lt;br /&gt;&lt;br /&gt;You need to do is to add &lt;code&gt;$PYTHON/bin&lt;/code&gt; into &lt;code&gt;$PATH&lt;/code&gt; environmental variable in order to start &lt;code&gt;python2.6&lt;/code&gt; or &lt;code&gt;python&lt;/code&gt; directly from your shell. I would delete the &lt;code&gt;$PYTHON/bin/python&lt;/code&gt; and enter &lt;code&gt;python2.6&lt;/code&gt; to make sure I am calling the Python 2.6 interpreter because some programs of mine run on Python 2.4. You can use the &lt;code&gt;which&lt;/code&gt; command to determine which exactly the Python interpreter is used, like this: &lt;br /&gt;&lt;pre&gt;$ which python&lt;br /&gt;/usr/bin/python&lt;br /&gt;$ which python2.6&lt;br /&gt;~/apps/Python-2.6/bin/python2.6&lt;/pre&gt;&lt;br /&gt;2. Locations of Python modules if installed to &lt;code&gt;$PYTHON&lt;/code&gt;&lt;br /&gt;Most Python module source code packages contain a &lt;code&gt;setup.py&lt;/code&gt; scripts by &lt;a href="http://docs.python.org/install/"&gt;convention&lt;/a&gt;.You install (including compiling) it by executing &lt;br /&gt;&lt;pre&gt;python2.6 python install --prefix=/home/bao/Python2.6/&lt;/pre&gt;. Notice here I used &lt;code&gt;python2.6&lt;/code&gt; rather than default &lt;code&gt;python&lt;/code&gt; (which is Python 2.4 interpreter on my system).&lt;br /&gt;&lt;br /&gt;If you do not specify in &lt;code&gt;--prefix&lt;/code&gt;, the &lt;code&gt;setup.py&lt;/code&gt; will install everything into &lt;code&gt;/usr/local/&lt;/code&gt; by default. &lt;br /&gt;&lt;br /&gt;So where is the module installed? Well, it goes to my &lt;code&gt;$PYTHON&lt;/code&gt; as specified by &lt;code&gt;--prefix&lt;/code&gt;. More precisely, it goes to the &lt;code&gt;$PYTHON/lib&lt;/code&gt;. Under &lt;code&gt;$PYTHON/lib&lt;/code&gt; there should be one or more directory(ies) like &lt;code&gt;pythonX.Y&lt;/code&gt;, depending on the Python version (X.Y) you use. On mine, it is &lt;code&gt;$PYTHON/lib/python2.6&lt;/code&gt;. Under the &lt;code&gt;pythonX.Y&lt;/code&gt; directory, there is a folder called &lt;code&gt;site-packages&lt;/code&gt;, where contains installed modules. On my system: &lt;br /&gt;&lt;pre&gt;$ ls /home/bao/apps/Python-2.6/lib/python2.6/site-packages/&lt;br /&gt;numpy  numpy-1.3.0-py2.6.egg-info  README&lt;/pre&gt;&lt;br /&gt;By default, your Python interpreter will look for modules under this &lt;code&gt;site-packages&lt;/code&gt; directory. &lt;br /&gt;&lt;br /&gt;3. What if I set directory other than &lt;code&gt;$PYTHON&lt;/code&gt; after &lt;code&gt;--prefix&lt;/code&gt;?&lt;br /&gt;&lt;br /&gt;The &lt;code&gt;setup.py&lt;/code&gt; will create the same hierarchy structure &lt;code&gt;lib/pythonX.Y/site-packages&lt;/code&gt; under the directory you specified. &lt;br /&gt;&lt;br /&gt;4. The &lt;code&gt;$PYTHONPATH&lt;/code&gt; environmental variable and sys.path (You need to read this if you did section 3).&lt;br /&gt;&lt;br /&gt;Let's do a small experiment first. Start your Python interpreter, import sys module and run sys.path: &lt;br /&gt;&lt;pre&gt;$ python2.6&lt;br /&gt;Python 2.6 (r26:66714, May 24 2010, 10:45:11) &lt;br /&gt;[GCC 4.1.2 20080704 (Red Hat 4.1.2-44)] on linux2&lt;br /&gt;Type "help", "copyright", "credits" or "license" for more information.&lt;br /&gt;&amp;gt;&amp;gt;&amp;gt; import sys&lt;br /&gt;&amp;gt;&amp;gt;&amp;gt; sys.path&lt;br /&gt;['', '/home/bao/apps/Python-2.6', '/home/bao/apps/Python-2.6/lib/python26.zip', '/home/bao/apps/Python-2.6/lib/python2.6', '/home/bao/apps/Python-2.6/lib/python2.6/plat-linux2', '/home/bao/apps/Python-2.6/lib/python2.6/lib-tk', '/home/bao/apps/Python-2.6/lib/python2.6/lib-old', '/home/bao/apps/Python-2.6/lib/python2.6/lib-dynload', '/home/bao/apps/Python-2.6/lib/python2.6/site-packages']&lt;/pre&gt;&lt;br /&gt;The output of sys.path is a list of default paths where Python interpreter will search modules. For &lt;code&gt;import XYZ&lt;/code&gt;, it will search a folder called XYZ under all those directories. &lt;br /&gt;&lt;br /&gt;If your modules are located under any of the directories, (e.g., the paths specified in &lt;code&gt;--prefix&lt;/code&gt; are the same when you install Python interpreter and modules) , you don't have to do anything. As you can see, default search path will make sure installed modules be found. &lt;br /&gt;&lt;br /&gt;O/w, you need to specify the &lt;code&gt;$PYTHONPATH&lt;/code&gt; environmental variable on your UNIX system to tell Python interpreter to search XYZ under it. Suppose you install XYZ at &lt;code&gt;/MyMoD/XYZ&lt;/code&gt; folder. Then your &lt;code&gt;$PYTHONPATH&lt;/code&gt; should contain the string &lt;code&gt;/MyMoD&lt;/code&gt;. Another case is when you Python module is just one Python file, like XYZ.py, located at &lt;code&gt;/MyMoD/XYZ.py&lt;/code&gt;, then your &lt;code&gt;$PYTHONPATH&lt;/code&gt; should also contain the string &lt;code&gt;/MyMoD&lt;/code&gt;.&lt;br /&gt;&lt;br /&gt;For more details about &lt;code&gt;$PYTHONPATH&lt;/code&gt;, please look into &lt;a href="http://docs.python.org/using/cmdline.html#envvar-PYTHONPATH"&gt;http://docs.python.org/using/cmdline.html#envvar-PYTHONPATH&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-4043943493474253839?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=4043943493474253839' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/4043943493474253839'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/4043943493474253839'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2010/05/python-and-modules-path-or-directory.html' title='Python and module paths after compilation and installation from source code'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-5468334762735410115</id><published>2010-04-25T17:33:00.005-05:00</published><updated>2010-04-25T18:00:13.829-05:00</updated><title type='text'>Skype Talk Screen, screen sharing on Linux</title><content type='html'>Recently, I am looking and testing free (I am a poor college student) and portable (can go with me on my trip) teleconferencing solutions to discuss research topics with talents around the world. Finally, I figured out that Xournal + Skype Talk Screen on Ubuntu Linux could be a good choice.&lt;br /&gt;&lt;b&gt;&lt;br /&gt;Ubuntu Linux&lt;/b&gt;&lt;br /&gt;Well, everyone loves Linux, and Ubuntu. Everything just works out of box on my Dell Mini 10, except the embedded microphone. Doesn't matter. I can plug an external mic to the jack.&lt;br /&gt;&lt;b&gt;&lt;br /&gt;Xournal and Wacom pen tablet&lt;/b&gt;&lt;br /&gt;When discussing, I need to show my scratch to my friends as we are talking in front of a chalkboard. I tried tablet PC. Ah, too many drawbacks on other aspects. So I use a pen tablet. I did some test, and after few practices, I can write and draw well.&lt;br /&gt;&lt;br /&gt;There is an open source software called &lt;a href="http://xournal.sourceforge.net/"&gt;Xournal&lt;/a&gt; on Linux. Xournal can digitize the trace of your mouse or tablet pen - just like taking notes on traditional paper. You can install it via apt-get or Synaptic. It works better than Windows Journal or One Note.&lt;br /&gt;&lt;br /&gt;I used a bluetooth Wacom tablet. You need to do small bug-fixing to make it work. Here is the information &lt;a href="https://help.ubuntu.com/community/WacomGraphireBluetooth"&gt;https://help.ubuntu.com/community/WacomGraphireBluetooth&lt;/a&gt;&amp;nbsp; &lt;br /&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;Skype, and Talk Screen&lt;/b&gt;&lt;br /&gt;Google Talk, based on XMPP protocol, works fine on Ubuntu Linux, via Empathy or Pidgin, to support video and audio chatting. But, I can't share the screen and therefore cannot show my scratches on the tablet to my friends.&lt;br /&gt;&lt;br /&gt;Luckily, &lt;a href="http://blogs.skype.com/garage/2010/01/skype_21_beta_2_aka_talking_sc.html"&gt;Skype released a beta version with screen sharing function, aka Talk screen, in early 2010&lt;/a&gt;. So I download it (make sure you download at least Skype 2.1.0.81) and install it. Bingo!&lt;br /&gt;&lt;br /&gt;Here are some pictures showing how to so. First call your friend. After he/she picks up, find the blue button with a camera logo  in the chat window.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_fp-pi6U0QKc/S9TBqERGXfI/AAAAAAAAF-8/tH5n3jGXnWA/s1600/1.start.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_fp-pi6U0QKc/S9TBqERGXfI/AAAAAAAAF-8/tH5n3jGXnWA/s320/1.start.png" /&gt;&lt;/a&gt;&lt;/div&gt;Click it and select "Share Your Screen." You can either share the entire screen or part of it. I prefer part of it as it will use less bandwidth.&lt;br /&gt;&lt;br /&gt;Then a frame will pop up to let you select the part of the screen you wanna share. U can move it around. I will place it to the center of my Xournal window. Once you are done, click "Start screen sharing" button at the bottom of the frame. &lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_fp-pi6U0QKc/S9TCBx5zy8I/AAAAAAAAF_E/0NqPzyGMjr4/s1600/2.select.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="513" src="http://1.bp.blogspot.com/_fp-pi6U0QKc/S9TCBx5zy8I/AAAAAAAAF_E/0NqPzyGMjr4/s640/2.select.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;Finally, I will use the pen of my tablet to write down something.My friend can see me writing as the video being streamed via Talk Screen. &lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_fp-pi6U0QKc/S9TCvWS3epI/AAAAAAAAF_M/Jmjj4CWM62I/s1600/Screenshot-2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="217" src="http://3.bp.blogspot.com/_fp-pi6U0QKc/S9TCvWS3epI/AAAAAAAAF_M/Jmjj4CWM62I/s320/Screenshot-2.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-5468334762735410115?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=5468334762735410115' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/5468334762735410115'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/5468334762735410115'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2010/04/skype-talk-screen-screen-sharing-on.html' title='Skype Talk Screen, screen sharing on Linux'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_fp-pi6U0QKc/S9TBqERGXfI/AAAAAAAAF-8/tH5n3jGXnWA/s72-c/1.start.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4108962141379684163.post-478206287556188072</id><published>2010-04-11T21:44:00.000-05:00</published><updated>2010-04-11T21:44:12.679-05:00</updated><title type='text'>The best travel deal: Google Maps</title><content type='html'>I really don't understand why some people in the world wanna censor the Internet and block Google from their people. Googlers have built so many things more wonderful than Steve Jobs' "fruit" company has done. &lt;br /&gt;&lt;br /&gt;Alright, go back Google Maps. I will have some travels to &lt;a href="http://en.wikipedia.org/wiki/New_England"&gt;New England&lt;/a&gt; areas this summer. Well, actually not New England but &lt;a href="http://en.wikipedia.org/wiki/New_Sweden"&gt;New Sweden&lt;/a&gt; and &lt;a href="http://en.wikipedia.org/wiki/New_Netherland"&gt;New Netherlands&lt;/a&gt;. America is a genuine immigration country, unlike Canada, of only English and French - according to history classes I took in China and Texas. Haha.&lt;br /&gt;&lt;br /&gt;So I wanna take a look first, beginning with Philadelphia. The conference local arrangement people sent me a &lt;a href="http://bioinformatics-bioengineering.org/images/blsb.jpg"&gt;picture of the building&lt;/a&gt; where I am gonna give a presentation. With this picture, I have the reference to check whether I will find the right place. I found the street intersection of this building on their campus map. After setting street view of of the intersection, I saw this:&lt;br /&gt;&lt;br /&gt;&lt;iframe frameborder="0" height="394" marginheight="0" marginwidth="0" scrolling="no" src="http://maps.google.com/maps?f=q&amp;amp;source=embed&amp;amp;hl=en&amp;amp;geocode=&amp;amp;q=thomas+jefferson+university++Bluemle+Life+Sciences+Building+&amp;amp;sll=39.950699,-75.168774&amp;amp;sspn=0.000948,0.002064&amp;amp;gl=us&amp;amp;ie=UTF8&amp;amp;hq=thomas+jefferson+university++Bluemle+Life+Sciences+Building&amp;amp;hnear=&amp;amp;t=h&amp;amp;layer=c&amp;amp;cbll=39.947345,-75.157644&amp;amp;panoid=sRqhtGuF5_46sOmFUvgOYA&amp;amp;cbp=13,55.25,,1,-6.12&amp;amp;ll=39.950181,-75.162277&amp;amp;spn=0,0.01502&amp;amp;z=16&amp;amp;output=svembed" width="700"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;small&gt;&lt;a href="http://maps.google.com/maps?f=q&amp;amp;source=embed&amp;amp;hl=en&amp;amp;geocode=&amp;amp;q=thomas+jefferson+university++Bluemle+Life+Sciences+Building+&amp;amp;sll=39.950699,-75.168774&amp;amp;sspn=0.000948,0.002064&amp;amp;gl=us&amp;amp;ie=UTF8&amp;amp;hq=thomas+jefferson+university++Bluemle+Life+Sciences+Building&amp;amp;hnear=&amp;amp;t=h&amp;amp;layer=c&amp;amp;cbll=39.947345,-75.157644&amp;amp;panoid=sRqhtGuF5_46sOmFUvgOYA&amp;amp;cbp=13,55.25,,1,-6.12&amp;amp;ll=39.950181,-75.162277&amp;amp;spn=0,0.01502&amp;amp;z=16" style="color: blue; text-align: left;"&gt;View Larger Map&lt;/a&gt;&lt;/small&gt;&lt;br /&gt;&lt;br /&gt;Yes, that's the right building I am looking for. But Google only has day view. How about some night view? Google Maps allows users to upload their personal pictures. &lt;a href="http://www.panoramio.com/photo/23336509"&gt;This night view one&lt;/a&gt; is uploaded by Google user.&lt;br /&gt;&lt;br /&gt;Google Maps is a great tool to travel. You can see more than a picture but a whole continuous street view. You can move around, and look around in your mouse. For example, while I was "wondering" on the street, I saw this: &lt;br /&gt;&lt;br /&gt;&lt;iframe frameborder="0" height="350" marginheight="0" marginwidth="0" scrolling="no" src="http://maps.google.com/maps?f=q&amp;amp;source=embed&amp;amp;hl=en&amp;amp;geocode=&amp;amp;q=thomas+jefferson+university++Bluemle+Life+Sciences+Building+&amp;amp;sll=39.950699,-75.168774&amp;amp;sspn=0.000948,0.002064&amp;amp;gl=us&amp;amp;ie=UTF8&amp;amp;hq=thomas+jefferson+university++Bluemle+Life+Sciences+Building&amp;amp;hnear=&amp;amp;ll=39.950187,-75.16375&amp;amp;spn=0.006295,0.012059&amp;amp;t=h&amp;amp;layer=c&amp;amp;cbll=39.947345,-75.157644&amp;amp;panoid=sRqhtGuF5_46sOmFUvgOYA&amp;amp;cbp=12,279.29,,1,-16.49&amp;amp;output=svembed" width="425"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;small&gt;&lt;a href="http://maps.google.com/maps?f=q&amp;amp;source=embed&amp;amp;hl=en&amp;amp;geocode=&amp;amp;q=thomas+jefferson+university++Bluemle+Life+Sciences+Building+&amp;amp;sll=39.950699,-75.168774&amp;amp;sspn=0.000948,0.002064&amp;amp;gl=us&amp;amp;ie=UTF8&amp;amp;hq=thomas+jefferson+university++Bluemle+Life+Sciences+Building&amp;amp;hnear=&amp;amp;ll=39.950187,-75.16375&amp;amp;spn=0.006295,0.012059&amp;amp;t=h&amp;amp;layer=c&amp;amp;cbll=39.947345,-75.157644&amp;amp;panoid=sRqhtGuF5_46sOmFUvgOYA&amp;amp;cbp=12,279.29,,1,-16.49" style="color: blue; text-align: left;"&gt;View Larger Map&lt;/a&gt;&lt;/small&gt;&lt;br /&gt;&lt;br /&gt;Oh, so Jefferson Medical College did the first liver transplant in 1984. &lt;br /&gt;&lt;br /&gt;I know many people spending much time on search for good travel deals. Probably Google Maps is the best travel deal. Engineering is about dreams. I bet there are many people, old people, they had dreams when they were young, like visiting 100 must-go cities. Their physicial condition may not allow it now. But Google Maps can bring those cities right in front of them.&lt;br /&gt;&lt;br /&gt;So, why would someone wanna block Google? There are more than 1 billion people there and 70% are elderly. If you block Google, you've killed their half-century-old dreams which can be realized thru model technology.&lt;div class="blogger-post-footer"&gt;Forrest Sheng Bao&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4108962141379684163-478206287556188072?l=forrestbao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4108962141379684163&amp;postID=478206287556188072' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/478206287556188072'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4108962141379684163/posts/default/478206287556188072'/><link rel='alternate' type='text/html' href='http://forrestbao.blogspot.com/2010/04/best-travel-deal-google-maps.html' title='The best travel deal: Google Maps'/><author><name>Forrest Bao</name><uri>https://profiles.google.com/114031919526225641864</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-7VlOhgz_uR0/AAAAAAAAAAI/AAAAAAAAHSA/MvjC5uCXw0o/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry></feed>
