初识google.cn 的类flash的 Css Sprites 效果
Posted on 2008-05-10      →阅读全文
    Css Sprites,就是将页面中所有css装饰图合并成一个较大的图,然后用到特定的css装饰图的时候就利用css的background-image:大图,background-position:小图在大图中的x位置,小图在大图中的y位置
    优点:利用Css Sprites可以提升网站的性能,普通制作方式下的大量图片,现在合并成一个图片,大大减少了HTTP的连接数。HTTP连接数对网站的加载性能有重要影响。

按照yahoo的 rules for high performance web sites的原则,应当较少Client与Server端间的HTTP Request次数。

通过CSS Sprites方法将多张图片组装成单独的一张图片,可以有效减少HTTP请求的次数。



升级到 nginx 0.6.30 和 php-5.2.6
Posted on 2008-05-06

解决了部分问题,还是有php-cgi 在 xcache 下产生 segfault 的问题.   好难解决。

看来要放弃xcache了。

xcache导致php segfault
http://night9.cn/2007/05/21/54.html

原来Zend Optimizer会捕捉segfault
http://blog.sina.com.cn/s/blog_482f10a4010005av.html

在linux下制作bt种子文件
Posted on 2008-05-01 作者: amao

http://www.createtorrent.com/   提供了在linux命令行下面制作bt种子的程序

Create BitTorrent files from the command line

在命令行下面下载bt,推荐使用rtorrent。


用javascript让页面的外部连接都在新窗口打开
Posted on 2008-04-26

<script type="text/javascript">
function Amao(){}
Amao.prototype.SetAnchor = function(){
 var uri = location.href;
 if(uri.search(/^(http)/i) != "-1" ){//  有http://
  var pattern = new RegExp("http:\/\/([^/]+?)\/");
  var result = uri.match(pattern);
  if (result != null) {
   var host = result[0];   // Contains "http://www.example.com"
  }
  
  var parttern2 = new RegExp(host,"i");
  var anchors = document.getElementsByTagName("a");
  for(var i = 0; i < anchors.length; i++){
   var a = anchors[i];
   if(a.href.search(parttern2) == "-1" ){
    a.target = "_black";
   }
  }
 }
}
var amao = new Amao();
amao.SetAnchor();
</script>

放在页面的最后面,或者在body的onload 调用amao.SetAnchor();


C# (asp.net) 中的 TextRenderer.MeasureText 替代 PHP 的 imagettfbb
Posted on 2008-04-25
private void MeasureText1(PaintEventArgs e)
{
    String text1 = "Measure this text";
    Font arialBold = new Font("Arial", 12.0F);
    Size textSize = TextRenderer.MeasureText(text1, arialBold);
    TextRenderer.DrawText(e.Graphics, text1, arialBold,
        new Rectangle(new Point(10, 10), textSize), Color.Red); 
}

windows 下安装 php_imagick.dll(Image magick Functions)
Posted on 2008-04-24      →阅读全文
因为依赖于 GraphicsMagick
先要下载GraphicsMagick来安装。http://sourceforge.net/project/showfiles.php?group_id=73485
下载里面的     GraphicsMagick-1.1.11-Q16-windows-dll.exe  
安装后把 C:\Program Files\GraphicsMagick-1.1.11-Q16 下面的dll文件复制到  C:\WINDOWS\system32

PHP官方推荐的 linux 下面三个chm 浏览器(查看器)
Posted on 2008-04-23      →阅读全文
大家都知道php手册有一个格式的离线包,叫做CHM格式,在windows下面我们phper都习惯使用这个手册。
在其他系统呢,php.net  提供了下列链接!

10大优秀开源网络管理工具(流量监控)
Posted on 2008-04-23      →阅读全文
转载ITmanagement的一个文章;全文的部分翻译。个人以为这个文章的把网管的开源工具做了一个小结,英文好的同志请直接访问原文地址:click Here

我推荐Cacti zenoss OpenNMS

不过一般还是建议:
服务器访问记录 ntop+rrd
apche或IIS网站访问信息管理 awstats

1 hours 47 minutes 能跑多少流量
Posted on 2008-04-22      →阅读全文
Network Usage
Device Received Sent Err/Drop
lo 3.21 GB 3.21 GB 0/0
eth1 3.34 GB 2.36 GB 0/0

nginx 0.5.35 升级到nginx 0.6.29
Posted on 2008-04-22
解决在64位操作系统下面
    *) Bugfix: an alert "sendmsg() failed (9: Bad file descriptor)" on some 
64-bit platforms while reconfiguration.

郁闷的是配置文件的相对路径错了。
原来默认是 include conf/mime.types;
现在编程了 include mime.types;
害我不能平滑过渡,停止了web服务,才升级完成。

通过网络(ntp)来更新系统时间
Posted on 2008-04-21      →阅读全文
ntpdate north-america.pool.ntp.org
这个依赖 yum install ntp
写到硬件使用 hwclock --systohc 
可以通过tzselect来设置时区,获取直接修改/etc/sysconfig/clock

共34页:  [1]  2  3  4  5  6 » ... 最后页