创建一个菜单字
var startScene =cc.Scene.extend({
//判断游戏是否已经开始
is_Start : false,
//创建构造函数
ctor :function(){
//初始化父类中的构造函数
this._super();
//写一个laebl型的菜单
//var label= new cc.LabelTTF...
分类:
Web程序 时间:
2014-12-23 12:25:11
阅读次数:
165
- (void)viewDidLoad{ [super viewDidLoad]; _scrollView = [[UIScrollView alloc]initWithFrame:CGRectMake(0, 66, 320, 480)]; //中间还有其他控件 ...
分类:
Web程序 时间:
2014-12-23 10:21:54
阅读次数:
220
题目意思:
http://acm.hdu.edu.cn/showproblem.php?pid=1087
此题的意思求最长上升子序列的和。
题目分析:
在求最长上升子序列的时候,不在保存最长的个数,而是保存他们的和即可。
AC代码:
/**
*最长上升子序列问题+保存得到的分数
*/
#include
#include
#include
#include
#...
分类:
其他好文 时间:
2014-12-22 19:37:21
阅读次数:
171
下例为:监听文本框 accountField 内容的改变, 当发生改变时, 调用textChange方法(多次)。监听结束需要移除通知。- (void)viewDidLoad{ [super viewDidLoad]; // 1.监听通知 [[NSNotificationC...
分类:
移动开发 时间:
2014-12-21 21:53:13
阅读次数:
272
本文以新浪微博的Oauth认证为例子进行Post请求的演示
下面直接上代码:
#import "ViewController.h"
#import "AFNetworking.h"
@interface ViewController ()
@end
@implementation ViewController
- (void)viewDidLoad {
[super viewD...
分类:
Web程序 时间:
2014-12-21 16:41:36
阅读次数:
397
在onCreate()方法中添加如下代码:public class FirstActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.o...
分类:
移动开发 时间:
2014-12-20 19:33:13
阅读次数:
166
#-*-coding:utf-8-*-__author__='Administrator'importsysfromPyQt4importQtGuiclassMyWindow(QtGui.QWidget):def__init__(self,parent=None):super(MyWindow,se...
分类:
其他好文 时间:
2014-12-19 17:24:03
阅读次数:
242
那么类别与继承相比,有什么缺点吗?类别不可以声明新的成员变量,而且一旦你定义的方法与原始类中的方法名称相同,那么原始方法将被隐藏起来,因为不是继承结构,你不能在类别中的方法使用super 激活原始类的同名方法。@interface 相当于是Objective-C 的类的原型,与JAVA 中的接口意义...
分类:
其他好文 时间:
2014-12-19 15:31:41
阅读次数:
123
原文:http://www.cnblogs.com/android100/p/Android-get-ip.html1.使用WIFI首先设置用户权限其次,代码如下publicvoidonCreate(BundlesavedInstanceState){super.onCreate(savedInst...
分类:
移动开发 时间:
2014-12-19 15:27:58
阅读次数:
160
public class MonitorPhone extends Activity {
TelephonyManager tManager;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layo...
分类:
移动开发 时间:
2014-12-19 10:08:22
阅读次数:
249