自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(6)
  • 资源 (5)
  • 收藏
  • 关注

转载 探讨C++中的引用

引用是C++引入的新语言特性,是C++常用的一个重要内容之一,正确、灵活地使用引用,可以使程序简洁、高效。我在工作中发现,许多人使用它仅仅是想当然,在某些微妙的场合,很容易出错,究其原由,大多因为没有搞清本源。故在本篇中我将对引用进行详细讨论,希望对大家更好地理解和使用引用起到抛砖引玉的作用。  一、引用简介  引用就是某一变量(目标)的一个别名,对引用的操作与对变量直接操作完全一样。

2008-04-08 17:43:00 455

转载 static用法小结

static关键字是C, C++中都存在的关键字, 它主要有三种使用方式, 其中前两种只指在C语言中使用, 第三种在C++中使用(C,C++中具体细微操作不尽相同, 本文以C++为准).(1)局部静态变量(2)外部静态变量/函数(3)静态数据成员/成员函数下面就这三种使用方式及注意事项分别说明一、局部静态变量在C/C++中, 局部变量按照存储形式可分为三种auto, static, reg

2008-04-08 10:14:00 559

原创 Some of the best Open Source Project's in VC++ & MFC

IntroductionList of some of the best Open Souce projects written in VC++/MFC. BackgroundCodeproject has the best source code repository for VC++ developers. But another site Sourceforge.net also

2007-06-30 19:10:00 2958

原创 const 和 extern 用法小結

 雖說不難,但很重要!!1.       const常量,如const int max = 100;  优点:const常量有数据类型,而宏常量没有数据类型。编译器可以对前者进行类型安全检查,而对后者只进行字符替换,没有类型安全检查,并且在字符替换时可能会产生意料不到的错误(边际效应)2.       const 修饰类的数据成员。如:class A{    const int s

2007-06-27 09:06:00 3728 2

转载 软件开发技术名词解密

序:去年为了总结自己所学习/接触过的技术,也顺便为初学者少走弯路指明一些方向,可惜后来诸事缠身未能继续,十分遗憾,现放到自己的BLOG上来鼓励自己将此继续下去。   (http://snailflying.blog.hexun.com/)  "Win32编程”    很不幸,我从开始学习编程到理解这个名词中间隔了很长的时间(上个世纪的学习环境可见一斑)。很长时间里我都不明白32是指什么,我用过Do

2007-05-12 19:44:00 1254 1

转载 经典排序算法的C++ template封装

这几天在网上看到有人总结了4种比较常见简单的排序的算法,并用C#实现了出来。看了之后不由的想起了大学时候学>的情景, 忍不住用C++实现了一遍,除了冒泡排序, 选择排序, 插入排序,希尔排序之外, 还包括了算法复杂度较好的快速排序与堆排序。 然后用C++强大的模板功能实现了一个基于policy的Sort函数, 很明显,这个Sort函数是以排序算法为policy的。 这里利用了不同的模板技术实作出多

2007-01-19 14:50:00 1071

Effective Unit Testing

public class LogFileTransformerTest { private static final String END = "2005-05-23 21:21:37"; private static final String START = "2005-05-23 21:20:33"; private LogFile logFile; @Before public void prepareLogFile() { logFile = new LogFile(START, END); } @Test public void overallFileStructureIsCorrect() throws Exception { StringBuilder expected = new StringBuilder(); appendTo(expected, "session-id###SID"); appendTo(expected, "presentation-id###PID"); appendTo(expected, "user-id###UID"); appendTo(expected, "started###2005-05-23 21:20:33"); appendTo(expected, "finished###2005-05-23 21:21:37"); assertEquals(expected.toString(), transform(logFile.toString())); } @Test public void screenDurationsGoBetweenStartedAndFinished() throws Exception { logFile.addContent("[2005-05-23 21:20:35] screen1"); String out = transform(logFile.toString()); assertTrue(out.indexOf("started") < out.indexOf("screen1")); assertTrue(out.indexOf("screen1") < out.indexOf("finished")); } @Test public void screenDurationsAreRenderedInSeconds() throws Exception { logFile.addContent("[2005-05-23 21:20:35] screen1"); logFile.addContent("[2005-05-23 21:20:35] screen2"); logFile.addContent("[2005-05-23 21:21:36] screen3"); Listing 4.7 Assertions focused on just one aspect are readable, less brittle Check that common headers are placed correctly Check screen durations’ place in the log Check screen duration calculations www.it-ebooks.info Hyperassertions 55 String output = transform(logFile.toString()); assertTrue(output.contains("screen1###0")); assertTrue(output.contains("screen2###61")); assertTrue(output.contains("screen3###1")); } // rest omitted for brevity private String transform(String log) { ... } private void appendTo(StringBuilder buffer, String string) { ... } private class LogFile { ... } }

2015-10-12

Instant Mock Testing with PowerMock.pdf

关于PowerMock Instant Mock Testing with PowerMock 7 Saying Hello World! (Simple) 8 Getting and installing PowerMock (Simple) 14 Mocking static methods (Simple) 22 Verifying method invocation (Simple) 28 Mocking final classes or methods (Simple) 34 Mocking constructors (Medium) 37 Understanding argument matchers (Medium) 42 Understanding the Answer interface (Advanced) 48 Partial mocking with spies (Advanced) 52 Mocking private methods (Medium) 55 Breaking the encapsulation (Advanced) 59 Suppressing unwanted behavior (Advanced) 64

2015-10-12

c++ word notepad 源码

c++ word notepad 源码 c++ word notepad 源码

2011-05-17

excel及音频文件操作.rar

excel及音频文件操作小工具~ vc 操作excel,mp3合并强大~ 批量文件查找,貌似比资源管理器速度快~

2011-05-17

Programming_TCP__in_C++___

Programming_TCP__in_C++___for_the_Beginner

2007-04-30

空空如也

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

TA关注的人

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