Excel (stylesheet) 想要結合字串,然後抓某個欄位的值來用,類似程式語言的 eval,要怎麼做呢?
分類: Programming
HTTP Status Code 307、308 的作用
HTTP Status Code 3xx 都是做重新導向的作用:
- 301 Moved Permanently
- 302 Found
- 303 See Other
- 307 Temporary Redirect
- 308 Permanent Redirect
此篇主要是討論 307、308 為主,其他就簡單說明一下帶過~~
Python 將 IPv4 CIDR subnet IP 展開
Classless Inter-Domain Routing (CIDR) (無類別域間路由) 是一個 IP 區間的表示方式,主要寫法如下:
- CIDR 表示方式與 subnet 展開
- 192.0.2.1/32 = 192.0.2.1
- 192.0.2.0/24 = 192.0.2.0 ~ 192.0.2.255
- 192.0.2.0/25 = 192.0.2.0 ~ 192.0.2.127
- 192.0.2.128/25 = 192.0.2.128 ~ 192.0.2.255
使用 Python 要將 CIDR 展開要怎麼做呢?
PHP 查看頁面 程式跑到此處花多久時間
PHP 想要看此 Function 花費多久時間,可以使用 microtime() 前後包起來,範例可見此篇:PHP 測量程式執行時間
想要看頁面的程式執行到此處,花費多久的時間,要怎麼做呢?
Python List 刪除內容 會重新 re-index
Python List 若將某一筆內容(Value)刪掉,那索引(Index)會自動重新計算,若使用 for + range() 再去 del,會造成一些錯誤。
Python List 移除 del 和 remove() 的差異
Python / Python3 的 List 操作,要刪除有 del 和 remove() 可以使用,兩個有何差異呢?
寫出 乾淨程式碼 的 六條規則
Simple Statistics:JavaScript 統計的函式庫
GitHub 有 Open Source 將 統計的各種公式,寫成函式庫(Library)套件
PHP 解析 URL 和 Param 字串
PHP 想要解析 URL,然後將每個參數都另外拉出來,可以使用 parse_url() + parse_str()
PHP 使用 asort、arsort 重新 index key
PHP 使用 asort、arsort 排序後,想要將 key 由 0 或 1 開始重新排序,要怎麼做呢?
- 註:asort、arsort 會將 Array 的 Value 排序,但是 Array Key(Index) 還是原始的值,若要將 Array Key 的值也修改 0 ~ N,或者 要某個數字開頭 ~ N, 要怎麼做呢?