随笔分类 - Tips
摘要:问题:在项目开发中,试图把类的非static成员函数的指针赋值给普通函数指针变量(前提当然是函数定义是一样的),结果编译不过。原因:类的非static成员函数包含一个隐含的this指针。在某些calling convention下,this指针作为函数的附加参数入栈,相当于多了一个参数传入。另一个更通用的解释是:非static的成员函数指针的定义和调用都需要指明作用到哪个类/具体对象上,明显与一般函数指针的定义和调用是不兼容的。我的理解是非static的成员函数指针只是一个offset,因此需要在获取对象指针的基础上进行函数调用才行。类的静态成员函数采用与一般函数指针相同的调用方式,而受thi
阅读全文
摘要:基本上只需要设置一个环境变量P4PASSWD,赋值为你的P4密码,不过是明文的。为了安全,你也可以选择MD5 HASH作为赋值。找个online的md5 hash tool=》md5字符串的字母转为大写=》赋值到环境变量。Refer to:http://kb.perforce.com/article/618
阅读全文
摘要:转自:http://blog.csdn.net/zzj227/archive/2009/06/24/4294227.aspxWindows批处理文件 【 一、什么是批处理 】 批处理(Batch),也称为批处理脚本。顾名思义,批处理就是对某对象进行批量的处理。批处理文件的扩展名为 bat 。 目前比较常见 的批处理包含两类:DOS批处理和PS批处理。PS批处理是基于强大的图片编辑软件Photoshop的,用来批量处理图片的脚本;而DOS批处理则是基 于DOS命令的,用来自动地批量地执行DOS命令以实现特定操作的脚本。这里要讲的就是DOS批处理。 批处理是一种简化的脚本语言,它应用于DOS和W.
阅读全文
摘要:项目中碰到一个问题:所依赖的ObjectARX升级新版本之后,所用到的一些原本从acad.lib中导出的函数现在在新版本的acad.lib中找不见了。那那些函数现在从哪个lib文件导出呢?ObjectARX里包了一堆的lib文件。当然,一个比较简单并且比较有道理的做法是:根据lib文件的名字选择那些可能包含这些函数的lib文件用dumpbin导出其export table到文件中然后搜索是否包含有所需要的文件。我的思路也是先这么干的。结果啥都没找到。那就来绝的:遍历所有的lib文件,把每个的export table都写到一个文件中去,然后在其中查找所需要的函数。做法:1. 一个bat文件只包.
阅读全文
摘要:Corp always has its CER system which is to work as a central platform for handling customer error reports. Some understanding about it:1. When user sent a CER report on his machine, such report will be sent to CER system and either join in an existing bucket or a new created bucket based on its call
阅读全文
摘要:Basically, you have two choices: dependency walker and GFlags from MS.Tips about using dependency walker to find missed/failed to load dependency modules:1. Run application.bat and execute depends.exe there to consume your application's environment settings especially about PATH setting for sear
阅读全文
摘要:We are used to convert string to int/double by CRT provided functions, 数值和字符串相互转换(C++ 数据类型转换技巧)Actually STL provides more graceful way to do this kind of conversion by istringstream / wistringstream: #include<sstream> using namespace std; double dVal = 0; wistringstream wstrStream(str); wstrSt
阅读全文
摘要:1. Log File is important. I didn't realize its importance until I met a issue that was only reproducible on QA machine and it's hard for me to figure out the reason. I added some code in my project to output some check point status into a log file and post it to QA to use. The generated log
阅读全文
摘要:摘自coolshell想在Visual Studio 2010下编写Python吗?那么,向你介绍这个微软官方的插件Python Tools for Visual Studio。你还可以在VS中调试你的Python代码。挺不错的。 在VS里开发Python,那么就可以使用Eclipse编写Android程序,这里有一篇教程教你 -Get Started Developing For Android With Eclipse, Reloaded 说到了Android,必然要提一提iOS。想学iOS编程吗?这里有一篇教程很不错,如果你是一个什么也不懂的初学者,你不妨看看这篇文章“Build iO.
阅读全文
摘要:摘自coolshell以前向大家介绍过《一些重要的算法》和《算法和数据结构词典》,不过,你知道有些什么样比较奇怪的数据结构吗?wikipedia上的这个词条可以让你看看各种不同的数据结构。比如:Skip lists,Bloom filters,或是什么Dancing links。你也许会像一个以“如何学好C++”中的朋友们所说的,不削于这种所谓的“奇技淫巧”,甚至觉得这太根本不实用。其实,这些东西还是有用的,至少对你开阔思路,活动编程思维能力很有意义。 本站的关于排序的文章有很多,对于排序算法来说,其受到要排序的个数和数据的杂乱程度的影响,我们知道比较稳定的排序算法是快速排序和归并排序,归并.
阅读全文
摘要:In order to support more flexible and powerful message box, MS provides task dialog API (A task dialog is similar to, while much more flexible than, a basic message box), by which we can create customized dialog box by configuration. So in practice, before writing your own, please give it a try whe.
阅读全文
摘要:Unusual memory bit patterns Software development is an intellectual challenge. Sometimes the process is interrupted by software failures and/or crashes. A lot of the time the reason for the failure is self evident and easily fixable. However the reason for some crashes is less obvious and often the
阅读全文
摘要:不要找借口。这一条路走下来并不容易,不要给自己找借口。我最不喜欢听到的就是“很忙,没有时间”这样的借口。 我以前在银行做项目,早9点到晚10点,周一到周六,我一样可以每天抽1个小时来看书和专研,一年下来也能精读5、6本书。我现在的工作项目和招聘任务很 紧张,刚生的小孩只有自己和老婆两人带,还需要准备讲课,但是我还是能够找到时间看文章写文章维护酷壳。所以,我可以告诉你,“时间就像乳沟,只要你肯 挤,就一定会有”。 学好C语言和系统编程。我认为,学好编程有四个方面:语言、算法和数据结构、系统调用和设计。 语言。我可以告诉你C语言有两大主题你要好好学,一个是内存管理,一个是指针!这个世界上90%以上
阅读全文
摘要:VS online gallery is a place where there are plenty of VS extension tools. For me, I don't have time and interests to make full use of it BUT do have make use of one of its greatest tool set: Productivity Power Tools. More info about what it provides, go visit that link..
阅读全文
摘要:Yes, you can build x86 + x64 version of your VS solution in parallel.Steps:1. open your solution to build as debug + x86. No writing to any files, just building.2. open your solution to build as debug + x64. VS now will prompt you to choose another place to store the temp intellisense database (sdf
阅读全文
摘要:One of my c# project refers to a COM module. When I built it on my new machine installed with Win7 x64, it failed to compile correctly. With diagnosis, found out the cause: the com module failed to be registered into Reg (regsvr32 /s xx.dll). I turned off UAC, but still got failure.. until making a
阅读全文
摘要:来自:c++ containers cheat sheet
阅读全文
摘要:这篇blog的意义在于,意识到有cheat sheet的存在并能在需要的时候加以合理使用。程序员的工作,更多的是在需要的时候快速查找到需要的知识点,并在经验的指导下恰当的使用一个从未涉及或用过的toolkit,API或者任何东西。这些cheat sheet就是在这种需求应运而生的东西。先从收藏起 程序员小抄大全 开始。
阅读全文
摘要:如下几点(持续更新中):1. 在分析问题过程中,你会陆陆续续得到很多零散的结论。这些结论的综合会最终帮助你解决掉问题,找到真正的症结。一个好的习惯是:在分析过程中,把得到的这些结论make a list,从而可以更有效的综合把握你的进展情况。2. 在communication过程中,ask question instead of just giving answers, 当然也是可以的。。不要在收到一封mail的时候,老想着一定要给出answer;其实合理发问也是非常有用的推动解决问题的手段。
阅读全文
摘要:windows下,全文件名的字符长度是有限制的,众所周知,是MAX_PATH,260。对于这个,几点具体解释:1. 这个260指的是包含目录到文件名的全路径字符长度。2. 实际上,测试可以发现: --加上null,你在资源管理器里只能创建259个字符的全文件名,即实际上只能创建MAX_PATH -2 = 258字符的路径。 --你可以创建c:\长目录\abc.txt <= 258,也可以创建c:\abc\长文件名.txt <= 258。 --创建每一级目录的时候,可以输入的目录名字符是有限制的,规则就是:至少保留下了 11个字符(8.3规则?)使得最内层目录仍然可以创建出文件
阅读全文

浙公网安备 33010602011771号