row_number() OVER (PARTITION BY COL1 ORDER BY COL2)
--表示根据COL1分组,在分组内部根据 COL2排序,而此函数返回的值就表示每组内部排序后的顺序编号(组内连续的唯一的)
例子一: create table student (id int ,classes int ,score int);
insert into student val...
分类:
其他好文 时间:
2014-07-03 18:33:50
阅读次数:
213
选择排序
定义:依次选择最小的元素放在相应的位置上
特点:比较次数是 N(N-1)/2 交换次数是 N (each exchange puts an item into its ?nal position, so the number of exchanges is N. Thus, the running time is dominated by the number of
com...
分类:
其他好文 时间:
2014-07-03 15:44:01
阅读次数:
259
Given a stringSand a stringT, count the number of distinct subsequences ofTinS.A subsequence of a string is a new string which is formed from the orig...
分类:
其他好文 时间:
2014-07-03 13:05:28
阅读次数:
210
DECLARE@dtdatetimeSET@dt=GETDATE()DECLARE@numberintSET@number=3--1.指定日期该年的第一天或最后一天--A. 年的第一天SELECTCONVERT(char(5),@dt,120)+'1-1'--B. 年的最后一天SELECTCONVE...
分类:
其他好文 时间:
2014-07-03 12:18:49
阅读次数:
201
IE 6下expected identifier,string or number(缺少标示符、字符串或数字)其实就是多了一个逗号,之前没发现
分类:
编程语言 时间:
2014-07-02 17:49:13
阅读次数:
206
Given an encoded message containing digits, determine the total number of ways to decode it.
分类:
其他好文 时间:
2014-07-02 14:47:02
阅读次数:
217
Picture
Time Limit: 6000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 2578 Accepted Submission(s): 1363
Problem Description
A number of rectangul...
分类:
其他好文 时间:
2014-07-02 08:22:20
阅读次数:
388
[LeetCode]Single Number...
分类:
其他好文 时间:
2014-07-02 07:18:14
阅读次数:
221
【题目】
Given n points on a 2D plane, find the maximum number of points that lie on the same straight line.
【题意】
给定一堆点,要求找出一条之前上的最大点数
【思路】
没什么好的方法,从每个点P出发,遍历所有的情况
从每个点P出发,斜率相同的点即为统一之前上的点
注意两种特殊情况:
1. 两个点重合(即为同一个点)
...
分类:
其他好文 时间:
2014-07-02 06:52:06
阅读次数:
171
Math对象:该对象提供了大量的数学常量和数学函数。使用Math对象时,不应该使用new关键字创建对象,而应直接使用。如:Math.PI;例子:随机产生指定位数的验证码Number对象的创建:1.varnum=newNumber(object);2.varnum=Number(object);Number对象的属性:1.MAX_VALUE属性2.MIN_..
分类:
编程语言 时间:
2014-07-02 06:23:05
阅读次数:
285