非常多时候我们使用hibernate的session时,都是让session在某一执行环境中保持其唯一。比如在同一线程内用同一个session。在同一方法内用同一session,这样我们就能够用session里面缓存好的数据。但。我想说的不是缓存,且听我一一道来。 近期试用spring3.0.2+s ...
分类:
数据库 时间:
2016-04-02 09:34:50
阅读次数:
225
Given a binary search tree, write a function kthSmallest to find the kth smallest element in it. Note: You may assume k is always valid, 1 ≤ k ≤ BST's ...
分类:
其他好文 时间:
2016-04-01 12:43:25
阅读次数:
145
1.使用ipaddr查看ip地址,检查ip是否生效,一安装好redhat7的时候,默认是没有配置ip地址的[root@xc~]#ipaddr
1:lo:<LOOPBACK,UP,LOWER_UP>mtu65536qdiscnoqueuestateUNKNOWN
link/loopback00:00:00:00:00:00brd00:00:00:00:00:00
inet127.0.0.1/8scopehostlo
valid_lftf..
分类:
其他好文 时间:
2016-03-30 11:12:00
阅读次数:
942
Django form 流程 1、创建类,继承form.Form 2、页面根据类的对象自动创建html标签 3、提交,request.POST 封装到类的对象里,obj=UserInfo(request.POST) 4、用户输入是否合法 obj.is_valid() 5、全部合法,获取全部内容 ob ...
分类:
其他好文 时间:
2016-03-28 01:53:41
阅读次数:
1723
题目:
Given a string containing just the characters , determine if the input string is valid.The brackets must close in the correct order, “()” and “()[]{}” are all valid but “(]” and “([)]” are not.翻译:...
分类:
其他好文 时间:
2016-03-24 14:49:05
阅读次数:
135
Given n nodes labeled from 0 to n - 1 and a list of undirected edges (each edge is a pair of nodes), write a function to check whether these edges mak
分类:
其他好文 时间:
2016-03-23 13:09:11
阅读次数:
175
Evaluate the value of an arithmetic expression inReverse Polish Notation. Valid operators are +, -, *, /. Each operand may be an integer or another ex
分类:
其他好文 时间:
2016-03-20 14:21:01
阅读次数:
135
一、应用场景一:判断一个字符串是否符合特定的格式 案例1:判断一个字符串必须是7位整数 上面例子输出 valid。 注意:在js中, ^表示开头,如果上面的表达式 省去了 ^ ,则 如 ss1234567也是符合要求的 ,也就说只需后7位是数字即可。 而$表示结尾,如果没有 $ ,则只需前面7位是数
分类:
编程语言 时间:
2016-03-19 21:13:34
阅读次数:
200
4 关于android的一个常见错误:Unable to add window --token is not valid android.view.WindowManager$BadTokenException: Unable to add window -- token android.os.Bi
分类:
移动开发 时间:
2016-03-18 20:21:52
阅读次数:
299
在Xcode中突然好久没有使用真机调试了,今天使用真机的时候,出现如下的警告,并真机运行失败:The identity used to sign the executable is no longer valid.Please verify that your device's clock is proprtly set,and that your signing certificate is n...
分类:
其他好文 时间:
2016-03-17 07:10:28
阅读次数:
182