Assign New IDs to RW1990 Programmable iButtons -Using Serial Port iButton ID Writer

The global unique serial number (ID) of an iButton is written into the chip by laser during manufacture. But now we have another way to assign new IDs to the RW1990 programmable iButtons using our serial port iButton ID writer and tm1990b programming software.

To make this job done, we need to prepare below items:

Below is a picture of a whole set of iButton ID writer set.

whole set of iButton ID writer/programmer set

The serial port ibutton ID writer and RW1990 writable ibuttons are available from our website as well as the programming software. The difficulty is the 8-bit CRC code of item 4 and it is very difficult to understand the calculation of CRC code for common users. Luckily we have tools or formula to generate the CRC given a 48-bit string and the family code. We now illustrate an online calculator name as CRC8 Calculator. All we need to do is input the ID (family code + 48-bit serial number) and then click ‘submit’ button on that link.

Take the 01 family code and 0123456789AB serial code for example, we input the string 010123456789AB on the calculator and click summit, then we get below output:

CRC8 Calculator

So the CRC code is 10 for the string 010123456789AB. The whole 64-bit serial ID number is 010123456789AB10.

Now back to process of assigning IDs by the programming software.

1. Launch the ibutton programming software as below(Please refer to Install iButton Copy Software TM1990B on Windows XP/7(32bit)/8(32bit)):

launch the ibutton writer/prgrammer software

2. Input the new ID on the box (or you can copy and paste 010123456789AB)

Input iButton ID Number with correct CRC code

3. Holding a RW1990 key on the blue dot receptor then click rdrom and the written id is show one the box (ROMID).

Click Write ROPM of the iButton programming software

4. Keep holding the RW1990 ibutton key and click ‘ROMReadContinue’, until the ‘START’ is selected on the ‘TIMER INTERVAL’ field.

the iButton ID writing process is complete

5. Now the process is complete. You can check with the ibutton by the OneWireViewer as below showing that now the ibutton has an ID (shown in reversed order) assigned by you.

New ID is shown on the onewireviewer

It is really simple and the writing process should be done in seconds with the ibutton ID writer and programmer software. But can we write an ID number with an incorrect CRC cod? Well actually you can write an inconsistent ID to rw1990 ibuttons mentioned by above steps and show as below (with CRC code 11 which is not correct):

Wirte ibutton IDs sucessfully with incorrect CRC code

The problem is that you can’t read at all by OneWireViewer(No IDs will be show on it, including the ID of the USB adapter since it detects the CRC code is wrong on the 1-Wire bus).

No iButton IDs was show on the onewireviewer

And when you click ‘readrom’ by the writer software you will receive a CRC Error as below:

CRC error generated by the ibutton writer software




iButton CC is an Integrated High-Tech Which Includes Development, Production, Distribute and Trade. We manufacture & supply iButton, Dallas keys, iButton readers and iButton probes. We offer Chinese domestic ones as well as products by Maxim Integrated. Take a visit to our website iBUTTON.CC for more product detail.

Copy iButton’s 64-Bit Serial Number from DS1990A/TM1990 to RW1990

iButton’s 64-bit Serial Number(also called ID) can be copied or cloned by TM1990B software for windows along with our iButton Reader for Universal Serial Port.

This artitcle focus on the copying process only. For copy software setup process please refer to Install iButton Copy Software TM1990B on Windows XP/7(32bit)/8(32bit).


TM1990 iButton key with 64bit serial number

RW1990 writable iButton key

Prepare a TM1990 key, a RW1990 key (above pictures) and an iButton reader for serial port with Blue Dot cable as below:

iButton reader for serial port with Blue Dot cable produced by

First connect reader to serial port of the computer board as below shows:

serial port of the computer board

Now launch the program by the shortcut. (What is this about? Please refer to Install iButton Copy Software TM1990B on Windows XP/7(32bit)/8(32bit).)

ibutton copy software tm1990b execute file

Note: if shortcut does not show on desktop, then go to the installation directory to start it.

Default location: C:\Program Files\ICOWCN\tm1990b\tm1990B.exe


Then, the programmer shows as below:

iButton clone software overview

Note: For copy purpose, we only focus on the red column of the program.

Put a TM1990 key on the blue dot and keep holding it, then click “ROMRD”  and wait for the ID show in the first text box as follow:

copy ibutton from ds1990a to rw1990 step 1

Then click the “Write ROM”button  and wait until the ID show in the ROMID box as following:

copy ibutton from ds1990a to rw1990 step 2

Still keep the key holding in the Blue Dot then click “ROMReadContinu” and the START is selected as follow:

copy ibutton from tm1990a to rw1990 step 3

Now take off the TM1990 key from and put an RW1990 key on the Blue Dot. Now first click “Write Rom” and then click “ROMReadContinu” until the STOP box is selected as following:

copy ibutton from tm1990a to rw1990 step 4

Now the copy process in complete.


The RW1990 key now has the same ID as the TM1990 key as shown from 1-Wire Viewer as below:

ibutton copy complete with same id by 1-Wire Viewer



About iButton CC

iButton CC is an Integrated High-Tech Which Includes Development, Production, Distribute and Trade. We manufacture & supply iButton, Dallas keys, iButton readers and iButton probes. We offer Chinese domestic ones as well as products by Maxim Integrated. Take a visit to our website for more product detail.



Install iButton Copy Software TM1990B on Windows XP/7(32bit)/8(32bit)

iButton’s 64-bit Serial Number(also called ID) can be copied or cloned by TM1990B software for windows along with our iButton Reader for Universal Serial Port.

This artitcle focus on the software installation only. For copy process please refer to Copy iButton’s 64-Bit Serial Number from DS1990A/TM1990 to RW1990.

ibutton copy software tm1990b setup file

Setup file for TM1990B iButton copy software.

Note: tm1990b could be installed on Windows XP/Windows 7(32 bit)/Window 8(32 bit).

(1) Double click the setup file,

ibutton copy software tm1990b installation step 1


(2) Click “Next”.

ibutton copy software tm1990b installation step 2

(3) Select “I accept the terms in the license agreement”, click “Next”.

ibutton copy software tm1990b installation step 3

(4) Click “Next”.

ibutton copy software tm1990b installation step 4

(5) Select “Typical” then click “Next”,

ibutton copy software tm1990b installation step 5


(6) Click “Install”,

ibutton copy software tm1990b installation step 5

(7) Click “Finish”.

The shortcut will appear on the desktop.

ibutton copy software tm1990b execute file

Now the setup process complete.



About iButton CC

iButton CC is an Integrated High-Tech Which Includes Development, Production, Distribute and Trade. We manufacture & supply iButton, Dallas keys, iButton readers and iButton probes. We offer Chinese domestic ones as well as products by Maxim Integrated. Take a visit to our website for more product detail.



How To Read The 64-bit ID Number On Metal Cover of An iButton?

Some of our customers ask us how to read the 64-bit ID on top of an iButton because they are new in this field and know little about it. For an iButton as below picture, the ID should be read as 7D0000002CFCDCA14. iButton IDs must be read carefully and correctly. The first 2 hexhexadecimal char and the last 2 ones are easy to miss. The reason this process is so complicated because if we allow a direct edit we will not be able to ascertain who held what key during what time.

64-bit ID Number On Top Of an iButton Key

64-bit ID Number On Top Of An iButton

Normally this job is easily done by focusing you eyes by one minute. But for an iButton withou any text on it(below picturer), you can not tell the 64-bit ID in a glance since there is nothing on the metal cover. Some clients like to use this blank type iButton key because they do not want you get the ID easily unless you have iButton readers to read them by the 1-Wire protocol. To see how this job is done, refer to OneWireViewer and iButton Quick Start Guide.

iButton Key Without 64-bit ID On It

iButton Key Without 64-bit ID On It

Please note that these iButton with 64-bit ID is called Read Only iButton(DS1990A-F3/F5) for the iButton manufacturers provide a guaranteed unique ID.

*Note: iButton and 1-Wire are registered trademarks of Maxim.


