Categories
Programming/C Programming/iOS

Protected: Objective-C quick reference / 快速參考

There is no excerpt because this is a protected post.

Categories
Programming/C Programming/iOS Software

[參考] Objective-C Cheat Sheet and Quick Reference

Objective-C Cheat Sheet and Quick Reference URL : http://www.raywenderlich.com/4872/objective-c-cheat-sheet-and-quick-reference

Categories
Copy_N_Paste Programming/C Programming/misc

iphone / hello world 2 / single rows in the table view

// — // Customize the number of rows in the table view. – (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return 1; } // Customize the appearance of table view cells. – (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @”Cell”; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault […]

Categories
Copy_N_Paste Programming/C Programming/misc

[導覽] 有趣的 iPad iPhone development video 教學

From : Rory Lewis, PhD, JD URL : http://www.rorylewis.com/docs/02_iPad_iPhone/05_iPhoneTutorials.htm 另外給初接觸 objective-c 的介紹: URL : http://maciku.blogspot.com/2009/12/iphone-objective-c.html 中文開發網站 : http://www.cocoachina.com/iphonedev/ // —————— obj->method(argv); [obj method: argv]; // —————— @implementation HelloController – (IBAction)sayHello:(id)sender { [destinationTextField setStringValue:[sourceTextField stringValue]]; } @end (id)sender 是一個可以選擇性的用法, 若您有需要取得發出 IBAction的元件時,可以用這個 sender變數來取得. 但記得可能需要 cast一下. UIButton *senderButton=(UIbutton*) sender; [senderButton setHidden: YES]; 這樣就會把該button隱藏起來. (id)sender 是一個可以選擇性的用法,若您有需要取得發出 IBAction的元件時,可以用這個 sender變數來取得.但記得可能需要 cast一下. […]

Categories
JOB Programming/C System/Linux/Unix*

開啟 vmware esxi server virtual switch Promiscuous Mode 的方法 – for sniff network purpose

要研究這麼深?! 沒辦法, 最近遇到奇怪問題非得啟用 Promiscuous Mode 來看看發生啥事了. 設定 step by step 看圖:   這是 免費的 sniff tools: http://www.ethereal.com/

Categories
JOB Network service Programming/C

tracking system 新點子

上週聽了 ora 公司的產品說明, 覺得不錯. 它是 tracking system 產品, 可是更 friendly / 非侵入式的作法, 它利用 switch 或 SLB設備的 mirror port 把流經的 traffic 導進這個 program , 由這個 program 來進行 traffic 分析. 架構簡圖:   若要自行作的話可能會需要看懂這個 Programming with pcap http://www.tcpdump.org/pcap.htm The Sniffer’s Guide to Raw Traffic (a libpcap tutorial) http://yuba.stanford.edu/~casado/pcap/section1.html

Categories
Copy_N_Paste JOB Programming/C System/Linux/Unix*

Get MAC address using C

不過 , 這邊有指定 eth0 , 若 server 有很多 interface 的話就要注意一下了. #include <stdio.h> #include <sys/ioctl.h> #include <sys/types.h> #include <sys/socket.h> #include <net/if.h> int main( int argc, char *argv[] ) { int s; struct ifreq buffer; s = socket(PF_INET, SOCK_DGRAM, 0); memset(&buffer, 0x00, sizeof(buffer)); strcpy(buffer.ifr_name, "eth0"); ioctl(s, SIOCGIFHWADDR, &buffer); close(s); for( s = 0; s < 6; s++ […]

Categories
Copy_N_Paste Programming/C

[好文推薦] A TUTORIAL ON POINTERS AND ARRAYS IN C

"C 語言" … ㄏㄏ.. 這麼古老且重要的語言,從 1972年開始到現在至少超過30年! 學會 pointer 後 C 就算是懂 90% 了 REF: http://en.wikipedia.org/wiki/C_%28programming_language%29 FROM URL : http://home.netcom.com/~tjensen/ptr/pointers.htm TABLE OF CONTENTS Preface Introduction Chapter 1: What is a Pointer? Chapter 2: Pointer Types and Arrays. Chapter 3: Pointers and Strings Chapter 4: More on Strings Chapter 5: Pointers and Structures Chapter 6: More on […]

Categories
Copy_N_Paste Programming/C Programming/javascript Programming/misc Programming/php Software System/Linux/Unix*

編程最佳的字型 consolas / notepad++ 及 winscp 設定 / Best programming fonts

http://www.sitepoint.com/blogs/2009/05/01/top-10-programming-fonts/

Categories
Copy_N_Paste JOB Programming/C Software System/Linux/Unix*

The Expat XML Parser – XML 分析/拆解工具 – C – 這個讚! 用 C 寫 spider 會用到

Expat is an XML parser library written in C. It is a stream-oriented parser in which an application registers handlers for things the parser might find in the XML document (like start tags). An introductory article on using Expat is available on xml.com. Function reference : http://www.xml.com/pub/a/1999/09/expat/reference.html