1.boost锁的概述: boost库中提供了mutex类与lock类,通过组合可以轻易的构建读写锁与互斥锁。2.mutex对象类(主要有两种): 1.boost::mutex(独占互斥类) -->有lock和unlock方法 2.boost::shared_mutex(共享互斥类) -->有...
分类:
编程语言 时间:
2014-06-18 11:16:03
阅读次数:
262
1. sizeof(literal-string) is number of bytes plus 1 (NULL is included), while strlen(literal-string) is number of bytes.2. Printf and scanf formatBefo...
分类:
其他好文 时间:
2014-06-18 10:14:22
阅读次数:
226
在AWR中定位到问题SQL语句后想要了解该SQL statement的详细运行计划,于是就用AWR报告中得到的SQL ID去V$SQL等几个动态性能视图中查询,但发现V$SQL或V$SQL_PLAN视图都已经找不到相应SQL ID的记录,一般来说这些语句已经从shared pool共享池中被替换出去...
分类:
数据库 时间:
2014-06-18 09:55:27
阅读次数:
332
#include #include #include char a[1000001];int next[1000001];int l;void Getnext(){ int j=-1; int i=0; next[0]=-1;//忘写了,死循环 while(i...
分类:
其他好文 时间:
2014-06-18 09:35:19
阅读次数:
138
#include #include #include char a[1000001],b[1000001];int next[1000001];int l,l2;void Getnext(){ int i=0; int j=-1; next[0]=-1; while(i=l2...
分类:
Web程序 时间:
2014-06-18 09:29:37
阅读次数:
221
一.boost::thread的创建 1.线程创建方法一: boost::shared_ptr writeThread_; boost::function0 f = boost::bind(&DBTaskMgr::execute, this); writeThread_ = bo...
分类:
编程语言 时间:
2014-06-18 08:16:15
阅读次数:
283
矩阵的秩
typedef int Matrix[maxn][maxn];
int rank(Matrix A, int m, int n)
{
int i = 0, j = 0, k, r, u;
while(i < m && j < n)
{
r = i;
for(k = i; k < m; k++)
if(A[k][j])
{
r = k;
brea...
分类:
其他好文 时间:
2014-06-17 19:03:00
阅读次数:
210
在Android的日常开发中,相信大家都用过SharedPreferences来保存用户的某些settings值。Shared Preferences
以键值对的形式存储私有的原生类型数据,这里的私有的是指只对你自己的app可见的,也就是说别的app是无法访问到的。
客户端代码为了使用它有2种方式,一种是通过Context#getSharedPreferences(String prefNam...
分类:
移动开发 时间:
2014-06-17 18:56:59
阅读次数:
350
一、Ashmem驱动程序
~/Android/kernel/goldfish
----include
----linux
----ashmem.h
----mm
----ashmem.c
驱动程序详解请看《A...
分类:
移动开发 时间:
2014-06-17 16:41:12
阅读次数:
801
主要参考文档:http://www.itpub.net/thread-1714191-1-1.html
Oracleh有两种服务器模式shared mode和dedicated mode。
Dedicated mode下,客户端每发来一个连接请求,数据库都要给这个请求建立一个服务进程来完成响应。而在shared mode下,oracle会首先建立一定数目的服务进程,客户端发来的请求会首先发送到...
分类:
数据库 时间:
2014-06-17 16:10:51
阅读次数:
316