x님의 프로필爬山虎的墙사진블로그리스트 도구 도움말
    11월 17일

    Terms in DBMS - Clustering Index

         Clustering is the practice of storing records near one another if they meet certain criteria. One popular criterion is consecutive values in a column of the records. Clustering should reduce disk input and output for records that users often access together.

         Now we describe more about clustering, which our introduction defined. For each table, the database designer declares at most one index as a clustering index. In reorganization (and, whenever possible, in subsequent insertions), the assignment of data records to file pages reflects the order of the data records in the key of the clustering index. For example, the records having the first few values of the key might reside (be stored) in one file page, the records having the next few values might reside in a second file page, etc. This clustering speeds some queries. Now we describe more about clustering, which our introduction defined. For each table, the database designer declares at most one index as a clustering index. In reorganization (and, whenever possible, in subsequent insertions), the assignment of data records to file pages reflects the order of the data records in the key of the clustering index. For example, the records having the first few values of the key might reside (be stored) in one file page, the records having the next few values might reside in a second file page, etc. This clustering speeds some queries.

     
         The database designer optionally declares the clustering index to be a partitioning index. Here, the DBMS divides the table space (and the clustering index) into partitions according to values of the indexed key. We call the table space a partitioned table space. Partitions reside in separate files, whereas a nonpartitioned table space can reside in one file.
        
     
    10월 31일

    成功者语录

    成功者必备的三个品质:
    1、要时刻寻找机会
    2、在机会降临时要果断、及时的把握它;
    3、当机会握在手中时,要充分利用它并去争取成功;
     
    成功者与普通人的最大区别不在于一个人做了多少工作,而在于他做了多少有意义的工作。
    10월 28일

    清华梦的粉碎—写给清华大学的退学申请(转载)

    清华梦的粉碎—写给清华大学的退学申请    
     
          看了王垠的文章,感慨万千。什么时候,我也能到王垠的水平,用自己的大脑思考这个世界,做一些想做的事情。在数据库领域,有很多成功的研究和产品就是某个牛人在博士阶段完成的。可是,我现在每天又做什么样的事情呢?coding, discussing or reading. Bull Shit!
          唉,还是先把人家嗤之以鼻的那些paper看懂,争取早发文章,早日毕业吧。谁让我是一个没有远大理想,没有高尚追求的人呢!
         现在,我的最高革命纲领就是早日毕业。毕业以后该做些什么呢?都一年了还是没有找到答案。
    10월 15일

    研究生院的柿子

    采摘日记
    http://spaces.msn.com/members/vivianrz/blog/cns!1pzUWdVNsLbChNiCzoyy-t6A!204.trak
    10월 14일

    保健专家教您健康饮食

    保健专家教您健康饮食

    保密^_^LX

    饮食

    营养的饮料  绿茶(抗癌、坚固牙齿、软化血管),红葡萄酒(软化血管、降血压、降血脂、每天不超过50100毫升),豆浆(抗癌、补钙)、酸奶、骨头汤、蘑菇汤。

     

    动物食品  推荐鱼虾;

    菜菜

    豆豆豆豆豆

    谷谷谷谷谷谷谷谷谷

     

     

    植物食品  分为谷、豆、菜三大类,

    推荐:老玉米、荞麦、薯类、燕麦、小米(健脾、安眠)、大豆/豆腐(抗癌)、胡萝卜、南瓜(治糖尿病)、苦瓜(糖尿病)、西红柿炒菜(抗癌,不是生吃西红柿,加热的西红柿)、大蒜(抗癌,切成薄片,放在空气中15分钟,生吃,不能成瓣吃)、黑木耳(预防心脑血管疾病),处理后的花粉(美容、治便密),螺旋藻/蓝藻(治糖尿病、溃疡)

    日常饮食,大豆行动计划: 一把蔬菜一把豆,一个鸡蛋加点肉

    十种菜不能多吃

    1 松花蛋(铅中毒)2臭豆腐(硫化氢)3 方便面(防腐剂)4 味精(致癌,影响生殖)5 葵花子6 菠菜(四十岁以上不要吃,缺锌,缺钙)7 猪肝(胆固醇过高)

    8 烤牛羊肉(致癌)9 泡菜(致癌)10 油条(损坏肾脏,影响记忆力,造成老年痴呆)

    喝酒就喝红葡萄酒

     

    睡眠

    晚上10001030睡觉,早晨630700起床

    早上来碗玉米粥 精神焕发,晚上来碗小米粥 睡得香甜

    中老年人早晨可是适当锻炼,但不可剧烈运动

    心理健康 心胸开阔,少生气;心情愉快,笑口常开 ^_^

    健康饮食有氧运动 笑口常开延年益寿

    9월 19일

    贪财是万恶之源

        许多持有消极心态的人常说,“金钱是万恶之源”。但是《圣经》上说,“爱财是万恶之源”。其实,贪财才是万恶之源。
          人的品质是取得成功和保持成果的基石,达到真正完美无缺的品质本身就是成功。
          崇尚金钱是一种优良的品质,但不要过分沉溺其中,不要贪财,也不要吝啬。
         如果你渴望自由,如果你渴望表现自我,就把它们作为赚钱的动力吧。这种动力也是强有力的刺激源,让有追求的人走向成功。
    9월 13일

    编程好,讨到老

    编程编的好,讨饭讨到老!
    6월 22일

    Delphi7程序中上下文关联chm帮助的实现

    Delphi7程序中上下文关联chm帮助的实现

      作者: kelvinsdu@sina.com  QQ:1348513

       Chm格式的帮助是从windows98以后才出现的新的格式,与.hlp格式相比,具有更简单的编辑方式、更丰富的画面。它是通过Chm制作工具对网页文件进行编译得到的,所以理论上你可以把帮助文件做的和网页一样漂亮。

    最简单的制作方法:先用FronPage制作帮助文件,然后用HTML Help Workshop或者Visual CHM等软件编译得到*.chm的帮助文件了。HTML Help Workshop可以到微软的网站上去下载。

     应用程序中的帮助可分为上下文关联和非关联两种。上下文关联,是指用户按F1键后,出现与当前焦点对象(如窗体、文本框、下拉列表框)相关的帮助画面;不同对象,出现的帮助不同。非关联帮助,是指在程序任何位置按F1键后,出现同一帮助画面。

       在Delphi中实现上下文关联的chm帮助,可以通过调用Windows系统目录System32下的HHCTRL.OCX控件中的HtmlHelpA函数实现。 下面就以一个包含两个窗体的小例子,谈谈在Delphi7中实现上下文关联CHM帮助的方法。

        该程序包含两个窗体,主窗体frmMain和弹出窗体dlgQuery。如下图所示

     

    主窗体frmMain中包含一个Edit1Memo1,查询对话框dlgQuery中包含一个Edit1ComboBox1。将它们的HelpContext属性设为大于0的整数值。例如,主窗体frmMain.HelpContext=10100 ,其中的文本框 Edit1.HelpContext=10101, Memo1.HelpContext=10102;对话框dlgQuery.HelpContext=10200,其中 Edit1. HelpContext=10201,ComboBox1. HelpContext=10202

    将所有窗体的KeyPreview属性设为True,响应窗体的键盘事件;然后,编写F1按键的响应代码,调用chm帮助文件中的页面。这样,在不同位置(不同对话框或者不同控件)F1键,程序将弹出与其HelpContext相关的帮助页面。

    相关实现代码如下:

      1.声明Windows API函数HtmlHelpA

      function HtmlHelpA (hwndcaller:Longint; lpHelpFile:string; wCommand:Longint;dwData:string): HWND;stdcall; external 'hhctrl.ocx'

      2.定义调用chm帮助文件的公共函数

    procedure ShowChmHelp(sTopic:string);

    //公用函数ShowChmHelp,根据不同的参数显示不同帮助画面。

    Const HH_DISPLAY_TOPIC=0;

    var i:integer;

    begin

    i:=HtmlHelpA(Application.Handle,Pchar(ExtractFileDir(application.exename)

    +'\help.chm'),HH_DISPLAY_TOPIC,sTopic);

      if i=0 then

      begin

          Showmessage('help.chm 帮助文件不存在或者文件格式损坏!');

          exit;

      end;

    end;

      3.设置应用程序的Onhelp事件响应函数

    procedure TfrmMain.FormCreate(Sender: TObject);

    begin

      application.OnHelp:=ChmHelp;

    end;

      4. 设置所有窗体的OnHelp事件

    function TfrmMain.FormHelp(Command: Word; Data: Integer; var CallHelp: Boolean): Boolean;

    begin

         case Data of

         10100: ShowChmHelp('MainFunction.htm');  

         10101: ShowChmHelp('ProjectManager.htm');

         10102: ShowChmHelp('FinanceInput.htm');

         else  ShowChmHelp('SystermIntroduction.htm');

       end;

    end;

    function TdlgQuery.FormHelp(Command: Word; Data: Integer; var CallHelp: Boolean): Boolean;

    begin

       case Data of

         10200: ShowChmHelp('QuickQuery.htm');

         10201: ShowChmHelp('SuperQuery.htm');

         else  ShowChmHelp('SystermIntroduction.htm');

       end;

    end;

    5. 所有窗体处理F1按键事件

    procedure TfrmMain.FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);

    begin

       if key=VK_F1 then

       begin

           application.HelpCommand (HELP_CONTEXT,TControl(Self.ActiveControl).HelpContext);

       end;

    end;

    procedure TdlgQuery.FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);

    begin

       if key=VK_F1 then

       begin

           application.HelpCommand (HELP_CONTEXT,TControl(Self.ActiveControl).HelpContext);

       end;

    end;

     

    这样,通过设置相关属性和编写有关代码,就可以实现程序与chm格式帮助的关联。

        以上介绍了delphi7应用程序与chm帮助关联的一种简单实现方法。如果要实现更复杂的关联(例如,与帮助页面内特定位置/书签的关联,请查看HtmlHelpA函数的说明。

    Delphi5下CHM帮助上下文关联的实现与Delphi7下略有不同,请见《Delphi程序与Chm帮助关联的简单实现》(http://www.csdn.com.cn/program/880.htm)

        如果需要例子程序的源代码,可直接与作者联系。kelvinsdu@sina.com

    6월 9일

    Different research style in ISCAS

         Different research style in ISCAS

    Last year, I came to the Institute of Software, the Chinese Academy of Sciences, after having graduated from Shandong University. The biggest difference between them is the research style, that is, what you do in your lab and how to research.

       During the three years at Shandong University, I had enough time and energy to read papers and make scientific researches on what I was engaged in. As far as I know, however, what a lot of PhD students here is doing now includes not only research work, but some tiring and boring engineering projects. In our lab, there are a lot of projects to do, which came from government or local companies or even other companies in other provinces. Some three-grade-PhD students have to postpone their graduation dissertation in the absence of two necessary papers. We have to take part in a new project after having finished an old one because our lab must earn one million RMB every year for survival. In addition, we must write a number of papers on domestic or foreign journals and conferences. As a new member, I work like a coding machine day after day. Little time is spared to study books and papers that a doctor student should read.

       On the other hand, for tutors are busy with applying for projects they have little time to research and give advices to students. This is different from the tutor of my master advisor who I gave more help and suggestions. But now I feel like a blind man on a smoggy street. I have to direct myself to my own graduation.

       These two differences interfere with my study.

    Maybe every PhD student has his maladjustment. Even though, it’s time to make a new plan to adapt myself to the new life here.

    5월 15일

    我应该戴一顶什么样的博士帽?

    (写于2004年11月10日)

    昨天我有幸参加了微软亚洲研究院与国家自然科学基金委员会共同举办的第六届“二十一世纪的计算”学术研讨会,聆听了诺贝尔奖获奖者杨振宁博士和多位计算机界世界级大师的讲话,感受颇多。

          微软公司做为计算机操作系统和众多应用软件的供应商,为信息技术的发展做出了卓越贡献。看着那些副总裁的演讲和研究人员的Demo,我想在场的每一位观众都会对他们的思想和科研成果所感染。微软公司做为世界最大的跨国公司之一,一方面在世界范围内通过复制软件copy赚取高额利润,另一方面集中了世界一流的科研人员创办研究院,花费巨大的人力、物力进行科学研究,对其产品提供理论与技术支持。他们的努力对科学技术的发展和社会生活水平的提高都有深远的影响。

    坦白的说,我对他们谦虚的会议名称——《二十一世纪的计算》“学术研讨会”——有点疑问。首先,除了杨振宁教授的报告“近代计算机之渊源”外,微软的领导们就是在做企业宣传,研究人员在做科研成果的报告。其次,“学术研讨会”,在偌大的几千人的体育馆里开学术讨论会?从现场的提问情况(详见

    http://it.sohu.com/20041109/n222903249.shtml)来看,在场的几千人中,又有多少人能与其进行学术讨论呢?整个中国国内又有几个单位能与微软进行“学术讨论”呢?实在应该感谢微软提供了这次让我们这些学生开拓思维的机会。

        在被微软的新思想和新技术感动的同时,做为现在或将来的科研工作者,尤其是在场的大学生,我们应该想些什么,做些什么呢?面对未来的创新和挑战,我们有应当承担什么样的责任呢?在计算机领域,我们的技术人员是在微软的平台上做应用开发呢,还是另起炉灶探索自主产权的系统?也许这个问题根本没有讨论的必要,因为对大部分科技人员来说,除了前者,没有其他选择。但是,出于信息安全的考虑,我们应该做点象“龙芯”、“红旗linux”的产品开发。这个问题应该不是这么简单能回答的,也不是我这样一个刚开始读博的研究生所能自言自语回答的。

        开完会回来后,不经意间又看到了李开复那封写给中国学生的信(http://www.cstc.net.cn/docs/docs.php?id=149),又是“你想戴一顶什么样的博士帽”那部分,那曾经感动我,让我全力考博的部分。

        “当你拿到你的博士学位时,你应该成为你所从事的研究领域里世界第一的专家”。在李开复进入卡内基梅隆大学攻读计算机博士学位时,系主任曾对他这样讲。我来到中科院软件所时,戴国忠老师在开学典礼上好像也这样讲过。而我对自己这样要求过吗?

        “一个打算攻读博士学位的人,就应该给自己树立一个很高的目标”。我的目标是什么,在哪里?我有目标吗?

        “如果没有雄心壮志,就千万不要自欺欺人”。我是一个有雄心壮志的人吗?

        “每周工作七天,每天工作16个小时”。而我除了每周在实验室的公司里工作5天,做6codingtesting外,我又看了几本书、几篇paper呢?

        是啊,我应该戴一顶什么样的博士帽呢?这是我应该考虑的问题。