留言簿   12 楼   依旧光头
2008-9-30 1:13:30

是我,最近波动很大,几个好兄弟都要告别网络了,心情很失落。不晓得该怎么办。
现在自己的站也没什么头绪,是继续坚持还是和他们一样,告别网络!
我放不下,可留下来又能做些什么呢?


回复:今天刚写好友吧一周年总结,看到你这条信息,很能理解你此时的失落。

站长进进出出,界内早是习以为常。站长行业是个很不成熟的行业,许多站长被误导仍然还以为得了莫大的好处,这是无比可悲的。我最觉痛心的就是,这个行业才刚刚开始这么几年,已是这般污浊不堪,整天就是盯着流量流量,恨不得一天就做到天下第一,却毫不关心网站的内在价值,眼界之狭,无以形容,真不知以后还要害多少人。

网站的寿命,可以短于站长的寿命,也可以等于站长的寿命,也可以长于站长的寿命。网站的寿命,全由站长掌控,站长想让它短,它就不会长;站长想让它长,它就不会短。

看一个人是否有定力,很重要的就是看他的眼睛,他的目光。随风摇摆,没有主见,早已成风。如果缺乏定力,离开站长行业这个脏乱的环境,未尝不是个好选择,在自己不擅长的行业逗留过久,并不是什么高明之举。

无论在哪个行业,都有许多共同的优秀品质,这些品质绝不是靠提高外在技能可以练就的。

第132天:《恐怖废墟》,草稿

星期一 多云转阴 20~25℃

草稿

看了《恐怖废墟》,随后写总结。已完成全篇的草稿,明天修改后发布。

星期日 晴转多云 18~26℃

DEDE收录友吧

9-20 的日志记录了 一年前的一个预料在昨天应验,说在 19 日晚第一次看到友吧有来自 bbs.dedecms.com 的链接,不过因来路显示为跳转链接,所以不知道发帖人是因何提到友吧。

昨晚在 DEDE 上逛的时候,看到公告 织梦公司站即将上线,征集一批优秀演示站点,猜想链接多半是从这里来的。翻页查一下,果然在 26 楼  看到有人推荐,回帖时间是 2008-09-17 08:36

看用户ID,感觉有点熟。google 一下,看到有“高原红”。在友吧里查一下,果然是高兄的 ID http://www.friends8.com/member/index.php?uid=snhczaw

推荐人无疑就是高兄了。谢过高兄:)


当舅舅了

早上七点半正在来公司的路上,妈打来电话,说妹刚刚生了,一个八斤的小伙子。


国庆部分计划

下午下班后,国庆假期就算开始了。全程计划不明,有几条已明:

  1. 在假期的头两天里整理好友吧总结,以便在 30 号发布。
  2. 帮阿华的工作室网站上传几个实例图片,修几处页面。
  3. 看三国剩下的 20 来集,能看几集看几集。
  4. 试邀一下看有没有打羽毛球的朋友。

Fate
from http://www.storyarts.org/library/nutshell/stories/fate.html

A Hebrew Folktale

King Solomon’s servant came breathlessly into the court, "Please! Let me borrow your fastest horse!" he said to the King. "I must be in a town ten miles south of here by nightfall!"

"Why?" asked King Solomon.

"Because," said his shuddering servant, "I just met Death in the garden! Death looked me in the face! I know for certain I’m to be taken and I don’t want to be around when Death comes to claim me!"

"Very well," said King Solomon. "My fastest horse has hoofs like wings. TAKE HIM." Then Solomon walked into the garden. He saw Death sitting there with a perplexed look on its face. "What’s wrong?" asked King Solomon.

Death replied, "Tonight I’m supposed to claim the life of your servant whom I just now saw in your garden. But I’m supposed to claim him in a town ten miles south of here! Unless he had a horse with hooves like wings, I don’t see how he could get there by nightfall . . ."

星期六 多云 18~24℃

关于三十而立 ( 思考 )

昨晚听于丹《论语》心得的最后一集《人生之道》,其中第一条就是于丹对“三十而立”的理解。

今天绝大多数人对这句话的理解只存于表面,所谓的“三十而立”,就是在三十岁的时候要有车有房,没有的话,那就是没有立。于丹则认为,这里的“立”,是一种内心的立,是在内心建立起的一种沉着的自信之立。

事实上,许多人这一辈子也没有真正达到“而立”之年,更不用说后面的“四十而不惑”“五十而知天命”“六十而耳顺”“七十而从心所欲不逾矩”。这里的三十,四十,五十,六十,七十,讲的其实是心灵的年龄,而并非仅仅是外在的年龄。


