PHP :: Savant

Posted on 31st January 2005 by Nio in 程序人生

Savant 是使用 PHP 语言编写的轻量级面向对象模板系统,目前已经发布了 2.3.3 版本。

Smarty 模板系统不同,Savant 默认并不对模板进行编译,而是使用 PHP 作为其模板语言,所以你不必去学习新的模板标签即可使用 Savant。

Savant 拥有面向对象系统的模板插件 (template plugins) 输出过滤 (output filters),你可以很快捷方便地往其中添加行为动作。

Savant 还有一套可扩展的错误处理系统。由于使用最小化的外挂错误类,他支持 PEAR_Error、 PEAR_ErrorStack 以及 PHP5 异常。你还可以加入自己的错误处理类来支持喜欢的错误框架系统。Savant 在其标准类中提供了错误处理程序的挂接点。

另外,你还可以自定义模板标签解析器,并将其挂接到 Savant 中。这意味着你可以根据自己的喜好去创建标签,只要你的解析器可以将其转换成 PHP 脚本,Savant 也就可以使用此标签。和错误处理一样,Savant 也提供了模板标签解析器的挂接点,可以很方便地挂接自己编写的解析器。

(more…)

BinzyWu 家的 Sisi

Posted on 29th January 2005 by Nio in 日常生活

BinzyWu 家最近新添了宝贝 Sisi,很可爱 :D

image

» Sisi 的更多照片。

梦与往事

Posted on 27th January 2005 by Nio in 日常生活

越接近放假,发现越加疲惫,开会、年终总结、源代码备份、明年的工作计划等等。人在劳累的时候容易做梦,那种醒来还能记得很清楚的梦,可能是由于睡眠质量不好吧。我昨晚就做了一个很古怪的梦,应该说是很多很古怪的梦,在梦里,看到很多熟悉的面孔,历经很多往事,发现自己有些精神分裂。我在梦中通常是知道自己在做梦的,所以即使做恶梦也不怕,而这次的梦却是梦中有梦,精神分裂使得我忘了自己在做梦,一次又一次地经历着类似的事情,我在努力着,而熟悉的人们却都对我无动于衷,他们好像都不理解我,无视我的存在。我发现自己正在失去他们,失去我的回忆,我在痛苦地寻找他们,找回自己。

早晨醒来的时候,突然觉得这个梦有些像某个片子,像《The Butterfly Effect》,蝴蝶效应:也许人的一生就会被当年一点点不经意间细枝末节改变,从此走上不同岔口不能回头……拓扑学中说这叫蝴蝶效应,你相信吗?
这个片子有很多超自然的东西,但让人很舒服,不由地怀念自己的过去,那一丝丝的快乐和忧伤。我们由于一些细枝末节走上了不同的路,如今已经不能再回头,那些曾经的往事,都将如烟,有些甚至连笑谈的机会都没有。回忆,真是一种很美好的东西。

另,《The Butterfly Effect》的片尾曲《Stop Crying Your Heart Out》也很好听,出自 Oasis,我喜欢的乐队 :)

NO NOFOLLOW - FIGHT SPAM, NOT BLOGS

Posted on 24th January 2005 by Nio in BLOG

前一段时间贴了一个“Google nofollow”,但并不是所有人都赞同使用 [i]nofollow[/i] 的,NoNofollow 就是反对者之一,其提出了反对使用 [i]nofollow[/i] 的一些主要理由,仔细考量也不无道理:12 Reasons against nofollow

1. nofollow does not prevent comment spam
2. nofollow is semantically incorrect
3. nofollow harms the connections between web sites
4. nofollow is not useful for humans, just for search engines using PageRank or similar a technique
5. nofollow could be used to shut web sites out
6. nofollow discriminates legitimate users as spammers
7. nofollow heists commentators' earned attention
8. nofollow will not stop comment spam
9. nofollow could be used to further discriminate weblogs
10. nofollow prevents the Web from being a web
11. nofollow eliminates the dissemination of free speech
12. nofollow was developed in privacy with only search engines companies taking part in the discussion 有得必有失,至于怎样为好,还应权衡利弊而为之。

(more…)

PostgreSQL 8 Officially Released

Posted on 22nd January 2005 by Nio in 程序人生

PostgreSQL 8 Officially Released!

What's New in 8.0
Win32 Native Server

This is the first PostgreSQL release to natively run on Microsoft Windows as a server. It can run as a Windows service. This release supports NT-based Windows releases like Win2000, XP, Win2003. Older releases like Windows 95, 98, and ME are not supported because these operating systems do not have the infrastructure to support PostgreSQL. A separate installer project has been created to ease installation on Windows: [url]http://pgfoundry.org/projects/pginstaller[/url].

Although tested throughout our release cycle, the Windows port does not have the benefit of years of use in production environments that PostgreSQL has on Unix platforms and therefore should be treated with the same level of caution as you would a new product.

Previous releases required the Unix emulation toolkit Cygwin for Win32 server support. PostgreSQL has always supported clients on Win32.

Savepoints

Savepoints allow specific parts of a transaction to be aborted without affecting the remainder of the transaction. Prior releases had no such capability; there was no way to recover from a statement failure within a transaction except by aborting the whole transaction. This feature is valuable for application writers who require error recovery within a complex transaction.

Point-In-Time Recovery

Though PostgreSQL is very reliable, in previous releases there was no way to recover from disk drive failure except to restore from a previous backup or use a standby replication server. Point-in-time recovery allows continuous backup of the server. You can recover either to the point of failure or to some transaction in the past.

Tablespaces

Tablespaces allow administrators to select the file systems used for storage of tables, indexes, and entire databases. This improves performance and control over disk space usage. Prior releases used initlocation and manual symlink management for such tasks.

Improved Buffer Management, CHECKPOINT, VACUUM

This release has a more intelligent buffer replacement strategy, which will make better use of available shared buffers and improve performance. The performance impact of vacuum and checkpoints is also lessened.

Change Column Types

A column's data type can now be changed with ALTER TABLE.

New Perl Server-Side Language

A new version of the plperl server-side language now supports a persistent shared storage area, triggers, returning records and arrays of records, and SPI calls to access the database.

Comma-separated-value (CSV) support in COPY

COPY can now read and write comma-separated-value files. It has the flexibility to interpret non-standard quoting and separation characters too.

Windows 方面的突破是非常重要的,这更有利于 PostgreSQL 的推广。