1.4k 1 分鐘

⭐️ # 題目敘述 Given an m x n matrix mat , return an array of all the elements of the array in a diagonal order. # Example 1 Input: mat = [[1,2,3],[4,5,6],[7,8,9]] Output: [1,2,4,7,5,3,6,8,9] # Example 2 Input: mat = [[1,2],[3,4]] Output: [1,2,3,4] # 解題思路 # Solution import java.util.ArrayList;class...
2.2k 2 分鐘

ChienI Kao 筆記網站 JHTNT 筆記網站 # 什麼是作業調度和資源管理系統? 在 HPC (高效能運算叢集) 或大型伺服器環境裡,有很多人同時會需要使用計算資源 (CPU、GPU、記憶體、網路) 資源管理與作業調度系統就是專門負責: 資源管理 (Resource Management) 管理那些節點 (nodes)、CPU/GPU、記憶體是可用的 把資源分配給不同使用者的工作 (jobs) 確保不會撞車或是浪費資源 作業調度 (Job Scheduling) 決定誰的工作先跑、誰後跑 根據策略 (FIFO、優先權、fairshare、公平分配、backfill...)...
1.9k 2 分鐘

ChienI Kao 筆記網站 JHTNT 筆記網站 # What is tmux? tmux 是一個終端機管理工具,可以分割視窗、同時開啟多個終端機。 如果想要同時使用多個命令,或執行多個任務時,就會很方便 如果是遠端 ssh 連線到其他主機使用 tmux 來執行程式,也可以避免 ssh 突然斷連後,正在安裝或執行的任務被終止 # 基礎概念 接著我們簡單介紹一下 tmux 的基礎概念,tmux 主要有三個模組 pane、windows、session 當使用 tmux 時 # Install tmux sudo apt updatesudp apt upgradesudo apt...
264 1 分鐘

ChienI Kao 筆記網站 JHTNT 筆記網站 # 實驗題目 將使用 kubeadm 來建構 k8s cluster,並建構兩個以上的 node # 實驗環境 兩個以上的虛擬機或是實體機 最小硬體需求: CPU: 2 cores RAM: 2GB 必須可以連上網際網路 所有節點之間可以互相連線 (在相同的 LAN 中、或有公網 IP、或是可以透過 router 互連) # 實驗內容 # 安裝 Docker curl -fsSL https://get.docker.com/ -o get-docker.shsudo sh get-docker.shsudo usermod...
2k 2 分鐘

⭐️⭐️⭐️ # 題目敘述 You are given a 0-indexed array of positive integers nums. In one operation, you can swap any two adjacent elements if they have the same number of set bits. You are allowed to do this operation any number of times (including zero). Return true if you can sort the array, else return...
357 1 分鐘

# module 簡介 專門管理環境變數的工具,全稱是 module environment,一般應用於軟體或運行庫等設備有多個版本,且需要分別配置這些環境變數。 module ava# 使用權限 切換為根使用者 user@vm:~$ sudo su -# 增加使用者 sudo 權限 user@vm:~$ sudo adduser [user name] sudo# 移除使用者 sudo 權限 user@vm:~$ sudo deluser [user name] sudo# 使用者相關設定 # 新增使用者 執行下方指令可以新增一位使用者,在 user name...
969 1 分鐘

⭐️ # 題目敘述 Given a string array words , return an array of all characters that show up in all strings within the words (including duplicates). You may return the answer in any order. # Example 1 Input: words = ["bella","label","roller"] Output:...
939 1 分鐘

⭐️ # 題目敘述 Given a string s which consists of lowercase or uppercase letters, return the length of the longest palindrome that can be built with those letters. Letters are case sensitive, for example, "Aa" is not considered a palindrome. Palindrome A palindrome is a string that...
1.2k 1 分鐘

⭐️⭐️ # 題目敘述 You are given two strings s and t consisting of only lowercase English letters. Return the minimum number of characters that need to be appended to the end of s so that t becomes a subsequence of s . A subsequence is a string that can be derived from another string by deleting some or no...