//function GetUser: string; //获取本机当前用户名varBuffer: array[0..255] of Char;Size: cardinal;beginSize := 256;if GetUserName(Buffer, Size) thenbeginResult :...
分类:
其他好文 时间:
2014-07-29 21:29:52
阅读次数:
219
对于共享资源,有一个很著名的设计模式:资源池(resource pool)。该模式正是为解决资源频繁分配、释放所造成的问题。数据库连接池的基本思想就是为数据库连接建立一个“缓冲池”。预先在缓冲池中放入一定数量的连接,当需要建立数据库连接时,只需要从缓冲池中取出一个了,使用完毕后再放回去。我们可以.....
分类:
数据库 时间:
2014-07-29 21:29:32
阅读次数:
368
背景
异构数据的适配及数据可扩展性,资源可扩展性,廉价机器,SQL查询。
架构概述
Worker pool,query server,clientinterfaces,metadata server
Worker线程是long-running的,worker pool包括master节点和worker节点,以及一个master watcher。
Query server把query解析,优化之后传给master执行,优化包括一些基本的规则优化和基于成本的优化。...
分类:
其他好文 时间:
2014-07-29 18:07:02
阅读次数:
250
http://en.wikipedia.org/wiki/Branch_target_predictor 简要原理 http://www-ee.eng.hawaii.edu/~tep/EE461/Notes/ILP/buffer.html http://web.cs.dal.ca/~mheywood/CSCI3121/Pipe/05-BTB.pdf 如何设计的? http...
分类:
其他好文 时间:
2014-07-29 16:23:29
阅读次数:
171
service端
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#define MYPORT 8887
#define QUEUE 20
#define BUFFER_SIZE 1024
int main()
{
///定...
分类:
系统相关 时间:
2014-07-29 14:21:40
阅读次数:
285
#include #include #include #include #include #include #include #define BUFFER_LENGTH 1024void ReverseMessage(char buffer[], ssize_t receivedBytesCount...
分类:
其他好文 时间:
2014-07-29 14:02:28
阅读次数:
222
C代码:
#include
#include
const unsigned short SIZE_OF_BUFFER = 2; //缓冲区长度
unsigned short ProductID = 0; //产品号
unsigned short ConsumeID = 0; //将被消耗的产品号
unsigned short in = 0; //产品进缓冲区时的缓冲区下标
unsigned ...
分类:
其他好文 时间:
2014-07-29 13:17:47
阅读次数:
163
解决办法:HttpContext.Current.Response.Clear();HttpContext.Current.Response.Buffer = true;HttpContext.Current.Response.ContentEncoding = System.Text.Encodi...
分类:
Web程序 时间:
2014-07-29 11:54:16
阅读次数:
228
#include ssize_t read(int fd, void *buf, size_t count);DESCRIPTION read() attempts to read up to count bytes from file descriptor fd into the buffer.....
分类:
其他好文 时间:
2014-07-28 23:56:34
阅读次数:
548