Android 提供了多种存储数据的方法,其中最简单的是使用Shared Preferences. Shared Preferences 可以存储 Key/value 对,Shared Preferences 支持存取 boolean, float ,long ,integer, string ,最...
分类:
移动开发 时间:
2015-03-02 12:44:46
阅读次数:
150
linux下应用无故反应异常,登陆服务器查看发现:-bash-4.1$jps
JavaHotSpot(TM)64-BitServerVMwarning:Insufficientspaceforsharedmemoryfile:
/tmp/hsperfdata_kf01/4830
Tryusingthe-Djava.io.tmpdir=optiontoselectanalternatetemplocation.
4830Jps-bash-4.1$df-h
文件系统..
分类:
其他好文 时间:
2015-03-01 22:30:02
阅读次数:
211
#include class Test : public boost::enable_shared_from_this{ // ......};boost::shared_ptr tt(new Test);上面定义的Test类派生自boost::enable_shared_from_this,获取....
分类:
其他好文 时间:
2015-03-01 20:57:32
阅读次数:
161
Given two sets of integers, the similarity of the sets is defined to be Nc/Nt*100%, where Ncis the number of distinct common numbers shared by the two...
分类:
其他好文 时间:
2015-03-01 18:21:51
阅读次数:
181
C++ 智能指针
flyfish 2015-3-1
使用原始指针进行显示内存管理在性能上有优势,但容易出错。诸如 野指针,重复释放,内容泄露等。
C++为了在编程语言上支持更好的内存管理机制,C++98提供了auto_ptr,因为auto_ptr的缺点在C++11中被废弃,C++11提供了
unique_ptr,shared_ptr,weak_ptr等智能指针在自动回收堆分配的内存,智能指...
分类:
编程语言 时间:
2015-03-01 17:09:47
阅读次数:
253
cursor: pin S
OTN 解释如下:
cursor: pin SA session waits on this event when it wants to update a shared mutex pin and another session is currently in the process of updating a shared mutex pin f...
分类:
其他好文 时间:
2015-02-28 21:42:53
阅读次数:
147
free -m total used free shared buffers cachedMem: 7760 1572 6187 0 9 101-/+ buffers/cache: 1461 6298Swap: 511 ...
分类:
其他好文 时间:
2015-02-28 15:55:58
阅读次数:
258
静态:在使用./configure 编译的时候,如果不指定某个模块为动态,即没有使用:enable-mods-shared=module或者enable-module=shared 这个2个中的一个,那么所有的默认模块为静态。 那么何谓静态? 其实就是编译的时候所有的模块自己编译进 httpd 这个...
分类:
Web程序 时间:
2015-02-28 15:55:48
阅读次数:
130
智能指针是一种具备指针类似行为的对象,当不在需要它的时候自动删除其引用的c++对象。直接点说就是自动析构C++对象。boost提供了6种智能指针,如下所示:scoped_ptr单个对象的简单的唯一所有权. 不能拷贝.scoped_array数组对象的唯一所有权. 不能拷贝.shared_ptr多个指...
分类:
其他好文 时间:
2015-02-27 14:58:45
阅读次数:
125
启动zabbix_server出现如题错误,差点没晕死过去,从前一直没出现,这种错误其实工作上已经遇到过无数次了,但是每次的没有好好记录总结一些,导致每次遇到都需要傻乎乎的跑到网上->百度,方可解决。今天特地针对这个小问题写一篇错误记录博客,日后遇到方可快速查看。
执行命令
cd /usr/local/mysql/lib/
ll libmysqlclient.so
发现有 libmys...
分类:
数据库 时间:
2015-02-27 10:06:15
阅读次数:
172