【题目】
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 integers 0, 1, and 2 to represent the color red, white, and...
分类:
其他好文 时间:
2014-06-07 01:17:49
阅读次数:
269
正好需要对WINDOWS的WDDM有所了解, 于是就翻了下MSDN.
微软对设备驱动的框架设计非常周全.
无论WDDM, AVSTREAM, 还是USB STACK, STORAGE, 以及其它技术类型的设备驱动, 都是以port/miniport, class/miniclass的形式展开, 微软将经过严密设计,开发,测试的port/class驱动提供给IHV,而IHV只需要把工作重心放到m...
分类:
其他好文 时间:
2014-06-05 06:09:27
阅读次数:
298
把横的和竖的分开考虑
//#pragma comment(linker, "/STACK:102400000,102400000")
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
using namespace...
分类:
其他好文 时间:
2014-06-05 06:04:58
阅读次数:
238
3.Actions-Basic:此demo中体现ccp由Point代替
①ActionManual:直接设置精灵的属性demo。
const Color3B Color3B::RED (255, 0, 0);
const Color3B Color3B::GREEN ( 0, 255, 0);
const Color3B Color3B::BLUE ( 0, ...
分类:
其他好文 时间:
2014-06-05 03:49:02
阅读次数:
225
区间的查询,点修改,插入和删除。先姑且当作模板吧,略挫,慢慢补充,慢慢优化。
#include
#include
#include
#include
#include
#include
#include
#include
#include
#pragma comment(linker, "/STACK:1024000000");
#define EPS (1e-8)
#d...
分类:
其他好文 时间:
2014-06-05 02:01:37
阅读次数:
400
我们经常会遇到生产者消费者模式,比如前端各种UI操作事件触发后台逻辑等。在这种典型的应用场景中,我们可能会有4个业务处理逻辑(下文以P代表生产者,C代表消费者):
1. FIFO(先进先出)
P产生1,2,3,4,5,6,3,2
C处理顺序应为1,2,3,4,5,6,3,2
2.LIFO(后进先出)
P产生1,2,3,4,5,6,3,2
C处...
分类:
其他好文 时间:
2014-06-04 21:51:08
阅读次数:
421
这两天看了一下深入浅出JVM这本书,推荐给高级的java程序员去看,对你了解JAVA的底层和运行机制有比较大的帮助。废话不想讲了.入主题:先了解具体的概念:JAVA的JVM的内存可分为3个区:堆(heap)、栈(stack)和方法区(method)堆区:1.存储的全部是对象,每个对象都包含一个与之对...
分类:
其他好文 时间:
2014-06-03 07:40:57
阅读次数:
196
STL的队列和栈简单使用
#include
#include
#include
#include
#include
#include
using namespace std;
int main()
{
queue Q;
stack S;
int i;
for(i=1;i
{Q.push(i);S.push(i);}
while(...
分类:
其他好文 时间:
2014-06-03 03:51:26
阅读次数:
238
使用 ps 命令查看 目标进程的 pid,比如说是 1200,然后kill -3 1200在
/data/anr/traces.txt 中就能找到 进程 1200 中各线程的stack trace
分类:
移动开发 时间:
2014-05-31 13:47:40
阅读次数:
434
Given an input string, reverse the string word
by word.For example,Given s = "the sky is blue",return "blue is sky the".click
to show clarification.Cl...
分类:
其他好文 时间:
2014-05-30 16:25:58
阅读次数:
233