Monday, 10 May 2010

我们都是一个人加上另一个人的长相



苏打绿——《早点回家》

昨天母亲节,听了一天。。。sigh, 子曰,父母在,不远游,游必有方。

Saturday, 8 May 2010

如何用TeXnicCenter生成 IEEE camera-ready paper

主要来源于这篇文章: How to Produce IEEE Camera-Ready Papers With TeXnicCenter

问题其实主要在于IEEE camera-ready的paper 需要embed 所有的fonts, 所以其实是要设置在生成pdf的时候,让texniccenter embed所有的fonts, 更具体的说,就是 修改 gswin32c.exe 的参数。

首先是要在texniccenter里面 生成 Tex=>ps=>pdf的profile, 某些情况下texniccenter会自动生成,不过有时候需要自己去添加。如果已经有了的话,就可以略过某些步骤。

方法如下:
  • Enter TeXnicCenter output profiles screen by pressing ALT+F7. //用alt+F7打开output profiles screen, 也可以build->defined output profiles 进入

  • Click the ADD button. //添加profile

  • Enter profile name, e.g LaTeX => PS => PDF.

  • Select the new profile and check Run LaTeX in this profile. //添加latex的执行文件

  • Enter the path to latex.exe file, for example:
    C:\Program Files\MiKTeX 2.7\miktex\bin\latex.exe
    And enter command line arguments:
    --src -interaction=nonstopmode "%Wm"

  • In the Postproccesor tab, create new entry by clicking the INSERT key. Write down “dvips” as a name for the new entry. Then define the path to dvips.exe file, for example:
    C:\Program Files\MiKTeX 2.7\miktex\bin\dvips.exe
    And the arguments:
    -Ppdf -j0 "%Bm.dvi"  //添加生成dvi的执行文件

  • Still, at the Postproccesor tab, create another entry by clicking the INSERT key. Write down “ghostscript” as a name for the new entry. Then define the path to gswin32c.exe file, for example:
    C:\Program Files\gs\gs8.63\bin\gswin32c.exe
    And the arguments (as one long line):
    -sPAPERSIZE=a4 -dSAFER -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -dPDFSETTINGS=/printer -dMaxSubsetPct=100 -dSubsetFonts=true -dEmbedAllFonts=true -sOutputFile="%bm.pdf" -c save pop -f "%bm.ps" //添加生成ps.pdf的执行文件,重要的是这里面的参数:dEmbedAllFonts=true

  • Finally, switch to the Viewer tab, and enter the path to Adobe Reader executable. Common path is:
    C:\Program Files\Adobe\Reader 9.0\Reader\AcroRd32.exe
    Next, select DDE command in each section (3 times). Enter “acroview” in each Server text box (3 times), and “control” in each Topic text box. In the first two Command text boxes (View project’s output and Forward Search sections) fill in:
    [DocOpen("%bm.pdf")][DocOpen("%bm.pdf")][FileOpen("%bm.pdf")]
    And in the last Command text box (Close document before… section) fill in:
    [DocClose("%bm.pdf")] //这里可以让每次生成pdf的时候把会写入的pdf关掉(如果打开的话),还是很好用的
  • Thursday, 6 May 2010

    签证事项

    5.5 update: 杯具的是,土耳其签证是从发回的那天起开始算3个月的,于是从5月5号到8月3号,签证过期的时候我还没有去土耳其呢,艹,还得再跑一次呢,真是杯具了

    ----------------------------------

    需要带的东西:

    visa form

    copies of passport/student pass(resident card)

    flight itinerary

    hotel rervation

    invitation letter

    student letter/pass copy (From NUS)

    guarantee letter

    employment letter

    3 months latest bank

    Wednesday, 5 May 2010

    dramasomeday——汤韵,北大



    People laugh and people cry
    Some give up some always try
    Some say hi while some say bye
    Some will forget you but never will I

    Write down tears or write down smile
    Wanna a sun or a kiss beyond night
    Wave to all in noise or just a quiet
    It is time or the mind which can fly

    Congratulations to you, let us celebrate the graduation
    Drama will be present, let us send the invitations
    Someday the words can not say out all of the passion
    Someday your eyes can answer all the questions
    All the stars (have) fallen in to your eyes
    and there are where the moon was waken
    All the promises (have) fallen into my heart and never be taken
    Someday the words just can not say out all of the reasons
    Someday my face changes so do seasons
    Find out who you are and don't be afraid of it
    Drama someday let's try write down some memories of it
    Someday the story is over it's just over then
    Hold this breath listen to the song of it

    I laugh I cry and I realize
    Some will forget you but never will I

    People laugh and people cry
    Some give up some always try
    Some say hi while some say bye
    Some will forget you but never will I

    青春



    今天做189去学校,189的司机是个年轻人,很朝气很阳光,他对每一个上车下车的人都带着微笑的说,good morning, nice to meet you, have a nice day, thank you, 即使是开车的时候也带着一脸幸福的光芒,还和路上遇到的在人行道上蹒跚而行的老人打招呼。他用一种开心的态度去面对他的工作,面对这个世界,我想他周围的人,包括我,也会被他所感染吧。NUS的校车也有一位司机,会把他的车上贴满了许多蝴蝶贴纸,还有许多相片,也会和每一个上车下车的人说,morning, have a nice day, thank you, good bye; 有时候我会觉得189的司机是nus校车司机的儿子,呵呵。

    其实我想,不管是怎么样的事情,只要用心去做,就可以做得和别人的不一样,就可以多一份的回报和承认,就可以去感染周围的人。而积极而努力的生活态度,自身也可以过得更加的快乐,也可以得到他人和社会的肯定。 这个从唐骏,老罗,笑来的一些演讲,还有我父亲的经历 也都得到了不同的印证, 而我自己呢?

    青春是什么,梦想又是什么? 飞翔很好,可是每一步的改变也很重要, 当我对世界微笑的时候,世界也会给我一个拥抱吧。 其实在两位充满阳光的司机身上,我想到了海子的诗歌:

    从明天起,做一个幸福的人
    喂马、劈柴,周游世界
    从明天起,关心粮食和蔬菜
    我有一所房子,面朝大海,春暖花开
    从明天起,和每一个亲人通信
    告诉他们我的幸福
    那幸福的闪电告诉我的
    我将告诉每一个人
    给每一条河每一座山取一个温暖的名字
    陌生人,我也为你祝福
    愿你有一个灿烂的前程
    愿你有情人终成眷属
    愿你在尘世获得幸福
    我只愿面朝大海,春暖花开

    Sunday, 2 May 2010

    ubuntu10.04输入法及窗口按钮位置

    昨天安装了 ubuntu10.04, 整体的界面又有进步了,而且越来越省心了LOL

    不过对于它把窗口按钮“最大化”,“最小化" 放在左上角有些不爽,解决方法也很简单:

    首先打开 gconf-editor (alt-F2, 然后输入 gconf-editor) 就是类似注册表的一个东西

    然后找到 apps/metacity/general

    在button_layout里面,修改成: menu:maximize,minimize,close; 后面三个的位置可以根据喜欢调整LOL

    然后 那几个按钮就又回到了熟悉的右上角了:)

    ------------------------------------------------------

    输入法还是使用ibus,然后安装了sun-pinyin, 确实很赞,除了没有网络同步之外,其他都无可挑剔。

    http://code.google.com/p/sunpinyin/ 这是sun-pinyin的官网

    推荐使用呀

    Saturday, 1 May 2010

    matlab把matrix 写成文本文件——dlmwrite

    DLMWRITE Write ASCII delimited file.

    DLMWRITE('FILENAME',M) writes matrix M into FILENAME using ',' as the
    delimiter to separate matrix elements.

    DLMWRITE('FILENAME',M,'DLM') writes matrix M into FILENAME using the
    character DLM as the delimiter.

    DLMWRITE('FILENAME',M,'DLM',R,C) writes matrix M starting at
    offset row R, and offset column C in the file. R and C are zero-based,
    so that R=C=0 specifies the first value in the file.

    DLMWRITE('FILENAME',M,'ATTRIBUTE1','VALUE1','ATTRIBUTE2','VALUE2'...)
    An alternative calling syntax that uses attribute value pairs for
    specifying optional arguments to DLMWRITE. The order of the
    attribute-value pairs does not matter, as long as an appropriate value
    follows each attribute tag.

    DLMWRITE('FILENAME',M,'-append') appends the matrix to the file.
    without the flag, DLMWRITE overwrites any existing file.

    DLMWRITE('FILENAME',M,'-append','ATTRIBUTE1','VALUE1',...)
    Is the same as the previous syntax, but accepts attribute value pairs,
    as well as the '-append' flag. The flag can be placed in the argument
    list anywhere between attribute value pairs, but not between an
    attribute and its value.

    USER CONFIGURABLE OPTIONS

    ATTRIBUTE : a quoted string defining an Attribute tag. The following
    attribute tags are valid -
    'delimiter' => Delimiter string to be used in separating matrix
    elements.
    'newline' => 'pc' Use CR/LF as line terminator
    'unix' Use LF as line terminator
    'roffset' => Zero-based offset, in rows, from the top of the
    destination file to where the data it to be
    written.
    'coffset' => Zero-based offset, in columns, from the left side
    of the destination file to where the data is to be
    written.
    'precision' => Numeric precision to use in writing data to the
    file, as significant digits or a C-style format
    string, starting with '%', such as '%10.5f'. Note
    that this uses the operating system standard
    library to truncate the number.

    EXAMPLES:

    DLMWRITE('abc.dat',M,'delimiter',';','roffset',5,'coffset',6,...
    'precision',4) writes matrix M to row offset 5, column offset 6, in
    file abc.dat using ; as the delimiter between matrix elements. The
    numeric precision is of the data is set to 4 significant decimal
    digits.

    DLMWRITE('example.dat',M,'-append') appends matrix M to the end of
    the file example.dat. By default append mode is off, i.e. DLMWRITE
    overwrites the existing file.

    DLMWRITE('data.dat',M,'delimiter','\t','precision',6) writes M to file
    'data.dat' with elements delimited by the tab character, using a precision
    of 6 significant digits.

    DLMWRITE('file.txt',M,'delimiter','\t','precision','%.6f') writes M
    to file file.txt with elements delimited by the tab character, using a
    precision of 6 decimal places.

    DLMWRITE('example2.dat',M,'newline','pc') writes M to file
    example2.dat, using the conventional line terminator for the PC
    platform.