最近更新的頁面
【ES6】物件拷貝
淺層拷貝(只複製一層,內容物件還是參考至同一位址) const person = { name: '小明', obj: {} } const person2 = {...p...
【ES6】賦值解構
取出特定值作為變數 // #1 取出特定值作為變數 const person = { name: '小明', age: 16, like: '鍋燒意麵' } const...
【ES6】非同步 與 promise
非同步 function getData() { setTimeout(() => { console.log('... 已取得遠端資料'); }, 0); } //...
【extension】 自訂extenstion 位置
vscode extenstions 儲存位置 C:\Users\使用者名稱\.vscode 想要自定位置-在捷徑上新增 --extensions-dir 設定extenstio...
【Mac】安裝MongoDB
brew tap mongodb/brew brew update brew install mongodb-community@6.0 https://www.mongodb.co...
【ES6】async / await
使用方式 // #1 當資料有順序性的時候 const fn1 = () =>{ axios.get("https://randomuser.me/api/") .then((r...
【ES6】ESModual
什麼樣的匯出對應什麼樣的匯入 預設匯入(一個匯出檔只能有一個) 常見的匯出方式,通常用於匯出物件,在 React 開發中可用來匯出元件 /** 匯出頁 exportDefa...
【錯誤處理】【Nginx】client intended to send too large body
查了一下資料發現造成的原因為 web server 接收 request body 的大小設定 apache:LimitRequestBody 預設為 0(unlimit) nginx:cl...
【Mac】清除dns快取
MACOS VERSION COMMAND macOS 12 (Monterey) sudo dscacheutil -flushcache; sudo killall -HU...
【Lua】安裝 luarocks
https://github.com/luarocks/luarocks/wiki/Download https://github.com/luarocks/luarocks/wiki/Ins...
【Lua】【型別】 nil - 布林
nil nil是Lua裡的一個特殊值,代表什麼也沒有。其型別也是nil type(nil) -- => nil 布林 布林值只有true和false 只要不是nil或是false都為真...
【Lua】註解
單行註解 -- 這是註解 多行註解 -- 使用 --[[ 內文 ]]-- 包起來 --[[ function log_header_body() -- 取出...
【Lua】【流程控制】if
if true then print("if block") elseif true then print("elseif block") else print("e...
【Lua】【型別】 字串- 數字
nil boolean number string function userdata thread table Number( 數字) 字串轉數字 tonumber("1....
【Lua】【流程控制】for
-- for i = {起始值}, {結束值}, {step] do for i = 1, 10, 2 do print(i) end -- 1 -- 3 -- 5...
【Lua】【流程控制】while
destination = 5 -- 終點位置 current_pos = 0 -- 目前位置 print([[馬拉松賽跑 ============]]) print("終點...
【Lua】load
與 javascipt eval 相同-動態產生並執行程式碼 -- load不回直接執行,其實其返回一個包裝函式: f = load[[g2 = 2]] print(type(f)) ...
【ES6】import / export
匯入的類型要看匯出的形式,所以我用匯入方式來說明 使用default 匯出 匯入就可以取任何名稱 import fn from './func.js'; fn(); // 匯出檔案 f...
【Lua】table
模擬陣列用法 注意 lua 索引 從 1 開始 -- 宣告 table lang = { "C", "C#", "C++", "Java", "Swift",...
【Proxmox】Fatal glibc error: CPU does not support x86-64-v2
https://foxi.buduanwang.vip/linux/2168.html/ rhel9 開始需要CPU支持SSE4.2,SSSE3參考 為x86-64-v2 微架構級別構建紅帽...