08 2015 档案

摘要:list coll1 = { 1, 2, 3, 4, 5, 6, 7, 8, 9 };cout >::printElements(coll1);vector coll2;copy(coll1.cbegin(), coll1.cend(), back_inserter(coll2));cout >::... 阅读全文
posted @ 2015-08-31 14:44 Master HaKu 阅读(179) 评论(0) 推荐(0) 编辑
摘要:list coll1 = { 1, 2, 3, 4, 5, 6, 7, 8, 9 }; vector coll2; cout >::printElements(coll1); // resize to have enough room coll2.resize(coll1.s... 阅读全文
posted @ 2015-08-31 11:40 Master HaKu 阅读(169) 评论(0) 推荐(0) 编辑
摘要: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 阅读(571) 评论(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 阅读(432) 评论(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) 编辑
摘要:from urllib.request import urlopenhtml = urlopen("http://www.baidu.com")print(html.read())注意: 以上代码基于Python 3.x 阅读全文
posted @ 2015-08-17 11:02 Master HaKu 阅读(338) 评论(0) 推荐(0) 编辑
摘要:1. TCP ServerThe server’s job is to set up an endpoint for clients to connect to and passively wait for connections. The typical TCP server goes throu... 阅读全文
posted @ 2015-08-10 11:11 Master HaKu 阅读(3162) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示