Edmund's zone

导航

公告

随笔分类

随笔档案

最新评论

统计

常用链接

阅读排行榜

评论排行榜

2012年5月28日 #

std::vector<point>对距离固定点的距离排序

摘要: 怎么做呢?阅读全文

posted @ 2012-05-28 23:49 Edmund Li 阅读(3) 评论(0) 编辑

2011年11月14日 #

Selection Sort

摘要: Selection sort阅读全文

posted @ 2011-11-14 17:50 Edmund Li 阅读(14) 评论(0) 编辑

2011年7月26日 #

升级ubuntu11出现grub错误

摘要: 在虚拟机上面将ubuntu10.04 升级的到11.04,重启后出现“Minimal BASH-like line editing is supported. For the first word, TAB lists possible command completions. Anywhere else TAB lists possible device or file completions.”错误,经过查阅资料,解决过程如下:首先,我的ubuntu11安装在/dev/sda1(hd0,1)进行如下设置:set root=(hd0,1)linux /vmlinuz root=/dev/sd阅读全文

posted @ 2011-07-26 15:52 Edmund Li 阅读(136) 评论(0) 编辑

2011年7月14日 #

修改VC++工程framework版本

摘要: 在C++/CLI中修改VC++的framework版本,由于VS2010不支持像C#项目文件的那种直接的下拉框模式,我们需要在.vcxproj文件中修改目标版本(TargetFrameWorkVersion),具体操作如下:1.如果采用vs的IDE来修改,需要先把你要修改的项目工程unload,然后右键,选中“Edit”目标项目,在<ProjectGuid>下面添加你需要的版本,如下图:其中IDE...阅读全文

posted @ 2011-07-14 09:03 Edmund Li 阅读(178) 评论(0) 编辑

2011年7月12日 #

断点不能加载

摘要: C#调用C++/CLI 的代码中,C++的代码总不能跟踪。其中我的C#是新代码,而C++则是同事发给我的现在程序中已经使用的代码。我现在要做到就是把C++的大部分东西推到重来。由于进度紧张,连C++的项目文件都没有没有改,这导致浪费了一整天的时间。在debug的状态下,查看Modules的信息,发现那个C++总是调用别人的dll,而symbol file里面的信息也不是我正在调试的pdb文件。郁闷,郁闷。。。在dll上面点击右键,加载symbol,总是说mismatch。!!!!咋回事??把module里面显示的路径改个名字,再看,竟然又到了改后的目录里面!!说明不是工程设置的错误。唉。。。两阅读全文

posted @ 2011-07-12 16:48 Edmund Li 阅读(69) 评论(0) 编辑

2011年7月8日 #

Decorator Pattern

摘要: Time for Decorator pattern:Use Espresso, DarkRoast and HouseBlend coffee as the ConcreteComponent, Soy, Mocha and Whip as the ConcreteDecorate.Here is the code:using System;namespace DecoratorPattern{ class Program { static void Main(string[] args) { Beverage beverage = new Espresso(); Console.Write阅读全文

posted @ 2011-07-08 08:49 Edmund Li 阅读(42) 评论(0) 编辑

2011年7月4日 #

5 Tips for creating good code every day[转]

摘要: Being a good developer is like being any other good professional, it’s all it’s about doing as much quality work as possible. There is a popular sentence that summarises it: “Do it. Do it right. Do it right now”.1.- Have your own to do list for the day.The best approach to complete complex activitie阅读全文

posted @ 2011-07-04 14:15 Edmund Li 阅读(25) 评论(0) 编辑

2011年6月30日 #

策略模式

摘要: 今天研究一下策略模式。示例程序如下:Strategy.csnamespace StrategyPatternExample{ public interface Strategy { int Execute(int a, int b); }}Context.csnamespace StrategyPatternExample{ public class Context { private Strategy strategy; public Context(Strategy strategy) { this.strategy = strategy; } public int ExecuteStra阅读全文

posted @ 2011-06-30 09:31 Edmund Li 阅读(85) 评论(0) 编辑

2011年1月13日 #

输出1到1000的数

摘要: 最近经常见这道题:请把从1到1000的数打印出来,但你不能使用任何的循环语句或是条件语句。更不能写1000个printf或是cout。用C/C++语言。自己用C++试了一下,怎么也不会抛出异常,难道不对?看代码:[代码]调试使用:Visual studio 2008 Command Prompt,cl /EHsc后直接用cl也不行,都能打印到85721这个值。难道编译器对分母为零熟视无睹???然后直接把代码拷贝到vs2008的编译器里面,还是如此。郁闷中,随手把第一行“#include <windows.h> 删除,竟然能打印到1000了!why?你干啥了,Windows.h?另外,在不删除W阅读全文

posted @ 2011-01-13 17:50 Edmund Li 阅读(227) 评论(7) 编辑

2011年1月12日 #

观察者模式

摘要: 观察者模式阅读全文

posted @ 2011-01-12 22:28 Edmund Li 阅读(101) 评论(0) 编辑

仅列出标题  下一页