As of July 2018, Raspbian does not yet include the latest Python release, Python 3.7.4. This means we will have to build it ourselves, and here is how to do it.
- Install the required build-tools (some might already be installed on your system).
| class Semver { | |
| constructor(major, minner, patch) { | |
| this.major = major; | |
| this.minner = minner; | |
| this.patch = patch; | |
| } | |
| toString() { | |
| return `${this.major}_${this.minner}_${this.patch}`; | |
| } |
| // add this to your API controller in Yii | |
| public function actionPreflight() { | |
| $content_type = 'application/json'; | |
| $status = 200; | |
| // set the status | |
| $status_header = 'HTTP/1.1 ' . $status . ' ' . $this->_getStatusCodeMessage($status); | |
| header($status_header); | |
| <?php | |
| if (!function_exists('mb_ucwords')) | |
| { | |
| function mb_ucwords($str) | |
| { | |
| return mb_convert_case($str, MB_CASE_TITLE, "UTF-8"); | |
| } | |
| } |