码迷,mamicode.com
首页 >  
搜索关键字:shared jedis    ( 4093个结果
Sqlite3通过Makefile编译成动态链接库
TARGET_LIB:=libsqlite3.so LIBS := -lpthread -ldl CFLAGS := -g -Wall -shared -fPIC -I. $(LIBS) CC := mipsel-openwrt-linux-gcc #交叉编译下的编译路径 STRIP := mipsel-openwrt-linux-strip OBJ := sqlite3.o all...
分类:数据库   时间:2014-08-21 11:34:24    阅读次数:631
实现类似shared_ptr的引用计数
13.27 定义使用引用计数版本的HasPtr#include#include#includeusing namespace std;class HasPtr{public: HasPtr(const string &s=string()):ps(new string(s)),i(0),use...
分类:其他好文   时间:2014-08-20 23:59:13    阅读次数:474
Effective C++ 条款15、16 在资源管理类中提供对原始资源的访问||成对使用new 与 delete要采取相同形式
1、在资源管理类中提供对原始资源的访问 前几个条款很棒,它们是对抗资源泄露的壁垒,但很多APIs直接指向 资源,这个时候,我们需要直接访问原始资源。 这里,有两种方法解决上述问题,我们可将RAII对象转换为原始资源。通过 显式转换与隐式转换。 通常,tr1:: shared_ptr 和 auto_p...
分类:编程语言   时间:2014-08-20 16:14:02    阅读次数:177
Effective C++ 条款17 以独立语句将newed对象置入智能指针
对于函数: int priority(); void processWidget(std::tr1:: shared_ptr pw,int priority); 调用以上函数 processWidget(new Widget,priority()); 以上调用错误,因为shared_ptr构造函数需...
分类:编程语言   时间:2014-08-20 16:11:22    阅读次数:194
Java操作Redis
1.下载Jar包jedis-2.5.1.jar2.Java代码@TestpublicvoidtestDemo(){Jedisredis=newJedis("192.168.89.30",10123);//hsetkeyfieldvalue将哈希表key中的域field的值设为value。redis.hset("bdliu","name","bdliu");redis.hset("bdliu","mail","bdliu@sohu.com");redis.hset("bdliu..
分类:编程语言   时间:2014-08-20 14:26:43    阅读次数:226
./adb: error while loading shared libraries: libncurses.so.5:
from://http://stackoverflow.com/questions/10005907/eclipse-android-plugin-libncurses-so-5sudo apt-get install libncurses5:i386orsudo apt-get install l...
分类:数据库   时间:2014-08-19 22:21:35    阅读次数:193
shared_ptr与weak_ptr的例子
12.20 编写程序,逐行读入一个输入文件,将内容存入一个StrBlob中,用一个StrBlobPtr打印出StrBlob的每个元素。StrBlob.h#ifndef STRBLOB_H#define STRBLOB_H#include#include#include#includeusing na...
分类:其他好文   时间:2014-08-19 22:06:45    阅读次数:277
Read-Copy Update Implementation For Non-Cache-Coherent Systems
A technique for implementing read-copy update in a shared-memory computing system having two or more processors operatively coupled to a shared memory...
分类:其他好文   时间:2014-08-19 18:38:25    阅读次数:263
asp.net mvc4 razor视图 (之) 继承,集成
隐藏了具体实现。放在views/shared/_layout.cshtm 即为所有其他页面的父模板(template / masterpage)页面继承(inherit/extend):页面继承通过@Html.RenderBody()/@Html.RenderSection('your_sec')。...
分类:Web程序   时间:2014-08-19 10:32:23    阅读次数:238
ubuntu下安装android sdk运行模拟器出现错误:
./emulator: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory你用的是64位的系统吧?应该是缺少 lib32stdc...
分类:移动开发   时间:2014-08-19 07:07:23    阅读次数:296
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!