<?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-3048087803154172720</id><updated>2011-11-27T18:33:39.261-05:00</updated><category term='Unix'/><category term='Mac OS X'/><category term='MacBook'/><category term='Firefox'/><category term='iTunes'/><category term='LaTeX'/><category term='Mathematica'/><category term='Sync'/><title type='text'>d-Shell</title><subtitle type='html'>Di Xiao's weblog</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://dixiao.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3048087803154172720/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://dixiao.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Di</name><uri>http://www.blogger.com/profile/14601914875317010197</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp1.blogger.com/_4nTsXN8nCI4/R8sAixNZTYI/AAAAAAAAAVQ/IiL67_rawWw/S220/bean.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>16</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3048087803154172720.post-1100785485700644115</id><published>2009-12-03T15:16:00.004-05:00</published><updated>2009-12-03T15:21:53.759-05:00</updated><title type='text'>arXiv RSS author name problem in Google Reader</title><content type='html'>I like google reader a lot.  But one thing about it makes me very frustrating - it does not display the author name in arXiv RSS feed correctly.  Basically, arXiv provides feeds with linked author name, and google reader decides to use the HTML source code instead of parsing it into nicely formatted text.&lt;br /&gt;&lt;br /&gt;Well, I just learned that by adding ?version=2.0 to the end of arXiv feed URL solves this problem, i.e.,&lt;br /&gt;&lt;pre&gt;http://export.arxiv.org/rss/cond-mat?version=2.0&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3048087803154172720-1100785485700644115?l=dixiao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dixiao.blogspot.com/feeds/1100785485700644115/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3048087803154172720&amp;postID=1100785485700644115' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3048087803154172720/posts/default/1100785485700644115'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3048087803154172720/posts/default/1100785485700644115'/><link rel='alternate' type='text/html' href='http://dixiao.blogspot.com/2009/12/arxiv-rss-author-name-problem-in-google.html' title='arXiv RSS author name problem in Google Reader'/><author><name>Di</name><uri>http://www.blogger.com/profile/14601914875317010197</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp1.blogger.com/_4nTsXN8nCI4/R8sAixNZTYI/AAAAAAAAAVQ/IiL67_rawWw/S220/bean.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3048087803154172720.post-3455107904252016125</id><published>2009-06-18T18:26:00.007-04:00</published><updated>2009-06-18T18:42:39.681-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Mathematica'/><title type='text'>Outer: Construct matrix from lists</title><content type='html'>In Mathematica, a quick way to construct a matrix from lists is through &lt;code&gt;Outer&lt;/code&gt;.  Let us consider two lists defined as&lt;pre&gt;&lt;code&gt;a={a1,a2,a3};&lt;/code&gt;&lt;br /&gt;&lt;code&gt;b={b1,b2};&lt;/code&gt;&lt;/pre&gt;Then the following command&lt;pre&gt;&lt;code&gt;Outer[f, a, b]&lt;/code&gt;&lt;/pre&gt;gives a matrix of the form&lt;pre&gt;&lt;code&gt;f[a1,b1] f[a1,b2]&lt;br /&gt;f[a2,b1] f[a2,b2]&lt;br /&gt;f[a3,b1] f[a3,b2]&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;A practical example is given below.  Consider d-band electrons with spins.  There are five d-orbitals and two spin states.  Suppose &lt;code&gt;orbital&lt;/code&gt; and &lt;code&gt;spin&lt;/code&gt; stores the orbital and spin part of the state vector.  The complete basis can be obtained by&lt;br /&gt;&lt;pre&gt;&lt;code&gt;Flatten[Outer[Join, orbital, spin, 1], 1]&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3048087803154172720-3455107904252016125?l=dixiao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dixiao.blogspot.com/feeds/3455107904252016125/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3048087803154172720&amp;postID=3455107904252016125' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3048087803154172720/posts/default/3455107904252016125'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3048087803154172720/posts/default/3455107904252016125'/><link rel='alternate' type='text/html' href='http://dixiao.blogspot.com/2009/06/outer-construct-matrix-from-lists.html' title='Outer: Construct matrix from lists'/><author><name>Di</name><uri>http://www.blogger.com/profile/14601914875317010197</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp1.blogger.com/_4nTsXN8nCI4/R8sAixNZTYI/AAAAAAAAAVQ/IiL67_rawWw/S220/bean.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3048087803154172720.post-9009997740650898633</id><published>2008-06-01T03:47:00.007-04:00</published><updated>2008-12-11T07:43:17.295-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sync'/><category scheme='http://www.blogger.com/atom/ns#' term='Mac OS X'/><title type='text'>Unison: An Elegant File Sync App</title><content type='html'>Ever since I got an 24" iMac at work, how to sync between this iMac and my MacBook has being a problem for me.  First of all, the place I work has a very tight security policy and everything has to go through either VPN or an SSH gateway.  I eventually figure out how to do SSH tunnel, but that's the topic for another day.&lt;br /&gt;&lt;br /&gt;Once I set up the SSH connection between the iMac and the MacBook, it is easy to use &lt;code&gt;rsync&lt;/code&gt; to sync files.  However, I am not really into this whole command-line thing, otherwise I'd just get a linux box.  Fortunately, I found this nice little app called &lt;a href="http://www.cis.upenn.edu/~bcpierce/unison/"&gt;Unison&lt;/a&gt;, which provides a GUI for Mac OS X.  The setup is straightforward.  There is only one catch: both machines should have Unison installed.  I actually found this out by scanning through the console log.  One small complain: there is practically no documentation, everything has to be found through google.&lt;br /&gt;&lt;br /&gt;Below is quoted from Unison website&lt;br /&gt;&lt;blockquote&gt;Unison runs on both Windows and many flavors of Unix (Solaris, Linux, OS X, etc.) systems. Moreover, Unison works across platforms, allowing you to synchronize a Windows laptop with a Unix server, for example.&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Since I cannot find a screenshot of Unison running on OS X on its website, I figured it'll be helpful to upload one here:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_4nTsXN8nCI4/SEJWdMzUwBI/AAAAAAAAAgU/tdygYb-FY_8/s1600-h/unison.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://1.bp.blogspot.com/_4nTsXN8nCI4/SEJWdMzUwBI/AAAAAAAAAgU/tdygYb-FY_8/s400/unison.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5206819178846404626" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3048087803154172720-9009997740650898633?l=dixiao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dixiao.blogspot.com/feeds/9009997740650898633/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3048087803154172720&amp;postID=9009997740650898633' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3048087803154172720/posts/default/9009997740650898633'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3048087803154172720/posts/default/9009997740650898633'/><link rel='alternate' type='text/html' href='http://dixiao.blogspot.com/2008/06/unison-elegant-file-sync-app.html' title='Unison: An Elegant File Sync App'/><author><name>Di</name><uri>http://www.blogger.com/profile/14601914875317010197</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp1.blogger.com/_4nTsXN8nCI4/R8sAixNZTYI/AAAAAAAAAVQ/IiL67_rawWw/S220/bean.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_4nTsXN8nCI4/SEJWdMzUwBI/AAAAAAAAAgU/tdygYb-FY_8/s72-c/unison.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3048087803154172720.post-8224338390191491022</id><published>2008-05-27T20:22:00.008-04:00</published><updated>2008-12-11T07:43:17.631-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Firefox'/><title type='text'>Sold on Firefox - Zoom In Just Gets Better</title><content type='html'>Two pictures worth a thousand words.&lt;br /&gt;&lt;br /&gt;Web pages in Firefox after zoom in&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_4nTsXN8nCI4/SDynKD2Al_I/AAAAAAAAAfk/7YkJBv-lTNU/s1600-h/firefox_zoom.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://3.bp.blogspot.com/_4nTsXN8nCI4/SDynKD2Al_I/AAAAAAAAAfk/7YkJBv-lTNU/s400/firefox_zoom.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5205219060605818866" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Web pages in Safari after zoom in&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_4nTsXN8nCI4/SDynQz2AmAI/AAAAAAAAAfs/a1PGaTz49Bc/s1600-h/safari_zoom.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://2.bp.blogspot.com/_4nTsXN8nCI4/SDynQz2AmAI/AAAAAAAAAfs/a1PGaTz49Bc/s400/safari_zoom.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5205219176569935874" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;That's right. Firefox not only increases the font size, it increases the size of everything proportionally.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3048087803154172720-8224338390191491022?l=dixiao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dixiao.blogspot.com/feeds/8224338390191491022/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3048087803154172720&amp;postID=8224338390191491022' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3048087803154172720/posts/default/8224338390191491022'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3048087803154172720/posts/default/8224338390191491022'/><link rel='alternate' type='text/html' href='http://dixiao.blogspot.com/2008/05/sold-on-firefox-zoom-in-just-gets.html' title='Sold on Firefox - Zoom In Just Gets Better'/><author><name>Di</name><uri>http://www.blogger.com/profile/14601914875317010197</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp1.blogger.com/_4nTsXN8nCI4/R8sAixNZTYI/AAAAAAAAAVQ/IiL67_rawWw/S220/bean.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_4nTsXN8nCI4/SDynKD2Al_I/AAAAAAAAAfk/7YkJBv-lTNU/s72-c/firefox_zoom.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3048087803154172720.post-3186305178618280768</id><published>2008-05-13T16:27:00.004-04:00</published><updated>2008-05-13T16:36:00.851-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Mac OS X'/><title type='text'>Plain text in Mail.app by default</title><content type='html'>I generally prefer plain text when writing emails.  However, in the place where I work, a lot of people use Microsoft Outlook or its web version.  By default, it sends out emails in HTML.  Even worse is the fact that the font size in those emails is too small.  To reformat all incoming email and display them as plain text, quit Mail.app, type&lt;br /&gt;&lt;pre&gt;&lt;code&gt;# defaults write com.apple.mail PreferPlainText -bool TRUE&lt;/code&gt;&lt;/pre&gt;Relaunch Mail.app and enjoy.&lt;br /&gt;&lt;br /&gt;To revert back, use&lt;br /&gt;&lt;pre&gt;&lt;code&gt;# defaults delete com.apple.mail PreferPlainText&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3048087803154172720-3186305178618280768?l=dixiao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dixiao.blogspot.com/feeds/3186305178618280768/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3048087803154172720&amp;postID=3186305178618280768' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3048087803154172720/posts/default/3186305178618280768'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3048087803154172720/posts/default/3186305178618280768'/><link rel='alternate' type='text/html' href='http://dixiao.blogspot.com/2008/05/plain-text-in-mailapp-by-default.html' title='Plain text in Mail.app by default'/><author><name>Di</name><uri>http://www.blogger.com/profile/14601914875317010197</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp1.blogger.com/_4nTsXN8nCI4/R8sAixNZTYI/AAAAAAAAAVQ/IiL67_rawWw/S220/bean.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3048087803154172720.post-4202059675686325637</id><published>2008-05-01T13:08:00.005-04:00</published><updated>2008-07-16T19:13:20.786-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Unix'/><title type='text'>find</title><content type='html'>One thing about sharing files between Windows and Mac via a USB is that the USB has to be formated in fat32.  Then all the files copied from Windows will have the file mode &lt;code&gt;x&lt;/code&gt; enabled.  Manually removing it for each file is very cumbersome because for directories you do want to keep the &lt;code&gt;x&lt;/code&gt; mode.  This can be done easily using &lt;code&gt;find&lt;/code&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;# find . ! -type d -exec chmod -x {} \;&lt;/code&gt;&lt;/pre&gt;Another example is  &lt;br /&gt;&lt;pre&gt;&lt;code&gt;# find . ! -type d -exec xattr -d com.apple.quarantine {} \;&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3048087803154172720-4202059675686325637?l=dixiao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dixiao.blogspot.com/feeds/4202059675686325637/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3048087803154172720&amp;postID=4202059675686325637' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3048087803154172720/posts/default/4202059675686325637'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3048087803154172720/posts/default/4202059675686325637'/><link rel='alternate' type='text/html' href='http://dixiao.blogspot.com/2008/05/find.html' title='&lt;code&gt;find&lt;/code&gt;'/><author><name>Di</name><uri>http://www.blogger.com/profile/14601914875317010197</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp1.blogger.com/_4nTsXN8nCI4/R8sAixNZTYI/AAAAAAAAAVQ/IiL67_rawWw/S220/bean.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3048087803154172720.post-3911102559505801551</id><published>2008-04-21T02:08:00.002-04:00</published><updated>2008-04-21T11:58:33.235-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='MacBook'/><title type='text'>Bluetooth unavailable?  Reset SMC!</title><content type='html'>I don't know when did this happen: bluetooth in my MacBook suddenly becomes unavailable.  System profile shows me no bluetooth device is detected.  Just last week I transfered some photos from my cell phone to my MacBook, and now this?&lt;br /&gt;&lt;br /&gt;After some googling, I found the solution: &lt;a href="http://docs.info.apple.com/article.html?artnum=303319"&gt;Reset the SMC unit&lt;/a&gt;.  OK, unplug the AC adapter, remove the battery, hold on the power button, and 5 seconds later, my bluetooth is back.&lt;br /&gt;&lt;br /&gt;My friend &lt;a href="http://jiangxiao.blogspot.com/"&gt;il&lt;/a&gt; actually had another problem with his MacBook: iSight no longer works.  Guess what he did...... Reset SMC!&lt;br /&gt;&lt;br /&gt;What else CANNOT be fixed by resetting SMC?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3048087803154172720-3911102559505801551?l=dixiao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dixiao.blogspot.com/feeds/3911102559505801551/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3048087803154172720&amp;postID=3911102559505801551' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3048087803154172720/posts/default/3911102559505801551'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3048087803154172720/posts/default/3911102559505801551'/><link rel='alternate' type='text/html' href='http://dixiao.blogspot.com/2008/04/bluetooth-unavailable-rest-smc.html' title='Bluetooth unavailable?  Reset SMC!'/><author><name>Di</name><uri>http://www.blogger.com/profile/14601914875317010197</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp1.blogger.com/_4nTsXN8nCI4/R8sAixNZTYI/AAAAAAAAAVQ/IiL67_rawWw/S220/bean.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3048087803154172720.post-5111459409893954913</id><published>2008-04-20T04:11:00.006-04:00</published><updated>2008-07-16T19:13:05.057-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Mac OS X'/><title type='text'>Play rmvb format using MPlayer</title><content type='html'>MPlayer is my favorite media player on Mac OS X.  I really don't understand the great disparity in terms of user numbers between VLC and MPlayer, as shown on &lt;a href="http://osx.iusethis.com"&gt;osx.iusethis.com&lt;/a&gt;.  In my experience, MPlayer plays more formats than VLC does and has better subtitle support.  I don't mean to diminish VLC but I think at least these two players should be similar in every aspect.&lt;br /&gt;&lt;br /&gt;In any case, both MPlayer and VLC are way better than the bloated RealOne player.  However, sometimes I need play rmvb file but it is not supported by MPlayer out of box.  In this case, first download RealOne, then copy all the bundles in&lt;br /&gt;&lt;pre&gt;&lt;code&gt;RealPlayer.app/Contents/Frameworks/HXClientKit.framework/HelixPlugins/Codecs&lt;/code&gt;&lt;/pre&gt;to&lt;pre&gt;&lt;code&gt;/usr/local/lib/codecs&lt;/code&gt;&lt;/pre&gt;  If you don't have the second folder then create it first.&lt;br /&gt;&lt;br /&gt;Oh, don't forget to delete RealOne afterwards.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3048087803154172720-5111459409893954913?l=dixiao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dixiao.blogspot.com/feeds/5111459409893954913/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3048087803154172720&amp;postID=5111459409893954913' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3048087803154172720/posts/default/5111459409893954913'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3048087803154172720/posts/default/5111459409893954913'/><link rel='alternate' type='text/html' href='http://dixiao.blogspot.com/2008/04/play-rmvb-format-using-mplayer-os-x.html' title='Play rmvb format using MPlayer'/><author><name>Di</name><uri>http://www.blogger.com/profile/14601914875317010197</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp1.blogger.com/_4nTsXN8nCI4/R8sAixNZTYI/AAAAAAAAAVQ/IiL67_rawWw/S220/bean.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3048087803154172720.post-8377410154744834616</id><published>2008-04-18T12:36:00.009-04:00</published><updated>2008-05-01T13:14:46.842-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Unix'/><title type='text'>Tips on ssh</title><content type='html'>1. Use &lt;code&gt;ssh-keygen&lt;/code&gt; to generate key pairs&lt;br /&gt;&lt;pre&gt;&lt;code&gt;# ssh-keygen -t rsa -b 2048&lt;/code&gt;&lt;/pre&gt;&lt;code&gt;ssh-keygen&lt;/code&gt; can generate both RSA and DSA keys. While you can specify any key length for RSA keys (in the example it is set to 2048 bits), the key length for DSA is always 1024 bits as required by the government.  RSA is also faster when it comes to verify the key.&lt;br /&gt;&lt;br /&gt;After &lt;code&gt;ssh-keygen&lt;/code&gt; generates the key pair, put &lt;code&gt;id_rsa.pub&lt;/code&gt; to &lt;code&gt;~/.ssh/&lt;/code&gt; on the remote machine and rename it to &lt;code&gt;authorized_keys&lt;/code&gt;.&lt;br /&gt;&lt;br /&gt;Now enjoy remote login without having to input your password.  (Of course you have to make sure the physical access to your machine is secured.)&lt;br /&gt;&lt;br /&gt;2. Use &lt;code&gt;ssh_config&lt;/code&gt; to specify ssh setting&lt;br /&gt;&lt;br /&gt;You can put the configuration into the file &lt;code&gt;~/.ssh/config&lt;/code&gt;.  Below is an example&lt;br /&gt;&lt;pre&gt;&lt;code&gt;Host short&lt;br /&gt;  HostName long.server.name&lt;br /&gt;  User name&lt;/code&gt;&lt;/pre&gt;Then you only need input &lt;pre&gt;&lt;code&gt;# ssh short&lt;/code&gt;&lt;/pre&gt; instead of &lt;pre&gt;&lt;code&gt;# ssh name@long.server.name&lt;/code&gt;&lt;/pre&gt;  For more options, &lt;code&gt;man ssh_config&lt;/code&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3048087803154172720-8377410154744834616?l=dixiao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dixiao.blogspot.com/feeds/8377410154744834616/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3048087803154172720&amp;postID=8377410154744834616' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3048087803154172720/posts/default/8377410154744834616'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3048087803154172720/posts/default/8377410154744834616'/><link rel='alternate' type='text/html' href='http://dixiao.blogspot.com/2008/04/ssh-keygen.html' title='Tips on ssh'/><author><name>Di</name><uri>http://www.blogger.com/profile/14601914875317010197</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp1.blogger.com/_4nTsXN8nCI4/R8sAixNZTYI/AAAAAAAAAVQ/IiL67_rawWw/S220/bean.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3048087803154172720.post-6851070135086448914</id><published>2008-04-12T00:51:00.002-04:00</published><updated>2008-12-11T07:43:17.895-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='iTunes'/><category scheme='http://www.blogger.com/atom/ns#' term='Mac OS X'/><title type='text'>A 'Perfect' iTunes Equalizer Setting</title><content type='html'>I recently came across this &lt;a href="http://www.macosxhints.com/article.php?story=20040902070807431"&gt;post&lt;/a&gt; on &lt;a href="http://www.macosxhints.com/"&gt;MacOSXHints.com&lt;/a&gt;.  The modified equalizer sounds amazing.  Simply copy the applescript below and run it in script editor&lt;br /&gt;&lt;pre&gt;&lt;code&gt;tell application "iTunes"&lt;br /&gt; tell EQ preset 1 -- the Manual setting which you can then save&lt;br /&gt;  set band 1 to -8&lt;br /&gt;  set band 2 to -5&lt;br /&gt;  set band 3 to -3&lt;br /&gt;  set band 4 to -4&lt;br /&gt;  set band 5 to -5&lt;br /&gt;  set band 6 to -6&lt;br /&gt;  set band 7 to -4&lt;br /&gt;  set band 8 to -2&lt;br /&gt;  set band 9 to 0&lt;br /&gt;  set band 10 to -3&lt;br /&gt;  set preamp to 6&lt;br /&gt; end tell&lt;br /&gt;end tell&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;This is how it looks.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_4nTsXN8nCI4/SABCkPGhnLI/AAAAAAAAAaY/-tO5d71OIfA/s1600-h/equalizer.png"&gt;&lt;img style="cursor:pointer; cursor:hand;" src="http://4.bp.blogspot.com/_4nTsXN8nCI4/SABCkPGhnLI/AAAAAAAAAaY/-tO5d71OIfA/s400/equalizer.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5188219961027435698" /&gt;&lt;/a&gt;&lt;br /&gt;Save the preset and enjoy!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3048087803154172720-6851070135086448914?l=dixiao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dixiao.blogspot.com/feeds/6851070135086448914/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3048087803154172720&amp;postID=6851070135086448914' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3048087803154172720/posts/default/6851070135086448914'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3048087803154172720/posts/default/6851070135086448914'/><link rel='alternate' type='text/html' href='http://dixiao.blogspot.com/2008/04/perfect-itunes-equalizer-setting.html' title='A &apos;Perfect&apos; iTunes Equalizer Setting'/><author><name>Di</name><uri>http://www.blogger.com/profile/14601914875317010197</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp1.blogger.com/_4nTsXN8nCI4/R8sAixNZTYI/AAAAAAAAAVQ/IiL67_rawWw/S220/bean.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_4nTsXN8nCI4/SABCkPGhnLI/AAAAAAAAAaY/-tO5d71OIfA/s72-c/equalizer.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3048087803154172720.post-4518701813510386314</id><published>2008-04-09T17:05:00.005-04:00</published><updated>2008-04-18T12:55:23.988-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='LaTeX'/><title type='text'>Change the background of TeXShop</title><content type='html'>Sometimes I need use LaTeX to generate equations in white color for my Keynote presentation (copy/paste from TeXShop).  It is then necessary to change the background of TeXShop, otherwise nothing can be seen.  There is a hidden preference just for this:&lt;br /&gt;&lt;pre&gt;&lt;code&gt;# defaults write TeXShop Pdfbackground_R 0.5&lt;br /&gt;# defaults write TeXShop Pdfbackground_G 0.5&lt;br /&gt;# defaults write TeXShop Pdfbackground_B 0.5&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Change the values back to 1 to get white background or you can change it to any value you prefer.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3048087803154172720-4518701813510386314?l=dixiao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dixiao.blogspot.com/feeds/4518701813510386314/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3048087803154172720&amp;postID=4518701813510386314' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3048087803154172720/posts/default/4518701813510386314'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3048087803154172720/posts/default/4518701813510386314'/><link rel='alternate' type='text/html' href='http://dixiao.blogspot.com/2008/04/change-background-of-texshop.html' title='Change the background of TeXShop'/><author><name>Di</name><uri>http://www.blogger.com/profile/14601914875317010197</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp1.blogger.com/_4nTsXN8nCI4/R8sAixNZTYI/AAAAAAAAAVQ/IiL67_rawWw/S220/bean.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3048087803154172720.post-3131220843166966655</id><published>2008-03-31T18:45:00.011-04:00</published><updated>2008-04-01T21:45:10.808-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Mac OS X'/><title type='text'>Single window mode in Safari</title><content type='html'>Another hidden preference...&lt;br /&gt;&lt;pre&gt;&lt;code&gt;# defaults write com.apple.Safari \&lt;br /&gt;  TargetedClicksCreateTabs -bool true&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3048087803154172720-3131220843166966655?l=dixiao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dixiao.blogspot.com/feeds/3131220843166966655/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3048087803154172720&amp;postID=3131220843166966655' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3048087803154172720/posts/default/3131220843166966655'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3048087803154172720/posts/default/3131220843166966655'/><link rel='alternate' type='text/html' href='http://dixiao.blogspot.com/2008/03/single-window-mode-in-safari.html' title='Single window mode in Safari'/><author><name>Di</name><uri>http://www.blogger.com/profile/14601914875317010197</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp1.blogger.com/_4nTsXN8nCI4/R8sAixNZTYI/AAAAAAAAAVQ/IiL67_rawWw/S220/bean.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3048087803154172720.post-2100140040712302756</id><published>2008-03-28T15:49:00.012-04:00</published><updated>2008-12-11T07:43:18.359-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Mac OS X'/><title type='text'>Right click on a mac laptop</title><content type='html'>I've been using control+click for right click for ages on my macbook and I have complained about the lack of a control key on the right side of the space bar.  But now I just found out that there is an option in System Preferences under Keyboard &amp;amp; Mouse that allows you to right click by putting two fingers on the trackpad.  See the screenshot.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_4nTsXN8nCI4/R_Ln8KzMsRI/AAAAAAAAAYo/Qlk2nX_XcYk/s1600-h/right_click.png"&gt;&lt;img style="cursor:pointer; cursor:hand;" src="http://1.bp.blogspot.com/_4nTsXN8nCI4/R_Ln8KzMsRI/AAAAAAAAAYo/Qlk2nX_XcYk/s400/right_click.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5184461141934125330" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This is just way better than control+click!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3048087803154172720-2100140040712302756?l=dixiao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dixiao.blogspot.com/feeds/2100140040712302756/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3048087803154172720&amp;postID=2100140040712302756' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3048087803154172720/posts/default/2100140040712302756'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3048087803154172720/posts/default/2100140040712302756'/><link rel='alternate' type='text/html' href='http://dixiao.blogspot.com/2008/03/right-click-on-mac-laptop.html' title='Right click on a mac laptop'/><author><name>Di</name><uri>http://www.blogger.com/profile/14601914875317010197</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp1.blogger.com/_4nTsXN8nCI4/R8sAixNZTYI/AAAAAAAAAVQ/IiL67_rawWw/S220/bean.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_4nTsXN8nCI4/R_Ln8KzMsRI/AAAAAAAAAYo/Qlk2nX_XcYk/s72-c/right_click.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3048087803154172720.post-6685776284068354472</id><published>2008-03-05T00:15:00.007-05:00</published><updated>2008-04-01T21:44:23.148-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Mac OS X'/><title type='text'>Collect all open windows to one space</title><content type='html'>I love using Space, especially after replacing an aging 15" PowerBook (more than 4 years old) with a brand new MacBook with a relatively small 13" screen.  However, sometimes I found my application windows are all over the four spaces I opened and I need a quick way to move them into one space. &lt;br /&gt;&lt;br /&gt;Here is the trick: Enter space, press c, all windows will be collected into the first space.  Press shift+c to watch the slow motion.  Enjoy!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3048087803154172720-6685776284068354472?l=dixiao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dixiao.blogspot.com/feeds/6685776284068354472/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3048087803154172720&amp;postID=6685776284068354472' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3048087803154172720/posts/default/6685776284068354472'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3048087803154172720/posts/default/6685776284068354472'/><link rel='alternate' type='text/html' href='http://dixiao.blogspot.com/2008/03/collect-all-open-windows-to-one-space.html' title='Collect all open windows to one space'/><author><name>Di</name><uri>http://www.blogger.com/profile/14601914875317010197</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp1.blogger.com/_4nTsXN8nCI4/R8sAixNZTYI/AAAAAAAAAVQ/IiL67_rawWw/S220/bean.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3048087803154172720.post-5355087101345839276</id><published>2008-03-03T23:23:00.016-05:00</published><updated>2008-04-18T13:05:51.301-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Mac OS X'/><title type='text'>Several Mac OS X tips</title><content type='html'>1. Getting tired of the default background of login window? You can change it by&lt;br /&gt;&lt;pre&gt;&lt;code&gt;# sudo defaults write \&lt;br /&gt;  /Library/Preferences/com.apple.loginwindow \&lt;br /&gt;  DesktopPicture '/Path/To/Your/Picture'&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;2. Set default path for every application in Mac OS X:&lt;br /&gt;&lt;pre&gt;&lt;code&gt;# mkdir ~/.MacOSX&lt;br /&gt;# defaults write ~/.MacOSX/environment "PATH"  $PATH&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Log out then log in and you are all set.  You can also use this method for other shell variables.&lt;br /&gt;&lt;br /&gt;3.  When you use spotlight to search content of PDF files, clicking on the result will bring up Preview.app, showing the highlighted text at a very large scale, effectively rendering this feature useless. To change it,&lt;br /&gt;&lt;pre&gt;&lt;code&gt;# defaults write com.apple.Preview Preview \&lt;br /&gt;  -dict-add PVPDFSpotlightSelectionSize 1&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3048087803154172720-5355087101345839276?l=dixiao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dixiao.blogspot.com/feeds/5355087101345839276/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3048087803154172720&amp;postID=5355087101345839276' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3048087803154172720/posts/default/5355087101345839276'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3048087803154172720/posts/default/5355087101345839276'/><link rel='alternate' type='text/html' href='http://dixiao.blogspot.com/2008/03/several-tips-for-mac-os-x.html' title='Several Mac OS X tips'/><author><name>Di</name><uri>http://www.blogger.com/profile/14601914875317010197</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp1.blogger.com/_4nTsXN8nCI4/R8sAixNZTYI/AAAAAAAAAVQ/IiL67_rawWw/S220/bean.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3048087803154172720.post-1796739943000316940</id><published>2008-03-02T14:33:00.010-05:00</published><updated>2008-04-01T21:51:47.777-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Mathematica'/><title type='text'>Display several plots together in Mathematica</title><content type='html'>In Mathematica one can display several plots together using the following command. Let's first generate two plots, for example,&lt;br /&gt;&lt;pre&gt;&lt;code&gt;g1 = Plot[Sin[x], {x,0,2Pi}];&lt;br /&gt;g2 = Plot[Cos[x], {x,0,2Pi}];&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;One can then choose to show these two plots in the same graph:&lt;br /&gt;&lt;pre&gt;&lt;code&gt;Show[g1,g2]&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;or display them in an array:&lt;br /&gt;&lt;pre&gt;&lt;code&gt;Show[GraphicsArray[{g1,g2}]]&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;It is generally a good idea to assign a variable to each plot so later it can be used without regenerating the plot.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3048087803154172720-1796739943000316940?l=dixiao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dixiao.blogspot.com/feeds/1796739943000316940/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3048087803154172720&amp;postID=1796739943000316940' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3048087803154172720/posts/default/1796739943000316940'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3048087803154172720/posts/default/1796739943000316940'/><link rel='alternate' type='text/html' href='http://dixiao.blogspot.com/2008/03/display-several-graphs-together-in.html' title='Display several plots together in Mathematica'/><author><name>Di</name><uri>http://www.blogger.com/profile/14601914875317010197</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp1.blogger.com/_4nTsXN8nCI4/R8sAixNZTYI/AAAAAAAAAVQ/IiL67_rawWw/S220/bean.jpg'/></author><thr:total>0</thr:total></entry></feed>
