快过圣诞了,大家都在 release

Posted on 22nd December 2003 by Nio in 程序人生

MySQL Version 4.0.17 Now Available

A new version of the MySQL database, version 4.0.17, has been released. This is a maintenance release for the current MySQL production version, and it is now available in source and binary form from the MySQL download pages. MySQL 4.0.17 resolves all valid bugs identified by Reasoning Inc. and reported in a press release titled, “Reasoning Study Reveals Code Quality of MySQL Open Source Database Ranks Higher than Commercial Equivalents.” Reasoning's inspection study shows that the code quality of MySQL is six times better than that of comparable proprietary code.

PHP 5.0 Beta 3 released!

[i] [21-Dec-2003][/i] PHP 5.0 Beta 3 has been released. The third beta of PHP is also scheduled to be the last one (barring unexpected surprises). This beta incorporates dozens of bug fixes since Beta 2, better XML support and many other improvements, some of which are documented in the NEWS file.

Some of the key features of PHP 5 include:

* PHP 5 features the Zend Engine 2.
* XML support has been completely redone in PHP 5, all extensions are now focused around the excellent libxml2 library (http://www.xmlsoft.org/).
* SQLite has been bundled with PHP. For more information on SQLite, please visit their website.
* A new SimpleXML extension for easily accessing and manipulating XML as PHP objects. It can also interface with the DOM extension and vice-versa.
* Streams have been greatly improved, including the ability to access low-level socket operations on streams.

DocBook Simplified DocBook 1.1b1


About: DocBook is an XML and SGML dialect that enables you to author and store document content in a presentation-neutral form that captures the logical structure of the content. Using the modular DocBook stylesheets and related resources, you can transform, format, and publish your DocBook content as HTML pages and PDF files, and in many other formats, including TeX, RTF, FrameMaker MIF, JavaHelp, Microsoft HTML Help, UNIX man pages, and TeXinfo.

Changes: This release is based on DocBook XML 4.3. It includes support for HTML tables.

简单数据加密函数

Posted on 21st December 2003 by Nio in 程序人生

有时候对一些数据需要进行加密,若使用 DES 加密算法的话,又有些复杂,所以可以使用一种简单的算法实现,同时也支持自定义密钥。

(more…)

ADOdb extension available

Posted on 19th December 2003 by Nio in 程序人生

很不错的 extension,可以明显提高数据库操作效率。
Links
=====
D'load: http://phplens.com/lens/dl/adodb-ext-332.zip
Forum: http://phplens.com/lens/lensforum/topics.php?id=4
NOTE: This extension will work with ADOdb 3.31 or later.

The ADODB Extension
===================
This extension requires the ADOdb classes to be used for data
access. When ADOdb detects the constant ADODB_EXTENSION is set,
it will use the extension to perform the following speedups:

1. Emulation of recordcount is substantially faster. Up to 75%
faster for oracle oci8 for example. This does not help
mysql or postgresql as both databases support native record-
count.

Recordcount emulation occurs for every SELECT statement when
$ADODB_COUNTRECS = true, so Oracle, Sybase, Informix,
MSSQL, Access, and many ODBC/ADO database drivers will get
a big boost in speed.

2. The $rs->Move($offset) function is faster for databases that
do not provide a native seek function on the recordset.

3. $rs->GetArray() will use the highly optimized adodb_getall()
function.

You can directly call adodb extension functions:

1. function adodb_getall($rs)
Returns a 2D array containing all records in recordset from
current record position.

2. function adodb_movenext($rs)
Equivalent to $rs->MoveNext().

The constant ADODB_EXTENSION will contain the version number
of the extension, which should be 3.32 or later.

LICENSE
=======
BSD-style. (c) 2003 John Lim. All rights reserved.

TESTS
=====

I have stress tested this with

ab -n1000 -c20 http://server/php/test-adodb.php

with satisfactory results. The test php file is included in
this release.

WINDOWS
=======
This release should come with a pre-compiled version of adodb.
See the appropriate php-win-$version directory for php_adodb.dll.
You will need to copy it to your extension directory and modify
php.ini with

extension=php_adodb.dll

If you have Visual C++ 6.0, you can open the project file
adodb.dsp and compile adodb yourself on windows.

UNIX
====
To compile under *NIX as an .so extension

1. Go to adodb directory

2. Run phpize from the command-line (the $ is the prompt). If
phpize is missing, then you probably do not have the development
version of php installed. Download and install php from php.net.
Then the following should work:

$ phpize

This will create the appropriate configuration files.

3. You might get some warning messages to run aclocal.
I'm not sure about this, so run aclocal anyway.

4. Now run configure with

$ ./configure

5. Then compile files to create ./modules/adodb.so

$ make

6. Then install in extensions directory with

$ make install

7. You can either dynamicly load with

dl('adodb.so');

or add it to your php.ini with

extension=adodb.so

8. Have a look at the test scripts to see what you can do
with the adodb extension.

纪念莱特兄弟飞行百年

Posted on 18th December 2003 by Nio in 日常生活

GOOGLE
image

复制的莱特飞机模拟人类首次飞行时坠落
image

莱特兄弟
image

(more…)

关于 IE 客户端 MSXML 的安装检测

Posted on 17th December 2003 by Nio in 程序人生

检测客户端(IE 浏览器)是否安装了 MSXML 及其版本:

<script language=jscript>
var doc;

function w(s) {
  document.write(s);
  document.write("<br>");
}

function test(s,v) {
  var e;
  try {
    new ActiveXObject(s);
    w("MSXML version " + v + " 已经安装。");
    return 1;
  } catch(e) {
    w("MSXML version " + v + " 未安装。");
    return 0;
  }
}


var doc1=test("Microsoft.XMLDOM", "1.x"); 
var doc2=test("MSXML2.DOMDocument.2.0","2.x");
var doc3=test("MSXML2.DOMDocument.3.0","3.x");
var doc4=test("MSXML2.DOMDocument.4.0","4.x");
</script>

在网页中加入如下代码可以自动从服务器上下载 CAB 包安装 MSXML:

<object id="MSXML4"
classid="clsid: 88d969c0-f192-11d4-a65f-0040963251e5"
codebase="msxml4.cab#version=4,20,9818,0"
type="application/x-oleobject"
STYLE="display: none">
</object>