Thinking in Peak
是技术?是信息?还是思想?! 是垃圾?是堆积?还是思想?! Version:1.2
Page layout from PHP& More
 Peak.name

Home | About me | Life history | Mood story | >>Thinking in Peak | My Diary | Photography | Project | Contact me

Search


Categories
Recent Archives
February 12 - February 18
November 20 - November 26
July 31 - August 06
July 24 - July 30
June 26 - July 02
May 29 - June 04
March 27 - April 02
February 27 - March 05
January 09 - January 15
November 14 - November 20
>>> All archives <<<
Links
24hour online
Charset.org
Peak Jing's home page
Peak正在读看听...

BlogBus.Com
东方网景商务网站
超越PHP

美丽新世纪
wendy's Space
avenger::Blog()
Lemon & YB
Snoopy Home
Donna's Story
ZhaoJMan : My Eye(s)
混混程序员
Raid Cheng's Blog
Boyan.net
一个军人的旅程

IBUZZO, THE SOCIALIST
De Dream
人生攻略
海风乱吹
妖蛊
ByBye

跳舞的小蚂蚁
小三摄影
Momoko World
车东BLOG
LEON也博客
Vol de Nuit
Eosin的什锦糖果盒子
fanroc的凡人生活
1-Game@第1游戏
Tools
Recent Comments
Share bookmarks
Syndicate this site (XML)
Free Guestmap from Bravenet.com

Count :
Powered by MT3.11



June 28, 2005


爱心援助Blogger王俊(Befresh)

  您的爱心,可以救活一名认真的Blogger

  befresh(王俊),一名27岁的blogger,需要进行骨髓移植,为了拯救他的生命,希望能得到您的帮助,您的爱心可以帮他度过难关。

  befresh(王俊),一名27岁的blogger,本来有一份感兴趣的工作、不错的前途、贴心的家人和知心的朋友,生活一直充实而平静,可是,他现在已经无力更新blog了,他检查出了可以致命的“骨髓增生异常综合症”,因为发现得及时,他有很大的机会通过移植骨髓的方法治好;而他的妹妹,又正好可以提供合格骨髓来源。可是,他是家里的唯一的经济支柱,而30万的治疗费用,对他的家庭来说,根本无力承担。

  为了拯救他的生命,希望能得到您的帮助,您的爱心可以帮他度过难关,详情请见http://befresh.bjug.org,王俊的blog:http://befresh.blogbus.com

  我们有200万blogger,大家携手,献一些绵薄之力,参与的人多一些,请捐出一点心意,哪怕是10元,20元,可以救回一条年轻认真的生命啊,谢谢!

  Blogbus的爱心援助公告:http://blogbus.blogbus.com/logs/2005/06/1289853.html中让人感动的blogger评论:

我不认识他,但心里为这样一位朋友心痛。其实象他这样的人距离我们并不远:他是勤奋的程序员,他是一家的支柱。。。所以,我要献点爱心!大家都来献点爱心:100元,200元,轻轻地点一下鼠标的功夫,你的生活不会有任何的改变,却给王俊带来生的希望。 Sicilia(neverdoright.blogbus.com) 发表于2005-06-27 17:09

  主要援助方式:

  爱心捐款:

    工商银行
    户名 王俊
    帐号 0200 2008 0102 3428 807
    开户行 工商银行北京市西内所

    招商银行
    户名 王俊
    帐号 9555 5001 0200 2820
    开户行 招商银行 北京分行

    中国银行
    户名 王俊
    帐号 4021400-0188-001204-0
    开户行 北京西直门支行

  帮助宣传:

   - 请到http://befresh.bjug.org 留下你对他的祝福;
   - 请在MSN上修改您的名字,我们都写上 [祝福后山];
   - 请修改您MSN的头像为我们提供的图标:


   - 增加官方网站的地址 http://befresh.bjug.org到MSN名字后面的个人信息;
   - 请看到此文的Blogger,在您的Blog上link此文,并Trackback到王俊的Blog:
http://befresh.blogbus.com
   - 请看到此信息的人,帮助一起宣传http://befresh.bjug.org ,我们需要您的帮助
   - 在您的Blog或网站,加上用我们提供的LOGO,并连接到http://befresh.bjug.org
 

Posted by Peak at June 28, 2005 07:15 PM | Comments (0) | TrackBack (26)


July 14, 2004


Icon(.ico)图标制作方法简单教程

