上篇中的程序实现了抓取0daydown最新的10页信息,输出是直接输出到控制台里面。再次改进代码时我准备把它们写入到一个TXT文档中。这是问题就出来了。
最初我的代码如下:
#-*- coding: utf-8 -*-
#-------------------------------------
#version: 0.1
#note:实现了查找0daydown最新发布的10页资源。
#---...
分类:
Web程序 时间:
2015-03-17 00:52:13
阅读次数:
323
Since the original tech preview release of FastCGI last year, we've been seeing a lot of requests for getting Ruby on Rails running with our FastCGI. ...
requests是python的第三方库,号称:Requests: HTTP for Humans中文快速教程在这:http://cn.python-requests.org/zh_CN/latest/看完之后有点迷惑,不知道怎么用,看了一下源码,发现 #官冈文档中第一条就是 >>> r...
分类:
编程语言 时间:
2015-03-11 23:06:35
阅读次数:
164
Spring Web MVC
官方文档的介绍:
The Spring Web model-view-controller (MVC) framework is designed around a DispatcherServlet that dispatches requests to handlers, with configurable handler mappings...
分类:
编程语言 时间:
2015-03-05 19:28:38
阅读次数:
304
fid= fopen('reqJosn.json', 'w+');load('request-set-10.mat');requests = requests.request;requestNum = length(requests);for i = 1:1 request.name = sp...
分类:
Web程序 时间:
2015-03-05 18:59:39
阅读次数:
230
def downloadImage(url): ? ? local_filename = url.split(‘/‘)[-1] ? ? r = requests.get(url, stream=True) ? ? with open(local_filename, ‘wb‘) as f: ? ? ? ? for chunk in r.iter_content(chunk_...
分类:
编程语言 时间:
2015-03-05 13:08:48
阅读次数:
359
原文: SQL Server 性能调优(一)——从等待状态判断系统资源瓶颈 通过DMV查看当时SQL SERVER所有任务的状态(sleeping、runnable或running)2005、2008提供了以下三个视图工详细查询:DMV用处Sys.dm_exec_requests返回有关在SQL S...
分类:
数据库 时间:
2015-03-05 12:43:53
阅读次数:
4443
主要就是用了两个库,urllib和BeautifulSoup.作用是从HTML中解析出解梦的查询词和具体的解释。 1 # -*- coding: utf-8 -*- 2 import urllib, urllib2 3 import time, random 4 from BeautifulSoup...
分类:
编程语言 时间:
2015-03-01 14:23:32
阅读次数:
189
使用shell-bash写的一些API,可以直接用到自己的shell脚本中,欢迎pull requests:
https://github.com/CanuxCheng/bashAPI
在linux、unix上做c开发的,可以写自己的包裹函数,欢迎pull requests:
https://github.com/CanuxCheng/cAPI
github上的其...
分类:
其他好文 时间:
2015-03-01 13:16:44
阅读次数:
131
>>> dir(soup)['ASCII_SPACES', 'DEFAULT_BUILDER_FEATURES', 'HTML_FORMATTERS', 'ROOT_TAG_NAME', 'XML_FORMATTERS', '__bool__', '__call__', '__class__', '...
分类:
其他好文 时间:
2015-02-28 14:30:28
阅读次数:
174