Hua-Yuan Li

@yuan

Joined on Oct 28, 2017

  • # LeetCode 2 - Two Sum II - Input array is sorted ###### tags: `每日一LeetCode爆肝又爆頭` ## Description Given an array of integers that is already sorted in ascending order, find two numbers such that they add up to a specific target number. The function twoSum should return indices of the two numbers such that they add up to the target, where index1 must be less than index2. Note: - Your returned answers (both index1 and index2) are not zero-based. - You may assume that each input would have exac
     Like  Bookmark
  • # LeetCode 1 - Two Sum ###### tags: `每日一LeetCode爆肝又爆頭` ## Description Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have exactly one solution, and you may not use the same element twice. ## Example ```txt Given nums = [2, 7, 11, 15], target = 9, Because nums[0] + nums[1] = 2 + 7 = 9, return [0, 1]. ``` ## Link - https://leetcode.com/problems/two-sum-ii-input-array-is-sorted/submissions/ ## Ver
     Like  Bookmark
  • # [20190616 - Raspberry Pi](https://hackmd.io/s/SkgLJCCnV) ###### tags: `tcfst` ## Author - Yuan < e61983@gmail.com > - Wei < demon0303loki@gmail.com > - Jia-Hao,Hsu < jhs.8901.3737@gmail.com > ## License ![cc by-nc-sa](https://licensebuttons.net/l/by-nc-sa/3.0/88x31.png) ## OpenCV & Camara - [Pi Facerec Box][github-pi-facerec-box] {%youtube CTP9rpgabYI %} ## Web-Cam - [mjpg-streamer][github-mjpg-streamer] {%youtube e7ufygg_FsU%} ## Google App Srcipt - [Google Apps Script][g
     Like  Bookmark
  • # [20190602 - Raspberry Pi](https://hackmd.io/s/SkgLJCCnV) ###### tags: `tcfst` ## Author - Yuan < e61983@gmail.com > - Wei < demon0303loki@gmail.com > - Jia-Hao,Hsu < jhs.8901.3737@gmail.com > ## License ![cc by-nc-sa](https://licensebuttons.net/l/by-nc-sa/3.0/88x31.png) ## OpenCV ### Install ```shell= pip install opencv-python pip install opencv-contrib-python ``` ### Example ```python= import cv2 img = cv2.imread('messi5.jpg',0) cv2.imshow('image',img) cv2.waitKey(0) cv2.destroyAllWi
     Like  Bookmark
  • # [20190526 - Raspberry Pi](https://hackmd.io/s/SkgLJCCnV) ###### tags: `tcfst` ## Author - Yuan < e61983@gmail.com > - Wei < demon0303loki@gmail.com > - Jia-Hao,Hsu < jhs.8901.3737@gmail.com > ## License ![cc by-nc-sa](https://licensebuttons.net/l/by-nc-sa/3.0/88x31.png) ## Using Python connect MySQL - [Try It][online-python_sql] ### Install python-mysqldb ```shell= sudo apt install -y python-mysqldb ``` or ```shell= sudo easy_install pip sudo pip install pip --upgrade sudo apt-get buil
     Like  Bookmark
  • # [20190519 - Raspberry Pi](https://hackmd.io/s/SkgLJCCnV) ###### tags: `tcfst` ## Author - Yuan < e61983@gmail.com > - Wei < demon0303loki@gmail.com > - Jia-Hao,Hsu < jhs.8901.3737@gmail.com > ## License ![cc by-nc-sa](https://licensebuttons.net/l/by-nc-sa/3.0/88x31.png) ## Interrupt Ccontrol ### Soft IRQ 參考 https://hackmd.io/s/S1WKTCFM4 ### GPIO - gpiolib Version gpiolib 約在 Kernel 2.6.21 引入, 不過到了 Kernel 4.18.7 又更新了 API ,雖然兩者的用法十分的相似,但課堂中所使用的 API 已經[不建議使用][gpiolib: document new inte
     Like  Bookmark
  • # [20190505 - Raspberry Pi](https://hackmd.io/s/SkgLJCCnV) ###### tags: `tcfst` Author - Yuan < e61983@gmail.com > - Wei < demon0303loki@gmail.com > - Jia-Hao,Hsu < jhs.8901.3737@gmail.com > ## License ![cc by-nc-sa](https://licensebuttons.net/l/by-nc-sa/3.0/88x31.png) ## Command ### Show IP address ```shell= ifconfig ``` ### Show Pin-Map ```shell= pinout ``` Output: <div> <img src="https://i.imgur.com/KbLbLBR.png" style="width: 58%; height: auto;"> <img src="https://i.imgur.co
     Like  Bookmark