- 博客(52)
- 资源 (5)
- 收藏
- 关注
转载 C++中三种正则表达式比较(C regex,C ++regex,boost regex)
工作需要用到C++中的正则表达式,所以就研究了以上三种正则。1,C regex/* write by xingming * time:2012年10月19日15:51:53 * for: test regex * */#include #include #include #include #include #include using nam
2014-05-31 08:33:10 1165
转载 C++使用SQLite步骤及示例
C++使用SQLite步骤及示例开发环境:Windows XP+VS2005。开发语言:C++。1、下载sqlite文件。下载网址:http://www.sqlite.org/download.html。SQLite版本为SQLite 3.7.13,相关文件如下。sqlite-dll-win32-x86-3071300.zip:包含sqlite3
2014-05-31 08:11:34 801
原创 《c++primer(第四版)》习题16.16
#include using namespace std;templateint lengthOfArray(T (&array)[size]){ return sizeof(array)/sizeof(T);}void fun_16_16(){ int a[8]; cout<<lengthOfArray(a)<<endl;}
2014-05-29 15:25:33 665
转载 能让你成为更优秀程序员的10个C语言资源
本文由 伯乐在线 -archychu 翻译自mycplus。欢迎加入技术翻译小组。转载请参见文章末尾处的要求。一些人觉得编程无聊,一些人觉得它很好玩。但每个程序员都必须紧跟编程语言的潮流。大多数程序员都是从C开始学习编程的,因为C是用来写操作系统、应用程序最常用的语言。C编程笔记这些是华盛顿实验学院C编程入门课的部分笔记。它们是以《c程序设计语言》的补充笔记(从19
2014-05-23 10:22:00 520
转载 15款C/C++程序员必备的编译器和IDE
本文由 伯乐在线 -honpey 翻译自designzum。欢迎加入技术翻译小组。转载请参见文章末尾处的要求。
2014-05-23 10:21:45 594
转载 15款C/C++程序员必备的编译器和IDE
本文由 伯乐在线 -honpey 翻译自designzum。欢迎加入技术翻译小组。转载请参见文章末尾处的要求。当前,Web开发人员编程语言的选择很多,比如Java、.Net、PHP、Ruby、Perl、Python等等。今天,本文想和大家讨论下两种古老而又广泛流行的编程语言:C和C++。C/C++自身有许多优良的特性,代码运行高效,并有一些外围工具的支持。如今,这两种语言以其庞
2014-05-23 10:21:07 2559
转载 C\C++代码优化的27个建议
1. 记住阿姆达尔定律:funccost是函数func运行时间百分比,funcspeedup是你优化函数的运行的系数。所以,如果你优化了函数TriangleIntersect执行40%的运行时间,使它运行快了近两倍,而你的程序会运行快25%。这意味着不经常使用的代码不需要做较多优化考虑(或者完全不优化)。这里有句俗语:让经常执行的路径运行更加高效,而运行稀少的路径正确运行。2. 代
2014-05-23 10:17:04 584
转载 移位实现乘除法
移位实现的乘除法 移位实现的乘除法比直接乘除的效率高很多。用移位实现乘除法运算 a=a*4; b=b/4; 可以改为: a=a b=b>>2; 说明: 除2 = 右移1位 乘2 = 左移1位 除4 = 右移2位 乘4 = 左移2位 除8 = 右移3位 乘8 = 左移3位 ... ...
2014-05-23 10:08:45 3170
转载 小数在内存中的存储表示
http://blog.csdn.net/acdreamers/article/details/19012279整数在内存中的存储方式比较简单,我们来看看小数在内存中的存储方式。首先,要学会十进制小数与二进制小数之间的转换。 (1)二进制小数转化为十进制小数 比如把二进制小数110.11转化为十进制小数,步骤如下: (2)十进制小数转
2014-05-22 16:43:42 690
原创 一些Coder的blog
1.DDD http://www.cnblogs.com/netfocus/archive/2011/10/10/2204949.html#content_02.张善友 http://www.cnblogs.com/shanyou/archive/2009/09/21/1570716.html3.刘未鹏 http://mindhacks.cn/
2014-05-22 15:14:11 654
原创 《c++primer(第四版)》习题13.16
#include #include #include using namespace std;class Message;class Folder{public: Folder(const std::string& arg):path(arg) {} void add(const Message&); void del(const Message&); void s
2014-05-20 17:19:36 632
转载 8款最佳的开源在线学习CMS系统
摘要:CMS变得越来越流行,因为它不需要太多的编程能力,即便你是新手也能很好的完成相应的工作。本文罗列了8款最好的开源在线学习平台,基于这些平台提供强大的功能及安全的用户界面,帮助Web开发者大大提高工作效率。如今,CMS变得越来越流行,因为它不需要太多的编程能力,即便你是新手也能利用CMS很好的完成相应的工作。网络上有许许多多的在线学习平台,但想要选到适宜的却不是简单之事。本文罗列了8款最好
2014-05-20 17:18:24 2554
转载 DDD领域驱动设计基本理论知识总结
领域驱动设计之领域模型为什么建立一个领域模型是重要的领域通用语言(UBIQUITOUS LANGUAGE)将领域模型转换为代码实现的最佳实践领域建模时思考问题的角度领域驱动设计的经典分层架构用户界面/展现层应用层领域层基础设施层领域驱动设计过程中使用的模式所有模式的总揽图关联的设计实体(Entity)值对象(Value Object)领域
2014-05-18 09:41:34 838
转载 c++开源项目汇总
、、http://daixinghe.blog.163.com/blog/static/1843615920096653733850/?fromdm&fromSearch&isFromSearchEngine=yes向C++初学者推荐的几个开源库标签: STL boost SDL wxWidgets 开源库 推荐 2009-07-04 22:47前阵子写了《C
2014-05-16 22:00:04 734
转载 很好的源码软件列表,有助于学习提高 (ZT)
要做软件时,找个类似的软件参考一下,进步最快。这里是一个开源软件分类列表,分类详尽,可惜我们要用代理访问http://en.wikipedia.org/wiki/List_of_open-source_software_packages内容很多,可以点击进评论中有内容的转载,:)Contents1 Applied fields 1231.1 CAx
2014-05-16 21:12:28 2170
原创 《c++primer(第四版)》习题11.22
#include #include #include #include using namespace std;void fun_1122(){ vector a; for(int i = 0; i< LOOP_MAX; i++) { a.push_back(i); } list b; copy(a.rbegin() + 3, a.rbegin() + 8,
2014-05-11 08:31:13 870
原创 《c++primer(第四版)》习题11.21
#include #include #include #include using namespace std;void fun_1121(){ vector a; a.push_back(0); a.push_back(1); a.push_back(2); a.push_back(0); a.push_back(3); vector::reverse_iterat
2014-05-11 08:30:25 478
原创 《c++primer(第四版)》习题11.19
#include #include #include using namespace std;void fun_1119(){ vector a; for(int i = 0; i<LOOP_MAX;i++) { a.push_back(i); } vector::reverse_iterator iter = a.rbegin(); while(iter!=a.r
2014-05-11 08:29:44 535
原创 《c++primer(第四版)》习题11.15
#include #include #include #include using namespace std;void fun_1115(){ list a; a.push_back(0); a.push_back(1); a.push_back(1); a.push_back(2); a.push_back(1); a.push_back(2); a.push_b
2014-05-11 08:28:04 622
原创 《c++primer(第四版)》习题11.14
#include #include #include #include #include #include using namespace std;void fun_1114(){ vector a; for(int i = 0; i < LOOP_MAX; i++) { a.push_back(i); } //vector b; deque b; //re
2014-05-11 08:27:12 581
原创 《c++primer(第四版)》习题11.10
#include #include #include #include using namespace std;bool isFind(string& arg){ return arg.size() > 4;}void fun_1110(){ string input; vector words; words.push_back("the"); words.pus
2014-05-11 08:26:18 675
原创 《c++primer(第四版)》习题11.9
#include #include #include #include using namespace std;bool isCount(string& arg){ return arg.size() > 4;}void fun_1109(){ string input; vector words; words.push_back("the"); words.p
2014-05-10 23:53:53 688
原创 《c++primer(第四版)》习题8.16
#include #include #include #include "const.h"#include "assistfun.h"using namespace std;void fun_816(){ ifstream in; vector contentLine; open_file(in, string(FILE_NAME)); string line; while
2014-05-10 23:51:54 580
原创 《c++primer(第四版)》习题8.9
#include #include #include #include #include #include "assistfun.h"#include "const.h"using namespace std;void fun_809(){ vector content_line; vector content_word; ifstream in; in.ope
2014-05-10 23:50:47 473
原创 《c++primer(第四版)》习题8.7
#include #include #include #include #include "const.h"using namespace std;#define MOVE_NEXT() \do{\ in.close();\ in.clear();\ it++;\}while(0)\void fun_807(){ vector fileName; fileName
2014-05-10 23:49:50 634
原创 《c++primer(第四版)》习题8.6
#include #include #include #include "const.h"using namespace std;void fun_806(){ ifstream in; in.open(FILE_NAME); if(!in) { cout<<"open file fail"<<endl; return; } string word; wh
2014-05-10 23:49:00 863
转载 mac 系统右键创建打开shell
在开发过程中经常会用到Shell(“命令行”、“终端” or “控制台”?),而我们可以用Mac中一个叫终端的App进入Shell。打开这个App后,默认进入用户的home目录,即“/Users/username”,而这往往不是我们想要的工作目录。因此我们需要敲好几次“cd”命令才可以进入我们的工作目录。这显得很麻烦,其实我们可以利用系统的“服务”来这文件夹的右键菜单中直接加入一个在所选目录打开S
2014-05-10 07:52:34 2215
转载 读《修改代码的艺术》
来自: dreamhead (原来一切就是这么简单!)作为一个程序员,获取知识是让我不断前进的动力,而读书是我获取知识的一条重要途径。在这个“经典”、“必读”过剩的年代里,大多数的书都仅仅扮演着传播知识的角色,真正改变自己对某些问题看法的书其实少之有少。限于读书时的眼界和能力,在我列表中,让我拍案惊奇的书只有几本。Martin Fowler的《重构》,严格说来,我并没有完整的读完这本书,不
2014-05-09 15:43:43 758
转载 Linux环境变量设置
1. 显示环境变量HOME $ echo $HOME /home/redbooks 2. 设置一个新的环境变量hello $ export HELLO="Hello!" $ echo $HELLO Hello! 3. 使用env命令显示所有的环境变量 $ env HOSTNAME=redbooks.safe.org PVM_RSH=/us
2014-05-09 10:49:38 426
原创 《c++ Primer(第四版)》习题9.2
#include #include using namespace std;void fun_902(){ vector a; int max = 10; for(int i=0; i < max; i++) { a.push_back(i); } vector::iterator iter1 = a.begin(); vector::iterator iter2
2014-05-08 10:26:49 493
原创 《c++ Primer(第四版)》习题 9.39
#include #include #include using namespace std;void out_put_vector(vector& arg){ vector::iterator iter = arg.begin(); while(iter != arg.end()) { cout<<*iter<<endl; iter++; } return;}
2014-05-08 10:25:59 566
原创 《c++ Primer(第四版)》习题 9.41
#include #include #include using namespace std;string greet(string form, string lastname, string title, string::size_type pos, int length){ string result(form); result.replace(8, 5, lastname)
2014-05-07 22:44:22 698
原创 《c++ Primer(第四版)》习题 9.40
#include #include #include using namespace std;void fun_940(){ string q1("When lilacs last in the dooryard bloom'd"); string q2("The child is father of the man"); string sentence; sentence.
2014-05-07 22:43:48 683
原创 《c++ Primer(第四版)》习题 9.38
#include #include using namespace std;void fun_938(){ string a = "ab2c3d7R4E6"; string::size_type index = 0; while((index = a.find_first_of("0123456789", index)) != string::npos) { cout<
2014-05-07 22:42:39 531
原创 《c++ Primer(第四版)》习题 9.36
#include#include#includeusing namespace std;void fun_936(){ char a[] = {'s','t','u','d','e','n','t'}; vector b(a, a+7); string c; c.assign(b.begin(), b.end()); cout<<c<<endl;}
2014-05-07 22:41:59 536
原创 《c++ Primer(第四版)》习题 9.35
#include#includeusing namespace std;void fun_935(){ string a("AstUuDdent"); string::iterator iter = a.begin(); while(iter != a.end()) { if(isupper(*iter)) { a.erase(iter); contin
2014-05-07 22:41:21 509
原创 《c++ Primer(第四版)》习题 9.34
#include #include using namespace std;void fun_934(){ string a("student");// cout<<a<<endl; string::iterator iter = a.begin(); while(iter != a.end()) { *iter = toupper(*iter); iter++;
2014-05-07 22:40:22 501
原创 《c++ Primer(第四版)》习题 9.28
#include #include #include using namespace std;void fun_928(){ const char* a[] = {"a", "student", "named", "Tom"}; list b(a, a+4);// vector c(b.begin(), b.end()); vector c; c.assign(b.begi
2014-05-07 22:39:34 571
原创 《c++ Primer(第四版)》习题9.27
#include #include #include using namespace std;void fun_927(){ const char* a[] = {"a", "student", "named", "Tom"};// list b(a,a+4); deque b(a, a+4); deque::iterator iter2 = find(b.begin()
2014-05-07 22:38:56 473
算法第四版1
2015-03-18
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人