对于一个c/c++程序员来说,内存泄漏是一个常见的也是令人头疼的问题。已经有许多技术被研究出来以应对这个问题,比如 Smart Pointer,Garbage
Collection等。Smart Pointer技术比较成熟,STL中已经包含支持Smart Pointer的class,但是它的使用似乎...
分类:
编程语言 时间:
2014-05-17 04:10:43
阅读次数:
418
变量说明:$$Shell本身的PID(ProcessID)$!Shell最后运行的后台Process的PID$?最后运行的命令的结束代码(返回值)$-使用Set命令设定的Flag一览$*所有参数列表。如"$*"用「"」括起来的情况、以"$1
$2 … $n"的形式输出所有参数。$@所有参数列表。如"...
分类:
其他好文 时间:
2014-05-17 04:07:37
阅读次数:
206
题意:给你 n 个坐标(x,y),m 个询问(c,d)
c==0,求出x==d有多少个,并删除这些点;
c==1,求出y==d有多少个,并删除这些点。
map+multiset的多重映射
#include
#include
#include
#include
#include
#include
#include
#include
#include
#includ...
分类:
其他好文 时间:
2014-05-13 15:13:07
阅读次数:
253
简介一个应用开发框架,可以加快开发速度,今天笔记基于许多开源项目自写了一款应用框架。内容框架包括:界面管理(Activity管理)、数据库操作(orm框架、加密等)、http交互、缓存管理、下载管理、路径管理、日志输出、网络管理、系统命令、加解密、stl容器、任务管理、奔溃管理、存储管理、其它辅助管理…。解决思路如下:界面管理:使用Stack记录Activity的运行轨迹,并在每个Activity...
分类:
移动开发 时间:
2014-05-13 14:16:40
阅读次数:
436
定义接口packagecom.example.android_db.service;
importjava.util.List;
importjava.util.Map;
publicinterfacePersonService{
publicbooleanaddPerson(Object[]params);
publicbooleandeletePerson(Object[]params);
publicbooleanupdatePerson(Object[]params);
publicMa..
分类:
移动开发 时间:
2014-05-13 13:06:04
阅读次数:
454
最近又开始重新拾起linux了,因为工作中用的很少,所以看得东西很容易就忘记了。这几天看了下linux的分区,以及如何制作文件系统等相关命令的用法,下面就按照这个流程来讲一讲,免得自己日后忘记了。1.分区磁盘分区,即指定分区的起始和结束柱面。我们在安装linux系统的时候,..
分类:
系统相关 时间:
2014-05-13 12:35:19
阅读次数:
282
importjava.util.HashMap;
importjava.util.Map;
importandroid.content.Context;
importandroid.content.SharedPreferences;
publicclassMySharedpreference{
privateContextcontext;
publicMySharedpreference(Contextcontext){
//TODOAuto-generatedconstructorstub
this.co..
分类:
移动开发 时间:
2014-05-13 12:10:38
阅读次数:
346
Problem Description
Acmers have been the Earth Protector against the evil enemy for a long time, now it’s your turn to protect our home.
There are 2 * n enemies in the map. Your task is to clear a...
分类:
其他好文 时间:
2014-05-13 11:29:40
阅读次数:
308