自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(13)
  • 资源 (12)
  • 收藏
  • 关注

原创 最近用Mysql的问题

最近用Mysql悲催的遇到不少问题,谁让老东家有一堆DBA呢,原来不关心,自己用就gepi了。各种求指教啊。 1. 坑爹的repair 线上机器,配置应该是半年前的主流配置。CentOS 5。有个表老大了(其实也才250G,MyISAM,索引文件8G),而且前面的数据都删过。插入速度贼慢,比虚机里的Mysql都慢(插入内容和方式完全相同的情况下)。 于是觉得,做optimize吧。兴

2011-12-13 17:58:37 1204

原创 几年了。。。如隔3秋啊

只是占位,不准备发长篇大论。不是3秋是4秋了。

2011-12-13 16:03:30 661

原创 Effective STL 笔记若干-有关STL使用需要注意的方面

如何删除元素: 去除一个容器中有特定值的所有对象: 如果容器是vector、string或deque,使用erase-remove惯用法。 c.erase(remove(c.begin(), c.end(), 1963),c.end());    //删除所有1963       如果容器是list,使用list::re

2007-11-11 13:52:00 1260

翻译 永久改变你写异常安全代码的方式(神奇的Loki::ScopeGuard)

 作者:Andrei Alexandrescu and Petru Marginean原文地址:http://www.ddj.com/cpp/184403758翻译,裁剪,修改:purewinter注:裁剪修改只是为了让更多csdn上的读者不会因为此文太长而放弃阅读。。。注2:Loki::ScopeGuard不仅对通常意义的异常有用,对于所有可以使用RAII的地方均有用。包括new

2007-11-01 11:32:00 2723 1

转载 智能指针的标准之争:Boost vs. Loki(转载)

  撰文/马维达   原文发表时间未知。      tr1使用了boost::shared_ptr,是否还使用了scoped_ptr?     若有人知道C++0x(将要)采用的智能指针方案(或变动),望告知。*********************************************************************************  2001 年

2007-10-15 14:33:00 1330

原创 在C++实现C#中的属性(Property)功能的尝试: MACRO篇(2)

上文提到第一版有一些问题,于是要再这个基础上加以改进。回想C#中的属性的做法,实际上最终访问的是类的私有成员,如Length属性一般最终是访问的名为_length的私有成员,可以说是属性与成员的绑定。这种绑定初步设想可以用指针实现。而自定义get/set函数,就让用户重写=操作符和自定义转换操作符就可以了。但是深入一想有一个大麻烦。自定义get/set函数的一个重要目的就是设置边界条件或者检查。如

2007-08-29 22:59:00 1620

原创 在C++实现C#中的属性(Property)功能的尝试: MACRO篇(1)

看了C++ templates一书以后,想用C++模拟实现C#中的属性功能。即对象的某个值可以当成public成员变量一样使用,但实际上值的获取和更改是经过对应获取和设置器(get和set函数)来进行的。当然,原本是想用template来实现,当实现中遇到很多很多问题,目前先用C++的宏来实现了基本功能。注:在本文中,不考虑对属性进行任何指针类操作,包括对属性进行取址(&操作符)、求值(*操作符)

2007-08-29 22:55:00 1338

原创 C++ template笔记若干

1.调用函数模板时,可以通过编译器进行实参演绎(/deduction/推导)而不必显式指定实参类型。但是必须严格匹配。 *:在非引用类型参数中,数组类型将会decay成对应指针类型,而引用类型则不会。 即引用类型参数中,"hi"和"abc"是不同的类型(const char[3]和const char[4])。解决这个问题可以改用非引用类型,不过最好是针对需要用的数组类型进行特化。2。类模板参数可

2007-08-29 20:02:00 2448

转载 只有你能听见(Calling you)5

* 5 *    在医院里被护士发现时,我已经冷得快不行了,右手流淌的血已经凝固。    听说这个车祸的肇事者,也就是车辆的司机当场就送命了,我没兴趣问事故的起因,接下来我却还要一口气跟警方和父母亲交待情况。我疲惫不堪,如一团烂泥。    我没跟任何人说起大脑手机的事。    参加完真也的葬礼后,我就去了他常提起的那个垃圾站。    那是个下雪的日子,我迷路了,不过最后,我还是找到了。   

2007-05-20 16:37:00 1035

转载 只有你能听见(Calling you)4

