原创 python 3.3 爬蟲之爬取圖片
今天沒事用BeautifulSoup寫了一個爬取淘寶頁面的部分圖片的代碼,之前用正則也寫了一個,感覺用BeautifulSoup 更簡單了 import urllib import urllib.request as request fr
原创 sift,surf匹配代碼
#include "opencv2/highgui/highgui.hpp" #include "opencv2/calib3d/calib3d.hpp" #include "opencv2/imgproc/imgproc.hpp" #i
原创 C語言 遞歸拆分數字
#include<stdio.h> int stack[100]; int top; int total,n; void dfs(int index) { int i; if(total==n) { printf("%d
原创 python的一些性質
a='[1,2,3]' a=eval(a) 用eval可以將字符串轉換爲表達式,即將'[1,2,3]'轉換爲列表
原创 matrix 重載操作,firend 函數實現 簡單的例子
#include<iostream> #define MAX 10 using namespace std; class matrix; matrix& operator-(matrix& b,const matrix& c); clas
原创 字符串中查找字符串的位置
#include<iostream> using namespace std; void findstr(char* src,char *dst) { int i=0,j=0,pos; for(;src[i];) {
原创 VideoCapture
#include<opencv2/opencv.hpp> #include<iostream> using namespace std; using namespace cv; int main() { VideoCapture
原创 opencv tracker
#include<opencv2/opencv.hpp> #include<iostream> using namespace std; using namespace cv; Mat src; int threshval=128; st
原创 樂其面試題-求數組的最大三個數
#include<iostream> using namespace std; void main() { int a[]={3,6,2,3,1,3,1,9,3,7}; int onemax,secmax,thrmax; onema
原创 python3.3 爬蟲小例子
第一個爬蟲小例子仿照大神:http://blog.csdn.net/pleasecallmewhy/article/details/8927832 的博客轉化成python3.3,算是我的入門爬蟲吧 第一個爬蟲小例子: import ur
原创 python 爬蟲
本人用python 3.3 這版本的爬蟲資料有點少,從基礎總結吧 如何查看最新版本可用的函數呢? >>> import urllib >>> help(urllib) Help on package urllib: NAME
原创 微軟
題目來源:http://bbs.csdn.net/topics/350118968 July大神的博客 第一題: 把二元查找樹轉變成排序的雙向鏈表 題目: 輸入一棵二元查找樹,將該二元查找樹轉換成一個排序的雙向鏈表。 要求不能創建任何
原创 sscanf簡單用法
1.拆分數字(數字用空格隔開) #include<stdio.h> void main() { char str[100]="123 ahdkf 345 sdhk 5 6 sdhk 7 sdfh 22 33";
原创 BeautifulSoup 對象方法
from bs4 import BeautifulSoup,Tag,CData import re doc = ['<html><head><title>Page title</title></head>', '<body>
原创 hdu-acm
Problem Description Given a sequence a[1],a[2],a[3]......a[n], your job is to calculate the max sum of a sub-sequence.