先備知識:
- 熟悉Java語法
- 會安裝forge模組
- 有英文google的能力
- 安裝JDK
- 安裝IntelliJ IDE
| package com.example; | |
| import cn.nukkit.plugin.PluginBase; | |
| import cn.nukkit.utils.TextFormat; | |
| import cn.nukkit.command.Command; | |
| import cn.nukkit.command.CommandSender; | |
| import cn.nukkit.event.EventHandler; | |
| import cn.nukkit.event.Listener; | |
| import cn.nukkit.event.player.PlayerJoinEvent; |
| <?php | |
| //命名空間即src/下的路徑 | |
| namespace examplePlugin; | |
| //會用到的PocketMine類別 | |
| use pocketmine\plugin\PluginBase; | |
| use pocketmine\event\Listener; | |
| use pocketmine\event\player\PlayerJoinEvent; | |
| use pocketmine\utils\TextFormat; |
| ffmpeg -i "input.mp4" -map 0 -map_chapters -1 -sn -dn -c copy output.mp4 |
| # Reference: https://christiantietze.de/posts/2017/05/sort-markdown-tables-shell/ | |
| # Example input file: | |
| # |Name|Year|Pictures|Description| | |
| # |---|---|---|---| | |
| # |A |2022|foo|bar| | |
| # |B |2012|bar|boo| | |
| # |C |2009|boo|bar| | |
| # Sort by column 2 (year), latest first: |
Wayland桌面工作階段會帶來許多問題,其中最常見的就是瀏覽器效能下降的問題。因為有些瀏覽器預設跑在XWayland模式,所以看起來會卡卡的。所以要手動啟用Wayland模式。但是有的瀏覽器啟用Wayland模式反而出現了其他問題,下面就要來討論如何解決這些問題。
下列操作適用Ubuntu 24.04 LTS以上版本的系統。
使用echo $XDG_SESSION_TYPE指令即可得知是目前桌面工作階段x11還是wayland。
GNOME 42以上版本預設使用Wayland,登入畫面GDM右下角齒輪會有GNOME與GNOME on Xorg的選項。
| mkdir ~/qemubuilder && cd qemubuilder | |
| cat <<EOT >> Dockerfile | |
| FROM debian:bookworm | |
| RUN apt update | |
| RUN apt install build-essential zlib1g-dev pkg-config libglib2.0-dev binutils-dev libboost-all-dev autoconf libtool libssl-dev libpixman-1-dev python3-capstone virtualenv ninja-build wget -y | |
| EOT | |
| docker build -t qemubuilder . | |
| sudo docker run -it -v $(realpath ./build):/mnt/build --name qemubuilder "qemubuilder" | |
| cd ~ | |
| wget https://download.qemu.org/qemu-6.2.0.tar.xz |
| """" | |
| 如何使用這個程式: | |
| 1. 安裝Termux APP https://f-droid.org/zh_Hant/packages/com.termux/ | |
| 2. 允許存取手機內部儲存空間:termux-setup-storage | |
| 3. 安裝Python套件:pkg install python3 python-pip | |
| 4. 安裝Pillow:pkg install python-pillow | |
| 5. 將照片放在手機內部儲存空間/DCIM/Camera/,然後處理後的照片會輸出到手機內部儲存空間/DCIM/output/ | |
| 6. 執行:python3 main.py | |
| """ |