在Android中,为一个按钮增加监听的方式有三种 1.匿名内部类 @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); ...
分类:
移动开发 时间:
2015-05-21 22:22:51
阅读次数:
254
项目中创建表格, 引用头文件
#import "WBDataGridView.h"
- (void)viewDidLoad{
[super
viewDidLoad];
// Do any additional setup after loading the view.
self.view.backgroundC...
分类:
移动开发 时间:
2015-05-21 12:46:47
阅读次数:
219
1.方法的基本使用1> retain :计数器+1,会返回对象本身2> release :计数器-1,没有返回值3> retainCount :获取当前的计数器4> 重写dealloc方法 * 当一个对象要被回收的时候,就会调用 * 一定要调用[super dealloc],这句调用要放在最后面2....
分类:
其他好文 时间:
2015-05-21 12:33:12
阅读次数:
111
测试类:import junit.framework.TestCase;public class CoreTest extends TestCase { protected void setUp() throws Exception { super.setUp(); } ...
分类:
其他好文 时间:
2015-05-19 22:14:35
阅读次数:
218
实例代码:
(new OnHttpListener() {
@Override
public void onStart() {
// TODO Auto-generated method stub
super.onStart();
}
@Override
public void onProgress(int mProgress, Strin...
分类:
移动开发 时间:
2015-05-19 14:44:33
阅读次数:
142
Adventure of Super MarioTime Limit:2 Seconds Memory Limit:65536 KBAfter rescuing the beautiful princess, Super Mario needs to find a way home -- with ...
分类:
其他好文 时间:
2015-05-19 12:16:29
阅读次数:
120
先看几个函数:提到Android的触摸事件处理,不少人都会立刻想到某些令人头疼的函数,这里列举一下,刺激一下你的小神经: @Override
public boolean onTouchEvent(MotionEvent event) {
return super.onTouchEvent(event);
}
@Override
public b...
分类:
移动开发 时间:
2015-05-18 18:56:28
阅读次数:
148
@Categroy又称扩展类,可以动态的为类添加一些新的方法(只是方法,不能添加成员变量)
@使用Categroy对类进行扩展时,不需要创建子类
@如果分类方法与原始类中的相同,则会隐藏原始方法,且不可在分类方法中通过super调用原始方法,这里与继承不同。
@Categroy是一种简单的方式,实现了类的方法的模块化,把不同的类方法分配到不同的类文件中去。
...
分类:
其他好文 时间:
2015-05-18 09:02:52
阅读次数:
104
和最长上升子序列很相似,只不过这题求的是最长上升子序列和
所以定义dp[i] = 以a[i]为末尾的最长上升子序列的和。 其中以a[i]结尾的子序列可能是只包含a[i]的子序列,也可能是在满足j
因为影响决策的因素为子序列的两端,所以用二重循环递推
所以状态方程为dp[i] = max(dp[i],dp[j]+a[i]) 。
#include
#incl...
分类:
其他好文 时间:
2015-05-17 16:47:00
阅读次数:
115
本函数是实现访问父类或兄弟类对象,是返回一个代理类对象,以便访问父类或兄弟类的方法。使用这个函数主要用来避免在继续类时使用基类的类名称,以及多重继承时,保证只调用一次基类的构造函数。要注意点就是不能与调用基类名称方式混合使用。例子:#super()
class A:
def __init__(self):
print('A.init')
class B(A):
d...
分类:
编程语言 时间:
2015-05-17 10:52:50
阅读次数:
139