private static void sort1(int x[], int off, int len) {
// Insertion sort on smallest arrays //长度小于7,采用冒泡排序
if (len < 7) {
for (int i=off; ioff && x[j-1]>x[j];...
分类:
其他好文 时间:
2014-05-07 05:14:35
阅读次数:
279
一、Kobject&Kset
Kobject就是在sysfs文件系统中创建一个目录,目录中包含一个文件。而Kset就是在sysfs文件系统中创建一个可以包含目录的目录。所以Kobject是Kset的父类或基类。
1、sysfs文件系统
“sysfs is a ram-based filesystem initially based on ramfs. It provides a means...
分类:
系统相关 时间:
2014-05-07 03:48:36
阅读次数:
464
《算法导论》里的COUNTING_SORT,用C++实现有问题:
#include
#include
using namespace std;
void COUNTING_SORT(vectorint>&A, vectorint>&B, const int& k)
{
int* C = new int[k + 1]();
for (unsigned j = 0; j A.size();...
分类:
其他好文 时间:
2014-05-07 02:59:30
阅读次数:
251
oracle转义字符开关:set define off / show define...
分类:
数据库 时间:
2014-05-06 23:32:46
阅读次数:
380
参考『http://stat-design.blogspot.sg/search?updated-min=2011-01-01T00:00:00-06:00&updated-max=2012-01-01T00:00:00-06:00&max-results=4』
We know that the Mean gives us the central tendency of the data, ...
分类:
其他好文 时间:
2014-05-06 23:10:08
阅读次数:
450
1、
??
Candy
There are N children standing in a line. Each child is assigned a rating value.
You are giving candies to these children subjected to the following requirements:
Each child must h...
分类:
其他好文 时间:
2014-05-06 22:41:02
阅读次数:
427
本章关注单进程运行环境:启动&终止、参数传递和内存布局等。
进程启动终止
如图所示:
启动:内核通过exec函数执行程序,在main函数运行之前,会调用启动例程(start-up routine),取得命令行参数和环境变量。可以把启动例程理解为exit(main(argc,argv))。终止:五种正常终止方式(从main方法返回/exit/_exit/最后一个线程返回/最...
分类:
其他好文 时间:
2014-05-06 22:03:53
阅读次数:
514
首先我们来看一下在c/c++中实现的swap函数
void swap ( int & a, int & b)
{
int Temp;
temp = a;
a = b;
b = temp;
}
那么在java中是否还能这样呢,很显然java中没有地址引用符号了。
本质...
分类:
编程语言 时间:
2014-05-06 21:23:05
阅读次数:
460
本文首先试验并分析了scanf("%s", buf);的安全性,然后对operator>>(istream&, string&)的实现细节进行分析,最后仿照operator>>用C语言实现了读入长度未知的字符串(字符行)...
分类:
其他好文 时间:
2014-05-06 21:17:37
阅读次数:
596
一.整体靓照
二.树莓派硬件配置
三.树莓派引脚
看到第一张图左上角的一排引脚了么?
以下是树莓派引脚定义的两种不同方式。貌似是针对不同的库来定义的。
来一张看的更清楚的...
分类:
其他好文 时间:
2014-05-06 21:09:33
阅读次数:
382