// 從外面送一個 my_sound.mp3 檔案進去 docker 環境裡面的 /my_sound.mp3
// 使用 ebuildy/echoprint 這個 docker image 裡面的 echoprint-codegen 程式去跑它
docker run -v my_sound.mp3:/my_sound.mp3 ebuildy/echoprint echoprint-codegen /my_sound.mp3
// 把資料從 container 當中拿出來 ebca1bdd8bfc -> container id
docker cp ebca1bdd8bfc:/opt/echoprint.tar .
// 把資料test.c從本機端丟進 docker container 中
docker cp test.c ebca1bdd8bfc:/
// 列出正在run的 docker image 環境
docker ps
// 列出我有電腦上載下來的 docker images
docker images
https://www.youtube.com/watch?v=5WK9R1y-eKg
================
http://eriyu-blog.logdown.com/posts/773548-study-of-ng2-polyfill
主要是提供ES7提出的Observables特性,
Observables提供了非同步資料fetch時的另一種做法。
我們跟伺服器端抓取完資料,要做後續的動作時,
最早的寫法是用callback,
後來改良的寫法是使用Promise減少callback hell的發生。
Promise已經很好用了,但是它還是有些缺點。
它無法做到發送request後,可以中止或是重送的功能。
它在宣告使用Promise時,就已經被執行了。
而Observables解決了Promise的這些問題,
它可以中止及重送request。
Observables在創建時不會被執行,而是實際呼叫時才被執行。
另外Observables又提供了值組的操作,像是merge、sum、map等功能。
還有Observables就如同它字面的意思,他實作觀察者模式,當資料變更時會發出通知給它的訂閱者。
官方的Angular2教學文件在非同步資料抓取,是直上ES7的規格,提供Observables的寫法,但你也可以依據你的專案需求改成Promise。
一般的專案,也許可以用Promise就能滿足了,但是如果你的專案功能是需要比較互動、即時性的時候,用上Observables就不用費太多功夫做資料的watch。
https://www.joshmorony.com/building-mobile-apps-with-ionic-2/observables-in-ionic2.html
this.http.get(url).subscribe(
(data) => {
console.log(data);
},
(err) => {
console.log(err);
},
() => {
console.log(“completed”);
}
);
In the code above the first event handler handles the onNext response, which basically means “when we detect the next bit of data emitted from the stream, do this”. The second handler handles the onError response, which as you might have guessed will be triggered when an error occurs. The final handler handles the onCompleted event, which will trigger once the Observable has returned all of its data.
https://read01.com/PL50mL.html
GALERA CLUSTER FOR RANCHER http://www.dockerinfo.net/1771.html
https://octoperf.com/blog/2016/11/17/rancher-galera-cluster/
Running a Galera Cluster in Kubernetes https://www.percona.com/live/data-performance-conference-2016/sessions/running-galera-cluster-kubernetes
http://severalnines.com/blog/installing-kubernetes-cluster-minions-centos7-manage-pods-services
Architecture of deployment on Azure http://withblue.ink/2016/03/09/galera-cluster-mariadb-coreos-and-docker-part-1.html
https://github.com/rodrigoreal/ionic2-angularfire-login
==========
https://github.com/angular/angularfire2/issues/560
https://blog.khophi.co/angularfire2-authentication/
https://github.com/angular/angularfire2/issues/568
https://github.com/angular/angularfire2/issues/566