1 + (BOOL)isBlankString:(NSString *)string 2 { 3 if (string == nil) 4 { 5 returnYES; 6 } 7 if (string == NULL) 8 { 9...
分类:
移动开发 时间:
2014-09-04 00:00:07
阅读次数:
344
-- 打印tablefunction print_lua_table (lua_table, indent) if lua_table == nil or type(lua_table) ~= "table" then return end local functio...
分类:
其他好文 时间:
2014-09-03 21:09:27
阅读次数:
237
self.navigationController.interactivePopGestureRecognizer.delegate = nil;
分类:
其他好文 时间:
2014-09-02 19:35:05
阅读次数:
144
Lua学习笔记1、lua的优势 a、可扩张性 b、简单 c、高效率 d、和平台无关2、注释 a、单行注释 -- b、多行注释 --[[ --]]3、类型和值 8个基本类型,检测变量类型用type a、nil print(type(nil)) -->nil 全局变量没有赋值以前,会被默...
分类:
其他好文 时间:
2014-09-02 12:15:14
阅读次数:
194
有时layout文件中会展示几种flash messages;每种flash在展现前均会判断是否为nil,则均需要花费3行代码,如下:
ruby
ASCIIcasts
使用循环可有效的减少代码量,如下:
key %>
content_tag需...
分类:
其他好文 时间:
2014-09-01 22:44:23
阅读次数:
250
true.blank? # => falsefalse.blank? # => truetrue.present? # => truefalse.present? # => false有时候判断一个 bool 值是否存在,还是老老实实用 b == nil 来...
分类:
其他好文 时间:
2014-09-01 19:24:33
阅读次数:
210
2014-09-01 14:25:17.148 RRS[995:60b] *** Terminating app due to uncaught exception ‘NSInvalidArgumentException‘, reason: ‘*** -[__NSPlaceholderArray initWithObjects:count:]: attempt to insert nil o...
分类:
移动开发 时间:
2014-09-01 16:02:53
阅读次数:
244
http://www.ruby-doc.org/stdlib-1.9.3/libdoc/securerandom/rdoc/SecureRandom.html(1)base64(n=nil)::base64generates a random base64 string.The argumentns...
分类:
其他好文 时间:
2014-09-01 12:05:02
阅读次数:
238
为什么有时候NSData转换成NSString的时候返回nil有时候,NSData明明有值,可是,当转换成NSString的时候,却没有值,现在来进行测试:)-现在提供测试用素材-源码如下://// AppDelegate.m// TestNSData//// Created by YouXi...
分类:
其他好文 时间:
2014-08-30 08:44:29
阅读次数:
151
//以下全部调试通过,你在窗体扔一个Treeview就行了procedure GetRootNodes(ATreeView:TTreeView);//得到所有根节点var vNode:TTreeNode;begin vNode:=nil; vNode:=ATreeView.Items.GetFirs...
分类:
其他好文 时间:
2014-08-27 10:34:47
阅读次数:
202