This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* questionはテーブル名 | |
*/ | |
class Model_Question extends Model | |
{ | |
/* | |
* questionテーブル | |
*/ | |
// 略 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* create_choices | |
* 選択肢(4つ)を生成 | |
* | |
* @param int $question_last_id question.id | |
* @return boolean | |
*/ | |
private function create_choices($question_last_id) { | |
/* | |
* IPA系の試験は選択肢は4つある |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
volumes: | |
- /share | |
- .:/app | |
- ./docker/mysql:/etc/mysql/conf.d:ro | |
- ./docker/apache:/etc/apache2/sites-enabled:ro |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 1. タイムゾーンコメントアウト | |
// 97行目あたり | |
'default_timezone' => 'Asia/Tokyo', | |
// 2. always_loadとORMのコメントアウトを外す | |
初期は下記のようにコメントアウトされています。 | |
// 259行目あたり | |
// 'always_load' => array( | |
/* 略 */ | |
// 'packages' => array( | |
// //'orm', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ポート番号を指定して、CGIサーバを起動 | |
EXPOSE 8000 | |
ENTRYPOINT ["/usr/local/bin/python", "/home/python/cgiserver.py"] | |
USER python |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ docker run -p 80:80 -v /Users/$USER/Documents/workspace/korejo:/var/www/html --name php -d php:5.6-apache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ポートはserver.pyと合わせて8080にし、サーバ起動ファイルを新しく作成した"bottle"ユーザで起動 | |
EXPOSE 8080 | |
ENTRYPOINT ["/usr/local/bin/python", "/home/bottle/server.py"] | |
USER bottle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Pythonは公式イメージ | |
FROM python:3.5.2 | |
# オリジナルはJoshua Conner氏 | |
# MAINTAINER Joshua Conner <joshua.conner@gmail.com> | |
MAINTAINER Ryosuke Kamei <sr2smail@gmail.com> | |
# viインストール | |
RUN apt-get update | |
RUN apt-get install -y vim |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# GPIOを制御するライブラリ | |
import wiringpi | |
# タイマーのライブラリ | |
import time | |
# ボタンスイッチを繋いだGPIOの端子番号 | |
button_pin = 17 # 11番端子 | |
# GPIO端子の設定 | |
motor1_pin = 23 # 16番端子 | |
motor2_pin = 24 # 18番端子 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysql_server # mysql -u{ユーザ名} -p | |
(パスワードを入力) |
OlderNewer