原创 初學java整理

extends與implements的區別: extends是繼承父類,只要那個類不是聲明爲final或者那個類定義爲abstract的就能繼承,JAVA中不支持多重繼承,但是可以用接口來實現,這樣就用到了implements,繼承只能繼

原创 SQL遇到錯誤整理

The credentials you provided for the SQL Server Agent service are invalid. To continue, provide a valid account and pas

原创 contextlib

>>> import contextlib >>> @contextlib.contextmanager ... def make_context(): ... print 'enter' ... try: ...

原创 anaconda使用整理

# 創建一個名爲python34的環境,指定Python版本是3.4(不用管是3.4.x,conda會爲我們自動尋找3.4.x中的最新版本) conda create--name python34python=3.4   # 安裝好

原创 textwrap

1.dedent Remove any common leading whitespace from every line in text. Note that tabs and spaces are both treated as wh

原创 寫makefile基本點

= 是最基本的賦值 := 是覆蓋之前的值 ?= 是如果沒有被賦值過就賦予等號後面的值 += 是添加等號後面的值

原创 set and frozenset

>>> x = set("A Python") >>> x set(['A', ' ', 'h', 'o', 'n', 'P', 't', 'y']) Sets are implemented in a way, which doesn'

原创 dictionary

>>> a = {"1":"WuWei"} >>> name = a.pop('2', []) >>> name [] >>> name = a.pop('2') Traceback (most recent call last):

原创 P4python sync code from perforce

P4WORKSPACE = "wsx" P4PATH = "/home/s/Perforce/" P4PORT = "perforce-xxx:1800" def _sync_packages(view_common_path): """

原创 apps

keep apps small and simpleapps can be reused between projects 點贊 收藏 分享 文章舉報 xiaoxinyu316

原创 RESTful API 設計最佳實踐

來源:http://www.oschina.net/translate/best-practices-for-a-pragmatic-restful-api   數據模型已經穩定,接下來你可能需要爲web(網站)應用創建一個公開的AP

原创 subprocess

import subprocess _VERBOSE = True def run_cmd(cmd): if _VERBOSE: print cmd process = subprocess.Popen(

原创 That darn "libtoolize: AC_CONFIG_MACRO_DIR([m4]) conflicts with ACLOCAL_AMFLAGS=-I m4" error

Is caused by using CRLFs in Makefile.am. "m4<CR>" != "m4" and thus the lib

原创 Jenkins使用整理

In the Global Security, I didn't have a TCP port for JNLP agents enabled, which automatically disables the line "Launch

原创 mac學習整理

1.xcode-select --switch /build/toolchain/mac32/xcode-7.3/Xcode.app