Python_datetime發表於2021-11-01更新於2021-11-01 Python_datetime date(日期)、time(時間)、datetime(date+time) timedelta(計算立時期間的型態)、timezone(處理時區資訊的型態) 1import datetime 現在時間 datetime.now(datetime.today) date.today() time.localtime() 12345import datetimenow = datetime.datetime.now()print(now)today = datetime.datetime.today()print(today) 2021-11-01 12:27:19.926574 2021-11-01 12:27:19.926574 123import datetimeonly_date = datetime.date.today()print(only_date) 2021-11-01 12import timeprint(time.localtime()) time.struct_time(tm_year=2021, tm_mon=11, tm_mday=1, tm_hour=12, tm_min=30, tm_sec=11, tm_wday=0, tm_yday=305, tm_isdst=0) 閱讀全文
進階電腦操作方法_cmd發表於2021-10-16更新於2021-10-16 進階電腦操作方法_CMD 關於 Windows 檔案系統 是一個 階層式 的結構 檔案總管(File Explorer) 點選 本機 可以看到目錄和磁碟機 磁碟機 / 根目錄 (Disk/Root Folder) 用 磁碟機代號 來區隔電腦中的儲存空間 C: / D: / E: / F: / 目錄 (Folder) 與檔案 (File) 資料夾 <-> 目錄 路徑( / ) 可執行檔(Executable File) .exe 閱讀全文
Tkinter GUI發表於2021-08-05更新於2021-08-05 撰寫GUI設計流程 建立主視窗(大小、位置、名稱) 元件(按鈕、文字方塊、選單)加入視窗中 事件處理函示(event handler):使用者互動時的觸發行為 12#tk.Frame():創建可容納物件的框架#tk.Frame(window, bg='red', width=100, height=100) 1234567891011121314151617181920import tkinter as tkwindow = tk.Tk()top_frame = tk.Frame(window)top_frame.pack()bottom_frame = tk.Frame(window)bottom_frame.pack(side = tk.BOTTOM)def echo_hello(): print('hello word :)')left_button = tk.Button(top_frame,text = "Red", fg = 'red')left_button.pack(side = tk.LEFT)middle_button = tk.Button(top_frame,text = "Green", fg = 'green')middle_button.pack(side = tk.LEFT)right_button = tk.Button(top_frame,text = "Blue", fg = 'blue')right_button.pack(side = tk.LEFT)bottom_button = tk.Button(bottom_frame,text='Black', fg='black', command = echo_hello)bottom_button.pack(side = tk.BOTTOM)window.mainloop()閱讀全文
Hexo_admin發表於2021-08-05更新於2021-08-05 進入 hexo-admin 後台 hexo server (hexo s) http://localhost:4000 http://localhost:4000/admin Ctrl+C hexo clean (hexo cl) hexo generate (hexo g) hexo deploy (hexo d)
Hello World發表於2021-08-05更新於2021-08-05Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub. Quick Start Create a new post 1$ hexo new "My New Post" More info: Writing Run server 1$ hexo server More info: Server Generate static files 1$ hexo generate More info: Generating Deploy to remote sites 1$ hexo deploy More info: Deployment