6.cn坐上了国内视频分享网站头把交椅

Filed Under 互联网

最近1年来,国内视频分享网站领域内的竞争,可谓你死我活。而最近几个月,这种竞争已经到了异常惨烈的程度。alexa排名TOP100里,中国大陆内的视频分享网站,就有5家。引用某某人的话,这是“互联网历史上最惨烈的战争”,“从来没有过这么多超一流团队和超大规模资本,如此密集地在这样狭窄的空间竞争”。就是在这样惨烈的战争中,六间房(6.cn)挺过来了,而且挺的非常陡峭。

今天,六间房(6.cn)终于坐上了国内视频分享网站的头把交椅。

Alexa数据:

ChinaRank数据:

在线绘图工具Best4c及其他

Filed Under 互联网, 七零八碎

上面这个图,不要认为是使用任何桌面绘图软件做的,它出自联想研究院刚刚推出的在线绘图软件—-best4c。试用一番,总的感觉,味道好极了。

Best4c的切入点真是非常好,避开了强大的GoogleDocs,去钻目前少有人涉足的在线绘图。但跟GoogleDocs完全用JS完成了在线文字编辑和表格制作的功能不一样,Best4C是用的Flash技术。界面比较华丽,功能也很完善,操作也简单,如果有了右键菜单,简直就真的跟用VisualStudio完全一个感觉了。但缺少导入导出功能的Best4c,还是很难让我舍弃目前成熟的桌面应用软件。就象PowerPoint一样,这类绘图软件用的最多的地方不是做,而是看。当我需要在一个没有网络的地方向客户展示项目的流程图,Best4c可以帮我么?

不过有总比没有的好,前两天还对马克·库班所发表的“网络已无聊至死”的言论颇有同感,今天就看到了让人眼前一亮的Best4c。谁说“互联网不断创造出令人激动的理念和创意的日子已经死去”,其实网络还是很美妙的嘛:)

上个月已经把微软的Office请出电脑,投入到了GoogleDocs和SUN的StarOffice(pack.google.com有免费下载)的怀抱中。但愿这个国产的Best4c(完全个人揣测)能跟YoutubeFlickrtwitter、GoogleDocs以及其他所有富有创意的在线软件一起,改变我们的生活,改变我们的未来。也许,互联网真的正在慢慢引领我们进入传说中的第三次工业革命哦……HOHO

使用PKCS5填充的DES编码 PHP操作类库

Filed Under 技术备案

UUSEE的时候,因为工作需要,用PHP编写了这个使用“PKCS5填充的DES编码”的操作类库。
昨天在做一个小项目的时候刚好用到了,翻出来又做了一些更新。
这玩意比较生僻,放在这里算是个备份吧。
用法都很简单,就不详细写了,自己用的时候最好修改一些里头的参数,只要能看的懂应该就知道改啥:)

DES_PKCS5.rar

最近相当火爆的马六事件

Filed Under 互联网

跟当年的宝马撞人有的一拼了……网络炒作……真是太彪悍了

解决js在FireFox下不能复制文字到剪贴板的问题

Filed Under 技术备案

利用flash作为跳板来完成此功能,具体代码如下:

<script type="text/javascript">
    
function CopyText(id)
    
{
        
//copyToClipboard(document.getElementById(id).value);
        
copy(document.getElementById(id).value);
    
}
 
    
function copy(text2copy) {
        
if (window.clipboardData) {
            
window.clipboardData.setData("Text",text2copy);
        
} else {
            
var flashcopier = 'flashcopier';
            
if(!document.getElementById(flashcopier)) {
                
var divholder = document.createElement('div');
                
divholder.id = flashcopier;
                
document.body.appendChild(divholder);
            
}
            
document.getElementById(flashcopier).innerHTML = '';
            
var divinfo = '<embed src="_clipboard.swf" FlashVars="clipboard='+escape(text2copy)+'" width="0" height="0" type="application/x-shockwave-flash"></embed>';//这里是关键
            
document.getElementById(flashcopier).innerHTML = divinfo;
            
alert('Text copied');
        
}
    
}
 
    
function copyToClipboard(meintext)
    
