2017年12月30日 星期六

Android 開發


使用者授權

android API 23 之後的,都需要在程式裡詢問使用者,以取得相關授權,以下文章,說明的方式是我目前覺得最簡單的方式。
https://altbeacon.github.io/android-beacon-library/requesting_permission.html






2017年12月9日 星期六

macOS 10.13 High Sierra Setup



macOS 10.13 High Sierra Apache Setup: Multiple PHP Versions
https://getgrav.org/blog/macos-sierra-apache-multiple-php-versions


macOS 10.13 High Sierra Apache Setup: MySQL, APC & More...

ref: https://getgrav.org/blog/macos-sierra-apache-mysql-vhost-apc

========================================= 

Apache2

The default ports have been set in
/usr/local/etc/httpd/httpd.conf to 8080 and in
/usr/local/etc/httpd/extra/httpd-ssl.conf to 8443
so that httpd can run without sudo.

========================================= 

PHP 7.1

/usr/local/etc/php/7.1/php.ini
 
========================================= 
 
SMB

ref: https://gist.github.com/natritmeyer/6621231

#Mount the share:
mount_smbfs //username:password@server.name/share_name share_name/

#Unmount the share:
umount share_name

========================================= 



Python 學習資源

以下依個人喜好優先順序排序

莫煩 Python
https://morvanzhou.github.io/tutorials/




2017年12月2日 星期六

瀏覽器直接列印的設定



firefox

from: https://stackoverflow.com/questions/945691/automatically-print-image-from-website

The only solution to avoid print dialog that I found was creating a variable on Mozilla Firefox to set auto-print. Maybe is not the best solution if you need to use other browser, but in my case, I only need to print a report automatically and it works:
1- Open Firefox and type "about:config" in the address bar
2- Right click on any preference and select "New" > "Boolean"
3- Add a variable called "print.always_print_silent" with "true" value
4- Restart Firefox.

Google Chrome

--kiosk 的動作,我目前試不出來,猜想應該是新版本不支援了。