1 class A{ 2 static int num = 1; 3 public static
void Display(){ 4 System.out.println( num ); 5 } 6 } 7 8 class B extends A{ 9
...
分类:
其他好文 时间:
2014-06-04 22:47:14
阅读次数:
219
[selfperformSelectorOnMainThread:@selector(fetchedData:)withObject:datawaitUntilDone:YES];会创建一个新的线程实行fetchedData函数,并传入参数data,并且会等待函数退出后再继续执行。-
(void)f...
分类:
其他好文 时间:
2014-06-04 20:50:55
阅读次数:
189
fd_set是一组文件描述符(fd,file
descriptor)的集合,它用一位来表示一个fd。系统提供了4个宏对描述符集进行操作: #include #include
//设置文件描述符集fdset中对应于文件描述符fd的位(设置为1)void FD_SET(int fd, fd_set *f...
分类:
系统相关 时间:
2014-06-04 20:48:17
阅读次数:
343
简单深搜,可以完全暴力,不会超时的。#include#include#includeusing
namespace std;#define MAX(a,b) (a>b?a:b) char maze[10][10];int n, maxn;void
DFS(int step,int count);in...
分类:
Web程序 时间:
2014-06-04 20:43:04
阅读次数:
270
方法一:-(void) viewDidLoad{[self
performSelectorInBackground:@selector(call1) withObject:nil];}-(void)
call1{timer1 = [NSTimer scheduledTimerWithTimeInte...
分类:
其他好文 时间:
2014-06-04 20:23:05
阅读次数:
228
public abstract class ModelsBase {
//自动从DataRow里取数据给属性赋值 public void RightDataFrom(DataRow row) { Type type =
this.GetType(); //遍历每一个属性 foreach...
分类:
其他好文 时间:
2014-06-04 20:18:20
阅读次数:
197
public class DiagramEditor extends
GraphicalEditorWithFlyoutPalette implementsIPersistableEditor{ public void
doSave(IProgressMonitor monitor) { ...
分类:
其他好文 时间:
2014-06-04 20:04:59
阅读次数:
397
Objective-C中的属性(property)它组合了新的预编译指令和新的属性访问的语法,新的属性功能显著减少了必须编写的冗长代码的数量。下面我们来比较下面的代码//第一种声明方法-(void)setRainHandling:(float)
rainHanding;-(float) rainHa...
分类:
其他好文 时间:
2014-06-04 20:00:10
阅读次数:
255
今天原本想模仿2048 游戏的。
但是在设计背景环境时,涉及到绘图的知识!于是就开始对绘图进行了一翻学习。 若想自己绘图必须 写自己的View(继承UICView);然后重写UIView
中的drawRect:rect 方法 -(void)drawRect:(CGRent)rect{ //...
分类:
其他好文 时间:
2014-06-04 19:09:33
阅读次数:
243
1. UITouch
的主要方法:C代码-(void)touchesBegan:(NSSet*)toucheswithEvent:(UIEvent*)event;-(void)touchesMoved:(NSSet*)toucheswithEvent:(UIEvent*)event;-(void)t...
分类:
其他好文 时间:
2014-06-04 19:06:53
阅读次数:
341