In a serious attempt to downsize (reduce) the dole queue, The New National Green Labour Rhinoceros Party has decided on the following strategy. Every ...
分类:
其他好文 时间:
2014-07-18 20:15:42
阅读次数:
234
1 package pinx.thread; 2 3 import java.util.LinkedList; 4 import java.util.Queue; 5 6 public class ProducerConsumer { 7 8 Storage stor...
分类:
其他好文 时间:
2014-07-18 15:19:28
阅读次数:
192
在搜索联系人时,因为存储进数据库的字段中含有空格,造成在按拼音搜索联系人的时候也必须加入空格,很不方便,所以今天请教大神,在从解析数据的时候就将名字转为拼音,去掉空格,所以在解析时候使用如下代码红色标记的那段:- (void)syncContact{ dispatch_queue_t queue ....
分类:
其他好文 时间:
2014-07-18 12:10:57
阅读次数:
180
堆有两种: max-heap 和 min-heap. Max-heap 一般用来排序,Min-heap 用来实现 priority queue.max-heap的定义是:for each i: A[parent(i)] >= A[i]min-heap: for each i: A[parent(i)...
分类:
其他好文 时间:
2014-07-18 10:23:12
阅读次数:
180
PS::线程这套东西在PHP里完全是不存在的概念,有待进一步的学习;PS::这个实例是根据书本上的知识进行扩展的,理解程度50%左右吧!1.定义生产消费环境package second;public class Queue { int value = 0; boolean isEmpty...
分类:
编程语言 时间:
2014-07-16 19:13:19
阅读次数:
239
英文原文: http://www.codeproject.com/Articles/110931/Building-High-Performance-Queue-in-Database-for-st译文:http://www.oschina.net/translate/building-high-p...
分类:
数据库 时间:
2014-07-16 17:47:26
阅读次数:
379
1.程序框架分析:a)首先将mutex, condition, queue 封装成各自的类,方便对外提供接口函数,这里要注意 condition的封装,一个条件变量和一把锁是一起用的,因此在初始化 condition 对象的时候要用一个 mutex 对象去初始化,在pthread_cond_wait...
分类:
编程语言 时间:
2014-07-16 17:43:12
阅读次数:
203
The Dole Queue
In a serious attempt to downsize (reduce) the dole queue, The New National Green Labour Rhinoceros Party has decided on the following strategy. Every day all dole applicants...
分类:
其他好文 时间:
2014-07-16 08:38:31
阅读次数:
311
接到现场实施的反馈:现在有一系统慢,整个系统卡住了。诊断过程:
1. 检查应用日志,即weblogic日志,发现有堵塞的线程,查到代码是调用的接口
<ExecuteThread: '7' for queue: 'default' has been busy for "994" seconds working on the request "Http Request: /we...
分类:
其他好文 时间:
2014-07-14 17:05:52
阅读次数:
241
定义头文件
实现栈方法的定义,注意这里用到了全局的静态数组,可以通过这种方式保护数据。
main.c,实现存储
队列
创建头文件queue.h
创建queue.c
实现main函数...
分类:
其他好文 时间:
2014-07-14 11:04:49
阅读次数:
156