Archive for September, 2008

今天解雇了两名员工

每次开会我都非常诚恳的跟他们说,我希望看到他们的积极性,希望他们能理解我作为市场部老大的压力所在,但收效不是很明显,我承认当初让他们进来,就是看到他们个人能力都还不错,但是对于一个公司来说个人能力又有什么用处,公司要发展只看重最终结果如何,你的过程如何的华丽又有什么用处,所以今天我宣布了对他们的一个解雇通知,当然出乎我意料的是他们都很理解我,毕竟我只是对事不对人,大家私下还是朋友。

如何关闭wordpress2.6的revision功能

One of the irritating feature for me in WordPress 2.6 is the post revision. I am the only author of my blog and hence this feature is useless to me.

Just in case you are wondering how post revision works, whenever a post is edited, a new row will be created in wp_posts table. Hence if your posts or pages got edited 10 times, you will have 10 new rows in wp_posts table.

In no time your wp_posts table will be filled up and the post ID will be huge.

To turn off this feature, add this following code to wp-config.php:

1

define(‘WP_POST_REVISIONS’, false);

You can also delete all post revisions by running this query in phpMyAdmin:

DELETE a,b,c
FROM wp_posts a
LEFT JOIN wp_term_relationships b ON (a.ID = b.object_id)
LEFT JOIN wp_postmeta c ON (a.ID = c.post_id)
WHERE a.post_type=’revision’

Be sure to backup your database first before performing any queries in phpMyAdmin.

*UPDATE* Auto Saves does not create a revision of the post.

*UPDATE 2* Updated SQL query from Andrei Neculau as the previous query does not delete from wp_postmeta and wp_term_relationships tables.

一则笑话,仅供消遣

很佩服这个笑话的作者,极具讽刺,同时又与时俱进,看了感触良多。
一蚊子进城!饿极,见一小姐双乳高挺,遂一头扎入猛咬,发现嘴里全是硅胶,于是仰天长叹:唉!食品安全太成问题了,上哪能吃到放心奶啊..