ALLMAX is an Integrated High-Tech Which Includes Development, Production, Distribute and Trade. We manufacture & supply iButton, Dallas keys, iButton readers and iButton probes. We offer Chinese domestic ones as well as products by Maxim Integrated. Take a visit to our website for more product detail.

图像辨识公司IQ Engines被雅虎(yahoo)收购, 其提供的API将会在30天内关闭


IQ Engines 在 2010 年创立,本身是一间为客人提供自动分类相片的视觉系统服务,它聪明得可以自动将海滩、食物、日落、日出、日天和黑夜等场景或东西辨认出来,然后分类。跟每 次的收购一样,两间公司都没有透过交易金额等资讯,只知道 IQ Engines 会加入 Flickr,为后者「改善相片整理和搜寻」功能,就是做回本身的强项吧。IQ Engines 现在已经不再接受新的用户注册,而现有的用户可以在未来 30 日内继续使用他们的 API,换言之,即是服务会在 30 日后关闭吧。(本段为引用)


A reminder to our customers. As a result of the Yahoo! acquisition, we are shutting down the SmartCamera API.

You may continue to use the API for 10 more days. User accounts will be disabled and all training and query data will be deleted on September 23, 2013.

We regret any inconvenience this may cause. If you need an alternative vendor, we encourage you to consult this list of image recognition API’s at ProgrammableWeb:

It has been our great pleasure to serve you and we wish you the best of luck in your future endeavors.

All the best,

Your friends at IQ Engines, Inc.


然后就在网上找能提供图像识别service的公司,找到了好几个,都说自己的功能很强大,比如能失败BAND, logo,而且精准度极高。我试着注册了iqengines,然后用它提供的试用功能,上传了几个照片试了下。具体就是本田、丰田、玛莎拉蒂还有中国的BYD。令我十分惊讶的是它竟然真的可以识别前面三个品牌!但是,它不能识别比亚迪 😡 ,显示“unknown”。后来我想了想,因为比亚迪的知名度并不高,并不是国际品牌,在它的匹配库里面并没有,所以不能识别也很正常。 😀


第二天,我惊奇的发现比亚迪那里显示不再是“unknown”,而是“BYD, a Chinese Car Maker in Shenzhen”。神奇了!肯定是有人专门对这种“unknown”的图片进行了人工识别,工作效率真是非常的高!那一刻,我觉得它以后一定是一个非常棒的公司!收到这个邮件,我一点不惊讶,简直是意料之中,正和我当初设想的一样!

Facebook 旗下的 Instagram 刚刚买下影片分享 app Luma,而 Yahoo 却买下 IQ Engines,然后给旗下的照片服务 Flickr用。

我希望国内也能出现类似的非常专业的初创公司。国内的图像识别大牛,为何你们不搞搞这个呢?改天也被大公司收购 😉 。

IQ Engines已加入雅虎

RSA key长度与加解密时间(耗时)关系

这两天在用openssl库,讨论到RSA、DES效率问题。结论是显而易见的,RSA肯定慢很多。但是慢多少,key长度与加解密所需时间又有怎样的关系呢?加密一般要多长时间呢?相信很多人和我一样困惑,就是rsa key长度与加密、解密需要时间有没有一个大概的关系,而且能在日常编程中能指导应用。

用baidu翻烂了,也没有找到想要的结果。用google中文搜索了下,还是没有想要的结果。那就转换下,用英文搜索”rsa encryption time”,终于得到想要的结果(看来国内的基础研究真的和国外差距很大)。挑着看了前面几篇,总结如下:

1. 关注rsa的加密时间不如关注rsa解密时间,原因如下:

a. 解密时间比加密时间更耗时;

b. 服务器端解密用得最多;

2.国外研究的一个结论:rsa key长度变2倍(double),相应的解密时间会增加6-7倍。

3. 这里给出rsa key长度和解密时间的大概关系:2G 主频奔腾CPU,1024的key长度解密只需25ms(其实挺快哈,应用上应该可以接受的),2048不到200ms,但是4096时超过1s。显然,对比较老的机器来说,这是不可接受的。


1024 2010年后不要再用;

2048 2030年后不要再用;

3072 2031年后仍可使用…  8)





如何用openssl 生成RSA双密匙;签名证书;加密文件邮件






对于 Openssl 软件包的介绍 (转载自百度百科)


众多的密码算法、公钥基础设施标准以及SSL协议,或许这些有趣的功能会让你产生实现所有这些算法和标准的想法。果真如此,在对你表示敬佩的同时,还是忍 不住提醒你:这是一个令人望而生畏的过程。这个工作不再是简单的读懂几本密码学专著和协议文档那么简单,而是要理解所有这些算法、标准和协议文档的每一个 细节,并用你可能很熟悉的C语言字符一个一个去实现这些定义和过程。我们不知道你将需要多少时间来完成这项有趣而可怕的工作,但肯定不是一年两年的问题。 继续阅读





TINYXML_USE_STL := NO # 个人认为没必要加入STL的支持
RELEASE_CFLAGS := -Wall -Wno-unknown-pragmas -Wno-format -O3 -fPIC
LIBS := -shared -s

另一个推荐的是minixml库,这个库的出现是因为很多时候没必要用libxml2这个拥肿的东西(听说有10万行, minixml才三千多行)。

两个库都是很轻量级的,tinyxml编译成动态库后不到78K(O3优化),minixml为44K(Os优化),而且都可以用于windows,因为都自带VC工程文件,可以选择合自己口味的,have fun~




我调查了最近10宗中国IT企业赴美上市的个案,发现这些企业的创始人在创办企业的时候都是33岁。在创新工场,创业者的年龄平均也是33岁。我们都知道企业孵化基地Y Combinator或者知名投资人罗恩·康韦(Ron Conway)正在硅谷资助越来越年轻的创业者。中国究竟怎么了?



2. 优秀的美国年轻创业者通常较为反叛和具有自主意识,比尔·盖茨(Bill Gates)、史蒂夫·乔布斯(Steve Jobs)、拉里/谢尔盖,和马克·扎克伯格(Mark Zuckerberg)都是从学校辍学,因为他们希望追随自己的内心并实现自己的梦想。但是在中国,环境、文化和教育体系更多地强调纪律、和谐和服从。所有学生都上相同的课程,参加标准化考试。分数是衡量智力和成功的主要指标。结果是,像乔布斯一样的反叛者在中国更有可能遭唾弃,被迫屈服或者郁郁寡欢。

3. 中国的互联网市场环境非常恶劣,有人将此描述为角斗士间的比拼——不是你死就是我亡。一家公司注册竞争对手的域名并且推出类似的服务以欺骗用户;企业卸载其他公司的软件并在未事先通知的情况下改变用户的选择;微博成为了叫骂和传播谣言的阵地;诉讼和逮捕是竞争升级的通常结果。这里是一个非常危险的“角斗场”,不适合那些没有十年经验也没有因为斗争而留下一身伤疤的年轻首席执行官。




1、WordPress系统自带邮箱找回密码 难度系数:1 推荐方法 如果你的WordPress博客在安装时设定的电子邮件地址是正确的, 那就根据普通的找回密码步骤, 在Wordpress的登录页点击”忘记密码?” 然后输入用户名或电子邮箱地址. 接着, 你会收到密码重启邮件, 点击里面的重启链接. 稍后你又会收到一封包含用户名和密码的邮件。 WordPress系统自带找回密码 上述方法的优点是比较简单,和我们平时忘记QQ密码一样操作流程一样,并且会比找回QQ密码更简单,但是,有一个缺点就是你可能没有修改admin帐户的电子邮箱或者你网站所在的服务器不支持发送邮件的组件, 你也就无法接收密码。

2、通过执行Mysql数据库语句修改Wordpress密码 难度系数:

