水球潘 WaterBall

Results 18 comments of 水球潘 WaterBall

@liuxunorg Thanks a lot, but I didn't receive your invitation email, slack is still showing my account is deactivated, I think the workspace admin has to re-activate my account.

My workaround: Don't use the client secrets, instead, directly build the credentials. Import this library ```xml com.google.auth google-auth-library-oauth2-http 1.3.0 ``` ```java InputStream in = SheetsQuickstart.class.getResourceAsStream(CREDENTIALS_FILE_PATH); if (in == null) {...

Well, I think I almost understand, So the reason of why the author didn't have to write a provide method to **Presenter** and **UseCase** is that all of the them...

> > The created thread and the message it was started from will share the same id > > [Docs](https://discord.com/developers/docs/topics/threads#public-private-threads) So you could get the thread by the message id...

> It certainly can be added, but we have to think about corner cases here. Do you want ALL methods or only public ones? What about methods inherited from superclasses?...

> If you don't want to depend on otel APIs you can always add your own `@interface Traced` annotation and configure the agent to add spans whenever it encounters it:...

1. 排版 你已經有縮排了 但排版還是怪怪的 多看看我們的程式 不要留一些不必要的換行 像這個區塊的縮排就不只一個tab,換行也太過極端 ![image](https://user-images.githubusercontent.com/23109467/50572128-908f4300-0df4-11e9-987b-7f245a8967db.png) 然後上下兩個類別的縮排竟然不一致 class要內縮一個tab 程式區塊 if/else/for/while/try-catch 都只內縮**一個tab** ![image](https://user-images.githubusercontent.com/23109467/50572171-f11e8000-0df4-11e9-9789-cf43fdd748bb.png) 一樣,請一定要先注重排版,不然寫起程式浮躁無力。 **(請你去看懂我的餐廳,並欣賞。)** 2. 執行緒協作 ![image](https://user-images.githubusercontent.com/23109467/50572180-2f1ba400-0df5-11e9-8c1b-881a9a13f626.png) 你偷懶使用迴圈來等待,這樣這個執行緒會瘋狂占用CPU資源, **請使用我教你的Notify and Wait (效率高很多,主動讓出CPU)**,請勿浪費那堂課的學費。 所以你是三方的合作 這部分如果你去想清楚怎麼撰寫比較好 則會有很大的進步。 ![image](https://user-images.githubusercontent.com/23109467/50572286-9f2b2980-0df7-11e9-8339-deb9430671b8.png) 因此畫出圖來就會清楚知道,三方彼此溝通鎖住的物件並不相同,畫出設計思維之後就可以大膽實現。 ---...

//updated 在學生類別中 你設置了函數 來進行使用者輸入 有好有壞 但在這題 我認為這是很棒的設計 讓main變得很乾淨 但是有幾個小瑕疵 1. 排版要再注意 ![image](https://cloud.githubusercontent.com/assets/23109467/24812746/f3ee6e7a-1bfd-11e7-9dbf-ba8cfce7ae30.png) 像這種地方就很糟糕 2. 函數名稱 請避開set跟get 因為 setter 跟 getter 只被用來取得或設置屬性 容易誤導別人跟自己 降低可讀性 像是 你的 setInformations 打成 inputInformations更好 有要使用者輸入的 全部都打input...()...

To: merge sort Well done, but still have few defects. First, you can rename StudentInformation to Student by "refactor -> rename" in Eclipse. Second, **never** put a **class** within any...

wow , 你把寫法改死了, 首先你的複合結構 完全不需要承擔任何多餘的責任 他們只能專心在自己的結構控管上 把輸入的任務給他們 讓main只剩下一行 這只代表你的程式完全死透了 如果要用這種方式進行輸入的話 你就強迫使用者 一開始使用的物件是Location 才能依序輸入 很明顯 這跟複合模式是沒有關聯的 在繼續撰寫複合模式之前 要去閱讀他的價值 在於"多型走訪" 你把多型結構改掉 這也代表 這毫無擴充性 更不是Composite了 這就像回到以前的物件導向程式 只是把東西裝在一起 為何沒擴充性 在Location裡面寫死 只能放Shop 而不能放Food 這就是完美的耦合 未來因應更動要放食物...