Time of Update: 2018-12-05
1 // 2 // UITestViewController.h 3 // UITest 4 // 5 6 #import <UIKit/UIKit.h> 7 8 @interface UITestViewController : UIViewController <UITextViewDelegate> 9 { 10 11 } 12 13 @end 14 15 16 17 // 18 //
Time of Update: 2018-12-05
三條基本原則:1、當你使用 new、alloc 或 copy 建立對象時,對象的 count retain 到 1。你一定要負責把這個對象 release 或 autolease 掉。這樣當它的生命週期結束時,它才能清空。2、當你使用其他方法獲得一個對象時,你可以認為它已經 retain 了一個 count,並且 autolease 掉了。你不用考慮和它相關的清理問題。但是如果你想保留這個對象,那麼你需要 retain 它,並且要確保之後你 release 了這個對象。3、如果你 retain
Time of Update: 2018-12-05
在程式中調用系統內建的應用,比如我進入程式的時候,希望直接調用safar來開啟一個網頁,下面是一個簡單的使用:- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{ self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]
Time of Update: 2018-12-05
下面是前台頁面的代碼:1<ItemTemplate>2 <asp:Image id=Image1 runat="server" ImageUrl='<%# "Images/Upload/lib_"+DataBinder.Eval(Container.DataItem, "ID")+".jpg" %>' Height="160" Width="200" ImageAlign="AbsMiddle" BorderWidth="0">3 </asp:I
Time of Update: 2018-12-05
1 string strConnString = "server = (local); database = myStudy; uid = sa;pwd = "; 2 private void Button1_Click(object sender, System.EventArgs e) 3 { 4 SqlConnection conn = new SqlConnection(strConnString); 5 string
Time of Update: 2018-12-05
- (void)viewDidLoad { [super viewDidLoad]; CGPoint frameCenter = self.view.center;float width = 50.0;float height = 50.0; CGRect viewFrame = CGRectMake(frameCenter.x-width,frameCenter.y-height, width*2, height*2); UIView *myView =
Time of Update: 2018-12-05
1 #import <UIKit/UIKit.h> 2 3 @interface UITestViewController : UIViewController <UIWebViewDelegate> 4 { 5 6 } 7 8 @end 9 10 11 12 13 //14 // UITestViewController.m15 // UITest16 //17 18 #import "UITestViewController.h"19 20
Time of Update: 2018-12-05
使用t-sql從社會安全號碼中提取生日,以下是轉換15位社會安全號碼的例子,僅供參考。create function getDateFromID( @id char(15))returns datetimeasbegin declare @birthPart char(6); set @birthPart = substring(@id,7,6); declare @year int; set @year = cast(left(@birthPart,2) as i
Time of Update: 2018-12-05
NSMutableURLRequest通過POST方法向伺服器請求時間,很簡單的一個例子,使用HTTP入門。- (void)viewDidLoad{ [super viewDidLoad];// Do any additional setup after loading the view, typically from a nib. NSString *urlString = [[NSString alloc] initWithFormat:@"http://api.air-
Time of Update: 2018-12-05
CodeCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> 1 //函數功能:只能輸入0,正整數。並可以設定輸入正整數的最大值。 2 //作者: lmx
Time of Update: 2018-12-05
直接將項目中用到的對plist檔案處理的部分拿出來://向草稿箱中寫如資料- (void)writeToSendedList:(NSString *)message{ //沙箱中的目錄 NSArray *storeFilePath = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *doucumentsDirectiory =
Time of Update: 2018-12-05
1 //傳入一個table的id,將table的全部內容匯出excel檔案 2 function AutomateExcel(objTable) 3 { 4 // Start Excel and get Application object. 5 var oXL = new ActiveXObject("Excel.Application"); 6 // Get a new workbook. 7 var oWB = oXL.Workbooks.Ad
Time of Update: 2018-12-05
方法一右側進入 BaseInfoEdit *View = [[BaseInfoEdit alloc] initWithNibName:@"BaseInfo" bundle:nil];[self.navigationController pushViewController:View animated:YES];返回方法[self.navigationController popViewControllerAnimated:YES]; 方法二下方進入 OilRecordAdd *View = [[
Time of Update: 2018-12-05
開啟Macintosh HD你會發現內中有四個檔案夾分別有——應用程式(Applications)、系統(System)、使用者(User)、資料庫(Library)。四個檔案夾中又分別各有若干數量的檔案夾存在。1.Applications:這個當然就是存放各種軟體的位置了。2.System: 包含由Apple安裝的系統軟體。這此資源是系統正常運行所必須的,位於啟動卷宗中 /System/Library/CFMSupport CFM, Code Fragment
Time of Update: 2018-12-05
一、靜態圖片的設定iOS裝置現在有三種不同的解析度:iPhone 320x480、iPhone 4 640x960、iPad 768x1024。以前程式的啟動畫面(圖片)只要準備一個 Default.png 就可以了,但是現在變得複雜多了。下面就是 CocoaChina 會員做得總結 如果一個程式,既支援iPhone又支援iPad,那麼它需要包含下面幾個圖片:Default-Portrait.png iPad專用豎向啟動畫面
Time of Update: 2018-12-05
很多人都覺得這兩個方法差不多,但是,實際上,他們差的很遠呢 因為setTimeout(運算式,延時時間)在執行時,是在載入後延遲指定時間後,去執行一次運算式,記住,次數是一次 而setInterval(運算式,互動時間)則不一樣,它從載入後,每隔指定的時間就執行一次運算式 所以,完全是不一樣的
Time of Update: 2018-12-05
參考來自:http://blog.csdn.net/muyu114/article/details/68964981、建立一個空的應用程式2、添加一個空的xib檔案 到這裡工程的應該是下面這個樣子的:3、改變File’s Owner的class為UIApplication4、從Library中添加一個Object,並設定其class為你對應的應用程式的類(這裡是DemoAppDelegate)5、添加windows,並在程式中設定windows為IBOutletThe xAppDelegate.
Time of Update: 2018-12-05
1 // 2 // UITestViewController.m 3 // UITest 4 // 5 6 #import "UITestViewController.h" 7 8 @implementation UITestViewController 9 10 11 - (void)buttonClick:(id)sender {12 13 NSLog(@"you clicked button: %@",[sender title]);14 }15 16 -
Time of Update: 2018-12-05
iPhone程式發布的時候應該會用到下面這些表徵圖,大小和用途如下:圖片大小(px)檔案名稱用途重要程度512X512iTunesArtworkiTunes商店上展示可以沒有,推薦有57X57Icon.pngiPhone/iPod touch上的App Store以及Home介面這個必須要有114X114Icon@2x.pngiPhone 4(高解析度)的Home
Time of Update: 2018-12-05
參考:http://hi.baidu.com/smallwolf99/blog/item/d221e811a3346dd4a6ef3f8d.html整理電腦時不小心卸載掉了winpcap,當時不知道是用來幹嘛的。今天使用wireshark 這款很強大的網路監視軟體,滿心歡喜的開啟,可是每次開啟都會彈出“The NPF driver isn't