自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(42)
  • 收藏
  • 关注

原创 PO,VO,BO,DAO,POJO

JAVA的几种对象: PO: Persistant Ojbect, 持久对象, 可以看成与数据库中的表相映射的JAVA对象。最简单的PO就是对应数据库中某个表中的一条记录,多个记录可以用PO的集合。PO应该不包含任何对数据库的操作。 VO:Value Object,值对象,通常用于业务层之间的数据传递,和PO一样,仅仅包含数据而已。但应是抽象出来的业务对象,可以与表对应

2008-05-19 18:00:00 644

原创 C的基本数据类型

Turbo C有以下几种类型:    整型   : int    浮点型 : float    字符型 : char    指针型 : *    无值型 : void    结构   : struct    联合   : union    其中, 前五种为基本数据类型。修饰符:    signed   : 有符号    short    : 短, 字长2字节    lomg     : 长, 字长

2008-05-11 21:51:00 814

原创 ANT脚本的一个模板

 

2008-05-05 15:28:00 614

原创 线程复习的笔记

一、让步  yield(): 给线程调度机制一个暗示:工作已经做得差不多了,可以让别的线程使用处理器了。(没有任何机制保证它将会被采纳。)二、休眠  sleep(): 调用sleep()必须把它放到try块,因为有可能会被打断,比如interrupt()方法。类似还有wait(),join(),都会受到interrupt()方法的影响。三、优先权  对于一个已经存在的线程,可以用getPriori

2008-04-27 23:54:00 548

原创 JUnit+ANT自动测试实验

