Dec 21 2008

合唱团

Published by Jone under 生活

一群人反复靠近 反复酝酿必要的情绪 和
不必要的冲动
我站在菊的后面 萍的左面 指挥的反面 和
欲望的中间
直对着我的校门

我高声歌唱 声音被领唱打断 被合唱淹没
被肺粗暴地压迫
当铃声响起时 我流下忧虑的泪水 因为这群人
即将解散 分赴祖国各地 退为荣誉成员

站台上 一片混乱的景象 我们和民工一起 向着
火车招手 招着招着 萍就不见了
死于火车远去的方向
这是五年以后的事情

我 我们 唱过许多歌 和 不是歌的练习曲
唱过山中故乡和水上海鸥 无望的爱和奋勇的前进
菊说 能进合唱团多好啊

 

 

 

夜里浑身酸疼

依稀好像捧着一本书

依稀又读到了这些语句

于是 依稀又想起了一个人的名字——杜马兰

读他的诗 会让你感悟生活中的心疼

读他的诗 会告诉你 我们为什么不歌唱

读他的诗 会让你带着希望快乐地生活!

 

comments(0)

Dec 12 2008

Smarty生成静态页面

Published by Jone under PHP

记录一个,Smarty是很聪明的

ob_start();//开启缓冲区
$smarty->assign(“a”,$a);
$smarty->display(”temp.html”);
$html_content= ob_get_contents(); //读取缓冲区的数据
ob_end_clean();//关闭缓冲区

$htm_content里头的东西就是想要的东西了,将它写入页面就可以了。

comments(0)

Nov 7 2008

进享未来——2008微软技术大会北京会场开幕式

Published by Jone under 工作

时间:08年11月6日

地点:奥体中心

 1

2

3

虚拟机

介绍了两款产品及Drmo:Windows Server 2008 Hyper-V与Windows HPC Server 2008

SQL Server 2008

按老外的说法:很快很漂亮!

Visual Studio 2008

这个不用介绍了,2010版本将会2009年底推出,支持Surface开发等。

云计算

以前是"Hello World",现在是"Hello Cloud"的时候了!

WPF & Silverlight

腾讯展示了两款Silverlight开发的产品:滔滔QQLive的酷炫版,另外还展示了实验中的不同技术开发的QQ,其中包括用Silverlight开发的网页版。

Windows Azure

用于云计算的操作系统

Surface

支持多点触摸的玩意

提出了由图形化人机界面(GUI:Graphical User Interface)向自然人机界面(NUI:Natural User Interface)转变的必然性,现场进行了震撼的交互Demo和视频Demo。

Windows Live Mesh

从Live Mesh可以看出,微软已迈出从PC领域转型到“云计算”最为野心勃勃的一步,并将重新取得主导权。

总结:

这次大会,介绍的大部分新技术都是基于云端计算,云计算将会是大势所趋,也是微软这次向开发者力推的新的技术趋势。另外一个信息就是:微软将来的操作系统,都会支持多点触摸操作。Coder们,你们准备好了吗。

 

comments(0)

Oct 29 2008

手机的又一个惊天秘密

Published by Jone under 生活

手机的又一个惊天秘密!!你发现了吗?所有的手机都无法解决的一个毛病,你的有吗?据荷兰通信权威发现,今年所有手机计算器用2008除以8.032,屏幕会自动显示机主姓名,很奇怪、很神话的事情,暂时无人能破解其中奥秘。

comments(0)

Oct 5 2008

phpMyAdmin 3.0的安装配置

Published by Jone under PHP

郁闷,我不会用phpMyAdmin自带的那个setup步骤配置,一直都是直接通过改config.ini.php来配置的

过程如下:

1.从phpMyAdmin/libraries/下拷贝config.default.php到phpMyAdmin下,并改名为config.ini.php

2.用editplus或其它编辑器打开phpMyAdmin/config.ini.php,修改:

