创建一个测试表 1 IF OBJECT_ID( 'dbo.T1' , 'U' 2 )IS NOT NULL 3 BEGIN 4 DROP TABLE dbo.T1; 5 END; 6 GO 7 CREATE TABLE dbo.T1( colu...
分类:
其他好文 时间:
2015-02-09 20:03:28
阅读次数:
160
题目 这是道链表的简单应用题目,删除从结尾数第n个节点。Given a linked list, remove the nth node from the end of list and return its head.For example, Given linked list: 1->2->3->4->5, and n = 2.
After removing the ...
分类:
其他好文 时间:
2015-02-09 18:27:06
阅读次数:
132
T—SQL格式:
declare
声明
begin
处理
end --完成
nvl函数 nvl(string,value);
如果字符串不为空,返回字符串
如果字符串为空,返回value
下面,输入一个工号,显示所有信息。
declare
sno emp.empno%type;
e1 emp%rowtype;
begin
sno=&no;
se...
分类:
数据库 时间:
2015-02-09 16:03:12
阅读次数:
213
结构:DECLARE//标记声明部分//此处用来定义常量,变量,类型和游标BEGIN//标记程序体开头部分//编写各种PL/SQL语句,函数,存储过程EXCEPTION//异常处理开始//编写异常处理代码END;//程序体结束PL/SQL可以独立编译并存储在数据库中,有4种可存储的程序:函数,存储过程,包和..
分类:
数据库 时间:
2015-02-08 23:25:25
阅读次数:
332
捕获所有异常得用_:_,看例子try aa:bb() of Value -> Value catch _:_ -> "" end如果单表达式不需要有返回值,直接异常,of不需要写try cc:dd()catc...
分类:
其他好文 时间:
2015-02-08 23:11:34
阅读次数:
160
C++以纯虚函数来定义抽象接口,继承了抽象接口的类必须要实现所有父类的纯虚函数。OC中的协议类似于C++的纯虚函数。1.声明协议。@protocol后面接协议的名称。@protocol NSObject@end如果一个协议继承于另外一个协议,声明方法为尖括号里面填入父协议名称。@protocol S...
分类:
其他好文 时间:
2015-02-08 23:07:45
阅读次数:
172
分页规律方法1(最常用):start:(pageIndex-1)*pageSize+1 end:pageIndex*pageSizeselect * from (select *,row_number() over(order by Id desc) as rowIndex from tb_Pe.....
分类:
Web程序 时间:
2015-02-08 18:09:19
阅读次数:
186
1.loadfile——只编译,不运行loadfile故名思议,它只会加载文件,编译代码,不会运行文件里的代码。比如,我们有一个hellofile.lua文件:代码如下:print(“hello”);function hehe()print(“hello”);end这个文件里有一句代码,和一个函数。...
分类:
其他好文 时间:
2015-02-08 16:46:42
阅读次数:
112
Given a binary tree, find the maximum path sum.The path may start and end at any node in the tree.For example:Given the below binary tree, 1 ...
分类:
其他好文 时间:
2015-02-08 16:46:31
阅读次数:
135
DECLARE@number1ASnumeric(10,2),@number2ASnumeric(10,2)SELECT@number1=10.00,@number2=10.2SELECTCASEWHENCAST(@number1ASINT)=@number1THEN'整数'ELSE'小数'END,...
分类:
数据库 时间:
2015-02-08 12:49:56
阅读次数:
457