3 使用Phpmyadmin之类的工具, 登录你的数据库管理, 执行如下语句: “update user set password=password(”新密码”) where user=’用户名’;” 即可更新你的Wordpress密码。 注意:新密码并非是名文密码,是要写入你MD5加密新密码后字符串。 以上方法难试相对于第一种方法稍微有点大,因为进行MYSQL数据库语句的操作,需要一点的编程开发的基础或常识。 3. 通过PHP文件修改Wordpress密码 难度系数:3 新建一个pwd.php文件,并在其中加入: echo md5(’你的密码’); 上传到主机根目录下,执行http://你的域名/pwd.php,然后连到你的数据库执行. update wp_users set user_pass=’执行pwd.php显示的字符串’ where user_login=’用户名’; OK,现在可以用自己设定的密码进入管理员帐户了。

4、通过 password-resetter 文件找回密码 难度系数:2 推荐方法 下载: password-resetter 使用方法: 将password-resetter.zip解压; 上传password-resetter.php到WordPress根目录 (注意: 这不是WordPress插件! ) 运行http://你的域名/password-resetter.php 在Set admin password:后面输入你要重置的管理员密码!然后点提交查询内容就可以了 记得找回密码后, 删除服务器上的password-resetter.php (不然会被他人利用) Set-Admin-Password 第4点是小落推荐使用的方法,只要你有FTP权重并且会正常使用FTP软件就可以找回密码,也不需要担心因为操作mysql数据库而丢失数据的风险。

5、通过修改MD5值找回Wordpress密码 难度系数:2 WorePress安装后都是自动给出密码的,我一直是自动登陆,所以一个月后居然把密码忘记了。WP使用的是MD5保存密码,所以密码不可逆。想到后台 可以使用数据库,可以通过数据库找回密码,登陆phpmyadmin,然后如图,登陆后第一步是选择数据库.一般虚拟主机都带有phpmyadmin. 修改MD5密码为:”5d41402abc4b2a76b9719d911017c592″ 然后回到WordPress登陆页面,使用密码”hello” 登陆后台后,直接去把密码修改成你自己想要并且你可以记住的密码(不过你过几天还是会忘记的话,你还是可以按上述方法找回wordpress密码的) 比较一下, 如果你的电子邮件设置是正确的, 那当然第1种方法是最方便的。如果你有FTP帐号密码并且会上传删除方件的话, 那第4种方法应该是最安全方便的。如果可以控制数据库, 那第5种方法也是可以试一下。


new 2012; delete 2011;







O’Reilly出品的动物丛书在IT界可谓妇孺皆知,它有很多昵称,如动物世界、饲养员指南等,这些昵称均一定程度上反映了广大读者对该系列丛书的喜爱之情(好吧或者其它什么的各种感情)。没必要多介绍,想必知道动物丛书的人都知道这系列书最显著的特点,就是封皮上会有一只手绘的动物坐镇,基本格式如右图所示(右图有一点不是很标准,一般书的标题会用一个巨大的色块+白色字)。 继续阅读


      先有鸡还是先有蛋?相信这个问题到现在还没有答案。对这个问题的争论,以后还将会持续下去。我不是来讨论这个问题的,而是通过这个问题,引出一些很有趣的话题。 🙂



    古代有人中吕布,马中赤兔,这个就是完美事物的完美结合。没了吕布,有这赤兔马也不会完美。反之亦然。吕布是可遇不可求的,英勇无敌,桃园三义亦不能轻易战胜。 😕 CHITU_horse赤兔马亦是马中珍宝。《三国演义》是这样描写赤兔马的:(虎贲中郎将李)肃(对董卓)曰:“某闻主公有名马一匹,号曰赤兔,日行千里……”。赤兔原属董卓所有,董卓遣人送与吕布,怂恿吕布杀了其义父丁原投靠董卓,之后,吕布在徐州战败,为曹操所杀,赤兔马便为曹操所得。之后,曹操进攻取得徐州的刘备,刘备战败,刘备手下大将关羽为曹操所擒,曹操为了要使关羽加入,将赤兔马转送关羽。后来关羽败走麦城,为吕蒙所杀,赤兔马失去主人,遂绝食而死。赤兔乃马中珍宝,虽然其主变更甚多,但是这些主人都是人杰,仍视之为珍宝。两者结合更是完美+完美,放在一起就注定会产生完美事物的。

     再者,讲到计算机操作系统和计算机网络,到底是先有fork还是先有client/server?因为fork似乎就是专门为此而设计的! fork是很简单的,调用fork也简单得不能再简单。fork
因为K.I.S.S.(Keep it simple,stupid.)是Unix的至高原则。这样有利于父子进程间通过pipe建立起一种简单有效的进程间通信管道,并且产生了操作系统的用户界面即shell的管道机制。这一点,对于Unix的发展和应用推广,对于Uinx程序设计环境的形成,对于Unix程序设计风格的形成,都有非常深远的影响。可以说这是一项天才的发明,它在很大程度上改变了操作系统的发展方向。fork就产生了一个进程,也就产生了所谓的client/server模型即网络编程模型。的确,有client/server就应该有fork。问题是,就像先有鸡还是先有蛋一样,谁先产生呢?again,这是完美结合的事物。simple, and perfect!



Medwyn Goodall(梅得温古铎)-Medicine Woman(女巫医三部曲)-在线播放试听

    拥有200万张销售实力的新世纪巨匠—梅得温在新世纪乐坛已是传奇经典人物的Medwyn Goodall(梅得温),至今推出的专辑已突破200万张的佳绩。

medwyn-goodall 梅得温古铎



英文名称:Medicine Woman
编码品质:706 kbps


本碟以一位病人向女巫医求诊的全过程为主题,共八首曲子,五十六分钟;作者不但作曲编曲,更独立演奏十多种民族、电子、流行乐器、有吉他、木笛、风琴、三角铃、排箫、竖琴、鼓等加电子合成器模拟人、风、鸟、雷、雨等自然声,分开来录.再混成天籁之声。虽类似混音手法在流行乐界并不罕见,但在较讲究的新纪元音乐中,便显示了艺高人胆大,且各种乐器也奏得不俗,更显多才多艺。效果只佳,可谓一播放就将神庙所在的南美安第斯山上的鸟语花香、清风轻吹、阳光璀璨、高山流水、拂琴听泉的世外桃源般的景象带到眼前一样。Medwyn Goodall发掘出南美印第安民族音乐中的新纪元要素:健康、精力充沛、松弛、幸福。

About the Artist

From his home and studio in rural Cornwall, Medwyn Goodall has devoted himself to reflecting the beauty and inspiration of nature through his music. He plays over a dozen instruments, although his main instrument is the guitar, with which he has evolved a unique style melodic, expressive and graceful a music that is both inspiring and calming. Born in the Yorkshire Dales in the village of Harrowgate he spent his childhood in the scenic splendor of the countryside; the Goodall family veterinarian was the best-selling author James Herriot. Raised with the sounds of the 60’s, Med was particularly fond of the Beatles and the Beach Boys, claiming their melodies influenced him to get his first guitar; at the age of 11 Medwyn met English pop star Cliff Richard, who encouraged him in his choice of a musical career. He began composing music as soon as he had mastered a few chords on his guitar, playing in many different bands as a teenager. One of these groups, Trax, appeared on the television show Check It Out and made numerous radio appearences, including a guest spot on BBC Radio Leeds. Goodall turned out to be a natural musician, able to pick up any instrument and play it. His range is amazing, including double bass, mandolin, piano, drums, harp, percussion, flute, glockenspiel, panpipes, vibraphone, and synthesizers of all types. He has designed and built his own recording studio, stocking it with many varities of sampler (which Medwyn claims as his favorite instrument, as it will perform any musical sound in the world), synthesizers, guitars and a wealth of acoustic instruments.

Album Description

Medwyn Goodall uses traditional instruments and rhythms to celebrate the power of the Feminine. Through this balance, we can achieve a greater harmony with the expansive, nurturing side of ourselves. A lively, authentic performance.


01. Invocation

音频片段:需要 Adobe Flash Player(9 或以上版本)播放音频片段。 点击这里下载最新版本。您需要开启浏览器的 JavaScript 支持。

