- 博客(32)
- 收藏
- 关注
原创 vimrc
set nocompatiblesyntax onfiletype on""set background=darkset autoindentset smartindentset showmatchset numberset tabstop=4set vb t_vb=set nowrapset hlsearchset incsearchset backspace=inde
2012-04-12 15:37:33 288
转载 15 Practical Linux Find Command Examples
http://www.thegeekstuff.com/2009/03/15-practical-linux-find-command-examples/http://www.thegeekstuff.com/2009/06/15-practical-unix-linux-find-command-examples-part-2/
2012-03-14 16:17:31 415
转载 7 Practical Linux Locate Command Examples – mlocate and updatedb
http://www.thegeekstuff.com/2012/03/locate-command-examples/
2012-03-14 16:16:59 391
原创 linux命令
pstreeshows the running processes as a treecat /proc/self/limitscat /proc/sys/kernel/ostypecat /proc/sys/kernel/osrelease cat /proc/versiondmesgprints the message buffer of the k
2012-03-06 13:11:43 240
转载 boost_CURRENT_FUNCTION_
#ifndef BOOST_CURRENT_FUNCTION_HPP_INCLUDED#define BOOST_CURRENT_FUNCTION_HPP_INCLUDED// MS compatible compilers support #pragma once#if defined(_MSC_VER) && (_MSC_VER >= 1020)# pragma once#end
2012-03-02 17:04:43 538
原创 stl binary_search
今天调程序的时候,犯了一个错误。使用binary_search的时候,没有先把vector sort一下,看了下c++ reference手册的描述binary_search的实现大致如下:template bool binary_search ( ForwardIterator first, ForwardIterator last, const T& value )
2012-02-26 15:25:19 673
转载 boost::phoenix::operator
Member pointer operatora->*member_object_pointera->*member_function_pointer#include #include #include class Demo{public: void func(int);};void Demo::func(int n){ printf("%s,result=
2012-01-06 10:27:59 290
转载 Detail about How VPTR and Virtual table works
http://www.daniweb.com/software-development/cpp/threads/113056
2011-12-31 16:56:03 292
转载 boost::function demo
#include #include /******************************************/class Demo{public: void showDemo(int nDemo);};void Demo::showDemo(int nDemo){ printf("%d\n",nDemo);}void TestMemberFunction
2011-12-31 16:19:07 270
转载 boost::bind And Objective-C
http://stackoverflow.com/questions/1020028/can-i-boostbind-to-an-objective-c-functionYou should be able to bind to a message implementation (IMP), which are just plain C functions with two
2011-12-22 19:12:55 405
翻译 03_Karp_Rabin
使用hash函数预处理的时间复杂度是 O(m) //对比较字符串进行hash查找时间复杂度是O(m*n)Code:#define REHASH(a,b,h) ((((h)-(a)*d)<<1)+(b))int KR(char* x,int m,char* y,int n){ /* preprocessing */ for(d=i=1;i<m;++i)
2011-12-21 22:40:57 215
翻译 01_brute_force
/* 时间复杂度:O(m*n) */#define EOS '\0'int brute_force(char* x,int m,char* y,int n){ char* yb; for(yb = y; *y!=EOS; ++y) { if(memcmp(x,y,m) == 0) { return (y -
2011-12-21 21:21:16 211
原创 Java学习推荐书目
From:http://www.blogjava.net/killme2008/archive/2010/11/11/337788.html 一直有这么个想法,列一下我个人认为在学习和使用Java过程中可以推荐一读的书籍,给初学者或者想深入的朋友一些建议,帮助成长。推荐的的都是我自己读过,也会推荐一些朋友读过并且口碑不错的书籍。一、基础类1、《Thinking in java》,入门...
2011-07-30 21:47:29 143
原创 boost::phoenix3
#include <vector>#include <algorithm>#include <iostream>#include <boost/phoenix/core.hpp>#include <boost/phoenix/operator.hpp>intmain(){ using boo...
2011-07-26 10:10:15 168
原创 Linux中gcc,g++常用编译选项
http://blogold.chinaunix.net/u/29619/showart_450675.html-x language filename 设定文件所使用的语言,使后缀名无效,对以后的多个有效.也就是根据约定,C语言的后缀名称是.c的,而C++的后缀名是.C或者.cpp,如果你很个性,决定你的C代码文件的后缀名是.pig 哈哈,那你就要用这个参数,这个参数对他后面的文件名都起作用...
2011-07-22 10:23:51 325
原创 loki::typelist
loki的typelist用来形成class的list依赖于递归行为 只不过在编译期执行 namespace loki{ class NullType; struct EmptyType {}; template<class T, class u> struct TypeList { typedef T Head; type...
2011-07-21 10:56:57 115
vim c++ ide 配置
$HOME需建几个目录 .vim.vim/plugin 放.vim插件.vim/colors 放配色.vim cscope和ctags安装的时候需要root权限 具体配置可以参考:http://www.vimer.cn/插件下载地址:http://www.vimer.cn/2010/06/%E6%9C%AC%E5%8D%9A%E4%BD%BF%E7%94...
2011-07-19 14:48:09 129
原创 linux命令tips
~/.bash_profile $vi .bash_profilefunction mkdircd() {mkdir -p "$@" && eval cd "\"$$#\"";} 设置系统时间#date -s "01/31/2009 22:19:53" /*****************************************/g...
2011-07-19 13:33:25 110
原创 boost::string
<boost/algorithm/string.hpp><boost/algorithm/string/case_conv.hpp><boost/algorithm/string/classification.hpp><boost/algorithm/string/compare.hpp><boost/algorithm/...
2011-07-18 10:20:47 113
原创 vector&&map
#include <algorithm>#include <map>#include <vector>//std::map在insert后是自动排序的,查找的时候可以使用 findstd::map<int,string> mapDemo_;if(mapDemo_.find(nKey) != mapDemo_.end())...
2011-07-18 10:09:30 63
原创 获取当前时间字符串
//get current time stringchar szTime[32] = {0};time_t lTM = time(NULL);tm *pstTM = localtime(&lTM);strftime(szTime, 32, "%Y-%m-%d %H:%M:%S", pstTM);//struct timeval_a old;struct t...
2011-07-18 10:05:08 214
原创 boost::split
#include "boost/algorithm/string.hpp"#include <stdio.h>#include <string>#include <vector>using namespace std;using namespace boost;int main(int argc,char* argv[]){...
2011-07-18 09:55:11 112
原创 boost_foreach
1 #include <string> 2 #include <iostream> 3 #include <boost/foreach.hpp> 4 5 #define foreach BOOST_FOREACH 6 7 8 int main() 9 { 10 std::string h...
2011-07-15 14:12:52 118
原创 关于沟通
今天沟通的不愉快,交接的人想着抛出,被交接的人很无奈。对于需求感到很迷惑,二传手没有表达清楚,还被问到底能不能实现。至少结果是好的,提了两种技术解决方案,找到原始提需求的人沟通完毕。以后还是与需求方直接沟通来的有效。...
2011-07-14 02:23:27 87
boost生成随机数
[code="c++"]/*输入参数:随机数位数*//*输出参数:随机数*/boost::mt19937 m_oBoostRandomSeed_;GetRandomNumber(int nDigits){ double dRangeMin = pow((double)10,nDigits); double dRangeMax = pow((double)10,nDigi...
2011-07-04 17:19:51 464
Erlang_Demo
[code="c++"]//socket基本应用//erlang程序基本写法-module(vpl).-export[(run/2)].-define(IP,"127.0.0.1").-define(PORT,1777).run(ThreadCount,MsgCount)-> CurrentThreadNo = -1, CurrentMsgNo = -1...
2011-06-23 17:45:52 185
SQL_CASE_1
表结构:ColNo Time SerialNo1(p-key) 020111 030201 030301 AxCSAaa SceCC GYAZZ需要:根据SerialNo中不同的值(用空格分开)来获取Time中对应位置的值Time格式是6个一组[code="SQL"]selec...
2009-08-07 11:50:26 140
原创 Oracle导出表结构
[code="SQL"]select b.TABLE_NAME as "表名",c.comments as "表说明",b.COLUMN_ID as "字段序号",b.COLUMN_NAME as "字段名",b.DATA_TYPE as "字段数据类型",b.DATA_LENGTH as "数据长度",b.DATA_PRECISION
2009-07-15 02:33:50 89
原创 sql server导出表结构
[code="sql"]SELECT 表名=case when a.colorder=1 then d.name else '' end, 表说明=case when a.colorder=1 then isnull(f.value,'') else '' end, 字段序号=a.colorder, 字段名=a.name, 标识=case when COLUMNPROPER...
2009-02-16 19:52:56 384
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人