{
        
if (window.clipboardData){
            
alert("ie");
            
// the IE-manier
            
window.clipboardData.setData("Text", meintext);
            
// waarschijnlijk niet de beste manier om Moz/NS te detecteren;
            
// het is mij echter onbekend vanaf welke versie dit precies werkt:
        
}
        
else if (window.netscape){
            
// dit is belangrijk maar staat nergens duidelijk vermeld:
            
// you have to sign the code to enable this, or see notes below
            
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
            
// maak een interface naar het clipboard
            
var clip = Components.classes['@mozilla.org/widget/clipboard;1'].
                        
createInstance(Components.interfaces.nsIClipboard);
            
if (!clip) return;
            
alert("mozilla");
            
// maak een transferable
            
var trans = Components.classes['@mozilla.org/widget/transferable;1'].
                        
createInstance(Components.interfaces.nsITransferable);
            
if (!trans) return;
            
// specificeer wat voor soort data we op willen halen; text in dit geval
            
trans.addDataFlavor('text/unicode');
            
// om de data uit de transferable te halen hebben we 2 nieuwe objecten
            
// nodig om het in op te slaan
            
var str = new Object();
            
var len = new Object();
            
var str = Components.classes["@mozilla.org/supports-string;1"].
                        
createInstance(Components.interfaces.nsISupportsString);
            
var copytext=meintext;
            
str.data=copytext;
            
trans.setTransferData("text/unicode",str,copytext.length*2);
            
var clipid=Components.interfaces.nsIClipboard;
            
if (!clip) return false;
            
clip.setData(trans,null,clipid.kGlobalClipboard);
        
}
        
alert("Following info was copied to your clipboard:\n\n" + meintext);
        
return false;
    
}
<
/script>

好听的小曲儿和我喜欢的张曼玉

Filed Under 七零八碎

央视《第十放映室》里的张曼玉一段,很好听的小曲儿 。
好听的小曲儿加上我一向很喜欢的张曼玉,哦哦也了~~~

听完这小曲儿,把我的吹笛子的瘾勾起来了。
高中的时候学的竖笛,那时候已经到了只要我能哼出来的曲子就能吹出来的境界。好多年不吹,突然有种重新玩玩的冲动,就在淘宝花30块买了个竖笛。本来是要买个8孔的,结果卖货的MM还送了个6孔的。竖笛明天就送到了,又可以爽了。
0dfc864b-3199-46df-a2ee-1b69b7c1fb990.jpg

你是我心内的一首歌

Filed Under 七零八碎

发现自己超喜欢一些所谓“中国风”的歌。昨天晚上在凤凰卫视看到了王力宏跟SHE的Selina合唱的这首《你是我心内的一首歌》,相当有感觉!!!

今天在网上找来MP3,狂听了2个多小时。是的的确是2个多小时,我一向这样,喜欢首歌,就要把它听到吐。
WINAMP的播放列表里,留着的都是还没听吐的歌,比如陶喆的《susan说》,这下它有伴儿了,哦也~

作为一个六间房四间房房东五间房房东,必然想到了把这首歌的MTV搞到,然后传到6.cn去跟大家分享,哈哈。MTV还是蛮好找,就是想下载比较麻烦,这些网站都把真实地址隐藏的很深,看了半个多小时JS代码后,一无所获。厕所里撇了个条,忽然想到,浏览器的缓存里应该有。果不其然,这个鸟WMV文件的确在里头,真是众里寻她千百度……那个啥啊(忘词鸟)。

进入6.cn,搜索里一搜,发现费半天劲搞到手的MTV,居然已经被8,9个人上传过了,而且还有个什么完整版,日他哥!!

洗洗睡了

Linux下编译PHP时遇到的安装libmcrypt库的问题

Filed Under 技术备案

./configure –prefix=/usr/local/php-5.2.3 –enable-module=so –with-mysql=/usr/local/mysql-5.1.20 –with-apxs2=/usr/local/apache-2.2.4/bin/apxs –enable-mbstring –with-mcrypt

通过以上命令配置PHP时,遇到错误,总说找不到libmcrypt。由于这服务器是个裸机,很多必须的库都没装,必须一个一个的手动安装,可libmcrypt这个库我的确装过了。重试n遍,无解。在网上找了半天,终于在phpbuilder.com的一个maillist里发现一个哥们儿遇到的问题跟我差不多,按照他的方法做了一下,居然解决了。原文在这:http://www.phpbuilder.com/lists/php-install/2004032/0090.php

做为一个懒人,我就不逐句翻译了,摘抄解决办法如下:

——————————-
the solution
——————————-
Then I visited
http://mcrypt.hellug.gr/mcrypt/index.html
an learned that I have to install not only libmcrypt
but also mcrypt and libmhash.

Here is the to do:

libmcrytp:
———–
download libmcrypt-xxx.tar.gz
create the following directory: / usr / local / libmcrypt
copy the libmcrypt-xxx.tar.gz into that directory and move to it
run the following shell (>) commands: (’xxx’ is the version number)
> gunzip -c libmcrypt-xxx.tar.gz | tar xf -
> cd libmcrypt-xxx
> ./configure –disable-posix-threads
> make
> make check (note: ‘make check’ is optional)
> make install
then (update your environment) add in / etc / profile the following path:
/usr/local/libmcrypt/libmcrypt-xxxx
(note: as I run Red Hat 7.3 I set the line a f t e r the if-part
(id -u = 0 …) with: pathmunge /usr/local / libm….)
and add in / etc / ld.so.conf the following path: /usr/local/lib
then run ldconfig:
> ldconfig
now comes the important part:
> cd /usr/local/libmcrypt/libmcrypt-xxx/libltdl
> ./configure –enable-ltdl-install
> make
> make install

(maybe not needed: I also added a link in / usr / bin: )
(> cd /usr/bin)
(> ln -s /usr/lib/libltdl.so.3.1.0 ltdl)

mhash:
———–
download mhash-xxx.tar.gz
create the following directory: / usr / local / mhash
copy the mhash-xxx.tar.gz into that directory and move to it
run the following shell (>) commands: (’xxx’ is the version number)
> gunzip -c mhash-xxx.tar.gz | tar xf -
> cd mhash-xxx
> ./configure
> make
> make check (note: ‘make check’ is optional)
> make install

mcrypt:
———–
download mcrypt-xxx.tar.gz
create the following directory: / usr / local / mcrypt
copy the mcrypt-xxx.tar.gz into that directory and move to it
run the following shell (>) commands: (’xxx’ is the version number)
> gunzip -c mcrypt-xxx.tar.gz | tar xf -
> cd mhash-xxx
> ./configure
> make
> make check (note: ‘make check’ is optional)
> make install

back to PHP:
————–
move into your PHP installation directory
then the following command worked on my computer:
>
./configure –with-apache=/usr/local/apache/apache_1.3.29 –with-mysql –wit
h-mcrypt=/usr/local/mcrypt/mcrypt-2.6.4
> make
> make install

————–
that�s it

Hopefully that will help you to save some hours deep in the night :-)

打开了allow_url_fopen却不能远程访问URL

Filed Under 技术备案

今天发现以前帮别人写的一个信息采集类程序中的file和fopen函数在打开远程url时总是报错

Warning: file(): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in xxxxxxx on line 26

在使用file,fopen或file_get_contents函数打开远程URL时,是需要PHP配置中(php.ini)将allow_url_fopen的值设置为On的。
先去检查这个,没有问题,按照默认设置,这个值本身就是On的。

在网上搜索了一下,出现这个问题,除了allow_url_fopen的值之外 ,还有就是服务器的DNS问题,造成了路由结果中有部份路由执行超时,最终PHP执行时间超时导致用到这类型的函数时报错。

联系朋友,在服务器上添加了几个新的DNS地址后,此问题解决:)

GoogleReader的两个小玩意

Filed Under 互联网

google的东西为什么会这么多人追捧?可能很多原因来自于在很多细节的打磨上,比如下面说的GoogleReader里的一些小玩意。

进入GoogleReader后,点击Settings进入到设置界面,选择Goodies页。里面列出了几个关于GoogleReader的工具。 其中感觉最有意思的,就是“Put Reader in Your Bookmark”和“Subscribe as Your surf”这个两个东西了。

Subscribe as Your surf
简单的意思就是“收藏到GoogleReader”,仅仅把一个链接拖到书签栏里形成一个按钮,就可以通过点击这个按钮将当前页面内的Feed收藏到GoogleReader里。Google的程序员算是把Javascript玩到家了,真是佩服。

Put Reader in Your Bookmark
中文意思就是用你的书签阅读GoogleReader里的文章,只要把那个“Next”拖到你的书签栏里形成一个按钮,你就可以通过点击这个按钮来阅读Reader里所有没看过的文章。 这样,就可以不用进入到GoogleReader而一篇接一片的看所有未读的文章了,真是好方便。 还意外发现一个有意思的东西,当你的Reader里没有未读文章了,再点那个“Next”书签,就会来到一个提示页面,
上面写着: “恭喜,你已经来到了互联网的尽头” ,真是太能恶搞了。。。。。
c23da887-93ef-4ddf-a358-e830e6250b9b.JPG
我很有兴趣的点击了那个“End of the Internet”的链接:
ee721ecd-c205-4bf1-9400-329a3bb0e2f3.JPG