十二月 29, 2007 at 5:22 下午
由 Kim Chow · Filed under 计算机与网络
看着中央电视台著名节目主持人杨澜,拍摄的按个左右时间看电视!要我顿然的想法,FLASH能不能也具有这个功能呢?
现在我们要改装一下这个Flash作品.给她也注入记忆功能.
要实现的效果:
刷新或关闭页面的时候记住上次的播放头位置.
下一次打开页面动画接着上一次的位置继续播放.
实现代码如下(发布成AS1/AS2):
- var 52ria= SharedObject.getLocal('remember');
- if (52ria.data.pos != undefined) {
- gotoAndPlay(52ria.data.pos);
- }
- this.onEnterFrame = function () {
- 52ria.data.pos = _currentframe;
- };
- 52ria.flush();
Permalink
十二月 27, 2007 at 2:06 下午
由 Kim Chow · Filed under freebsd, linux, 操作系统
引用
新浪科技讯 2007年5月17日,新浪与中国电信联合召开新闻发布会,正式宣布双方在播客业务上结为全面合作伙伴关系,新浪播客将以联合品牌“新浪-互联星空播客”的全新形象跟网民见面。今后,网民不仅将体验到速度更流畅、内容更丰富的播客平台,而且无论在新浪网,还是互联星空网站都可使用播客的全部服务。
http://tech.sina.com.cn/i/2007-05-17/10091512192.shtml
Read the rest of this entry »
Permalink
十二月 18, 2007 at 10:14 上午
由 Kim Chow · Filed under PHP, 编程
USING
You can use the module by loading it in your PHP script and calling SQL Relay functions.
For example:
dl(“sql_relay.so”);
$con=sqlrcon_alloc(“adasz”,9000,”",”user1″,”password1″,0,1);
$cur=sqlrcur_alloc($con);
sqlrcur_sendQuery($cur,”select table_name from user_tables”);
sqlrcon_endSession($con);
for ($i=0; $i
{
printf("%s\n",sqlrcur_getField($cur,$i,"table_name"));
}
sqlrcur_free($cur);
sqlrcon_free($con);
Read the rest of this entry »
Permalink
十二月 15, 2007 at 10:41 上午
由 Kim Chow · Filed under PHP, 编程
昨天找到了进程后台运行的方法,今天测试了一下,发现popen的速度很慢,要40-50毫秒,exec更慢!类似的程序调用命令,都要经过系统调用,每次都开启一个php进程想必很慢。
Read the rest of this entry »
Permalink
十二月 11, 2007 at 9:37 下午
由 Kim Chow · Filed under freebsd, linux, 操作系统
- telnet www.example.com 80
After the response
- Trying 12.34.56.78...
- Connected to www.example.com.
- Escape character is '^]'.
enter these commands:
- TRACE /index.html HTTP/1.1
- Host: www.example.com
- [CR]
- [CR] = Carriage Return, for a blank line to signify the end of the headers being sent
If your server is “vulnerable” you will get a response back similar to this one (status 200):
- HTTP/1.1 200 OK
- Date: Sat, 17 Dec 2005 23:51:29 GMT
- Server: Apache/1.3.33 Sun Cobalt (Unix) mod_ssl/2.8.22 OpenSSL/0.9.6 PHP/4.3.10 mod_auth_pam_external/0.1 mod_perl/1.29
- Connection: close
- Transfer-Encoding: chunked
- Content-Type: message/http
- 30
- TRACE /index.html HTTP/1.1
- Host: www.example.com
- 0
- Connection closed by foreign host.
This is “bad” because an attacker could get cookie or other information returned by using a carefully crafted request.
To protect your server, you must login as root and add this block of code to every VirtualHost container in /etc/httpd/conf/httpd.conf and /etc/httpd/conf/vhosts/site[1-n]:
- # Block TRACE/TRACK XSS vector
- RewriteEngine On
- RewriteCond %{REQUEST_METHOD} ^TRAC(E|K)
- RewriteRule .* - [F]
Then restart Apache
- /etc/rc.d/init.d/httpd reload
Once you do that, you can perform the same test and the reply will look different:
- HTTP/1.1 403 Forbidden
- Date: Sat, 17 Dec 2005 00:01:06 GMT
- Server: Apache/1.3.33 Sun Cobalt (Unix) mod_ssl/2.8.22 OpenSSL/0.9.6 PHP/4.3.10 mod_auth_pam_external/0.1 mod_perl/1.29
- Last-Modified: Fri, 11 Feb 2005 05:30:57 GMT
- ETag: "601d904-4dd-420c4311"
- Accept-Ranges: bytes
- Content-Length: 1245
- Content-Type: text/html
-
- ... HTML content snipped ...
Permalink
十二月 11, 2007 at 10:26 上午
由 Kim Chow · Filed under 计算机与网络
1 概述
在一个软件项目开发中,系统测试是保证整体项目质量的重要一环,本文将就网站的测试技术及相应的自动测试工具做一个简要的介绍。主要就如下几个方面进行探讨:
功能测试
性能测试
安全性测试
稳定性测试
浏览器兼容性测试
可用性/易用性测试
链接测试
代码合法性测试
Read the rest of this entry »
Permalink
十二月 5, 2007 at 3:17 下午
由 Kim Chow · Filed under linux, 操作系统
在网上找了很多资料,大部分的SVN都需要跟Apache结合使用。基于对Linux不是太熟悉,不敢重装Apache,只好想其他办法来解决这问题。其实,与Apache结合用户权限管理起来更方便。
安装:
./configure –with-apr=apache源码目录/scrlib/apr –with-apr-util=apache源码目录/scrlib/apr-util
make
make install
使用:
开启服务:
svnserve -d –root=SVN项目保存目录
建立项目命令:
svnadmin create project_name SVN项目保存目录/project_name
建立项目之后,进入文件夹,可以看到一个conf的文件夹。进入文件夹可以看到3个文件(如果没有passwd文件,可以用vi创建),
编辑 svnserve.conf 把anon-access = read ,auth_access = write
还有password-db = passwd 的注释去掉,还有[general]的注释也要去掉。
vi passwd文件,如果是新文件,则输入:
[user]
your_name = your_password
这里设置的your_name是你的用户名,your_password是你的密码,这个是访问SVN必要的通行证。
Permalink
十二月 3, 2007 at 10:38 下午
由 Kim Chow · Filed under Jabber
找到几个PHP应用Jabber的例子
http://code.blitzaffe.com/pages/phpclasses/files/jabber_client_52-11
http://zeank.in-berlin.de/jsjac/#dl
还有在www.phpclasses.org 也有不少Jabber应用的类。
明天继续研究。
Permalink