- 博客(42)
- 收藏
- 关注
原创 PO,VO,BO,DAO,POJO
JAVA的几种对象: PO: Persistant Ojbect, 持久对象, 可以看成与数据库中的表相映射的JAVA对象。最简单的PO就是对应数据库中某个表中的一条记录,多个记录可以用PO的集合。PO应该不包含任何对数据库的操作。 VO:Value Object,值对象,通常用于业务层之间的数据传递,和PO一样,仅仅包含数据而已。但应是抽象出来的业务对象,可以与表对应
2008-05-19 18:00:00 658
原创 C的基本数据类型
Turbo C有以下几种类型: 整型 : int 浮点型 : float 字符型 : char 指针型 : * 无值型 : void 结构 : struct 联合 : union 其中, 前五种为基本数据类型。修饰符: signed : 有符号 short : 短, 字长2字节 lomg : 长, 字长
2008-05-11 21:51:00 831
原创 线程复习的笔记
一、让步 yield(): 给线程调度机制一个暗示:工作已经做得差不多了,可以让别的线程使用处理器了。(没有任何机制保证它将会被采纳。)二、休眠 sleep(): 调用sleep()必须把它放到try块,因为有可能会被打断,比如interrupt()方法。类似还有wait(),join(),都会受到interrupt()方法的影响。三、优先权 对于一个已经存在的线程,可以用getPriori
2008-04-27 23:54:00 561
原创 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 984
原创 JAVA代理实验1
代理的主要类: java.lang.relfect.Proxy最常用的方法就是生成代理对象:public static Object newProxyInstance(ClassLoader loader, Class[] interface, InvocationHandler h) thr
2008-04-12 00:17:00 590
原创 [Emacs]基本编辑键列表
写在前面 `C- Control-(即 Ctrl-),按住 Ctrl 键再按其他键 `M- Meta-(或 Alt-),按住 Alt 键再按其他键;或按一下 ESC,再按其他键 `C-M- Control-Alt-,按住 Ctrl 和 Alt 两个键再按其他键 point
2007-11-19 14:53:00 638
原创 [Spring]IoC
IoC设计模式,重点关注组件的依赖性、培植以及生命周期。 当然,IoC也适用于简单类, 而不只是组件。除了具有”Dependency Injection”(依赖注入)的昵称外,IoC还有另一个称呼,即Hollywood原则(“Don’t call me, I’ll call you”, 即请不要调用我,我将调用你)。 通常,应用代码需要告知容器或框架,让它们找到自身所需要的类,然后再由应用代码创建
2007-11-08 13:34:00 608
原创 [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 883
原创 [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 624
原创 [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 984
原创 [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 638
原创 [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 761
原创 实用英语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 1323
原创 [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 2209
转载 [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 2927
原创 [Python]Regular Expression Syntax
Element Meaning . Matches any character except /n(if DOTALL, also matches /n)
2007-08-15 16:02:00 831
转载 Emacs教程
Emacs 的命令通常包括控制键(就是上面标有 Ctrl或Ctl的那个)或者 是META键(上面标有EDIT或ALT)。为了方便起见我们将用下面的缩写来 代替这些键的全称:C- 意思是当敲入字符时同时按住控制键,因此,C-f表 示:按住控制键并且按 f 。M- 表示当键入时按住META或ALT或EDIT键
2007-08-01 11:03:00 1217
原创 [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 1414
原创 [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 2619
原创 [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 2479
原创 [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 941
原创 [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 1497
原创 [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 714
原创 [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 898
原创 [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 689
原创 [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 1075
原创 [struts]Summarize
图 1表示一个基于Java技术典型的MVC网络应用: 图 2描述Struts的具体实现: 图 3通过一个活动图更具体描述接受请求直至返回响应的整个过程:
2007-04-17 11:27:00 838
原创 [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 5015
原创 [Python]Apache with Mod_python
apache是分步骤处理请求的,例如,第一步可能是确定用户,接下来验证用户是不是允许访问特定的文件,然后读这个文件并把它发送到客户端。一个典型的静态文件请求包括三步: (1)解析请求的URI为文件在服务器上的路径。 (2)读文件并把它发送到客户端。 (3)记录请求日志。这个日志中记录了执行的步骤,记录内容的多少取决于配置文件中的设置。 一个处
2007-04-12 09:15:00 2448 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 1390
原创 [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 751
原创 [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 766
原创 [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 749
原创 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 1698
原创 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 721
原创 [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 1211
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人