1.部门和员工的关系:部门员工是一对多的关系,即一个部门有多个员工,所以员工表里有部门id:depart_id在下面这个代码中各添加部门和员工的一个记录即:新增一个部门,同时这个部门下有一个员工static Department add() { Session s = null; Transac.....
分类:
系统相关 时间:
2014-07-23 16:16:51
阅读次数:
266
if(conn != null) { try { conn.close(); } catch(Exception e) { e.printStackTrace(); } conn = null; }写个工具类来关也可以: public static void close...
分类:
数据库 时间:
2014-07-23 15:01:16
阅读次数:
329
Another Double pointer solution. 1A!class Solution {public: ListNode *removeNthFromEnd(ListNode *head, int n) { ListNode *p = NULL; ...
分类:
其他好文 时间:
2014-07-23 14:52:16
阅读次数:
176
查询表信息:sp_help 'dbo.T_User';修改columnName 字段为空alter table dbo.T_User alter column columnNamedatetime null;修改columnName 默认值ALTER TABLE dbo.T_User ADD CON...
分类:
其他好文 时间:
2014-07-23 14:47:46
阅读次数:
175
atitit.java给属性赋值方法总结and BeanUtils 1.6.1 .copyProperty的bug
1. core.setProperty(o, "materialId", null); 1
2. Java Reflection (JAVA反射) 1
3. 反射的用处 2
4. Java类反射中所必须的类: 2
BeanUtils.copyProperty 2
5...
分类:
编程语言 时间:
2014-07-23 13:36:36
阅读次数:
390
在某些情况下,or条件可以避免全表扫描的。 1 .where 语句里面如果带有or条件, myisam表能用到索引, innodb不行。1)myisam表: CREATE TABLE IF NOT EXISTS `a` ( `id` int(1) NOT NULL AUTO_INCREMENT, `...
分类:
数据库 时间:
2014-07-23 12:44:26
阅读次数:
303
request=(HttpWebRequest)WebRequest.Create(url); if(Const.session!=null){request.Headers.Add("Cookie",Const.sessi...
分类:
Web程序 时间:
2014-07-23 12:41:06
阅读次数:
199
题目:Given a linked list, return the node where the cycle begins. If there is no cycle, return null.Follow up:Can you solve it without using extra spac....
分类:
编程语言 时间:
2014-07-23 12:02:46
阅读次数:
304
1.对查询进行优化,应尽量避免全表扫描,首先应考虑在 where 及 order by 涉及的列上建立索引。2.应尽量避免在 where 子句中对字段进行 null 值判断,否则将导致引擎放弃使用索引而进行全表扫描,如:select id from t where num is null可以在num...
分类:
数据库 时间:
2014-07-23 11:43:26
阅读次数:
309
function_exist()如果没有函数,返回空。is_string($str) 如果$str是布尔型的值,返回为空。是返回1,错误返回空is_array() 同上字符串输出时,加逗号就自动空格。结果为6//字符串"3+4+5"只输出3布尔型与Null ---->integer /float.....
分类:
Web程序 时间:
2014-07-23 11:36:16
阅读次数:
222