上一页 1 ··· 55 56 57 58 59 60 61 62 63 ··· 69 下一页
摘要: //#import "/usr/include/sqlite3.h"//add this to your header of code-(void)saveData{sqlite3_stmt*statement;constchar*dbpath=[databasePathUTF8String];if(sqlite3_open(dbpath,&contactDB)==SQLITE_OK){NSString*insertSQL=[NSStringstringWithFormat:@"INSERTINTOCONTACTS(name,address,phone)V 阅读全文
posted @ 2012-08-25 20:59 zyip 阅读(299) 评论(0) 推荐(0) 编辑
摘要: -(void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientationduration:(NSTimeInterval)duration{if(toInterfaceOrientation==UIInterfaceOrientationLandscapeLeft||toInterfaceOrientation==UIInterfaceOrientationLandscapeRight){self.firstButton.frame=CGRectMake(20,20,482,7 阅读全文
posted @ 2012-08-25 20:50 zyip 阅读(193) 评论(0) 推荐(0) 编辑
摘要: Export a datatable to Excel and save as fileDimCurrentCIAsSystem.Globalization.CultureInfo=System.Threading.Thread.CurrentThread.CurrentCultureSystem.Threading.Thread.CurrentThread.CurrentCulture=NewSystem.Globalization.CultureInfo("en-US")If(tmpDataTableIsNothing)ThenReturnEndIfDimrowNumA 阅读全文
posted @ 2012-08-24 12:43 zyip 阅读(370) 评论(0) 推荐(0) 编辑
摘要: DimCurrentCIAsSystem.Globalization.CultureInfo=System.Threading.Thread.CurrentThread.CurrentCultureSystem.Threading.Thread.CurrentThread.CurrentCulture=NewSystem.Globalization.CultureInfo("en-US")It's a bug about Excel interop.adding the aboveprevious to your code. 阅读全文
posted @ 2012-08-24 12:33 zyip 阅读(259) 评论(0) 推荐(0) 编辑
摘要: #defineSWITCH_TAG102-(void)updateSwitch:(id)sender{//toggletheswitchfromitscurrentsettingUISwitch*s=[self.view.windowswitchWithTag:SWITCH_TAG];[ssetOn:!s.isOn];}-(void)updateTime:(id)sender{//setthelabeltothecurrenttime[self.view.windowlabelWithTag:LABEL_TAG].text=[[NSDatedate]description];}//Thisis 阅读全文
posted @ 2012-08-23 19:57 zyip 阅读(284) 评论(0) 推荐(0) 编辑
摘要: -(BOOL)connectedToNetwork{//Createzeroaddystructsockaddr_inzeroAddress;bzero(&zeroAddress,sizeof(zeroAddress));zeroAddress.sin_len=sizeof(zeroAddress);zeroAddress.sin_family=AF_INET;//RecoverreachabilityflagsSCNetworkReachabilityRefdefaultRouteReachability=SCNetworkReachabilityCreateWithAddress( 阅读全文
posted @ 2012-08-22 21:20 zyip 阅读(353) 评论(0) 推荐(0) 编辑
摘要: If your iOS app generates a crash reportwith the exception code 0x8badfood, thismeans that the iOSwatchdogtimer killed your app because it was unresponsive; such a crash may have been caused by a synchronousnetworking call. 阅读全文
posted @ 2012-08-22 16:48 zyip 阅读(371) 评论(0) 推荐(0) 编辑
摘要: classProgram{staticvoidMain(string[]args){stringdate="2011-08-15";DateTimed0=DateTime.Parse(date);Console.WriteLine(d0.ToString("D0IS:yyyy-MM"));DateTimed1=DateTime.Now;Console.WriteLine(d1.ToString("D1IS:yyyy-MM"));intr=GetDateDiffYears(d0,d1);Console.WriteLine(r.ToStr 阅读全文
posted @ 2012-08-16 10:57 zyip 阅读(374) 评论(0) 推荐(0) 编辑
摘要: #regionJsonhelperusingSystem.IO;usingSystem.Text;usingSystem.Runtime.Serialization.Json;publicclassJsonHelper{///<summary>///JSON序列化///</summary>publicstaticstringJsonSerializer<T>(Tt){DataContractJsonSerializerser=newDataContractJsonSerializer(typeof(T));MemoryStreamms=newMemorySt 阅读全文
posted @ 2012-08-15 16:14 zyip 阅读(366) 评论(0) 推荐(0) 编辑
摘要: -(void)SelectSort{NSLog(@"======startingsort=======");//intarr[100];//for(inti=0;i<100;i++)//{//arr[i]=i;//}intarr[]={1,3,9,5,2,7,10,20,11,6};//NSString*str=[NSStringstringWithFormat:@"I'm:%d",1];for(inti=0;i<10;i++){intmin=i;for(intj=i+1;j<10;j++){if(arr[j]<arr[m 阅读全文
posted @ 2012-08-14 23:14 zyip 阅读(139) 评论(0) 推荐(0) 编辑
上一页 1 ··· 55 56 57 58 59 60 61 62 63 ··· 69 下一页