纸人
百度空间 | 百度首页 
 
文章分类
 
 
心情(20)
 
 
Fuck(8)
 
 
 
 
c++(1)
 
 
Vbs(1)
 
 
 
     
 
背景音乐
 
 
文章列表
 
2009-08-24 15:05
很好,很强大,批量拿站真的很爽
 
2009-07-12 01:30
 
2009-07-11 19:17
长这么大终于看到活的跳蚤了
 
2009-06-26 14:27
多亏liveck提醒,不然蒙受不明之冤。网络太邪恶了……
 
2009-06-16 16:09

1、django管理后台

针对1.0版本,新建admin.py

from django.contrib import admin
from mysite.url.models import Url
class Admin(admin.ModelAdmin):
    list_display = ('url','Time',)
    search_fields = ('url',)

admin.site.register(Url,Admin)

2、设定默认时间

Time=models.DateTimeField('时间',default=datetime.datetime(2009, 1, 1, 0, 0, 0))

 
2009-06-04 13:28

首先数据库和表用utf-8。

cao='草'

cao=cao.decode("gbk").encode("utf-8")

MySQLdb.connect(host="127.0.0.1",user="xxx",passwd="xxx",db="xxx",charset="utf8")

查询sql ="select * from `xxx`.`x_xxx` where xxx = '%s'" % cao

 
2009-05-22 14:17

没有验证码,discuz

import urllib2,cookielib
import urllib
import httplib
cookie=cookielib.CookieJar()
opener=urllib2.build_opener(urllib2.HTTPCookieProcessor(cookie))
urllib2.install_opener(opener)
postdata=urllib.urlencode({'username':'xxx','password':'xxx'})
login_response= urllib2.urlopen('http://bbs.xxx.cn/logging.php?action=login&loginsubmit=yes&inajax=1',postdata)

有验证码,phpwind

import httplib

conn = httplib.H

 
2009-05-14 09:34
urlopen返回的应答对象response(或者HTTPError实例)有两个很有用的方法info()和geturl()

geturl -- 这个返回获取的真实的URL,这个很有用,因为urlopen(或者opener对象使用的)或许
会有重定向。获取的URL或许跟请求URL不同。

info -- 这个返回对象的字典对象,该字典描述了获取的页面情况。通常是服务器发送的特定头headers。
 
2009-04-23 16:36
socket.setdefaulttimeout(10)
 
2009-04-19 12:54
错误提示:
hhh@hhh-laptop:~/桌面$ ./netbeans-6.5-python-linux.sh
Configuring the installer...
Searching for JVM on the system...
Java SE Development Kit (JDK) was not found on this computer
JDK 6 or JDK 5 is required for installing the NetBeans IDE. Make sure that the JDK is properly installed and run installer again.
You can specify valid JDK location using --javahome installer argument.

To download the JDK, visit http://java.sun.com/javase/downloads
hhh@h
 
     
 
 
个人档案
 
huxingru123
男, 23岁
黑龙江 哈尔滨 
上次登录:
25天前
加为好友
 
   
 
最新照片
 
   
 
订阅我的空间
 
已有人次访问本空间
 
订阅RSS  什么是RSS?

您也想拥有这样的空间?请点此申请。
     


©2009 Baidu