發表文章

目前顯示的是 4月, 2025的文章

葉榮文Word File Processing in Python(Python處理Word檔案)

圖片
embed嵌入(bed床,放入床上,嵌入鑽戒) 影片重點 Let's develop brains. 作文,在捷運讓座let給老弱婦孺。 yield (投降, 收益) Yield seats to elderly YTM=Yield to Maturity=到期收益率 nominal yield=coupon rate=票面利率 利用python編輯edit建立create word 檔案 Process 處理....procedure程序 SOP python命令,給文件新增加一個段落 document.add_paragraph('文字內容',格式) 網頁javascript命令 document.create_element('P'); 維基百科python了解 Python was conceived in the late 1980s[42] by Guido van Rossum at Centrum Wiskunde & Informatica (CWI) in the Netherlands; it was conceived as a successor to the ABC programming language, which was inspired by SETL,[43] capable of exception handling and interfacing with the Amoeba operating system.[12] Python implementation began in December 1989.[44] Van Rossum assumed sole responsibility for the project, as the lead developer, until 12 July 2018, when he announced his "permanent vacation" from responsibilities as Python's "benevolent dictator for life" (BDFL); this title was bestowed on him by the Pyt...

葉榮文JAVASCRIPT網頁BUTTON按鈕ONCLICK事件CALL呼叫函數

物件導向設計OOP=Object-Oriented Programming 主詞subject受詞object東方的oriental id=identity,身分證id card, division區塊,段落 .方法get()是取得對應的值,功能同字典 dict.get(s1.code)從dict字典取得索引為s1.code的值 葉榮文執行 函數名稱()需要執行的程式

葉榮文Javascript物件導向方法是物件的函數

python語言的OOP=物件導向程式設計: 物件.屬性(attribute, property) 物件.方法(method) 方法就是物件的函數 2330 股數 100 2880 股數 1000 物件導向程式設計 Javascript指令new Constructor產生新的instance案例 s1.shares.toString()=案例sa的屬性shares內建方法toString()轉成字串,原來的數字被轉成字串string才可以和其他字串相加 物件導向設計OOP=Object-Oriented Programming 主詞subject受詞object東方的oriental id=identity,身分證id card, division區塊,段落 .方法get()是取得對應的值,功能同字典 dict.get(s1.code)從dict字典取得索引為s1.code的值 物件導向設計OOP=Object-Oriented Programming 主詞subject受詞object東方的oriental id=identity,身分證id card, division區塊,段落

葉榮文python視窗建構Tk輸入文字Entry視窗字串變數StringVar

圖片
#葉榮文python註解comment使用# '''前後用三個引號可以單引,也可以雙引''' from tkinter import * #從函式庫 tkinter 輸入所有 * 方法 banks=['摩根大通'] def ABC(): #畫圖 define自訂函數 global b1 #宣告b1是廣域GLOBAL變數,其他函數也可使用 txt = '' for i in range(len(banks)): txt += banks[i] + ' ' b1=Label(canvas,text=txt,font='Arial 20 bold') b1.pack(side=TOP) def XYZ(): #清除視窗的all所有canvas圖 banks.append(bank.get()) ABC()#結束XYZ之前給它顯示 def kill(): banks.pop()#移除串列banks元素 ABC()#執行自訂函數(寫在前面) tk = Tk()#建構Tk命令視窗名為tk global bank#宣告網域變數bank variable bank = StringVar(tk)#命令bank視窗tk的變數 tk.title("老猴仔python建立tkinter視窗使用者介面") #也可以定義視窗名為 window, root課本都如此習慣 canvas = Canvas(tk, width=400, height=400) canvas.pack() enter=Entry(tk,textvariable=bank).pack(side=LEFT)#變數enter視窗tk的輸入工具 btn1 = Button(tk, text="銀行", command = ABC, bg='black',fg='white').pack(side=LEFT) btn2 = Button(tk, text="增加", command = XYZ, bg...