熊咪

2015年5月19日

javaweb-dbutils

摘要: package cn.itcast.demo;import java.io.File;import java.io.FileNotFoundException;import java.io.FileReader;import java.io.IOException;import java.sql.S... 阅读全文

posted @ 2015-05-19 15:15 熊咪 阅读(131) 评论(1) 推荐(0) 编辑
javaweb-c3p0

摘要: //c3p0-config.xml com.mysql.jdbc.Driver jdbc:mysql://localhost:3306/day16 root root 5 10 5 20 com.mysql.jdbc.Driver jdbc:mysql://localh... 阅读全文

posted @ 2015-05-19 10:37 熊咪 阅读(194) 评论(2) 推荐(0) 编辑
javaweb-dbcp2

摘要: package cn.itcast.utils;import java.io.InputStream;import java.sql.Connection;import java.sql.DriverManager;import java.sql.ResultSet;import java.sql.... 阅读全文

posted @ 2015-05-19 10:14 熊咪 阅读(179) 评论(3) 推荐(0) 编辑
javaweb-dbcp

摘要: package cn.songxinqiang.samples.commonsdbcp.util;import java.sql.Connection;import java.sql.DatabaseMetaData;import java.sql.SQLException;import java.... 阅读全文

posted @ 2015-05-19 10:06 熊咪 阅读(112) 评论(0) 推荐(0) 编辑

2015年5月16日

爬虫学习---美丽汤

摘要: #coding:utf-8#version: 0.1#note:实现了查找0daydown最新发布的10页资源。import urllib.requestfrom bs4 import BeautifulSoupfor i in range(1,11): url = "http://www.0day... 阅读全文

posted @ 2015-05-16 13:21 熊咪 阅读(169) 评论(0) 推荐(0) 编辑
爬虫学习--使用百度api---天气

摘要: #coding:utf-8#version:0.1#note:该即用API能查询指定城市的空气质量指数,但城市数量有限,截止2015年3月26日,只能查到全国161个城市的。import urllib.requestimport jsonimport collectionsimport urllib... 阅读全文

posted @ 2015-05-16 13:02 熊咪 阅读(267) 评论(0) 推荐(0) 编辑

2015年5月15日

爬虫学习----案例

摘要: # -*- coding: utf-8 -*-#---------------------------------------# 程序:山东大学爬虫# 版本:0.1# 作者:why# 日期:2013-07-12# 语言:Python 2.7# 操作:输入学号和密码# 功能... 阅读全文

posted @ 2015-05-15 12:38 熊咪 阅读(170) 评论(1) 推荐(0) 编辑
爬虫学习---模拟提交

摘要: import urllib import urllib.requestimport http.cookiejarcookie = http.cookiejar.CookieJar() opener = urllib.request.build_opener(urllib.request.HTTPC... 阅读全文

posted @ 2015-05-15 11:13 熊咪 阅读(238) 评论(0) 推荐(0) 编辑
爬虫学习---糗事百科

摘要: 由于我用的3.3.这个是2.7的,所以测试未通过,但是可以作为参照学习的呀# -*- coding: utf-8 -*- import urllib2 import urllib import re import thread import time #----------- 加... 阅读全文

posted @ 2015-05-15 10:17 熊咪 阅读(147) 评论(0) 推荐(0) 编辑
爬虫学习----pattern

摘要: 1.matchmatch(string[, pos[, endpos]]) | re.match(pattern, string[, flags]):这个方法将从string的pos下标处起尝试匹配pattern;如果pattern结束时仍可匹配,则返回一个Match对象;如果匹配过程中patter... 阅读全文

posted @ 2015-05-15 09:37 熊咪 阅读(340) 评论(0) 推荐(0) 编辑