Archives for : 今天

第180天:杭州地铁施工塌陷

星期日 阴 9~11℃

杭州地铁施工塌陷

上午开手机时看到这条新闻。随后开电脑上网 google 一下“杭州地铁施工塌陷”了解更多信息。

多年以前听说杭州这个地理位置不适合造地铁。不知道将来建好了,有没有胆去乘坐。

下午出去逛街时,经过武林广场。广场的半边已经被地铁施工围起来。不久前看到杭州新闻,说因为建设地铁的原因,武林广场将要废弃,随后不断有市民去拍照留念。今天经过时,听到四个年轻人在那里大声谈论,有一句听得很清晰:“在错的地方做了错的事……”不知道是不是在谈论地铁与武林广场的话题。另外,看见有市民在半边尚好的广场继续拍照留念。

为了将来,总要作出点牺牲的。就好像没有革命先烈的牺牲,就难有我们今天的生活一样。只看这牺牲是否值得了。

等吧,但愿是值得的。

星期六 多云 12~19℃

友吧今年走出口碑推广第一步

昨晚在来路中看到不少 IP 来自这个链接:
http://www.im286.com/thread-3037745-1-1.html

发现一个用DEDE做的牛站
http://www.friends8.com/
非AD

其中 12 楼的回帖:

厉害。不过不知道前途怎么样

这个问题大概只有耐心地等待几年才会有答案了。

今年我们走出了口碑推广的第一步,先是入选 DEDE 经典网站,随后渐渐吸引业内人士的目光。我想,等我们将 DEDE 和 UCH 结合起来后,又将会是一道别具一格的风景。


2008-11-15羽球日志(6)

晚上从 6:00 打到 9:30,到后面小腿有点抽筋了。鞋子也不太好,是那种平底休闲鞋,会把脚弄得特别酸痛。明年春暖了准备去买一双专业羽毛球鞋,再换一块好点的拍子。

星期五 多云 12~21℃

举报者与被举报者

昨天早上买包子时就听到路边一家常去买菜的店老板在骂,今天又听见在骂。问包子店的老板,说是在骂对面的房东,那房东举报菜店老板卖肉没办证。

今天听到骂得最狠的一句是:“天天一起来就骂死你,不得好死的东西。”倒也没听见那房东回骂,不知道是不是还睡在床上。

办了证的不一定就是好东西,没办证的不一定就是坏东西。通俗的说,许多的证件,不过就是相当于你缴过费后的一张收据,只有表面意义,毫无内在意义,就如同“国家免检”一样,改变不了行业的潜规则。但是有一个事实活生生:举报是有奖励的,被举报是要遭罚款的。

包子店的老板说:“这房东该骂。”

旁人见之尚且如此,可见百姓对举报者是何等的恨之入骨。直白的说,对一些政策是何等的恨之入骨。


Blog 使用 google 自定义搜索

上周日写了一篇《Z-Blog站内搜索问题与应对》,今天弄了个 google 自定义搜索。这个事情列在计划中大约将近两个月了,今天总算终结了它。此前一直徘徊于是使用 zblog 自带搜索还是 google 自定义搜索之间,一拖就是这么久。


The Fawn and His Mother
from http://classics.mit.edu/Aesop/fab.1.1.html#204

A young fawn once said to his Mother, "You are larger than a dog, and swifter, and more used to running, and you have your horns as a defense; why, then, O Mother! do the hounds frighten you so?"

She smiled, and said: "I know full well, my son, that all you say is true. I have the advantages you mention, but when I hear even the bark of a single dog I feel ready to faint, and fly away as fast as I can."

No arguments will give courage to the coward.

真的弱者,不在于体型如何;真的猛士,亦不在于体型如何。

星期四 晴 11~17℃

用于 IE6 下 png 图片透明的 js

