用处:开关空间,用于处理两种状态-(void)viewDidLoad{ [super viewDidLoad]; CGRect frame = CGRectMake(20,20,0,0); self.switch = [[UISwitch alloc]initWithFrame:frame]; //...
分类:
其他好文 时间:
2014-08-06 18:23:01
阅读次数:
213
用处:输入控件-(void)viewDidLoad{ [super viewDidLoad];//设置大小CGRect frame = CGRectMake(20,20,150,40);//实例化UITextFieldself.tf = [[UITextField alloc]initWithFra...
分类:
其他好文 时间:
2014-08-06 17:16:41
阅读次数:
213
最近温习《learn objective-c on the mac》第4章关于重写的调用了[super setFillColor:c]很不理解其作用,可能是因为翻译逻辑不清的原因吧,特地写了个小例子理解一下定义一个father类和son类father:#import @interface fathe...
分类:
其他好文 时间:
2014-08-06 11:41:41
阅读次数:
241
public class NotificationTest extends Activity
{
static final int NOTIFICATION_ID = 0x1123;
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setC...
分类:
移动开发 时间:
2014-08-05 19:23:00
阅读次数:
202
cell被重用如何提前知道?
重写cell的prepareForReuse官方头文件中有说明.当前已经被分配的cell如果被重用了(通常是滚动出屏幕外了),会调用cell的prepareForReuse通知cell.注意这里重写方法的时候,注意一定要调用父类方法[super prepareForReuse] .这个在使用cell作为网络访问的代理容器时尤其要注意,需要在这里通知取消掉前一次网络...
分类:
其他好文 时间:
2014-08-05 15:58:09
阅读次数:
352
UITableView.01:section:组别row:行号【1】拖入一个UITableView【2】将TableView的dataSource与控制器连接【3】首先得遵循UITableView的数据源协议代码1.加入显示数据内容- (void)viewDidLoad{ [super vie...
分类:
其他好文 时间:
2014-08-05 00:20:28
阅读次数:
412
Problem Description
Nowadays, a kind of chess game called “Super Jumping! Jumping! Jumping!” is very popular in HDU. Maybe you are a good boy, and know little about this game, so I introduce it to yo...
分类:
其他好文 时间:
2014-08-04 17:50:47
阅读次数:
158
fromdecimalimport*fromPyQt4.QtGuiimport*fromPyQt4.Qtimport*fromPyQt4.QtCoreimport*importsysclassExample(QWidget):def__init__(self,args=None):super(Exa...
分类:
其他好文 时间:
2014-08-04 10:32:47
阅读次数:
245
~~~~
两道题的意思差不多,HDU上是求最长上升子序列的和,而POJ上就的是其长度。
貌似还有用二分写的nlogn的算法,不过这俩题n^2就可以过嘛。。
~~~~
题目链接:
http://acm.hdu.edu.cn/showproblem.php?pid=1087
http://poj.org/problem?id=2533
~~~~
HDU1087:
#include...
分类:
其他好文 时间:
2014-08-02 23:30:15
阅读次数:
243
Java的继承是通过extends和implement来实现的,Java不支持多继承,但是Java支持多层继承以及多实现(接口)。Java继承有一个关键字super是用来指向父类。Java继承衍生出覆盖的概念。覆盖被用来支持多态。实际开发中Java通常继承于抽象类,实现于接口。如果不希望一个类被继承...
分类:
编程语言 时间:
2014-08-02 20:44:13
阅读次数:
219