1.6k 1 分鐘

⭐️⭐️⭐️ # 題目敘述 There is an undirected graph with n nodes, where each node is numbered between 0 and n - 1 . You are given a 2D array graph , where graph[u] is an array of nodes that node u is adjacent to. More formally, for each v in graph[u] , there is an undirected edge between node u and node v ....
139 1 分鐘

ChienI Kao 筆記網站 JHTNT 筆記網站 # 版本退回 引用文: https://gitbook.tw/chapters/using-git/reset-commit git log 檢視提交的歷史記錄。 git log --oneline 目前的 Git 紀錄。 git reset [版本 id] 版本退回
1.1k 1 分鐘

ChienI Kao 筆記網站 JHTNT 筆記網站 當大家一起開發專案時,專案撰寫的內容越來越多,Git Commit 內容增加,就很容易有 Git Graph 非常雜亂的問題,對某一個功能重複撰寫等等。 這個時候就非常需要工作流程 (Work Flow),讓大家有規劃,更效率地開發。 # 常見 Work Flow Git Flow GitHub Flow GitLab Flow # 定義部署的環境 開發環境(工程師的電腦) 測試環境(讓審核人員測試使用,像是 QA 測試) 展示環境(讓早期用戶或是驗收使用) 產品環境(正式讓所有用戶使用) # Git Flow Git...
643 1 分鐘

ChienI Kao 筆記網站 JHTNT 筆記網站 # 什麼是 branch? 在開發軟體時,可能同時會有多人在開發同一功能或修復錯誤,也可能會有多個發佈版本的存在,並且需要針對每個版本進行維護,同一個數據庫可以同時進行多個修改。 現在最常用來管理 Git 分支的方法: master develop feature release hotfix # 分支常用指令 git branch# 查看分支。git branch [BRANCH_NAME]# 建立分支。git checkout [BRANCH_NAME]# 取出指定的分支。git checkout -b...
801 1 分鐘

ChienI Kao 筆記網站 JHTNT 筆記網站 # 建議提交格式 建議以這種形式填寫提交訊息 Header: <type>(<scope>): <subject> type: 代表 commit 的類別:feat, fix, docs, style, refactor, test, chore,必要欄位。 scope 代表 commit 影響的範圍,例如資料庫、控制層、模板層等等,視專案不同而不同,為可選欄位。 subject 代表此 commit 的簡短描述,不要超過 50...
616 1 分鐘

ChienI Kao 筆記網站 JHTNT 筆記網站 # 基本指令與觀念 提交訊息是查看其他人提交的修改內容或自己檢查歷史記錄時重要的資料。 所以要用心填寫讓人容易理解的提交訊息。 Git 的標準提交 (commit) 訊息: 第 1 行:提交時修改內容的摘要 第 2 行:空行 第 3 行以後:修改的理由 建議以這種形式填寫提交訊息,詳細可以參考 Git commit specification # 基本指令 git init# 建立新的本地端儲存庫 (Repository)git clone [URL]# 複製遠端的 Repository 檔案到本地端。git status#...
471 1 分鐘

ChienI Kao 筆記網站 JHTNT 筆記網站 # 安裝 git - Ubuntu sudo apt install git# 安裝 git - Windows git 官網: https://git-scm.com/download/win 然後開啟 Git Bash # 設定 git 識別資料 在你安裝 Git 後首先應該做的事是設定使用者名稱及電子郵件。 這一點非常重要,因為每次 Git 的提交會使用這些資訊,而且提交後不能再被修改。 git config --global user.name "[使用者名字]"git config --global...
664 1 分鐘

ChienI Kao 筆記網站 JHTNT 筆記網站 # 前言 版本控制系統:對軟體開發過程中程式碼、文件、文檔等,發生的變更進行管理的系统,它可以幫助團隊更好的溝通協作,從而更好的進行交付。 常見的版本控制系統分為: 集中式版本控制系統,如: SVN 用主從式架構的作法 需要網路才可以工作,版本在中央服務器上 分布式版本控制系統 distributed version control,如: Git 它允許軟體開發者可以共同參與一個軟體開發專案,但是不必在相同的網路系統下工作 用對等網路的作法來處理版本控制 版本存在自己的 host...
3.4k 3 分鐘

⭐️⭐️⭐️⭐️ # 題目敘述 Write a class that allows getting and setting key-value pairs, however a time until expiration is associated with each key. The class has three public methods: set(key, value, duration) : accepts an integer key , an integer value , and a duration in milliseconds. Once the duration...
1.2k 1 分鐘

⭐️⭐️⭐️ # 題目敘述 Given a directed acyclic graph, with n vertices numbered from 0 to n - 1 , and an array edges where edges[i] = [fromi, toi] represents a directed edge from node fromi to node toi . Find the smallest set of vertices from which all nodes in the graph are reachable. It's guaranteed...