Skip to content

Benjr.tw

  • Linux
    • Stress & Performance
    • Hardware Info
    • System Monitor
    • Security
    • Desktop
    • PXE
    • Filesystem Hierarchy Standard
    • Linux 開機選項
    • Linux Package Manager
    • 備份 Backup
  • Virtualization
    • Docker & Podman
    • CoreOS
  • NAS/SAN
  • Programming Language
    • Python
    • Bash shell script
    • Perl
    • PHP
    • Node.JS
    • VBA
    • javascript
    • Power Query
    • PowerShell
  • WordPress
  • DataBase
    • 資料庫安裝
    • 資料庫語法
    • SQLite
    • MariaDB JSON

Linux

Python – Try-except , else & finally statement

2022-05-162022-09-02 adminLinux, Programming Language, Python, RedHat / CentOS

Loading

測試環境為 CentOS 8 x86_64 (虛擬機) Try-except statement 格式如下,通常會搭配 raise exception – https://benjr.tw/104314 來使用. 下面範例輸入兩整數,並透過 Try-except 來避免錯誤發生. exc […]

Read more

Python – Class

2022-05-162022-05-24 adminLinux, Programming Language, Python, RedHat / CentOS

Loading

測試環境為 CentOS 8 x86_64 (虛擬機) 關於 Python Class 與其相關 專有名詞 說明,參考文章 – https://www.learncodewithmike.com/2020/01/python-class.html 類別 (Class) 物件 (Objec […]

Read more

Python – Module & __name__

2022-05-132022-06-08 adminLinux, Programming Language, Python, RedHat / CentOS

Loading

測試環境為 CentOS 8 x86_64 (虛擬機) Module 模組的使用. 要使用剛剛定義好的 Module 模組只需要透過 import modeule 名稱,即可使用.使用時 模組名稱.函數名稱 執行結果. __name__ 關於 object.__name__ 說明 : https:/ […]

Read more

Python – Function & Return

2022-05-132023-03-14 adminLinux, Programming Language, Python, RedHat / CentOS

Loading

測試環境為 CentOS 8 x86_64 (虛擬機) 下面來看一下 Function 函數與 Return 回傳值的使用. function (def) 透過 def 來建立 multi function ( 需輸入參數 n 跟 m ). 執行結果. Return 使用 return 回傳值. 執 […]

Read more

Python – dict 資料型態物件

2022-05-132022-08-31 adminLinux, Programming Language, Python, RedHat / CentOS

Loading

測試環境為 CentOS 8 x86_64 (虛擬機) 一般宣告的 List(串列)資料型態,其資料不好搜尋到,這時候可以使用 dict ( dictionary ),資料是由 key (鍵值,可使用 括字串(str),整數(int)與浮點數(float) ) + Value (值,可以為任何東西) […]

Read more

Linux – CentOS to CentOS Stream

2022-05-122024-11-22 adminLinux, RedHat / CentOS

Loading

測試環境為 CentOS 7/8 x86_64 (虛擬機) 目前正在使用的 CentOS Linux 7 end of life 為 June 30 2024 , CentOS Linux 8 End Of Life (EOL) 為 December 31st, 2021,想要繼續更新 CentOS […]

Read more

Python – List 資料型態物件

2022-05-122022-08-31 adminLinux, Programming Language, Python, RedHat / CentOS

Loading

測試環境為 CentOS 8 x86_64 (虛擬機) list 為 Mutable 物件(物件被創造出來後其值可以做改變), Python 其他資料型態物件為. Immutable objects – 物件被創造出來後其值無法做改變像是 int , float , string , t […]

Read more

Linux – 安裝 Python & pip

2022-05-102023-09-28 adminLinux, Python, RedHat / CentOS

Loading

測試環境為 CentOS 8 x86_64 (虛擬機) 安裝 Python (與 pip , Python 套件管理程式) Python 需指定安裝的 Python 版本. 檢視一下 python 版本. pip 檢視一下 pip (Python 套件管理程式) 的版本. 更新 pip 到最新版本. […]

Read more

MariaDB – max_allowed_packet size

2022-04-272023-09-11 adminLinux, MariaDB, Mysql, RedHat / CentOS

Loading

測試環境為 CentOS 8 x86_64 遇到一個奇怪問題, LONGBLOB , LONGTEXT 字元上限為 4 GB (2^32 -1),使用 4 bytes 紀錄前面字元使用長度.但是實際使用只能到 16777216 (約 16M),下面來看一下是怎麼了. 先建立一個資料庫 (testdb […]

Read more

MariaDB – Generate auto increment column in select query

2022-04-272022-12-22 adminLinux, MariaDB, Mysql, RedHat / CentOS

Loading

測試環境為 CentOS 8 x86_64 要如何在 SELECT 時多產生一個自動遞增列的欄位? 可以透過兩種方式. 先建立一個資料庫 (testdb) , 與資料表 (Index1) 資料格式為 Student VARCHAR(200). 建立學生名冊. @變數 要在 SELECT 的資料加上序 […]

Read more

文章導覽

較舊的文章
較新的文章

近期文章

  • Windows – Network Sharing + Port forwarding to VM
  • Ansible – gather facts
  • Ansible – host_vars 定義特定的變量
  • Ansible 範例 – Chrony daemon
  • Ubuntu NTP Client 校時設定

近期留言

  • 「Jackson2734」於〈Ubuntu NTP Client 校時設定〉發佈留言
  • 「w」於〈Ubuntu 16.04 Server PXE 安裝〉發佈留言
  • 「admin」於〈TCP/IP 常見封包〉發佈留言
  • 「stu」於〈TCP/IP 常見封包〉發佈留言
  • 「student」於〈Linux command – tcpdump〉發佈留言

分類

其他操作

  • 登入
  • 訂閱網站內容的資訊提供
  • 訂閱留言的資訊提供
  • WordPress.org 台灣繁體中文
  • Privacy Policy
  • 隱私權政策
Powered by WordPress | Theme: Astrid by aThemes.