上一页 1 2 3 4 5 6 7 ··· 9 下一页
摘要: MacbookPro安装Windows 8之后,滑板必须按下才算是点击,不能像mac里似的,轻触即可,使用起来很不方便从网上查,可以使用Boot Camp Control Panel来设置,但是启动总是失败最后终于找到了解决方案:1、启动记事本,把下面的内容粘贴进去runas /trustlevel:0x20000 "C:\Windows\System32\AppleControlPanel.exe"2. 保存为"BootCampControlPanel.cmd".3、右键点击"BootCampControlPanel.cmd",以管 阅读全文
posted @ 2013-05-11 08:57 静候良机 阅读(3378) 评论(0) 推荐(0) 编辑
摘要: 1、从www.mysql.com下载mysql并安装,配置并启动mysql服务注意:目前,XE3文档中提到,目前支持到mysql 5.1,最新版5.6,经过我测试是连接总是不成功在此提供一个最小化的mysql5.1.68的绿色版,http://www.kuaipan.cn/file/id_70519068051405.htm2、在bin文件夹下查找libmysql.dll,这个文件也就是Connector/C (libmysql) ,dbexpress就是通过这个文件访问mysql的,把这个文件复制到%WinDir%\system32,或者把mysql的bin文件夹加入到path环境变量3、d 阅读全文
posted @ 2013-02-24 21:13 静候良机 阅读(1889) 评论(0) 推荐(0) 编辑
摘要: 在函数中,使用Result作为返回变量,必须要等所有代码执行完成function TForm1.abc(x, y: Integer): Integer;begin if y = 0 then Result := 0 else Result := x / y;end;Delphi 2009,新增了Exit方法,指定返回值,同时退出函数function TForm1.abc(x, y: Integer): Integer;begin if y = 0 then Exit(0); Result := x / y; //如果y等于0,这一行不会被执行end;Exit方法,和C... 阅读全文
posted @ 2013-02-21 16:57 静候良机 阅读(811) 评论(0) 推荐(0) 编辑
摘要: 本地变量,一般是随着函数执行结束,就不能再访问;而如果在匿名函数,访问了外部函数的本地变量,本地变量的生命周期会被扩展unit Unit1;interfaceuses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls;type TIntSum = reference to procedure (x, y: Integer); TForm1 = ... 阅读全文
posted @ 2013-02-21 16:44 静候良机 阅读(474) 评论(0) 推荐(0) 编辑
摘要: 在匿名函数中,可以修改本地变量的值unit Unit1;interfaceuses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs;type TIntSum = reference to procedure (x, y: Integer); TForm1 = class(TForm) procedure FormCreate(Sender: TObject); ... 阅读全文
posted @ 2013-02-21 16:24 静候良机 阅读(525) 评论(0) 推荐(0) 编辑
摘要: 对于比较简单实现,不需要复用,开发者更喜欢在使用时,原地声明,而没有必要单独声明并实现这个方法对于使用C#和Objective-C的开发人员,应该很容易感受到匿名方法的便利。从Delphi 2009开始,Delphi也加入了对匿名方法的支持unit Unit1;interfaceuses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs;type //首先声明匿名方法的类型... 阅读全文
posted @ 2013-02-21 15:32 静候良机 阅读(1870) 评论(0) 推荐(1) 编辑
摘要: 1、Code Foldingprocedure TForm1.btn1Click(Sender: TObject);begin{$REGION '测试区块'} ShowMessage('ok');{$ENDREGION}end;C##region Optional text that appears when the code block is folded...#endregion Objective-C#pragma region optional text...#pragma end_region 2、代码格式化3、 阅读全文
posted @ 2013-02-18 22:01 静候良机 阅读(347) 评论(0) 推荐(0) 编辑
摘要: NSMutableString *whole = [self.textView.textStorage mutableString]; [whole appendString:str]; NSURL *url = [NSURL URLWithString:[fileDir stringByAppendingFormat:@"%@.h", name]]; [str writeToURL:url atomically:YES encoding:NSUTF8StringEncoding error:nil]; NSData *data = [str d... 阅读全文
posted @ 2013-02-03 22:44 静候良机 阅读(189) 评论(0) 推荐(0) 编辑
摘要: // Create and configure the panel. NSOpenPanel* panel = [NSOpenPanel openPanel]; [panel setCanChooseDirectories:NO]; [panel setAllowsMultipleSelection:NO]; [panel setMessage:@"Import one or more files or directories."]; // Display the panel attached to the document's window. ... 阅读全文
posted @ 2013-02-03 21:54 静候良机 阅读(1049) 评论(0) 推荐(0) 编辑
摘要: RestKit支持的类型:NSString * const RKMIMETypeJSON = @"application/json";NSString * const RKMIMETypeFormURLEncoded = @"application/x-www-form-urlencoded";NSString * const RKMIMETypeXML = @"application/xml";NSString * const RKMIMETypeTextXML = @"text/xml";对于RSS,虽然是xm 阅读全文
posted @ 2013-01-31 14:54 静候良机 阅读(178) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 9 下一页