Wendy今天在她的Blog想要了解Icon(.ico)图标的制作方法,制作后并要加到网页中做鼠标指针图标使用,方法很简单就找到了,但她已经不在线,索性写一个简单教程,以方便更多的人。
另外,是不是发现很多人的BLOG在访问时IE中有一个小图标,或是在RSS聚合工具中也有小图标,都是使用这样的Icon(.ico)图标,不访也试试。
一、准备:
1、下载并安装Icon制作工具,这里以IconCool V3.4为例,此软件为共享软件,下载试用请点击这里
IconCool V3.4的About
2、准备好GIF/JPEG/BMP等格式的图片,图片不要太大,Icon(.ico)图标一般是32像素*32像素。
二、转换图片到图标:
1、打开IconCool V3.4,选择标准工具栏下的Icon Extractor/Converter标签,如下图:
打开IconCool V3.4,选择标准工具栏下的Icon Extractor/Converter标签
2、在左侧文件目录树中选择准备好的GIF/JPEG/BMP等格式的图片的目录,在右侧选中要处理的图片,并点击右键,在快捷菜单中选择Save Icon in Files,如下图:
在左侧文件目录树中选择准备好的GIF/JPEG/BMP等格式的图片的目录,在右侧选中要处理的图片,并点击右键,在快捷菜单中选择Save Icon in Files
3、在新弹出的Save as...对话框Formats单选按钮组中选择第一项Icon(*.ico),实际也是默认选中的,点击OK按钮,如下图:
在新弹出的Save as...对话框Formats单选按钮组中选择第一项Icon(*.ico),实际也是默认选中的,点击OK按钮
4、在新的弹出Import from...对话框中逐个文件确认具体参数,首先要点击这个对话框中的All或用鼠标在原图上选取指定位置,以确定Icon(.ico)的图片,在Preview中阅览最终效果,点击OK确认设置,如下图:
在新的弹出Import from...对话框中逐个文件确认具体参数,首先要点击这个对话框中的All或用鼠标在原图上选取指定位置,以确定Icon(.ico)的图片,在Preview中阅览最终效果,点击OK确认设置
5、在弹出的确认对话框中选择"是(Y)"(此处文字会根据操作系统的语言而变化)即完成转换,如下图:
在弹出的确认对话框中选择
三、加到网页中做鼠标指针图标
其实这步很简单,实现这个功能是使用CSS,在HTML页面的head标记中加入一些CSS代码即可,加入什么样的代码可以根据不到的需要来决定,如下要在整个页面中都加上一个图标则可将下列代码加入:

<style type=text/css>
<!--
BODY{cursor:url(1.ico);}
-->
</style>
其中1.ico可以是相对路径,也可以是绝对路径,漂亮的网页制定等待着你的实现呀。如果有什么问题或意见请与我联系,Icon(.ico)图标的制作方法实际中比很多的东西,IconCool也有很强大的东西,在此只是写出一个小的例子供大家使用。
声明:IconCool V3.4的文字、标志和界面所有权力归属于Newera,本站只是介绍软件的使用,不代表拥有任何权力。转载此文章请注明出处。

Posted by Peak at July 14, 2004 10:01 AM | Comments (2) | TrackBack (2)


July 05, 2004


OpenLDAP Developers' Day - San Diego - 2004

OpenLDAP LogoFrom : http://www.openldap.org/conf/odd-sandiego-2004/
The OpenLDAP Project will hold its third OpenLDAP Developers' Day conference in San Diego, California on 6 August 2004.
This event brings together developers of OpenLDAP Software, related software, directory researchers, and other interested community members to discuss ongoing and future engineering efforts.
Space for this event is limited. Early registration is recommended.

Confirmed speakers include:

Speaker Topic
David O'Rourke and Jason Townsend (Apple) Apple's Open Directory and OpenLDAP Development
Howard Chu (Symas) CN=config and Overlays
Jong Hyuk Choi (IBM) Adaptive Cache Tuning
Kurt Zeilenga (OpenLDAP Project) LDAP Distributed Operations
Neil Dunbar (HP) Enterprise Directory requirements for OpenLDAP
Quanah Gibson-Mount (Stanford) Higher Education and Directory Technologies
Sang Seok Lim (IBM) Implementing GSER and Component Matching

Developers and others interested in presenting at ODD#3 should contact the event chair, Kurt Zeilenga <kurt@openldap.org>, providing a brief summary of material you would like to present. Please do so as soon as possible.

Sponsors

This event is sponsored by Symas Corporation and is hosted by IBM Linux Technology Center. The event is organized by the The OpenLDAP Foundation.
Organizations interested in sponsoring the event should contact Kurt Zeilenga <kurt@openldap.org>.

Registration

Registration is now open at http://www.acteva.com/booking.cfm?bevaid=68240. Regular registration (through July 19) is US$90. Late registration will be US$120.
Discounts are available to presenters and full-time students. Please contact Kurt Zeilenga <kurt@openldap.org> for details.
Space is limited. This event will likely sell out. Please register as soon as possible to ensure your space.
Registrations canceled prior to July 19 are eligible for a full refund. No refund will be given for registrations canceled after 19 July 2004.

