kakts-log

programming について調べたことを整理していきます

2018-01-01から1年間の記事一覧

worker_threadsを使ったNode.js マルチスレッドプログラミング

qiita.com この記事は Qiita Node.js Advent Calendar 2018 14日目の記事となります。 今回は Node.js のWorker Threadsに関してまとめます。 本記事では、前提としてNode.js v10.14.1 における内容をまとめています。 worker_threadはexperimentalな機能な…

TypeScript: A difference of type-checking behavior for passing Object directly and indirectly.

TypeScript interface I'm a newbie of TypeScript. I was confused by an error for the type-checking of interface. This is just a memorandum for understanding the mechanism of TypeScript I created the SquareConfig interface same as the TypeSc…

How to resolve vue-loader error 'vue-loader was used without the corresponding plugin. Make sure to include VueLoaderPlugin in your webpack config.'

Preconditions dependencies for npm "dependencies": { "@webpack-cli/init": "^0.1.2", "vue": "^2.5.17", "webpack": "^4.20.2" }, "devDependencies": { "@babel/core": "^7.1.2", "@babel/preset-env": "^7.1.0", "babel-loader": "^8.0.4", "css-loade…

Node.js: UnhandledPromiseRejectionWarning

In node.js script, without attaching any error handlers to the Promise within a event loop, "unhandledRejection" is emitted. The error log is as follows. (node:57974) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This erro…

golang: failed to get golang.org/x/tools/cmd/oracle

preconditions golang: 1.6 failed to get golang.org/x/tools/cmd/oracle When I try to "go get golang.org/x/tools/cmd/oracle" in my golang project, it occures an error as wrote down below. go get golang.org/x/tools/cmd/oracle package golang.o…

Rust: occured error when using closure without type annotation.

I'm studying Rust and trying to write Rust code using closure. I found some confusing error about Type Inference of Rust. This post is just a memorandum of understanding for mechanism of Rust. fn main() { // closure // argument x is set wi…

Contributing to Node.js

Merged 2 PRs. I found and fixed small typo and bug of the sample codes in the documentation of Node.js. github.com github.com Both of them are landed on 10.2.0 node/CHANGELOG_V10.md at master · nodejs/node · GitHub

Rust: Error for copying String allocated memory to new variable.

When I write Rust code as below, it occurs error. I tried to print two same String by copying memory. fn main() { let s1 = String::from("Hello"); let s2 = s1; println!("{}, {}", s1, s2); } error[E0382]: use of moved value: `s1` --> src/mai…

Installing node.js v8.11.1 to centos 6.5 server.

Recently, Node.js v8.11.1 was released. From this version, minimum compiler requirement(gcc) for Node.js had been updated to 4.9.4. https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V8.md#8.11.1 In the centOS 6.5 server, …

How to solve the yum ** http://mirror.centos.org/centos/6/SCL/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 ** error in Centos6.5 server.

yum

After installing centos-release-SCL yum package in CentOS 6.5 server, installing other yum package was failed. Error message is same as below. $ sudo yum install libcurl http://mirror.centos.org/centos/6/SCL/x86_64/repodata/repomd.xml: [Er…

contributing to mongoDB

OSS

My PR was merged to mongoDB. [SERVER-32809] Fix typo in config_server_test_fixture.cpp - MongoDB

minikube start 時に [Error starting host: Error getting state for host: machine does not exist] が出た時の対処法

前提 macOS 10.11.6 kubectl v1.9.3 minikube v0.25.0 発生内容 ローカル環境でminikubeにより一度作った vmを削除後、 minikube start --vm-driver=virtualbox を実行すると以下のエラーがでる [Error starting host: Error getting state for host: machin…

Docker Swarm まとめ

概要 前記事(http://kakts-tec.hatenablog.com/entry/2018/02/12/220716)に引き続き, Docker公式ドキュメントのPart4 Swarmsの内容を整理します. Part4 Swarms Introduction Part3ではPart2で作成したアプリケーションを取り上げ,Serviceを用いてproduction…

Docker Servicesまとめ

概要 前記事 Docker containerまとめ - kakts-log に引き続き Docker公式ドキュメントのPart3 Servicesの内容を整理します. Part3 Services Introduction パート3では、アプリケーションのスケールを行い,ロードバランシングを有効にさせます. これを行うた…

Docker containerまとめ

概要 前記事に引き続き Docker公式ドキュメントのPart2の内容を整理 Part2 containers Introduction Dockerの方式でアプリをビルドしていく. アプリケーションのヒエラルキーの下層部分であるコンテナから始めます. コンテナの上層はserviceと呼ばれ、produc…

Docker Conceptまとめ

概要 DockerのConceptまわりを再度整理するために 公式ドキュメントのget-started part1の内容をメモ docs.docker.com 1: Docker Concept Docker: アプリケーションを開発・デプロイ・コンテナとして起動するプラットフォーム linuxコンテナをアプリケーショ…

Kubernetesのコンセプトまとめ

Kubernetes コンセプト Kubernetesのコンセプトを理解するために公式ドキュメントを読んでざっくり整理しました。 kubernetes.io overview kubernetesを利用するためには kubernetes apiを使ってクラスタを意図する構成にさせる。 たとえばどのようなアプリ…