Danny's profile季节的水滴PhotosBlogListsMore Tools Help
7/3/2009

火灾

最近天气热,没想到经然还发生火灾。
6/30/2009

Linux/Unix Command: crontab

The crontab command, found in Unix and Linux operating systems, is used to schedule commands to be executed periodically. To see what crontabs are currently running on your system, you can open a terminal and run:
    sudo crontab -l
To edit the list of cronjobs you can run:
    sudo crontab -e
This will open the default editor (could be vi or pico, if you want you can change the default editor) to let us manipulate the crontab. If you save and exit the editor, all your cronjobs are saved into crontab. Cronjobs are written in the following format:
    * * * * * /bin/execute/this/script.sh
 
Scheduling explained:
As you can see there are 5 stars. The stars represent different date parts in the following order:
1. minute (from 0 to 59)
2. hour (from 0 to 23)
3. day of month (from 1 to 31)
4. month (from 1 to 12)
5. day of week (from 0 to 6) (0=Sunday)
 
Example:
1. Logon Linux use comment account (eg: danny)
2. Create an autorun.sh file
 (1) [danny@www ~]$ cd /home/danny
 (2) [danny@www danny]$ vi autorun.sh 
 (3) [danny@www danny]$ chmod 755 autorun.sh
3. Edit the corrent Crontab
[danny@www danny]$ crontab –e
    0 23 * * * /home/danny/autorun.sh

Efficiency of the Filzip3.04

Yesterday, I wanted extract a file which include 50,000 sub-files (but each sub-file is just 4kb), it spend me 7~8 hours.
 
Oh, my god, I wasted the whole day just unzip a file. What I did is download and install 7-Zip instead immediately.
 
Maybe I should send a email to Mr. Philipp Engel(philipp.engel(at)filzip.com) and tell him about this, before he release the new version, pls do the performance test first.
6/26/2009

Ubuntu下安装Eclipse

1、首先下载eclipse-SDK:http://www.eclipse.org/downloads/

2、安装eclipse
(1)把eclipse-SDK解压到某个目录中,如解压到/opt下,得到/opt/eclipse目录
(2)在/usr/bin目录下创建一个启动脚本eclipse,执行下面的命令来创建:sudo vi /usr/bin/eclipse
然后在该文件中添加以下内容:
#!/bin/sh
export MOZILLA_FIVE_HOME=”/usr/lib/mozilla/”
export ECLIPSE_HOME=”/opt/eclipse”
$ECLIPSE_HOME/eclipse $*
(3)让修改该脚本的权限,让它变成可执行,执行下面的命令:
sudo chmod +x /usr/bin/eclipse
 
3、在桌面或者gnome菜单中添加eclipse启动图标
(1)在桌面或者启动面板上添加图标:
在桌面(右键单击桌面->创建启动器)上创建一个新的启动器,然后添加下列数据:
名称:Eclipse
命令:eclipse
图标: /opt/eclipse/icon.xpm
(2)在Applications(应用程序)菜单上添加一个图标
用文本编辑器在/usr/share/applications目录里新建一个名为eclipse.desktop的启动器,如下面的命令:sudo vi /usr/share/applications/eclipse.desktop 
然后在文件中添加下列内容:
[Desktop Entry]
Encoding=UTF-8
Name=Eclipse Platform
Comment=Eclipse IDE
Exec=eclipse
Icon=/opt/eclipse/icon.xpm
Terminal=false
StartupNotify=true
Type=Application
Categories=Application;Development;
保存文件。完成整个安装过程,可以双击桌面eclipse的图标来运行eclipse。
6/4/2009

Space国内竟然不能访问

Space空间本周竟然不能访问,难道是因为Bing上线?

6/3/2009

50 Specific Ways to Improve Your Testing

1.  Requirements Phase
Item 1: Involve Testers from the Beginning
Item 2: Verify the Requirements
Item 3: Design Test Procedures As Soon As Requirements Are Available
Item 4: Ensure That Requirement Changes Are Communicated
Item 5: Beware of Developing and Testing Based on an Existing System

2.  Test Planning

