Latex中文配置
星期一, 10月 20th, 2008- Linux
从源里面安装Texlive2007(apt就是好啊),之后下载YueWang zhfonts 。解压到$HOME下的.texmf-config 与 .texmf-var文件。
搞定。
- Windows
还是用CTEX套装吧,别瞎折腾了。
参考
http://forum.ubuntu.org.cn/viewtopic.php?f=35&t=84013
Powered by ScribeFire.
从源里面安装Texlive2007(apt就是好啊),之后下载YueWang zhfonts 。解压到$HOME下的.texmf-config 与 .texmf-var文件。
搞定。
还是用CTEX套装吧,别瞎折腾了。
参考
http://forum.ubuntu.org.cn/viewtopic.php?f=35&t=84013
Powered by ScribeFire.
实验需要对Flash Disk做无系统缓冲的I/O操作,顺便了解了一下Linux下的I/O.
Linux上的块设备的操作可以分为两类:
具体的I/O path如下
Application<->Library Buffer<->Operation System Cache<->File System/Volume Manager<->Device
library buffer是标准库提供的用户空间的buffer,可以通过setvbuf改变其大小。
I/O Path
Application<-> Operation System Cache <->File System/Volume Manager<->Device
此外,我们可以通过设置open的O_DIRECT标志来实现Direct I/O(或者叫Raw I/O),即绕过OS Cache,直接读取Device ( that’s what we want^o^ ), 等于将OS cache换成自己管理的cache。不过,Linus在邮件列表中建议不这么做,而是使用posix_fadvice, madvice。[2]中表明Direct I/O比buffered I/O的性能高很多。
在使用O_DIRECT的注意buffer的address必须是block alignment的(i.e. 初始地址必须是boundary), 可以用posix_memalign()函数分配内存以得到这样的buffer。至于为什么要这样,与实现的mmap有关,参见[5].
参考:
Powered by ScribeFire.
实验室用的是dhcp,寝室用的是静态ip地址,每次切换起来比较烦人,于是上网搜了一下写了个脚本。
寝室设置[静态ip地址]
netsh interface ip set address “本地连接” static IP 地址 子网 网关 跃点数(一般为1)
netsh interface ip set dns “本地连接” dns地址
实验室[动态IP地址]
netsh interface ip set address “本地连接” dhcp
netsh interface ip set address “本地连接” dhcp
参考:
等用了再说
git是一种分布式的版本控制软件。前段时间完成GSoC的时候用过一段时间,非常强悍!下面是一些资源以及一些常用的命令。
http://www.bitsun.com/documents/gittutorcn.htm
http://www.sourcemage.org/Git_Guide
http://linux.yyz.us/git-howto.html 最后,最重要的还有官方文档。
$ git clone http://xxx
$ git branch gsoc # new branch
$ git log #浏览历史
$ git show 12798172e98f1 #显示相应的版本
$ git-tag old 12798172e98f1 #为版本命名
$ git diff a..old a..gsoc #比较两个版本
回到上次的commit状态(撤除现有的所有修改) $ git reset –hard 回到某个commit状态 $ git revert $id
合并两个branch $ git merge $id
push一个branch [code]$ git push origin branch-name[/code]
删除一个branch [code]$ git push origin :branch-name[/code]
这样一个场景
repos in web
/ \
repos1 repos2
|
branch-my
现在要把原来在branch-my移到repos2下,可以通过patch来完成。
To Be Continued…