<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>馨荣家园</title><link>http://blog.vckbase.com/arong/</link><description>室主感言：可以走错路，不可不走路，也不可总踩别人脚印走路。</description><managingEditor>馨荣家园</managingEditor><dc:language>af</dc:language><generator>.Text Version 0.958.2004.214</generator><item><dc:creator>馨荣家园</dc:creator><title>概率疑问</title><link>http://blog.vckbase.com/arong/archive/2007/08/28/28869.html</link><pubDate>Tue, 28 Aug 2007 02:25:00 GMT</pubDate><guid>http://blog.vckbase.com/arong/archive/2007/08/28/28869.html</guid><wfw:comment>http://blog.vckbase.com/arong/comments/28869.html</wfw:comment><comments>http://blog.vckbase.com/arong/archive/2007/08/28/28869.html#Feedback</comments><slash:comments>7</slash:comments><wfw:commentRss>http://blog.vckbase.com/arong/comments/commentRss/28869.html</wfw:commentRss><trackback:ping>http://blog.vckbase.com/arong/services/trackbacks/28869.html</trackback:ping><description>考虑这样一个问题：我们把2个红色球和2个白色球放进一个黑盒子里，问取出两个球颜色相同得概率是多少。&lt;BR&gt;&lt;BR&gt;很显然，取出两个球的组合有以下四种：RR, RW,WR,WW，因此同颜色的概率是2/4=0.5&lt;BR&gt;&lt;BR&gt;按照乘法原理，我们可以分两次取出。&lt;BR&gt;第一次，我们取出白色的可能性为1/2，剩下的3个球再取出白色的可能性为1/3，因此，两次都取出白色的可能性为1/2 * 1/3 = 1/6&lt;BR&gt;同理，都取出红色的可能性为1/6&lt;BR&gt;那么，取出同种颜色的可能性应该为1/6 + 1/6=1/3&lt;BR&gt;&lt;BR&gt;为什么会不一样？&lt;img src ="http://blog.vckbase.com/arong/aggbug/28869.html" width = "1" height = "1" /&gt;</description></item><item><dc:creator>馨荣家园</dc:creator><title>施恩不求报</title><link>http://blog.vckbase.com/arong/archive/2007/08/24/28757.html</link><pubDate>Fri, 24 Aug 2007 09:46:00 GMT</pubDate><guid>http://blog.vckbase.com/arong/archive/2007/08/24/28757.html</guid><wfw:comment>http://blog.vckbase.com/arong/comments/28757.html</wfw:comment><comments>http://blog.vckbase.com/arong/archive/2007/08/24/28757.html#Feedback</comments><slash:comments>5</slash:comments><wfw:commentRss>http://blog.vckbase.com/arong/comments/commentRss/28757.html</wfw:commentRss><trackback:ping>http://blog.vckbase.com/arong/services/trackbacks/28757.html</trackback:ping><description>&lt;A href="http://easydev.spaces.live.com/"&gt;http://easydev.spaces.live.com/&lt;/A&gt;&lt;img src ="http://blog.vckbase.com/arong/aggbug/28757.html" width = "1" height = "1" /&gt;</description></item><item><dc:creator>馨荣家园</dc:creator><title>内存泄漏问题分析</title><link>http://blog.vckbase.com/arong/archive/2007/06/25/27060.html</link><pubDate>Mon, 25 Jun 2007 09:19:00 GMT</pubDate><guid>http://blog.vckbase.com/arong/archive/2007/06/25/27060.html</guid><wfw:comment>http://blog.vckbase.com/arong/comments/27060.html</wfw:comment><comments>http://blog.vckbase.com/arong/archive/2007/06/25/27060.html#Feedback</comments><slash:comments>41</slash:comments><wfw:commentRss>http://blog.vckbase.com/arong/comments/commentRss/27060.html</wfw:commentRss><trackback:ping>http://blog.vckbase.com/arong/services/trackbacks/27060.html</trackback:ping><description>大家经常听到一个名词叫内存泄漏。到底怎样才会遇到内存泄漏，内存泄漏到底该怎么定位，大家却都很糊涂。实际上我对这个问题也很头疼，下面就是我关于这个问题的一些小看法：&lt;BR&gt;&lt;BR&gt;1. 什么叫内存泄漏？&lt;BR&gt;内存泄漏是指你分配了内存，使用完毕后没有正确释放它。这样这个内存就不能再被使用。&lt;BR&gt;&lt;BR&gt;例如：&lt;BR&gt;void test()&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;char * p = new char[MAX_PATH];&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; GetModuleFileName(NULL,p, MAX_PATH);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; strcat(p+strlen(p) - 3, "txt");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CStdioFile file(p);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; file.WriteString("text");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; file.Close();&lt;BR&gt;}&lt;BR&gt;&lt;BR&gt;注意：上面的指针p函数退出后就无法再释放，new char[MAX_PATH]分配的内存就泄漏了。&lt;BR&gt;&lt;BR&gt;2. 何时我的程序泄漏了？&lt;BR&gt;从外部看，我们很难100％准确的方法去判断是否有内存泄漏。实际上，一块内存是否被泄漏，从外部看只有当进程结束才能知道。因为你完全可以从开始分配一块内存，直到结束才去释放它。&lt;BR&gt;&lt;BR&gt;基本上，下面行为不能说明内存泄漏：&lt;BR&gt;a) 任务管理器上显示内存使用增加了1MB&lt;BR&gt;b) 内存使用很多（我见过最大内存使用超过1.5GB的程序）&lt;BR&gt;&lt;BR&gt;下面行为可能意味着有内存泄漏：&lt;BR&gt;a) 一个进程的内存使用量按照一个固定的速度稳定的增长（例如每小时增加20MB)&lt;BR&gt;&lt;BR&gt;如果可以在VC IDE中运行程序，当程序退出时，系统会报一堆泄漏错误。&lt;BR&gt;&lt;BR&gt;3. 如何定位&lt;BR&gt;从编译器角度讲，在分配内存后，任何时候释放都是合适的，因此系统不会知道你何时适合去释放内存。在进程运行过程中，你只能估计是否有内存泄漏，而不能确定一定有内存泄漏。一般来说，我们可以用以下一些办法定位：&lt;BR&gt;&lt;BR&gt;a) 使用性能监视器跟踪进程的内存使用情况，如果它在不断增长，且增长速度趋于稳定，一般说明在某个循环性的操作中有内存泄漏&lt;BR&gt;b) 在编译器中按照Debug模式运行程序，运行一定时间后（例如2天），使用正常的方式停止进程&lt;BR&gt;正常情况下，你不会收到任何和内存有关的异常。如果你程序有内存泄漏，你会收到如下错误信息：&lt;BR&gt;&lt;BR&gt;Detected memory leaks!&lt;BR&gt;Dumping objects -&amp;gt;&lt;BR&gt;D:\projects\EnumWnd\EnumWndDlg.cpp(185) : {78} normal block at 0x00421330, 100 bytes long.&lt;BR&gt;&amp;nbsp;Data: &amp;lt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;gt; CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD &lt;BR&gt;Object dump complete.&lt;BR&gt;&lt;BR&gt;注意，这里EnumWndDlg.cpp(185)应该是分配这块内存的地方。这是因为没有所谓的内存泄漏点，只有在某点分配的内存被泄漏了。&lt;BR&gt;&lt;BR&gt;4. 如何分析内存泄漏&lt;BR&gt;内存泄漏分析一般是通过分析内存生命周期来进行的。你必须对你的内存的可能使用情况有所了解。在此基础上，你应该了解在那个地方内存应该被释放。如果有内存泄漏，说明程序没有走到那个地方，或者释放代码没有正确执行。因此你可能需要跟踪你代码的执行情况，通过分析为什么代码没有按照预期走到内存释放处，了解为什么内存泄漏了。&lt;BR&gt;&lt;BR&gt;常见的原因：&lt;BR&gt;&lt;BR&gt;a) 忘记释放&lt;BR&gt;b) 释放的方法错误&lt;BR&gt;例如：把指针加入诸如CArray之类的集合对象中，释放时应该首先通过delete操作删除指针指向的对象，然后才能去调用诸如RemoveAll函数去释放集合中的指针。单纯析构诸如CArray之类的对象，不会自动释放它所包含的指针所指向的对象。&lt;BR&gt;&lt;BR&gt;c) 析构函数错误：如果你对象中包含指针，那么你析构函数需要正确的释放这些指针。如果你析构函数不做这些，就会有内存泄漏&lt;BR&gt;d) 线程问题：如果线程被你通过TerminateThread中止，那么它所分配的对象一般不会有机会被释放。这是那些喜欢在线程外中止线程的人经常遇到的问题。&lt;BR&gt;&lt;BR&gt;&lt;img src ="http://blog.vckbase.com/arong/aggbug/27060.html" width = "1" height = "1" /&gt;</description></item><item><dc:creator>馨荣家园</dc:creator><title>盖茨的毕业演说？</title><link>http://blog.vckbase.com/arong/archive/2007/06/08/26822.html</link><pubDate>Fri, 08 Jun 2007 05:11:00 GMT</pubDate><guid>http://blog.vckbase.com/arong/archive/2007/06/08/26822.html</guid><wfw:comment>http://blog.vckbase.com/arong/comments/26822.html</wfw:comment><comments>http://blog.vckbase.com/arong/archive/2007/06/08/26822.html#Feedback</comments><slash:comments>5</slash:comments><wfw:commentRss>http://blog.vckbase.com/arong/comments/commentRss/26822.html</wfw:commentRss><trackback:ping>http://blog.vckbase.com/arong/services/trackbacks/26822.html</trackback:ping><description>&lt;P&gt;&lt;A href="http://www.news.harvard.edu/gazette/2007/06.14/99-gates.html"&gt;http://www.news.harvard.edu/gazette/2007/06.14/99-gates.html&lt;/A&gt;（我翻译的，要是不准确不要责怪，还没有翻译完）&lt;BR&gt;President Bok, former President Rudenstine, incoming President Faust, members of the Harvard Corporation and the Board of Overseers, members of the faculty, parents, and especially, the graduates&lt;BR&gt;校长Bok,前校长Rudenstine和即将就任的新校长Faust,哈佛及全球董事会的董事们，教工们，父母们，尤其是毕业生们，&lt;/P&gt;
&lt;P&gt;I&amp;#8217;ve been waiting more than 30 years to say this: &amp;#8220;Dad, I always told you I&amp;#8217;d come back and get my degree.&amp;#8221; &lt;/P&gt;
&lt;P&gt;我一直想向父亲说：&amp;#8220;爸爸，我会回到哈佛并取得学位的&amp;#8221;，我等待这一刻已经30年了。&lt;/P&gt;
&lt;P&gt;I want to thank Harvard for this timely honor. I&amp;#8217;ll be changing my job next year &amp;#8230; and it will be nice to finally have a college degree on my resume. &lt;BR&gt;我想感谢哈佛这一及时的荣誉。我明年就要换工作了，如果我的简历上有一个大学学历，这将非常完美。&lt;/P&gt;
&lt;P&gt;I applaud the graduates today for taking a much more direct route to your degrees. For my part, I&amp;#8217;m just happy that the Crimson has called me &amp;#8220;Harvard&amp;#8217;s most successful dropout.&amp;#8221; I guess that makes me valedictorian of my own special class &amp;#8230; I did the best of everyone who failed. &lt;/P&gt;
&lt;P&gt;我为各位毕业生能更直接的取得学位热烈喝彩。至于我自己，我只能说我非常高兴Crimson说我是&amp;#8220;哈佛退学的学生中混的最好的&amp;#8221;。我估计这是我能代表我这类人致词的原因，大多数人这样做并不怎么成功，而我做到最好了。&lt;BR&gt;&lt;BR&gt;But I also want to be recognized as the guy who got Steve Ballmer to drop out of business school. I&amp;#8217;m a bad influence. That&amp;#8217;s why I was invited to speak at your graduation. If I had spoken at your orientation, fewer of you might be here today. &lt;BR&gt;但是我也被认做是让Steve Ballmer退学的家伙。我造成了恶劣的影响。这是我被邀请来在你们毕业典礼上做演讲的原因。如果我在你们入学典礼上讲的话，你们中的大多数恐怕都不在这了。&lt;/P&gt;
&lt;P&gt;Harvard was just a phenomenal experience for me. Academic life was fascinating. I used to sit in on lots of classes I hadn&amp;#8217;t even signed up for. And dorm life was terrific. I lived up at Radcliffe, in Currier House. There were always lots of people in my dorm room late at night discussing things, because everyone knew I didn&amp;#8217;t worry about getting up in the morning. That&amp;#8217;s how I came to be the leader of the anti-social group. We clung to each other as a way of validating our rejection of all those social people. &lt;BR&gt;哈佛是在我记忆里留下了深刻的印象。大学生活是非常奇妙的。我习惯于坐在许多班级里，有些班级我从来没有登记过。宿舍生活也是非常可怕的。我在Currier House的Radcliffe度过了很多愉快的时光。哪里总是优很多人在我宿舍里待到半夜来讨论事情，因为任何人都知道我不用担心需要早起。这也是导致我成为了反对交际小组的头头。我们坚持自己原则，不太爱和那些爱交际的人打交道。（这段翻译的不好，实在不知道怎么合理翻译）&lt;BR&gt;&lt;BR&gt;Radcliffe was a great place to live. There were more women up there, and most of the guys were science-math types. That combination offered me the best odds, if you know what I mean. This is where I learned the sad lesson that improving your odds doesn&amp;#8217;t guarantee success. &lt;BR&gt;Radcliffe是一个生活的好地方。哪里有很多女人，且大多数人都是学科学、数学之类的科目。如果你理解我的意思，就会知道我在那里显得有点独特。我在那里学习到即使你改掉了自己的特性，也不一定能保证你能获得成功。&lt;/P&gt;
&lt;P&gt;One of my biggest memories of Harvard came in January 1975, when I made a call from Currier House to a company in Albuquerque that had begun making the world&amp;#8217;s first personal computers. I offered to sell them software. &lt;BR&gt;&lt;/P&gt;
&lt;P&gt;让我印象最深的事情发生在1975年1月。那天我从Currier House打电话到Albuquerque的一家公司。该公司制作了世界上第一台个人电脑，而我希望向他们出售软件。&lt;BR&gt;&lt;BR&gt;I worried that they would realize I was just a student in a dorm and hang up on me. Instead they said: &amp;#8220;We&amp;#8217;re not quite ready, come see us in a month,&amp;#8221; which was a good thing, because we hadn&amp;#8217;t written the software yet. From that moment, I worked day and night on this little extra credit project that marked the end of my college education and the beginning of a remarkable journey with Microsoft. &lt;BR&gt;我担心他们认识到我是住在宿舍里的一个学生而挂了我的电话。然而他们说&amp;#8220;我们还没完全准备好，1个月后再和我们联系吧。&amp;#8221;。这个消息对我来说很不错，因为那时我的软件还没有写。从那刻起，我日以继日的做这个给了我额外期限的项目。这个项目最终导致我从哈佛退学，开始了我在微软辉煌的历程。&lt;/P&gt;
&lt;P&gt;What I remember above all about Harvard was being in the midst of so much energy and intelligence. It could be exhilarating, intimidating, sometimes even discouraging, but always challenging. It was an amazing privilege &amp;#8211; and though I left early, I was transformed by my years at Harvard, the friendships I made, and the ideas I worked on. &lt;BR&gt;&lt;/P&gt;
&lt;P&gt;让我记忆尤深的是我生活在一群充满活力和智慧的人中间。这虽然让人感觉愉快，有压力，甚至有时有点让人有点气馁，但是你总会觉得充满了挑战。这是一种让人敬意的特权。尽管我很早就离开了，我还是被我在哈佛的日子、我在这交的朋友和我在研究的东西改变了。&lt;BR&gt;But taking a serious look back &amp;#8230; I do have one big regret. &lt;BR&gt;如果审慎的回顾一下，我还是有个很大的遗憾。&lt;/P&gt;
&lt;P&gt;I left Harvard with no real awareness of the awful inequities in the world &amp;#8211; the appalling disparities of health, and wealth, and opportunity that condemn millions of people to lives of despair. 离开哈佛时，我并不知道世界存在严重的不公正 － 包括健康、财富和机遇方面让人吃惊的不平等使得数百万人生活在绝望中。&lt;/P&gt;
&lt;P&gt;I learned a lot here at Harvard about new ideas in economics and politics. I got great exposure to the advances being made in the sciences. &lt;/P&gt;
&lt;P&gt;But humanity&amp;#8217;s greatest advances are not in its discoveries &amp;#8211; but in how those discoveries are applied to reduce inequity. Whether through democracy, strong public education, quality health care, or broad economic opportunity &amp;#8211; reducing inequity is the highest human achievement. &lt;/P&gt;
&lt;P&gt;I left campus knowing little about the millions of young people cheated out of educational opportunities here in this country. And I knew nothing about the millions of people living in unspeakable poverty and disease in developing countries. &lt;/P&gt;
&lt;P&gt;It took me decades to find out. &lt;/P&gt;
&lt;P&gt;You graduates came to Harvard at a different time. You know more about the world&amp;#8217;s inequities than the classes that came before. In your years here, I hope you&amp;#8217;ve had a chance to think about how &amp;#8211; in this age of accelerating technology &amp;#8211; we can finally take on these inequities, and we can solve them. &lt;/P&gt;
&lt;P&gt;Imagine, just for the sake of discussion, that you had a few hours a week and a few dollars a month to donate to a cause &amp;#8211; and you wanted to spend that time and money where it would have the greatest impact in saving and improving lives. Where would you spend it? &lt;/P&gt;
&lt;P&gt;For Melinda and for me, the challenge is the same: how can we do the most good for the greatest number with the resources we have. &lt;/P&gt;
&lt;P&gt;During our discussions on this question, Melinda and I read an article about the millions of children who were dying every year in poor countries from diseases that we had long ago made harmless in this country. Measles, malaria, pneumonia, hepatitis B, yellow fever. One disease I had never even heard of, rotavirus, was killing half a million kids each year &amp;#8211; none of them in the United States. &lt;/P&gt;
&lt;P&gt;We were shocked. We had just assumed that if millions of children were dying and they could be saved, the world would make it a priority to discover and deliver the medicines to save them. But it did not. For under a dollar, there were interventions that could save lives that just weren&amp;#8217;t being delivered. &lt;/P&gt;
&lt;P&gt;If you believe that every life has equal value, it&amp;#8217;s revolting to learn that some lives are seen as worth saving and others are not. We said to ourselves: &amp;#8220;This can&amp;#8217;t be true. But if it is true, it deserves to be the priority of our giving.&amp;#8221; &lt;/P&gt;
&lt;P&gt;So we began our work in the same way anyone here would begin it. We asked: &amp;#8220;How could the world let these children die?&amp;#8221; &lt;/P&gt;
&lt;P&gt;The answer is simple, and harsh. The market did not reward saving the lives of these children, and governments did not subsidize it. So the children died because their mothers and their fathers had no power in the market and no voice in the system. &lt;/P&gt;
&lt;P&gt;But you and I have both. &lt;/P&gt;
&lt;P&gt;We can make market forces work better for the poor if we can develop a more creative capitalism &amp;#8211; if we can stretch the reach of market forces so that more people can make a profit, or at least make a living, serving people who are suffering from the worst inequities. We also can press governments around the world to spend taxpayer money in ways that better reflect the values of the people who pay the taxes. &lt;/P&gt;
&lt;P&gt;If we can find approaches that meet the needs of the poor in ways that generate profits for business and votes for politicians, we will have found a sustainable way to reduce inequity in the world. This task is open-ended. It can never be finished. But a conscious effort to answer this challenge will change the world. &lt;/P&gt;
&lt;P&gt;I am optimistic that we can do this, but I talk to skeptics who claim there is no hope. They say: &amp;#8220;Inequity has been with us since the beginning, and will be with us till the end &amp;#8211; because people just &amp;#8230; don&amp;#8217;t &amp;#8230; care.&amp;#8221; I completely disagree. &lt;/P&gt;
&lt;P&gt;I believe we have more caring than we know what to do with. &lt;/P&gt;
&lt;P&gt;All of us here in this Yard, at one time or another, have seen human tragedies that broke our hearts, and yet we did nothing &amp;#8211; not because we didn&amp;#8217;t care, but because we didn&amp;#8217;t know what to do. If we had known how to help, we would have acted. &lt;/P&gt;
&lt;P&gt;The barrier to change is not too little caring; it is too much complexity. &lt;/P&gt;
&lt;P&gt;To turn caring into action, we need to see a problem, see a solution, and see the impact. But complexity blocks all three steps. &lt;/P&gt;
&lt;P&gt;Even with the advent of the Internet and 24-hour news, it is still a complex enterprise to get people to truly see the problems. When an airplane crashes, officials immediately call a press conference. They promise to investigate, determine the cause, and prevent similar crashes in the future. &lt;/P&gt;
&lt;P&gt;But if the officials were brutally honest, they would say: &amp;#8220;Of all the people in the world who died today from preventable causes, one half of one percent of them were on this plane. We&amp;#8217;re determined to do everything possible to solve the problem that took the lives of the one half of one percent.&amp;#8221; &lt;/P&gt;
&lt;P&gt;The bigger problem is not the plane crash, but the millions of preventable deaths. &lt;/P&gt;
&lt;P&gt;We don&amp;#8217;t read much about these deaths. The media covers what&amp;#8217;s new &amp;#8211; and millions of people dying is nothing new. So it stays in the background, where it&amp;#8217;s easier to ignore. But even when we do see it or read about it, it&amp;#8217;s difficult to keep our eyes on the problem. It&amp;#8217;s hard to look at suffering if the situation is so complex that we don&amp;#8217;t know how to help. And so we look away. &lt;/P&gt;
&lt;P&gt;If we can really see a problem, which is the first step, we come to the second step: cutting through the complexity to find a solution. &lt;/P&gt;
&lt;P&gt;Finding solutions is essential if we want to make the most of our caring. If we have clear and proven answers anytime an organization or individual asks &amp;#8220;How can I help?,&amp;#8221; then we can get action &amp;#8211; and we can make sure that none of the caring in the world is wasted. But complexity makes it hard to mark a path of action for everyone who cares &amp;#8212; and that makes it hard for their caring to matter. &lt;/P&gt;
&lt;P&gt;Cutting through complexity to find a solution runs through four predictable stages: determine a goal, find the highest-leverage approach, discover the ideal technology for that approach, and in the meantime, make the smartest application of the technology that you already have &amp;#8212; whether it&amp;#8217;s something sophisticated, like a drug, or something simpler, like a bednet. &lt;/P&gt;
&lt;P&gt;The AIDS epidemic offers an example. The broad goal, of course, is to end the disease. The highest-leverage approach is prevention. The ideal technology would be a vaccine that gives lifetime immunity with a single dose. So governments, drug companies, and foundations fund vaccine research. But their work is likely to take more than a decade, so in the meantime, we have to work with what we have in hand &amp;#8211; and the best prevention approach we have now is getting people to avoid risky behavior. &lt;/P&gt;
&lt;P&gt;Pursuing that goal starts the four-step cycle again. This is the pattern. The crucial thing is to never stop thinking and working &amp;#8211; and never do what we did with malaria and tuberculosis in the 20th century &amp;#8211; which is to surrender to complexity and quit. &lt;/P&gt;
&lt;P&gt;The final step &amp;#8211; after seeing the problem and finding an approach &amp;#8211; is to measure the impact of your work and share your successes and failures so that others learn from your efforts. &lt;/P&gt;
&lt;P&gt;You have to have the statistics, of course. You have to be able to show that a program is vaccinating millions more children. You have to be able to show a decline in the number of children dying from these diseases. This is essential not just to improve the program, but also to help draw more investment from business and government. &lt;/P&gt;
&lt;P&gt;But if you want to inspire people to participate, you have to show more than numbers; you have to convey the human impact of the work &amp;#8211; so people can feel what saving a life means to the families affected. &lt;/P&gt;
&lt;P&gt;I remember going to Davos some years back and sitting on a global health panel that was discussing ways to save millions of lives. Millions! Think of the thrill of saving just one person&amp;#8217;s life &amp;#8211; then multiply that by millions. &amp;#8230; Yet this was the most boring panel I&amp;#8217;ve ever been on &amp;#8211; ever. So boring even I couldn&amp;#8217;t bear it. &lt;/P&gt;
&lt;P&gt;What made that experience especially striking was that I had just come from an event where we were introducing version 13 of some piece of software, and we had people jumping and shouting with excitement. I love getting people excited about software &amp;#8211; but why can&amp;#8217;t we generate even more excitement for saving lives? &lt;/P&gt;
&lt;P&gt;You can&amp;#8217;t get people excited unless you can help them see and feel the impact. And how you do that &amp;#8211; is a complex question. &lt;/P&gt;
&lt;P&gt;Still, I&amp;#8217;m optimistic. Yes, inequity has been with us forever, but the new tools we have to cut through complexity have not been with us forever. They are new &amp;#8211; they can help us make the most of our caring &amp;#8211; and that&amp;#8217;s why the future can be different from the past. &lt;/P&gt;
&lt;P&gt;The defining and ongoing innovations of this age &amp;#8211; biotechnology, the computer, the Internet &amp;#8211; give us a chance we&amp;#8217;ve never had before to end extreme poverty and end death from preventable disease. &lt;/P&gt;
&lt;P&gt;Sixty years ago, George Marshall came to this commencement and announced a plan to assist the nations of post-war Europe. He said: &amp;#8220;I think one difficulty is that the problem is one of such enormous complexity that the very mass of facts presented to the public by press and radio make it exceedingly difficult for the man in the street to reach a clear appraisement of the situation. It is virtually impossible at this distance to grasp at all the real significance of the situation.&amp;#8221; &lt;/P&gt;
&lt;P&gt;Thirty years after Marshall made his address, as my class graduated without me, technology was emerging that would make the world smaller, more open, more visible, less distant. &lt;/P&gt;
&lt;P&gt;The emergence of low-cost personal computers gave rise to a powerful network that has transformed opportunities for learning and communicating. &lt;/P&gt;
&lt;P&gt;The magical thing about this network is not just that it collapses distance and makes everyone your neighbor. It also dramatically increases the number of brilliant minds we can have working together on the same problem &amp;#8211; and that scales up the rate of innovation to a staggering degree. &lt;/P&gt;
&lt;P&gt;At the same time, for every person in the world who has access to this technology, five people don&amp;#8217;t. That means many creative minds are left out of this discussion -- smart people with practical intelligence and relevant experience who don&amp;#8217;t have the technology to hone their talents or contribute their ideas to the world. &lt;/P&gt;
&lt;P&gt;We need as many people as possible to have access to this technology, because these advances are triggering a revolution in what human beings can do for one another. They are making it possible not just for national governments, but for universities, corporations, smaller organizations, and even individuals to see problems, see approaches, and measure the impact of their efforts to address the hunger, poverty, and desperation George Marshall spoke of 60 years ago. &lt;/P&gt;
&lt;P&gt;Members of the Harvard Family: Here in the Yard is one of the great collections of intellectual talent in the world. &lt;/P&gt;
&lt;P&gt;What for? &lt;/P&gt;
&lt;P&gt;There is no question that the faculty, the alumni, the students, and the benefactors of Harvard have used their power to improve the lives of people here and around the world. But can we do more? Can Harvard dedicate its intellect to improving the lives of people who will never even hear its name? &lt;/P&gt;
&lt;P&gt;Let me make a request of the deans and the professors &amp;#8211; the intellectual leaders here at Harvard: As you hire new faculty, award tenure, review curriculum, and determine degree requirements, please ask yourselves: &lt;/P&gt;
&lt;P&gt;Should our best minds be dedicated to solving our biggest problems? &lt;/P&gt;
&lt;P&gt;Should Harvard encourage its faculty to take on the world&amp;#8217;s worst inequities? Should Harvard students learn about the depth of global poverty &amp;#8230; the prevalence of world hunger &amp;#8230; the scarcity of clean water &amp;#8230;the girls kept out of school &amp;#8230; the children who die from diseases we can cure? &lt;/P&gt;
&lt;P&gt;Should the world&amp;#8217;s most privileged people learn about the lives of the world&amp;#8217;s least privileged? &lt;/P&gt;
&lt;P&gt;These are not rhetorical questions &amp;#8211; you will answer with your policies. &lt;/P&gt;
&lt;P&gt;My mother, who was filled with pride the day I was admitted here &amp;#8211; never stopped pressing me to do more for others. A few days before my wedding, she hosted a bridal event, at which she read aloud a letter about marriage that she had written to Melinda. My mother was very ill with cancer at the time, but she saw one more opportunity to deliver her message, and at the close of the letter she said: &amp;#8220;From those to whom much is given, much is expected.&amp;#8221; &lt;/P&gt;
&lt;P&gt;When you consider what those of us here in this Yard have been given &amp;#8211; in talent, privilege, and opportunity &amp;#8211; there is almost no limit to what the world has a right to expect from us. &lt;/P&gt;
&lt;P&gt;In line with the promise of this age, I want to exhort each of the graduates here to take on an issue &amp;#8211; a complex problem, a deep inequity, and become a specialist on it. If you make it the focus of your career, that would be phenomenal. But you don&amp;#8217;t have to do that to make an impact. For a few hours every week, you can use the growing power of the Internet to get informed, find others with the same interests, see the barriers, and find ways to cut through them. &lt;/P&gt;
&lt;P&gt;Don&amp;#8217;t let complexity stop you. Be activists. Take on the big inequities. It will be one of the great experiences of your lives. &lt;/P&gt;
&lt;P&gt;You graduates are coming of age in an amazing time. As you leave Harvard, you have technology that members of my class never had. You have awareness of global inequity, which we did not have. And with that awareness, you likely also have an informed conscience that will torment you if you abandon these people whose lives you could change with very little effort. You have more than we had; you must start sooner, and carry on longer. &lt;/P&gt;
&lt;P&gt;Knowing what you know, how could you not? &lt;/P&gt;
&lt;P&gt;And I hope you will come back here to Harvard 30 years from now and reflect on what you have done with your talent and your energy. I hope you will judge yourselves not on your professional accomplishments alone, but also on how well you have addressed the world&amp;#8217;s deepest inequities &amp;#8230; on how well you treated people a world away who have nothing in common with you but their humanity. &lt;/P&gt;
&lt;P&gt;Good luck. &lt;/P&gt;&lt;img src ="http://blog.vckbase.com/arong/aggbug/26822.html" width = "1" height = "1" /&gt;</description></item><item><dc:creator>馨荣家园</dc:creator><title>基类定义了operator new，派生类有什么需求</title><link>http://blog.vckbase.com/arong/archive/2007/04/29/25884.html</link><pubDate>Sun, 29 Apr 2007 14:33:00 GMT</pubDate><guid>http://blog.vckbase.com/arong/archive/2007/04/29/25884.html</guid><wfw:comment>http://blog.vckbase.com/arong/comments/25884.html</wfw:comment><comments>http://blog.vckbase.com/arong/archive/2007/04/29/25884.html#Feedback</comments><slash:comments>8</slash:comments><wfw:commentRss>http://blog.vckbase.com/arong/comments/commentRss/25884.html</wfw:commentRss><trackback:ping>http://blog.vckbase.com/arong/services/trackbacks/25884.html</trackback:ping><description>&lt;P&gt;一般而言，如果基类定义了operator new，那么派生类也必须对应定义。&lt;BR&gt;考虑下面的两个类&lt;BR&gt;char * pAddress;&lt;BR&gt;class CBase&lt;BR&gt;{&lt;BR&gt;public:&lt;BR&gt;&amp;nbsp;static void* operator new(size_t size){return pAddress;};&lt;BR&gt;&amp;nbsp;static void operator delete(void * p){};&lt;BR&gt;};&lt;/P&gt;
&lt;P&gt;class CDerive:public CBase&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;char buffer[1024];&lt;BR&gt;public:&lt;BR&gt;&amp;nbsp;CDerive()&lt;BR&gt;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;for(int i=0; i &amp;lt; 1024; i ++)&lt;BR&gt;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;buffer[i] = i %26 + 'a';&lt;BR&gt;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;}&lt;BR&gt;};&lt;BR&gt;当调用CDerive * p = new CDerive时，编译器首先尝试匹配该类自己的new，由于没有，编译器就尝试匹配在其祖先链上的new,于是调用CBase::operator new&lt;BR&gt;但是基类其实不知道派生类任何信息，它仅仅根据CBase处理，因此构造了一个错误的类对象。&lt;/P&gt;
&lt;P&gt;下面是我的测试代码，你可以发现在delete时程序报告p2指针被破坏，这就是因为CDerive得不到自己的1024字节内容，因此覆盖了后面的内容&lt;/P&gt;
&lt;P&gt;void test()&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;char *p1, * p2;&lt;BR&gt;&amp;nbsp;p1 = new char[10];&lt;BR&gt;&amp;nbsp;memset(p1,0,10);&lt;BR&gt;&amp;nbsp;pAddress = new char[sizeof(CBase)];&lt;BR&gt;&amp;nbsp;p2 = new char[10];&lt;BR&gt;&amp;nbsp;memset(p2,0,10);&lt;BR&gt;&amp;nbsp;CDerive *pDerive = new CDerive;&lt;BR&gt;&amp;nbsp;TRACE(_T("%p\n"),pDerive);&lt;BR&gt;&amp;nbsp;delete p1;&lt;BR&gt;&amp;nbsp;delete p2;&lt;BR&gt;&amp;nbsp;delete pAddress;&lt;BR&gt;&amp;nbsp;&lt;BR&gt;}&lt;BR&gt;&lt;/P&gt;&lt;img src ="http://blog.vckbase.com/arong/aggbug/25884.html" width = "1" height = "1" /&gt;</description></item><item><dc:creator>馨荣家园</dc:creator><title>我的面试经历　－　给一些初学者</title><link>http://blog.vckbase.com/arong/archive/2007/04/11/25403.html</link><pubDate>Wed, 11 Apr 2007 11:12:00 GMT</pubDate><guid>http://blog.vckbase.com/arong/archive/2007/04/11/25403.html</guid><wfw:comment>http://blog.vckbase.com/arong/comments/25403.html</wfw:comment><comments>http://blog.vckbase.com/arong/archive/2007/04/11/25403.html#Feedback</comments><slash:comments>13</slash:comments><wfw:commentRss>http://blog.vckbase.com/arong/comments/commentRss/25403.html</wfw:commentRss><trackback:ping>http://blog.vckbase.com/arong/services/trackbacks/25403.html</trackback:ping><description>&lt;P&gt;前一阵子,我申请部门内部调动,被其他部门的人面试了一次,面试官让我写一段代码来对一个整形数组排序,我写了下面一段代码&lt;BR&gt;#define SWAP(a,b) do {\&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; a = a +b;\&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; b = a - b;\&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; a = a - b;\&lt;BR&gt;}while(0)&lt;BR&gt;void sort(int number, int vData[])&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; int ii, jj;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for(ii=0; ii &amp;lt; number ; ii++)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for(jj=ii+1; jj &amp;lt; number ; jj ++)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(vData[ii] &amp;gt; vData[jj])&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;SWAP(vData[ii], vData[jj]);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;}&lt;BR&gt;&lt;BR&gt;面试官让我优化一下代码,我又写出下面代码:&lt;BR&gt;#define SWAP(a,b) do {\&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; a = a +b;\&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; b = a - b;\&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; a = a - b;\&lt;BR&gt;}while(0)&lt;BR&gt;void sort(int number, int vData[])&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; int ii, jj;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; int min;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for(ii=0; ii &amp;lt; number ; ii++)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; min = ii;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for(jj=ii+1; jj &amp;lt; number ; jj ++)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(vData[min] &amp;gt; vData[jj])&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;min = jj;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(min != ii)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;SWAP(vData[min],vData[ii]);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;}&lt;/P&gt;
&lt;P&gt;面试官说能不能再优化一下.其实那时候我已经一脑糨糊,啥快速排序算法啊都不会,只好对面试官说不行了.&lt;BR&gt;面试官指着我那段宏说:你如果用一个中间变量进行交换,会减少很多计算,对于大的排序可以优化很多.&lt;BR&gt;&lt;BR&gt;感言:看起来神奇而水平高的算法不一定实用,要考虑算法的实用性.&lt;/P&gt;&lt;img src ="http://blog.vckbase.com/arong/aggbug/25403.html" width = "1" height = "1" /&gt;</description></item><item><dc:creator>馨荣家园</dc:creator><title>15天看好大三阳 － 甘肃电视台坐诊医生是否该发诺贝尔奖了？</title><link>http://blog.vckbase.com/arong/archive/2006/09/23/22510.html</link><pubDate>Sat, 23 Sep 2006 15:50:00 GMT</pubDate><guid>http://blog.vckbase.com/arong/archive/2006/09/23/22510.html</guid><wfw:comment>http://blog.vckbase.com/arong/comments/22510.html</wfw:comment><comments>http://blog.vckbase.com/arong/archive/2006/09/23/22510.html#Feedback</comments><slash:comments>6</slash:comments><wfw:commentRss>http://blog.vckbase.com/arong/comments/commentRss/22510.html</wfw:commentRss><trackback:ping>http://blog.vckbase.com/arong/services/trackbacks/22510.html</trackback:ping><description>今天下午五点无聊的拿遥控器换台，突然发现甘肃电视台正在有名家坐诊用&amp;#8220;五联疗法&amp;#8221;治疗大三阳。我听了几分钟，大意如下：&lt;BR&gt;&lt;BR&gt;黄主任：以前治好大三阳需要2－3个月就已经很快了，没想到技术发展的这么快，现在15天就可以治愈了。......&lt;BR&gt;&lt;BR&gt;曾主任：我们医院是卫生部....的医院，医生......，护士.....，所以患者放心前来就诊。&lt;BR&gt;&lt;BR&gt;在我记忆中，大三阳是很难治的，怎么这位黄医生2－3个月治好还嫌慢？现在半个月就好了？我感冒还得一星期才好，怎么肝病原来这么容易治啊？&lt;BR&gt;&lt;BR&gt;到网上一查大三阳，第一个帖子就是说&amp;#8220;&lt;FONT size=2&gt;中国中医研究院专家提醒患者：可以使&lt;FONT color=#c60a00&gt;大三阳&lt;/FONT&gt;和小三阳都转阴就是一个骗局&amp;#8221;，看来这个黄主任看来也是属于这个范畴得。老实说，我不怎么懂医学，但是大体我比较相信说黄某是骗子是肯定错不了。这篇文章似乎有介绍这是骗局得：&lt;A href="http://www.zhongke.com/liver/006.htm"&gt;http://www.zhongke.com/liver/006.htm&lt;/A&gt;。&lt;BR&gt;&lt;BR&gt;查查五联疗法：&lt;BR&gt;下面网站提到这种疗法，同一页面上说乙肝3、5年内才可能提治疗：&lt;A href="http://www.renai.cn/zhongyi/ganbing/"&gt;http://www.renai.cn/zhongyi/ganbing/&lt;/A&gt;&lt;BR&gt;下面网站介绍是仁爱医院提出这种方法，乙肝转阴不是梦，但是目前没有有效治疗方法，只能使病毒DNA转阴（和肝病转阴有关否？）&lt;A href="http://www.ccgs120.com/yfbj/news.jsp?info_id=10068"&gt;http://www.ccgs120.com/yfbj/news.jsp?info_id=10068&lt;/A&gt;&lt;BR&gt;&lt;BR&gt;看来：15天治好，只能如那位黄主任的话解释&amp;#8220;一般15天能治好，多的也要2、3个月。当然有些人可能需要更长的时间，这就是所谓个体差异，有的人按时吃药，体质比较好，当然就快一些。有些人你问他，&amp;#8216;哦，昨天我去蹦的了，忘吃药了&amp;#8217;，这样今天吃明天忘后天再吃，当然就慢一些（注意，不是不好，只是慢一点）&amp;#8221;。我恐怕这种个体差异是100个中有0.00000001个治好，其他都差异了。真奇怪甘肃怎么还允许这种片子上电视台反复的造！&lt;BR&gt;&lt;BR&gt;PS:留的三个联系电话，2个北京，一个上海。本地不敢做广告，跑甘肃去，反正你被骗了也不能花很大代价到北京上海找我。&lt;/FONT&gt;&lt;img src ="http://blog.vckbase.com/arong/aggbug/22510.html" width = "1" height = "1" /&gt;</description></item><item><dc:creator>馨荣家园</dc:creator><title>汇款失败也收手续费 － 记我在招商银行的一次失败的维权经历</title><link>http://blog.vckbase.com/arong/archive/2006/09/17/22434.html</link><pubDate>Sat, 16 Sep 2006 16:34:00 GMT</pubDate><guid>http://blog.vckbase.com/arong/archive/2006/09/17/22434.html</guid><wfw:comment>http://blog.vckbase.com/arong/comments/22434.html</wfw:comment><comments>http://blog.vckbase.com/arong/archive/2006/09/17/22434.html#Feedback</comments><slash:comments>9</slash:comments><wfw:commentRss>http://blog.vckbase.com/arong/comments/commentRss/22434.html</wfw:commentRss><trackback:ping>http://blog.vckbase.com/arong/services/trackbacks/22434.html</trackback:ping><description>日前，我从我招行帐户向外地汇出一笔钱。两三天以后，对方仍然没有受到钱。由于招行声称最多5天到帐，倒也没有当回事情。但是一周过去后，才发现对方根本没有收到钱。连到招行专业版，发现我的存款记录中多了一条&amp;#8220;退转帐汇款本金&amp;#8221;，时间是汇款后的第四天。&lt;BR&gt;&lt;BR&gt;从这个记录中，我注意到招商银行专业版一来没有注明我的钱为什么没汇成功，二来没有把我汇款的手续费也退回来。我于是拨95555去问。95555在经过复杂的自动应答后，终于把我电话转到人工台。可是那天我等了3分钟，也没有人接电话。我以为周末他们不值班，就给他们发了封邮件，希望他们解释这两个问题。后来问了一下，第一：他们24小时有人值班，但是不知道为什么那天我的电话没人接。第二，目前他们还没有回我邮件，看来也没把我的问题当回事情。&lt;BR&gt;&lt;BR&gt;我以为我帐户写错了，特意打电话到对方，让他们把帐户用短信再发一遍。可是我对着我的汇款记录检查了好几遍，依然是帐户没错啊？&lt;BR&gt;&lt;BR&gt;我选工作时间再拨95555，询问两个问题：&lt;BR&gt;&lt;BR&gt;1。汇款为什么没汇出&lt;BR&gt;招商银行的回答是：对方银行退款原因是无效帐户。&lt;BR&gt;&lt;BR&gt;2。为什么手续费没有退&lt;BR&gt;我本来以为这只是系统一个失误，问之后退给我就好了。对方的回答让我很惊讶：因为我们提供了服务，所以要收费啊。&lt;BR&gt;&lt;BR&gt;我就问：失败的服务也收费？（后面具体话是不记得了，但是大意不会错，后面问代表是我的问话，答是银行服务员答复）&lt;BR&gt;答：这是你账号填错了，又不是我们银行的错误啊？&lt;BR&gt;问：但是服务没有成功，服务费当然应该退啊？&lt;BR&gt;答：在跨行汇款时，我们中有人工参与，做了事情当然应该收钱&lt;BR&gt;问：不是电子系统处理么？&lt;BR&gt;答：在汇款之前，首先要有人工验核，然后再发到人行，人行转到x行，这手续费是三家分的，不是招行一家收钱&lt;BR&gt;问：我不管谁分，只知道是你收的，不管怎么说，你的服务不成功，你就应该给我退钱。&lt;BR&gt;答：但是这是你填错帐户，不是银行的过错&lt;BR&gt;问：要是我查询后发现帐户没错，你是不是就退钱？&lt;BR&gt;答：如果你查出没错，你可以找我，我工号是xxxx（我想，我本来就是查过后才问你的，我用什么方法证明我帐户没错啊？难道让对方把他存折复印给我？）&lt;BR&gt;&lt;BR&gt;后面还有一堆对话，不过似乎我和她都很激动，我就让他们经理给我打回电，她说没法保证时间，我说ok，反正有电话打过来就行。顺便问一句为什么我邮件没人回：她说电话和邮件答复系统不是一家，她不知道。&lt;BR&gt;&lt;BR&gt;一天以后，招行打我手机，再和我讨论：&lt;BR&gt;招行：我是招行的&lt;BR&gt;我：我对这个收费不退不理解，希望你们退回手续费&lt;BR&gt;招行：不理解没有办法，我这只能给你解释&lt;BR&gt;我：服务不成功为什么收费&lt;BR&gt;招行：因为你帐户错了&lt;BR&gt;我：但是我查过了，肯定对的&lt;BR&gt;招行：你是怎么填的？&lt;BR&gt;我：我就填四川省成都市工商银行xxxx帐户及户名啊&lt;BR&gt;招行：成都市工商银行写的太泛，这样没法转帐&lt;BR&gt;后面我们就各自找例子证明自己的话有理，最终由于她只解释不处理，实在谈不下去，而且我的手机费＋电话费估计也超过能获得的退款了，只好挂机了事。&lt;BR&gt;&lt;BR&gt;事后想想，觉得银行实在是座大山，咱们实在撼她不动。其实她有明显的错误，罗列如下：&lt;BR&gt;1。她说我帐户错误是因为我没有详细到具体开户行（估计要到某某营业所了）&lt;BR&gt;这种说辞是站不住脚的。其实帐户号码＋用户名已经足够定位到具体帐户。就如同我们打招行电话，她也只要我报帐户和密码，从来没有说在哪个营业点挂的号。&lt;BR&gt;&lt;BR&gt;2。按照一般人的理解，我的填法应该就对了。如果你银行有特殊要求，你必须事先说明，但是我查遍了专业版所有页面，也没看到谁提示我必须具体到哪个开户营业网点。&lt;BR&gt;&lt;BR&gt;3。招行没商量&lt;BR&gt;我们手机收费很快就不能没商量了，但是招商银行客服第一句就是只能给你解释，不能退钱。不知道什么时候&amp;#8220;不能没商量&amp;#8221;&lt;BR&gt;&lt;BR&gt;4。遇到银行收错钱，如果不是错的离谱，还是别维权了。一来你是弱势群体，维权也是白搭，二来，你维权的费用估计也足以抵消你能收回的钱了&lt;BR&gt;&lt;BR&gt;5。汇钱前要注意问清具体要求，别象我一样这么白送手续费了。&lt;BR&gt;&lt;BR&gt;唉，真是&lt;BR&gt;&lt;BR&gt;服务收费本应当&lt;BR&gt;失败退钱更合情&lt;BR&gt;只想收钱不退钱&lt;BR&gt;储户心里很受伤&lt;BR&gt;&lt;img src ="http://blog.vckbase.com/arong/aggbug/22434.html" width = "1" height = "1" /&gt;</description></item><item><dc:creator>馨荣家园</dc:creator><title>如何创建资源dll，让自己程序能适应不同语言环境</title><link>http://blog.vckbase.com/arong/archive/2006/05/24/20295.html</link><pubDate>Wed, 24 May 2006 14:00:00 GMT</pubDate><guid>http://blog.vckbase.com/arong/archive/2006/05/24/20295.html</guid><wfw:comment>http://blog.vckbase.com/arong/comments/20295.html</wfw:comment><comments>http://blog.vckbase.com/arong/archive/2006/05/24/20295.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.vckbase.com/arong/comments/commentRss/20295.html</wfw:commentRss><trackback:ping>http://blog.vckbase.com/arong/services/trackbacks/20295.html</trackback:ping><description>&lt;A href="http://spaces.msn.com/ronaldyan/blog/cns!FA58BC446FBB14B9!107.entry"&gt;http://spaces.msn.com/ronaldyan/blog/cns!FA58BC446FBB14B9!107.entry&lt;/A&gt;&lt;img src ="http://blog.vckbase.com/arong/aggbug/20295.html" width = "1" height = "1" /&gt;</description></item><item><dc:creator>馨荣家园</dc:creator><title>调试之编程准备</title><link>http://blog.vckbase.com/arong/archive/2005/12/07/15725.html</link><pubDate>Wed, 07 Dec 2005 14:12:00 GMT</pubDate><guid>http://blog.vckbase.com/arong/archive/2005/12/07/15725.html</guid><wfw:comment>http://blog.vckbase.com/arong/comments/15725.html</wfw:comment><comments>http://blog.vckbase.com/arong/archive/2005/12/07/15725.html#Feedback</comments><slash:comments>4</slash:comments><wfw:commentRss>http://blog.vckbase.com/arong/comments/commentRss/15725.html</wfw:commentRss><trackback:ping>http://blog.vckbase.com/arong/services/trackbacks/15725.html</trackback:ping><description>&lt;P&gt;对于一个程序员而言，学习一种语言和一种算法是非常容易的（不包括那些上学花很多时间玩，上班说学习没时间的人）。但是，任何程序都可能是有瑕疵的，尤其有过团队协作编程经验的人，对这个感触尤为深刻。&lt;P&gt;&lt;/P&gt;在我前面的述及调试的文章里，我侧重于VC集成环境中的一些设置信息和调试所需要的一些基本技巧。但是，仅仅知道这些是不够的。一个成功的调试的开端是编程中的准备。&lt;/P&gt;
&lt;h2&gt;分离错误&lt;/h2&gt;
&lt;P&gt;很多程序员喜欢写下面这样的式子：
&lt;PRE&gt;
   CLeftView* pView =
     ((CFrameWnd*)AfxGetApp()-&gt;m_pMainWnd)-&gt;m_wndSplitterWnd.GetPane(0,0);
