set COMMIT mode in db2 clp

As default, DB2 CLP will do commit after you issue each DB2 statements or SQL automatically.If...

As default, DB2 CLP will do commit after you issue each DB2 statements or SQL automatically.

If you want to change it instead of issuing COMMIT or ROLLBACK manually, do following.

SQLLIB\BIN> db2
db2 => list command options
    -c   ON
db2 => update command options using c off
db2 => list command options
    -c   OFF

This change will only exists during this session. The setting will lose when you close this CLP and open CLP next time.

following cmd will get the same result with above.

SQLLIB\BIN> db2 list command options
    -c    ON
SQLLIB\BIN> db2 +c
db2 =>
db2 => list command options
    -c    OFF
db2 => quit
SQLLIB\BIN> db2 list command options
    -c    ON

There's also the way to keep the settings forever, do following.

SQLLIB\BIN\> db2 list command options
    -c   ON
SQLLIB\BIN\> db2set db2options=+c
SQLLIB\BIN\> db2 list command options
    -c   OFF

This change will take effection immediately even for others having been opened CLP windows. And will keep along.

Use following cmd set it back to ON. 

SQLLIB\BIN> db2set db2opptions=-c

Reference

difference in Double quotes and Single quotes

In unix shell or commands, we often use Double Quotes (") and Single Quotes ('), but...

In unix shell or commands, we often use Double Quotes (") and Single Quotes ('), but we should understand when we must use Double Quotes or we must use Single Quotes, or we could choose either.

  • Single Quotes ('): Shell will send it to Unix Commands without doing any interpretation.
  • Double Quotes ("): Shell will send it to Unix Commands after doing interpretation on following characters
    • Doller Signs ($)
    • Back Quotes (`)
    • Backslashs (\)
  • Backslashs (\) is the same as Single Quotes (') to the next character followed this Backslash.

For understanding the points above, we must understand the 2 different things: Shell and Unix Commands.

We issue all Unix Commands within Unix Shell environment. Shell will interpret (or say process) strings and variables first before they are sent to Unix Commands. For example: echo, ls are Unix Commands, you will issue these commands in an Unix Shell, like Boune Shell, Kane Shell, etc.

Practice 

$ ls
file1 file2
$ echo file*
file1 file2
$ echo "file*"
file*
$ echo $HOME
/home/zhangy
$ echo "$HOME"
/home/zhangy
$ echo '$HOME'
$HOME

Continue to read to see a sample.

Refer to

继续阅读 "difference in Double quotes and Single quotes" 的剩余内容

install linux on 2nd hdd in my thinkpad

Install Red Hat Enterprise Linux 3 on 2nd hdd in my thinkpad with usb dvd-rom.Choose Grub...

Install Red Hat Enterprise Linux 3 on 2nd hdd in my thinkpad with usb dvd-rom.

Choose Grub as boot selector and install grub on the first sector of 2nd hdd without lba support. Reboot, hit F12, choose 2nd hdd to boot up, during booting, screen showed GRUB 4 characters, then stop there. Grub can't continue to load boot menu.

Boot using linux cd in rescue mode, reinstall grub with on the first sector of 2nd hdd:

$ grub-install /dev/hdc

Reboot, hit F12, choose 2nd hdd, during boot, can't see the boot menu, but grub continues to load and get following error message:

  • Cannot mount selected partition
  • This error is returned if the partition requested exists, but the filesystem type cannot be recognized by GRUB.
See current setting files.
$ cat /boot/grub/device.map
fd0  /dev/fda
hd0  /dev/hda
hd1  /dev/hdc
$ cat /boot/grub/grub.conf 
title Linux
root (hd1,0)
kernel /vmlinuz-2.4.21-4.EL ro root=LABEL=/
initrd /initrd-2.4.21-4.EL.img

title Windows
root (hd0,0)
chainload (+1)

Finally, I caught the point. When choosing 2nd hdd as first boot device by F12 during booting, BIOS will see it as hda, and the ist native hdd will change from hda to hdc.

During the grub installing, grub will guess the boot devices list, and generate a device.map file and grub.conf with the detected settings. that time, grub is right, but when booting from 2nd hdd, the thing changes.

I had it working with following settings.

$ cat /boot/grub/device.map
fd0  /dev/fda
hd0  /dev/hda
hd1  /dev/hdc
$ cat /boot/grub/grub.conf 
title Linux
root (hd0,0)
kernel /vmlinuz-2.4.21-4.EL ro root=LABEL=/
initrd /initrd-2.4.21-4.EL.img

title Windows
root (hd1,0)
chainload (+1)

But i am still wondering why linux could keep recognize /dev/hdc but grub not? needs answer.

refer to:

My native hdd is working on PIO mode

I check my System Events, there's following error continually detected. Event Type:    ErrorEvent Source:    atapiEvent Category:    NoneEvent...

I check my System Events, there's following error continually detected. 

Event Type:    Error
Event Source:    atapi
Event Category:    None
Event ID:    9
Date:        1/20/2006
Time:        11:05:39 AM
User:        N/A
Computer:    IBM-ALEX
Description:
The device, \Device\Ide\IdePort0, did not respond within the timeout period.

 

Accounding to the artical in refference, I found the related entry in my registry:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E96A-E325-11CE-BFC1-08002BE10318}\0004 

I deleted this dword value, then reboot.

MasterIdDataCheckSum

The tools Everest and Sandra Lite say the 1st hdd is working on UDMA 5, but the windows device manager still says PIO mode, I made a test of copying file, the speed is slow as before.

I checked the the dword value MasterDeviceTimingModeAllowed, it's less 0xFFFFFFFF, so I set it back to 0xFFFFFFFF, and deleted MasterIdDataCheckSum again, then reboot.

It works, this time the 3rd part tools and windows device manager both say it's on UDMA 5 mode.

I re-tested 1st hdd by copying files, it's as fast as 2nd hdd now. 

refer to: 

The dvd-rw comes with my thinkpad has the maximum UDMA 2, and it's using UDMA 2 mode now.

The native hdd still keeps reducing to PIO mode after a few days.

I found this topic which descibe why this mess happens again and again.

The hotfix has been included in winxp sp2 which I have patched.
The step in the MORE INFORMATION section seems will help me. I take this step.

Add a new DWORD value, use 1 as the Data.

ResetErrorCountersOnSuccess

at following each Registry key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E96A-E325-11CE-BFC1-08002BE10318}\0004
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E96A-E325-11CE-BFC1-08002BE10318}\0005

then reboot. 

The last solution seems worked, I don't meet the problem of reverting to PIO mode for a week. there're also a few atapi timeout errors, but the chksum should be reset on next success.

install 2nd HDD for my thinkpad

I got a new 2.5" HDD and a HDD adapter for my thinkpad. Hitachi HTS541080G9AT00, 80G,...

I got a new 2.5" HDD and a HDD adapter for my thinkpad.

  • Hitachi HTS541080G9AT00, 80G, 8M cache, 5400 RPM, UDMA 5
  • Thinkpad 2nd HDD adapter for Ultrabay Slim 

the 2nd hdd on thinkpad needs the hdd adapter using Ultrabay Slim interface.

it's very easy to fix and plug in, but there's a little gappy between the hdd and adapter.

windows xp is able to install driver for the new hardware automatically, the 2nd hdd appears as a new ATA device on Secondary IDE Channel and works on UDMA 5(ATA-100) mode.

By copying files, the 2nd hdd is faster than the native one. I found my Primary IDE Channel is working on PIO mode, that's a problem.

I have fixed the problem above, now the native one works on UDMA 5. 

I query the warranty info at:

  • http://www.hitachigst.com/warranty/jsp/arma71.jsp

I don't find China in regions list, so choose Hong Kong instead, enter serial number: XBGDN7DE

Result: 

Quick warranty check results
Serial number Expiration date
(YYYY-MM-DD)
Sold to GEO
XBGDN7DE 2009-01-25 AP

While the warranty Quick Check may show this hard drive has a valid warranty, NOT ALL WARRANTIES ARE TRANSFERABLE, therefore this Quick Check is not a guarantee of warranty entitlement.

 

smbusdh.sys causes windows Blue screen error

the file smbusdh.sys is provided by IBM CSS software.if you are using IBM CSS version 5.41...

the file smbusdh.sys is provided by IBM CSS software.

if you are using IBM CSS version 5.41 or less, the windows Blue screen error may be causing.

the solution is download the new version of smbusdh.sys and replace the old one, refer to

Updated SMB Device Hub controller driver to correct Windows blue screen error
http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-61451 

using Isolation levels

There's 4 isolation levels in db2.uncommitted read  (UR)cursor stability (CS)read stability (RS)repeatable read (RR) example:SELECT *...

There's 4 isolation levels in db2.

  1. uncommitted read  (UR)
  2. cursor stability (CS)
  3. read stability (RS)
  4. repeatable read (RR)

example:

SELECT * FROM TEST
WITH UR
DECLARE mycur CURSOR FOR
SELECT * FROM TEST
WITH UR

Can't specify isolation in the ddl of a view.

The following syntax is also supported:

  • UR - READ UNCOMMITTED
  • UR - DIRTY READ
  • CS - READ COMMITED 
  • CS - CURSOR STABILITY
  • RR - REPEATABLE READ
  • RR - SERIALIZABLE

 

running firefox on Ram disk

I had ever moved my IE temporary files folder into a Ram disk for reducing the...

I had ever moved my IE temporary files folder into a Ram disk for reducing the disk IO during surfing.

When I play with Firefox, I don't find any option for moving its temporary files folder like IE does. But finally I found it, not just moving the firefox's profiles, even for firefox.exe itself.

There're 3 level solutions you may choose.

  1. Enable built-in memory cache feature to speed firefox up.
  2. Move profile folder to Ram disk including temporary files folder.
  3. Run both firefox.exe and profile folder on Ram disk.

The 1th solution is most simple, the 3th solution is most complex but has the maximum of reducing disk IO.

The steps for the 1th solution refer to:

Before starting to do the next 2 solutions, you will have to create a Ram disk on your computer. I use this tool called RamDisk, download it at:

  • http://www.greendown.cn/Software.asp?id=530

The steps for the 2th solution refer to:

The steps for the 3th solution: 

  1. Copy the Firefox application folder and your profile folder to the Ram disk. In this example we will use R:\Firefox for the application folder and R:\FFProfile as the profile folder, assuming the drive letter for the Ram disk is R:.
  2. Create a simple batch file called R:\Firefox.bat with the following line:
    start R:\Firefox\firefox.exe -profile R:\FFProfiles
  3. Optionally, you may don't want to lose the bookmarks saved in Ram disk after reboot. Move bookmark file back to harddisk folder by entering about:config in the address field of firefox and set
    browser.bookmarks.file=C:\\Documents and Settings\\Alex\\Application Data\\Mozilla\\Firefox\\Profiles\\ve6luvh6.default\\bookmarks.html
  4. Make system copy firefox application and profile folder from hard disk to Ram disk automatically at each boot time by adding following lines to file C:\AUTOEXEC.BAT.
    rd /S /Q R:\Firefox
    rd /S /Q R:\FFProfiles
    del R:\Firefox.bat

    xcopy /E /H /K "%APPDATA%\Mozilla\Firefox\Profiles\ve6luvh6.default\*" R:\FFProfiles\*
    xcopy /E /H /K "C:\Program Files\Mozilla Firefox\*" R:\Firefox\*

    echo start R:\Firefox\firefox.exe -profile R:\FFProfiles>R:\Firefox.bat
    R:\Firefox.bat
  5. Optionally, disable firefox memory cache to reduce memory usage because the whole program and profiles are running in Ram by setting
    browser.cache.memory.enable=false
  6. Notes: With this solution, all settings made in Ram disk will be lost after system reboots. If you want the settings to be used after rebooting, should make the setting change by running firefox based on harddisk, and then re-copy all folder from hard disk to Ram disk by running AUTOEXEC.BAT.
  7. Refer to:
    Run Firefox from removable media
    http://www.mozilla.org/support/firefox/tips#oth_usb

Refer to

Tested on

  • OS: Windows xp professional
  • Firefox: version 1.5

继续阅读 "running firefox on Ram disk" 的剩余内容

UltraEdit

/* REPLACE 'var=123;' WITH 'var = 123;' */'=^([~ ]^)''= ^1''^([~ |!]^)=''^1 ='/* REPLACE 'IF    var =...
/* REPLACE 'var=123;' WITH 'var = 123;' */

'=^([~ ]^)'
'= ^1'


'^([~ |!]^)='
'^1 ='


/* REPLACE 'IF    var = 123' WITH 'IF var = 123' */

'IF  +'
'IF '

/* REPLACE 'columnname' WITH '    t1.columnname            AS columnname,' */

'%^(*^)$'
'    t1.^1^t^t^tAS ^1,'

Shell 编程学习笔记(二)

Match multi-tab replace all of 1 or more TAB with write space in file, it seems...

Match multi-tab

replace all of 1 or more TAB with write space in file, it seems "+" doesn't work in sed cmd.

$ sed 's/[    ][    ]*/ /g' file

Unknown write space number

To get the trailer number 3 from a file like this:

cat test.dat
A.B.C.D.E.A.B.C.D.E
A.B.C.D.E.A.B.C.D.E
A.B.C.D.E.A.B.C.D.E
COUNT       3

The write spaces between COUNT and the number 3 are unknown.

Use:

tail -1 test.dat | cut -d' ' -f2- | tr -d ' '
tail -1 test.dat
COUNT       3
tail -1 test.dat | cut -d' ' -f2-
3
tail -1 test.dat | cut -d' ' -f2- | tr -d ' '
3

DB2 学习笔记(四)

在AIX 系统上使用"db2 ? xxx" 命令查看帮助,需要加转移符"\" $ db2 \? list db2 get authorizations 用来获取当前用户的权限  Direct SYSADM authority                   ...
在AIX 系统上使用"db2 ? xxx" 命令查看帮助,需要加转移符"\"
$ db2 \? list
db2 get authorizations 用来获取当前用户的权限

 Direct SYSADM authority                    = NO
Direct SYSCTRL authority                   = NO
Direct SYSMAINT authority                  = NO
Direct DBADM authority                     = YES
Direct CREATETAB authority                 = YES
Direct BINDADD authority                   = YES
Direct CONNECT authority                   = YES
Direct CREATE_NOT_FENC authority           = YES
Direct IMPLICIT_SCHEMA authority           = YES
Direct LOAD authority                      = YES
Direct QUIESCE_CONNECT authority           = YES
Direct CREATE_EXTERNAL_ROUTINE authority   = YES
Direct SYSMON authority                    = NO
 Indirect SYSADM authority                  = NO
Indirect SYSCTRL authority                 = NO
Indirect SYSMAINT authority                = NO
Indirect DBADM authority                   = NO
Indirect CREATETAB authority               = NO
Indirect BINDADD authority                 = NO
Indirect CONNECT authority                 = YES
Indirect CREATE_NOT_FENC authority         = NO
Indirect IMPLICIT_SCHEMA authority         = NO
Indirect LOAD authority                    = NO
Indirect QUIESCE_CONNECT authority         = NO
Indirect CREATE_EXTERNAL_ROUTINE authority = NO
Indirect SYSMON authority                  = NO

DB2在编目节点(catalog node)时,可以在使用admin 关键字,指定admin 代表此节点对应了一个DB2系统的安装,称为系统(system),如果不指定admin,代表此节点对应了一个DB2的实例(instance),并需要至少指定服务名与端口号其中之一来映射此实例。

$ db2 catalog [admin] node 

Use "WITH HOLD" cause for cursor declaration would have more control on sources used by this cursor.

Use "LEAVE myloop" to stop execution in loop and go to the end of the loop.

Use "ITERATE myloop" to stop execution in loop and return to the begin of the loop to continue next loop.

Below db2 commands above need to attach to target node first before issuing them. 

$ db2 list active databases
$ db2 list applications
UNIQUNE cause in savepoint

the cause intend to that the same savepoint name can't be reused in the same savepoint level.

Units of work

A transaction is commonly referred to in DB2(R) Universal Database (DB2 UDB) as a unit of work. A unit of work is a recoverable sequence of operations within an application process. It is used by the database manager to ensure that a database is in a consistent state. Any reading from or writing to the database is done within a unit of work.

For example, a bank transaction might involve the transfer of funds from a savings account to a checking account. After the application subtracts an amount from the savings account, the two accounts are inconsistent, and remain so until the amount is added to the checking account. When both steps are completed, a point of consistency is reached. The changes can be committed and made available to other applications.

A unit of work starts when the first SQL statement is issued against the database. The application must end the unit of work by issuing either a COMMIT or a ROLLBACK statement. The COMMIT statement makes permanent all changes made within a unit of work. The ROLLBACK statement removes these changes from the database. If the application ends normally without either of these statements being explicitly issued, the unit of work is automatically committed. If it ends abnormally in the middle of a unit of work, the unit of work is automatically rolled back. Once issued, a COMMIT or a ROLLBACK cannot be stopped. With some multi-threaded applications, or some operating systems (such as Windows(R)), if the application ends normally without either of these statements being explicitly issued, the unit of work is automatically rolled back. It is recommended that your applications always explicitly commit or roll back complete units of work. If part of a unit of work does not complete successfully, the updates are rolled back, leaving the participating tables as they were before the transaction began. This ensures that requests are neither lost nor duplicated.


sql0010N state 42603

编译过程时出现此错误信息,可能是由于多余的单引号引起,行号指定处为错误点。

sql0104N state 42601

过程如果超过65535字节长度限制,编译时会抛出此错误信息,行号指定处为限制点。

对于两个整形变量作除法运算,结果可能并不是你希望得到的小数(如果分子小于分母)

select 2/4 from sysibm.sysdummy1
1
----
0


若希望得到小数,可在运算之前转换分子分母任意一个到DECIMAL 或者DOUBLE

select DECIMAL(2)/4 from sysibm.sysdummy1
1
----
0.5

"GET DIAGNOSTICS" must be the first next line after DML, otherwise the ROW_COUNT will not be the value you want.

DELETE FROM PRMS1.opprtnty_line_item;
GET DIAGNOSTICS v_affected_rows = ROW_COUNT;

It's impossible to change a column from not null to nullable by alter table statement.
But there's a way that meets this requirement by execute sys procedure.

It's not allowed to drop columns from a table without re-creation of the table.

db2 doesn't support following sql

select NULL as c1 from sysibm.sysdummy1

在DB2 中重命名表或者索引

RENAME TABLE EMP TO EMPLOYEE
RENAME TABLE ABC.EMP TO EMPLOYEE 
RENAME INDEX NEW-IND TO IND
RENAME INDEX ABC.NEW-IND TO IND

拥有检查约束和非主键自增列的表不允许重命名,在视图、触发器、函数或者物化查询表中被引用的表也不允许重命名,只能Drop 掉,重新创建。

使用DMS 表空间,DB2绕过操作系统,直接管理用于表空间的存储,可以保证数据页物理连续的存放。不过有个例外,如果是files类型的DMS表空间容器,则不能总是保证数据页是物理连续存放的,而对于裸设备(raw)容器,则可以完全保证。

going with Gmail contacts

There're 3 view on Contacts page. Frequently MailedAll ContactsGroupsThe first view will show the mail...


There're 3 view on Contacts page.

  1. Frequently Mailed
  2. All Contacts
  3. Groups

The first view will show the mail addresses which you most frequently mailed in past days. It also contains the goups as same as the mail addresses.

You could create your own named groups for getting your contacts order. The conception of Groups is like "tag" which allow you give multi tags on one item. That means you are able to assign one contact to more than one group. This is very helpful.

The most powerful feature with gmail is the search. It also comes with Contacts.  You're able to search all the fields definded on contacts such as full name, email account, email domain name, notes for persons, phone, whatever.  And the search is going with all operations where you feel you need it.;) As the search result, you could pick up one or a group of them for operation, such as sending email or managing goups.

With the powerful contacts search the groups feature is a little bit redundant as my personal opinion, however the group is still a more convenient way for sending a group mail quickly in most cases than searching. But the group will take more efforts for getting order.

More about importing and exporting a batch of contacts please continue to read.

继续阅读 "going with Gmail contacts" 的剩余内容

Start to read linux kernel 0.11

准备开始阅读linux 内核源代码,了解一些操作系统的底层细节,并深入学习一下C语言,为日后阅读开源数据库源代码的计划做些准备。选择了赵炯编写的《Linux 内核完全注释》,基于0.11版本的内核进行,发布于1991年12月,虽然版本低,不过可以从最简单精髓的部分开始,会更容易一些。0.11  版本内核包含:bootimage.Zrootimage.Zlinux-0.11.tar.Zas86.tar.ZINSTALL-0.11 作者的网站:http://oldlinux.org/ 提供以上文件下载,并提供这本书以及其他书籍的电子版,同样有一个讨论区提供交流。 ...

准备开始阅读linux 内核源代码,了解一些操作系统的底层细节,并深入学习一下C语言,为日后阅读开源数据库源代码的计划做些准备。

选择了赵炯编写的《Linux 内核完全注释》,基于0.11版本的内核进行,发布于1991年12月,虽然版本低,不过可以从最简单精髓的部分开始,会更容易一些。

0.11  版本内核包含:

  • bootimage.Z
  • rootimage.Z
  • linux-0.11.tar.Z
  • as86.tar.Z
  • INSTALL-0.11

 作者的网站:http://oldlinux.org/ 提供以上文件下载,并提供这本书以及其他书籍的电子版,同样有一个讨论区提供交流。

 

目前的主流笔记本硬盘

Toshiba 东芝 MK2016GAP    1M    20G    ATA-66    4200 RPMMK4026GAX    16M       699    40G     ATA-100   5400 RPMMK6026GAX    16M  ...

Toshiba 东芝 

  • MK2016GAP    1M    20G    ATA-66    4200 RPM
  • MK4026GAX    16M       699    40G     ATA-100   5400 RPM
  • MK6026GAX    16M       899    60G   ATA-100   5400 RPM
  • MK8032GAX    8M        999    80G   ATA-100   5400 RPM
  • MK8026GAX    16M        1299    80G   ATA-100   5400 RPM

My thinkpad is using MK8032GAX.

My Sony SR/9K is using Toshiba MK2016GAP.

Hitachi 日立

  • HTS424040M9AT00    2M    40G   ATA-100   5400 RPM
  • HTS541040G9AT00    8M    40G   ATA-100   5400 RPM
  • HTS541080G9AT00    8M    880    80G   ATA-100    5400 RPM
  • HTS541010G9AT00    8M    100G   ATA-100   5400 RPM

日立命名规则 

  • H - Hitachi
  • T - TravellStar, D - DeskStar
  • S - Standard
  • 54 - 5400 RPM
  • 10 - ?
  • 80 - 80G
  • G9 - ?
  • AT00 - ATA-100

the rule refer to:

http://www.dnys.cn/blogview.asp?logID=185

应该了解的几个数据库概念

数据库事务的两阶段提交 用于在单个事务内进行多个数据库同时更新,第一阶段,询问各数据库是否已经完成操作,第二阶段,向各数据库同时发送提交命令或者回滚命令。 数据库事务的四个隔离级别 序列化 可重复读 读提交 读未提交 悲观锁与乐观锁 事务开始即获得锁定,并保持到事务结束 事务开始时并不获得锁,仅当数据被更新的时候才锁定数据,在提交之前需要检查冲突。 非聚簇索引与聚簇索引的区别 使用非聚簇索引的表,新数据添加在表的尾部 使用聚簇索引的表,表中数据按照索引的顺序进行排列,增删改时的开销较大。...

数据库事务的两阶段提交

用于在单个事务内进行多个数据库同时更新,第一阶段,询问各数据库是否已经完成操作,第二阶段,向各数据库同时发送提交命令或者回滚命令。

数据库事务的四个隔离级别

序列化
可重复读
读提交
读未提交

悲观锁与乐观锁

事务开始即获得锁定,并保持到事务结束
事务开始时并不获得锁,仅当数据被更新的时候才锁定数据,在提交之前需要检查冲突。

非聚簇索引与聚簇索引的区别

使用非聚簇索引的表,新数据添加在表的尾部
使用聚簇索引的表,表中数据按照索引的顺序进行排列,增删改时的开销较大。

训练双眼凝视

今天鬼使神差忘记去上课,不过在回来乘轻轨时,练习了一下双眼凝视一处,格斗中双眼应尽量保持着注视对手,做任何动作时,避免眨眼甚至闭眼,多数人习惯在发力的瞬间眨眼。不过现在凝视一小会就会流眼泪,越是近的物体越厉害,需要锻炼,不知道是什么生理特征决定了凝视会流眼泪?...

今天鬼使神差忘记去上课,不过在回来乘轻轨时,练习了一下双眼凝视一处,格斗中双眼应尽量保持着注视对手,做任何动作时,避免眨眼甚至闭眼,多数人习惯在发力的瞬间眨眼。

不过现在凝视一小会就会流眼泪,越是近的物体越厉害,需要锻炼,不知道是什么生理特征决定了凝视会流眼泪?

软件测试的术语

Unit test: 單元測試,針對某個component或method做的測試 Black box test: 黑箱測試,針對功能面來做測試 White box test: 白箱測試,針對內部實作的流程來做測試 Stress test: 壓力測試,測試系統的效能極限 Regression...

Unit test: 單元測試,針對某個component或method做的測試
Black box test: 黑箱測試,針對功能面來做測試
White box test: 白箱測試,針對內部實作的流程來做測試
Stress test: 壓力測試,測試系統的效能極限
Regression test: 回歸測試,當新功能增加的同時,會不會影響到舊功能的正確性
Integration test: 整合測試,兩個系統整合後有沒有錯誤
System test: 整個system跑起來後的測試
Alpha test: 開放內部測試人員做測試
Beta test: 開放給外部使用者做測試
Monkey test: 搞怪測試,盡可能惡搞來看系統穩定度
Acceptance test: 測試系統或產品是否會滿足客戶的需求

IBM 的一些测试team: 

FVT: funcational verification test
PVT: product verification test
SVT: system verification test
SIT: system integration test
UAT: user acceptance test

Lesson 2

格斗中的手法格斗中,练习用手拨开对方来拳,拨开同时设法拿住对方手腕或者小臂,扭动并向内带,同时用另一只手击打对方同侧手的肩关节,可令对方脱臼。变化也可在一击之后迅速上步别住腿后,压肩摔倒对方。另一只手若不击打肩关节,也可以击打颈部,用前掌缘、三个中指收在一起、或者中指微收均可。这是比较凶狠的打法,打在颈部的任何方向都会很难受。击颈之后,可顺势立掌击胸,接着抬肘翻腕用背拳击打下颌。抹的手法可运用在上面的环节,抓住对方一手之后,用另外的手从对方颈侧或者下颌向上抹到前额,并猛地下压,可将对方摔倒,使其颈部非常难受。垫步前低鞭腿接前手拳鞭腿落地同时,前手拳应打出,另只手注意防守。可由一人拿两个拳靶配合练习。  ...

格斗中的手法

格斗中,练习用手拨开对方来拳,拨开同时设法拿住对方手腕或者小臂,扭动并向内带,同时用另一只手击打对方同侧手的肩关节,可令对方脱臼。

变化

也可在一击之后迅速上步别住腿后,压肩摔倒对方。

另一只手若不击打肩关节,也可以击打颈部,用前掌缘、三个中指收在一起、或者中指微收均可。这是比较凶狠的打法,打在颈部的任何方向都会很难受。击颈之后,可顺势立掌击胸,接着抬肘翻腕用背拳击打下颌。

抹的手法

可运用在上面的环节,抓住对方一手之后,用另外的手从对方颈侧或者下颌向上抹到前额,并猛地下压,可将对方摔倒,使其颈部非常难受。

垫步前低鞭腿接前手拳

鞭腿落地同时,前手拳应打出,另只手注意防守。

可由一人拿两个拳靶配合练习。 

 

setup Perl&Apache on windows xp

Download Download the All-in-One package at:http://www.apache.org/dyn/closer.cgi/perl/win32-bin/This package contains Perl and Apache binaries. so you don't need to...

Download 

Download the All-in-One package at:

This package contains Perl and Apache binaries. so you don't need to download Apache additionally.

The downloaded file name is Perl-5.8-win32-bin-0.10.exe

Installation & configuration

Run this installation file, choose a directory where would be installed, if you want the files to be in C:\Perl\, just Enter C:\ . I installed at D:\Green\

All files would be copied into D:\Green\Perl and D:\Green\Apache2

After the installation, the application will ask you if start to configure the Apache and Perl. just need to follow the indication of the text based configuration wizard.

If configure is succeed with no error then go to next step.

Add these 2 paths where are your Perl and Apache installed into your OS environment variable PATH:

D:\Green\Perl\bin
D:\Green\Apache2\bin

Then open a dos window to run following commands:

dos> apache -k install
dos> apache -k start
  • The 1st command will add a service in windows services list called Apache2.
  • The 2nd command will start the Apache web server with default settings.

After this, you can open IE to visit your web server by either of below URLs. you should see the Apache welcome page if you generated them during the configuration above.

Following step is very important and must be taken! For running perl script named as .cgi or .pl on Apache, you should have below code at the first line in your each .pl or .cgi file:

#!d:/green/perl/bin/perl -w

Up to now, the Apache and Perl environment have been ready for use. visit these links for checking if Perl and PHP both work.

Reference

 

Lesson 1 - 蓝带和接腿摔

新年的第一堂课,郑教练授了蓝带,虽然上次考核时,教练说大家的技术都能达到所申请的级别,不过自己内心还是有些不安,最近经常缺课,回家自己锻炼的次数也越来越少。每天自己在家抽出10分钟的时间练习一下拳脚都很好,但要求质量,多用脑。接腿摔使用环境:对方扫踢方法:以同侧手接住对方小腿,上步同时用另一只手控制住对方大腿,顺势向自己后手侧扭腰,摔倒对方。对手如果使用低位腿法,直接用手接住,若是高位,则先同侧手格挡,然后翻臂上步,另一手配合摔倒对方,动作要迅速,形成下意识反应,瞬间完成格挡和摔法。要领:以腰带臂,转体,令对方失去平衡,被摔倒方有旋转或者被甩出的感觉。变化:上步后,可用前手(肘)直接迅速下压对方大腿上侧,可令对方原地摔倒。破解:被摔方可顺势将重心贴近对方,用手臂搂住对方脖子,同时用力下踏挣脱被抓住的腿。也可在对方使用摔法之前,用同侧拳击大队方面部。教练建议多练习空踢,以增加控腿能力,否则鞭腿虽踢出力量,但无法迅速回到实战式。桂宾讲习武人可经常用深的器皿盛热水泡脚,没过脚踝为宜,以活动气血。...

新年的第一堂课,郑教练授了蓝带,虽然上次考核时,教练说大家的技术都能达到所申请的级别,不过自己内心还是有些不安,最近经常缺课,回家自己锻炼的次数也越来越少。每天自己在家抽出10分钟的时间练习一下拳脚都很好,但要求质量,多用脑。

接腿摔

使用环境:对方扫踢

方法:以同侧手接住对方小腿,上步同时用另一只手控制住对方大腿,顺势向自己后手侧扭腰,摔倒对方。对手如果使用低位腿法,直接用手接住,若是高位,则先同侧手格挡,然后翻臂上步,另一手配合摔倒对方,动作要迅速,形成下意识反应,瞬间完成格挡和摔法。

要领:以腰带臂,转体,令对方失去平衡,被摔倒方有旋转或者被甩出的感觉。

变化:上步后,可用前手(肘)直接迅速下压对方大腿上侧,可令对方原地摔倒。

破解:被摔方可顺势将重心贴近对方,用手臂搂住对方脖子,同时用力下踏挣脱被抓住的腿。也可在对方使用摔法之前,用同侧拳击大队方面部。

教练建议多练习空踢,以增加控腿能力,否则鞭腿虽踢出力量,但无法迅速回到实战式。

桂宾讲习武人可经常用深的器皿盛热水泡脚,没过脚踝为宜,以活动气血。