Archives for : 友吧今天

星期六 多云 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~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 完成对“最新分享”的列表功能扩展后,将代替当前的“搜索框”位置,“搜索框”则下移到“吧友互动”下方或上方。

星期六 多云 23~31℃

在 photoshop 里画 1px 的曲线和艺术曲线

使用钢笔工具,画好曲线路径点右键(或进入路径面板在路径层上点右键),使用“描边路径”。

如果画 1px 的曲线,则在“描边路径”的弹出选项框中选“铅笔”。

如果需要画艺术曲线,则在“描边路径”的弹出选项框中选“画笔”,并勾选“模拟压力”。可预先选好需要的笔刷。

实验版本:photoshop cs3


一年前的一个预料在昨天应验

昨天第一次看到友吧有来自 bbs.dedecms.com 的链接。

早在友吧开始建设时就预料到会有这一天,一年后果然应验。类似这样的事情,自己去做,不如让他人代劳。自己只要做好分内之事,自然也就会有代劳之人了。

不过因来路显示为跳转链接:

http://bbs.dedecms.com/goto.php?url=http%3A%2F%2Fwww.friends8.com%2F

所以不知道发帖人是因何提到友吧。

星期五 多云转阴 24~32℃

“报料”banner

意在表达“发现”好文后“平静”的“分享”。

三者对应为“眼睛”“清新”“花放”。


Dreamweaver的应用源格式之“格式化CSS”

昨晚在来路中看到来自 68design 的链接排在靠前的位置,点击最后一条记录进去,是去年写的一篇被 68 转载的文章:Dreamweaver的应用源格式

原文中有一句:

但是CSS文件使用此功能就感觉不适应了(个人感受),页面拉得很长。

随手进到评论里查看,有一条评论:

用户:bestyuan3  时间:2008-04-02   IP:125.77.179.64

在CSS下页面拉得很长的原因是因为你没有在代码格式里设置好,,,

具体操作是:编辑—首选参数—找到代码格式选项—然后点里面的CSS—-最后把<<每个属性位于单独的行上>>最后按确定,,,再执行应用源格式就可以了.

他的意思是取消“每个属性位于单独的行上”前的勾勾。试了下,很好,下面还有预览(我当前用的 DW 是 CS3 版本)。感谢 bestyuan3 的留言。


IE8 的兼容性视图设置

此前的日志有提到“兼容性视图按钮”在有的网站有显示,有的网站没显示。今天发现,不管有没有显示,都可以在“工具 -> 兼容性视图设置”里进行添加删除设置,还可以勾选底部的“在兼容性视图中显示所有网站”,则访问所有网站时都使用“兼容性视图”,并且访问所有网站时都不再显示“兼容性视图按钮”。


于丹《论语》心得(三)_ 处世之道 ( 思考 )

多闻多见,慎言慎行。
多做实事,切勿夸夸其谈。


收到九天老上司对友吧的建议,很有价值

下午收到九天老上司对友吧的建议,很有价值,感激!

我觉得你的网页没有把你的概念表达清楚
打开网站,都是一堆堆的信息,没有给陌生用户一个引发兴趣的点,没有一个引导
“分享我的发现”,这种概念太大了,你们的特色在哪里
你的目标用户是谁,他们凭什么要留下来,你要给个理由他们
现在的网站没特色没发展的
同质化的东西太多了
要让网友在3秒内产生兴趣


English Log

  1. Found out a new short story website, http://www.theshortstory.org.uk
  2. Subscribed to http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml

The Strawberry
from http://www.storyarts.org/library/nutshell/stories/strawberry.html

A Zen Tale from Japan

There was once a man who was being chased by a ferocious tiger across a field. At the edge of the field there was a cliff. In order to escape the jaws of the tiger, the man caught hold of a vine and swung himself over the edge of the cliff. Dangling down, he saw, to his dismay, there were more tigers on the ground below him! And, furthermore, two little mice were gnawing on the vine to which he clung. He knew that at any moment he would fall to certain death. That’s when he noticed a wild strawberry growing on the cliff wall. Clutching the vine with one hand, he plucked the strawberry with the other and put it in his mouth.

He never before realized how sweet a strawberry could taste.

星期四 晴转多云 23~32℃

友吧“报料”功能上线

中午开 QQ 收到 Ryan 昨晚的留言,“报料”功能已经处理完成。今天下午我们把这一功能发布到了首页,您可以在我们首页顶部的导航栏下方体验,投递很方便,从此在一定意义上告别烦琐的投稿流程。之所以说是“在一定意义上”,是因为如果您是在友吧发表原创文章,仍然还需要使用我们的会员投稿系统。

无论是投稿还是报料,我们的编辑都将认真保证文章质量。

正在设计一张关于“报料”的 banner,作为宣传之用。

另,Ryan 还处理好了用户行为的部分记录(诸如谁访问了谁的空间,谁浏览了哪篇文章,在哪篇文章发表了留言,等等。。。)这些元素以后可以逐步的放到“用户空间”里,以增强用户交互体验。