* 4 *    我们被抬进同一辆救护车,驶往医院。途中,他死了。    就好像做梦一样,眼前的一切汹涌而来。不断有人在拽我,推我,试图让呆若木鸡的我有点反映。    车里一个救护员一边察看我右手的小伤,一边问个不停。她一定也问过我这个年轻男子是谁,跟我有什么关系,可是我没啃半句声,完全没任何反应。    后来,救护员从他口袋的钱包里找到驾驶证,念出了他的名字。我知道这就是真也说过的摩托车驾驶

2007-05-20 16:31:00 1102

转载 只有你能听见(Calling you)3

*3 *    真也住得很远,但我老是有跟他很接近的感觉。他是我的知己,使我倾诉的对象,他让我知道自己并不是孤独的。现在的我会为一些小事忐忑,一时兴高采烈,一时心如死灰,在不知不觉间,跟真也通话后,我的内心变得很脆弱。    真也要乘飞机过来。    “我们见面谈谈。”    像往常那样,当我们聊着对我们而言相当重要,实际却并不重要的话题时,这个念头就乘虚而入,挥之不去。大脑手机固然不错,不过

2007-05-20 16:27:00 906

转载 只有你能听见(Calling you)2

*2*    近乎恐怖的感觉袭遍全身,这事是不可能的!一定是什么地方出了问题!    即使世界万事万物皆离弃我,脑里这个通讯仪器也不会离开我半步,我觉得电话已经远离我的掌心,正在到处横冲直撞。    但是,我也不可能永远不接电话,我虽然感到恐惧,却也不能把手机抛弃。因为对我而言,我脑里的电话比任何事物都要真,都要美。    我想象用手颤颤巍巍地拿起了那不真实的手机,按停了一直作响的音乐。我犹豫

2007-05-20 16:24:00 1258

转载 只有你能听见(Calling you)1

---关于本文作者 ---乙一是日本新锐作家。说是新锐,其实从1995年发表第一部作品《夏日烟火与我的尸体》(夏と花火と私の死体)算起,他至今在文坛也已经活跃了十多年了。在这十多年间,他写了许多作品,获了许多奖项,更有许多著作改编成电影电视,据说单单他的一部短篇小说集《ZOO》的十个短篇中就有五个被搬上了银幕。日本和中国台湾流传着所谓“白乙一”、“黑乙一”的说法。“白乙一”是说他的一些作品

2007-05-20 16:22:00 1099

C++ Coding Standards: 101 Rules, Guidelines, and Best Practices

C++ Coding Standards: 101 Rules, Guidelines, and Best Practices <br>By Herb Sutter, Andrei Alexandrescu <br><br>Consistent, high-quality coding standards improve software quality, reduce time-to-market, promote teamwork, eliminate time wasted on inconsequential matters, and simplify maintenance. Now, two of the world's most respected C++ experts distill the rich collective experience of the global C++ community into a set of coding standards that every developer and development team can understand and use as a basis for their own coding standards.<br><br>The authors cover virtually every facet of C++ programming: design and coding style, functions, operators, class design, inheritance, construction/destruction, copying, assignment, namespaces, modules, templates, genericity, exceptions, STL containers and algorithms, and more. Each standard is described concisely, with practical examples. From type definition to error handling, this book presents C++ best practices, including some that have only recently been identified and standardized-techniques you may not know even if you've used C++ for years. Along the way, you'll find answers to questions like<br><br>What's worth standardizingand what isn't?<br><br>What are the best ways to code for scalability?<br><br>What are the elements of a rational error handling policy?<br><br>How (and why) do you avoid unnecessary initialization, cyclic, and definitional dependencies?<br><br>When (and how) should you use static and dynamic polymorphism together?<br><br>How do you practice "safe" overriding?<br><br>When should you provide a no-fail swap?<br><br>Why and how should you prevent exceptions from propagating across module boundaries?<br><br>Why shouldn't you write namespace declarations or directives in a header file?<br><br>Why should you use STL vector and string instead of arrays?<br><br>How do you choose the right STL search or sort algorithm?<br><br>What rules should you follow to ensure type-safe code?<br><br>Whether you're working alone or with others, C++ Coding Standards will help you write cleaner codeand write it faster, with fewer hassles and less frustration.<br>

2007-12-03

Thinking in C++ 2nd

Thinking in C++ 第2版. Vol1& Vol2<br>C++经典之一.

2007-10-25

More Exceptional C++

More Exceptional C++ <br>By Herb Sutter <br> <br>Publisher : Addison Wesley <br>Pub Date : December 17, 2001 <br>ISBN : 0-201-70434-X <br>Pages : 304 <br><br>Organized in a practical problem-and-solution format, More Exceptional C++ picks up where the widely acclaimed Exceptional C++ leaves off, providing successful strategies for solving real-world problems in C++. Drawing from years of in-the-trenches experience, Herb Sutter provides tested techniques and practical solutions for programmers designing modern software systems with C++, from small projects to enterprise applications.

