上一页 1 ··· 33 34 35 36 37 38 39 40 41 ··· 57 下一页
  2011年10月5日
摘要: 通过NSEnumertor来遍历数组元素代码如下:NSArray *array=[NSArray arrayWithObjects: @"one",@"two",@"three",nil]; NSEnumerator *enumerator; enumerator = [array objectEnumerator]; id thing; while (thing=[enumerator nextObject]) { NSLog(@" I have get some value %@",thing); }使用快速遍 阅读全文
posted @ 2011-10-05 17:37 wtq 阅读(1366) 评论(0) 推荐(0) 编辑
摘要: //可变数组 NSMutableArray *ma = [NSMutableArray arrayWithCapacity:7]; [ma addObject: @"wtq"]; [ma addObject: @"wtp"]; [ma addObject: @"www"]; for (int i = 0; i<[ma count]; i++) { NSLog(@"value %@",[ma objectAtIndex:i]); } [ma addObject:@"wwttqq"]; NSL 阅读全文
posted @ 2011-10-05 17:20 wtq 阅读(748) 评论(0) 推荐(0) 编辑
摘要: 使用componentsSeparatedByString将字符串分隔成NSArray 数组代码如下: NSString *st = @"wta,wtb,wtc,wtd,wte,wtf,wtg,wth,wti,wtj"; NSArray *sarray = [st componentsSeparatedByString:@","]; for (int i=0; i<[sarray count]; i++) { NSLog(@"value:%@",[sarray objectAtIndex:i]); }使用componentsJo 阅读全文
posted @ 2011-10-05 16:32 wtq 阅读(587) 评论(0) 推荐(0) 编辑
摘要: 创建uilabel的代码如下- (void)viewDidLoad { [super viewDidLoad]; UILabel *lbWtq = [[[UILabel alloc] initWithFrame:CGRectMake(0, 0, 150, 50)] autorelease]; lbWtq.text=@"this is my name"; //[lbWtq setText:@"text"]; [self.view addSubview:lbWtq]; } 阅读全文
posted @ 2011-10-05 11:25 wtq 阅读(405) 评论(0) 推荐(0) 编辑
  2011年9月29日
摘要: mac 操作系统安装教程 阅读全文
posted @ 2011-09-29 17:38 wtq 阅读(149) 评论(0) 推荐(0) 编辑
摘要: 摘自:http://www.docin.com/p-166876874.html 阅读全文
posted @ 2011-09-29 12:43 wtq 阅读(242) 评论(0) 推荐(0) 编辑
摘要: Using C++ With Objective-C 苹果的Objective-C编译器允许用户在同一个源文件里自由地混合使用C++和Objective-C,混编后的语言叫Objective-C++。有了它,你就可以在Objective-C应用程序中使用已有的C++类库。 Objective-C和C++混编的要点 在 Objective-C++中,可以用C++代码调用方法也可以从Objective-C调用方法。在这两种语言里对象都是指针,可以在任何地方使用。例 如,C++类可以使用Objective-C对象的指针作为数据成员,Objective-C类也可以有C++对象指针做实例变量。下... 阅读全文
posted @ 2011-09-29 12:20 wtq 阅读(5592) 评论(0) 推荐(1) 编辑
  2011年9月28日
摘要: iphone 开发环境搭建 阅读全文
posted @ 2011-09-28 20:56 wtq 阅读(210) 评论(0) 推荐(0) 编辑
  2011年9月23日
摘要: 在使用存储过程时,若动态的传递表名或者是列名时,可以考虑使用动态sql。代码如下; alterprocedureProc_UpdateDatetimeCounter@businessNumnvarchar(200),--业务号@columnnvarchar(200),--列名@valuedatetime--值asdeclare@sqlnvarchar(max)set@sql=N'updatecounterset'+quotename(@column)+'=@value1wherebusinessNum=@businessNum1'execsp_executesq 阅读全文
posted @ 2011-09-23 14:04 wtq 阅读(5867) 评论(0) 推荐(0) 编辑
摘要: 在使用sp_executesql执行动态的sql时,如果传递进来的参数是表名或者是列名,那么会执行不成功。代码如下:View Code 1alterproctest23as4declare@valuenvarchar(400)5declare@sqlnvarchar(400)6declare@tempvaluedatetime7declare@idbigint8set@id=2269set@tempvalue=getdate()10set@value='exportTime'11set@sql=N'updatecounterset@value1=@tempvalue1w 阅读全文
posted @ 2011-09-23 13:11 wtq 阅读(2373) 评论(1) 推荐(1) 编辑
上一页 1 ··· 33 34 35 36 37 38 39 40 41 ··· 57 下一页