2019年6月12日 星期三

[#]study get battery status

要 reference Windows.Devices.Power 就失敗了.






有用的文章:
Calling Windows 10 APIs From a Desktop Application
https://blogs.windows.com/buildingapps/2017/01/25/calling-windows-10-apis-desktop-application/#0VBvIDw8jFwbXajH.97

Battery and charging
https://docs.microsoft.com/en-us/windows-hardware/design/component-guidelines/battery-and-charging

初探C#操作WMI類別及其應用
http://einboch.pixnet.net/blog/post/266960399-%E5%88%9D%E6%8E%A2c%23%E6%93%8D%E4%BD%9Cwmi%E9%A1%9E%E5%88%A5%E5%8F%8A%E5%85%B6%E6%87%89%E7%94%A8

Battery Level using System Management in C#https://stackoverflow.com/questions/18124436/battery-level-using-system-management-in-c-sharp

不錯的範例
https://gist.github.com/ahawker/9715872

2019年5月30日 星期四

[python]flask 練習


不錯的文張:

https://hackmd.io/s/H1CMTVheG

https://cutejaneii.wordpress.com/2017/11/06/python-2-%E4%BD%BF%E7%94%A8pythonflask%E6%92%B0%E5%AF%ABapi/







How to get data received in Flask request
jinja2.exceptions.TemplateNotFound: bootstrap/base.html
https://stackoverflow.com/questions/44318142/jinja2-exceptions-templatenotfound-bootstrap-base-html


Flask學習筆記-Flask模板整合Bootstraphttps://codertw.com/%E7%A8%8B%E5%BC%8F%E8%AA%9E%E8%A8%80/13232/

2019年5月29日 星期三

[python]timer


練習:

from threading import Timer
import time
def tick_run():
    print("timer wakeup")
class RepeatingTimer(Timer):
    def run(self):
        while not self.finished.is_set():
            self.function(*self.args,**self.kwargs)
            self.finished.wait(self.interval)
t=RepeatingTimer(5.0,tick_run)
t.start()
while True:
    time.sleep(1)
    print("main wakeup")





不錯的文章:
https://www.twblogs.net/a/5c894d8ebd9eee35fc148ca6

2019年4月28日 星期日

[linux]study

不錯的文章:

認識系統服務daemons
http://bluelove1968.pixnet.net/blog/post/222286828-%E8%AA%8D%E8%AD%98%E7%B3%BB%E7%B5%B1%E6%9C%8D%E5%8B%99-daemons

 更改檔案擁有者與群組,chown指令使用較學與範例
https://blog.gtwang.org/linux/linux-chown-command-tutorial/

使用SSMTP與GMail以指令或程式自動寄信教學
https://blog.gtwang.org/iot/raspberry-pi/linux-send-mail-command-using-ssmtp-and-gmail/

2019年4月27日 星期六

[raspberry]攝影機學習

https://hackmd.io/vbHvp33ARgOmhlW0LlvZcw?view

gmail 無兩階段認證時,須將如下打開,才可寄信:
Google帳戶 -> 安全性 ->低安全性應用程式存取權->開啟



不錯的文章:
樹莓派 Raspberry Pi 自製智慧型監視器,自動遠端通報系統
https://blog.gtwang.org/iot/raspberry-pi/how-to-diy-home-alarm-system-with-raspberry-pi-and-webcam/

樹莓派 Raspberry Pi 與 USB 網路攝影機,自製縮時攝影設備教學
https://blog.gtwang.org/iot/raspberry-pi/raspberry-pi-time-lapse-using-motion-and-webcam/

2019年4月25日 星期四

[python]study


不錯的文章:

PHP與Python搭配
http://programdoubledragon.blogspot.com/2017/02/phppython.html