原创 Memory management in block

Memory management in block Blockの具體的な使い方は https://developer.apple.com/library/ios/#documentation/Cocoa/Conceptua

原创 如何判斷一個類是否實現了某個protocol

使用-conformsToProtocol:函數,具體用法如下:@protocol MyProtocol <NSObject> @required

原创 Use git cherry-pick

If you used commit -a -m to commit other branch's changes(branch A) to the current branch(branchB) by mistake, you want

原创 MySQL Boolean Data Type

Written by maclochlainn February 26th, 2010 at 2:32 am Somebody posted a quick question about the outcome of defining a

原创 Archiving Objective-C Objects with NSCoding

For the seasoned Cocoa developer, this is a piece of cake. For newer developers, this can be a real pain, especially

原创 網頁遊戲中的資源壓縮問題

1.美術自己將圖片壓縮 採用 PNG-8 和 Alpha 透明通道 2.將壓縮後的圖片寫如二進制文件中,然後再壓縮文件

原创 Objective C 類變量的聲明

Objective C中類變量的聲明一般有兩種方式: 1)instance variable 2)property方式聲明instance vari

原创 How To Show Line Numbers In vi / vim Text Editor

Q. How do I display vi / vim text editor line numbers while writing a shell script or c program? How can I turn on or o

原创 Xcode快捷鍵

Command-Option-Up: 切換.h和.mCommand-Shift-D: 快速打開文件Control-2: 快速瀏覽當前文件成員Alt-Command-Left/Right: 前一個/後一個編輯位置Command-Shif

原创 SVN: Revert to a previous revision after a wrong update

Let’s say for example you accidentally ran “svn update” and your working copy got the updates that it shouldn’t have —

原创 Manage objective c object memory in Block

Look at the document from Apple: When a block is copied, it creates strong references to object variables used within t

原创 mysql存儲引擎:InnoDB和MyISAM的區別與優劣

MyISAM: 這個是默認類型,它是基於傳統的ISAM類型,ISAM是Indexed Sequential Access Method (有索引的順序訪問方法) 的縮寫,它是存儲記錄和文件的標準方法.與其他存儲引擎比較,MyISAM具有檢

原创 About @selector

A selector is the name used to select a method to execute for an object, or the unique identifier that replaces the nam

原创 Block 的內存管理

block 有什麼意義,特點等等,這些東西,實在是太複雜了,這裏只是簡單的總結一下block的內存管理。而且也僅僅限於objective-C的部分 Block memory block 的內存管理,應該是最頭疼的地方,就用這個來自W

原创 網頁遊戲入門教程

作者:北里聞簫 一、簡單的程序框架。 webgame程序構成: 三大部分。 第一是數據流程。第二是程序。第三是美術。 其中,數據流程包括了功能。也只