Saturday, December 29, 2007

wikipedia: Paradigm 与 methodology

Paradigm: 中文翻译好像是"典范","范例"。
其实好像也不是很准确,应该是style的意思才对。
如我们平时接触的OOP,AOP,functional programming就是一种paradigm.是一种特定的编程风格,反映了程序员思考问题,对于程序运行的一种观点。
在wikipedia列出的一长串例子中,我所见过的有:
  • OOP,
  • AOP
  • COP(Component-oriented Programming),类似微软的OLE(object linking & embedding)
  • Imperative Programming(相对于declarative programming)
  • Logic Programming(如Prolog)
  • Literate Programming(传说中的文化式编程)
  • Pipeline programming(典型的UNIX风格)
  • Recursive programming(相对于iterative programming)
  • Structured programming
  • reflective programming(反射式编程,如java)

而methodology中文翻译应该是"方法学"
是解决具体实际问题时所采用的一种套路,风格。
是前人的经验所积累,总结出来的。
就是软件工程中介绍的一些开发模型。如:
  • RUP(Rational Unified Process)
  • XP(Extreme Programming)
  • Waterfall model


Friday, December 28, 2007

Workshop的意思

老是收到科大一堆关于xxx workshop的邮件。按照以往打游戏的经验,workshop貌似是制造武器的工厂.......
今天终于忍不住上wikipedia查了一趟,发觉还有这个意思:
A workshop is also a gathering or training session which may be several days in length. It emphasizes problem-solving, hands-on training, and requires the involvement of the participants. Often Symposium, a lecture or a meeting can become a workshop when it is accompanied by a practical demonstration.

BTW: Symposium 是 座谈会 的意思。

Tuesday, December 25, 2007

校内网开通rss导入功能

此文经由邮件发到我的blog中。
貌似校内网的服务器也不能突破GFW的封锁,因此使用了MSN的feed来导入,
能正确导入。
但是其功能"自动检测有无新的文章并提示导入"尚未经测试成功。
如果可以的话,今后就可以所有的博文都聚合到我的blog里面了。
再做个链接:
blog: http://iveney.blogspot.com
space: http://xiaoiveney.space.live.com

Tuesday, December 18, 2007

用ethereal等抓包要注意的一个事项

今天抓包帧时发觉抓下来的包不符合以太网帧的要求:没有Preambel和FCS(这里是CRC校验)
上wikipedia查了查才发觉是这么回事:
Frames are the format of data packets on the wire. Note that a frame viewed on the actual physical hardware would show Start Bits, sometimes called the Preamble, and the trailing Frame Check Sequence. These are required by all physical hardware and is seen in all four following frame types. They are not displayed by packet sniffing software because these bits are removed by the Ethernet adapter before being passed on to the network protocol stack software.

我太菜了,orz

--
Best wishes,
Yours, iveney
Department, of Computer Science,
Zhongshan University (Sun Yat-sen University),
Guangzhou, China

Monday, December 17, 2007

一个IP多个域名:用Apache建立虚拟主机

以下在内网中测试通过……

修改apache的conf(/etc/httpd/conf/httpd.conf)

1.修改ServerName为域名,如果没有则为IP。
比如我机子的IP是172.18.33.144
则修改为:
ServerName 172.18.33.144

2.添加NameVirtualHost项
NameVirtualHost 172.18.33.144
如果只有一个IP,也可以把IP域置为"*"

3.添加VirtualHost
首先添加一个全局的VirtualHost(这个Host可以直接通过访问IP访问到)
NameVirtualHost 172.18.33.144
<VirtualHost 172.18.33.144>
        ServerAdmin iveney@mymail.com
        DocumentRoot "/var/www/html"
        ServerName 172.18.33.144
</VirtualHost>

接着添加多个VirtualHost
<VirtualHost 172.18.33.144>
        ServerAdmin iveney@mymail.com
        DocumentRoot /mnt/E/Page
        ServerName www.iveneyPage.com
</VirtualHost>

<VirtualHost 172.18.33.144 >
        ServerAdmin iveney@mymail.com
        DocumentRoot /mnt/E/Page/Distributed
        ServerName www.iveneyDistributed.com
</VirtualHost>


最后测试,在/etc/hosts中添加域名解析项
172.18.33.144 www.iveneyPage.com
172.18.33.144 www.iveneyDistributed.com


然后重启apache,输入以上两个网址,成功.