In Unity scripting, there are a number of event
functions that get executed in a predetermined order as a script executes. This
execution order is des...
分类:
其他好文 时间:
2014-05-26 12:20:20
阅读次数:
368
SQLServer 分页查询1.SELECT TOP 30 * FROM ARTICLE WHERE
ID NOT IN(SELECT TOP 45000 ID FROM ARTICLE ORDER BY YEAR DESC, ID DESC) ORDER BY
YEAR DESC,ID DESC ...
分类:
数据库 时间:
2014-05-26 08:43:42
阅读次数:
270
我们在执行某些SQL语句的时候有可能会生成临时表.我们应该尽量的去避免临时表.因为临时表会浪费内存和时间.那么什么情况下会产生临时表呢?这是来自MYSQL官方的说明If
there is an ORDER BY clause and a different GROUP BY clause[官方说明]...
分类:
其他好文 时间:
2014-05-25 11:25:04
阅读次数:
199
寻找图中最小连通的路径,图如下:
算法步骤:
1. Sort all the edges in non-decreasing order of their weight.
2. Pick the smallest edge. Check if it forms a cycle with the spanning tree
formed so far. If cycle is n...
分类:
其他好文 时间:
2014-05-25 07:35:59
阅读次数:
301
【题目】
Given an integer n, generate a square matrix filled with elements from 1 to n2 in spiral order.
For example,
Given n = 3,
You should return the following matrix:
[
[ 1, 2, 3 ],
[ 8, 9, 4 ],
[ 7, 6, 5 ]
]
【题意】
给定整数n, 将1,2,3...nxn个数按螺旋旋转的方式填入n...
分类:
其他好文 时间:
2014-05-25 07:08:17
阅读次数:
235
【题目】
The set [1,2,3,…,n] contains a total of n! unique permutations.
By listing and labeling all of the permutations in order,
We get the following sequence (ie, for n = 3):
"123"
"132"
"213"
"231"
"312"
"321"
Given n and k, return the kth permutation ...
分类:
其他好文 时间:
2014-05-25 06:13:37
阅读次数:
276
【题目】
Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral order.
For example,
Given the following matrix:
[
[ 1, 2, 3 ],
[ 4, 5, 6 ],
[ 7, 8, 9 ]
]
You should return [1,2,3,6,9,8,7,4,5].
【题意】
螺旋输出MxN...
分类:
其他好文 时间:
2014-05-24 23:11:02
阅读次数:
279
题目
Given an array with n objects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the order red, white and blue.
Here, we will use the i...
分类:
其他好文 时间:
2014-05-24 20:30:21
阅读次数:
342
点击打开链接
题意:
集合S支持一下四种操作:
INSERT(S,x) : 如果S中没有x,则插入x
DELETE(S,x): 如果S中有x,则删除x
K-TH(S): 输出S中第K小的数
COUNT(S,x): 统计S中小于x的数有多少个
一共有Q(1 ≤ Q ≤ 200000)次操作。
Treap模板。。
#i...
分类:
其他好文 时间:
2014-05-24 18:03:11
阅读次数:
213
123/** * 返回跟单信息 * * @return array 返回跟单相关信息 *
@author ZP 2013-12-17 11:55:16 * @modify YLP 2014-5-13 17:30:29 未采购和未到货不需要同时显示明细
*/function get_order_tra...
分类:
其他好文 时间:
2014-05-24 12:37:41
阅读次数:
309