摘自:http://blog.csdn.net/myjlvzlp/article/details/84343761、批量添加元素session.insert(String
string,Object o)public void batchInsertStudent(){ List ls = n...
分类:
其他好文 时间:
2014-05-26 22:43:20
阅读次数:
239
Let S = s1 s2...s2n be a well-formed string of
parentheses. S can be encoded in two different ways:q By an integer sequence P =
p1 p2...pn where pi is...
分类:
其他好文 时间:
2014-05-26 22:07:33
阅读次数:
300
/** * Created by 刘朋程 on 2014-5-22.博客园 */ class
GouZaoHanShu { private int age; //私有变量age private String name; //私有变量name ...
分类:
其他好文 时间:
2014-05-26 22:07:12
阅读次数:
296
1、SQLiteDataBase对象的query()接口:publicCursorquery(Stringtable,String[]columns,Stringselection,String[]selectionArgs,
Stringg...
分类:
数据库 时间:
2014-05-26 21:33:02
阅读次数:
500
为Python加入默认模块搜索路径方法一:函数加入1) import sys2)
查看sys.path3)
加入sys.path.append("c:\\")方法二:改动环境变量windows用户能够改动系统环境变量PYTHONPATH方法三:添加.pth文件,推荐!在site-packages加入...
分类:
编程语言 时间:
2014-05-26 21:30:47
阅读次数:
333
Write a function to find the longest common
prefix string amongst an array of strings.
要减少比较次数。在实现过程中我的想法是,2个2个比较,那么只要遍历一次数组就好。而且,在比较过程中,以较短的那个长度作为最大比...
分类:
其他好文 时间:
2014-05-26 21:29:43
阅读次数:
203
一些函数执行其它非python程序受限执行结束执行操作系统接口相关模块1
一些函数callablecallable()是一个布尔函数,确定一个对象是否可以通过函数操作符(())来调用。如果函数可调用便返回True,否则便是False。
比如:>>> callable(1)False>>> calla...
分类:
编程语言 时间:
2014-05-26 21:04:06
阅读次数:
390
Scala中的match, 比起以往使用的switch-case有著更強大的功能, 1. 傳統方法
def toYesOrNo(choice: Int): String = choice match { case 1 => "yes" case 0
=> "no" case _ => "error"...
分类:
其他好文 时间:
2014-05-26 20:45:46
阅读次数:
285
defaultdict并不像有些地方说的那样是一种方法,而是内建类dict的一个子类,它覆盖了dict的一个方法,并且增加了一个变量。defaultdic类实例化对象时的主要参数是default_factory(其他参数可使用默认值),该参数决定了defaultdict对象中键对应值的类型。一些de...
分类:
编程语言 时间:
2014-05-26 20:44:06
阅读次数:
340
题目描述:一只青蛙一次可以跳上1级台阶,也可以跳上2级。求该青蛙跳上一个n级的台阶总共有多少种跳法。输入:输入可能包含多个测试样例,对于每个测试案例,输入包括一个整数n(1long
long stair[71];void getStair(void);int main(){ int n; ...
分类:
其他好文 时间:
2014-05-26 20:37:07
阅读次数:
218