tag:blogger.com,1999:blog-206212012024-03-08T04:03:54.319+08:00時間恐慌I shall survive the panic of time.Unknownnoreply@blogger.comBlogger8125tag:blogger.com,1999:blog-20621201.post-27738884033373293412024-02-27T16:11:00.003+08:002024-02-27T16:11:41.481+08:00Remake 2024新年新希望啊,有什麼想重啟的,就是現在吧。Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-20621201.post-92054026292862989132011-05-01T15:43:00.002+08:002011-05-01T15:44:07.039+08:00Unity configuration<a href="http://askubuntu.com/questions/29553/how-can-i-configure-unity">http://askubuntu.com/questions/29553/how-can-i-configure-unity</a><div><br /></div><div>搞不懂,為何要藏的如此隱密。</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-20621201.post-66841313453736385822011-04-30T19:09:00.003+08:002011-04-30T19:13:19.438+08:00USB support in Virtualbox 4, Linux Host<span><span>首先在官網裝VirtualBox 4.0.6 Oracle VM VirtualBox Extension Pack,之後把自己的使用者帳號加入vboxuser群組當中。</span></span>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-20621201.post-45120505779272016132011-02-05T01:39:00.022+08:002011-02-08T01:52:21.284+08:00Thinkpad X61 + Intel X25-M G2 160GB MLC SSD + Ubuntu 10.10 (Maverick Meerkat) 64bit<div>這個時間點買Intel SSD很尷尬,裝10.10也很尷尬。但是我不能等了,現在用的Seagate硬碟三天兩頭就有錯誤訊息,隨時會爆炸。而Ubuntu要kernel 2.6.33以後才支援SSD的Trim機制。故先跑再說。<br /><div><br /></div><ul><li>掙扎了許久,決定使用ext4,但是保留journal以免斷電造成資料流失。</li><li>SSD installation checklist <a href="https://wiki.ubuntu.com/MagicFab/SSDchecklist">https://wiki.ubuntu.com/MagicFab/SSDchecklist</a> 在mke2fs時不加 -O ^has_journal選項,/etc/fstab則使用data=ordered,特別注意discard才能讓Trim發揮作用。</li><li>把暫存檔都丟到ramdisk去以減少SSD寫入:/etc/fstab加入,後三行的作用在讓那三個目錄併到/tmp下</li></ul><div><blockquote></blockquote><blockquote></blockquote><span class="Apple-style-span" style="color: rgb(34, 34, 34); font-family: 'Lucida Grande', 'Lucida Sans Unicode', Verdana, sans-serif; font-size: 12px; font-style: italic; line-height: 22px; "><span><span></span></span></span></div><span><span></span></span><blockquote><span><span>tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0<br />none /var/tmp aufs noatime,br:/tmp=rw:/var/tmp=ro 0 0<br />none /var/log aufs noatime,br:/tmp=rw:/var/log=ro 0 0<br />none /var/cache aufs noatime,br:/tmp=rw:/var/cache=ro 0 0</span></span></blockquote><ul><li>把~/.cache砍掉,新增/tmp/.cache,symbolic link到~/.cache。寫個script每次開機都新增/tmp/.cache這個目錄。主要是為了把Google Chrome的cache移動到ramdisk才做的。</li><li>Lazyscripts 要在沒有把/tmp丟到ram的時候才能跑</li><li>灌dropbox以增進資料備份安全。</li><li>不知為何,麥克風不能用的問題灌了PalseAudio Manager就解決了。x61的line in跟內建麥克風分別編號是1和2。</li></ul><div><span class="Apple-style-span" style="color: rgb(255, 0, 0); "><b>現在從進入grub開始到出現登入畫面不到三秒鐘,爽。</b></span></div><div><span class="Apple-style-span" style="color: rgb(255, 0, 0); "><b>可以躺在床上用筆電,爽。</b></span></div><div><span class="Apple-style-span"><b><span class="Apple-style-span"><span class="Apple-style-span"></span><span><span>把筆電當成ipad一樣可以亂搖也沒關係,爽。</span></span></span></b><span class="Apple-style-span"><b></b></span></span></div><div><span class="Apple-style-span" style="color: rgb(255, 0, 0); "><b><br /></b></span></div><div>方便我自己的手腳:</div><ul><li>小紅點(trackpoint)有兩個工具可以用,gpointing-device-setting跟configure-trackpoint,前者調中鍵捲動,後者調感壓參數,自己抓tarball回來時要先裝libgnomeui-dev。<br /></li><li>texlive + Latex CJK</li><li>mendeley</li><li>calibre</li><li>System->Administration->Language Support->Install/Remove Language 加入中文和日文</li><li>System->Preferences->Keyboard Input Methods->Input Method 加入中文和日文輸入法。要修改輸入法選項則要把language panel打開才能改 (爛設計!)</li><li>PCMan X (MLS) 0.3.9 支援日文顯示輸入 <a href="http://mstar.pixnet.net/blog/post/25126984">http://mstar.pixnet.net/blog/post/25126984</a> LiHei Pro這個字型可以完美顯示。</li></ul><div><span class="Apple-style-span"><b><br /></b></span></div><div><br /></div><div>待辦:</div></div><div><ul><li>kile牽扯到KDE有點太肥,把gedit藉由plugin修改成適合latex以及coding的編輯器。</li><li><strike>Mathematica</strike></li><li><strike>19吋4:3螢幕只能抓到1024x768,寫個自動用Xrandr切換的script衝上x1280x960。</strike>解決 <a href="http://www.ubuntugeek.com/how-change-display-resolution-settings-using-xrandr.html">http://www.ubuntugeek.com/how-change-display-resolution-settings-using-xrandr.html</a></li></ul><div><div></div><blockquote><div>#! /bin/sh</div><div>xrandr --newmode "1280x1024_60.00" 109.00 1280 1368 1496 1712 1024 1027 1034 1063 -hsync +vsync</div><div>xrandr --addmode VGA1 1280x1024_60.00</div><div>xrandr --output VGA1 --mode 1280x1024_60.00</div><div>xrandr --output LVDS1 --left-of VGA1</div></blockquote></div><div><div></div></div><blockquote><div><div>#! /bin/sh</div><div>xrandr --output VGA1 --off</div></div></blockquote><ul><li><strike>Samsung SyncMaster LD220,已經可以用displaylink了,但是不知如何設定延伸桌面。</strike>放棄,這種無法善用usb隨插即用功能,反而常常需要重開機。改用d-sub。</li><li>新酷音切換掉時不會自動把buffer送出,要按enter,有時只輸入一個字按enter也送不出,<strike>可以抓tarball回來編</strike>。不用,用作者的ppa (此步驟增加Synaptic Package Manager的Repositories)</li></ul><div><blockquote>sudo add-apt-repository ppa:ossug-hychen/ibus</blockquote></div><div>然後把Synaptic Package Manager多出來的ibus-chewing (1.3.7.20100910-1hychen1)升級。</div><ul><li>看能不能用ultrabase 硬碟 + clonezilla達到最少按鍵備份的效果。</li><li><br /></li></ul></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-20621201.post-74682815968872513042009-11-18T09:57:00.003+08:002009-11-18T14:43:01.275+08:00REVTeX 4.1REVTeX出<a href="http://authors.aps.org/revtex4/">新版</a>了,這次完全解決了<a href="http://timpani.blogspot.com/2009/06/collapse-multiple-citations-into-one.html">multiple citation</a>的問題,不用再自己手動加package了。似乎還有些bug,不過沒影響到我。比較讓人困擾的是preprint和reprint格式有點分不清楚,然後就是如果沒用reprint,在onecolumn的格式下會強制有前置頁,和4.0的時候不同。<br /><br /><span style="font-weight: bold;">Updated:</span> 解決,加個notitlepage參數即可。這故事告訴我們<a href="http://authors.aps.org/revtex4/summary4-1.pdf">specification</a>還是要仔細閱讀一遍。Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-20621201.post-70787932120790134582009-06-25T22:39:00.003+08:002009-06-25T22:56:28.532+08:00Collapse multiple citations into one for BibTeX - mcite & mciteplus在Latex可以使用BibTeX語法引用文獻,然而在物理期刊常常將引用合一,也就是本來三個引用<br /><blockquote></blockquote><blockquote>[1] Sheldon Glashow. Partial symmetries of weak interactions. Nucl. Phys.,<br />22:579, 1961.<br />[2] Abdus Salam. Weak and electromagnetic interactions. In W. Svartholm,<br />editor, Elementary Particle Theory, page 367, Stockholm, 1968. Almquist<br />and Wiksell.<br />[3] Steven Weinberg. A model of leptons. Phys. Rev. Lett., 19:1264, 1967.</blockquote>合併為<br /><blockquote>[1] Sheldon Glashow, Nucl. Phys. 22 (1961) 579; Abdus Salam, in: W. Svartholm<br />(ed.), Elementary Particle Theory, p. 367, Stockholm, 1968; Steven Wein-<br />berg, Phys. Rev. Lett. 19 (1967) 1264.<br /></blockquote>這是一種節省空間的寫法,可見物理學者多麼惜字如金啊!研究了快一個月都搞不定要怎麼作,只能用手動改.blg的方法來處理,但是每編譯一次就要重弄一次,這實在是太不科學了!不過還好有<a href="http://www.ctan.org/tex-archive/help/Catalogue/entries/mcite.html">mcite</a>這個package,而且還是MikTeX內建的。<br /><br />mcite會overload \cite的定義,所以從此\cite就等於\mcite了,只要把想被合併的引用bibtexkey加上星號即可<br /><blockquote>\cite{Glashow,*Salam,*Weinberg}</blockquote>不過這裡很不幸的,我最常用的revtex4環境以及apsrev.bst並不支援mcite。好在有另外一位寫出<a href="http://www.tex.ac.uk/cgi-bin/texfaq2html?label=mcite">mciteplus</a>,搭配他的apsrevM.bst即可翹著二郎腿管理bibliography了。<br /><br /><blockquote></blockquote>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-20621201.post-53351370983392653782008-11-01T17:58:00.002+08:002008-11-01T18:25:05.803+08:00Restart<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4Nv_MOedAaAH35xx1-jpnGicHsfY9PRcxhGGUVcYtHtRqEnfeZynD6rNXOBW4mqQc5yCGkejPJKXFyfmjn-gaX_VNL6pGolrS6IWmZEYUKaCC5S-_H7I5RxdaaI-FC4q-q3g5/s1600-h/back.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 173px; height: 179px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4Nv_MOedAaAH35xx1-jpnGicHsfY9PRcxhGGUVcYtHtRqEnfeZynD6rNXOBW4mqQc5yCGkejPJKXFyfmjn-gaX_VNL6pGolrS6IWmZEYUKaCC5S-_H7I5RxdaaI-FC4q-q3g5/s320/back.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5263633126618630626" /></a><br />我是個很任性的人。Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-20621201.post-40409872154978709932008-01-04T20:49:00.000+08:002008-01-04T20:51:06.121+08:00Happy New Year!新年快樂!Unknownnoreply@blogger.com1