Item 6: Understand the Task At Hand and the Related Testing Goal
Item 7: Consider the Risks
Item 8: Base Testing Efforts on a Prioritized Feature Schedule
Item 9: Keep Software Issues in Mind
Item 10: Acquire Effective Test Data
Item 11: Plan the Test Environment
Item 12: Estimate Test Preparation and Execution Time

3.  The Testing Team

Item 13: Define Roles and Responsibilities
Item 14: Require a Mixture of Testing Skills, Subject-Matter Expertise, and Experience
Item 15: Evaluate the Tester's Effectiveness

4.  The System Architecture

Item 16: Understand the Architecture and Underlying Components
Item 17: Verify That the System Supports Testability
Item 18: Use Logging to Increase System Testability
Item 19: Verify That the System Supports Debug and Release Execution Modes

5.  Test Design and Documentation

Item 20: Divide and Conquer
Item 21: Mandate the Use of a Test-Procedure Template and Other Test-Design Standards
Item 22: Derive Effective Test Cases from Requirements
Item 23: Treat Test Procedures As "Living" Documents
Item 24: Utilize System Design and Prototypes
Item 25: Use Proven Testing Techniques when Designing Test-Case Scenarios
Item 26: Avoid Including Constraints and Detailed Data Elements within Test Procedures
Item 27: Apply Exploratory Testing

6.  Unit Testing

Item 28: Structure the Development Approach to Support Effective Unit Testing
Item 29: Develop Unit Tests in Parallel or Before the Implementation
Item 30: Make Unit-Test Execution Part of the Build Process

7.  Automated Testing Tools

Item 31: Know the Different Types of Testing-Support Tools
Item 32: Consider Building a Tool Instead of Buying One
Item 33: Know the Impact of Automated Tools on the Testing Effort
Item 34: Focus on the Needs of Your Organization
Item 35: Test the Tools on an Application Prototype

8.  Automated Testing: Selected Best Practices

Item 36: Do Not Rely Solely on Capture/Playback
Item 37: Develop a Test Harness When Necessary
Item 38: Use Proven Test-Script Development Techniques
Item 39: Automate Regression Tests When Feasible
Item 40: Implement Automated Builds and Smoke Tests

9.  Nonfunctional Testing

Item 41: Do Not Make Nonfunctional Testing an Afterthought
Item 42: Conduct Performance Testing with Production-Sized Databases
Item 43: Tailor Usability Tests to the Intended Audience
Item 44: Consider All Aspects of Security, for Specific Requirements and System-Wide
Item 45: Investigate the System's Implementation To Plan for Concurrency Tests
Item 46: Set Up an Efficient Environment for Compatibility Testing

10.  Managing Test Execution
Item 47: Clearly Define the Beginning and End of the Test-Execution Cycle
Item 48: Isolate the Test Environment from the Development Environment
Item 49: Implement a Defect-Tracking Life Cycle
Item 50: Track the Execution of the Testing Program
 

Effective Software Testing: 50 Specific Ways to Improve Your Testing

By Elfriede Dustin

Publisher: Addison Wesley

Pub Date: December 18, 2002

ISBN: 0-201-79429-2

6/1/2009

A good blog to learn Oracle

Focusing Specifically On Oracle Indexes, Database Administration and Some Great Music
Richard Foote's Oracle Blog (Thanks for Jussi Volanen sharing)
5/31/2009

eclipse的提示功能不见了怎么办

windows->preference->java->Editor->content Assist->Advance
5/27/2009

Python中and和or的特殊性质

Python 中,andor 执行布尔逻辑演算,如你所期待的一样。但是它们并不返回布尔值,而是返回它们实际进行比较的值之一。

1. and 介绍

>>> 'a' and 'b'         (1)
'b'
>>> '' and 'b'          (2)
''
>>> 'a' and 'b' and 'c' (3)
'c'
(1) 使用 and 时,在布尔环境中从左到右演算表达式的值。0''[](){}None 在布尔环境中为假;其它任何东西都为真。还好,几乎是所有东西。默认情况下,布尔环境中的类实例为真,但是你可以在类中定义特定的方法使得类实例的演算值为假。你如果布尔环境中的所有值都为真,那么 and 返回最后一个值。在这个例子中,and 演算 'a' 的值为真,然后是 'b' 的演算值为真,最终返回 'b'
(2) 如果布尔环境中的某个值为假,则 and 返回第一个假值。在这个例子中,'' 是第一个假值。
(3)

