演算法LeetCode TwoSun
Given an array of integers, return indices of the two numbers such that they add up to a specific target.
You may assume that each input would have exactly one solution, and you may not use the same element twice.
Given an array of integers, return indices of the two numbers such that they add up to a specific target.
You may assume that each input would have exactly one solution, and you may not use the same element twice.
之前遇到在壓測2秒內達100個請求,持續10分鐘,當短時間請求過於龐大,Redis會Timeout的訊息,會顯示下列錯誤訊息。
RESTful是REST的形容詞,其實是一樣的,是一個設計風格,根據RESTful API的設計風格,無狀態及避免不同的工程師有不同的命名習慣,定義唯一的URL,利用HTTP動詞呼叫,達到唯一的URL做GET、POST、PUT、DELETE。
網路七層(Open System Interconnection Reference Model),簡稱OSI模型。
七層:實體層→資料連結層→網路層→傳輸層→會議層→展示層→應用層
以前都把技術筆記寫在自己的筆記本,想說既然都要寫部落格,把基本的技術觀念也記錄在部落格,增加記憶力XD
類別(Class)算是一個藍圖、屬靜態的,他沒有實體(Instance)的概念。
物件(Object)是一個看的到、摸的到的實體,屬於動態的,狀態會隨時改變,但架構與行為不會改變。
比喻:
類別就像是設計房子的設計藍圖,而物件是實際蓋好的房子。
兩者的關係是設計藍圖(類別)決定了房子怎麼蓋,有幾台電梯,幾間房間,幾條走道。
而實際蓋好的房子(物件)是照著設計藍圖所蓋出來的房子,人只能照設計藍圖的設計使用這間房子,並不會多出一個手扶梯,因為藍圖沒有。
是常見的設計模式之一,一般在中大系統要引用第三方控件時,會使用Proxy Pattern,主要用來隔離呼叫端及目的端,降低呼叫端及目的端的相依性,提升程式的可變性及延展性。