Category Archives: 技术文章

Beyond Compare应用技巧之Comparison Rules

Beyond Compare的比较功能比较强大,相信很多程序员来讲,应该相当熟悉了。 它的Comparison Rules功能很强,用以满足各种不同条件下的比较操作。 遇到的问题:当待比较的2个文本文件开头不同,而且这些开头的部分往往不是我们想要关心的不同之处时,我们可以利用BC的Unimportant Text(非重要文本)功能来识别这些字段,并且在实际比较中忽略这些非重要文本。 举例: 如上图所示,两个文件每一行的开头分别是 10和11,比较的时候,会导致BC认为所有的行都有不同,而我们关心的是除了开头部分两个文件是否还有其他的不同。 这种情况下,我们可以编辑当前比较选项(Edit Current Rules…),选择“Importance”标签页,点击“New”添加一个新的Unimportant Text项,类型选择“Regular Expression”正则表达式: ^1\d\t1\d 上面的正则表达式的解释:以 ^表示行的开头, \d表示(0-9)任意一个数字,\t是制表符 (如下图) 这样上面的正则表达式可以匹配如 10(Tab)10****         或者 11(Tab)11**** 点击确定后,BC的比较界面会把匹配识别的 Unimportant Text以蓝色显示。

Visual C++调试时查看数组内容

微软文档原文地址: http://support.microsoft.com/?scid=kb%3Ben-us%3B198953&x=9&y=9 Starting with Visual C++ version 6.0, it is now possible to expand an array pointer to view all array elements in the Visual C++ Debugger Watch window. This feature is not documented. 从 Visual c + + 6.0 版开始,现在可以展开 Visual c + + 调试器监视窗口中查看所有数组元素的数组指针。 此功能未记录。 In the Watch window, type an expression that [...]

Windows XP系统关闭CD ROM的Auto-Play(自动播放)

微软文档: How to disable the Autorun functionality in Windows 方法一,通过组策略设置(注意:Windows XP HOME不支持): How to use Group Policy settings to disable all Autorun features in Windows Server 2003, Windows XP Professional, and Windows 2000 // Click Start, click Run, type Gpedit.msc in the Open box, and then click OK. Under Computer Configuration, expand Administrative Templates, and [...]

C++中类和结构体的区别(Differences between C++ Classes and Structs)

引用地址: http://blog.stevedoria.net/20050913/differences-between-cpp-classes-and-structs 请注意,本文讨论的前提是在C++标准下的类和结构体,而不是讨论C中的结构体. The only difference is the default visibility of members (both support data and functions and constructors and destructors). – classes have private members by default – structs have public members by default 可见,在C++中,类和结构体的唯一区别是成员的可见性(两者都支持数据和成员函数以及构造函数和析构函数). 对于类来说,成员默认为私有. 对于结构体来说,成员默认为公有. 对于继承来说,类之间的继承,成员默认为私有,而结构体之间的继承则默认为公有. 不过,还有爱钻牛角尖的同学会问,如果是类和结构体之间的继承,情况会怎样呢? class A { public: int a; }; struct B : A { }; struct C [...]

Drupal安装手记(解决Fantastico安装无法切换中文问题)

Fantastico安装drupal6.X,首先它装的不是最新版本,但是由于Fantastico可以很方便的进行升级维护,而且安装步骤非常简单,像我这样的懒人肯定是要先尝试一下这么容易的操作了。 问题出在汉化这里,上传了语言包后,到后台选择Add Language,可是无论怎么填都是会出错。 错误提示如下: Google了半天,Drupal官方上对于类似问题也都没有很好的办法,我的解决办法是(土法): 1.  备份网站数据库,其他必要的程序。 2.  删除Drupal数据库,然后重建同名的数据库。 3. 运行http://yoursite.com/Drupal/install.php 重新安装后,中文就可以用了。 该解决方法的问题: 1. 需要删除重建数据库 2. 重新安装后,Fantastico管理面板中原来的Drupal安装信息丢失 。

Co-installer for Device and Driver Installation

相关链接: MSDN http://msdn.microsoft.com/en-us/library/ms790156.aspx 顾名思义,Co-installer是个微软的Win32 DLL(动态链接库)用来协助设备安装。 A co-installer is a Microsoft Win32 DLL that assists in device installation. Co-installers are called by SetupAPI as “helpers” for Class Installers. For example, a vendor can provide a co-installer to write device-specific information to the registry that cannot be handled by the INF file. The shaded boxes represent the [...]

Canonical URL by SEO No Duplicate WordPress Plugin