- 博客(19)
- 收藏
- 关注
转载 UIBarButtomItem:The set of possible titles to display on the bar button.
possibleTitles The set of possible titles to display on the bar button. @property(nonatomic, copy) NSSet *possibleTitles Discussion Use this property to provide a hint to the system on h
2012-05-24 15:57:47
515
转载 NSUserDefaults
卸载程序后NSUserDefaults保存的程序数据消失,停止运行程序数据仍然有效。 http://blog.sina.com.cn/s/blog_4cfeda8601011mro.html NSUserDefaults类提供了一个与默认系统进行交互的编程接口。NSUserDefaults对象是用来保存,恢复应用程序相关的偏好设置,配置数据等等。默认系统允许应用程序自定义它的行为去迎合
2012-05-12 16:27:59
848
原创 Detect the current input character in UITextField(iOS)
2down votefavorite share [g+]share [fb]share [tw] I want to know the current input character the user just inputted.Comparing the old and the new input string seems to work, bu
2012-04-21 21:46:58
610
转载 转义字符(Escape character)
百度百科 C语言转义 字符表 所有的转义字符和所对应的意义: 转义字符 意义 ASCII码值(十进制) \a 响铃(BEL) 007 \b 退格(BS) 008 \f 换页(FF) 012 \n 换行(LF) 010
2012-04-21 14:34:15
3916
转载 js关闭窗口 ie ff chrome
原文 带确认对话框: script> if(confirm("您确定要关闭本页吗?")) { self.opener=null; self.open('','_self'); self.close(); } script> 不提示直接关闭: script> self.opener=null; self.open('', '_self'); s
2012-04-19 19:41:00
1405
原创 php图片验证码
需要资源: 1.Login.php:这个文件为登录页面,即需要用到验证码的页面; Login.js:Login.php的提交不是通过submit,而是通过js,然后提交给php。 2.VerificationImage.php:这个文件用于作图,即画出验证码的图片; 3.Submit.php:这个文件为提交处理页面。 ==============================
2012-04-18 16:46:31
936
原创 jquery字符串相等判断
害我转悠半天 原来是空格! string1, string2 若其中有一个为返回值或类似 $.trim(string1) == $.trim(string2) ------------------------------------------------------------------------ jQuery.trim(str) 概述 去掉字符串起始和结尾的空格。
2012-04-18 16:30:00
67674
转载 memory_get_usage
This is iteration 0: 362784 This is iteration 1: 403848 This is iteration 2: 444912 This is iteration 3: 485976 This is iteration 4: 527040 This is iteration 5: 568104 This is iteration 6: 60916
2012-04-17 16:41:53
658
转载 ios5.0 在app内跳转到设置的方法和列举
原文 听到的最新解释是5.0开放 5.1关闭 搞毛呀 apple~ 在ios5.0之后apple 开放了 app 对setting 的链接,既用户可以通过app 自己的方法实现setting的跳转,其实方法也很简单主要是一下 2个代码: 1 2 NSURL *url=[NSURL URLWithString:@"prefs:root=WIFI"]; [
2012-04-13 15:56:32
2094
转载 栈和堆的区别
出处 1.1内存分配方面: 堆:一般由程序员分配释放,若程序员不释放,程序结束时可能由OS回收 。注意它与数据结构中的堆是两回事,分配方式是类似于链表。可能用到的关键字如下:new、malloc、delete、free等等。 栈:由编译器(Compiler)自动分配释放,存放函数的参数值,局部变量的值等。其操作方式类似于数据结构中的栈。 1.2申请方式方面: 堆:需要程序员自己申请,并指
2012-04-13 00:05:10
350
转载 对字符串等进行MD5加密
#import ... // Function definition NSString * md5( NSString *str ) { const char *cStr = [str UTF8String]; unsigned char result[16]; CC_MD5( cStr, strlen(cStr), result ); return [NSString stringWithF
2012-04-12 21:38:11
508
转载 secure transmission of the credentials
原文 The easiest way for secure transmission of the credentials is to use Https. On successful authentication you'll receive a "cookie" that you can store locally in the user defaults. That cookie wi
2012-04-12 20:11:10
321
原创 CommonCrypto/CommonCrypor.h
想给密码加密,初步考虑用md5.Iphone SDK里面自带了这个CommonCrypto。不过奇怪的是我没在framework里面找到,可能是系统自带的吧,不需要额外添加。可是更奇怪的是为什么Document里面也没找到。。。
2012-04-12 16:47:47
966
转载 objective-c中nonatomic作用是什么?
http://www.devdiv.com/thread-30105-1-1.html 它要与@synthesize一起使用才有意义。 atomic的意思就是setter/getter这个函数是一个原语操作。如果有多个线程同时调用setter的话,不会出现某一个线程执行setter全部语句之前,另一个线程开始执行setter情况,相当于函数头尾加了锁一样。 nonatomic不保
2012-04-12 15:15:02
755
转载 use scalar properties for primitive data types
1down vot If you have "Use scalar properties for primitive data types" selected when you generated the NSManagedObject subclasses for your entities, it will use scalar properties like int a
2012-04-12 00:37:34
2104
转载 IPhone加速计
转:http://bukkake.iteye.com/blog/941157 加速计是iPhone非常吸引人的特性之一,借由本特性产生了很多极具创意的游戏和便于用于的操作,令人惊叹的使用加速计无疑对开发iPhone程序是加分的亮点。 iPhone内置的加速计是三维全方向感知的,手机平面左右两侧对应加速计x轴负正,手机上下对应y轴正负,垂直手机平面朝里朝外对应z轴正负
2012-04-11 22:59:10
682
原创 [objective-C]setDateFormat
NSDateFormatter *formatter = [[NSDateFormatter alloc] init]; [formatter setDateFormat:@"yyyy-MM-dd hh:mm:ss"]; //12hours [formatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"]; //24hours NSTimeZone* t
2012-04-11 21:46:25
939
原创 php中创建JSON
$catname=array(); array_push($catname, "默认分类"); while($oldCategoryArray = mysql_fetch_array($result, MYSQL_NUM)){ array_push($catname, $oldCategoryArray[0]); } print json_encode($catname);
2012-04-11 19:53:36
631
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人