句柄(HANDLE)是Windows程序中一个重要的概念,使用也非常频繁。在Windows程序中,有各种各样的资源(窗口、图标、光标等),系统在创建这些资源时会为它们分配内存,并返回标识这些资源的标识号,即句柄。窗口句柄是windows句柄的一种,且是重要的一种句柄。在Windows应用程序中,窗口...
分类:
其他好文 时间:
2014-07-19 19:38:43
阅读次数:
252
先写下这个问题的模式
def preorderTraversal(self, root):
if root == None: return []
re = []
insert root to stack s
while s not empty:
cur_root = top of stack s
s.pop()
how to handle cur_root
how to ...
分类:
其他好文 时间:
2014-07-15 10:17:43
阅读次数:
274
//判断文件是否存在
bool FileExistsW(const wstring &fn)
{
WIN32_FIND_DATAW fd;
HANDLE hFile = FindFirstFileW(fn.c_str(),&fd);
if (hFile != INVALID_HANDLE_VALUE)
{
::FindClose(hFile);...
状态模式(state pattern) 详解本文地址: http://blog.csdn.net/caroline_wendy状态模式(state pattern): 允许对象在内部状态改变时改变它的行为, 对象看起来好像修改了它的类.建立Context类, 包含多个具体状态(concrete state)类的组合, 根据状态的不同调用具体的方法, state.handle(), 包含set\ge...
分类:
其他好文 时间:
2014-07-12 23:55:20
阅读次数:
385
一、问题
在安装opencms是会出现如下错误:
MySQL system variable 'max_allowed_packet' is set to 1048576 Byte (1MB).
Please note that it will not be possible for OpenCms to handle files bigger than this value in ...
分类:
其他好文 时间:
2014-07-12 22:58:44
阅读次数:
353
CreatePipe function
创建匿名管道,返回读,写管道的handle。...
分类:
其他好文 时间:
2014-07-12 19:48:27
阅读次数:
264
经验:支持”编译依存性最小化“的一般构想是:相依于声明式,不要相依于定义式。
基于此构想的两个手段是 Handle classes 和 Interface classes.
示例:相依于定义式
#include
#include "date.h"
#include "address.h"
class Person{
public:
Person(const std::string &name, const Data &birthday, const Address &addr);
st...
分类:
编程语言 时间:
2014-07-12 19:39:46
阅读次数:
347
查询占用cpu最高的20条sql语句,sql2008SELECT TOP 10 a.creation_time,total_worker_time/execution_count AS avg_cpu_cost, plan_handle,execution_count,(SELECT SUBSTRI...
分类:
数据库 时间:
2014-07-11 18:32:51
阅读次数:
271
DescriptionHow do system_reset and link_rest work?Solutionlnk_linkreset_n (input):In Xilinx SRIO example design, rio_reset.v is provided to handle lin...
VBS 选择文件夹框1234567891011121314151617181920212223on error resume NextConstMY_COMPUTER=&H11&ConstWINDOW_HANDLE=0ConstOPTIONS=0'设置我的电脑为根目录SetobjShell=Crea...
分类:
其他好文 时间:
2014-07-10 16:51:54
阅读次数:
221