所有值都为真,所以 and 返回最后一个真值,'c'

2. or 介绍

>>> 'a' or 'b'          [1]
'a'
>>> '' or 'b'           [2]
'b'
>>> '' or [] or {}      [3]
{}
>>> def sidefx():
...     print "in sidefx()"
...     return 1
>>> 'a' or sidefx()     [4]
'a'
[1] 使用 or 时,在布尔环境中从左到右演算值,就像 and 一样。如果有一个值为真,or 立刻返回该值。本例中,'a' 是第一个真值。
[2] or 演算 '' 的值为假,然后演算 'b' 的值为真,于是返回 'b'
[3] 如果所有的值都为假,or 返回最后一个假值。or 演算 '' 的值为假,然后演算 [] 的值为假,依次演算 {} 的值为假,最终返回 {}
[4] 注意 or 在布尔环境中会一直进行表达式演算直到找到第一个真值,然后就会忽略剩余的比较值。如果某些值具有副作用,这种特性就非常重要了。在这里,函数 sidefx 永远都不会被调用,因为 or 演算 'a' 的值为真,所以紧接着就立刻返回 'a' 了。

如果你是一名 C 语言黑客,肯定很熟悉 bool ? a : b 表达式,如果 bool 为真,表达式演算值为 a,否则为 b。基于 Pythonandor 的工作方式,你可以完成相同的事情。

  • 使用 and-or 技巧

3. and-or 技巧介绍

>>> a = "first"
>>> b = "second"
>>> 1 and a or b {1}
'first'
>>> 0 and a or b {2}
'second'
{1}  这个语法看起来类似于 C 语言中的 bool ? a : b 表达式。整个表达式从左到右进行演算,所以先进行 and 表达式的演算。1 and 'first' 演算值为 'first',然后 'first' or 'second' 的演算值为 'first'
{2} 0 and 'first' 演算值为 False,然后 0 or 'second' 演算值为 'second'

然而,由于这种 Python 表达式单单只是进行布尔逻辑运算,并不是语言的特定构成,这是 and-or 技巧和 C 语言中的 bool ? a : b 语法非常重要的不同。如果 a 为假,表达式就不会按你期望的那样工作了。(你能知道我被这个问题折腾过吗?不止一次?)

4. and-or 技巧无效的场合

>>> a = ""
>>> b = "second"
>>> 1 and a or b         (1)
'second'
(1) 由于 a 是一个空字符串,在 Python 的布尔环境中空字符串被认为是假的,1 and '' 的演算值为 '',最后 '' or 'second' 的演算值为 'second'。噢!这个值并不是你想要的。

and-or 技巧,也就是 bool and a or b 表达式,当 a 在布尔环境中的值为假时,不会像 C 语言表达式 bool ? a : b 那样工作。

and-or 技巧后面真正的技巧是,确保 a 的值决不会为假。最常用的方式是使 a 成为 [a]b 成为 [b],然后使用返回值列表的第一个元素,应该是 ab中的某一个。

5. 安全使用 and-or 技巧

>>> a = ""
>>> b = "second"
>>> (1 and [a] or [b])[0] <1>
''
<1> 由于 [a] 是一个非空列表,所以它决不会为假。即使 a0 或者 '' 或者其它假值,列表 [a] 也为真,因为它有一个元素。

到现在为止,这个技巧可能看上去问题超过了它的价值。毕竟,使用 if 语句可以完成相同的事情,那为什么要经历这些麻烦事呢?哦,在很多情况下,你要在两个常量值中进行选择,由于你知道 a 的值总是为真,所以你可以使用这种较为简单的语法而且不用担心。对于使用更为复杂的安全形式,依然有很好的理由要求这样做。例如,在 Python 语言的某些情况下 if 语句是不允许使用的,比如在 lambda 函数中。

  • 进一步阅读

