雕刻时光

just do it……nothing impossible
随笔 - 547, 文章 - 0, 评论 - 82, 阅读 - 86万
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

04 2014 档案

摘要:Scrapy是基于python的开源爬虫框架,使用起来也比较方便。具体的官网档:http://doc.scrapy.org/en/latest/ 之前以为了解python就可以直接爬网站了,原来还要了解HTML,XML的基本协议,在了解基础以后,在了解下xpath的基础上,再使用正则表达式(p... 阅读全文

posted @ 2014-04-30 11:52 huhuuu 阅读(14814) 评论(0) 推荐(0) 编辑

摘要:My first Heading My first paragraph. 与 之间的文本描述网页 与 之间的文本是可见的页面内容 与 之间的文本被显示为标题 与 之间的文本被显示为段落第二个例子:My first Heading My second Heading My first para... 阅读全文

posted @ 2014-04-29 11:52 huhuuu 阅读(441) 评论(0) 推荐(0) 编辑

摘要:#coding=utf-8class data: def __init__(self): #构造函数 self.name='1234' def pp(self): print self.nameclass data2(data): #data2 继承 d... 阅读全文

posted @ 2014-04-25 21:04 huhuuu 阅读(290) 评论(0) 推荐(0) 编辑

摘要:#coding=utf-8import reimport urllibdef getHtml(url): #获取url对应得源码 page = urllib.urlopen(url) html = page.read() return htmldef getImg(html): #... 阅读全文

posted @ 2014-04-25 19:06 huhuuu 阅读(497) 评论(0) 推荐(0) 编辑

摘要:大致流程是,创建一个窗口,在里面添加精灵(背景,小鸟,地板,水管),然后设置物理世界(小鸟的为受重力影响的,其他的精灵不受重力影响),然后在设置碰撞时的情况(小鸟与地板,水管相撞的话,就game over),再设置鼠标的点击事件(点击一次小鸟就上升一段距离)。主类中的变量方法:class HelloWorld : public cocos2d::CCLayer,public b2ContactListener{public: cocos2d::CCSize screenSize;// cocos2d::CCSprite *bird; b2World * world; ... 阅读全文

posted @ 2014-04-10 17:20 huhuuu 阅读(629) 评论(0) 推荐(0) 编辑

摘要:单例模式,故名思意是只有单个实例对象的类。所以要控制构造函数,赋值函数的使用。注意对类静态对象赋予初值的方法。#includeusing namespace std;class CSingleton{ //其他成员public: static CSingleton* GetInstance() { if ( m_pInstance == NULL ) //判断是否第一次调用 m_pInstance = new CSingleton(); return m_pInstance; } ~CSingleton(){ ... 阅读全文

posted @ 2014-04-08 19:12 huhuuu 阅读(266) 评论(0) 推荐(0) 编辑

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