為了讓眼睛舒服些,通常這會額外調整Adobe Acrobat 的背景色。
作法如下:
偏好設定 → 取代文件色彩 → 頁面背景 (RGB 199,237,204) [如下圖]
※ 此次更新 Adobe Acrobat 2017 Pro 版本出現了 28000 error 問題。採用網頁內提及的解決方法二,有解決此問題。
2018年1月25日 星期四
2018年1月10日 星期三
MySQL 5.7 Incorrect datetime value '0000-00-00 00:00:00' 問題
MySQL 5.6 升級到 5.7,有些系統在寫入資料時會出現問題。
主要是因為 MySQL5.7 在日期格式做了點調整。
時間預設格式採用 0000-00-00 00:00:00 會造成資料無法寫入的狀況。
最簡單,不想要調整程式的做法如下:
調整 my.ini 將 sql-mode 內的 NO_ZERO_DATE 刪除即可。
相關資料:
主要是因為 MySQL5.7 在日期格式做了點調整。
時間預設格式採用 0000-00-00 00:00:00 會造成資料無法寫入的狀況。
最簡單,不想要調整程式的做法如下:
調整 my.ini 將 sql-mode 內的 NO_ZERO_DATE 刪除即可。
相關資料:
2017年10月30日 星期一
Python 相關資料整理
- Python 安裝:
採用平台為 win10 64bit ,
下載 Windows x86 executable installer 版本。安裝於 D:/Python 。環境變數內的系統變數Path 新增 D:\Python\,D:\Python\Scripts\
- PIP 套件管理:
安裝套件:pip install packages
移除套件:pip uninstall package
利用排程自動更新所有管理的套件:
寫一支批次檔案,透過工作排程自動執行此腳本
批次檔案內容:
pip freeze > requirements.txt
pip install -r requirements.txt --upgrade
2017年10月11日 星期三
2017年9月29日 星期五
利用 XnView 批次裁切固定範圍的圖檔
利用 XnView 批次裁切固定範圍的圖檔
- 決定 X,Y 軸的起始 (e.g. 0,524)
- 決定 像素 ( e.g. 2368*3714)
- XnView -> Tools -->Batch Processing -->Transformations->crop -->填入以上資料
2017年9月1日 星期五
VeraCrypt 自動掛載加密檔案的設定
作業系統登入後,VeraCrypt 自動掛載加密檔案的設定如下:
- 選取 Favorites
- 點選要自動掛載的最愛
- 勾選 Mount selected volume upon logon 項目
- Example1 : veracrypt /volume "F:\Temp\VeraCrypt_Files.dat" /letter X /c no /nowaitdlg /quit
- Example2 : veracrypt /volume "F:\Temp\VeraCrypt_Files.dat" /letter X /auto /password YourPassword /nowaitdlg /quit
- Example3 : "C:\Program Files\VeraCrypt\VeraCrypt.exe" /d /f /quit (強制卸載所有加密磁碟)
2017年8月10日 星期四
Raspberry Pi 安裝時,螢幕沒有HDMI介面與鍵盤時的做法
螢幕沒有HDMI介面與鍵盤時的做法,也不想額外花費購買轉接器時:
因為 2016.11 後的版本SSH 預設是未啟動的狀態。在利用 Win32DiskImager將 Image 複製到 SD卡後,可以在 SD 卡內的根目錄內放一個名稱為 SSH 的檔案(無副檔名)。再將這張處理好的 SD卡插入到 Raspberry裝置內。這樣就可以不用額外接著螢幕與鍵盤。可以直接透過 SSH來存取這台 Raspberry 裝置。
透過 SSH 連入此裝置 IP,預設登入預設帳密為:pi/ raspberry
安裝與相關資料整理
- 新增登入帳號與停用預設帳號
sudo adduser newaccount
// to lock the specified account
sudo passwd -l pi
//This is the reverse of the -l option
sudo passwd -u pi
//Adding new user with SUDO permission
nano /etc/sudoers.d/010_pi-nopasswd , edit content { pi ALL=(ALL) PASSWD: ALL}
- 調整以下事項:
sudo raspi-config
Change User Passwordsudo reboot
expand Filesystem
TimeZone
Change Locale (en_US.UTF8 UTF8 or zh_TW.UTF8 UTF8)
sudo apt-get update -y
sudo apt-get upgrade –y
sudo rpi-update (updating firmware , kernel module ...)
sudo apt-get autoremove
sudo apt-get autoclean
- 相關指令
//檢查已安裝的核心模組
lsmod
//設定系統自動校時
sudo timedatectl set-ntp yes
timedatectl
- 關閉藍芽與無線網路功能(因為專案沒使用這個)
sudo nano /boot/config.txt
# turn wifi and bluetooth off
dtoverlay=pi3-disable-wifi
dtoverlay=pi3-disable-bt
- 安裝要的服務
sudo apt-get install apache2 -y
sudo apt-get install php5 libapache2-mod-php5 –y
- Apache 監聽 port 修改
sudo nano /etc/apache2/ports.conf
sudo /etc/init.d/apache2 reload
- Apache htdocs 目錄權限調整
sudo chown -R youracccount:www-data /var/www
sudo chmod 775 /var/www
sudo usermod -a -G www-data youraccount(e.g. pi)
sudo reboot
- 額外用到的 PHP 模組
sudo apt-get install php5-sqlite -y
sudo apt-get install php5-curl -y
- sqlite 目錄權限調整
sudo chown -R youraccount:www-data sqlite/
sudo chmod 775 -R sqlite/
- 例行工作排程
crontab -e
Example
//10 分鐘自動執行 PHP Script
*/10 * * * * /usr/bin/curl -q http://localhost/your php code.php
- Raspberry 關機
sudo poweroff or sudo shutdown -h now
- 例行更新的腳本
#!/bin/sh
sudo apt-get update -y
sudo apt-get upgrade -y
sudo rpi-update
sudo apt-get autoremove
sudo apt-get autoclean
sudo reboot
Raspberry OS 版本升級方式 (Jessie 升級至 Stretch 步驟)
apt-get update -y
apt-get upgrade -y
apt-get dist-upgrade -y
sudo sed -i 's/jessie/stretch/g' /etc/apt/sources.list
apt-get update -y
apt-get upgrade -y
apt-get dist-upgrade -y
//check version
lsb_release -a
Raspberry 的其它應用
- 相關資料
- How to Setup a Raspberry Pi Without a Monitor or Keyboard
- Setting up an Apache Web Server on a Raspberry Pi
- How To Setup A Web Server On Your Raspberry Pi 10
- Scheduling tasks with Cron
- Securing your Raspberry Pi
- How to disable the Pi3's WLAN & Bluetooth ?
- cron jobs crontab 排程教學
- Raspberry Pi Auto Update (Updated)
- How to Write and Run a Shell Script on the Raspberry Pi
- 在樹莓派上設定 Crontab 的新方法
- Raspbian GNU/Linux upgrade from Jessie to Raspbian Stretch 9
- Upgrade Raspbian Jessie to Raspbian Stretch
- Debian 9 (stretch) 正式釋出
訂閱:
文章 (Atom)


