定義:一個儲存在磁碟上的靜態指令集合,通常是可執行檔(例如 .exe
、.out
)。
特性:
- 是「還沒被執行」的程式碼。
- 例如:你電腦上的
chrome.exe
就是一個程式,只有在你點它時才會變成 process。
項目 | Event Loop Queue(Macro Task Queue) | Job Queue(Micro Task Queue) |
---|---|---|
📌 又稱 | Task Queue / Callback Queue | Microtask Queue / Job Queue |
🎯 負責處理 | setTimeout、setInterval、I/O callbacks、DOM Events 等 | Promise.then()、queueMicrotask()、MutationObserver |
⏳ 執行時機 | 每輪事件循環的最後階段才會執行 | 每個 task 執行結束後立即清空 microtasks |
🥇 優先順序 | 較低,等微任務執行完才會輪到它 | 較高,會優先執行完所有 microtasks 才會進入下一個 macro task |
✅ 用途 | 處理整體非同步任務 | 處理細粒度更新、異步邏輯鏈接 |
del_all_branch () { | |
current_branch=$(git branch --show-current) | |
git branch | grep -Ev "^\s*(master|main|develop|dev|${current_branch})$" | xargs git branch -D | |
} | |
kill_port() { | |
if [ -z "$1" ]; then | |
echo "Usage: kill_port <port>" | |
return 1 | |
fi |
import { useState, useMemo } from 'react' | |
class ArrayUtil { | |
static range(...T) { | |
let start, end; | |
if (T.length === 1) { | |
start = 0; | |
end = T[0]; | |
} else { |
/* | |
* Easing Functions - inspired from http://gizma.com/easing/ | |
* only considering the t value for the range [0, 1] => [0, 1] | |
*/ | |
EasingFunctions = { | |
// no easing, no acceleration | |
linear: t => t, | |
// accelerating from zero velocity | |
easeInQuad: t => t*t, | |
// decelerating to zero velocity |
在開發過程中,當需求變得龐大且模糊時,會延長開發週期,而無法在一個 sprint (2~4週) 完成,也就無法給顧客即時的回報,如果花費大量 | |
的時間開發,最後與客戶的方向不同,會得不償失。 | |
在 Scrum 的開發流程中,我們將需求依需求尺寸由大到小分成 Investment theme, epic, feature, user story, task. | |
Investment theme: 投資主題,主要定義主方向,像我們提供的 Investment theme 為教育服務,或許這個概念比較抽象,你可以把它想成 myViewBoard.com。 | |
Epic: 顧名思義就是很長的敘事性詩篇,在 Scrum 的開發過程中,屬於 high level 的需求描述,你可以想成 myViewBoard.com 中各個 | |
子網站,如 Start myViewBoard, myViewBoard classroom 等。 |
### Node template | |
# Logs | |
logs | |
*.log | |
npm-debug.log* | |
yarn-debug.log* | |
yarn-error.log* | |
# Dependency directories | |
node_modules/ |