02. Talisman
03. Temple Journey
04. Medicine Woman
05. Rejuvenation
06. Sun Drumming
07. mmortality
08. Healing Resurgence

medicine-women-ii 梅得温古铎-女巫医三部曲之二

英文名称:Medicine Woman,Vol.2
编码品质:868 kbps


女巫医Ⅱ比第一辑层次更丰富,音域更宽广,并添加了和声部分。这张专辑明显的表现了MEDWYN GOODALL的音乐创作风格,到达了一个更高的层次,整张专辑显露出一种更柔和而丰厚的层次,音乐节奏和细节更为紧凑。相比而言,更好于第一张专辑!

全碟大量使用了直笛和排萧的吹奏,键盘及敲击乐器等传统南美乐器,加上隐隐的和声,揉出一派纯真的南美风格。本碟以一位病人向女巫医求诊的全过程为主题,共十首曲子,五十六分钟;作者不但作曲、编曲,更独立演奏十多种民族、电子、流行乐器、有吉他、木笛、风琴、三角铃、排箫、竖琴、鼓等加电子合成器模拟人、风、鸟、雷、雨等自然声,分开来录,再混成天籁之声。虽类似混音手法在流行乐界并不罕见,但在较讲究的新纪元音乐中,便显示了艺高人胆大,且各种乐器也奏得不俗,更显多才多艺。效果极佳,可谓一播放就将神庙所在的南美安第斯山上的鸟语花香、清风轻吹、阳光璀璨、高山流水、拂琴听泉的世外桃源般的景象带到眼前一样。Medwyn Goodall发掘出了南美印第安民族音乐中的新纪元要素!(引用VeryCD会员lwom的MP3资源中的介绍,标点及个别字略做调整


01. Celebration
02. Invocation [Part 2]

音频片段:需要 Adobe Flash Player(9 或以上版本)播放音频片段。 点击这里下载最新版本。您需要开启浏览器的 JavaScript 支持。

03. Jungle Heart
04. Orchid Potion
05. The Gift
06. Talking to the Sun
07. Sacred Ground
08. After the Rains
09. Emerald [Mayan Relic]
10. The Gift [Single Version]

medicine-woman-iii 梅得温古铎-女巫医三部曲之三

英文名称:Medicine Woman,Vol.3
唱片编号:NWCD 568
编码品质:780 kbps


New World新世纪排行榜 Top 1

本辑为“女巫医三部曲”的最终章,为梅得温蕴酿长达7年所完成的力作,甫推出即登上New World新世纪排行榜Top 1的佳绩。在此,他从原本的南美秘境,扩展到全世界,藉由拥有召唤天地孕生力量的女巫医传说为蓝本,以此系列的主题音乐《Invocation》开启旅程的序幕,穿越黑夜,到达宇宙生命最核心的圣殿。



01. Invocation Part 3 祁愿

音频片段:需要 Adobe Flash Player(9 或以上版本)播放音频片段。 点击这里下载最新版本。您需要开启浏览器的 JavaScript 支持。

02. Farewell to the Darkness 远离黑夜
03. Faith 忠诚
04. Sherpa 西藏秘境
05. Divinity 神性
06. Hymn for the Loss of Innocence 成年礼赞
07. Temple Journey Part 2 圣殿之旅


Get the Flash Player to see this content.










Get the Flash Player to see this content.



       1. 是一个非交互性文本流编辑器。它编辑文件或标准输入导出的文本拷贝。
       2. 通过行号或正则表达式指定要改变的文本行
       3. sed不与初始文件打交道,而只与它的一个拷贝打交道,如果操作结果没有重定向到一个文件,那么将输出到屏幕。 继续阅读


由于我们MySQL小组开发的MTPower版本极多,到现在为止显得有些混乱,这里推荐大家使用改进的MDB(Multi-threaded Disk Buffer)版本,因为这个版本是在原有版本的基础上改进的版本,MDB性能也是最好的。这个版本在八核服务器/home/robin/bishe/source目录中mysql-6.0.9-alpha目录(可用root用户进入),将整个mysql-6.0.9-alpha文件拷贝到自己的目录中:

[code lang=”shell”]
root@localhost source]# pwd
[root@localhost source]# cp -r mysql-6.0.9-alpha /home/somebody
[root@localhost source]# cd /home/somebody
[root@localhost mysql]# ls -la
total 4
drwxr-xr-x 33 root root 4096 May 4 16:13 mysql-6.0.9-alpha

然后改变改变mysql-6.0.9-alpha 的拥有者

[code lang=”shell”]
[root@localhost mysql]# chown -R somebody:somebody mysql-6.0.9-alpha


[code lang=”shell”]
[root@localhost mysql]# exit


[code lang=”shell”]
[liao@localhost mysql]$ cd mysql-6.0.9-alpha/
[liao@localhost mysql-6.0.9-alpha]$
[liao@localhost mysql-6.0.9-alpha]$ ./BUILD/
[liao@localhost mysql-6.0.9-alpha]$ ./configure –prefix=/home/somebody/deploy –with-plugins=mtpower –with-debug=full
[liao@localhost mysql-6.0.9-alpha]$ make
[liao@localhost mysql-6.0.9-alpha]$ make install




3、–with-debug=full 这个选项是调试用的,默认没有(即普通安装,非调试模式)。另外,当我们需要安装MTPower但不需要调试模式时(即–with-debug=full不必写上),还有很重要的一步就是在make之前要吧mysql-6.0.9-alpha/storage/MTPower目录下的Makefile的-O3改成-g,告诉编译器不对MTPower进行优化,否则mtpower会有些难以发现的错误。

4、–prefix=/home/somebody/deploy是设置mysql的安装路径,请务必加上,以免覆盖默认安装目录下的文件。还有一点是安装之后mysql server的启动比较麻烦,如果嫌麻烦,可以配置成–prefix=/home/liao/benchmark/buffer_improved/deploy ,即安装在我的目录下,但需要root权限,即以root用户make install(make install之前的命令用过用户的权限就可以完成)。make install后可以直接进入安装目录运行或调试mysql。据我的经验,这是没有出现什么问题的。

5、在接下来的开发mysql过程中,如果只是增减代码而没有增减文件,每次更改完后不必再/BUILD/autorun.sh和./configure,只需make && make install就可以了。

接下来讲讲如何调试MTPower。如上所述,要对MTPower进行调试,–with-plugins=MTPOWER –with-debug=full必须都要选上,然后再make && make install.

如果要设置断点,可以在run -uroot之前设置,比如

(gdb) b –在ha_mtpower.cc第500行设置断点

(gdb) b ha_mtpower::create –在ha_mtpower类成员函数create中设置断点


然后用mysql客户端连接mysql server,


另外还可以自己写一些测试程序当作客户端(作为例子可以查看/home/liao/benchmark/buffer_improved/test 目录下的benchmark.c文件),这样就不必每次都在客户端中输入SQL语句了。


文远  20:41:22
4.在make install之后,还要执行scripts/mysql_install_db,用于创建数据目录var
文远  20:44:49
cp supoort-files/选一个 /安装目录var/my.cnf,之后在my.cnf中[mysqld]中写入 user = mysqld


MSVC的_snprintf 与gcc的snprintf(C99)行为不一样!!!  _snprintf在buff结尾有可能没有’\0’,所以跨平台时,还是保留最后一个字节安全(长度20的buff,传给snprintf,只用19)snprintf (或者_snprintf )可以用来只计算长度,如:int c = snprintf(NULL,0,……);asprintf 第一个参数是指向指针的指针,它会在heap中自动申请空间(最后要手动free)。使用asprintf ,要加上 #define     _GNU_SOURCE
在 C 語言裡,要建立一個字元陣列的字串,常常會使用 sprintf() 這個函數來做格式化的處理。但是實際上,這個函式卻不是那麼「安全」。怎麼說呢?sprintf() 的整個介面長的樣子的是:int sprintf ( char * str, const char * format, … )也就是在使用前,必須要先建立好一個字元陣列的空間,再用這個函式把內容填入,下面就是簡單的例子:

