如何让LaTeX找到中文字体

January 16th, 2006 | Posted in LaTeX   Add Comment

ubuntu下面teTeX和cjk-latex装完后LaTeX默认是没法编译中文,因为缺少字体,这里是我把字体搞定的方法,共享之 & Thanks to mylxiaoyi and wangyin.

Read the rest of this entry »

[设计模式]关于Singleton的回收

January 14th, 2006 | Posted in 读书笔记   Add Comment

Singleton在不考虑destroy、register、threading safe等的时候很简单,但考虑的时候就复杂了,记录一下今天看的资料以及自己的认识。

An introduction to LaTeX2e

January 13th, 2006 | Posted in LaTeX   Add Comment

Here’s an introduction to LaTeX2e, The Not So Short Introduction to LaTeX2e(lshort). I got this document on http://learn.tsinghua.edu.cn:8080/2001315450/tex_frame.html and the following text are from the introduction.

TEX is a computer program created by Donald E. Knuth. It is aimed at typesetting text and mathematical formulae.

TEX is pronounced “Tech,” with a “ch” as in the German word “Ach” or in the Scottish “Loch.” In an ASCII environment, TEX becomes TeX.

LATEX is a macro package that enables authors to typeset and print their work at the highest typographical quality, using a predefined, professional layout. LATEX was originally written by Leslie Lamport. It uses the TEX formatter as its typesetting engine. These days LATEX is maintained by Frank Mittelbach.

LATEX is pronounced “Lay-tech” or “Lah-tech.” If you refer to LATEX in an ASCII environment, you type LaTeX. LATEX 2ε is pronounced “Lay-tech two e” and typed LaTeX2e.

[设计模式]Singleton

January 7th, 2006 | Posted in 读书笔记   Add Comment

Singleton通过static关键字和protected的构造函数来确保实例的唯一性。用Static来修饰存储实例的指针,用Static来修饰访问实例的函数,用protected来修饰构造函数。

[设计模式]Factory Method和Prototype

January 7th, 2006 | Posted in 读书笔记   Add Comment

Factory Method偏重于讲解静态模式,说一下如何设计符合在编译期能适应多样化产品的工厂方法。Prototype讲的是在面对多样化的产品时,如何利用原型拷贝的概念利用现有对象。

[设计模式]Abstract Factory和Builder

January 7th, 2006 | Posted in 读书笔记   Add Comment

Builder和Abstract Factory的区别有下:Builder是在Director的引导下,一步一步的构建对象;而Abstract Factory则是一次性创建对象。对于Abstract Factory,客户直接操作Factory和Product,所以两者都要抽象出接口;而Builder模式下,Director只操作Builder实例,不直接操作Product,所以Product是什么样,什么接口对于Director压根不关心,自然也就不必抽象出接口咯(其实是因为Product的差异太大,不应该抽象出接口才产生了这个模式的,嘿嘿,为了说区别,偶就反一下啦~大家注意这儿是个错误哦^_^)

Ragular expressions.

January 5th, 2006 | Posted in GNU/Linux   Add Comment

Emacs Lisp Reference Manual里面34.2是关于正则表达式的
有兴趣可以去看看,地址如下
http://www.gnu.org/software/emacs/elisp-manual/html_mono/elisp.html#SEC565

The order of GCC’s options DOES matter under windows.

January 5th, 2006 | Posted in GNU/Linux   Add Comment
> under Windows the order of compiler and linker flags matters.
> So it is important to do give the LDFLAGS after the source files:
> $(GCC) $(CFLAGS) -o $(BIN) $(SRC) $(LDFLAGS)
> and not
> $(GCC) $(CFLAGS) $(LDFLAGS) -o $(BIN) $(SRC)
In the GCC manual section 3, it’s said that:
You can mix options and other arguments. For the most part, the
order you use doesn’t matter. Order does matter when you use several
options of the same kind; for example, if you specify -L more than once, the directories are searched in the order specified.
Nothing is mentioned that it DOSE matter under windows! So if u get the same problem such as “library not found” or “some functions not implemented” under window, try to check the order of your compiling options. Anyway, try to learn and use automake.