原创 Python_面向對象編程

字段(Field)和方法(Method)稱爲類的屬性(Attribute)。實例對象(Instance Variables),類變量(Class Variables)selfPython如何給self賦值?假設一個MyClass類,這個類

原创 Python基礎_標準庫

sys模塊import sys print(sys.version_info)日誌模塊 logging用來記錄信息os模塊用以和操作系統交互os.path.join()這個函數會確保完整的位置路徑符合當前操作系統的預期格式platfor

原创 Python基礎_異常和錯誤

可以用try...except...else來處理異常狀況。拋出異常raise語句Try...Finally 釋放資源with語句with open("poem.txt") as f: for line in f:

原创 Vue起步_hello world

vue中文官方文檔 https://cn.vuejs.org/打開vscode編輯器,創建index.html文件,編輯:原始hello world:<!DOCTYPE html> <html lang="en"> <head>

原创 Python基礎_模塊(四)

模塊import sys print('The command line arguments are:') for i in sys.argv: print(i) print('\n\nThe PYTHPATH is', sy

原创 Python基礎_IO

poem = """\ Programming is fun when the work is done if you wanna make your work also fun: use Python! """ # 打開文

原创 Python基礎(三)

局部變量x = 50 def func(x): print('x is', x) x = 2 print('change local x to', x) func(x) print('x is st

原创 Hello World

使用解釋器提示符>>>這個被稱爲Python解釋器提示符。退出解釋器提示符[ctrl + z] 組合鍵並敲擊 [enter] 鍵退出選擇一款編輯器PyCharm使用一份源代碼文件$ python hello.pyHello World獲取

原创 Python基礎(二)

運算符**(乘方):3**4輸出81(即3*3*3*3)//(整除):13//3輸出4。-13//3輸出-5.%(取模):13%3輸出1。-25.5%2.25輸出1.5。-(按位取反):x的按位取反爲-(x+1) not(布爾非)、and

原创 安裝Python

爲了學習爬蟲,特意來學習Python語言,經推薦將《A Byte Of Python》作爲入門教程,希望能打好基礎,走的更遠。在Windows中安裝注意:請務必注意勾選了Add Python 3.5 to PATHDOS提示符如果你希望在

原创 Python基礎_數據結構(五)

Python中有四種內置的數據結構——列表(List)、元祖(Tuple)、字典(Dictionary)和集合(Set)。列表(List):用來保存一系列有序項目的集合。(可變的)項目的列表應該用方括號括起來。shoplist = ['a

原创 Vue項目首頁_熱銷推薦組件、週末遊組件開發

熱銷推薦效果:新建Recommend.vue:<template> <div> <div class="title">熱銷推薦</div> <ul> <router-link tag="li

原创 Vue起步_Vue實例生命週期

生命週期函數就是Vue實例在某一個時間點會自動執行的函數。<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</ti

原创 用Jenkins自動化搭建測試環境_Jenkins基礎配置

配置全局安全屬性:--> 給admin賦予全部權限:添加用戶:  新建用戶tester01:爲tester01用戶分配權限:(除了Administer之外的所有權限)先全選,再去掉Administer前面的對號。使用tester01用戶登

原创 Vue項目首頁_首頁輪播圖

創建新分支:把線上的分支拉到本地來:git pullgit checkout index-swiper輪播插件Vue-Awesome-Swiper使用穩定版本v2.6.7引入vue-awesome-swiper: npm install