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

Fortran 千本ノック 3

15本目 gotoを使う implicit none integer::i i = 2 if (i .eq. 2) go to 10 print *,"after if" 10 print *,"at 10" print *,"end"

Fortran 千本ノック 2

11本目 行列を"行""列"の順番でつくる! integer,dimension(8)::arr integer,dimension(2,4)::arr2 arr = (/1,2,3,4,5,6,7,8/) arr2 = transpose(reshape(arr,(/4,2/))) ! ! ko iu gyouretu ni naru ! ! 1 2 3 4 ! 5 6 7 8 12本目 行列の行にアクセス! inte…

electronのpackageからappxを作ってローカルに証明書でサインしてインストールしてみる

electron-packagerをインストールします。 npm install electron-packager -g packageを作ります。 electron-packager . "Sample" --platform=win32 --arch=x64 electron-windows-storeをインストールします。 npm install -g electron-windows-store できた…

もう忘れない"度からラジアン変換"の式

rad = deg * (PI / 180) deg = rad * (180 / PI) この2つの式をいつも忘れてしまいます。 これを忘れない覚え方は。 ”欲しいものを掛ける”です。 ラジアンが欲しいならπを 度が欲しいなら180を掛ける方(分子)において 割る方はその対になるものを置くと覚え…

node-gypでwindowsのnative moduleをコンパイルしたい

windows-build-toolsは途中で止まってうまくいかなかったので手動でインストールします。まずはVisual Studio Build Toolsとpython2.7.15をダウンロードしてインストールします。それとnpmもインストールします。 https://visualstudio.microsoft.com/thank-…

Mathjax テスト

$$x = {-b \pm \sqrt{b^2-4ac} \over 2a}$$

mallocをdebug compileしたい

glibcをダウンロードし解凍します。 glibcのフォルダーないに入りbuildフォルダーをつくります。 cd glibc-2.21 mkdir build cd build glibcをインストールするフォルダーを指定してconfigureします。 ../configure --prefix=/home/shingo/lib/glibc そしてm…

coffee scriptとvueを使ってelectronのappをつくりたい

js

ファイル構成はこんな感じです。 my_coffee_electron ├── launch │ ├── main.js │ └── package.json ├── package.json ├── src │ ├── coffee │ │ └── app.coffee │ ├── pug │ │ └── index.pug │ └── vue │ ├── my_component.coffee │ └── my_component.vue └…

electronでvue.jsのエラー

もしvue js で You are using the runtime-only build of Vue where the template compiler is not available. Either pre-compile the templates into render functions, or use the compiler-included build と言われてwebpack使っていないという時は node…

Fortran 千本ノック

1本目 Int の配列をつくって1,2,3を入れる! integer,dimension(3)::arr = (/1,2,3/) 2本目 Int の10個の配列をつくって2から5まで1あとは0に! integer,dimension(10)::arr arr = 0 arr(2:5) = 1 3本目 Int の3x3の配列をつくって真ん中は1あとは0に! inte…

Lapackをコンパイルしてみる

Lapackのコードを読んでみたいと思います。 まずはgithub Lapackからダウンロードします。 LapackのfortranのコードはSRCフォルダーに入っているのでそれをコンパイルしてみましょう。 SRCフォルダーをどこかにコピーします。 そのときmake.inc.exampleもコ…