上一页 1 ··· 22 23 24 25 26 27 28 29 30 ··· 42 下一页

2013年3月15日

没有初始化的指针会是个什么值呢?

摘要: 在C++的构造函数中我们应该把所有成员变量都初始化,如果我们忘记了初始化一个成员指针,会发生什么呢? 假设有如下代码: class my{public: my(){}; ~my(){delete[] r;}private: float* r;};class my2{private: my m;};int main() { float* f; m... 阅读全文

posted @ 2013-03-15 16:31 fresky 阅读(547) 评论(0) 推荐(0) 编辑

高性能软件需要知道的一些数字(zz)

摘要: Numbers to understand if you are writing high performance software 阅读全文

posted @ 2013-03-15 15:58 fresky 阅读(134) 评论(0) 推荐(0) 编辑

2013年3月8日

SEH(Structured Exception Handling)详细解释

摘要: A Crash Course on theDepths of Win32 Structured Exception Handling, MSJ January 1997详细解释了什么是SECH(Structured Exception Handling)。 阅读全文

posted @ 2013-03-08 16:16 fresky 阅读(232) 评论(0) 推荐(0) 编辑

2013年3月7日

用Doxygen加上Graphviz来理解代码。

摘要: Doxygen加上Graphviz可以做出非常直观的doc和类图之类的,非常有利于阅读代码。这里有一个使用说明,用Doxygen+Graphviz生成函数调用流程图。 阅读全文

posted @ 2013-03-07 18:39 fresky 阅读(183) 评论(0) 推荐(0) 编辑

2013年3月1日

developer应该知道的image知识(JPG和PNG)

摘要: Jesse Chapo - Developers Guide to Images 阅读全文

posted @ 2013-03-01 19:07 fresky 阅读(174) 评论(0) 推荐(0) 编辑

Command Query Responsibility Segregation

摘要: Martin Flowler 11年写得CQRS。 阅读全文

posted @ 2013-03-01 18:56 fresky 阅读(138) 评论(0) 推荐(0) 编辑

2013年2月27日

C#的yield return是怎么被调用到的?

摘要: 假设有如下代码: static IEnumerable<int> getInt() { for (int i = 0; i < 3; i++) { Console.WriteLine("get " + i); yield return i; } ... 阅读全文

posted @ 2013-02-27 14:17 fresky 阅读(130) 评论(0) 推荐(0) 编辑

2013年2月24日

C#中Func和Expression的区别

摘要: LINQ中IEnumerable<T>的where接受的是Func,但是IQueryable<T>接受的是Expression。 区别在于Func直接会被编译器编译成IL代码,但是Expression只是存储了一个表达式树,在运行期作处理。比如在LINQ TO SQL的时候就可以把这个表达式树变成sql语句。 可以调用Expression的Compile方法,把一个Expression编译成一... 阅读全文

posted @ 2013-02-24 13:42 fresky 阅读(725) 评论(0) 推荐(0) 编辑

2013年2月20日

C#中各种serialization的比较

摘要: c# - What are the differences between the XmlSerializer and BinaryFormatter - Stack Overflow 阅读全文

posted @ 2013-02-20 11:02 fresky 阅读(445) 评论(0) 推荐(0) 编辑

2013年2月19日

C#的static constructor抛了异常会怎么处理?

摘要: stackoverflow上举了这个例子说明在C#中,如果static constructor只会被调用一次,即使抛了异常,也不会重试调用。如果抛了异常,那么在这个appdomain里面,这个类就不能用了。 示例代码: using System;public sealed class Bang{ static Bang() { Console.WriteLine... 阅读全文

posted @ 2013-02-19 10:30 fresky 阅读(251) 评论(0) 推荐(0) 编辑

上一页 1 ··· 22 23 24 25 26 27 28 29 30 ··· 42 下一页

导航