2007-10-25

Modern C++ Design 中文版

C++设计新思维<br>泛型编程与设计模式之应用<br>Modern C++ Design<br>Generic Programming<br>and Design Patterns Applied<br>Andrei Alexandrescu <br><br>侯捷 于春景 合译

2007-10-25

Exceptional C++ Style

Exceptional C++ Style 40 New Engineering Puzzles, Programming Problems, and Solutions<br><br>Publisher : Addison Wesley <br>Pub Date : August 02, 2004 <br>ISBN : 0-201-76042-8 <br>Pages : 352 <br>

2007-10-25

Exceptional C++

Exceptional C++: 47 Engineering Puzzles, Programming Problems, and Solutions <br>By Herb Sutter <br> <br>Publisher : Addison Wesley <br>Pub Date : November 18, 1999 <br>ISBN : 0-201-61562-2 <br>Pages : 240 <br><br>Exceptional C++ shows by example how to go about sound software engineering in standard C++. Do you enjoy solving thorny C++ problems and puzzles? Do you relish writing robust and extensible code? Then take a few minutes and challenge yourself with some tough C++ design and programming problems.

2007-10-25

Effective C++ 第3版

Effective C++,也不用多说了吧.

2007-10-25

C++ Templates

C++ Templates: The Complete Guide <br>By David Vandevoorde, Nicolai M. Josuttis <br> <br>Publisher : Addison Wesley <br>Pub Date : November 12, 2002 <br>ISBN : 0-201-73484-2 <br>Pages : 552 <br><br>Readers learn<br><br>The exact behaviors of templates <br><br>How to avoid the pitfalls associated with templates <br><br>Idioms and techniques, from the basic to the previously undocumented <br><br>How to reuse source code without threatening performance or safety <br><br>How to increase the efficiency of C++ programs <br><br>How to produce more flexible and maintainable software<br><br>

2007-10-25

C++ Standard Library

C++ Standard Library, The: A Tutorial and Reference<br><br>Nicolai M. Josuttis <br>Publisher: Addison Wesley <br>First Edition August 06, 1999<br>ISBN: 0-201-37926-0, 832 pages<br><br>This thoroughly up-to-date book reflects the newest elements of the C++ standard library incorporated into the full ANSI/ISO C++ language standard. In particular, the text focuses on the Standard Template Library (STL), examining containers, iterators, function objects, and STL algorithms. You will also find detailed coverage of special containers, strings, numerical classes, internationalization, and the IOStream library. Each component is presented in depth, with an introduction to its purpose and design, examples, a detailed description, traps and pitfalls, and the exact signature and definition of its classes and their functions. An insightful introduction to fundamental concepts and an overview of the library will help bring newcomers quickly up to speed.

2007-10-25

Inside the C++ Object Model

Inside the C++ Object Model <br>By Stanley B. Lippman <br> <br>Publisher : Addison Wesley <br>Pub Date : May 03, 1996 <br>ISBN : 0-201-83454-5 <br>Pages : 304 <br><br>Highlights<br><br>Explores the program behavior implicit in the C++ Object Model's support of object-oriented programming. <br><br>Explains the basic implementation of the object-oriented features and the trade offs implicit in those features. <br><br>Examines the impact on performance in terms of program transformation. <br><br>Provides abundant program examples, diagrams, and performance measurements to relate object-oriented concepts to the underlying object model. <br><br>

2007-10-25

C++ common knowledge

C++ Common Knowledge: Essential Intermediate Programming <br>By Stephen C. Dewhurst <br> <br>Publisher : Addison Wesley Professional <br>Pub Date : February 28, 2005 <br>ISBN : 0-321-32192-8 <br>Pages : 272 <br>Slots : 1.0 <br><br><br><br>What Every Professional C++ Programmer Needs to Know—Pared to Its Essentials So It Can Be Efficiently and Accurately Absorbed<br><br>C++ is a large, complex language, and learning it is never entirely easy. But some concepts and techniques must be thoroughly mastered if programmers are ever to do professional-quality work. This book cuts through the technical details to reveal what is commonly understood to be absolutely essential. In one slim volume, Steve Dewhurst distills what he and other experienced managers, trainers, and authors have found to be the most critical knowledge required for successful C++ programming. It doesn't matter where or when you first learned C++. Before you take another step, use this book as your guide to make sure you've got it right!

2007-10-25

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除