原创 使用 python urllib2 抓取網頁時出現亂碼的解決方案

http://www.zhxl.me/1409.html 這裏記錄的是一個門外漢解決使用 urllib2 抓取網頁時遇到亂碼、崩潰、求助、解決和漲經驗的過程。這類問題,事後看來只是個極小極小的坑,不過竟然花去很多時間,也值得記錄一

原创 Django js css 靜態資源(二)超級棒

https://segmentfault.com/a/1190000000358284 SegmentFault 問答文章筆記職位活動搜索 輸入關鍵字搜索 消息註冊 · 登錄 home feed javascript

原创 啓動apache Fail

由於apache默認是監聽80端口,如果你的電腦iis是啓動狀態,並且也使用了80端口,apache將無法正常啓動,需要先停止iis,另外迅雷也可能會使用80端口,所以也要關閉迅雷。查看80端口是否被佔用,命令行下輸入: net

原创 django manage.py Unknown command: 'runfcgi'

當我們使用python django manage.py runfcgi 時,有時候會出現錯誤: Unknown command: ‘runfcgi’ 這是由於django版本,在1.9以上不支持runfcgi命令,如果要使用

原创 UI自動化

Sahi ,selenium,casperjs,phatmjs,notejs,Protractor(angularjs框架 )

原创 PL/sql sqlplus 運行一個sql 文件

sql> @D:\software\utplsql-2-3-0\code\ut_i_do install; 其他目錄 沒有和sqlplus在一個目錄下面 sql> @my.sql; –當前目錄

原创 python thread group argument must be none for now

http://stackoverflow.com/questions/15349997/assertionerror-when-threading-in-python 出錯的代碼: t = threading.Thread(crawl

原创 oracle

alter system set local_listener = ‘(ADDRESS=(PROTOCOL=TCP)(HOST=ip)(PORT=8866))’ scope = both; alter system register;

原创 Oracle PL/SQL入門學習

Case用法 declare b1 VARCHAR2(50); BEGIN b1 := 'd'; CASE b1 WHEN 'b' THEN DBMS_OUTPUT.put_line('b'); WHEN

原创 python cross module global variable

跨模塊的global variable 只能讀取,不能更改 無效

原创 LeetCode Longest Common Prefix

class Solution(object): def longestCommonPrefix(self, s): """ :type s: str :rtype: str

原创 python automated headers 自動生成格式化 註釋文件 docstrings

方法一:gvim http://stackoverflow.com/questions/6201302/how-to-have-automated-headers-for-python-files https://sites.googl

原创 python django form error:module' object has no attribute '_meta'

test.py from django.db import models from django.forms import ModelForm class Book(**models.Model**): name = mode

原创 Leet Code Invert Binary Tree

# Definition for a binary tree node. # class TreeNode(object): # def __init__(self, x): # self.val = x #

原创 leetcode Reverse String

class Solution(object): def reverseString(self, s): """ :type s: str :rtype: str ""