项目结构是这样子的:主场景代码是这样子的:local MainScene = class("MainScene", function() return display.newScene("MainScene")end)function MainScene:ctor() self.laye...
分类:
其他好文 时间:
2014-07-07 12:00:52
阅读次数:
170
照着官方的例子试验了一下DragonBone的使用,代码如下: 1 local AnotherScene = class("AnotherScene", function() 2 return display.newScene("AnotherScene") 3 end) 4 5 func...
分类:
其他好文 时间:
2014-07-05 17:40:58
阅读次数:
190
#import "MainViewController.h"
@interface MainViewController ()
@end
@implementation MainViewController
- (void)viewDidLoad
{
[super viewDidLoad];
//下载文件
[self download];
}
-(void)dow...
分类:
移动开发 时间:
2014-07-04 07:36:55
阅读次数:
347
ruby on rails 修改数据库内所有用户的密码 ,全部改成1111
项目文件夹内:
rails c
User.all.each do |u|
u.password='1111'
u.password_confirmation='1111'
u.save
end...
分类:
数据库 时间:
2014-07-03 18:31:09
阅读次数:
237
使用原生态的api上传文件的实现:
#import "MainViewController.h"
@interface MainViewController ()
@property (weak, nonatomic) UIImageView *imageView;
@end
@implementation MainViewController
- (void)viewDidLoad
{...
分类:
移动开发 时间:
2014-07-03 17:11:43
阅读次数:
279
根据mysql手册,mysql的变量分为两种:系统变量和用户变量。但是在实际使用中,还会遇到诸如局部变量、会话变量等概念。根据个人感觉,mysql变量大体可以分为四种类型:一、局部变量。局部变量一般用在sql语句块中,比如存储过程的begin/end。其作用域仅限于该语句块,在该语句块执行完毕后,局...
分类:
数据库 时间:
2014-07-02 19:38:35
阅读次数:
507
Cocos2d-x有一个包括全部其它头文件的cocos2d.h,仅仅要在使用时包括这个头文件,就能够使用引擎的全部功能。Cocos2d-x的类都放置于cocos2d的命名空间下,如引擎下的“actions/CCAction.h”中在文件首尾使用NC_CC_BEGIN和NS_CC_END来将全...
分类:
其他好文 时间:
2014-07-02 18:41:35
阅读次数:
242
@interface FirstViewController ()
@property (nonatomic,assign)BOOL isplay;
@end
@implementation FirstViewController
@synthesize isplay;
- (void)viewDidLoad
{
[super
viewDid...
分类:
其他好文 时间:
2014-07-02 10:47:22
阅读次数:
191
@interface RootViewController (){ UIView *view1; UIView *view2; int flag;}@end@implementation RootViewController- (void)viewDidLoad{ [s...
分类:
其他好文 时间:
2014-07-02 10:25:29
阅读次数:
130
.h文件
#import
@interface UILabel (ContentSize)
- (CGSize)contentSize;
@end
.m文件
#import "UILabel+ContentSize.h"
@implementation UILabel (ContentSize)
- (CGSize)contentSize {
NSMutablePa...
分类:
移动开发 时间:
2014-07-02 09:50:21
阅读次数:
223