Search This Blog

Monday, June 26, 2006

grub啊

问题是解决了,不过总归是莫名其妙的,把kernel后面的那个root=/dev/xxx参数去掉竟然就可以了,什么概念?嗯?

Thursday, June 22, 2006

openoffice的中文

装了一直没怎么用,其实我自己根本就不会想到要用office之类的庞然大物来写什么文档,emacs一个纯文本足矣,毕业论文之前我肯定会把tex搞定嘛,所以……openoffice也只是在考前突击时看看那些垃圾课件了
言归正传,打开老杜同志的课件的时候发现大部分中文都无法显示,而我已经设置了simsun都字体的替换规则,没辙了,把文件传给mm,让她帮我看老杜用的到底是什么变态字体
华文琥珀?华文中宋倒是听说过- -可见老杜的趣味确实不是一般人的水准
然后试着把sthupo和stzhongsong都替换成AR PL New Sung,结果不行
又试着直接写中文,华──文──琥──珀,竟然可以了,这事情真是奇妙了
还有一个,打开文件的时候目录名文件名都显示不了中文,google一番,把Andale Sans UI这个字体替换成系统中已有的中文字体就可以了
ps一下:utf8下的cjk-latex真是罪恶啊- -

Wednesday, June 21, 2006

最新版本smart-operator

(defun smart-insert-operator (op &optional only-back)
"Automatically insert whitespaces before and after '=', '>=', etc.
Make it look nicer: ' = ', ' >= '.


OP is the operator. If optional ONLY-BACK is t, only insert one
whitespace at back. When confused, try C-q."
(interactive "s")
(delete-horizontal-space)
(let ((op-p nil) ; another op at front?
(one-char-back nil) ; have we stepped back one char?
(fir-sp t) ;space before op by default
(sec-sp t)) ;space after op by default
(unless (bolp) ;if the point not at the beginning of a line
(backward-char)
(setq one-char-back t))
(setq op-p
(catch 'return
(dolist (front smart-operator-alist)
(when (looking-at front)
(throw 'return t)))))
(when (and (or op-p (not (and (bolp) (eolp))))
one-char-back)
(forward-char))
(if (or (comint-within-quotes 0 (point)) (and (or (equal op "/") (equal op ">")) (looking-back "^\\#include.*")))
((lambda ()
(setq fir-sp nil)
(setq sec-sp nil)
()))
(if (or (and (equal op "< ") (looking-back "^\\#include.*")) (and (equal op "*") (looking-back "int\\|char\\|float\\|double\\|short\\|long\\|signed\\|unsigned\\|void")))
(setq sec-sp nil)
(if (or (and (equal op "=") op-p) (and (or (equal op "<") (equal op ">") (equal op "+") (equal op "-") (equal op "|") (equal op "&")) (looking-back op)))
(setq fir-sp nil)
())))
(if (or only-back (not fir-sp) (bolp))
(insert op)
(insert (concat " " op)))
(delete-horizontal-space)
(if sec-sp
(insert " "))))


这个版本针对C语言“优化”过了,比如#include之后尖括号老是加空格就比较烦了,还有以前如果先有=再有-就会当成一个运算符,实际上C里没有这么一个运算符,等等
应该还有什么没想到的,到时候再添加

6月22日:我就知道有什么东西忘记了,娃哈哈,这次这个版本对"->"特殊处理,两边都没空格
不过代码是真的越写越丑了:(
(defun smart-insert-operator (op &optional only-back)
"Automatically insert whitespaces before and after '=', '>=', etc.
Make it look nicer: ' = ', ' >= '.


OP is the operator. If optional ONLY-BACK is t, only insert one
whitespace at back. When confused, try C-q."
(interactive "s")
(delete-horizontal-space)
(let ((op-p nil) ; another op at front?
(one-char-back nil) ; have we stepped back one char?
(fir-sp t) ;space before op by default
(sec-sp t)) ;space after op by default
(unless (bolp) ;if the point not at the beginning of a line
(backward-char)
(setq one-char-back t))
(setq op-p
(catch 'return
(dolist (front smart-operator-alist)
(when (looking-at front)
(throw 'return t)))))
(when (and (or op-p (not (and (bolp) (eolp))))
one-char-back)
(forward-char))
(if (or (comint-within-quotes 0 (point)) (and (or (equal op "/") (equal op ">")) (looking-back "^\\#include.*")))
((lambda ()
(setq fir-sp nil)
(setq sec-sp nil)
()))
(if (or (and (equal op "< ") (looking-back "^\\#include.*")) (and (equal op "*") (looking-back "int\\|char\\|float\\|double\\|short\\|long\\|signed\\|unsigned\\|void")))
(setq sec-sp nil)
(if (or (and (equal op "=") op-p) (and (or (equal op "<") (equal op ">") (equal op "+") (equal op "-") (equal op "|") (equal op "&")) (looking-back op)))
(setq fir-sp nil)
(if (and (equal op ">") (looking-back "-"))
((lambda ()
(setq fir-sp nil)
(setq sec-sp nil)
(backward-char)
(delete-horizontal-space)
(forward-char)
()))))))
(if (or only-back (not fir-sp) (bolp))
(insert op)
(insert (concat " " op)))
(delete-horizontal-space)
(if sec-sp
(insert " "))))

被拒了

据说是因为我成绩不好
我的成绩确实是倒数的,那又怎么样?
不说也罢,诅咒这个教育制度
等着吧,我还会回来的

Tuesday, June 06, 2006

xcompmgr&mplayer

最近几天没看电影,昨天突然发现mplayer在全屏的时候会有一块黑色快速闪动(xcompmgr启动的情况下),可以用以下选项来解决
mplayer -vo x11 --zoom video_file
或者在.mplayer/config里加上
vo=x11
zoom=y
也是一样的效果

Friday, June 02, 2006

面试结束

有保密协议,我什么都不能说
对自己的发挥还算满意,就是太粗心了- -
下来就等结果吧