上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 54 下一页
摘要: import mathclass Point: def move(self, x, y): self.x = x self.y = y def reset(self): self.move(0, 0) def calculate_dista... 阅读全文
posted @ 2015-08-29 17:08 Master HaKu 阅读(627) 评论(0) 推荐(0) 编辑
摘要: 1. 不可变字符串Objective-C:NSString *string1 = @"Hello World!";Swift:let string1 = "Hello world!"2. 可变字符串Objective-C:NSMutableString *string2 = [NSMutableSt... 阅读全文
posted @ 2015-08-28 16:55 Master HaKu 阅读(259) 评论(0) 推荐(0) 编辑
摘要: 1. MutabilityObjective-C offers several classes in both “regular” and mutable versions,such as NSString/NSMutableString, NSArray/NSMutableArray, and s... 阅读全文
posted @ 2015-08-28 16:30 Master HaKu 阅读(232) 评论(0) 推荐(0) 编辑
摘要: 1. 首先,声明一个2个大小的sprite数组class GameScreen : public cocos2d::Layer{public: ... cocos2d::Sprite *backgroundSpriteArray[2];};2. 完成初始化,1张图片用于当前显示,另1张用... 阅读全文
posted @ 2015-08-27 17:14 Master HaKu 阅读(567) 评论(0) 推荐(1) 编辑
摘要: Scene* MainMenu::createScene(){ // 'scene' is an autorelease object auto scene = Scene::create(); // 'layer' is an autorelease object ... 阅读全文
posted @ 2015-08-27 10:49 Master HaKu 阅读(430) 评论(0) 推荐(0) 编辑
摘要: iOS:This is done using XCode project details (select the requiredorientation) Android:AndroidManifest.xml (android:screenOrientation=portrait) 阅读全文
posted @ 2015-08-27 10:11 Master HaKu 阅读(181) 评论(0) 推荐(0) 编辑
摘要: // create vector with elements from 1 to 6 in arbitrary order vector coll = { 2, 5, 4, 1, 6, 3 }; // find and print minimum and maximum elements... 阅读全文
posted @ 2015-08-24 18:59 Master HaKu 阅读(208) 评论(0) 推荐(0) 编辑
摘要: attributes.pyclass Point: passp1 = Point()p2 = Point()p1.x = 5p1.y = 4p2.x = 3p2.y = 6print(p1.x, p1.y)print(p2.x, p2.y)first_method.pyclass Point:... 阅读全文
posted @ 2015-08-20 12:52 Master HaKu 阅读(456) 评论(0) 推荐(0) 编辑
摘要: 代码如下:/* 5. set & multiset */ set cities{ "Braunschweig", "Hanover", "Frankfurt", "New York", "Chicago", "Toronto", "Paris",... 阅读全文
posted @ 2015-08-17 17:32 Master HaKu 阅读(191) 评论(0) 推荐(0) 编辑
摘要: 不多说,看代码#include #include #include #include #include #include "ContainerTest.h"#include "ContainerUtil.h"using namespace std;void ContainerTest::run(){... 阅读全文
posted @ 2015-08-17 17:06 Master HaKu 阅读(224) 评论(0) 推荐(0) 编辑
上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 54 下一页