//版本號 1
//介面相關
//位址列輸入介面
#define url_format(_keyword_) [nsstring stringwithformat:@
"",_keyword_]
//搜尋欄輸入介面
#define search_format(_keyword_,_seachfrom_) [nsstring stringwithformat:@
"",_keyword_,_seachfrom_] #define inte***ce_mobile @
"iphone"
#define inte***ce_version
1#define home_title @
"我的興趣"
//註冊通知
#define add_observer(target,_selector,_name,_obj) [[nsnotificationcenter defaultcenter] addobserver: target selector:_selector name: _name object: _obj]
//傳送通知
#define post_notification(_notificationname,_obj,_userinfo) [[nsnotificationcenter defaultcenter] postnotificationname:_notificationname object:_obj userinfo:_userinfo]
//移出註冊通知
#define remove_observer(_id_) [[nsnotificationcenter defaultcenter] removeobserver:_id_]
//nsuserdefaults
#define user_deuault_set(_obj_,_key_) [[nsuserdefaults standarduserdefaults] setobject:_obj_ forkey:_key_] #define user_default_get(_key_) [[nsuserdefaults standarduserdefaults] objectforkey:_key_] #define user_default_remove(_key_) [[nsuserdefaults standarduserdefaults] removeobjectforkey:_key_]
//ios系統版本
#define iosversion [[[uidevice currentdevice] systemversion] floatvalue]
//document路徑
#define document_path [nssearchpathfordirectoriesindomains(nsdocumentdirectory, nsuserdomainmask, yes) objectatindex:0]
//caches路徑
#define caches_path [nsstring stringwithformat:@
"%@/library/caches"
,nshomedirectory()]
//egocache路徑
"egocache"
]//資料庫
#define db_name @
"qianqu"
#define db_type @
"data"
#define db_version
2"%@.%@"
,db_name,db_type]]
#define umeng_key @
"512eccab5270151faf000014"
#define token_string user_default_get(@
"token"
)==nil?@
"":user_default_get(@
"token"
)//uicolor 巨集定義
#define view_back_color [uicolor colorwithred:
230.0
/255.0
green:
230.0
/255.0
blue:
230.0
/255.0
alpha:
1.0] #define text_selected_color [uicolor colorwithred:
0green:
0blue:
0alpha:
1] #define text_normal_color [uicolor colorwithred:
102.0
/255
green:
102.0
/255
blue:
102.0
/255
alpha:1]
//cgrect 巨集定義
#define screen_size [[uiscreen mainscreen] bounds].size #define screen_height [[uiscreen mainscreen] bounds].size.height #define screen_width [[uiscreen mainscreen] bounds].size.width
巨集定義
#define view_height (screen_height-20)
對初學magento開發很有用的原理解析
magento通過標記決定頁面中的每個區塊的行為和視覺表現。在magento中有兩種型別的區塊 結構區塊 structural blocks 和內容區塊 content blocks 區分這兩種區塊最好的方式是通過分配給它的標記屬性來區分。結構區塊通常包含屬性 as 通過這個屬性值程式可以與指定的區...
幾個很有用的SQL語句
1 獲取某個資料庫所有表的資料行數 select o.name,i.rowcnt from sysobjects o join sysindexes i on o.id i.id where o.type u and i.indid 1 and o.name dtproperties order b...
幾個很有用的SQL語句
1 獲取某個資料庫所有表的資料行數 select o.name,i.rowcnt from sysobjects o join sysindexes i on o.id i.id where o.type u and i.indid 1 and o.name dtproperties order b...