Monday, December 8, 2008

switch cmd and alt in windows keyboard

Using a windows keyboard, I found myself mistyping cmd and alt/option a lot, because the layout of the macbook pro is the opposite. The easiest way to fix this is to install double command, which is better than KeyRemap4MacBook.

No reboot required, and just go to system preference, select "Command Key acts as Option Key" and "Option Key acts as Command Key".

Friday, December 5, 2008

Enable Finder Path View

defaults write com.apple.finder _FXShowPosixPathInTitle -bool YES

Saturday, November 22, 2008

QQ空间 - 原始人发现旧大陆

今天突发奇想在Parallels下打开了Windows后装了一个QQ,之前一直都是用Adium上QQ落后于时代N个世纪,才发现QQ很好,很强大啊!虽然也略有所闻QQ邮件,今天试了一下发现它和博客(空间)的整合简直是天衣无缝,加上本来QQ就有一个强大的用户社区:很好,很强大!腾讯实在是聪明,在这个方向再多下点功夫,整个江山都会是它家的了。

或许是因为在国外呆得久了,很多时候对国内的事情,还有亲朋好友都觉得都觉得有些疏远。连MSN都用的少了,现在偶尔在MSN Space上博几篇文章大概也就三四个人会过来看;至于blogger,估计大家都不知道这个东西;而因为苹果电脑的原因,也烦得上QQ,近期稍微用得多了点才勉强跟上好些老友的近况。Facebook估计国内很少有人用,而校内网的同学们都不怎么活跃,BBS是越来越成为潜水和搜寻信息的场所,平台一多倒是更难和大家保持联系了。Open Social看来有很长的一段路要走,尤其是中国市场,我还是老老实实回到腾讯的怀抱吧。

特:在我26岁生日这天,发现这片朋友们活动的旧大陆,以此为记。

Friday, October 31, 2008

Googleween

Googleween! 可惜我没有带相机,就把官方报道贴一个了。这次获第一名的是爱神和丘比特,尤其是现场求婚把整个比赛推向了高潮。Congratulations!

Googleween blog post





Sunday, October 19, 2008

free bake sale

在Google的工作无疑是十分有趣的,不过很多时候很有趣的东西却不能和外界说。本来早就想blog上周的bake sale,一直没有弄懂是否confidential,直到官方的blog出来了,就从那里引些图片过来吧。注意:这些都是正式员工们自己做的甜点(不是厨房里的师傅们做的)!

官方报道:http://googleblog.blogspot.com/2008/10/googlicious-time.html

仔细看这幅漫画里面的三个大鱼 :P

Friday, October 17, 2008

工作的生活



昨天和同事聊天的时候谈到年龄,我说我们应该差不多大吧,他说我21,我才意识到自己已经是很老了。大概是在学校待久了,突然意识到这岔事,还是很吃 惊。其实大多数时候,心理年龄和自己圈子的人谈论的话题有着很强的相关性:谈高考竞赛的必是高中生,谈考研出国的必是本科生,谈房子小孩的必是工作之后的 人,倒是中间念博士的时候没啥有特征的话题,大抵就是抱怨研究或者写论文的那些吧。不知道是应该庆幸还是悲哀,我已经沦落成上班一族——在mitbbs上 随便sample一个硅工,估计过几个月我也就是那类人了……

最近经济不景气,投行纷纷倒闭,各大公司也都开始裁员。我们的老大Eric昨天也公开对媒体说:“We're all sort of in uncharted territory”,今后这一两年会怎样还真的难说。唯一算得上比较幸运的是我差不多是在公司股票低迷时期开始上班,要是经济不崩溃的话,option 可能还是会值点点钱;不过就我这种fresh PhD也都没有几股,也只能yy一下小小几千块钱而已。总之呢,有钱别忙着买股票,该花的还是花掉比较是在,最近账单一堆一堆,saving全部又清 空……

对了,工作。说到工作,这日子也还算过的充实。反正也就一个人,又不用操心吃饭,住在一个离公司两迈的地方,每天骑个单车倒也省得去锻炼身体了。每天早上 七点半起床,iPod里挑本专辑,三四首歌就到公司了;然后吃个热早餐,干活,开会,吃中饭,做个按摩椅打个盹,接着找活干,六点半左右吃晚饭,骑车回家 得时候顺便打电话,找些电影动画片看看,洗澡睡觉。哇塞,简直是太规律了,和上学差不多规律,区别就是不用做饭,晚上也不怎么干活,然后就是打电话时差有 点麻烦。不过这加州早上还是有点冷,还好趁着雨季到来之前买个车,十一月以后可以开车上班了。

就工作本身而言,不得不说,感觉比我实习的时候好很多了,当时实习的时候我都曾经说过对工作绝望之类的话,汗一下-_-! 我现在的职位有比较多的自由度,直接顶头上司不是那种微观调控型的人,虽说刚开始到处找活干的时候还是有点frustrating,开始上手之后还是能摸 清楚前进的方向。由于实习积累下来的经验,很多程序化的时期起步快多了,最大的挑战就是到处找人聊天和给自己定位,压力在那里摆着,最难也就是不认识到认 识那一步,厚着脸皮跑到别人cube里面做自我介绍,发信骚扰不认识的可能的合作者一起吃饭。总体来说,我算是熬过了这两周,可能是之前性格比较内向,和 人打交道还是有很多东西值得学习,这也大概是我这两周最大的收获了。

短讯两则:
1. 恭喜++-同学踏入人生的坟墓,新婚快乐!
2. 做个广告,有空大家可以去T mobile找个G1玩玩,下周上市。虽然本人不fan这个版本,但至少是个好的开始,希望明年换手机的时候多出几款可以和iphone摆在一起选选。

Thursday, October 16, 2008

Tokyo Boy

