發表文章

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

[Python] Use an empty class to hold a temporary scope

def function_creator(): class FnScope: b = 5 c = 6 def inner_fn(): FnScope.b += 1 FnScope.c += FnScope.b print(FnScope.c) return inner_fn >>> f = function_creator() >>> f() 12 >>> f() 19 >>> f() 27 Reference: Python nested functions variable scoping

[翻譯] 10 個降低新冠肺炎焦慮的小秘方

10 個降低新冠肺炎焦慮的小秘方 10 Tips to Reduce COVID-19 Anxiety. 1. 專心在自己可以控制的想法和行為等事物。 Focus on things you can control, such as your thoughts and behaviors. 2. 心中保持宏觀,相信人類會渡過危機。 Keep the big picture in mind,. Humankind will survive this. 3. 記得新聞的數量不等於病毒威脅的嚴重性。 Remember that the size of news coverage may not equal the size of a threat. 4. 讓智慧與邏輯指引你行動。 Let wisdom and logic guide you. 5. 閱讀值得信賴的新聞媒體。 Turn to reputable sources for your news. 6. 節制查看最新消息的頻率。 Control how often you check the latest news. 7. 為身邊的人展現和平的舉止。 Model peaceful behavior for those around you. 8. 評估自己的健康習慣,為孩子與他人樹立典範。 Evaluate your own health behaviors and be a model for others, including children. 9. 若覺得太孤立,不妨與人們保持線上交流。 Feeling too isolated? Maintain digital connections with people. 10. 不要因為恐懼而囤積日用品。 Don’t let fear influence your decisions, such as hoarding supplies. 出處: Psychology Online

Art Of War: Legions - What are the Best Troops to Upgrade for Max Combat & Durability Rating? (Ranking included)

圖片
A) Preface While you're upgrading the troops in the mobile strategy game Art of War: Legions (AoW), you may notice there are extra gains on the Troop Count from some troops. The troop count acts as ability multiplier on properties like Health, Attach, ...etc. On the other hand, there are other types of troops having very high Attack or Health per unit, but they don't raise count while upgrading. So, based on the different behavior on upgrading, troops in AoW are analyzed here in multiple aspects like Battle Rating per Unit or with Count, or Durability Rating per Unit or with Count in this article. Each of them will be detailed in its paragraph below: B) The Growth of Troop Count Along with Upgrading As shown in the following figure, we divided the troops into two groups - one of them has a count gain with upgrading, while the other group doesn't benefit from upgrading. The Group One has 11 troops, and their unit reach the maximum value 9 at level 4.