Around emacs, linux, etc.
Archive for January, 2006
如何让LaTeX找到中文字体
Jan 16th
ubuntu下面teTeX和cjk-latex装完后LaTeX默认是没法编译中文,因为缺少字体,这里是我把字体搞定的方法,共享之 & Thanks to mylxiaoyi and wangyin.
[设计模式]关于Singleton的回收
Jan 14th
Singleton在不考虑destroy、register、threading safe等的时候很简单,但考虑的时候就复杂了,记录一下今天看的资料以及自己的认识。
More >
An introduction to LaTeX2e
Jan 13th
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
Jan 7th
Singleton通过static关键字和protected的构造函数来确保实例的唯一性。用Static来修饰存储实例的指针,用Static来修饰访问实例的函数,用protected来修饰构造函数。
[设计模式]Factory Method和Prototype
Jan 7th
Factory Method偏重于讲解静态模式,说一下如何设计符合在编译期能适应多样化产品的工厂方法。Prototype讲的是在面对多样化的产品时,如何利用原型拷贝的概念利用现有对象。
[设计模式]Abstract Factory和Builder
Jan 7th
Builder和Abstract Factory的区别有下:Builder是在Director的引导下,一步一步的构建对象;而Abstract Factory则是一次性创建对象。对于Abstract Factory,客户直接操作Factory和Product,所以两者都要抽象出接口;而Builder模式下,Director只操作Builder实例,不直接操作Product,所以Product是什么样,什么接口对于Director压根不关心,自然也就不必抽象出接口咯(其实是因为Product的差异太大,不应该抽象出接口才产生了这个模式的,嘿嘿,为了说区别,偶就反一下啦~大家注意这儿是个错误哦^_^)
Ragular expressions.
Jan 5th
The order of GCC’s options DOES matter under windows.
Jan 5th
> 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)
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.
Recent Comments