强烈推荐一部电影:东京少年。就不剧透了,堀北真希演技绝对一流啊,片尾曲也很不错。

Sunday, October 5, 2008

mac下VLC字幕乱码解决方案 zz



1. Open VLC, press "Cmd+," to open the preference.
2. Select the font in Video -> Subtitles/OSD -> Text renderer. Notice that the fonts directory is /Library/Fonts or User/Library/Fonts.
3. Modify the default text encoding in Input / Codecs -> Other codecs -> Subtitles, and uncheck UTF-8 autodetection.

Following are screen shots of VLC 0.8.6e

Friday, October 3, 2008

乱弹西游记

发现好文一篇,有重读西游记的冲动了。摘抄片段如下,强烈推荐原文:
http://cache.tianya.cn/publicforum/content/no05/1/125199.shtml

大鹏金翅:真正的自由斗士
  
   《西游记》中出场的诸多妖精,谁对孙悟空造成的威胁最大?毫无疑问是大鹏金翅。虽说很多妖怪与孙悟空对阵都是“不分胜败”,但对孙悟空基本上构不成致命的 威胁,唯有大鹏金翅,则是彻底完胜孙悟空。观音给了孙悟空三根救命毫毛,孙悟空唯一一次使用就是被大鹏金翅装在“阴阳二气瓶”中。即便是在太上老君的八卦 炉、紫金葫芦中,孙悟空都能毫发无损,但在阴阳二气瓶中,第一会体会了恐惧的滋味:“别事好处,这三条火龙难为。再过一会不出,弄得火气攻心,怎了?…… 怎么好?孤拐烧软了!弄做个残疾之人了!”,同时居然“忍不住吊下泪来”,也就是这时候,才想起救命毫毛来(第一次读原著时,见着孙悟空迟迟没用救命毫 毛,心里还想这是不是观音菩萨的心理战术,让孙悟空在降妖时能够勇往直前)。如果说这一次大鹏金翅的胜出是靠了宝贝,那他们第二次直接PK则是彻底压倒了 孙悟空。那一次悟空、八戒、沙僧和三怪群殴,八戒和沙僧早早被擒拖了后腿,孙悟空以一敌三眼见不敌,便一个筋斗云逃跑。这时大鹏金翅追来,一翅就是9万 里,两翅就追上,“悟空被他一把挝住,拿在手中,左右挣挫不得。欲思要走,莫能逃脱。即使变化法遁法,又往来难行”。简直就和《大话西游》中观音对至尊宝 一样,被捏在手里唧唧直叫,不是一个等级的。再次逃出后,大鹏又放出话来,说唐僧已经被吃了,孙悟空居然就相信了,但也只敢跑到狮驼洞欺负小妖精出气。之 后也不敢言报仇,只想跑到如来那里取紧箍,“下这个箍子,交还与他,老孙还归本洞,称王道寡,耍子儿去吧。”,完全不考虑八戒、沙僧这时候还可怜巴巴的躺 在蒸笼里。谁会想到,未来的斗战胜佛居然气馁如斯,可以说从武力、智慧上,大鹏都是完胜。

   且不说武力超群,更重要的是大鹏金翅是《西游记》中真正的自由斗士,孙悟空和他相比逊色了很多。孙悟空最多算是一个草根造反派,典型的农民起义者。第一次 招安,封了一个弼马温,就非常满足了,尽职尽责。如果不是得知这个官“没品”,恐怕就一直当下去了。后来入住“大圣府”,自以为逍遥自在,“闲时节会友游 宫,交朋结义见三清,称个‘老’字;逢四帝,道个‘陛下’”,自以为已经进入了上流社会圈子,心满意足,待到得知蟠桃会没有受邀,才得知自己依然没有进入 “编制”,再次造反。后来西天取经,也是为了“修得正果”。总之,我一直不同意孙悟空是一个真正的自由派,其所作的一切,都是为了得到承认。名利名利,名 在利前呀。

   再看大鹏金翅。大鹏金翅是什么身份?用如来的话说,“自那混沌分时,万物有走兽飞禽。走兽以麒麟为之长,飞禽以凤凰为之长。那凤凰又得交合之气,育生孔 雀、大鹏“,在那个时候,如来的菩提树还不知道在哪儿呢。后来如来在修炼时被孔雀吞了,不好意思从肛门出去,想办法从孔雀脊背中挖了一个洞跑了。后来得道 后想报复,但被其他佛劝告“你是从孔雀中跑出来的,杀他就是杀你妈(照此说法,孙悟空不知杀了多少个妈了),不人道”,于是就封孔雀为佛母孔雀大明王菩 萨,名为册封,实际上就是在灵山软禁。

   但不管怎么说,大鹏乃飞禽之祖凤凰之子,算得上是“太宗”了,而且也算是如来的舅舅,体制中人,和草根孙悟空相比,他就算是皇亲国戚。但大鹏居然视这一切 如粪土,他何尝不知道靠和如来的联系,在灵山能轻轻松松的混个“一品佛”级别,但“我辈岂是蓬蒿人”,大鹏毫无犹豫的就革了自己家族的命,想依靠自己的本 事自由自由闯天下。不依靠任何裙带关系建立了狮陀国,这也是妖精界唯一一个国家,正是宣布革命力量从农村走入了城市。即便是最后,面对如来的承诺,他依然 说:“你那里持斋把素,极贫极苦;我这里吃人肉,受用无穷;你若饿坏了我,你有罪愆。”就是,子非鱼,安知鱼之乐。如来总以为他灵山是极乐世界,又焉能理 解自由的好处。可悲的是,如来的法力一直延续至今,至今依旧强迫万民接受某些东西。也正因如此,尽管大鹏吃人有罪,但居于体制之中敢于放弃利益追求自由, 不靠裙带关系而努力打拼,在我看来,也堪称可爱一妖亦。

