摘要: 解决办法: 阅读全文
posted @ 2014-11-11 10:05 稻草人.cn 阅读(2221) 评论(0) 推荐(0) 编辑
摘要: 这个事,折腾了仨小时。记下来。别再走弯路。一链接地址:查看源代码是这样的:通过审查元素看,是这样的:而,真正的地址,是这样的(scrapy 中 response.body ): 阅读全文
posted @ 2014-10-28 13:24 稻草人.cn 阅读(142) 评论(0) 推荐(0) 编辑
摘要: 提取B00MOBUBXE/gp/product/B00MOBUBXE/python正则表达式:/gp/product/(?P\w+)/ 阅读全文
posted @ 2014-10-26 18:24 稻草人.cn 阅读(129) 评论(0) 推荐(0) 编辑
摘要: Delphi2007的CategoryButtons组件的font属性的color值无效,无论设置什么颜色,都是黑色。 阅读全文
posted @ 2012-09-03 16:47 稻草人.cn 阅读(266) 评论(0) 推荐(0) 编辑
摘要: 一个获取本机ip的函数:1classfunctionTGlobal.GetLocalIP:string;2typeTaPInAddr=array[0..10]ofPInAddr;3PaPInAddr=^TaPInAddr;4varphe:PHostEnt;5pptr:PaPInAddr;6Buffer:array[0..63]ofchar;7I:Integer;8GInitData:TWSADATA;9begin10WSAStartup($101,ginitdata);11result:='';12gethostname(buffer,sizeof(buffer));13phe 阅读全文
posted @ 2012-09-03 16:30 稻草人.cn 阅读(1779) 评论(0) 推荐(0) 编辑
摘要: 设字符串仅由圆括号“(”和“)”,方括号“[”和“]”,花括号“{”和“}”组成,利用链栈的操作编写一个检查括号是否正确配对的算法:int Matcher(LstackTP *ls)。例如[{{()}[ ]}(){[ ]}]是正确的,而{({()[ ]})}])}则不正确。设链栈定义如下:(6分) typedef struct node { char data; struct node * next; } LStackTp;//Stack.cpp:Definestheentrypointfortheconsoleapplication.//#include"stdafx.h" 阅读全文
posted @ 2011-09-27 08:24 稻草人.cn 阅读(438) 评论(0) 推荐(0) 编辑
摘要: 定义个子类MyDBGrid继承TDBGrid,以提供访问父类保护成员的接口。 type MyDBGrid=class(TDBGrid) private public function GetRow:integer; function IsCurrent:boolean; end; function MyDBGrid.GetRow: integer; beg... 阅读全文
posted @ 2008-08-21 11:35 稻草人.cn 阅读(1058) 评论(0) 推荐(0) 编辑
摘要: level不能作为access的表名和字段名。记下来,防止遗忘。 阅读全文
posted @ 2008-08-05 12:47 稻草人.cn 阅读(329) 评论(2) 推荐(0) 编辑
摘要: 最近的项目中需要同时处理来自多个键盘的输入信息,使用raw input可以完美的解决这个问题。封装成一个组件,代码如下: 1unit UnitRawInput; 2 3interface 4 5uses 6 SysUtils, Classes,Windows,uRawInput,Forms,messages; 7 8 9type 10 TRawKeyPre... 阅读全文
posted @ 2008-06-18 13:21 稻草人.cn 阅读(1199) 评论(3) 推荐(0) 编辑