以前 Servlet doGet(HttpServletRequest,HttpServletResponse) ,doGet方法无法进行单独测试 ,要测试,必须构造request和response对象
Struts2 Action的execute方法非常便于单独测试,这个方法不依赖Servlet API
Servlet常用API对象 : HttpServletRequ...
分类:
编程语言 时间:
2015-01-20 11:59:06
阅读次数:
200
一、使用dbms_sql执行查询
利用dbms_sql执行select语句,其顺序为 open cursor-->parse-->define column-->execute-->fetch rows-->close cursor;
1、创建班组表结构,如下图所示:
proteamid:主键ID、proteamname:班组名称,jctype:机车类型,workflag:工作标...
分类:
数据库 时间:
2015-01-19 12:54:00
阅读次数:
251
错误写法:cli.execute('9b2606a50304','echo "bibo">/tmp/1.txt')争取写法:cli.execute('9b2606a50304','bash -c "echo \'yuanyuan\' > /tmp/2.txt"')参考:https://bugzill...
分类:
其他好文 时间:
2015-01-19 12:26:40
阅读次数:
219
int main(int argc, const char * argv[]) {
@autoreleasepool {
//first
void (^myBlock)() = ^{
NSLog(@"myBlock execute");
};
myBlock();
...
分类:
移动开发 时间:
2015-01-18 18:36:34
阅读次数:
249
1. action默认执行execute()方法,该方法会抛出异常。2. 特定方法的验证:如要验证save(),则验证方法应该是validateSave()。执行顺序:validateSave()----validate()---save() 验证结束后,发生错误后,不会继续往下执行,不再执行sa....
分类:
其他好文 时间:
2015-01-17 17:49:29
阅读次数:
152
type TActionComponent = class(TObject) public procedure Execute;virtual; end; TStuckPig = class(TActionComponent) public procedure Execut...
分类:
其他好文 时间:
2015-01-16 18:45:48
阅读次数:
161
新版本的pdo会有这个问题:General error: 2014 Cannot execute queries while other unbuffered queries are active. Consider using PDOStatement::fetchAll(). Alternati...
分类:
其他好文 时间:
2015-01-16 14:26:08
阅读次数:
233
命令模式把发出命令的责任和执行命令的责任分割开,委派给不同的对象。就像我们去餐厅,点菜是找服务员,然后服务员去让厨师做菜而不是我们直接找厨师做菜public interface Commend { public void execute();}public class Remoter ...
分类:
其他好文 时间:
2015-01-15 20:10:53
阅读次数:
105
android 的AysncTask直接调用Execute会在在一个线程池里按调用的先后顺序依次执行。如果应用的所有网络获取都依赖这个来做,当有一个网络请求柱塞,就导致其它请求也柱塞了。在3.0 以后引入了新的方法。可以不在一个线程池里运行。class TaskHelper { public ...
分类:
移动开发 时间:
2015-01-15 12:30:22
阅读次数:
266
Syntax:
#sed -e 'command' -e 'command' filename
Note: -e option is optional for sed with single command. sed will execute the each set of command while processing input from the pattern buffer.
...
分类:
其他好文 时间:
2015-01-14 15:35:56
阅读次数:
164