&lt;/PRE&gt;
&lt;P&gt;如果一切顺利，这样的式子当然是没什么问题。但是作为一个程序员，你应该时刻记得任何一个调用在某些特殊的情况下都可能失败，一旦上面某个式子失败，那么整个级联式就会出问题，而你很难弄清楚到底哪儿出错了。这样的式子的结果往往是：省了2分钟编码的时间，多了几星期的调试时间。
&lt;P&gt;对于上面的式子，应该尽可能的把式子分解成独立的函数调用，这样我们可以随时确定是哪个函数调用出问题，进口缩小需要检查的范围。

&lt;h2&gt;检查返回值&lt;/h2&gt;
&lt;P&gt;检查返回值对于许多编程者来说似乎是一个很麻烦的事情。但是如果你能在每个可能出错的函数调用处都检查返回值，就可以立刻知道出错的函数。
&lt;P&gt;有些人已经意识到检查返回值的重要性，但是要记住，只检查函数是否失败是不够的，我们需要知道函数失败的确切原因。例如下面的代码：
&lt;PRE&gt;
if(connect(sock, (const sockaddr*)&amp;amp;addr,sizeof(addr)) == SOCKET_ERROR)
{
         AfxMessageBox("connect failed");
}
&lt;/PRE&gt;
&lt;P&gt;尽管这里已经检查了返回值，实际上没有多少帮助。正如很多在vckbase上提问的人一样，大概这时候只能喊&amp;#8220;为什么连接失败啊？&amp;#8221;。这种情况下，其实只能猜测失败的原因，即使高手，也无法准确说出失败的原因。
&lt;h2&gt;增加诊断信息&lt;/h2&gt;
&lt;P&gt;在知道错误的情况下，应该尽可能的告诉测试、使用者更多的信息，这样才能了解导致失败的原因。如果程序员能提供如下错误信息，对于诊断错误是非常有帮助的：
&lt;ol type =1&gt;
&lt;li&gt;出错的文件：我们可以借助宏THIS_FILE和__FILE__。注意THIS_FILE是在cpp文件手工定义的，而__FILE__是编译器定义的。当记录错误的函数定义在.h中时，有时候用THIS_FILE更好，因为他能说明在哪个cpp中调用并导致失败的。
&lt;li&gt;出错的行：我们可以借助宏__LINE__
&lt;li&gt;出错的函数：如果设计的好，有以上两项已经足够。当然我们可以直接打印出出错的函数或者表达式，这样在大堆代码中搜索（尤其是不支持go to line的编辑器中）还是很有用的。大家可以参见我的文章&lt;A href="http://blog.vckbase.com/arong/archive/2005/11/10/14704.html"&gt;http://blog.vckbase.com/arong/archive/2005/11/10/14704.html&lt;/a&gt;中的方式进行处理，也许是一个基本的开端。
&lt;li&gt;出错的原因：出错的原因很多只能由程序自己给出。如果出错只会问别人，那么你永远不可能成为一个合格的程序设计人员。很多函数失败时都会设置errno。我们可以用GetLastError获得错误码，并通过FormatMessage打印出具体错误的文字描述。
&lt;/ol&gt;
&lt;h2&gt;终了&lt;/h2&gt;
&lt;B&gt;给初学者一个忠告：编程时麻烦10分钟，调试时省却数小时&lt;/B&gt;，要想省时间，还是要从代码的可重用性和可维护性上下功夫，而不是两个代码上节省。&lt;img src ="http://blog.vckbase.com/arong/aggbug/15725.html" width = "1" height = "1" /&gt;</description></item></channel></rss>