$cfg['PmaAbsoluteUri'] = 'http://127.0.0.1/phpMyAdmin';//phpMyAdmin的安装路径
$cfg['blowfish_secret'] = 'hejone';//加密密匙,可随意更改。
$cfg['Servers'][$i]['host'] = 'localhost'; // MySQL的主机名称或者IP地址
$cfg['Servers'][$i]['port'] = '3306′; // MySQL端口 - 空白将用默认端口3306
$cfg['Servers'][$i]['auth_type'] = 'cookie'; // 认证方式 (config, http or cookie based)?
$cfg['Servers'][$i]['user'] = 'root'; // MySQL用户,如 root
$cfg['Servers'][$i]['password'] = 'pswd'; // MySQL用户密码

3:保存

搞定 !

 

comments(0)

Sep 21 2008

经济危机

Published by Jone under 生活

次贷危机、雷曼破产、美国五大投行倒了仨,英国诺森罗克银行遭储户挤兑。

最近的经济形势,对很多人来说就像一张考卷,对我也是这样,如果做对了,会赚点小钱,做错了也不会有太大的损失。毕竟我在股市上投入的不多。

但是,如果经济一直这么下去的话,肯定会影响明年的收入。

唉,不怕人说我俗!谁让我太需要钱了呢~

 

发点牢骚而已,抓紧看《货币战争》!

 

另,书本上说的只有资本主义才有的倒牛奶事件也发生在中国了,可怜的那些奶农,成了无良商家的牺牲品。

comments(0)

Aug 24 2008

Enabling URL Rewrite for PhpLD 3.3.0

Published by Jone under PHP

Nginx :
Here's my configure in nginx.conf:

if (!-e $request_filename) {
        rewrite ^/latest-links/.htm[l]?$ /index.php?list=latest last;
                rewrite ^/top-hits/.htm[l]?$ /index.php?list=top last;
                rewrite ^/latest-articles/.htm[l]?$ /index.php?list=latestarticles last;
        rewrite ^/(.*)detail/link-(.*)\.htm[l]?$ /detail.php last;
        rewrite ^/(.*)articles/article-(.*)/.htm[l]?$ /article.php last;
        rewrite ^/(.*)authors/author-(.*)\.htm[l]?$ /author.php last;
        rewrite ^/(.*)page-[0-9]+\.html$  /index.php last;
        rewrite ^/(.+)\.html$ /page.php?name=$1 last;
        rewrite ^/(.*)$ /index.php last;
 }

Apache:
Here’s my modified .htaccess file:

#################################################
##           Apache Server Settings            ##
#################################################

# Prevent .htaccess and .htpasswd files from being viewed by web clients
<Files "^\.ht">
    Order allow,deny
    Deny from all
</Files>

# Protect files
<Files ~ "^(.*)\.(inc|inc\.php|tpl|sql)$">
  Order deny,allow
  Deny from all
</Files>

# Protect directories
<Files ~ "^(backup|files|images|include|lang|libs(/.+)?|temp(/.+)?|templates(/.+)?|javascripts(/.+)?)$">
  Order deny,allow
  Deny from all
</Files>

# Disable directory browsing
Options -Indexes

# Follow symbolic links in this directory
Options +FollowSymLinks

# Override PHP settings that cannot be changed at runtime
# (If your server supports PHP settings via htaccess you can comment following two lines off)
# php_value register_globals   0
# php_value session.auto_start 0

# Customized error messages
# ( If you are running in a subfolder please add it, example: "directory/index.php?httpstatus=404" )
ErrorDocument 404 index.php?httpstatus=404

# Set the default handler
DirectoryIndex index.php