目标:1. 使用ANT自动化测试。2. 自动化测试报告。3. 定时执行自动化测试。(未实现。)被测试类 DefaultCalculator.java:package com.don.classes;/** *//** * @author Administrator * */public class DefaultCalculator ...{    private int x, y;   

2008-04-27 15:05:00 974

原创 JAVA代理实验1

代理的主要类: java.lang.relfect.Proxy最常用的方法就是生成代理对象:public static Object newProxyInstance(ClassLoader loader, Class[] interface,                                                  InvocationHandler h) thr

2008-04-12 00:17:00 582

原创 [Emacs]基本编辑键列表

 写在前面  `C-               Control-(即 Ctrl-),按住 Ctrl 键再按其他键  `M-               Meta-(或 Alt-),按住 Alt 键再按其他键;或按一下 ESC,再按其他键  `C-M-             Control-Alt-,按住 Ctrl 和 Alt 两个键再按其他键  point             

2007-11-19 14:53:00 629

原创 [Spring]IoC

IoC设计模式,重点关注组件的依赖性、培植以及生命周期。 当然,IoC也适用于简单类, 而不只是组件。除了具有”Dependency Injection”(依赖注入)的昵称外,IoC还有另一个称呼,即Hollywood原则(“Don’t call me, I’ll call you”, 即请不要调用我,我将调用你)。 通常,应用代码需要告知容器或框架,让它们找到自身所需要的类,然后再由应用代码创建

2007-11-08 13:34:00 599

原创 [JUnit]What are TestCase, TestSuite, BaseTestRunner

TestCase(or test case):  A class that extends the JUnit TestCase class.  It contains one or more tests represented by testXXX methods. A test case is used to group together tests that exercise common

2007-11-05 13:41:00 870

原创 [Junit]Understanding unit test framework

There are several best practices that unit testing frameworks should follow. These seemingly minor improvements in the TestCalculator program hightlight three rules that(in our experience) all unit te

2007-11-05 10:31:00 616

原创 [Junit]What's API contract

API contract:  A view of an Application Programming Interface(API) as a formal agreement between the caller and the callee. Often the unit tests help define the API contract by demonstrating the expec

2007-11-05 09:40:00 974

原创 [Junit]What's unit test

unit test:  A unit test examines the behavior of a distinct  unit of work.  Within a Java application, the "distinct unit of work" is often(but not always) a single method. By contrast, integration te

2007-11-05 09:35:00 622

原创 [Junit]What's framework

framework:  A framework is a semi-complete application1. A framework provides a reusable, common structure that can be shared between applications. Develops incorporate the framework into their own ap

2007-11-05 09:29:00 749

原创 实用英语400句

I see. 我明白了. I quit! 我不干了! Let go! 放手! Me too. 我也是. My god! 天哪 No way! 不行 Come on. 来吧(赶快) Hold on。 等一等 I agree。 我同意 Not bad。 还不错 Not y

2007-10-31 10:40:00 1310

原创 [QTP]Sample for TP: Login

主要的几个文件: Configuration.xml: Parameters>    Login>        txtLogin>LogintxtLogin>        userName>Agent Name:userName>        password>Password:password>        btnOk>OKbtnOk>  

2007-10-26 16:19:00 2197

转载 [Python]Regular Expression Syntax(CHN)

简介Python 自1.5版本起增加了re 模块,它提供 Perl 风格的正则表达式模式。Python 1.5之前版本则是通过 regex 模块提供 Emecs 风格的模式。Emacs 风格模式可读性稍差些,而且功能也不强,因此编写新代码时尽量不要再使用 regex 模块,当然偶尔你还是可能在老代码里发现其踪影。就其本质而言,正则表达式(或 RE)是一种小型的、高度专业化的编程语言,(在P

2007-10-09 17:31:00 2898

原创 希腊字母和读音对照

序号 读音 小写 大写

2007-08-16 10:29:00 1100

原创 [Python]Regular Expression Syntax

Element Meaning . Matches any character except /n(if DOTALL, also matches /n)

2007-08-15 16:02:00 822

原创 名词复数的规则变化

情况 构成方法 读音 例词 一般 加 -s 1.清辅音后读/s/;2.浊辅音和元音后读/z/;

2007-08-02 11:23:00 1062

转载 Emacs教程

  Emacs 的命令通常包括控制键(就是上面标有 Ctrl或Ctl的那个)或者 是META键(上面标有EDIT或ALT)。为了方便起见我们将用下面的缩写来 代替这些键的全称:C- 意思是当敲入字符时同时按住控制键,因此,C-f表 示:按住控制键并且按 f 。M- 表示当键入时按住META或ALT或EDIT键

2007-08-01 11:03:00 1205

原创 [Python]Django Step by Step 笔记(三)

 创建 list.py: #coding=utf-8from django.shortcuts import render_to_responseaddress= [          {name: 张三, address: 地址一},          {name: 李四, address: 地址二}          ]def 

2007-07-17 13:30:00 1407

原创 [Python]Django Step by Step 笔记(二)

创建 add.py: from django.http import HttpResponsetext =      +              def index(request):    if request.POST.has_key(a):        a = int(request.POST[a])        b = int(r

2007-07-17 11:51:00 2607

原创 [Python]Django Step by Step 笔记(一)

安装:pyton setup.py install安装完毕后, Django会自动在 [python install dir]/scripts目录下安装 django-admin.py。 生成项目目录django-admin.py startproject newtest当前目录下创建newtest目录, 进去后可以看到四个文件:__init__.py : 表示这是一个Pyt

2007-07-17 11:36:00 2471

原创 [Python]alter or assign an object

  To become an effective Python programmer, it is crucial that you learn to draw the distinction between altering an object and assigning to a name, which previously  happened to refer to the object.

2007-07-17 09:39:00 932

原创 [Python]Sequence

In Python, string objects are immutable. Therefore, any operation on a string, including string concatenation,  produces a new string object, rather than modifying an existing one. concatenating N str

2007-06-29 09:19:00 1489

原创 [Python]Converting Between Characters and Numeric Codes

ProblemYou need to turn a character into its numeric ASCII(ISO) or Unicode code, and vice versa. SolutionThats what the built-in functions ord and chr are for:>>>print ord(a)97>>>print chr(98

2007-06-28 16:54:00 705

原创 [Python]Processing a String One Character at a Time

ProblemYou want to process a string one character at a time.SolutionYou can build a list whose items are the strings characters(meaning that the items are strings, each of length of onePython doesn

2007-06-28 16:33:00 889

原创 [Python]Two ways to use Threading

Python的Lib里,提供了两种使用Threading的方法:一、函数式:import timeimport threaddef timer(no, interval):    while True:        print Thread: (%d) Time: %s % (no, time.ctime())        time.sleep(interval)def test(

2007-05-30 15:27:00 684

原创 [Python]Install Django Web Framework with Mod_python

配置mod_python1.使用apache_2.0.54-win32-x86-no_ssl.msihttp://archive.apache.org/dist/httpd/binaries/win32/ 2.安装mod_python-3.2.8.win32-py2.4.exehttp://apache.justdn.org/httpd/modpython/ mod_python中文文

2007-04-20 09:15:00 1068

原创 [struts]Summarize

图 1表示一个基于Java技术典型的MVC网络应用:   图 2描述Struts的具体实现:   图 3通过一个活动图更具体描述接受请求直至返回响应的整个过程:

2007-04-17 11:27:00 832

原创 [Python]private and public

在Python中没有显式的private和public限定符,如果要将一个方法声明为private的,只要在方法名前面加上__即可,如:class demo:    def __init__(self):pass    def __private_method(self):           print This is a private method    def public

2007-04-12 17:46:00 5005

原创 [Python]Apache with Mod_python

 apache是分步骤处理请求的,例如,第一步可能是确定用户,接下来验证用户是不是允许访问特定的文件,然后读这个文件并把它发送到客户端。一个典型的静态文件请求包括三步: (1)解析请求的URI为文件在服务器上的路径。 (2)读文件并把它发送到客户端。 (3)记录请求日志。这个日志中记录了执行的步骤,记录内容的多少取决于配置文件中的设置。 一个处

2007-04-12 09:15:00 2438 1

原创 [Python]Queue -- A synchronized queue class

  The Queue module implements a multi-producer, multi-consumer FIFO queue. It is especially useful in threads programming when information must be exchanged safely between multiple threads. The Queue

2007-04-10 16:48:00 1383

原创 [struts]Write Action Form classes and Action classes

Write ActionForm classes:  An ActionForm class captures input form data that is entered by an end user. An ActionForm calss is a JavaBean and each input form data field is mapped to a property of th

2007-04-10 10:53:00 740

原创 [struts]Write struts-config.xml

  A Struts application has to have a Struts application configuration file(hereafter configuration file). As is shown in web.xml, the name and location of the configuration file can be user definable.

2007-04-10 10:08:00 756

原创 [struts]Write web.xml

  Because a Struts application is a Web application, it has to follow the same rules. that any Web application has to follow: Every Web application must have a web.xml configuration file. The web.xml 

2007-04-09 17:42:00 743

原创 A example for Socket connect use Python

Server:import sockets=socket.socket(socket.AF_INET, socket.SOCK_STREAM)s.bind((119.119.117.32,25001))    s.listen(5)cs,address = s.accept()print got connected from,addresscs.send(byebye)ra=c

2007-04-05 08:48:00 1688

原创 How to remove the tabs from MSN Messenger 7

1) Hit Start > Run and fire up regedit2) Look for the section:HKEY_CURRENT_USER Software Microsoft MSNMessenger PerPassportSettings3) Open all the sections consisting out of a number combination

2007-03-29 18:02:00 713

原创 SSH客户端之SSH Secure Shell 的连接方法

SSH客户端之SSH Secure Shell 的连接方法

2007-03-12 15:47:00 2669

原创 [SilkTest]ANYTYPE data type and AnyWin Class

 ANYTYPE data type Description    A variable of type ANYTYPE stores data of any type, including user-defined types.  Note    Be careful when you give a variable type AN

2007-03-06 10:22:00 1200

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除