int tmp = 10;
char cstr[20];
sprintf( cstr, “%d * %d = %d”, tmp, tmp, tmp * tmp );

在 這個例子裡,cstr 最後的值,會是「10 * 10 = 100」,看起來好像很好?但是如果把 tmp 的值改成 10000 的話,cstr 則應該要變成「10000 * 10000 = 100000000」,但是由於這時候的字串所需長度為 26,而要寫入的 cstr 的長度只有 20,所以就會造成 buffer overflow 的問題。

像如果是以 Visual C++ 2006 來編譯的話,如果程式裡有用到 sprintf(),他在編譯時就會顯示一個警告訊息:

warning C4996: ‘sprintf’: This function or variable may be unsafe. Consider using sprintf_s instead.

而要怎麼避免 sprintf 的 buffer overflow 的問題呢?除了微軟建議的 sprintf_s() 外,實際上在 C99 裡, 也多了一個 snprinf() 是用來取代現有的 sprintf() 了~他的介面是:

int snprintf(char *str, size_t size, const char * restrict format, …)

應該可以明顯看得出來,snprinf() 這個函式比 sprintf() 多了一個參數 size;這個參數的用處,就是用來限制最大的寫入資料量,可以用來避免 buffer overflow。以上面的例子來說,本來寫:

int tmp = 10000;
char cstr[20];
sprintf( cstr, “%d * %d = %d”, tmp, tmp, tmp * tmp );

的話,會產生 buffer overflow 的問題。而如果改成用 snprinf() 的話,就是變成:

int tmp = 10000;
char cstr[20];
snprintf( cstr, sizeof( cstr ), “%d * %d = %d”, tmp, tmp, tmp * tmp );

這樣一來,snprinf() 在把資料寫到 cstr 時,最多就只會寫入 20 個字元(cstr 的長度),而不會有 buffer overflow 的問題了~

不過比較討厭的是,MSVC 似乎並沒有直接給這個函式,而是另外給了一個 _snprinf()…雖然功能和參數都大同小異,但是光函式名稱不一樣,就已經增加了些麻煩,更別說在行為模式上也有些不同了。而 _snprinf() 和 snprintf() 主要的差別在於:

_snprintf() (MSVC) snprintf()
回傳值 · 當 len <= size 時,會回傳 len· 當 len > size 時,會回傳負值(-1) · 正常狀況會回傳 len。· 如果有錯誤,回傳負值(-1)
字串內容 · 當 len < size 時,str 會包含結尾的 ‘\0’· 當 len >= size 時,str 不會有結尾的 ‘\0’ · str會包含結尾的 ‘\0’
· len:要輸出的字串應有的長度,不包含結尾的 ‘\0’。· size:snprintf/ _snprintf 的第二個參數,寫到 str 的最大資料量。


如果是使用 MSVC 的話,自行定義 snprintf,讓它變成 _snprintf
#ifdef _MSC_VER
#define snprintf _snprintf

實際使用,則就可以直接用 snprintf
int tmp = 10000;
char cstr[20];
int size = sizeof( cstr );
int c = snprintf( cstr, size, “%d * %d = %d”, tmp, tmp, tmp*tmp );
if( c > size || c < 0 )
cstr[ size – 1 ] = ‘\0’;

這樣應該就可以在 g++ 和 MSVC 的環境裡,都可以避免 buffer overflow 和字串結尾沒有 ‘\0’ 的問題了~

但是這樣的做法,實際上是產生一個最大長度為 20 的字串,如果超過的話,雖然不會有 buffer overflow 的問題,但是過長的部分還是要切掉。而如果希望可以針對需要,產生一個夠長的字串的話,其實還可以使用 asprintf() 這個函式。他的用法很簡單,基本上和 sprintf() 很像,只是將第一個參數改成一個 char** 而已;下方就是簡單的範例:

char* cstr;
int c = asprintf( &cstr, “%d * %d = %d”, tmp, tmp, tmp*tmp );

如此一來,他就會自動替 cstr 產生一塊夠大的記憶體空間,來存放字串了~