自警:

网站不能有过多虚的东西,只有体现价值,才是符合长期发展理念的。
自愿加入的用户 —— 才是最有价值的用户。


最重要的人,最重要的事,最重要的时间 ( 思考 )

听《论语》心得时听到的一则故事:

有一个国王每天都在思考三个最最终极的哲学问题:在这个世界上,什么人最重要?什么事最重要?什么时间最重要?就这三个问题,举朝大臣,没人能够回答得出来。他很苦闷。

有一天,国王出去微服私访,走到一个很偏远的地方,投宿到一个陌生的老汉家。半夜里,他被一阵喧闹声惊醒,发现一个浑身是血的人闯进老汉家。那个人说,后面有人追我。老汉说,那你就在我这儿避一避吧。就把他藏起来了。国王吓得不敢睡,一会儿看见追兵来了。追兵问老汉,有没有看到一个人跑过来?老头说,不知道,我家里没有别人。后来追兵走了,那个被追捕的人说了一些感激的话也走了。老汉关上门继续睡觉。

第二天国王问老汉说,你为什么敢收留那个人?你就不怕惹上杀身之祸?而且你就那么放他走了,你怎么不问他是谁呢?

老汉淡淡地跟他说,在这个世界上,最重要的人就是眼下需要你帮助的人,最重要的事就是眼前必须要解决并做好的事,最重要的时间就是眼前的时间,一点不能拖延。那个国王恍然大悟,他那三个久思不解的哲学问题,一下都解决了。


古中医提倡的睡眠养身

春秋季早睡早起
夏季晚睡早起
冬季早睡晚起

按农历划分,正月起为春。


IE8 兼容性视图与域名的关系

例,有两个页:

  1. http://www.***.com/test1.html(没有显示兼容性视图按钮)
  2. http://www.***.com/test2.html(有显示兼容性视图按钮)

那么,在第二个页点击了兼容性视图按钮后,在第一个页同样可以享受到兼容性视图。

我的案例:友吧所用的 DEDE 后台没有显示兼容性视图按钮,在后台编辑时不太方便,但在前台点击了使用兼容性视图后,刷新后台,就同样是兼容性视图模式了。也就是说,兼容性视图模式针对的是整个域名,从点击兼容性视图按钮后的提示也可以看出来:

***.com 现在正在兼容性视图中运行

它所指的,是该域名下的所有页,而非当前的独立页。

另,用兼容性视图模式访问某网站后,下次访问该网站时,默认还是兼容性视图模式,有记忆功能。


The Skull
from: http://www.storyarts.org/library/nutshell/stories/skull.html

A Tale from West Africa

A hunter came upon a huge tree with a whitened skull at its base. The skull spoke and said, "Beyond a certain hill is a field of calabashes. Take them to your hungry village, but do not tell anyone how you obtained them."

"How did you come to be here?" asked the hunter.

"My mouth killed me." said the skull.

The hunter returned to the village with the calabashes and immediately told everyone, "A talking skull showed me a field of food!" The Chief called him a liar.

"Then come with me! I’ll prove what I say is true. When they arrived at the tree, the hunter spoke to the skull but it remained silent. The hunter was put to death on the spot for lying.

In time, two whitened skulls sat beneath the tree. The first turned to the second and said, "See, in death we meet again, my kin. It’s true a mouth can do you in!"

星期三 阴转多云 24~32℃

收到 Google 邮寄过来的 AdSense 个人识别号码 (PIN) 信息

因近一个月未收到 Google 的邮件,把地址由住处地址改成公司地址后,昨天刚刚重新申请新的个人识别号码,不料今天早上一到公司就接到房东的电话,说有一封信,塞到我门缝下了。

悦。


听《论语》心得
(百家讲坛   于丹)

中秋打电话给老王,聊时向我推荐《论语》心得。上迅雷下载,共七集,799MB。

  1. 天地人之道
  2. 心灵之道
  3. 处世之道
  4. 君子之道
  5. 交友之道
  6. 理想之道
  7. 人生之道

昨晚听了第一集,颇有味道。计划每晚听一集。


The Fighting Rooster
from: http://www.storyarts.org/library/nutshell/stories/fighting.html

A Taoist Tale by Chuang Tzu

There once was a man who wanted his fighting rooster to be more ferocious. He took the rooster to a trainer. In a few weeks’ time he returned and saw that his rooster didn’t squawk as loudly.

"Not ready yet," said the trainer. Two weeks later he saw that his rooster barely raised his neck feathers and wings.

"Not ready yet," said the trainer. Another week passed. His rooster looked as tame and docile as a chick.

"You’ve ruined my fine fighting bird!" screamed the man at the trainer.

"Not at all," the trainer replied, "See how calm and secure he is, how serenely strong he stands today. The other fighting birds take one look at him and they all run away!"