精選分類

文章列表

5.1k 5 分鐘

# 安裝 C++ 等套件 sudo apt install build-essential# 安裝 java 默認 JRE/JDK # 更新包sudo apt update# 檢查 java 是否已經安裝過java --version# 安裝默認 JREsudo apt install default-jre# 安裝默認 JDKsudo apt install default-jdk# 檢查 javac,java 編譯器版本javac --version剛安裝好的 Ubuntu 系統裡的套件版本與安全性更新可能已經舊了,通常會先做這兩步: sudo apt update #...
1.7k 2 分鐘

⭐️ # 題目敘述 You are given a 2D 0-indexed integer array dimensions . For all indices i , 0 <= i < dimensions.length , dimensions[i][0] represents the length and dimensions[i][1] represents the width of the rectangle i . Return the area of the rectangle having the longest diagonal. If...
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...