System V Message queue 是一种进程通信(IPC)的方式,方便实现生产者-消费者模型,单个或多个生产者向队列中写入消息,多个生产者再从队列中获取消息进行处理。
项目地址:https://github.com/huyanping/Zebra-PHP-Framework
该Wrapper支持:
进程通信
设置最大队列容量(字节单位)
获取当前队列数量
修改队列部分属性...
分类:
Web程序 时间:
2014-08-22 17:56:59
阅读次数:
180
java集合大致上可分为:set,list,map三种体系,其中set代表无序不可重复的集合,list代表有序可重复的集合,map代表具有映射关系的集合。后来又增加一种Queue体系集合,代表一种队列的集合实现。set和list接口都实现了collection接口使用Iterator接口遍历集合元素...
分类:
编程语言 时间:
2014-08-22 16:10:19
阅读次数:
257
解题报告
题目传送门
题意:
先输入n,m
接下来m行,每行输入A,B,C
输入A B C,表示孩子B最多比孩子A多C块蛋糕,问孩子1与孩子N最多相差多少块蛋糕!
思路:
求解b-a
源点为1
spfa+queue超时,spfa+queue+slf还超时,用stack却过了。
#include
#include
#include
#include
#in...
分类:
其他好文 时间:
2014-08-22 14:29:48
阅读次数:
178
水题。
#include
#include
#include
#include
using namespace std;
typedef long long ll;
priority_queue q;
int main() {
int T, cas = 0;
scanf("%d", &T);
while(T-- > 0) {
int n;
...
分类:
其他好文 时间:
2014-08-21 19:27:14
阅读次数:
196
一、队的概念 队列也是一种表,但是是一种受限的表,只允许从一端插入,另一端山粗的表。 二、队列的数组实现 #define QMAXSIZE 100typedef int Position;typedef int QElement;typedef struct queue{ QElement Els[...
分类:
其他好文 时间:
2014-08-21 18:53:24
阅读次数:
186
sqlplus "/ as sysdba"SQL> SHUTDOWN IMMEDIATE;SQL> STARTUP MOUNT;SQL> ALTER SYSTEM ENABLE RESTRICTED SESSION;SQL> ALTER SYSTEM SET JOB_QUEUE_PROCESSES=...
分类:
数据库 时间:
2014-08-21 16:33:54
阅读次数:
288
First I thought of a DP solution.. but TLE. So there must be a O(n). I thought of Mono-Queue.. but looks too complex.So what is the naive solution? O(...
分类:
其他好文 时间:
2014-08-21 14:37:54
阅读次数:
202
Implement pow(x, n).刚开始没想到,后来看remlost的博客才写出来,代码很简练:class Solution {public: double pow(double x, int n) { if(n<0) return 1/power(x...
分类:
其他好文 时间:
2014-08-21 10:59:53
阅读次数:
188
Grand Central Dispatch (GCD)是Apple开发的一个多核编程的解决方法。dispatch queue分成以下三种:1)运行在主线程的Main queue,通过dispatch_get_main_queue获取。/*!* @function dispatch_get_main...
分类:
移动开发 时间:
2014-08-20 15:58:32
阅读次数:
246
Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations:getandset.get(key)- Get the valu...
分类:
其他好文 时间:
2014-08-20 14:04:32
阅读次数:
250