# URL rewrite rules
<IfModule mod_rewrite.c>
   RewriteEngine On


   #Make sure RewriteBase points to the directory where you installed phpLD.
   #Example: "/phpld" if your installation is in a "phpld" subdirectory.

   #RewriteBase /

   ##Latest Links Rewrite
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteCond %{REQUEST_FILENAME} !-d
   RewriteCond %{REQUEST_FILENAME} !-l
   RewriteRule ^latest-links\.htm[l]?$ index.php?list=latest [QSA,NC,L]

   ##Top Hits Rewrite
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteCond %{REQUEST_FILENAME} !-d
   RewriteCond %{REQUEST_FILENAME} !-l
   RewriteRule ^top-hits\.htm[l]?$ index.php?list=top [QSA,NC,L]

   ##Latest Articles Rewrite
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteCond %{REQUEST_FILENAME} !-d
   RewriteCond %{REQUEST_FILENAME} !-l
   RewriteRule ^latest-articles\.htm[l]?$ index.php?list=latestarticles [QSA,NC,L]

   ##Details Link Page Rewrite
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteCond %{REQUEST_FILENAME} !-d
   RewriteCond %{REQUEST_FILENAME} !-l
   RewriteRule (.*)detail/link-(.*)\.htm[l]?$ detail.php [QSA,NC]

   ##Article Page Rewrite
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteCond %{REQUEST_FILENAME} !-d
   RewriteCond %{REQUEST_FILENAME} !-l
   RewriteRule (.*)articles/article-(.*)\.htm[l]?$ article.php [QSA,NC]

   ##Author Page Rewrite
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteCond %{REQUEST_FILENAME} !-d
   RewriteCond %{REQUEST_FILENAME} !-l
   RewriteRule (.*)authors/author-(.*)\.htm[l]?$ author.php [QSA,NC]

   ##Pagination Rewrite
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteCond %{REQUEST_FILENAME} !-d
   RewriteCond %{REQUEST_FILENAME} !-l
   RewriteRule (.*)page-[0-9]+\.html$  index.php [QSA,NC,L]

##Pages redirect
   RewriteCond %{REQUEST_URI} !page-[0-9]+\.html?$
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteCond %{REQUEST_FILENAME} !-d
   RewriteCond %{REQUEST_FILENAME} !-l
   RewriteRule ^(.+)\.html$ page.php?name=$1 [NC,QSA,L]

   ##Category redirect
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteCond %{REQUEST_FILENAME} !-d
   RewriteCond %{REQUEST_FILENAME} !-l
   RewriteRule ^(.*)$ index.php [QSA,L]
</IfModule>

comments(0)

Aug 23 2008

js如何获取flash版本

Published by Jone under AS3

可以用下面一个来自google的函数,.

function _uFlash() {
 var f = "-", n = navigator;
 if (n.plugins && n.plugins.length) {
  for (var ii = 0; ii < n.plugins.length; ii++) {
   if (n.plugins[ii].name.indexOf('Shockwave Flash') != -1) {
    f = n.plugins[ii].description.split('Shockwave Flash ')[1];
    break;
   }
  }
 } else if (window.ActiveXObject) {
  for (var ii = 10; ii >= 2; ii--) {
   try {
    var fl = eval("new ActiveXObject('ShockwaveFlash.ShockwaveFlash." + ii + "');");
    if (fl) {
     f = ii + '.0';
     break;
    }
   } catch (e) {
   }
  }
 }
 return f;
}
//alert(_uFlash());

comments(0)

Aug 1 2008

as3如何删除所有Sprite

Published by Jone under AS3

//删除所有Sprite

   while(this.numChildren > 0) {
       this.removeChildAt(0);
   }

comments(0)

Jul 21 2008

Google的Flash 索引

Published by Jone under AS3

摘自Google官方,http://googlechinablog.com/2008/07/flash.html

原文:Improved Flash indexing
发表于:2008年6月30日星期一,晚上9:31

我们收到过许多期望我们改进对 Adobe Flash 文件索引问题的建议。今天,索引团队的软件工程师 Ron Adler 和 Janis Stipins ,将就我们最近在 Flash 文件索引编制上取得的改进与大家进行更深入的探讨和交流。

