只是小人物

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
上一页 1 2 3 4 5 6 ··· 10 下一页

2014年1月11日

摘要: 格式:@property(参数1,参数2)类型 名字;参数可有可无如:@property int age; @property (nonatomic,retain) UIButton* btn;参数主要类型分3类读写属性:readwrit/readonlysetter处理:assign/retain/copy原子性:atomic/nonatomic@property(assign) in a;//这里的assign是默认类型,直接赋值setter方法,而不进行retain操作,等价于@property int a;@property (retain) Card *card;//这里的reta. 阅读全文
posted @ 2014-01-11 01:19 只是小人物 阅读(206) 评论(0) 推荐(0) 编辑

2014年1月10日

摘要: 一、管理范围:任何继承了NSObject的对象,对基本数据类型无效原理:1.每个对象都有个引用计数器,是一个与之关联的整数2.使用了alloc,new,copy等关键词会对对象的计数器计数为13.给对象发送一条retain消息,可以使对计数器+14.给对象发送一条release消息,可以使对计数器-15.当一个对象的的引用计数器的值为0时,那么它将被销毁,OC也会自动向对象发送一条dealloc消息。一般会重写dealloc方法(类似遗言遗言),一定不要直接调用dealloc方法- (void)dealloc{ NSLog(@"%@被销毁了",self); [superde 阅读全文
posted @ 2014-01-10 13:58 只是小人物 阅读(173) 评论(0) 推荐(0) 编辑

摘要: 二。构造方法和description方法1.构造方法的定义- (id)initWithAge:(int)newAge andNo:(int)newNo;2.实现构造方法- (id)initWithAge:(int)newAge andNo:(int)newNo{//首先调用super的构造方法//如果self不为nilif(self =[super init]){//等价于self=[super init] if(self !=nil ){}_age=age;}}3.重写父类的description方法当使用%@打印一个对象的时候,会调用这个方法- (NSString *)descriptio 阅读全文
posted @ 2014-01-10 11:50 只是小人物 阅读(193) 评论(0) 推荐(0) 编辑

摘要: 一。OC概述特点:1没有包得概念2关键字以@开头3.拓展名 .m二。第一个OC类1,分为2个文件。.m和.h文件2. .m文件用来实现类 .h用来定义声明类.h文件中得写法//@interface 代表声明一个类//:表示继承#import @interface Student : NSObject{//成员变量定义在大括号中 int age; int no;}//age 的get 方法//-代表动态方法,+代表静态方法- (int)age;-(int)no;- (void)setAge:(int)newAge;-(void)setAge:(int)newAge andNo:(int)ne.. 阅读全文
posted @ 2014-01-10 11:49 只是小人物 阅读(123) 评论(0) 推荐(0) 编辑

2013年1月4日

摘要: //让Iframe自动适应高度function SetWinHeight(obj){var win=obj;if (document.getElementById){if (win && !window.opera){if (win.contentDocument && win.contentDocument.body.offsetHeight){if(win.contentDocument.body.offsetHeight<420){win.height = 420;//设置最小高度}else{win.height = win.contentDocum 阅读全文
posted @ 2013-01-04 08:45 只是小人物 阅读(2629) 评论(0) 推荐(0) 编辑

2012年11月23日

摘要: 今天在虚拟机上装tomcat6 启动时候遇到问题:命令窗口闪一下就消失 在cmd里面运行startup.bat 得到the java_home environment variable is not defined correctlyThis environment variable is needed to run this programNB: java_home should point to a jdk not a jre意思是JAVA_HOME应该指向JDK而不是JRE首先检查环境:cmd里运行输入javac跟java命令 正常 输入if not exist "%JAVA_ 阅读全文
posted @ 2012-11-23 09:15 只是小人物 阅读(321) 评论(0) 推荐(0) 编辑

2012年10月17日

摘要: <script type="text/javascript"> //1.首先json 格式一定要这样写,尽管说这只是其中的一种方式 var json = {"options":"[{\"text\":\"王家湾\",\"value\":\"9\"},{\"text\":\"李家湾\",\"value\":\"10\"},{\"text\":\"邵 阅读全文
posted @ 2012-10-17 10:33 只是小人物 阅读(1874) 评论(0) 推荐(0) 编辑

2012年10月12日

摘要: dTree是一个免费的JavaScript树形菜单,使用简单,界面制作的也很专业。dtree树形菜单所谓“兵无常势,水无常形”,不同的项目需求,造成菜单树的各种变化,因此在介绍dTree的同时,本文着重讲述如何改造dTree,以达到为不同项目所用的目的。dTree 分析dTree的使用非常简单,在下载的dTree压缩文件中(2.05),要用的只有三个:1. dtree.js : dtree功能脚本2. dtree.css : 样式文件3. img文件夹 : 存放dtree使用的图标,参看下图:dtree图标很容易就可以编写出类似上面的dtree菜单树,源代码如下:<html>< 阅读全文
posted @ 2012-10-12 09:35 只是小人物 阅读(288) 评论(0) 推荐(0) 编辑

2012年10月8日

摘要: 最近在写一个页面,在出了ie6外的所有浏览器中都正常(ie7,8,9, firefox, chrome), IE6下提示 “无法设置selected属性。未指明的错误”。后来发现是jquery 在 ie6 下操作 select控件有BUG.我程序中是这样使用的:$("#genre").val(0);改成:setTimeout(function(){ $("#genre").val(0); },1);就可以了.原因是:Note that the error will only occur if you call appendChild, then ask 阅读全文
posted @ 2012-10-08 16:40 只是小人物 阅读(240) 评论(0) 推荐(0) 编辑

2012年9月24日

摘要: web.xml中的配置 步骤如下: 一、打开WEB-INF文件夹下web.xml文件; 二、在里面新增: <!-- 404 页面不存在错误 --> <error-page> <error-code>404</error-code> <location>/errorPage404.jsp</location> </error-page> <!-- 500 服务器内部错误 --> <error-page> <error-code>500</error-code> &l 阅读全文
posted @ 2012-09-24 15:33 只是小人物 阅读(475) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 ··· 10 下一页