穿长袖了

前天晚上躺在竹席上吹着风扇,背部还有些出汗,当天最高气温32℃。下半夜忽觉凉意四侵,窗外有雨声。

昨天早上出门,以及下午下班回家,均觉秋风逼人。当天最高气温26℃,一天内下降6℃。

今天最高气温24℃。早上出门穿长袖了。

换季温差大,需防感冒。日常生活中,一些很浅的道理,往往很容易被忽视。


关于平滑loading

昨天录入 变形金刚:闪电出击 ( Blast Attack ) 时,看到 loading 比较平滑,有些好奇。不过提取出来后,没有发觉特别,用的也是帧率。平滑的原因是文件大,所以显得平滑。

this.onEnterFrame = function ()
{
    var _loc2 = this.getBytesLoaded() / this.getBytesTotal();
    if (_loc2 < 1)
    {
        this.mcLoader.mcLoadBar._xscale = _loc2 * 100;
    }
    else
    {
        this.gotoAndStop("Title");
        delete this.onEnterFrame;
    } // end else if
};
stop ();

去年和 灰昼68 论坛 提起过平滑 loading,不过当时没有深入下去。


友吧首页“最新分享”滚动列表添加“查看所有”按钮

下午添加了“查看所有”的“显示/隐藏”切换,在滚动列表的右端。

滚动列表,一方面是节省空间,另一方面是吸引目光,而“查看所有”则可为用户节省浏览时间。


New Shoes
from http://www.storyarts.org/library/nutshell/stories/newshoes.html

A Taoist Tale from China by Han Fei

A man needed a new pair of shoes. Before he went to the marketplace, he drew a detailed picture of his feet on a piece of paper, carefully measured them, and wrote down all their dimensions. Then, he set off on foot for the shoe store. Arriving later that day at the bazaar, he unhappily discovered that he had forgotten to bring the paper with his measurements on it! He turned around and walked back home to get it. It was sunset by the time he returned to the market,. and all the shops were closed. He explained his situation to one of the shopkeepers who had already packed away all his wares.

"Foolish man!" said the merchant. "You could have trusted your feet and tried the shoes on in the store! Why did you go home to get your diagrams?"

The man blushed, "I guess I trusted my measurements more . . ."

星期五 小雨(今天比昨天的最高温度一下降了6度) 20~26℃

友吧首页“最新分享”和“文章搜索”框修改

为了使“最新分享”和“文章搜索”在页面中更加突出,下午花一个多小时做了 7 套方案。问了几个人,最终选择了下面这个(方案6),自己也比较偏向。

现:

原:


A Flock of Birds
from http://www.storyarts.org/library/nutshell/stories/flock.html

A Folktale from India

There was once a flock of birds peacefully pecking seeds under a tree. A hunter came along and threw a heavy net over them. He said, "Aha! Now I have my dinner!"

All at once the birds began to flap their wings. Up, up they rose into the air, taking the net with them. They came down on the tree and, as the net snagged in the tree’s branches, the birds flew out from under it to freedom.

The hunter looked on in amazement, scratched his head and muttered, "As long as those birds cooperate with one another like that, I’ll never be able to capture them! Each one of those birds is so frail and yet, together they can lift the net."

星期四 晴转多云转雷阵雨(早晨起来看到蓝蓝的天空上只依稀飘了三四朵如烟的薄云) 23~32℃

友吧 LOGO 大小民意调查

参考八酒杯的建议,将 LOGO 缩小(此前我自己也一直有这打算)。图标缩为原来的 80%,“友吧”文字缩为原来的 72%

大:

小:

把两个 LOGO 放上网页做了两个效果图,问了几个人,都说大的好,没一个说小的好,就连八酒杯本人看过后也这么认为,我自己也越看越觉得还是大的好。

看来网页终究是网页,是要看整体的,改小后的 LOGO 和右边的导航很不相称。

保持原样吧,民意不可违,就当是花一个多小时做实验。


写日志对写总结的好处

这几天写友吧总结,体会到了写日志在这方面的好处。要知道以前一些事情发生的时间,可以精确到“日”。


The Golden Touch
from http://www.storyarts.org/library/nutshell/stories/golden.html

A Tale from Ancient Greece