The event will be held at:

IBM La Jolla
4660 La Jolla Village Drive
Suite 300
San Diego, California 92122

Nearby hotels include:

to : http://www.openldap.org/conf/odd-sandiego-2004/

Posted by Peak at July 05, 2004 11:43 AM | Comments (0) | TrackBack (56)


May 28, 2004


[转载]UTF-8 and Unicode FAQ

来源:http://www.linuxfans.org/
by Markus Kuhn
中国LINUX论坛翻译小组 xLoneStar[译] 2000年2月

这篇文章说明了在 POSIX 系统 (Linux,Unix) 上使用 Unicode/UTF-8 所需要的信息. 在将来不远的几年里, Unicode 已经很接近于取代 ASCII 与 Latin-1 编码的位置了. 它不仅允许你处理处理事实上存在于地球上的任何语言文字, 而且提供了一个全面的数学与技术符号集, 因此可以简化科学信息交换.

UTF-8 编码提供了一种简便而向后兼容的方法, 使得那种完全围绕 ASCII 设计的操作系统, 比如 Unix, 也可以使用 Unicode. UTF-8 就是 Unix, Linux 已经类似的系统使用 Unicode 的方式. 现在是你了解它的时候了.

什么是 UCS 和 ISO 10646?
什么是组合字符?
什么是 UCS 实现级别?
什么是 Unicode?
那么 Unicode 和 ISO 10646 不同在什么地方?
什么是 UTF-8?
什么编程语言支持 Unicode?
在 Linux 下该如何使用 Unicode?
我该怎样修改我的软件?
C 对 Unicode 和 UTF-8 的支持
怎样激活 UTF-8 模式?
我怎样才能得到 UTF-8 版本的 xterm?
xterm 支持组合字符吗?
xterm 支持半宽与全宽 CJK 字体吗?
最终 xterm 是否会支持从右到左的书写?
我在哪儿能找到 ISO 10646-1 X11 字体?
我怎样才能找出一个 X 字体里有哪些字形?
与 UTF-8 终端模拟器相关的问题是什么?
已经有哪些支持 UTF-8 的应用程序了?
有哪些用于改善 UTF-8 支持的补丁?
Postscript 字形的名字与 UCS 代码是怎么关联的?
X11 的剪切与粘贴工作在 UTF-8 时是如何完成的?
现在有没有用于处理 Unicode 的免费的库?
各种 X widget 对 Unicode 支持的现状如何?
有什么关于这个话题的好的邮件列表?
更多参考

阅读全文:http://www.linuxfans.org

Posted by Peak at May 28, 2004 03:05 AM | Comments (0) | TrackBack (26)


May 27, 2004


[转载]DBD::SQLite - Self Contained RDBMS in a DBI Driver

Source:http://www.loeda.net/perl/site/lib/DBD/SQLite.html

 DBD::SQLite - Self Contained RDBMS in a DBI Driver


NAME

DBD::SQLite - Self Contained RDBMS in a DBI Driver


SYNOPSIS

  use DBI;
  my $dbh = DBI->connect("dbi:SQLite:dbname=dbfile","","");


DESCRIPTION

SQLite is a public domain RDBMS database engine that you can find at http://www.hwaci.com/sw/sqlite/.

Rather than ask you to install SQLite first, because SQLite is public domain, DBD::SQLite includes the entire thing in the distribution. So in order to get a fast transaction capable RDBMS working for your perl project you simply have to install this module, and nothing else.

SQLite supports the following features:

Implements a large subset of SQL92
See http://www.hwaci.com/sw/sqlite/lang.html for details.

A complete DB in a single disk file
Everything for your database is stored in a single disk file, making it easier to move things around than with DBD::CSV.

Atomic commit and rollback
Yes, DBD::SQLite is small and light, but it supports full transactions!

Extensible
User-defined aggregate or regular functions can be registered with the SQL parser.

There's lots more to it, so please refer to the docs on the SQLite web page, listed above, for SQL details. Also refer to the DBI manpage for details on how to use DBI itself.


CONFORMANCE WITH DBI SPECIFICATION

The API works like every DBI module does. Please see the DBI manpage for more details about core features.

Currently many statement attributes are not implemented or are limited by the typeless nature of the SQLite database.


DRIVER PRIVATE ATTRIBUTES

Database Handle Attributes

sqlite_version
Returns the version of the SQLite library which DBD::SQLite is using, e.g., ``2.8.0''.

sqlite_encoding
Returns either ``UTF-8'' or ``iso8859'' to indicate how the SQLite library was compiled.