Thursday, October 2, 2008

Use google maps to plan your travel

Now everyone knows how to use google map to locate a place, finding driving or public transit directions and printing the turn by turn directions. Slightly more advanced use knows how to check local business with ratings and reviews, or drag the route to avoid certain roads on the fly, etc. Here are some instructions that you might not know for using google maps to plan your travel (which I learned for my Yosemite trip). I would like to share this on the blog, and hopefully saving some time googleing for my next travel trip.
  1. Create a "my map". If you noticed the "my map" link on the right of "get direction" link, you can almost get started without even look at this on-line user guide.
  2. Import other people's "my map", your earlier "my map", or duplicate your "my map". For example, I found there is already a bunch of good Yosemite trail maps, such as this one. I don't want to duplicate the work, but put several trail maps into my own "my map".
    2.1) Open the larger map in a regular google map window.
    2.2) Right click "view in google earth" icon, select copy link location.
    2.3) In your own "my map", make sure it's in editing mode, and click "import" on the right of "collaborate", paste the copied link location, done.
  3. Print your "my map". I have to admit that the default print is a bad choice (try and you'll see why). So far, I think this converter does the trick.
There is also a way to import the direction map into "my map", but I won't recommend it, because the solutions I found are buggy and clumsy.

cloud computing

Here is the most interesting explanation I've seen for this buzz word.

Wednesday, October 1, 2008

Setting Up Airport

There are two types of apple router: airport express and airport extreme. In fact, the set up is not as trivial as I though it should be, unless you follow the right steps, which is poorly documented in the accompanying booklet.

  1. Get internet connect from a regular moderm, test the direct ethernet plug into the computer works.
  2. Get a fresh set airport. If you messed up with the setting, restore back to factory setting by pressing the reset button while it is plugged with power, wait until it quick flash amber light, and wait it restart.
  3. Now your computer, with appropriate software, can detect a wireless signal. Connect to it, and open up the airport utility, select the appropriate airport device.
  4. Go through the recommended set up steps, DO NOT try manual set up for now. Everything is straightforward, use DHCP automatically to find the IP, gateway, DNS etc. You may not want to set up password for this time.
  5. Update the airport, and wait for the device to reboot. Now you should have internet connect now. Try to look at the advanced manual set up, change wherever you want, and be sure to add WPA/WPA personal password.

Tuesday, September 30, 2008

Yosemite两日游

上周三四跑了一趟Yosemite算算这个居然是我自己开车去的第一个国家公园,居然在北卡呆了四年都没有去过Smoking Mountain,惭愧啊惭愧,以后再补吧。

由于是刚到加州第二天就出门旅行,身体还是有些吃不消,好些计划种比较难的trail就skip掉了。估计是时差问题,先是起了个大早,却赶了个晚集,匆匆在7-11吃了个泡面当早餐,开了4个小时才到公园。山路有些弯,一直开的很慢,攒了很多开山路的经验值:其中有几个mile的120还是很恐怖的,一边是山,一边是悬崖,很刺激。年票跟人所以就买了40的年票,现在的任务是一年之内要再来一次。

进门的时候发了个Yosemite的报纸,有个大地图和Village的地图,但是没有trail的地图。直接上120走那个冬天会关掉的路,经过了个看石头和远观Half Dome的景点,以及T字打头的一个大湖,相当的漂亮。不过都大中午的,肚子饿得赶紧跑到Visitor Center不远处的Grill上吃了个汉堡和薯片,味道还相当的不错,消费指数$。可惜草原都是黄黄的,不好看也没有动物,所以就决定去爬Cathedral Lake。事实证明,Yosemite所有rate中等难度的trail对于我们来说就是相当的艰难,一个来回7 mile的路走得最后都没有气了。刚开始坡挺大的,后来遇见一对老美,他们说一路上好几次都决定往回走了,还好后面坡没有那么陡才坚持下来,我们才确定不只是我们自己身体弱了。路上远处有个山,山最顶上的石头在某个角度看超级像城堡,很有意思。我们只有体力去了Lower Cathedral Lake,据说比upper要风景好,不过比之前的T湖小了不少,但背景都是光秃秃的大石头山,还是很酷的。花了三个半小时回到车上已经有点累趴下了,接着又开了四五十分钟到Tunnel View看日落。看见很多人在那里观景,也不乏有扛着长镜头的摄影爱好者,不过这个季节水是干的,只有一条黑黑的水痕的瀑布在我看来是大煞风景。然后在天黑的过程中赶上了Glacier Point的路,本以为会很难开,其实这段比之前120的弯弯路还好开很多。最糗的是虽然计划了晚上上山顶看星星,却忘记带手电筒,黑嘛嘛地摸了一段伸手不见五指地小路还是走上了观景台,并且在天没有完全黑下的时候瞟到了几个山峰,不知道是不是传说中的Half Dome。恰逢一个老师带着一群小学生认星星,在搞清楚坐标下,我们也认出了大小熊,天鹰天琴,以及射手天蝎和巨蟹座;当然还有久违了的银河和我们认为是的牛郎织女座。山顶看星星,让我想起了小时候夏天躺在家院子里看星星的情形,时间过得真快,不知道这个年头回家还有星星看么?

住在Curry Village交通还算方便,除了价钱有点贵,房子有点臭之外一切都好。早餐相当丰盛,更赞的是在Village里看见了长角的鹿以及浣熊。松鼠更是随处可见,不过它们不像北卡或是密歇根的松鼠,脖子上又一撮白毛,而且尾巴相当地长,瘦瘦的。在爬Vernel Fall的时候有只可爱的松鼠在路边不停的叫(我开始还以为是鸟叫),每叫一次还要摇一下尾巴,很可爱。虽然是没水的季节,Vernel Fall还是流下了帘状的水幕,而且一条路上给了N个角度观看,毕竟这经典的trail风景还是比孤单没太多人走的Cathedral Lake好看。由于太累,没能网上接着爬Nevada Fall,还是等下次直接走7 mile trail时候再看了。中饭是在著名的H酒店搞定的,汤不错,沙拉也不错,可惜乌冬面pasta给莫名其妙的酱料糟蹋了,口味来说可以打个3/5,消费指数$$$。

然后早早地就往回走了,路上经过果园区的时候买到了超级好吃的西红柿,桃子和李子以及超级甜的葡萄(不知道是不是沙漠气候的原因)。最后,强烈b4要prepay的油站,害我浪费了7刀……相片改天补上。

Thursday, September 18, 2008

Gradient highlights for Stacks (zz tuaw)

If you use Stacks like we do, then you probably love any additional hacks you can do to them. While this Terminal Tip provides no really useful features, it does provide you with some awesome eye candy for your Stacks. This hack gives you a mouse-over gradient (seen above on Terminal) in your Stacks; just open Terminal (/Applications/Utilities) and type in the following command: 

defaults write com.apple.dock mouse-over-hilte-stack -boolean YES

After you type in the command, type "killall Dock" to restart the Dock. You will then see the gradient in your Stacks. To get rid of the gradient, just replace "YES" with "NO" in the command above. 

Friday, August 29, 2008

My Mac Software List 7 - other fun stuff

I've talked about lots of basic applications you may need on a mac, and I would also talk about something else. For example, the old powerbook do not have double finger scroll feature, and iScroll2 is needed; fortunately they build in this feature for the intel notebooks.

If you would like to monitor your CPU/memory usage on the fly, try this free iStat Menus , or the dashboard widget iStat Pro  freeware. Of cause, you can always return to the build in utility Activity Moniter .

If you gots lots of little things to cut/paste, for example, lots of images/equations when you making a slides (not from LaTeX, but KeyNote, PowerPoint etc), you should try iClip  shareware, the premier Mac multiple clipboard and scrapbook. Or if you need draw a flow chat in your slides, check OmniGraffle  shareware out. My only complain with it is too expensive.

If you are not quite oragnized, and have lots of random stuff (webpage, tracking numbers, friends' bussiness cards, etc), and you want to remember and find them when needed, don't miss the EverNote  freeware. You may drag the files/pictures into the application, and sync them on the internet, and access them on any computer or even cellphones. Or if you want to get organized with your collection of CD, DVD, books, games etc with a fancy interface, Delicious Library  shareware is the application you deserve. You may use the build in camara to scan the bar code to put your collection into the library, and create a website to share with your friends in one second. Once again, to organize your papers, use Papers  shareware, and I've also used DEVOthink  shareware for similar task before Papers came out.

There is also some other interesting apps, for example Pzizz  shareware for generating calm music helping you take a nap or sleep, and I've used it in the days preparing for the defence. Aparantely, I don't need it these days :)

There is way too much applications to write, but I'll just stop here. Here is a short list of must have applications (all free except Papers, and I omit all build in apps):

Thursday, August 28, 2008

My Mac Software List 6 - documents, pictures and videos

PDF is a system wide service on mac. The benefit of this is that you can print almost every file (image, webpage etc) into pdf files, just use "Command + P" select PDF -> save as PDF, done. To view PDF files, Adobe Reader  freeware is definitely a good choice, but sometimes slow to open (at least on my ancient powerbook). Apple's build in Preview  is pretty decent for PDF files. You can even click the small pages in the drawer, deleting it (holding Command + delete key), or drag the relavent pages to another pdf file! One downside of Preview is that it does not have full screen feature for PDF files. Also, please do not forget the Leopard system wide QuickLook service , press the space key and you get a preview of the pdf (similar for pictures, slides, movies...) file instantly! If you need to write on the pdf files, you might need to get the expensive Adobe Acrobat Professional  commercial, or the cheaper application PDFpen  shareware.

The build in Photo Booth  is very fun to play with, and you may display those effects in iChat if have MobileMe account. I would also strongly recommend you organizing your photos with iPhoto  free in iLife with every new mac. There is no Google Picasa application for mac (at least for now), but you can upload your photos to Picasa Web from iPhoto using Picasa Web Albums  free. For (semi) professional photographers, do not miss Apple's Aperture or Adobe's Light Room. Both of them have very good press, but I haven't tried them.

Talking about pictures, you cannot miss the build in Image Capture  for screen capture. Or even simpler, press "Command + Shift + 3 or 4" for full screen capture or drag capture (link for detailed tips). There is also a dashboard widget, Screenshot Plus  freeware, if you hate to memorize the keyboard shortcuts.

If you want to draw some simple curves (like sine wave, ellipse) and do not want to open R or Matlab, try the hidden gem in OS X, Grapher  build in. Check out its own examples, and this guide on macrumors. If you want a graphical editor, but cannot afford Adobe photoshop, consider the cheaper Pixelmator  shareware, or just settle with Seashore  freeware. I've also tried Lineform and Vector Designer, but I am not a heavy graphical developer, so I don't have much comments on those applications.

To read comic books (or lots of sequential pictures), try this light weight application, Xee  freeware. To present your photos and movies with style, try award winning Photo Presenter  shareware. If you are still not satisfied, and want to make something like Scotland did in the end of his thesis defense, try FotoMagico  shareware. I cannot justify its high price, but it seems Scottland is quite happy with it.

You might remember using the linux tools for batch resizing/rotating pictures, you could use Resize!  freeware on a mac, and I think it is easier than setting up the an Automator routine for these simple tasks. Unless you got extra bucks to spare, you won't need to use this fancy Resize Me  shareware.

Needless to say, play your music in iTunes  freeware. For Chinese songs, you may need to use ID3Mod2  shareware to correct the wrong text encoding. But even better, now you can just get nLyrics  freeware to do the task, and even obtain lyrics when you play the song, for free (notice, the Tiger version is not up to date). To play .ogg files, I used to use Cog  freeware, but it seems that Vorbis solution is more popular these days.

Similarly, you will get used to QuickTime  freeware for your video files. There is not much reason to upgrade it to the Pro version, except the easy making movie files with many sequential pictures, which I liked a lot. No more Windows Media Player on mac, but you can play .wma files through QuickTime with free plugin Flip4Mac WMV . There is also non-free version of the plugin, which offer features like convert .wma files to .mov files without the ugly watermark. For stream files (.rm files), you should definitely use RealPlayer , again go with the free version, the little blue button on the top. I hate the company, which always tries to sale you the commertial version, and hide the free version download button at a place you'll never notice. In addition, if you do found certain .rm files cannot be played, try downgrading the current version 11 to Realplayer 10  freeware. It seems they are bad at backward compatibility. For other codec, you might want to install the system preference plugin Perian  freeware for iTunes, or try VLC player  freeware. Mplayer  freeware is also recommended when you need to view external captions for the movie files, or sometimes, you got to try DivX Player  freeware (not the Pro version). To much for you? Yes! So here goes my summary: install Flip4Mac and Perian, and forget about them; then open all you video files with Quicktime and Realplayer; if you fail, try VLC; fail again? Go to your windows box, and remind the good old days you can have just one media player solve all the problem. Hopefully, you won't miss your windows computers 99% of the time.

For watching TV or on-line streamed videos, there is no Windows ppLive conterpart on mac, but there is the Joost  freeware with limited programs. However, there is no problem about watching Olympics on NBC website, or YouTube, with SilverLight, or Flash plugin. So life is bearable.

To make a screencast, (notice those vocabulary: podcast, screencast...) you can try iShowU  shareware or SnapzProX  shareware. Both of them are not free, but if you really need them, the price is not that steep. However, if you just want to teach your grandma setting up the mac in another city, why not just use sceen share and configure the machine remotely.

Wednesday, August 27, 2008

My Mac Software List 5 - writing papers and programs

The build in TextEdit  is particularly good, fast and powerful for simple tasks, and I am fond of using the plain text mode (Shift + Command + T) for fast access. However, we use LaTeX for scientific writing, aren't we? The LaTeX editor on mac is called TexShop  freeware, but that is just the editor. You should also install TexLive system, for example MacTex  freeware. The installation is staightforward, and if you need extra packages, use i-Installer  freeware.

After installing the Tex system, if you just want to generate a quick snippet of a very short tex image, for example, equation/table for your presentation, you should use LaTeXiT  freeware. Great things on a mac: drag and drop works almost everywhere! For orgnizing references, you can defintely use your favarite text editor to work with plain .bib file, or try BibDesk  freeware for a graphical approach. I only give BibDesk 3 stars, not because it is bad, but you don't really need to use it - you have Papers  shareware to organize your papers, and simply clicking all relavent papers, and exporting it to a .bib file save you a lot of time. I rarely give a non-free software 5 stars, but it is really worthy evey penny you spend, abeilt expensive (there is student discount, not faculty discount though). At least you should give it a try. Talking about the refernce tools, if you are still using "old style" microsoft word writing your paper (or communicate with your collaborators with word documents), you should try Bookends  shareware, saving your time but not cheap neither. As a note, Papers can export files to many different reference styles, including EndNote XML, BibTeX library, PDF etc.

Microsoft Office Suite  commercial is also available on mac. Word  is comparable to Pages  in Apple's iWork Suite  commercial, and Pages is easier to use for creating fancy posters. Excel  is way more powerful than Numbers  in iWork, but Numbers is still an interesting approach. However, PowerPoint  is way behind iWork's KeyNote  in iWork. A very useful plugin for Keynote is LinkBack: you can use LaTeXiT to generate equations and drag it to your Keynote slides, and later click on the image link back to LaTeXiT to modify the equation. The open source couterparts OpenOffice Aqua  freeware and NeoOffice  have a long way to catch up (but usable), while Google Docs Suite  freeware lacks features but easy for collaborating and sharing. One line summarize: considering both features and prices, iWork wins.

For programming or general purpose, both vi/vim and emacs have a lot of editors, but I don't have much experience with them. For example, you can try Aquamacs Emacs, or Carbon Emacs. There is also an instruction for setting up Emacs Speaks for Statistics (ESS) with Enhanced Carbon Emacs plugin. Notice that you need to install X11 for displaying R graphics if it is not alreay on your system, you can find it on the Leopard installation disk. Besides the standard R you can download from CRAN or the developer page, you can also try Java GUI for R (JGR) for interactive plots (very good for teaching EDA type course), which is deveoped by a group at AT&T. Matlab users also get mac support, but I never tried to run it on my ancient powerbook G4. In addition, the optional Xcode on Leopard  should be great for software developers, or writing codes, but there is a bit of learning curve, and I still need time to explore this application.

On the otherside, Textmate  shareware is great for programmers, very powerful once you know how to use it. Great editor software to own if you are going to use it a lot. If you want a free alternative, try TextWrangler  freeware, and if you are happy with it, you might want to try its commertial version BBEdit  shareare. Eclipse is free for Java developers, and here is the instruction to install Java and the IDE. Because I don't use Java much, so I won't comment on it right now.

For a simple HTML editor to write your website, try Taco HTML Edit  freeware. And if you want an advanced Cascade Style Sheets (CSS) editor, there is the CSSEdit  shareware. Or if you don't want to build your website from scratch, you should try iWeb  free with every new mac. iWeb is beautiful and easy to use, but not so much customization, so I don't quite like it. Alternatively, RapidWeaver  shareware as another template based web creation application is much more powerful, but not free. As a Googler, I had to advertise Google Sites  freeware, but admit it feature lacking. I created my STA 103 course website using RapidWeaver and Google Docs. Recently, there is also lots of publication on Coda, but I have never used it.

Last not the least, if you like to write journals on a computer, try WriteRoom  shareware. It reminds me the days I kept my life journals on a black screen BBS.

My Mac Software List 4 - internet connection

Besides the web browser, there are many other important ways to connect with the internet. First of all is instant messenger (IM):

 Adium, freeware
The best IM on mac: integrates all your IM clients (MSN, QQ, icq, gtalk, ichat, Yahoo! Messenger, AOL etc); lots of customization (skin, icon, message/panel display), and FREE. The only downside is no voice/video chat yet.
 Skype, freeware
Good reception for voice/video chat, and call to phone numbers too.
 iChat, build in iLife, but need MobileMe for advanced features
Very nice video chat interface, including presentation style (showing you slides along with your video chat), but need MobileMe subscription (not quite worth the money in my opinion).
 MSN Messenger for mac, freeware
Workable, but lack lots of features compared with windows version. Suggst use Adium to replace it.
There is also the Yahoo! Messenger for Mac (freeware), but I never used it, no comments.
There is no standalone Google Talk application, you can either use firefox to chat, or use adium to for the features. Also, if you use Internet Relay Chat (IRC), don't miss Colloquy  freeware, or Linkinus  shareware.

For FTP connection, I strongly recommend Cyberduck  freeware. It is so great that I don't even need to compare with other similar applications. Of cause, you can also use the Terminal  build in for sftp connection with usual linux/unix commands. For bit-torrent downloads, try Transmission  freeware, good enough for casual use.

For Virtual Network Computing (VNC), Chicken of the VNC  freeware used to be great, but it seems to have a little bug on intel macs (under fullscreen mode), and lacks support/update for over two years. There seems no perfect solution, but Jollys Fast VNC  freeware is worth trying.

For Virtual Private Network (VPN), for exmaple, download papers from Duke subscription using netID, you can use Cisco VPNClient  commercial, or download it from Duke OIT website.

To access windows machines remotely, you can configure Remote Desk for windows XP professional, or Vista Primum, and access it uisng Remote Desk Connection Client for mac  freeware. See my other post for details, you might also need to configure your firewall property.

For old fashioned people still use old terminal style Bulletin Board System (BBS), the best application on mac is iTerm  shareware. It is actually a full featured terminal, which can run usual shell commands, but also can display BBS nicely.

Tuesday, August 26, 2008

My Mac Software List 3 - web browser

Now talk about the internet related applications. First of all, the most important application is the internet web browser. The build in Safari is pretty decent, until Firefox 3 came out. There are also a bunch of other web browsers, freeware and shareware, such as Camino, Opera, Omniweb, but I would like to say, it's more like a matter of taste, and they are almost on the same level. You will fall in love with anyone of them if you use it for more than two weeks. Summarize as follows:
I think Firefox is better than Safari for now, but I will definitely give Safari 4 (promising much faster speed on javascript) a try when it comes out later this year/or next year. If you use Firefox instead, please check my experience with Firefox 3.

If you do use Safari, check out the plugin Inquisitor  freeware, which makes your search bar more powerful, and you can configure it through Safari preference panel (command + , ). There was a bit of scadal about the developer earlier this year, but David acknowledged this problem in time. I think Inquisitor joining Yahoo! is a great move, and I'm happy to see the developers getting revenu without cutting user experience.

The password manager in Firefox seems to be decent, but I am already a 1password  shareware user. For my two years' experience with Agile, I feel quite happy with them, and now I've owned two licences. But I haven't quite compared it with the firefox manager, maybe that's also good enough. The only downside again is the steep price, but I got both licence from bundle sales, so I'm happy with it.

Another related software is Speed Download  shareware, a download manager for web browsers. Again, good to have if cheap, and I probably won't purchase it at full reatail price. And Yazsoft is quite mean at the beginning of its bundle sale.

My Mac Software List 2 - software installation, system

Continue with my software list. Many mac newbees want to ask: how do I install/un-install a program? Where is the install/uninstall window in mac? The simple solution: drag your application to your Application folder when install it, and move it to the Trash when uninstall it. This solve 95% of the problem. Hard to believe? Yes! That is how most applications work on a mac, which is also called "green installation" on a windows PC. There are few exceptions:
  1. Some application does involve a installer, like the .exe file you need to click on a windows machine. For example, our favorite statistics software, R. Just follow the instructions, select a Volumn (meaning, partition, most of the time, just your current hard drive) to install, and a stand alone application will appear in your application folder. Un-install just trash the file in Application folder.
  2. Some plugin needs you to execute. For example, adobe flash web brower plugin when you run for the first time. Just click it, and do not worry where it goes. Un-install gets trickier, but most of the time, you do not need to uninstall.
  3. Dashboard widgets. Install, click it, and choose keep it in the dashboard. Un-install, click the plus icon on the bottom left of your dashboard, and choose the widgets widget to un-install. You cannot un-install the build in widgets this way, and there are other ways to do it.
  4. System preference plugin, for example, the famous Growl notification. Click install most of the time, and it will appear in the bottem line of your system preference panel. Right click (option click or two fingure tap click) the icon on the sysstem preference panel to un-install.
  5. Other plugins. Typically, you need to manually move it to a specific folder. Un-install means trash it from that specific folder. This is every un-intuitive. Fortunately, you may not even encouter this problem if you are not an advanced user.
Having said that, I do want to mention a shareware for un-installing the programs/plugins:
 AppZapper, shareware
Only downside is the price, but still resonable. However, you don't have to own it unless you are a control freak like me. As I said, I would like to tune every aspect of my computer, so I also own following sharewear. I got them from bundle sales, and they are pretty good (except for the price), and I would probablity not purchase them separately at full retail price.
 MacPilot, shareware
System tuning/optimizing program. Don't think you need it with a new mac.
 Xslimmer, shareware
Slim you universal binary program to ppc/intel only, and trim extra language packs. I need it because the hard drive on my old powerbook is so small... but not recommended for new macs, you have a big hard drive!

My Mac Software List 1 - general, windows compatibility and chinese input

As I am getting more friends using mac, I would like to take a little time to organize my favorite programs and share them with you. Most of the software are free, but there are still a bunch of very good shareware (meaning, free trial but need to pay afterwards). If you want to discover more software, please visit:
I'll use a five star system to rate them, and give a link to the developer's website, along some short comments. All shareware/commercial software's rating have be subtracted 1 star (apple) because they are not free. To begin with, a little gem on mac: to generate a text apple icon like this , use Shift+Option+K on any text field.

If you want me to give you just ONE application I cannot live without, that is
 QuickSilver, freeware
A unified, extensible interface for working with applications, contacts, music, and other data. In other words, you can use the keyboard only to do anything (open application, open a particular folder etc) in very few key strokes. In my opinion, it should be build in the OS! It is so cool that I recommend every one use it (except for grannies that prefer moving the mouse clicking everywhere). Also, the developer is a Googler!

If you are transiting from a windows platform, and still miss some of your favorite windows programs, you can install them on the intel-based macs in four ways: (of cause, you need a separate windows installation disk and license)
 Boot camp, build in in leopard
You get a full featured windows machine (play 3D games etc), and the only downside is that you have to reboot the machine, and there is almost no interaction with your mac system.
 Parallels Desktop, shareware
The good thing is that you can run windows within your mac OS X, and runing windows programs as if they are mac programs. It is also not very stable at the beginning (when I tried), but should be OK now, and I guess it is the most used solution. The downside is that it is not free, but I still give thumbs up for the developers, and purchased a copy.
 VMware Fusion, shareware
The biggest competitor for Paralles Desktop, and big company does greate virtualiztion stuff. I never tried, but it should be as good as Paralles Desktop. My naive suggestion is to check which ever is cheaper (both are quite expensive in my views).
 CrossOver, shareware
If you do not want to give out your money to Microsoft for a windows license, but still want to run some of your windows applications, check crossover's software list. This might be the cheapest solution considering the rediculous price of Windows XP/Vista, but it only support a few windows software, and CrossOver is not free :(

Chinese Input, check chinese mac website at Yale. How I wish Google Pinyin release a mac version (only windows version for now)!
 Pinyin, build in in leopard
Decent, but slow to type (bad dictionary). Only exciting feature is that you can split the words like: "yiwei" and press enter get: 袆 instead of flip a long list under "yi".
 QIM, shareware
The best input method for now. Good dictionary (collaboration with sougou), and only downside is too expensive. If you have a Chinese credit/debit card, you may save a few bucks from the Chinese version of the payment website. I did purchase a copy of QIM, but still think it is over-priced.
 FIT
Fun Input Toy, based on fcitx. Best part is that it has 五笔 and it is free! Bad part is that QIM has a better pinyin dictionary.

Thursday, August 7, 2008

windows xp自动登录

在进入Windows XP桌面之前,每次都会出现一个用脑登录界面,要求我们输入用户名与密码,可以加大了系统的安全性,也为多人共用一台电脑提供了方便,但如果是家用电脑, 只有你一个人使用,这样每次密码,的确不有点不大方便。我们可以通过修改注册表来实现XP的自动登录。

  第1步:运行注册表编辑器,


依 次展开[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon ]分支,然后在右侧窗口双击“DefaultUserName”,接着输入你的登录用户名。如果没有预设的用户名称,可以在注册表编辑器的菜单栏点选“编 辑→新建→字符串值(s)→DefaultUserName”来添加这个项目,注意要区分大小写字母。  

  第2步:同样在该分支下,在注册表编辑器的右侧窗口中双击“DefaultPassword”,然后在空白栏内输入你的密码。假如未发现“DefaultPassword”一项,可按上面的步骤来新建该字符串值。  

  第3步:接下来在右侧窗口中双击“AutoAdminLogon”,将数值设置为“1”。假如未发现“AutoAdminLogon”,可按上面的步骤来新建。  

  现在关闭注册表编辑器并重新启动电脑,以后你会发现那个令人讨厌的登录对话框不见了。

Wednesday, August 6, 2008

vista,我无语了

我大概算是那种有更新癖的人,不论是操作系统或是软件有了更新都要第一时间安装上去,不管这个更新是不是有bug。最近弄了一台新电脑折腾一个vista看看,之前都只有个macbook上分了一个区装的vista home但是很少去研究,想想这个东西出来也有阵子了,sp1都正式发布好几个月了,应该是没啥大问题了可以试试看。

安装的是从MS一个活动中免费拿到的vista business premium,暂且放下confusing的各个版本不谈,装了之后才发现这个版本比之前买的home premium大了不少,导致之前预算失误,弄了个22G的C盘明显不够用。注意,我已经删除了还原点和备份那些fancy功能,居然安装好各种更新之后还剩几百M,连SP1都装不上,什么东西这么大啊,sigh!企图删除语言来释放一点空间,点进去发现可以删掉之前装的唯一一个中文语言,号称可以释放1G空间,可惜删除重启之后居然剩余空间比之前还少了,简直是不可理解!之后又研究了半天看看可不可以从D盘释放一些空间加到C盘,N次尝试都以失败告终。我的所有文件和程序都没有装在C盘居然都不够,绝望中只能重装,就整一个分区算了。

其实我觉得自己还算比较techy的,折腾这个vista都快要发疯了。首先是驱动没有,特别是网卡驱动,还得用另外一个电脑down下来装上,不然别的都免提了,幸亏google一下530的vista驱动还是比较好找。其次是vista update总是企图去自动给我装声卡和显卡的驱动,而装了之后又不work,弄得要强行终止,然后手动拿光盘驱动来安装。最可恶的是到了最后也没有把声卡弄出声音出来,就知道滋滋响,无奈之下只好卸了声卡用自带的集成声卡。原本以为是硬件冲突,事后装了xp之后work得好好的根本就是vista的问题。

折腾好驱动之后安装更新又是弄了n久,我就奇怪,vista fresh install只要20分钟甚至不到,update要弄好几个小时,重启n次(n>3),它就不会简单点弄个cumulate update给用户?customization也是问题,大概是因为我是新手,但是xp第一次学的时候也没有那么复杂啊。我不喜欢默认的那些文档音乐视频的文件夹地址,想redirect到另一个目录下,google了半天最后是一个个目录重新定位(一共8,9个目录!),记得xp下只要重新定位我的文档别的子目录都跟着好了,或许是我没有找到正确的方法吧,或许我应该用live search而不是google?

网络共享实在是复杂了,那个设置实在是不直观,莫非是因为vista所谓的安全性,不网络共享,或者弄得很麻烦就安全了?折腾一个晚上之后终于找到了地方,trick就是还得加上一个everyone的用户组给共享的文件,不然匿名没法access。其实我觉得在家局域网自己用最好什么设备全部可以匿名使用,安全放在入口,把router局域网的密码弄得复杂一点,非自己的机器没法登陆,一旦登陆上就可以很方便的使用就好,搞得里里外外N层关口实在是恶心。

这些东西都还可以忍,就像每次点个设置啥的一定要confirm一下,copy paste其慢无比,这些都只会弄得你不爽,但是“习惯习惯”就好了,而有的东西实在是搞不定:一代xbox的smb共享设置,在无尽的google文档里面搜寻,只看见大家说这个问题,没有实在的解决办法,共享的文档用mac的smb可以access,但是xbox就不行,总是要密码,要了还不work。其实我倒是发现google的一个特点,凡是在google第一页找不到答案的问题(当然可以尝试不同的query),基本上往后翻页也还是找不到答案。这个问题基本上只有两个解决办法:升级xbox到360,或者降级vista到xp。很显然,再次绝望之后,我选择了后者……

坏消息是微软在不遗余力的discontinue XP,然后不去解决vista的问题却企图用媒体搞个什么Mojave试验来愚弄大众,无语中……

Wednesday, July 23, 2008

debugging R

These two functions could be used in debugging the code. Avoid using browser in a big loop, see help file for more detailed information.
if(v0<=0) browser()
debug(func)

Saturday, June 28, 2008

WALL-E

























WALL-E, 又一个Pixar的经典之作。不得不承认Pixar的创意是层出不穷啊,最近N部片子基本上都是完全不同的风格,不像某些制作室只会一个劲地压榨续集知道同一风格做到不再赚钱为止。

当时看trailer的时候还只觉得一般,之前网上leak出来WALL-E被弹出主站的小飞船自爆那段也就觉得制作精良,看完全片之后才发现基本上没啥可以挑剔的:要主题有主题,要细节有细节,要煽情有煽情……唯一可惜的是没有加个啥post scenery短片,虽然出字幕的时候那些小节也还不错:)