There was once a king named Midas who did a good deed for a Satyr and was granted a wish by the God of wine, Dionysus. For his wish, Midas asked that whatever he touched would turn to gold. Although Dionysus tried to dissuade him, Midas insisted that the wish was an excellent one, and it was granted!

Excitedly, Midas went about touching all sorts of things, turning them into gold.

Soon Midas became hungry. He picked up a piece of food, but he couldn’t eat it, for it had turned to gold in his hand! "I’ll starve," moaned Midas, "Perhaps this was not such a good wish after all!"

Midas’ beloved daughter, seeing his dismay, threw her arms about him to comfort him, and, she too turned to gold! "The golden touch is no blessing," cried Midas. He went to the river and wept. The sand of that river turned as yellow as "fool’s gold" for it is there, they say, that King Midas washed away the curse of the golden touch with his own tears.

星期三 阵雨转多云 23~33℃

团队中的耐心与默契 ( & Ryan )

昨天和 Ryan 交流一个功能扩展问题,到今天早上才发觉,走了很大的一个弯路。其实只需要一个判断就行了,结果弄出了三个判断。这里面,有一个突出问题在于我对 Ryan 的思维误导,因为“逻辑思维”本不是我的强项,而功能扩展体现的就是逻辑思维。其中还有一个细节,双方都误解了彼此的语意,最后才知道,原来双方所表达的观点是相同的。

此番交流曝出一个问题,团队配合尚需加强默契。有耐心还不够,还需要默契,这是提升团队效率的关键。

团队的默契问题,尤其体现在远程配合上。因为不是直接的话语交流,文字本身就是一种效率较低的交流介质,再加之表达上的不畅,间或还出现错别字之类的因素,使得默契问题更加突出。

在团队中,“耐心”是基本要素,“默契”则是品质要素。之所以说耐心是基本要素,是因为任何一支团队都要经历一个不默契的阶段,在这个阶段,需要足够的耐心,否则,还没走到默契的阶段,团队就因彼此缺乏耐心而解体了。


友吧加入“最新分享”滚动列表

位置在首页 banner 下方,原放在这里的“文章搜索”下移至“吧友互动”下方。

去掉了“吧友互动”下方的 AdSense 广告。

附滚动代码,网上找来后整理的。

CSS:

.foundTxt { position:absolute; margin-top:11px; margin-left:42px; line-height:20px; color:#666666 }
.foundTxt UL { margin:0; padding:0; overflow:hidden; height:20px; line-height:20px; }

JS:

function scrollUlByControl(ul) {
try {
slideLine(ul, 2000, 20, 20); //三个数分别对应:滚动间隔时间,滚动速度,单行滚动的高度
}catch (e) {}
}

function slideLine(ul, delay, speed, lh) {
var slideBox = (typeof ul == "string") ? document.getElementById(ul):ul;
var delay = delay, speed=speed, lh = lh;
var tid = null, pause = false;
var start = function () {
tid = setInterval(slide, speed);
}
var slide = function () {
if (pause) return;
var i;
slideBox.scrollTop += 1;
if (slideBox.scrollTop % lh == 0) {
clearInterval(tid);
for (i = 0; i<1; i ++) {
slideBox.appendChild(slideBox.getElementsByTagName("li")[0]);
}
setTimeout(start, delay);
slideBox.scrollTop = 0;
}
}
slideBox.onmouseover = function () {pause = true;}
slideBox.onmouseout = function () {pause = false;}
setTimeout(start, delay);}

html:

<div class="foundTxt">
<ul id="newFoundOut">
<li>。。。</li>
<li>。。。</li>
<li>。。。</li>
</ul>
<script language="javascript">scrollUlByControl(document.getElementById("newFoundOut"));</script>
</div>


解决点击空链接时的“页面抖动”(页面串动)

今天从 Ryan 那里学到一个新知识。

  1. <a href="#">test1</a>
  2. <a href="#@">test2</a>
  3. <a href="javascript:;"></a>

第一种链接点击时会出现页面抖动,第二种和第三种不会。

什么是“页面抖动”(页面串动)?

当页面出现滚动条时,点击第一种链接,滚动条会自动向上,页面会自动“置顶”。而第二种和第三种不会。

以前我习惯用“#”来代替空链接,从现在开始要改成“#@”或者“javascript:;”了。

第三种相对于第二种的优势在于不会在地址栏出现“#@”。

2011-12-13 更新:

新增两个不会使页面发生串动的方法。注意,上面的第三种和下面的第二种(javascript),有时会导致 ie 的地址转向失效,请改为其他几种。

  1. <a href="###">test2</a>
  2. <a href="javascript:void(0)"></a>

The Talkative Turtle
from http://www.storyarts.org/library/nutshell/stories/talkative.html

A Tale from India

A talkative turtle overheard two hunters say that they were planning to catch turtles the very next day. When the hunters left, the turtle asked two cranes to help him escape. "Beautiful white birds," he said, "if you hold a long stick between your beaks, I’ll close my mouth tightly in the middle of it, and then you can fly up and carry me to safety."

"Good idea," said the cranes. "But, for the plan to succeed, you will have to keep your mouth closed tightly on the stick and you must not say a word!" The turtle agreed and biting on the middle of a stick held in the beaks of two birds, off he was carried.

When the birds were high in the air with the turtle dangling down from the stick, some people on the ground looked up at the strange sight in the sky and said, "What clever birds! They figured out how to carry a turtle!"

The proud, talkative turtle cried out, "It was my idea!" and fell tumbling down to earth.

星期二 晴转多云 24~34℃

突然发觉一味说坚持显得片面 ( 思考 )

一般来说,我们把完成一件需要花较长时间去完成的事情称为“坚持”。

褒扬“坚持”的文章有很多,可是并不是所有人都能“坚持”,也不是一定要“坚持”才能达到所谓的“成功”,因为“成功”的定义并不绝对。

不顾性格只论行为,是“从行为到性格”;从性格出发觅事而为,是“从性格到行为”。

抛开性格,一味说“坚持”,显得片面。先分析性格,从性格出发,才不致误人。

但无论是何样的“成功”,应该都有一个共同点,那就是做事的方法。思想决定方法,提升思想,才能提升方法,提升方法,才能提升“成功”的质量。


php时区设置差8个小时解决办法

昨天服务器故障排除后,今天发现出了另一个问题,时区差了8小时。网上查到了方法:

从php5.1.0开始,php.ini里加入了date.timezone这个选项,默认情况下是关闭的。打开php.ini查找date.timezone 去掉前面的分号,并改成 date.timezone = "Asia/Shanghai" 重启http服务(如apache2或iis等)即可。

详细参考:
http://bbs.jcwcn.com/thread-175588-1-1.html

发现一个问题 date("Y-m-d G:i T",time()) 取出来的时间和本地时间老差8个小时,可我的系统明明是中国标准时(GMT+8),最后终于找到了问题所在:

原来从php5.1.0开始,php.ini里加入了date.timezone这个选项,默认情况下是关闭的。

也就是显示的时间(无论用什么php命令)都是格林威治标准时间,和我们的时间(北京时间)差了正好8个小时,有以下3中方法可以恢复正常的时间。

1、最简单的方法就是不要用php5.1以上的版本。

2、如果一定要用,而且不能修改php.ini,则需要在关于时间的初始化的语句的上面加上 date_default_timezone_set (XXX);

3、一劳永逸,仅限能修改php.ini。打开php.ini查找date.timezone 去掉前面的分号,= 后面加XXX,重启http服务(如apache2或iis等)即可。

关于XXX,大陆内地可用的值是:Asia/Chongqing ,Asia/Shanghai ,Asia/Urumqi (依次为重庆,上海,乌鲁木齐)

港台地区可用:Asia/Macao ,Asia/Hong_Kong ,Asia/Taipei (依次为澳门,香港,台北)

还有新加坡:Asia/Singapore

老外好像把北京漏调了。

其他可用的值是:Etc/GMT-8 ,Singapore ,Hongkong ,PRC

PRC是什么?PRC是中华人民共和国啊-_-

以上都是我从php官方说明档里整理出来的GMT-8下面的地区,可能会有遗漏,你可以http://www.php.net/docs.php上查到更多的地区。

由于程序最后还是会把地名转为时区来计算,所以当你使用的不是内置的区域的时候,程序将自动使用格林威治标准时间。


Cooking by Candle
from http://www.storyarts.org/library/nutshell/stories/cooking.html

A Sufi Tale from the Middle East

Mula bet some friends he could survive a night on an icy mountain with nothing to warm him. Taking only a book and a candle for some light, he sat through the frigid night. When he came down to claim his winnings, his friends asked, "Did you take anything up there with you to keep warm?"

"No," said Mula, "just a small candle to read by."

"Aha!" they exclaimed, "Then you lose!"

A week later he invited these same friends to a feast. They waited and waited for food. "Dinner’s not ready," said Mula, "Come and see why!"

In the kitchen they saw a huge pot of water under which a small candle was burning. Mula said, "Does this remind you of our bet? I’ve been trying to heat this pot of water over this candle since yesterday and it’s not warm yet!"

星期一 晴转多云 24~32℃

自今日起写友吧一周年总结

计划花一周时间,在9月30日周年当天或之前发布。


早上友吧新服务器第一次出现故障

早上 8:30 左右发现网站无法访问,FTP 无法登录。昨晚八点左右仍正常,可能是夜里发生的。告知了 Ryan,但他远程也无法连接服务器,他判断可能服务器死机。

联系了海哲,也说远程连不了。他联系托管商万网,不料万网那边已忙成一团。

10:10 分时看还不能访问,到 10:14 发现可以访问了。

这是第一次出现故障,迁到万网后的第56天。


从 word 文件中取出原始图片

打开 word,在“文件”菜单中选择“另存为”,保存类型选“网页(*.htm; *.html)”。完成后,会看到原始图片已输出到和网页文件同目录下的“***.files”文件夹中。


喝了三鹿,腰不酸了,腿不疼了,就连心脏也不跳了!

喝了三鹿,腰不酸了,腿不疼了,就连心脏也不跳了!


DEDE 后台编辑器超链接默认改为 _blank 弹出

修改文件:

/include/FCKeditor/editor/dialog/fck_link.html

源代码搜索 id="txtTargetFrame",在 input 内加入 value="_blank",如下:

<input id="txtTargetFrame" style="WIDTH: 100%" type="text" onKeyUp="OnTargetNameChange();" onchange="OnTargetNameChange();" value="_blank" />

附:DEDE 后台编辑器寻找对话框目标文件的技巧

/include/FCKeditor/editor/dialog/ 目录下放的是编辑器对话框文件,寻找目标文件有个技巧。例如上述,假设不知道要修改“/include/FCKeditor/editor/dialog/fck_link.html”,可在 /include/FCKeditor/ 目录下搜索对话框中看到的某文字,例如搜索“目标框架名称”,可以在“/include/FCKeditor/editor/lang/zh-cn.js”中找到,能看到其对应的标签名为“DlgLnkTargetFrameName”,再在 /include/FCKeditor/ 目录下搜索“DlgLnkTargetFrameName”,则找到了“/include/FCKeditor/editor/dialog/fck_link.html”


Wild Goose
from http://www.storyarts.org/library/nutshell/stories/wild.html

A Tale from China

Two hunters saw a wild goose fly overhead. As one of the hunters placed an arrow in his bow and aimed it at the goose, he said, "That goose will make a fine stew."

"Stew!" said the other. "It would be far better to roast it."

"Stewed!" said the first, putting down his arrow.

"Roasted!" replied the other.

The argument went on. "Let’s ask our clan leader to decide the best way to cook that goose." The leader settled the argument by suggesting that when they caught the goose, half should be stewed and half should be roasted. In that way, everyone’s needs would be met.

Pleased, the two hunters went out to shoot the wild goose, but by that time, the goose was safely long gone . . .

星期日 多云(天气很闷,开风扇觉凉,不开觉热,身上盗汗) 23~30℃

骄盛怒盛之祸 ( 思考 )

关羽麦城突围前夕,与残余部将商议,欲走北门小道入西川。一将进言:“小道恐有埋伏,可走大道。”关羽曰:“纵有埋伏,我何惧哉!”

关羽此时,真不知是骄是信还是无耐。性骄一生,失此一足,却要了性命。事后孔明于关羽灵前慰刘备曰:“云长平日刚而自矜,故有今日之祸”。骄与信本时或难分,有道是,信过之,则成骄。

纵观三国诸将,皆常见骄见怒。勿论诸将,即便曹操孙策等领袖之辈,亦时犯之。刘备一向对孔明言听计从,难得怒一次,却招致火烧连营之杀身之祸。

足可见,盛之祸。


曹操之疑 ( 思考 )

华佗被召入宫为曹操治头风病。佗言欲用利斧砍开曹操头颅,取出风涎,招操疑心,被囚于牢中。

曹操临死前遗嘱:“孤死之后,于彰德府讲武城外,建疑冢七十二座,勿令后人知我葬于何处。”

曹操之疑,至死不休。


细化友吧首页的搜索框

细化搜索框是为下一步放“最新分享”作准备。待 Ryan 完成对“最新分享”的列表功能扩展后,将代替当前的“搜索框”位置,“搜索框”则下移到“吧友互动”下方或上方。