问:目前哪些 Flash 文件能更好地被谷歌索引到呢?
我们改善了对所有类型 SWF 文件中的文字内容的索引能力,其中包括像按钮或菜单这样的 Flash “小工具”,独立自成一体的 Flash 网站,以及所有介于两者之间的 Flash 形式。

问:这些 Flash 文件中的哪些内容能被谷歌更好地索引呢?
用户在与您的 Flash 文件互动过程中所看到的一切文本内容都将得到更好地索引。如果您的网站包含 Flash ,其中的文字内容会被 Google 用来生成您网站的摘要。同时,出现在 Flash 文件中的文字可以用来匹配用户在 Google 搜索框中输入的搜索查询。

除了索引 Flash 文件中的文本内容,我们现在也能够识别在 Flash 文件中的出现的 URL ,并且把这些链接纳入搜索引擎机器人爬行的目标队列中,就像对待那些非 Flash 网页中出现的 URL 一样。例如,如果您的 Flash 应用程序中包含指向您网站内部页面的链接,Google 现在能够更好地发现并抓取您的网站。

问:那么 Flash 文件中包含的非文本内容呢,比如图片?
目前,我们只能识别和索引 Flash 文件中的文本内容。如果您的 Flash 文件里只有图片,我们将不能识别和索引出现在这些图片中的任何文字。类似地,如果一个 Flash 按钮没有任何附属的文字的话,我们将无法对这类指向特定链接的 Flash 按钮生成任何錨文本。

还应注意到的是,我们无法索引 FLV 文件,比如在 YouTube 上播放的视频,因为这些文件没有包含任何文字元素。

问:Google 是怎样识别 Flash 文件里的内容呢?
我们开发出了一种算法,这种算法可以使 Google 机器人能够模仿人类通过点击按钮、输入内容等方式来了解 Flash 文件。我们的算法能够记住沿途它遇到的所有文字内容,其后这些内容都能被索引到。我们无法告诉您更多的保密细节,但是我们可以告诉您,通过使用 Adobe 的新型可检索性 SWF 数据库,这种算法的有效性得到了进一步提高。

问:我怎样做才能使 Google 索引到我的 Flash 文件中出现的文本呢?
基本上,您不需要做任何事情。我们已经取得的技术改进,使这项功能的实现,无需网页设计者或网站管理员做任何特别的操作。如果您的网站上有 Flash 内容,我们会在现有技术能力的基础上,尽最大能力对它们自动进行索引(详见接下来的问题)。

也就是说,您应该了解 Google 现在已经可以识别那些展现在您网站访问者面前的文字信息。如果你希望 Google 忽略一些次要内容,如“版权”或“加载”等信息,您可以考虑把那些文本替换为图片,这样它们就不会被我们抓取到了。

问:在索引 Flash 文件上,Google 遇到的主要技术难题是什么?
目前的问题主要体现在三个方面,这也正是我们在努力解决的:

1、Googlebot 不能执行某些类型的 JavaScript 程序。因此,如果您的网页通过 JavaScript 加载 Flash 文件的话,Google 可能无法识别该 Flash 文件,在这种情况下,它将不会被索引到。
2、目前,我们还无法把那些通过您的 Flash 文件加载的外来内容和您的 Flash 文件整合起来。也就是说,如果您的 Flash 文件加载了一个 HTML文件,或一个 XML 文件,或另一个 SWF 文件等等,Google 将分别索引这些资源,但是它们将不会被认为是您 Flash 文件内容的一部分。
3、虽然我们能够索引在网络上出现的几乎所有语种的 Flash ,但在识别用双向语言书写的 Flash 内容还有一定困难。在这个问题解决之前,我们将无法识别和索引 Flash 文件中的希伯来文或阿拉伯文的内容。

但是,在这些问题上我们也已经取得了相当的进展,所以,敬请期待我们进一步的改进!

附:
改进之前搜索结果中的 Flash 网站
    


改进之后搜索结果中的 Flash 网站, 搜索查询 [nasa deep impact animation]
    

comments(0)

1 2 3