Pixar和苹果的联系还是蛮大的,且不说剧中那个iPod“广告”,连WALL-E重启都是苹果开机的声音,以及最后acknowledgement里面第一个就是Steve Jobs。据说EVE的原型还是2005年设计大师Jonathan Ive一起合作设计的。

今年的动画片都还不错,Horton,功夫熊猫都上的了台面,Oscar有得一争了。最后来个trivia:WALL-E和EVE的全称是?

Tuesday, June 17, 2008

Firefox 3



Today is the firefox 3 downloading day, and the mozilla guys are trying to reach a "record"! Congrats to the firefox team, and they really made a good job in delivering the world's best browser.

I've changed my default browser from safari to FF3. A few notes:

  1. The mac theme plugin is updated, see GrApple Yummy from Aronnax.
  2. The general keyboard and mouse shortcut are here. Well, I need to change my safari habits now, until they release the "New Safari with Squirrels" in Snow Leopard... or maybe FF4 is coming out then.
  3. It is very easy to set up keyboard shortcuts to your favorite sites, which is actually better than the command+number shortcut in Safari, or this FF plugin. Even better, now the keyboard shortcut sets Cmd+Number to switch between tabs!
  4. If you want "in-browser" pdf viewing support, as in safari, check this plugin from google codes in FF3.
  5. It seems snappier and use less memory than safari!

Monday, June 2, 2008

Enable Wireless Time Machine

In leopard, the wireless time machine was disabled by default, except time capsule. Here is the command in terminal to enable it.

defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1

Monday, April 21, 2008

find process id

Example: find the process id of all runing firefox for zo2.
pgrep -u zo2 firefox
More details check the wiki page.

Friday, April 11, 2008

Safari Tips

1. Tab browsing, true one-window solution.
defaults write com.apple.Safari TargetedClicksCreateTabs -bool true

2. Restore last closed window/session.

Safari 3 Menu bar History -> Reopen last closed window.
Safari 3 Menu bar History -> Reopen all windows from last session.

3. Temporary files stored at

/var/tmp/folders.502/TemporaryItems/
Apple CMD + Shift + G, the directory.