不過 asprintf() 這個函式應該不在 C 語言的標準內,而是 GNU 的 extension(可能要加上「#define     _GNU_SOURCE」才能使用),所以在 MSVC 裡並沒有提供 asprintf() 可以使用。不過雖然沒有現成的可以用,但是還是可以透過執行兩次 snprintf() 來做到同樣的功能~實作的方法,大致上就是:

char* cstr;
int c = snprintf( NULL, 0, “%d * %d = %d”, tmp, tmp, tmp*tmp );
cstr = new char[ c + 1 ];
snprintf( cstr, c + 1, “%d * %d = %d”, tmp, tmp, tmp*tmp );

做法的主要概念,就是第一次的 _snprintf() 實際上並不真正的將字串寫到某個空間,而是單純用來取得字串所需要的長度,然後再根據需要的長度來產生字元陣列,並將資料寫入。



用 ports安装了mysql以后,过一段时间发现/var空间不足了,查一下,会发现是mysql-bin.000001、mysql- bin.000002等文件占用了空间,那么这些文件是干吗的?这是数据库的操作日志,例如UPDATE一个表,或者DELETE一些数据,即使该语句没 有匹配的数据,这个命令也会存储到日志文件中,还包括每个语句执行的时间,也会记录进去的。


vi /etc/my.cnf把里面的log-bin, binlog_format=mixed这两行注释掉,重启mysql服务即可。

谷歌网页服务器(Google Web Server ,GWS)

谷歌Web服务器软件,它是基于Apache HTTP服务器基础开发的对谷歌应用程序优化版。
GWS是google专用的web服务器.是 google web server 的缩写
以下是google的服务器列表,顺序依次是“domain、OS、web server”: Linux Apache Linux unknown Linux GWS-GRFE/0.40 Linux GWS-GRFE/0.40 Linux GWS/2.1 Linux GWS/2.1 Linux GWS/2.1 Linux GWS-GRFE/0.40 Linux GWS/2.1 unknown GWS/2.1 Linux GWS/2.1 Linux GWS-GRFE/0.40 Linux GWS/2.1 unknown GWS-GRFE/0.40 Linux GWS/2.1 Linux GWS/2.1 Linux GWS/2.1 Linux Apache unknown GWS-GRFE/0.40 Linux GWS/2.1 Linux Apache/1.3.27 (Unix) Linux GWS/2.1 Linux GWS/2.1 Linux GWS-GRFE/0.40 Linux GWS/2.1 Linux GWS/2.1 Linux GWS/2.1 Linux GWS/2.1 Linux GWS/2.1 Linux GWS/2.1 Linux GWS/2.1 Linux GWS/2.1 Linux GWS-GRFE/0.40 Linux GWS-GRFE/0.40 Linux GWS/2.1 Linux GWS/2.1 Linux GWS/2.1 Linux NFE/0.8 Linux GFE/1.3 Linux GWS/2.1 Linux GWS/2.1 Linux GFE/1.3 Linux GWS/2.1 Linux GWS-GRFE/0.40 Linux GWS-GRFE/0.40 Linux Apache unknown GWS-GRFE/0.40 Linux GWS/2.1 Linux GWS/2.1 unknown GWS/2.1


configure’ configures this package to adapt to many kinds of systems.

Usage: ./configure [OPTION]… [VAR=VALUE]…

To assign environment variables (e.g., CC, CFLAGS…), specify them as
VAR=VALUE.  See below for descriptions of some of the useful variables.

Defaults for the options are specified in brackets.

-h, –help              display this help and exit
–help=short        display options specific to this package
–help=recursive    display the short help of all the included packages
-V, –version           display version information and exit
-q, –quiet, –silent   do not print `checking…’ messages
–cache-file=FILE   cache test results in FILE [disabled]
-C, –config-cache      alias for `–cache-file=config.cache’
-n, –no-create         do not create output files
–srcdir=DIR        find the sources in DIR [configure dir or `..’]

Installation directories:
–prefix=PREFIX         install architecture-independent files in PREFIX
–exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX

By default, `make install’ will install all the files in
`/usr/local/bin’, `/usr/local/lib’ etc.  You can specify
an installation prefix other than `/usr/local’ using `–prefix’,
for instance `–prefix=$HOME’.

For better control, use the options below.

Fine tuning of the installation directories:
–bindir=DIR            user executables [EPREFIX/bin]
–sbindir=DIR           system admin executables [EPREFIX/sbin]
–libexecdir=DIR        program executables [EPREFIX/libexec]
–sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
–sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
–localstatedir=DIR     modifiable single-machine data [PREFIX/var]
–libdir=DIR            object code libraries [EPREFIX/lib]
–includedir=DIR        C header files [PREFIX/include]
–oldincludedir=DIR     C header files for non-gcc [/usr/include]
–datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
–datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
–infodir=DIR           info documentation [DATAROOTDIR/info]
–localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
–mandir=DIR            man documentation [DATAROOTDIR/man]
–docdir=DIR            documentation root [DATAROOTDIR/doc/PACKAGE]
–htmldir=DIR           html documentation [DOCDIR]
–dvidir=DIR            dvi documentation [DOCDIR]
–pdfdir=DIR            pdf documentation [DOCDIR]
–psdir=DIR             ps documentation [DOCDIR]

Program names:
–program-prefix=PREFIX            prepend PREFIX to installed program names
–program-suffix=SUFFIX            append SUFFIX to installed program names
–program-transform-name=PROGRAM   run sed PROGRAM on installed program names

System types:
–build=BUILD     configure for building on BUILD [guessed]
–host=HOST       cross-compile to build programs to run on HOST [BUILD]
–target=TARGET   configure for building compilers for TARGET [HOST]

Optional Features:
–disable-option-checking  ignore unrecognized –enable/–with options
–disable-FEATURE       do not include FEATURE (same as –enable-FEATURE=no)
–enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
–disable-dependency-tracking  speeds up one-time build
–enable-dependency-tracking   do not reject slow dependency extractors
–enable-shared[=PKGS]  build shared libraries [default=yes]
–enable-static[=PKGS]  build static libraries [default=yes]
optimize for fast installation [default=yes]
–disable-libtool-lock  avoid locking (might break parallel builds)
Disable additional features provided by the user
Compile the client without threads.
–enable-assembler      Use assembler versions of some string
functions if available.
–enable-profiling      Build a version with query profiling code (req.
–enable-local-infile   Enable LOAD DATA LOCAL INFILE (default: disabled)
–disable-grant-options Disables the use of –init-file, –skip-grant-tables and –bootstrap options
–disable-largefile     Omit support for large files

Optional Packages:
–with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
–without-PACKAGE       do not use PACKAGE (same as –with-PACKAGE=no)
Default character set, use one of:
armscii8 ascii big5 cp1250 cp1251 cp1256 cp1257
cp850 cp852 cp866 cp932 dec8 eucjpms euckr gb2312 gbk geostd8
greek hebrew hp8 keybcs2 koi8r koi8u
latin1 latin2 latin5 latin7 macce macroman
sjis swe7 tis620 ucs2 ujis utf8
Default collation
Use charsets in addition to default (none, complex,
all, or a list selected from the above sets)
–without-uca           Skip building of the national Unicode collations.

–with-system-type      Set the system type, like “sun-solaris10”
–with-machine-type     Set the machine type, like “powerpc”
–with-darwin-mwcc      Use Metrowerks CodeWarrior wrappers on OS X/Darwin
–with-gnu-ld           assume the C compiler uses GNU ld [default=no]
–with-pic              try to use only PIC/non-PIC objects [default=use
–with-tags[=TAGS]      include additional configurations [automatic]
–with-other-libc=DIR   Link against libc and other standard libraries
installed in the specified non-standard location
overriding default. Originally added to be able to
link against glibc 2.2 without making the user
upgrade the standard libc installation.
–with-server-suffix    Append value to the version string.
–with-pthread          Force use of pthread library.
Use specified thread libraries instead of
those automatically found by configure.
Use specified curses libraries instead of
those automatically found by configure.
Where to put the unix-domain socket.  SOCKET must be
an absolute file name.
Which port to use for MySQL services (default 3306)
What user the mysqld daemon shall be run as.
Provide MySQL with a custom location of compression
library. Given DIR, zlib binary is assumed to be in
$DIR/lib and header files in $DIR/include.
–with-libwrap=DIR      Compile in libwrap (tcp_wrappers) support
–with-pstack           Use the pstack backtrace library
–with-debug            Add debug code
–with-debug=full       Add debug code (adds memory checker, very slow)
–with-error-inject     Enable error injection in MySQL Server
–with-fast-mutexes     Compile with fast mutexes (default is disabled)
Implement atomic operations using pthread rwlocks or
atomic CPU instructions for multi-processor
(default) or uniprocessor configuration
–with-mysqld-ldflags   Extra linking arguments for mysqld
–with-client-ldflags   Extra linking arguments for clients
–with-mysqld-libs   Extra libraries to link with for mysqld
–with-lib-ccflags      Extra CC options for libraries
–with-low-memory       Try to use less memory to compile to avoid
memory limitations.
–with-comment          Comment about compilation environment.
–with-big-tables       Support tables with more than 4 G rows even on 32
bit platforms
–with-max-indexes=N    Sets the maximum number of indexes per table,
default 64
–with-ssl=DIR    Include SSL support
Plugins to include in mysqld. (default is: none)
Must be a configuration name or a comma separated
list of plugins.
Available configurations are: none max max-no-ndb
Available plugins are: partition daemon_example
ftexample archive blackhole csv example federated
heap innobase myisam myisammrg ndbcluster.
–without-plugin-PLUGIN Disable the named plugin from being built.
Otherwise, for plugins which are not selected for
inclusion in mysqld will be built dynamically (if
–with-plugin-PLUGIN    Forces the named plugin to be linked into mysqld
–with-ndb-sci=DIR      Provide MySQL with a custom location of sci library.
Given DIR, sci library is assumed to be in $DIR/lib
and header files in $DIR/include.

–with-ndb-test       Include the NDB Cluster ndbapi test programs

–with-ndb-docs       Include the NDB Cluster ndbapi and mgmapi documentation

–with-ndb-port       Port for NDB Cluster management server

–with-ndb-port-base  Base port for NDB Cluster transporters

–without-ndb-debug   Disable special ndb debug features
Extra CFLAGS for ndb compile

–without-ndb-binlog       Disable ndb binlog
–without-server        Only build the client.
–with-embedded-server  Build the embedded server (libmysqld).
–without-query-cache   Do not build query cache.
–without-geometry      Do not build geometry-related parts.
Build parts to check user’s privileges.
Only affects embedded library.
–with-mysqlmanager     Build the mysqlmanager binary: yes/no (default:
build if server is built.)
–without-docs          Skip building of the documentation.
–without-man          Skip building of the man pages.
–without-readline      Use system readline instead of bundled copy.
–without-libedit       Use system libedit instead of bundled copy.

Some influential environment variables:
CC          C compiler command
CFLAGS      C compiler flags
LDFLAGS     linker flags, e.g. -L if you have libraries in a
nonstandard directory    LIBS        libraries to pass to the linker, e.g. -l   CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I if
you have headers in a nonstandard directory    CXX         C++ compiler command   CXXFLAGS    C++ compiler flags   CPP         C preprocessor   CXXCPP      C++ preprocessor   F77         Fortran 77 compiler command   FFLAGS      Fortran 77 compiler flags   CCAS        assembler compiler command (defaults to CC)   CCASFLAGS   assembler compiler flags (defaults to CFLAGS)  Use these variables to override the choices made by `configure’ or to help it to find libraries and programs with nonstandard names/locations.  Description of plugins:     === Partition Support ===   Plugin Name:      partition   Description:      MySQL Partitioning Support   Supports build:   static   Configurations:   max, max-no-ndb     === Daemon Example Plugin ===   Plugin Name:      daemon_example   Description:      This is an example plugin daemon.   Supports build:   dynamic     === Simple Parser ===   Plugin Name:      ftexample   Description:      Simple full-text parser plugin   Supports build:   dynamic     === Archive Storage Engine ===   Plugin Name:      archive   Description:      Archive Storage Engine   Supports build:   static and dynamic   Configurations:   max, max-no-ndb     === Blackhole Storage Engine ===   Plugin Name:      blackhole   Description:      Basic Write-only Read-never tables   Supports build:   static and dynamic   Configurations:   max, max-no-ndb     === CSV Storage Engine ===   Plugin Name:      csv   Description:      Stores tables in text CSV format   Supports build:   static   Status:           mandatory     === Example Storage Engine ===   Plugin Name:      example   Description:      Example for Storage Engines for developers   Supports build:   dynamic   Configurations:   max, max-no-ndb     === Federated Storage Engine ===   Plugin Name:      federated   Description:      Connects to tables on remote MySQL servers   Supports build:   static and dynamic   Configurations:   max, max-no-ndb     === Memory Storage Engine ===   Plugin Name:      heap   Description:      Volatile memory based tables   Supports build:   static   Status:           mandatory     === InnoDB Storage Engine ===   Plugin Name:      innobase   Description:      Transactional Tables using InnoDB   Supports build:   static and dynamic   Configurations:   max, max-no-ndb     === MyISAM Storage Engine ===   Plugin Name:      myisam   Description:      Traditional non-transactional MySQL tables   Supports build:   static   Status:           mandatory     === MyISAM MERGE Engine ===   Plugin Name:      myisammrg   Description:      Merge multiple MySQL tables into one   Supports build:   static   Status:           mandatory     === Cluster Storage Engine ===   Plugin Name:      ndbcluster   Description:      High Availability Clustered tables   Supports build:   static   Configurations:   max


  1. 服务概述
    将需要自动启动的脚本/etc/rc.d/init.d目录下,然后用命令chkconfig –add filename将自动注册开机启动和关机关闭。实质就是在rc0.d-rc6.d目录下生成一些文件连接,这些连接连接到/etc/rc.d /init.d目录下指定文件的shell脚本。
  2. 手工创建服务
    设置脚本的运行权限chmod +x auto_run。
    ln -s /etc/rc.d/init.d/auto_run /etc/rc.d/rc2.d/S99auto_run
    ln -s /etc/rc.d/init.d/auto_run /etc/rc.d/rc3.d/S99auto_run
    ln -s /etc/rc.d/init.d/auto_run /etc/rc.d/rc5.d/S99auto_run
    ln -s /etc/rc.d/init.d/auto_run /etc/rc.d/rc0.d/K01auto_run
    ln -s /etc/rc.d/init.d/auto_run /etc/rc.d/rc6.d/K01auto_run
    这样系统在启动的时候,就会运行auto_run 并加上start参数,等同于执行命令auto_run start。
    在系统关闭的时候,就会运行auto_run,并加上stop参数,等同于运行命令auto_run stop。
    创建连接的6条命令可以用命令chkconfig –add auto_run来完成,这样就简单多了,还不容易出错。
  3. chkconfig命令用法
    chkconfig –list [name]
    chkconfig –add name
    chkconfig –del name
    chkconfig [–level levels] name <on|off|reset>
    chkconfig [–level levels] name
    默认情况下,on或off选项仅对2、3、4、5有影响,而 reset影响所有的运行级。–level选项可以被用于指定哪个运行级别接收影响。
    –level levels
    –add name
    –del name
    –list name
    每个通过chkconfig管理的服务在其init.d目录下的角本中都需要两行或多行的注释。第一行告诉chkconfig在默认情况下什么运行级别的 服务可以开始,也就是所说的开始或结束的优先级别。如果服务没有默认的级别,建造将在所有运行级别中启动。a – 将用于代替运行级列表。第二个注释行包括对此服务的描述,可以通过反斜线符号扩展为多行。

    #chkconfig: 2345 80 90
    第二行,chkconfig后面有三个参数2345,80和90告诉chkconfig程序,需要在rc2.d~rc5.d目录下,创建名字为 S80auto_run的文件连接,连接到/etc/rc.d/init.d目录下的的auto_run脚本。第一个字符是S,系统在启动的时候,运行脚 本auto_run,就会添加一个start参数,告诉脚本,现在是启动模式。同时在rc0.d和rc6.d目录下,创建名字为K90auto_run的 文件连接,第一个字符为K,个系统在关闭系统的时候,会运行auto_run,添加一个stop,告诉脚本,现在是关闭模式。
    注意上面的三行是中,地二,第三行是必须的,否则在运行chkconfig –add auto_run时,会报错。

  4. 常见的错误
    “服务不支持 chkconfig”:
    #chkconfig: 2345 80 90


Can’t open the mysql.plugin table. Please run mysql_upgrade to create it.

090517 13:34:15 [ERROR] Can’t open the mysql.plugin table. Please run mysql_upgrade to create it.
090517 13:34:15 [ERROR] Fatal error: Can’t open and lock privilege tables: Table ‘’ doesn’t exist
090517 13:34:15 mysqld_safe mysqld from pid file /usr/local/mysql/var/ ended
090517 13:38:35 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/var

解决办法 在运行初始化权限表的时候使用增加参数–datadir ,命令格式为:
shell> …./mysql_install_db –user=mysql –datadir=/usr/local/mysql/var






(1) 通过控制gcc的选项,可以得出不同类型的中间文件;
(2) 编译流水为:源文件->汇编文件->目标文件(机器文件)->二进制文件。编译过程不能逆着来,也就是流水只能这样流。假如写了一个汇编文件,也可以流到二进制文件。
(3) gcc用到的处理程序分别是:cpp、ccl、as、ld,也就是说图中的gcc命令可由这些处理程序来进行编译的过程,其结果是一样的。这些命令的使用可参照网上的文章。




(1) 对编译过程理解含糊,不能熟悉gcc/g++编译的参数和选项;
(2) Makefile不会写,或写不好。
(1) gcc不是一个命令,而是一个工具集,即GNU Compiler Collection(应该没记错哈~);
(2) gcc的-o选项不只是用来重新指定最终的可执行文件名,而是可以指定编译过程中产生的中间文件名称。
-o 定义输出文件
-E 完成预处理/预编译停止
-c 只编译生成.o,不连接


int main()
printf(“Hello World!\n”);
return 0;
gcc -E hello.c -o hello.i
gcc -S hello.i -o hello.s
gcc -c hello.s -o hello.o
gcc hello.o -o hello

Hello World!

解决Can’t locate in @INC 问题-RedHat Linux环境-mysql-6.0.9-alpha

[root@localhost sql-bench]# ./test-insert

Can’t locate in @INC (@INC contains: /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.7/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.6/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl/5.8.7 /usr/lib/perl5/site_perl/5.8.6 /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.7/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.6/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl/5.8.7 /usr/lib/perl5/vendor_perl/5.8.6 /usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.8/i386-linux-thread-multi /usr/lib/perl5/5.8.8 .) at ./test-insert line 32.
BEGIN failed–compilation aborted at ./test-insert line 32.
       DBI(Database Interface)是perl连接数据库的接口。其是perl连接数据库的最优秀方法,他支持包括Orcal,Sybase,mysql,db2等绝大多数的数据库
       解决办法:安装DBI、Data-ShowTable、DBD-mysql (假设你已安装完perl和mysql数据库)。具体如下:下载三个文件DBI-1.601.tar.gz、Data-ShowTable-3.3.tar.gz、DBD-mysql-3.0007_1.tar.gz,分别处于DBI,DATA,BDB目录下。注意下载的DBI的版本不能太低,如之前作者下载过低版本DBI-1.20不能编译通过。下载后最好保存在目录:/usr/local/src下,并解压产生各模块的安装文件目录。如下
[root@localhost src]#tar zxvf DBI-1.601.tar.gz
[root@localhost src]#tar zxvf Data-ShowTable-3.3.tar.gz
[root@localhost src]#tar zxvf DBD-mysql-3.0007_1.tar.gz
[root@localhost src]# cd DBI-1.601
[root@localhost DBI-1.601]# perl Makefile.PL
[root@localhost DBI-1.601]# make
[root@localhost DBI-1.601]# make test
[root@localhost DBI-1.601]# make install
[root@localhost src]# cd Data-ShowTable-3.3
[root@localhost Data-ShowTable-3.3]# perl Makefile.PL
[root@localhost Data-ShowTable-3.3]# make  (注:第一次make出错,再make多几次)
[root@localhost Data-ShowTable-3.3]# make install (注:无需make test)
[root@localhost src]# cd DBD-mysql-3.0007_1
[root@localhost DBD-mysql-3.0007_1]# perl Makefile.PL –libs=”-L/usr/local/mysql-6.0.9-alhpa/lib/mysql -lmysqlclient -lz -lrt -lcrypt -lnsl -lm”  –cflags=” -I/usr/local/mysql-6.0.9-alpha/include/mysql -g -DUNIV_LINUX” –testuser=root –testsocket=/home/cserken/mysql/tmp/mysql.sock
[root@localhost DBD-mysql-3.0007_1]# make
[root@localhost DBD-mysql-3.0007_1]# make test
[root@localhost DBD-mysql-3.0007_1]# make install
注意:make test之前mysql server要启动,并且要知道server的socket。本文在调试模式下启动mysql server,可获取到socket。
[root@localhost src]# cd /usr/local/mysql-6.0.9-alpha (mysql 安装路径)
[root@localhost mysql-6.0.9-alpha]# gdb libexec/mysqld
(gdb) r –user=root
The program being debugged has been started already.
Start it from the beginning? (y or n) y

Starting program: /usr/local/mysql-6.0.9-alpha/libexec/mysqld –user=root
[Thread debugging using libthread_db enabled]
[New Thread -1208408368 (LWP 3545)]
[New Thread -1208411248 (LWP 3546)]
[Thread -1208411248 (LWP 3546) exited]
[New Thread -1235683440 (LWP 3547)]
091012  8:47:30 [Note] Event Scheduler: Loaded 0 events
091012  8:47:30 [Note] /usr/local/mysql-6.0.9-alpha/libexec/mysqld: ready for connections.
Version: ‘6.0.9-alpha-debug-log’  socket: ‘/home/cserken/mysql/tmp/mysql.sock’ (这个就是socket)
[root@localhost sql-bench]# ./test-insert-using-btree-short –socket=’/home/cserken/mysql/tmp/mysql.sock’
Testing server ‘MySQL 6.0.9 alpha debug log’ at 2009-10-12  9:54:04
Testing the speed of inserting data into 1 table and do some selects on it.
The tests are done with a table that has 100000 rows.
Generating random keys
Creating tables
Inserting 100000 rows in order
Inserting 100000 rows in reverse order
Inserting 100000 rows in random order
Time for insert (300000): 180 wallclock secs (11.30 usr  8.12 sys +  0.00 cusr  0.00 csys = 19.42 CPU)

本机配置环境:RHL + Intel(8核) + mysql-6.0.9-alpha。以上过程在本机上配置通过。

Fedora 10下安装Mplayer(添加源和解决错误问题)

今天用sudo yum install mplayer安装提示没有可以用的包,晕倒,我想是因为官方资源问题,于是在百度搜索找到了解决方法

fedora不给大家提供带有版权问题或是封源的软件,这个给我们下载软件带来了许多麻烦,所以在这里提供RPM Fusion源,来补充我们Linux的“软件库”。直接复制到虚拟终端里就好了,必须需要root的权限哦。另外建议直接复制输入,以免打错字。



rpm -ivh
rpm -ivh



Linux下的播放器很丰富,听说最好的还是MPlayer,简单的只要要安装好几个包,现在与大家一起学下一种在Fedora 10安装MPlayer的简便方法。


首先确保你的电脑一定要联网 ,因为是在线安装;


yum install mplayer

yum install mplayer-gui

Fedora 10下安装Mplayer(添加源和解决错误问题) - Liao - 混乱的博客


打开/etc/mplayer/mplayer.conf, 找到fontconfig=yes一行改成fontconfig=no


# vi /etc/mplayer/mplayer.conf





:wq 敲击回车键

或者终端输入 gedit  /etc/mplayer/mplayer.conf , 就可以像记事本一样编辑了

“New_Face faild. Maybe the font path is wrong. please supply the text font file. ( ~/.mplayer/subfont.ttf ).”见图(1)。

Fedora 10下安装Mplayer(添加源和解决错误问题) - Liao - 混乱的博客


这种情况我们使用Fedora自带的字体来代替,/usr/share/fonts/zh_CN/TrueType/找其中一个字体文件 zysong.ttf复制到当前用户目录的 .mplayer/ 目录下,这样就能解决了字体问题了


[root@localhost ~]# cd /usr/share/fonts/zh_CN/TrueType/

[root@localhost TrueType]# ls   -l (都是一个小写字母L不是数字 1)确认有zysong.tt字体文件



(1) 如果你不是root,而是普通用户sky,只是用了su命令转为root权限,那么你的home下面应该有一个你的用户名的目录sky,我们检查以下你的 这个目录下是否有隐藏目录. mplayer,如果有就可以继续,没有?你到底安装了mplayer么?别和我开玩笑了

(1)[root@localhost TrueType]# ls -al /home/sky(sky是我自己的目录)

(2)如果你是root,那么你的/下面应该有一个你的用户名的目录root,我们检查以下你的这个目录下是否有隐藏目录. mplayer,如果有就可以继续,没有?你到底安装了mplayer么?别和我开玩笑了

(2)[root@localhost TrueType]# ls -al /root




[root@username TrueType]#cd /home/sky(sky是我自己的目录)

[root@username sky]#cd .mplayer

[root@username .mplayer]#cp  /usr/share/fonts/zh_CN/TrueType/zysong.ttf   subfont.ttf



[root@username TrueType]#cd /root

[root@username sky]#cd .mplayer

[root@username .mplayer]#cp   /usr/share/fonts/zh_CN/TrueType/zysong.ttf   subfont.ttf

Fedora 10下安装Mplayer(添加源和解决错误问题) - Liao - 混乱的博客




Fedora 10下安装Mplayer(添加源和解决错误问题) - Liao - 混乱的博客




yum install mplayer

yum install mplayer-gui                 (这是安装图形界面)



error:could not open required directshow codec drvc.dll


[root@localhost ~]# # find /usr/lib -name drvc*
[root@localhost ~]# find /usr/lib -name drvc*
[root@localhost ~]# ldd /usr/lib/codecs/ => (0x00110000) => not found => /lib/ (0x00162000)
/lib/ (0x004ed000)

[root@localhost ~]# yum install



#tar xjvf all-20071007.tar.bz2
# cd all-20071007
# cp * /usr/local/lib/win32/





#chmod 777 /usr/lib/codecs/




ERROR:Could not open required DirectShow codec”错误解决

ldd /usr/lib/codecs/

ldd /usr/lib/codecs/ => (0x00110000) => not found => /lib/ (0x00162000)
/lib/ (0x008ea000)

发现到 => not found

OK,yum install

1#chcon -t textrel_shlib_t /usr/lib/codecs/
2#chcon -t textrel_shlib_t /usr/lib/codecs/
3#chcon -t textrel_shlib_t /usr/lib/codecs/
4#chcon -t textrel_shlib_t /usr/lib/codecs/


话说一图胜千言,可我们现在似乎又进入了一个新的高度 — 一视频胜千图。本文为你推荐9款WordPress视频插件。

1、Video Comments

这个wordpress视频插件,不但可以让你在博客里面插入视频文件,而且可以让读者即时地评论该视频。当你点击播放的时候,视频文件是以弹出窗 口的方式显示的,评论同时会显示在视频的右侧。评论的底部有一个“make comment”按钮,单击它,就可以添加评论了。 继续阅读