Python Cookbook 讨论了其它的 and-or 技巧

《Dive Into Python》 http://diveintopython.org (英文原版) 和 http://www.woodpecker.org.cn/diveintopython(中文版)

5/13/2009

Windows下如何得到一个站点的IP

C:\>ping mail.163.com
Pinging mcache.idns.yeah.net [123.125.50.22] with 32 bytes of datas:
 
C:\>nslookup mail.163.com
Server:  bogon.cn.bl.medicel.com
Address:  192.168.9.10
Non-authoritative answer:
Name:    mcache.idns.yeah.net
Address:  123.125.50.22
Aliases:  mail.163.com, mcache.mail.163.com
5/12/2009

The Scrum Development Process

 
Other useful website about Scrum:
 
There has a book you can download for free:Scrum and XP from the Trenches
You can get more information about the auther: Henrik Kniberg, and his blog is: http://blog.crisp.se/henrikkniberg
5/10/2009

Windows快速关机工具DirectShutDown

DirectShutDown是一款免费和高可靠性的可以提供快速关机、重启、锁定、进入睡眠状态的工具;
DirectShutDown支持Windows98, Windows ME, Windows 2000, Windows XP,但是不支持Linux, Mac, Palm, or PocketPC;
 
点击链接下载:DirectShutDown
5/5/2009

微软开始提供Windows7 RC版下载

 
1.下载日期持续到09年7月;
2.本次下载的用户可以免费使用到10年6月1日,从10年3月1日起安装此版本的电脑将会每隔两个小时自动关机一次;
3.对PC硬件的要求:
  • 1 GHz 或更高的 32-bit (x86) or 64-bit (x64) 处理器

  • 1 GB RAM (32-bit) / 2 GB RAM (64-bit)

  • 16 GB (32-bit) / 20 GB (64-bit) 可用硬盘空间

  • DirectX 9 图像处理器 with WDDM 1.0 or higher driver

5/1/2009

CMMI:Process Areas as Presented in the Continuous Representation

Process Management
OPF   Organizational Process Focus
OPD  Organizational Process Definition
OT    Organizational Training
OPP  Organizational Process Performance
OID   Organizational Innovation and Deplotment
 
Project Management
PP    Project Planning
PMC  Project Monitoring and Control
SAM  Supplier Agreement Management
IPM   Integrated Project Management
RSKM Risk Management
IT     Integrated Teaming
ISM   Integrated Supplier Management
QPM  Quantitative Project Management
 
Engineering
REQM  Requirements Management
RD    Requirements Development
TS    Technical Solution
PI    Product Integration
VER   Verification
VAL   Validation
 
Support
CM    Configuration Management
PPQA Process and Product Quality Assurance
MA    Measurement and Analysis
DAR   Decision Analysis and Resolution
OEI   Organizational Environment for Integration
CAR   Causal Analysis and Resolution
4/15/2009

CMMI:Process Areas as Presented in the Staged Representation

Maturity Level 2
REQM Requirements Management
PP     Project Planning
PMC  Project Monitoring and Control
SAM  Supplier Agreement Management
MA    Measurement and Analysis
PPQA Process and Product Quality Assurance
CM    Configuration Management
 
Maturity Level 3
RD   Requirements Development
TS   Technical Solution
PI    Product Integration
VER  Verification
VAL  Validation
OPF  Organizational Process Focus
OPD  Organizational Process Definition
OT    Organizational Training
IPM   Integrated Project Management
RSKM Risk Management
IT     Integrated Teaming
ISM  Integrated Supplier Management
DAR  Decision Analysis and Resolution
OEI   Organizational Environment for Integration
 
Maturity Level 4
OPP  Organizational Process Performance
OEI  Organizational Environment for Integration
 
Maturity Level 5
OID   Organizational Innovation and Deplotment
CAR  Causal Analysis and Resolution
4/9/2009

如何在Eclipse下开发Jython