sqlite_handle_binary_nulls
Set this attribute to 1 to transparently handle binary nulls in quoted and returned data.

NOTE: This will cause all backslash characters (\) to be doubled up in all columns regardless of whether or not they contain binary data or not. This may break your database if you use it from another application. This does not use the built in sqlite_encode_binary and sqlite_decode_binary functions, which may be considered a bug.


DRIVER PRIVATE METHODS

$dbh->func('last_insert_rowid')

This method returns the last inserted rowid. If you specify an INTEGER PRIMARY KEY as the first column in your table, that is the column that is returned. Otherwise, it is the hidden ROWID column. See the sqlite docs for details.

$dbh->func( $name, $argc, $func_ref, ``create_function'' )

This method will register a new function which will be useable in SQL query. The method's parameters are:

$name
The name of the function. This is the name of the function as it will be used from SQL.

$argc
The number of arguments taken by the function. If this number is -1, the function can take any number of arguments.

$func_ref
This should be a reference to the function's implementation.

For example, here is how to define a now() function which returns the current number of seconds since the epoch:

    $dbh->func( 'now', 0, sub { return time }, 'create_function' );

After this, it could be use from SQL as:

    INSERT INTO mytable ( now() );

$dbh->func( $name, $argc, $obj, 'create_aggregate' )

This method will register a new aggregate function which can then used from SQL. The method's parameters are:

$name
The name of the aggregate function, this is the name under which the function will be available from SQL.

$argc
This is an integer which tells the SQL parser how many arguments the function takes. If that number is -1, the function can take any number of arguments.

$obj
This is the object which implements the aggregator interface.

The aggregator interface consists of defining three methods:

init()
This method will be called once before any values are seen.

step(@_)
This method will be called once for each rows in the aggregate.

finalize()
This method will be called once all rows in the aggregate were processed and it should return the aggregate function's result. When there is no rows in the aggregate, finalize() will be called right after init().

Here is a simple aggregate function which returns the variance (example adapted from pysqlite):

    package variance;
    sub new { bless [], shift; }
    sub init {
        my $self = $_[0];
        @$self = ();
    }
    sub step {
        my ( $self, $value ) = @_;
        push @$self, $value;
    }
    sub finalize {
        my $self = $_[0];
        my $n = @$self;
        # Variance is NULL unless there is more than one row
        return undef unless $n || $n == 1;
        my $mu = 0;
        foreach my $v ( @$self ) {
            $mu += $v;
        }
        $mu /= $n;
        my $sigma = 0;
        foreach my $v ( @$self ) {
            $sigma += ($x - $mu)**2;
        }
        $sigma = $sigma / ($n - 1);
        return $sigma;
    }
    my $aggr = new variance();
    $dbh->func( "variance", 1, $aggr, "create_aggregate" );

The aggregate function can then be used as:

    SELECT group_name, variance(score) FROM results
    GROUP BY group_name;


NOTES

To access the database from the command line, try using dbish which comes with the DBI module. Just type:

  dbish dbi:SQLite:foo.db

On the command line to access the file foo.db.

Alternatively you can install SQLite from the link above without conflicting with DBD::SQLite and use the supplied sqlite command line tool.


PERFORMANCE

SQLite is fast, very fast. I recently processed my 72MB log file with it, inserting the data (400,000+ rows) by using transactions and only committing every 1000 rows (otherwise the insertion is quite slow), and then performing queries on the data.

Queries like count(*) and avg(bytes) took fractions of a second to return, but what surprised me most of all was:

  SELECT url, count(*) as count FROM access_log
    GROUP BY url
    ORDER BY count desc
    LIMIT 20

To discover the top 20 hit URLs on the site (http://axkit.org), and it returned within 2 seconds. I'm seriously considering switching my log analysis code to use this little speed demon!

Oh yeah, and that was with no indexes on the table, on a 400MHz PIII.

For best performance be sure to tune your hdparm settings if you are using linux. Also you might want to set:

  PRAGMA default_synchronous = OFF

Which will prevent sqlite from doing fsync's when writing (which slows down non-transactional writes significantly) at the expense of some peace of mind. Also try playing with the cache_size pragma.


BUGS

Likely to be many, please use http://rt.cpan.org/ for reporting bugs.


AUTHOR

Matt Sergeant, matt@sergeant.org


SEE ALSO

the DBI manpage.

 DBD::SQLite - Self Contained RDBMS in a DBI Driver

Posted by Peak at May 27, 2004 03:02 AM | Comments (0) | TrackBack (1877)

Peak Jing Project

COPYRIGHT © Peak Jing 2003-2005
Powered By
Peak Jing

Valid HTML 4.01!