/** * Created with IntelliJ IDEA. * User:
li_zhe * Date: 14/05/06 * Time: 12:34 * To change this template use File |
Settings | File Templates. */pack...
分类:
其他好文 时间:
2014-05-16 22:09:34
阅读次数:
431
模板模式(Template
Pattern),又叫模板方法模式,通过定义一个操作的算法骨架,而将一些步骤延迟到子类中,可以不改变一个算法的结构即可以重新定义概算法的某些特定步骤。应用场景概念解释类型:行为型模式
分类:
其他好文 时间:
2014-05-16 05:30:17
阅读次数:
240
为了效率,copy算法可谓无所不用其极,通过分析copy算法能够体会STL的精妙。
首先是三个对外接口:
template // 泛化版本
inline OutputIterator copy(InputIterator first, InputIterator last,
OutputIterator result)
{
...
分类:
其他好文 时间:
2014-05-15 05:50:02
阅读次数:
315
下面是标准库STL中allocator的实现
template
class allocator
: public _Allocator_base
{ // generic allocator for objects of class _Ty
public:
typedef allocator other;
typedef _Allocator_base _Mybase;
t...
分类:
其他好文 时间:
2014-05-15 05:05:57
阅读次数:
385
Centos下Zabbix_Server/agent/proxy的安装配置--------源码编译完整版请查看附件一、环境说明a)软件环境由于是源码安装,官方的zabbix源码包内已经包含了Server,Proxy,Agent,GUI所有组件和必要的执行脚本,截至本文正式版本限于2.2.3;LAMP环境n操作系统使用Centos6.5X86_64最..
分类:
系统相关 时间:
2014-05-14 18:55:40
阅读次数:
724
memcached 和 redis
的set命令都有expire参数,可以设置key的过期时间。但是redis是一个可以对数据持久化的key-value
database,它的key过期策略还是和memcached有所不同的。梳理,整理如下:redis通过expire命令来设置key的过期时间。语法...
分类:
其他好文 时间:
2014-05-14 07:09:41
阅读次数:
242
主从概述redis 支持 master-slave(主从)模式,redis server
可以设置为另一个 redis server 的主机(从机),从机定期从主机拿数据。特殊的,一个 从机同样可以设置为一个 redis server
的主机,这样一来 master-slave 的分布看起来就是一个...
分类:
其他好文 时间:
2014-05-13 19:46:07
阅读次数:
412
按javaweb王者归来做strut2练习使用<struts:headtheme:"ajax">报错org.apache.jasper.JasperException:Template/template/ajax/head.ftlnotfound加入struts2-dojo-plugin-2.1.6包并在jsp里引入<%@taglibprefix="sx"uri="/struts-dojo-tags"%><sx:head/>这是..
分类:
Web程序 时间:
2014-05-13 13:00:55
阅读次数:
854
Redis是一个开源的使用ANSIC语言编写、支持网络、可基于内存亦可持久化的日志型、Key-Value数据库,并提供多种语言的API。从2010年3月15日起,Redis的开发工作由VMware主持。1.环境#lsb_releaseLSBVersion::core-4.0-ia32:core-4.0-noarch:graphics-4.0-ia32:graphics-4.0-noar..
分类:
系统相关 时间:
2014-05-13 12:01:32
阅读次数:
487
本段程序主要利用数据结构栈的先进后出特点,实现回溯求解迷宫路径问题。
#include
#include
using namespace std;
//坐标类
struct Point
{
int x;
int y;
};
//地图类
template
struct Map
{
int (*p)[A];
int row;//行数
int col;//列数
};
//start起始点, ...
分类:
其他好文 时间:
2014-05-13 05:25:02
阅读次数:
478