在Eclipse下安装JyDT插件,详细步骤请看:
更多帮助信息可以参考:http://www.redrobinsoftware.net/jydt/
3/14/2009

Windows下安装Jython2.2.1

    Jython的安装比较简单,Jython的安装程序本身就是一个Java应用程序,因此,在安装之前,你必须具备Java运行的环境。下面以Jython的Jython2.2.1为例,说明Jython的安装步骤:
 二.在Jython组织的官方网站http://www.jython.org下载Jython的最新版jython_installer-2.2.1.jar
 三.开始->运行->cmd->转到jython_installer-2.2.1.jar所在目录,输入命令:java -jar jython_installer-2.2.1.jar
  四.出现安装界面(目前好像只支持英语和德语)
 
 五.验证安装(进入安装到的目录,输入jython)
 六.Hello World
>>>print "Hello World!"
 七.退出
  1.按两次 ctrl + c
  2.>>>import sys; sys.exit()
 八.可以设置环境变量PATH=D:\jython2.2.1
  这样在命令行下只用输入jython即可
1/18/2009

ADO.NET测试(二) --测试有返回值的存储过程

     假如,我们要测试一个叫做usp_MoreThan()的存储过程,这个存储过程返回SQL表中价格高于输入数值的int值:
create procedure usp_MoreThan
    @inputPrice money
as
    declare @ans int
    select @ans = count(*) from tblPrices where price > inputPrice
    return @ans
go
  1. int expected = 2;
  2. int actual;
  3. string input = "100.00";
  4. string connString = "Server=(local);Database=dbPrices;UID=userId;PWD=password";
  5. SqlConnection sc = new SqlConnection(connString);
  6. SqlCommend cmd = new SqlCommend("usp_MoreThan", sc);
  7. cmd.CommandType = CommandType.StoredProcedure;
  8. SqlParameter p1 = cmd.Parameters.Add("ret_val", SqlDbType.Int);
  9. p1.Direction = ParameterDirection.ReturnValue;
  10. SqlParameter p2 = cmd.Parameters.Add("@inputPrice", SqlDbType.Money);
  11. p2.Direction = ParameterDirection.Input;
  12. p2.Value = input;
  13. sc.open();
  14. if(actual == expected)
  15.     Console.WriteLine("Pass");
  16. else
  17.     Console.WriteLine("Fail");

雪梅娘

无意中在中山公园龙之梦竟然发现了这个,XM同学~嘿嘿

 
Photo 1 of 88

Danny

Location
就用那几根火柴,开一场烟火晚会。点不亮黑夜影子,依然是我的流星。

Counter

Xanga Counters

Please wait...
Sorry, the comment you entered is too long. Please shorten it.
You didn't enter anything. Please try again.
Sorry, we can't add your comment right now. Please try again later.
To add a comment, you need permission from your parent. Ask for permission
Your parent has turned off comments.
Sorry, we can't delete your comment right now. Please try again later.
You've exceeded the maximum number of comments that can be left in one day. Please try again in 24 hours.
Your account has had the ability to leave comments disabled because our systems indicate that you may be spamming other users. If you believe that your account has been disabled in error please contact Windows Live support.
Complete the security check below to finish leaving your comment.
The characters you type in the security check must match the characters in the picture or audio.
wrote:
lsc663@126.com 南开大学 遗传学
多谢了~~
May 3
No namewrote:

nancy116aj@hotmail.com  中国医科大学 临床

thanks 4 sharing!

Apr. 15
No namewrote:
wting254@yahoo.com.cn 厦门大学 法硕 非常感谢!!资料分享顶咯~
Mar. 16
聪聪wrote:
176456938@qq.com 广西大学 城市规划 非常感谢!!
Feb. 27
亚飞 李wrote:
 oklyf9@gmail.com 东南大学 计算机应用,非常感谢分享资料
Feb. 19
烨 张wrote:
it means i love u...............
Oct. 23
可儿wrote:
哎呀,没有“奖”那有动力写呀。你看看人人拿“奖”时的表情,你就知我的要求不过分了,哈哈
Oct. 23
可儿wrote:
向“劳动者”致敬
Oct. 23