http://www.openfst.org/twiki/bin/view/FST/CompilingOnMacOSX
It turns out the default compiler gcc4.0 has a bug (or many bugs?) that makes compiling openfst on Leopard fail. The above link which is taken from openfst website solves the problem
Under mac os X, the vim has no syntax highlights and no history from the last vim session. This can be solved using the following steps:
1) make a file under home folder named .vimrc
2) syntax on; set history=1000
3)chmod 777 ~/.viminfo
There is no color highlight under mac os x terminal by default which I think it a bit annoying since there is no way of distinguishing folders and files. After some research on the internet, I found some solutions (credit: http://stackoverflow.com/questions/1550288/mac-os-x-terminal-colors ):
You can use the Linux based syntax in one of your startup scripts as well. eg. in your ~/.bash_profile
export TERM="xterm-color"
PS1='\[\033[1;32m\]\u\[\033[0m\]@\[\033[1;31m\]\h\[\033[0m\]:\[\033[1;34m\]\w\[\033[0m\]\$ '
This gives you a nice colored prompt. To add the colored ls output, you can add alias ls="ls -G" as well.
To test, just run a source ~/.bash_profile to update your current terminal.
Sidenote about the colors: The colors are defined by an escape sequence \033 and the color value, composed of [style;color+m] wrapped in an escaped [] sequence. eg.
\[\033[0;31m]\]\[\033[1;31m]\]\[\033[0m]\]I always add a slightly modified color-scheme in the root’s .bash_profile to make the username red, so I always see clearly if I’m logged in as root (handy to avoid mistakes if you have many terminal windows open)
in /root/.bash_profile
PS1='\[\033[0;31m\]\u\[\033[0m\]@\[\033[0;32m\]\h\[\033[0m\]:\[\033[0;34m\]\w\[\033[0m\]\$ '
For all my SSH accounts online I make sure to put the hostname in red, to be able to distinguish more easily if I’m in a local or remote terminal..
The SoC network is very unstable, it crashes a lot. What’s worse is that the Cent OS on my server CANNOT reconnect to the network even if the network is on. Therefore, I had to come down to the server room to MANUALLY re-activate the damn network interface. Because of the DHCP thing, the sge installed will be malfunctioning because it replies on /etc/hosts to work properly and after a network crash, the allocated IP address has been changed. Followings are the approaches to fix this:
Credit: http://www.breakthru.altervista.org/?p=27
Today I was writing a report and as usual I was searching the web
for quick solutions of common things like: how do I write the min over some
variables of some function in a LaTeX formula?
Search engines found for me many pages that were saying “there is explanation
for this on wikipedia” BUT.. that wiki page had changed!!!
It’s like linking a wrong page… interesting stuff.
Anyway this is the trick, taken from the history of the wiki (always great thing)
LaTeX has no built-in ”’\argmax”’ command. Some people get around this by using ”’\arg\max”’. This could be undesirable, because a subscripted variable will appear centered beneath the word “max”, instead of centered beneath the whole word.
An easy solution is to use: \underset{x}{\operatorname{argmax}}
Enjoy LaTeX!
Happy Hacking
Beamer is great tool for preparing serious ppt.
I am busy preparing the slides for my conference presentation these days. Finally finished the main content and want to add the University logo to the slides, however, the manual of beamer says that the \logo command can only put the logo on the bottom right corner of one slide which is not suitable for my slides, since most slides cover the right bottom corner. Therefore, I need to move the logo to the upper right corner.
After an afternoon’s trial and error and research, finally got it done:
“
Credit: http://zitseng.com/mac/mac-nus-part-1
1. Start System Preferences.
2. Click on Print & Fax.
3. Click the + sign.
4. If there is no Advanced button in the toolbar, you may have to add it there before continuing. Right-click the toolbar (or Control-Click), then drag and drop the Advanced button to the toolbar.
5. For Type, select Windows.
6. The URL is the complicated bit. Make sure you get this right. The URL has the following format: smb://: @nusstu/nts27.comp.nus.edu.sg/ where is your NUSNET account name
is your NUSNET account password
change nts27 to nts09 for staff users
is the queue name of the printer which you can find listed at SoC Printers and Print Queues.
7. For Name, enter anything you fancy to help you remember what print queue this is.
8. Same for Location, whatever you fancy.
9. For Print Using box, choose either the Generic PostScript Printer driver, or select the specific printer driver for the print queue. You can find the list of printer types at SoC Printers and Print Queues.
10. Click Add.
11. Usually fine to leave the option settings unchanged.
12. Click Continue.
Too busy these days, I have almost forgot I have a word press which I once thought I would update once a day.
Out of no reason, I opened it today and found there were many encouraging comments under one of my post, although I don’t know these bloggers, I am quite moved, never thought what I did would help so many people.
Yeah, I should continue writing this blog, just as the profile says “在这里留下青春和奋斗的痕迹,致我们终将逝去的青春。”
Stay tuned, thanks for you all!!