网上流传了几种方法,以下是其中一种,使直接插入到页面中的所有 png 图片在 IE6 下透明有效,但是对 png 背景图无效。(2009-1-15 更新:用于IE6下png背景透明的js

<script language="JavaScript">
function correctPNG() // correctly handle PNG transparency in Win IE 5.5 & 6.
{
    var arVersion = navigator.appVersion.split("MSIE")
    var version = parseFloat(arVersion[1])
    if ((version < 7.0) && (document.body.filters))
    {
       for(var j=0; j<document.images.length; j++)
       {
          var img = document.images[j]
          var imgName = img.src.toUpperCase()
          if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
          {
             var imgID = (img.id) ? "id=’" + img.id + "’ " : ""
             var imgClass = (img.className) ? "class=’" + img.className + "’ " : ""
             var imgTitle = (img.title) ? "title=’" + img.title + "’ " : "title=’" + img.alt + "’ "
             var imgStyle = "display:inline-block;" + img.style.cssText
             if (img.align == "left") imgStyle = "float:left;" + imgStyle
             if (img.align == "right") imgStyle = "float:right;" + imgStyle
             if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle
             var strNewHTML = "<span " + imgID + imgClass + imgTitle
             + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
             + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
             + "(src=\’" + img.src + "\’, sizingMethod=’image’);\"></span>"
             img.outerHTML = strNewHTML
             j = j-1
          }
       }
    }    
}
window.attachEvent("onload", correctPNG);
</script>

2011-04-28 更新:

  1. 原来的代码,sizingMethod=’scale’,经测试在 ie6 下会产生字体模糊,改为 sizingMethod=’image’
  2. 原来的条件为 version >= 5.5,现在改为 version < 7.0
  3. 如果只是个别图片需要用到透明,那么可以直接把这段代码加最后一张透明图片下方,并把 window.attachEvent("onload", correctPNG) 改为 correctPNG(); 这样在 ie6 页面加载过程不会看到图片的透明部份是灰底。

UCenter Home 1.5正式版即将发布

昨晚在论坛上看到公告,官方网站在 5 天前已经开始使用 UCenter Home 1.5正式版,离正式发布提供下载的日子想必不远了。

我们也一直在等正式版,以免因为不能等这两三个月的时间而使将来后悔。大概等正式版出来,我们的 Home 首页也设计得差不多了,正好可以直接套进去上线测试。

附:

UCenter Home 1.5 RC2 提供下载:2008-9-10
UCenter Home 1.2 正式版提供下载:2008-5-22
UCenter Home 1.0 正式版提供下载:2008-4-21


The Farmer and the Snake
from http://classics.mit.edu/Aesop/fab.1.1.html#183

One winter a Farmer found a Snake stiff and frozen with cold. He had compassion on it, and taking it up, placed it in his bosom. The Snake was quickly revived by the warmth, and resuming its natural instincts, bit its benefactor, inflicting on him a mortal wound. "Oh," cried the Farmer with his last breath, "I am rightly served for pitying a scoundrel."

The greatest kindness will not bind the ungrateful.

农夫与蛇的故事:对恶人不要有仁慈之心。

星期三 多云 10~18℃

关于友吧首页滚动显示的“感谢分享”要不要显示友吧内部成员的投票

小明:把机会给网友吧,不然里面老是显示我们几个。

Ryan:两者无论怎么处理我都没意见,那就更倾向于为用户考虑吧。

财富猪:这本来是我们的义务,不用感谢的,我们是网站工作人员。

flx 13:28:08
要,为什么不要呢,谁发也要感谢一下嘛,呵呵

朱高 13:29:17
哈哈。。。你果然是站在编辑的角度来看了,和我一样,但是我觉得这样不好,因为我们要站在我们一个团队的角度来看,所以我才发起了这个投票,让大家一起来发表意见。就是说,我们站在编辑的角度,会希望感谢每一位投递者,但是站在团队角度的话,就要把团队成员都当成我们自己了。

flx 13:31:02
嗯,也对,那以后我们自己人就不写感谢了。

投票结果:一致通过内部成员投递文章“不用感谢”。


The Farmer and the Stork
from http://classics.mit.edu/Aesop/fab.1.1.html#183

A Farmer placed nets on his newly-sown plowlands and caught a number of Cranes, which came to pick up his seed. With them he trapped a Stork that had fractured his leg in the net and was earnestly beseeching the Farmer to spare his life.

"Pray save me, Master," he said, "and let me go free this once. My broken limb should excite your pity. Besides, I am no Crane, I am a Stork, a bird of excellent character; and see how I love and slave for my father and mother. Look too, at my feathers– they are not the least like those of a Crane."

The Farmer laughed aloud and said, "It may be all as you say, I only know this: I have taken you with these robbers, the Cranes, and you must die in their company."

Birds of a feather flock together.

撒网只为了捕小偷,而不管小偷的皮肤是黑还是白。物以类聚。

星期二 晴 7~17℃

指挥与效率 ( 思考 )

优秀的管理者会让他的下属 3 个小时变成 1 天的时间,笨拙的管理者会让他的下属 1 天的时间变成 3 个小时。

不是不否认修改,而是否认因缺乏良好规划而造成的无谓劳动。用句白话说,就是瞎指挥。

但是很有意思,总有相当数量的管理者喜欢看着下面的人天天加班,1 天当 3 小时使用。他心里高兴,因为这样就可以让全公司的人都看见,尤其是让老板看见,他带领的团队是何等卖力。不知道是不是过快的完成一件事情,就要担心会引来怀疑的目光。国人办事效率低下,尤其是一些行政机关,大约和这一民族心理是大有关联的。一种很不良的风气很可能就会在这样的环境下孕育而生:上司看见的时候做事,上司看不见的时候不做事。

谨此告诫自己:让专业的人去做专业的事,而不是因为自己是领导就一定要过一过指挥的瘾。这其实是考验管理者是否知人善用,先是要知人,然后才是善用


友吧新增“频道”及“文荐”订阅

Ryan 今日扩展,新增订阅地址:
文荐、博友、读吧、玩吧

订阅列表:http://www.friends8.com/f8team/200806/831.shtml


The Pomegranate, Apple-Tree, and Bramble
from http://classics.mit.edu/Aesop/fab.1.1.html#177

The Pomegranate and Apple-Tree disputed as to which was the most beautiful. When their strife was at its height, a Bramble from the neighboring hedge lifted up its voice, and said in a boastful tone: "Pray, my dear friends, in my presence at least cease from such vain disputings."

隔壁有高人,说话请小声。

星期一 多云 7~16℃

DIV 中 li“垂直顶对齐”“垂直居中对齐”“左右两列对齐”

下午用这个方法实现了这三种对齐方式。设置图片为 position:absolute,并设置 li 和图片的 margin。根据实际情况更改 margin,关键的是设置图片为 position:absolute.

垂直顶对齐:

<li style="margin-bottom:40px">头像:<img src="" width="50" height="50" style="position:absolute" /></li>

垂直居中对齐:

<li style="margin:20px 0 40px 0">头像:<img src="" width="50" height="50" style="position:absolute; margin-top:-15px" /></li>

可将图片换成其他对象,例如 textarea 等。如果对象换为 <span>,则可实现左右两列对齐,如:

<li>备注:<span style="position:absolute">dsdf<br />dss<br />dsf</span></li>


肚子平下去的感觉真好

一个多月来坚持每周打羽毛球两个小时,近日发现隆起的肚子明显平下去许多,几乎就和胸部平齐了,还能摸出些许腹肌来,吃饱饭后不再撑着难受;尽管这几天降温较大,但感觉也不再像从前一样怕冷。

感觉真好。


菜根谭(4):平怒息欲

【原文】
当怒火欲水正腾沸处,明明知得,又明明犯着。知时是谁,犯的又是谁?此处能猛然转念,邪魔便为真君矣。

【译文】
当怒火上升欲念翻滚时,虽然他自己也明知这是不对的,可是他双眼睁睁犯着不加控制,知道这种道理的是谁呢?犯的又是谁呢?假如当此紧要关头能够突然改变观念,那么邪魔恶鬼也就会变成慈祥命运的主宰了。

昨晚临睡前原本心有怨气难以入睡,随手翻看,正巧看到这篇,就如同脚气发作时涂了达克宁,可以安睡矣。《菜根谭》真乃世间解忧去病之良药。

血气方刚之年,纵难做到平众怒息众欲,也应做到平一些怒息一些欲。


胃不好的朋友,雪菜酸菜万不可多吃

昨晚吃饭有一道“小笋肉丝酸菜”,酸菜特别多,结果当晚睡到临近天亮时忽感胃空而醒,似有溃疡复发迹象。今天白天亦有胃空感。下班时买了胃康灵,以防不测。


撤下侧栏的 Google AdSense

撤下了 blog 侧栏的 Google AdSense,尺寸:
google_ad_width = 468;
google_ad_height = 60;


The Hare and the Tortoise
from http://classics.mit.edu/Aesop/fab.1.1.html#165

A Hare one day ridiculed the short feet and slow pace of the Tortoise, who replied, laughing: "Though you be swift as the wind, I will beat you in a race."

The Hare, believing her assertion to be simply impossible, assented to the proposal; and they agreed that the Fox should choose the course and fix the goal.

On the day appointed for the race the two started together. The Tortoise never for a moment stopped, but went on with a slow but steady pace straight to the end of the course. The Hare, lying down by the wayside, fell fast asleep. At last waking up, and moving as fast as he could, he saw the Tortoise had reached the goal, and was comfortably dozing after her fatigue.

Slow but steady wins the race.

妇孺皆知的“龟兔赛跑”故事。小憩可以,但是要睡的话,也该到了终点再睡。轻敌所致。

星期日 多云 8~15℃

Z-Blog 站内搜索问题与应对

1、分页问题:无分页。很头疼的问题。为了使搜索结果尽可能的显示全部,可进入后台“网站设置管理”->“页面设置”选项卡,将“搜索显示文章的数量”改大(负面影响:增加负荷)。默认为显示 25 条,我改了两次,第一次改为 1000,只搜 3 次,就暂时无法方法了;之后改成了 100 。

2、搜索结果的摘要部分显示 html 代码的问题,以下是来自 wilf.cn 的优化方法:

引用:http://www.wilf.cn/post/Z-Blog-search-optimize.html

打开FUNCTION/c_system_lib.asp,大约574行:

aryTemplateTagsValue(4)=Search(TransferHTML(Intro & Content,"[html-format]"),Request.QueryString("q"))

找到上面的代码,修改为:

aryTemplateTagsValue(4)=Search(TransferHTML(Intro & Content,"[html-format][nohtml]"),Request.QueryString("q"))

注:TransferHTML为Z-Blog自带的函数,[html-format]、[nohtml]均为可选参数,可以参考 FUNCTION/c_function.asp

此方法使 <> 之类的 html 标签不再显示,但是像 &nbsp; 之类的 html 代码仍然会显示,不过前后相比之下,已经友好许多了。

3、这两个方法都不太完美,但也不太寄希望于官方的下一次升级将改善这两个问题,因为 1.8 版本之前就已经有用户在官方论坛提过搜索结果的分页问题

4、许多 z-blog 用户都使用了 google 自定义搜索,只是会发生“搜不全”或者“结果冗余”的情况,不过最大的好处是大大减轻了自家服务器的负担。用户可酌情考虑,可使用优化后的“z-blog 自带搜索”,或者使用“google 自定义搜索”,抑或两种一起使用。

星期六 阴 9~14℃

咳血、羽球、月光、降温

上午起来女友咳出糊状的血丝来。这个很容易让人联想到一些电影情节,毛骨悚然的感觉。先是上网查,然后去小区的药店询问,初诊是因咽炎加天气原因加上火引起的,买了两盒咽炎片和一盒三黄片。

晚上打了三个小时,从 6 点打到 9 点。回到小区时,抬头看见很久不曾见的月亮,月亮身上长了毛。今天开始不再下雨了,看天气预报,明天后天都是多云,周二将是个晴天,温度在这几天将降 5 度左右。

天晴了,尽管温度降了,还是会有比较爽朗的心情的。大自然的力量很强大,他心情不好了,就会拉上人和他一起心情不好;他心情好了,就会拉上人和他一起心情好。我想对于大多数的人,还是很难与这种力量相抗衡的,大概是因为人类本身就是属于大自然下的一片叶子吧。

星期五 中雨 12~18℃

固定宽高的DIV在浏览器中水平垂直居中

网上流传较广的一种方法。

.myCenterDiv {
position:absolute; /*–绝对定位–*/
top:50%;
left:50%;
margin-top:-240px; /*–div高度的一半–*/
margin-left:-320px; /*–div宽度的一半–*/
width:640px;
height:480px;
background:#ECECEC;
}


菜根谭(3):用人不宜刻 交友不宜滥

【原文】
用人不宜刻,刻则思效者去;交友不宜滥,滥则贡谈者来。

【译文】
用人要宽厚而不可太刻薄,太刻薄就会使想为你效力的人离去;交友不可太滥太浮,如果这样,那些善于逢迎献媚的人就会设法接近你,来到你的身边。

这几句用来提醒今天的人们,实实再好不过。

看一些管理者,恨不得盯着你每时每刻都在工作不停,这就应了“太刻薄就会使想为你效力的人离去”。

再看我们自己,生怕得罪身边的任何一个“朋友”而有求必应,结果就应了“那些善于逢迎献媚的人就会设法接近你,来到你的身边”。如果你有一个朋友认为你不帮他就说你不够朋友,却丝毫不理解你不帮他的原因,那么这样的朋友就可以毫不犹豫的列入黑名单了。不要勉强自己,不要勉强他人,不要被人勉强。


The Herdsman and the Lost Bull
from http://classics.mit.edu/Aesop/fab.1.1.html#153

A herdsman tending his flock in a forest lost a Bull-calf from the fold. After a long and fruitless search, he made a vow that, if he could only discover the thief who had stolen the Calf, he would offer a lamb in sacrifice to Hermes, Pan, and the Guardian Deities of the forest.

Not long afterwards, as he ascended a small hillock, he saw at its foot a Lion feeding on the Calf. Terrified at the sight, he lifted his eyes and his hands to heaven, and said: "Just now I vowed to offer a lamb to the Guardian Deities of the forest if I could only find out who had robbed me; but now that I have discovered the thief, I would willingly add a full-grown Bull to the Calf I have lost, if I may only secure my own escape from him in safety."

有些时候,有些东西,失去了就失去了,太过执着的追寻,反而有可能赔上更大的代价。