Time of Update: 2018-12-04
今天我們接上第二課繼續加新功能:讀取SSDT。 什麼是ssdt? 我不作過多解釋,因為我解釋不清楚,GOOGLE一下有大把的資料,向大家介紹一篇好文章:http://blog.titilima.com/ssdt.html。我的理解就是建立ring0與ring3的映射關係。 操作SSDT表,我們會用到ntdll.dll中匯出的KeServiceDescriptorTable這個結構體。首先聲明KeServiceDescriptorTable結構typedef struct
Time of Update: 2018-12-04
在上一迴文章http://blog.csdn.net/favormm/article/details/6603923介紹了如何inject javascriopt 到UIWebView。 其實注入的目的就是為了利用, 今天介紹的就是如何修改網頁中已有element的action, 會展示一個執行個體,如何修改html中button的點擊事件。在html中顯示一個button的代碼如下:<input id="myButton1" name="cancel" type="button"
Time of Update: 2018-12-04
如果直接用UIWebView來顯示網頁很簡單,只需要向UIWebView發送一個NSURLRequest即可。但是你會發現,不夠人性化,因為你不知道當前狀況,網頁是否在載入,是否已載入完。mobile safari就很有人性化, 不但有blue progressbar,還有一個network activity indicator在status bar.那麼我們也需要加入這樣的特色到應用當中。加入network activity indicator其實很簡單,代碼如下:-
Time of Update: 2018-12-04
一、簡介集合(set)是一組單值對象,它可以是固定的(NSSet)、也可以是可變的(NSMutableSet)。集合可以比較、計算交集、並集,可變集合還可以有尋找、添加、刪除。二、常用方法#import <Foundation/Foundation.h>int main (int argc, char *argv[]){ NSAutoreleasePool*pool=[[NSAutoreleasePool alloc]init]; //集合比較、修改 NSSet
Time of Update: 2018-12-04
- (void)viewDidLoad{ [superviewDidLoad]; //初始日期 beginDateTextField_ = [ [UITextField alloc ]init ]; beginDateTextField_.frame =CGRectMake( newPoint.x , newPoint.y , dudaoTextFieldWidth , dudaoTextFieldHeight );
Time of Update: 2018-12-04
String DBhost="";int selectCount; Properties prop = new Properties(); InputStream in; in = getClass().getResourceAsStream("a.properties");//平級,classes下 prop.load(in); Set keyValue = prop.keySet(); for
Time of Update: 2018-12-04
關於llvm-gcc-4.2 failed with exit code 1錯誤問題 引入:xcode升級到4.2時 開啟以前正常的程式 可能會出現llvm-gcc-4.2 failed with exit code
Time of Update: 2018-12-04
錯誤碼:Undefined symbols for architecture x86_64: "_SCDynamicStoreCopyProxies", referenced from: -[ASIHTTPRequest configureProxies] in ASIHTTPRequest.o "_deflate", referenced from: -[ASIDataCompressor compressBytes:length:error:shouldFinish:
Time of Update: 2018-12-04
NSString *cleanString = [dirtyString stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];還有就是去除多於的空格,如下:NSString *theString = @" Hello this is a long string! ";NSCharacterSet *whitespaces =
Time of Update: 2018-12-04
目前有個需求,需要把.xib封裝到靜態庫中,試了很多種方法都不行,最後看到這篇文章 ,它是從 iOS Library With Resources 翻譯過來的,圖片沒有顯示(原文有)。這裡主要是把靜態庫種的.xib封裝到bundle中,然後把靜態庫內鏈到工程中。以下是這篇文章主要流程:1 添加資源Bundle Target資源必須是單獨編譯成Bundle才能使用,所以需要為MyLibrary(靜態庫target)項目產生另一個Bundle Target選擇MyLibrary(靜態庫target)
Time of Update: 2018-12-04
在用UIWebView的時候,如果訪問需要http
Time of Update: 2018-12-04
在xcode 開發過程中,經常遇到如下錯誤: "_OBJC_CLASS_$_ClassName", referenced from:我總結了兩種錯誤情況:1.一個類所在的庫(架構)沒有被引入,常見為framework添加。解決方案:添加該類所在的庫(架構)2.一個類沒有被正確的添加到工程中,這種情況在工程中的確存在這個類,可是程式就是不能識別。解決方案:選中該類,只刪除它在該工程中的引用,然後,再添加引用,如添加:選擇
Time of Update: 2018-12-04
@interface ViewController : UIViewController {UIActivityIndicatorView *ActivityView;}-(void)ActivityLoad;-(IBAction)ClickSubmit:(id)sender;@end-(void)ActivityLoad{ ActivityView = [[UIActivityIndicatorView alloc]
Time of Update: 2018-12-04
在ios5中,UDID已不再被推薦使用,在將來的版本中,這個功能可能會消失。所以我們得探尋它的取代方法,能唯一標識裝置的東西。往往硬體上有唯一標識,所以我們可以用硬體上的資訊來取代UDID, 硬體上的MAC地址就能達到這樣的目的。下面的函數就可以返回XX:XX:XX:XX:XX:XX類型的字串(12個16進位數)#include <sys/socket.h>#include <sys/sysctl.h>#include <net/if.h>#include &
Time of Update: 2018-12-04
- (id)init {if( (self = [super initWithStyle:UITableViewStylePlain]) ){self.title = @”主菜單”;//-------------------------------------------------------------------------//建立顯示用數組items_ = [ [NSMutableArray alloc] initWithObjects:@”ViewController1”,@”
Time of Update: 2018-12-04
今天要給大家推薦的控制項是:BASequenceControl,如下:利用它可以實現目錄結構管理的應用,是不是很絢呀。該控制項提供的API與UISegmentedControl的類似,所以很容易整合到自己的應用中。blog:http://www.dimzzy.com/blog/2011/11/basequencecontrol-to-complement-uisegmentedcontrol/源碼:https://github.com/dimzzy/BaseAppKit下面我介紹一下其用法。第一
Time of Update: 2018-12-04
Feeling a little blue?Here are ten fast and easy ways to smile.1. ExerciseWhen you exercise, your brain release a chemical called endorphins. This chemical makes you fell happier. That is just another reason why exercise is good for you.2. Play
Time of Update: 2018-12-04
檔案一直運行不了,還報錯:duplicate symbol _OBJC_IVAR_$_CDataScanner.data ......... for architecture i386 ld: duplicate symbol_OBJC_IVAR_$_CDataScanner.data
Time of Update: 2018-12-04
iOS5的SDK現在可以直接開啟setting頁面了,以往的SDK則不可以,當時我還花了大量時間去實現,結果不了了之。補充一點,下面的方法是undocument的,所以可能會被reject.如果你想開啟Location Services的setting頁面,代碼如下:[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs:root=LOCATION_SERVICES"]];如果想開啟Twitter的設定:[[
Time of Update: 2018-12-04
//potgresql7.8以上支援的遞迴WITH RECURSIVE t(n) AS ( SELECT 1 UNION ALL SELECT n+1 FROM t)SELECT n FROM t LIMIT 100;//參考:http://www.postgresql.org/docs/8.4/static/queries-with.html//建立plpgsql過程語言create LANGUAGE