名称返回类型描述validate(options)返回:Validator验证所选的FORMvalid()返回:Boolean检查是否验证通过rules()返回:Options返回元素的验证规则rules("add",rules)返回:Options增加验证规则rules("remove",rule...
判断单链表是否有环两个指针分别为p1和p2,每循环一次只向前走一步,p2向前走两步,知道p2碰到NULL指针或者两个指针相等则说明有环如果存在,start存放在圆环开始的节点bool
IsLoop(node *head,node *start){node *p1=head,*p2=head;if(h...
分类:
其他好文 时间:
2014-05-10 00:22:22
阅读次数:
272
Student表有3个字段:id,name,age看这两个SQL语句(1)select
name from student order by id;(2)select distinct(name) from student order by
id;执行结果你可能会说:第1句返回以id排序的所有nam...
分类:
其他好文 时间:
2014-05-09 23:42:19
阅读次数:
368
使用sql语句查询日期在一周内的数据select * from ShopOrder where
datediff(week,ordTime,getdate()-1)=0 //查询当天日期在一周年的数据select * from ShopOrder
where datediff(day,ordTime...
分类:
数据库 时间:
2014-05-09 23:37:52
阅读次数:
658
1.使用SQLQuery对原生SQL查询执行的控制是通过SQLQuery接口进行的,通过执行Session.createSQLQuery()获取这个接口。最简单的情况下,我们可以采用以下形式:Listcats
= sess.createSQLQuery( " select * from cats "...
分类:
数据库 时间:
2014-05-09 23:07:17
阅读次数:
589
系统在选择操作数据库的框架上面,到底是选择hibernate,还是mybatis。
首先说下两者的原理,如果你要关联几张表做查询,查出20条记录:
1.如果是mybatis
SELECT *
FROM (SELECT INNER_TABLE.*, ROWNUM OUTER_TABLE_ROWNUM
FROM (select SP_WORK_PLAN.nam...
分类:
系统相关 时间:
2014-05-09 22:56:46
阅读次数:
540
BFS。 1 #include 2 #include 3 #include 4
#include 5 using namespace std; 6 7 #define INF 0x3fffffff 8 9 typedef struct
node_st {10 int x, y, ...
分类:
其他好文 时间:
2014-05-09 20:18:48
阅读次数:
339
from:
http://hi.baidu.com/dashi6174/item/e85dcc321336c9c12f8ec21c?qq-pf-to=pcqq.c2cLinux的bg和fg命令我们都知道,在
Windows 上面,我们要么让一个程序作为服务在后台一直运行,要么停止这个服务。而不能让程...
分类:
系统相关 时间:
2014-05-09 19:54:21
阅读次数:
349
Linux环境下使用python调用C的printf例子:#!/usr/bin/env
python2.7#-*- coding:utf-8 -*-from ctypes import *def test(): #libc =
cdll.LoadLibrary("libc.so.6") ...
分类:
编程语言 时间:
2014-05-09 19:51:59
阅读次数:
469
select Category from(select distinct Category from
T_Detail where CREATED_BY= @CREATED_BY AND RecordDate>=@RecordDate1 AND
RecordDate<@RecordDate2)t g...
分类:
数据库 时间:
2014-05-09 19:18:43
阅读次数:
339