会员
周边
新闻
博问
闪存
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
Master HaKu
不积跬步,无以至千里;技术积累从点滴做起。
首页
新随笔
管理
上一页
1
···
13
14
15
16
17
18
19
20
21
···
54
下一页
2015年9月17日
STL - 判断式(Predicate) - 单参判断式(Unary Predicate)
摘要: Predicate是一种特殊的辅助函数,它会返回Boolean,常常被用来作为排序或者查找准则。Predicate会有1个或者2个操作数。Unary Predicate(单参判断式)例子:我们先写一个算法,如下:MathUtil.h#ifndef _Math_Util_H_#define _Math...
阅读全文
posted @ 2015-09-17 09:58 Master HaKu
阅读(1566)
评论(0)
推荐(0)
2015年9月16日
Python网络爬虫 - 3. 异常处理
摘要: handle_excpetion.pyfrom urllib.request import urlopenfrom urllib.error import HTTPErrorfrom bs4 import BeautifulSoupimport sysdef getLogo(url): try...
阅读全文
posted @ 2015-09-16 15:54 Master HaKu
阅读(319)
评论(0)
推荐(0)
Python网络爬虫 - 2. Beautiful Soup小试牛刀
摘要: 目标:我们解析百度首页的logobs_baidu_logo.pyfrom urllib.request import urlopenfrom bs4 import BeautifulSouphtml = urlopen("http://www.baidu.com")bsObj = Beautiful...
阅读全文
posted @ 2015-09-16 11:27 Master HaKu
阅读(265)
评论(0)
推荐(0)
Python网络爬虫 - 1. 准备工作
摘要: 1. 安装Beautiful Soup下载地址http://www.crummy.com/software/BeautifulSoup/bs4/download/4.4/解压后,进入根目录控制台下运行:python setup.py install运行结果:Processing dependenci...
阅读全文
posted @ 2015-09-16 11:17 Master HaKu
阅读(327)
评论(0)
推荐(0)
2015年9月7日
Python编程-基础知识-python项目包和文件的管理以及如何引用相对路径的包和模块
摘要: 目录 结构: core |____ __init__.py |____ basic |____ __init__.py |____ database |____ __init__.py |____ mysql |____ __init__.py |____ mysql_db.py |____ tes
阅读全文
posted @ 2015-09-07 15:05 Master HaKu
阅读(8812)
评论(2)
推荐(0)
2015年9月6日
STL - 函数作为算法的参数
摘要: 函数作为参数,相当于C++的函数指针, C#的委托for_each函数参数:#include #include #include #include "FuncParamTest.h"#include "../../Core/ContainerUtil.h"using namespace std;vo...
阅读全文
posted @ 2015-09-06 11:39 Master HaKu
阅读(299)
评论(0)
推荐(0)
2015年9月1日
STL - 移除(remove)和释放(erase)集合元素
摘要: remove(移除):这个操作并不是真正地删除元素,它会移除指定的元素,然后后面的元素依次前移,最后用别的元素来补充。erase(释放):这个操作会指定释放区间的头和尾迭代器(iterator)。如果要一次性删除指定元素:coll.erase(remove(coll.begin(), coll.en...
阅读全文
posted @ 2015-09-01 14:57 Master HaKu
阅读(707)
评论(0)
推荐(0)
2015年8月31日
STL - 迭代器 - 安插型迭代器
摘要: 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
阅读(198)
评论(0)
推荐(0)
STL - 算法 - 普通拷贝
摘要: 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
阅读(183)
评论(0)
推荐(0)
2015年8月29日
Python - 带参数的方法
摘要: 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
阅读(648)
评论(0)
推荐(0)
上一页
1
···
13
14
15
16
17
18
19
20
21
···
54
下一页
公告