- 博客(13)
- 资源 (17)
- 收藏
- 关注
原创 TinyXML使用
#ifndef __MY_XML_H_ #define __MY_XML_H_ #include "tinyxml.h" #include "tinystr.h" class MyXml { public: MyXml(const char * strFileName); ~MyXml(); TiXmlElement *m_RootElement; private: TiXmlDo
2015-06-30 17:06:02
685
原创 Glog使用
请先设置环境变量 export LOGPATH=/home/***/Log 下面是glog的一些封装: //MyLog.h#ifndef __MY_LOG_H_ #define __MY_LOG_H_ //GLog #include #include //Glog #define LOG_INFO LOG(INFO) #define LOG_WARN LOG(WARNING) #def
2015-06-30 16:31:44
1511
原创 Shell分布式系统分发文件脚本
#! /bin/bash ######################################################## # Filename: ./dispatch_files.sdl # Date: 2014-10-14 13:22:00 # Author: chenhuidong # Email: chdyczx@live.com # Note: ############
2014-10-14 13:51:22
1081
原创 Shell建立网内任意两台机器信任关系
#! /bin/bash ######################################################## # Filename: ./fast_trust.sdl # Date: 2014-10-14 13:22:00 # Author: chenhuidong # Email: chdyczx@live.com # Note: ################
2014-10-14 13:40:20
501
原创 ini文件的保存,使用map更方便
#pragma once #include "targetver.h" #include #include #include #include #include #include using namespace std;
2014-04-08 22:06:23
1018
原创 MFC创建快捷方式
//MyCommon.h #pragma once enum ShortcutType { BOTH_SHORTCUT = 0, ONLY_DESKTOPSHORTCUT, ONLY_MENUSHORTCUT, NO_SHORTCUT }; enum ExitType { EN_INITIALIZE_FAILED = -100, }; //My
2014-01-27 14:23:55
590
原创 linux下关键字搜索工具
#!/bin/bash if (($# <2)) then echo "Please input right params:sc dir keyword1 kw2 ..." exit 1 fi finddir=$1 postfix=$2 #if (( $2 == )) #then # echo "chd" #postfix=$2 #fi for ((i=
2013-11-19 16:29:52
684
原创 MD5加密
#pragma once typedef unsigned long int UINT32; typedef unsigned short int UINT16; /* MD5 context. */ typedef struct { UINT32 state[4]; /* state (ABCD) */ UINT32 c
2013-11-06 23:14:56
338
原创 log4cplus
至于如何获取安装包,windows下或者linux下的安装,静态调用还是动态调用就不说了。 log4cplus的配置可通过配置文件log4cplus.properties,亦可以通过代码配置。 至于出现: log4cplus:ERROR Please initialize the log4cplus system properly.这个问题,就是因为未配置导致的。 可编写配置文件,下载
2013-09-30 16:05:30
1990
原创 Mutex
#include #include #include using namespace std; int f_count = 5; pthread_mutex_t f_lock;// = PTHREAD_MUTEX_INITIALIZER;说是静态的用该宏进行初始化 void *test(void *arg) { pthread_mutex_lock(&f_lock);
2013-09-27 10:09:28
529
原创 单件模式及其厂类
如下是设计模式一书中给出的设计: class Singleton { public: static Singleton *Instance(); int i; protected: Singleton(){} private: static Singleton* _instance; }; Singleton* Singleton::_instance = 0;
2013-09-26 19:06:27
648
原创 大数加法
#include "stdafx.h" #include #include using namespace std; class BigNumPlus { public: BigNumPlus(string t_strplused,string t_strplus):m_plused(t_strplused),m_plus(t_strplus),m_carryflag(fals
2013-09-26 12:33:18
578
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