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, ...
分类:
其他好文 时间:
2014-07-07 14:54:18
阅读次数:
219
方法说明Concat()连接2个或多个数组,并返回结果Push()向数组末尾添加一个或多个元素,并返回新的长度Reverse()颠倒数组中元素的顺序Sort()对数组的元素进行排序Slice()从某个已有的数组返回数组选定的元素toString()把数组转换成字符串Join()连接toLoc...
分类:
其他好文 时间:
2014-07-02 00:29:20
阅读次数:
295
1、设置一个守护线程对执行业务的线程计时,超时则抛出异常2、Thread类有一个join(long millis)方法,执行该方法时如果另一个线程中断了当前线程,就会抛出一个InterruptedException异常(超时也抛出)。3、java.util.concurrent包FutureTask...
分类:
编程语言 时间:
2014-07-01 23:43:37
阅读次数:
313
函数简介函数pthread_join用来等待一个线程的结束。函数原型为:extern int pthread_join (pthread_t__th, void **__thread_return);第一个参数为被等待的线程标识符,第二个参数为一个用户定义的指针,它可以用来存储被等待线程的返回值。这...
分类:
其他好文 时间:
2014-07-01 23:16:49
阅读次数:
336
c 冒泡排序# include //冒泡排序void sort(int * a, int len){ int i, j, t; for (i=0; i a[j+1]) // >表示升序 <表示降序 { t = a[j]; ...
分类:
其他好文 时间:
2014-07-01 22:39:38
阅读次数:
201
Application.jsfl为程序入口,导入其他jsfl【Common.jsfl】function trace(){ fl.trace(Array.prototype.join.call(arguments, " "));}【Application.jsfl】var JSFL_PATH ...
分类:
Web程序 时间:
2014-07-01 21:48:41
阅读次数:
312
ls -LS 按照大小降序排列ls -l |sort -n -k5 按照大小升序ls -lrt 按照时间降序ls -lnt 按照时间升序ls -l|grep -v "^d" 只显示文件ls -l -d */ 只显示目录ls -l |sort -k9 按照文件名称升序ls -lr 按照文件名降序ls ...
分类:
系统相关 时间:
2014-07-01 21:42:50
阅读次数:
277
原表数据为:此处用到了with关键字,在程序中也可以用递归实现,但觉得还是没有一条sql方便with tb (ID,Name,ParentID,Sort)as( select a.*,convert(varchar,convert(varchar,partid)+'->'+convert(varch...
分类:
数据库 时间:
2014-06-30 23:34:46
阅读次数:
332
最小的k个数 代码(C)本文地址: http://blog.csdn.net/caroline_wendy题目: 输入n个整数, 找出其中的最小k个数.使用快速排序(Quick Sort)的方法求解, 把索引值(index)指向前k个数.代码:/*
* main.cpp
*
* Created on: 2014.6.12
* Author: Spike
*/
/*eclip...
分类:
其他好文 时间:
2014-06-30 18:16:34
阅读次数:
204