星期三 晴 3~13℃

flash 页面自动跳转到 getflash.htm 的解决方法

使用 chrome 浏览 自行车飞人 游戏,会自动跳转到 getflash.htm 页面,可能是 flash 影片内作了 as 判断。

小明解决了此问题:

先是在 html 页面中加入 allowScriptAccess:

allowScriptAccess = never

这样处理后,不会再自动跳转到 getflash.htm,但是画面停止,需要在 flash 上点右键来“播放”。

随后做了一个引导的 swf:
http://www.friends8.com/upimg/media/flashgames/0801/dangerousDaveLoad.swf

在 html 页面中去掉 allowScriptAccess,加入 FlashVars 和 allowNetworking:

mySwf.addParam("FlashVars", "frameNum=5&swfpath=/upimg/media/flashgames/0801/dangerousDave.swf");
mySwf.addParam("allowNetworking", "internal");

 问题解决。


The Mountain in Labor
from http://classics.mit.edu/Aesop/fab.1.1.html#224

A Mountain was once greatly agitated. Loud groans and noises were heard, and crowds of people came from all parts to see what was the matter. While they were assembled in anxious expectation of some terrible calamity, out came a Mouse.

Don’t make much ado about nothing.

不要小提大作,无事生非。

星期二 多云 6~14℃

友吧实现每小时首页自动更新

Ryan 近日扩展:实现首页定时自动更新。目前设定为每小时自动更新一次。


The Swallow and the Crow
from http://classics.mit.edu/Aesop/fab.1.1.html#218

The Swallow and the Crow had a contention about their plumage. The Crow put an end to the dispute by saying, "Your feathers are all very well in the spring, but mine protect me against the winter."

Fair weather friends are not worth much.

任何事物都有其存在的原因和价值。

暖之 ( & 享受枯萎 2008-11-18 )

第181天:鼠标触发事件改变样式的例子,人不在多在于精 的留言

2 楼   享受枯萎
2008-11-18 0:22:31

自己注册的,也不知道用来干嘛..


1 楼   享受枯萎
2008-11-18 0:21:33

给你一个域名做UCH吧…zhenxi8.com(珍惜吧)

嘎嘎..


回复:想起前不久的kaixin.com事件,深感互联网的昏暗。今天一早来看到这条留言,心里很暖,谢谢枯萎:)

记录一下这次馈赠,以便日后怀念:

朱高 09:24:24
在吧

享受枯萎 09:56:56
在.

朱高 09:57:15
看到你的留言了:)

朱高 10:00:21
刚才我们团队内部讨论了下,觉得这个域名确实很有意义,对于现在越来越不懂珍惜的一代来说,很有意义。

所以我们很愿意接受你的馈赠:)

但是因为 uch 是打算和 dede 结合起来做同一个产品,也就是 dede 和 uch 的用户数据库会联系起来,所以等于是一个产品。

不过这个zhenxi8.com将来很可能会对我们有用,比如我们开发了另一个产品,关于珍惜友情的,那时用它就很好了。

朱高 10:00:56
你本来注册下来也不知道用来干什么的?

享受枯萎 10:03:01
哦.也不是啦.我本来打算给女友用的.但看来你们可能更加需要这域名.另外我也没有别的赚钱的意思.只是馈赠.

朱高 10:08:05
是啊,我知道是馈赠,哈哈。。。

朱高 10:08:21
这个我是不会想歪的:)

朱高 10:09:17
你先留着,以后我们需要时你如果还没用上的话,再来论论,以后我们人员扩展,说不定还要邀你入队呢:)

享受枯萎 10:09:41
那你下一步的打算呢.如果要.就和你说一声.我给你管理域名的资料.

享受枯萎 10:09:58
呵呵.嗯.希望是.

享受枯萎 10:10:31
就和我说一声.我给你管理域名的资料.
打错了…

朱高 10:11:11
好。

…………

朱高 回复于 2008-11-18 11:19:23

星期一 小雨转阴 8~15℃

鼠标触发事件改变样式的例子

//使用className
onmouseover="this.className=’btn_mouseover’"

//直接定义样式
onmousemove="this.style.position=’relative’; this.style.left=’2px’"

//使用backgroundImage,不同于css样式中的写法background-image
onmouseover="this.style.backgroundImage=’url(/imgs/test.gif)’"

//辅助定义,用于代替例中的"this"
var myId = document.getElementById(‘testId’);

应用举例(先定义好两个链接样式):

css:

.currentA:link { color:#FFFF00 }
.currentA:visited { color:#FFFF00 }
.currentA:active { color:#FFFF00 }
.currentA:hover { color:#FFFF00 }

.currentB:link { color:#FFFFFF }
.currentB:visited { color:#FFFFFF }
.currentB:active { color:#FFFFFF }
.currentB:hover { color:#FFFFFF }

js:

function currentLink(current){
 for(i=1; i<=12; i++){
  //加if防止由于疏忽遗漏ID或错定义ID导致脚本出错
  if(document.getElementById("mainMenu_"+[i]) != null){
   document.getElementById("mainMenu_"+[i]).className=’currentB’;
  }
 }
 current.className=’currentA’;
}

html:

<ul>
  <li><a href="#@" onclick="javascript:currentLink(this)" id="mainMenu_1" class="currentB">菜单1</a></li>
  <li><a href="#@" onclick="javascript:currentLink(this)" id="mainMenu_2" class="currentB">菜单2</a></li>
  <li><a href="#@" onclick="javascript:currentLink(this)" id="mainMenu_3" class="currentB">菜单3</a></li>
<ul>


F8team交流:发挥各自强项,人不在多在于精 ( & F8Team )

……

熊小明 16:10:44
恩, web服务可以调用,但ryan 这边先得把用户的地区给我

朱高 16:11:22
这个是要等uch上线后再说了

Ryan 16:11:23
地区目前只能通过 用户登录的ip  通过纯真ip库 去获取

Ryan 16:11:30
应该都是可以的

朱高 16:11:42
是的,就是一个接口问题

熊小明 16:12:02
恩,我请求你的后台,不就可以获得ip了吗,然后你返回给我 地区

Ryan 16:12:22
对 完全可以的

Ryan 16:12:44
反正flash里不能直接获取的数据,都统一调用我们预定义的接口

熊小明 16:13:40
要得

朱高 16:13:42
很好很强大

朱高 16:14:18
各人都让自己的长项发挥出来,这就是一个很强大的团队了

熊小明 16:14:52

朱高 16:15:44
闪友上了以后,就可以把51as慢慢结合进来了,再扩充我们的人员编制,我想,等到一定的时候,不用我们找VC,自然会有人来找我们的

Ryan 16:16:10

……

Flx 17:16:18
我好像来晚了

朱高 17:17:07
不要紧,我们讨论的是调用数据的话题

朱高 17:17:25
你的任务是画窗户

Flx 17:18:32

朱高 17:18:33
各自负责各自的领域。
人不在多,在于精。。。


The Bear and the Fox
from http://classics.mit.edu/Aesop/fab.1.1.html#212

A Bear boasted very much of his philanthropy, saying that of all animals he was the most tender in his regard for man, for he had such respect for him that he would not even touch his dead body. A Fox hearing these words said with a smile to the Bear, "Oh! that you would eat the dead and not the living."

死者不会说话。

第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."

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