得到图片的长、宽及类型
May 15th, 2006 by song

[code]<?php
#########################################################
# #
# Release....: ImageVue.v1.4.PHP.NULL-WDYL #
# Date.......: 01/30/04 #
# Released...: WDYL #
# Protection.: CallHome, License Check, Refferer Links #
# #
#########################################################
define('GIF_SIG', chr(0x47).chr(0x49).chr(0x46)); // 'GIF'

define('PNG_SIG', chr(0x89).chr(0x50).chr(0x4E).chr(0x47).chr(0x0D).chr(0x0A).chr(0x1A).chr(0x0A));
Read the rest of this entry »

自动生成静态页面
May 15th, 2006 by song

在页面的开始部分加入CreateShtml() 即可。
demo

[code]<?php
include("include.php");
CreateShtml();

?>
asdfsadfasdfasdfjlkasdfjlksdf
asdfsadfjhsdjlkfsd
asdfjosdfjksdf[/code]

[code]function CreateShtml()
{
ob_start("callback_CteateShtml");
}
function callback_CteateShtml($buffer) Read the rest of this entry »

一个浏览器类
May 15th, 2006 by song

[file]attachment/1147698287.rar[/file]
这个类功能挺强的,能够查询用户使用的操作系统和浏览器,而且基本上是所有浏览器的,还包括微软未发行的操作系统Longhorn

Utf-8、gb2312都支持的汉字截取
May 15th, 2006 by song

[PHP]
[code]<?php

function cut_str($string, $sublen, $start = 0, $code = 'UTF-8')
{
if($code == 'UTF-8')
{
$pa = "/[\x01-\x7f]|[\xc2-\xdf][\x80-\xbf]|\xe0[\xa0-\xbf][\x80-\xbf]|[\xe1-\xef][\x80-\xbf][\x80-\xbf]|\xf0[\x90-\xbf][\x80-\xbf][\x80-\xbf]|[\xf1-\xf7][\x80-\xbf][\x80-\xbf][\x80-\xbf]/";
preg_match_all($pa, $string, $t_string);

if(count($t_string[0]) - $start > $sublen) return join('', array_slice($t_string[0], $start, $sublen))."...";
return join('', array_slice($t_string[0], $start, $sublen));
}
else
{
$start = $start*2;
$sublen = $sublen*2;
$strlen = strlen($string);
$tmpstr = ''; Read the rest of this entry »

(1)简繁互转的 PHP script
May 15th, 2006 by song

[file]attachment/1147697827.zip[/file]
(1)简繁互转的 PHP script

简转繁范例:
[url=http://web.dhjh.tcc.edu.tw/~gzqbyr/gbtest/index1.php]
[color=#22229c]http://web.dhjh.tcc.edu.tw/~gzqbyr/gbtest/index1.php[/color]
[/url]


繁转简范例:
[url=http://web.dhjh.tcc.edu.tw/~gzqbyr/gbtest/index.php]
[color=#22229c]http://web.dhjh.tcc.edu.tw/~gzqbyr/gbtest/index.php[/color]
[/url]


下载:
[url=http://web.dhjh.tcc.edu.tw/~gzqbyr/phpBB/dload.php?action=download&file_id=27]
[color=#22229c]http://web.dhjh.tcc.edu.tw/~gzqb … download&file_id=27[/color]
[/url]


相关讯息:
[url=http://web.dhjh.tcc.edu.tw/~gzqbyr/forum/viewtopic.php?t=2]
[color=#22229c]http://web.dhjh.tcc.edu.tw/~gzqbyr/forum/viewtopic.php?t=2[/color]
[/url]


(2)phpBB 的 MOD , 请参阅
[url=http://web.dhjh.tcc.edu.tw/~gzqbyr/forum/viewtopic.php?t=1]
[color=#22229c]http://web.dhjh.tcc.edu.tw/~gzqbyr/forum/viewtopic.php?t=1[/color]
[/url]

2款在线编辑器
May 15th, 2006 by song

2款在线编辑器

[file]attachment/1147697662.rar[/file]

[file]attachment/1147697648.rar[/file]

程序员 VS 妓女
May 14th, 2006 by song

1、都是靠出卖为生。
2、吃青春饭,人老珠黄肯定混不下去。
3、越高级收入越高,当然中间人的抽头会更高。
4、生活没有规律,以夜生活为主,如果需要,凌晨也要加班。
5、名声越大,越容易受到青睐。
6、必须尽最大可能满足客户各种各样变态的需求。
7、鼓励创新精神。
8、喜欢扎堆。程序员集中的地方称为软件园,妓女集中的地方叫红灯区。
9、流动性较大,正常情况下没有工会。
10、如果怀孕了,既不能做程序员,也不能做妓女。
11、都为防病毒的问题而烦恼。
12、当然,个中高手还专门以制毒传毒为乐。
13、一个是Microsoft,一个是Plug & Play。
14、工作状态相同。工作时精神高度集中,最怕外界干扰,工作完毕身心放松,体会到一种不可替代的工作快乐。
15、女孩子最好还是不要做这两个职业,但还是有很多女孩子做。
16、除非在转行以后,否则都不愿意结婚,没空儿啊。
17、程序员怕查户口的。妓女怕查房的。 Read the rest of this entry »

CSS技巧
May 14th, 2006 by song

1.CSS字体属性简写规则

一般用CSS设定字体属性是这样做的:

font-weight:bold;
font-style:italic;
font-varient:small-caps;
font-size:1em;
line-height:1.5em;
font-family:verdana,sans-serif;

但也可以把它们全部写到一行上去:

font: bold italic small-caps 1em/1.5em verdana,sans-serif;

真不错!只有一点要提醒的:这种简写方法只有在同时指定font-size和font-family属性时才起作用。而且,如果你没有设定font-weight, font-style, 以及 font-varient ,他们会使用缺省值,这点要记上。 Read the rest of this entry »

一段常用的Page_Load事件
May 14th, 2006 by song

protected void Page_Load(object sender, EventArgs e)
 {
  SqlConnection myConnection = new SqlConnection(“server=Localhost;database=pubs;uid=sa;pwd=;”);//创建SQL连接
  SqlCommand myCommand = new SqlCommand(“SELECT title, price FROM Titles WHERE price > 0″, myConnection);//创建SQL命令
 
  try
  {
   myConnection.Open();//打开数据库连接
   MyGrid.DataSource = myCommand.ExecuteReader();//指定 DataGrid 的数据源
   MyGrid.DataBind();//绑定数据到 DataGrid
   myConnection.Close();//关闭数据连接
  }
  catch(Exception ex)
  {
   //捕获错误
   HttpContext.Current.Response.Write(ex.ToString());
  }
 }

最强的p2p流媒体开源项目合集
May 14th, 2006 by song

由于想学习p2p流媒体所以在网上到处逛发现了一些好的p2p流媒体开源项目,和大家一起分享。

Icecast
http://www.icecast.org/index.php


theora
http://www.theora.org/

peercast
http://www.peercast.org/

freecast
http://www.freecast.org/index.html.en


actlab
http://actlab.tv/index.html

trevbus
http://www.trevbus.org/


Stream~2~Stream
http://s2s.sourceforge.net/

p2p-radio
http://p2p-radio.sourceforge.net/download/index.php.en


Nodezilla
http://evl.sourceforge.net/dl.html

SIDEBAR
»
S
I
D
E
B
A
R
«
»  Substance:WordPress   »