C++ 列出資料夾所有檔案

Project→Options→Configuration Properties→C/C++→Language: C++ Language Standard選擇ISO C++ 17 Standard (/std:c++17) #include <filesystem> path folder_path = "..." for(const auto& entry : direct ...

         続きを読む

啟用Linux的網路共用資料夾

安裝Samba sudo apt install samba 查看Samba是否運行及其運行中的連接埠 sudo netstat -tulnp | grep -e '[sn]mbd' 如果沒有 netstat 指令: sudo apt update sudo apt install net-tools 在/etc/samba/smb.conf加上 (原本就有[homes],但被註解起來) [hom ...

         続きを読む

安裝Python 3.7並設為預設

$ sudo apt install python3.7 (從官方網站下載後安裝會造成與Samba衝突) 修改~/.bashrc文件:vim ~/.bashrc alias python=python3.7 alias pip="python3.7 -m pip" 重載~/.bashrc文件:source ~/.bashrc 檢查python及pip版本: – python(輸入exi ...

         続きを読む

檢查CRLF並轉換為LF

#!/bin/bash checkFolder(){ for name in $1/* do if test -f $name then if awk '/\r$/{exit 0;} 1{exit 1;}' $name then dos2unix -o $name fi elif test -d $name then # echo $name checkFolder $name fi done } ...

         続きを読む
1 ... 50 51
Bitnami