2009-01-01から1ヶ月間の記事一覧

windows版の不都合

webpackのwindows版は、バグで終了したときに変なプロセスを残しつづける。 これのせいで、次に実行した時もグダグダ文句言われるので、 タスクマネージャで_pn.exeとかを消しておく癖をつけよう。 そしてできるだけlinux版でやろう。

jpeg2pdf

ゼミの手書き資料をpdfにしたいときに役に立つ。 convert *.jpeg out.pdfconvert万能だな。 おそらく名前順(と言うか、標準入力から読まれる順)なので、スキャンする時は素直にやろう。

nice

reniceの方が使いやすい。優先順位を変える。 renice (nice value) (pid)nice value は-20〜19まで。普通は0。 みんなでパソコンを使いあうときはちょっぴり遠慮を見せるとモテる。nice:4くらい。気持ち。一般ユーザーは下げることは出来てもあげることは出…

ssh+nohup

ちょっぴりややこしい。ssh では標準入力も全部カットしないと接続を切れないため、 //sshで相手のパソコンに入った状態で(多段でも大丈夫) ... export DISPLAY=:0.0 nohup emacs test.txt 1>file1.out 2>file2.out

球面一様分布

#include "G4RandomDirection.hh" ... ... G4ThreeVector g1=G4RandomDirection(); で出せる。rootでもCLHEPが共通なので似た関数があった気がするが、思い出せない。

図の入れ方

tex

毎度ググるのがアホらしいので書いておく。 \usepackage[dvips]{graphicx} \usepackage{afterpage} がまず必要。 一枚を貼るとき \begin{figure}[!hbt] \begin{center} \includegraphics[width=50mm]{filename.eps} \label{labelname} \caption{caption} \en…

ベクトル文字

tex

\usepackage{bm} として、 \bm{r} などとすればよい。

ispell

M-x ispell-bufferで動作開始。 操作は、 space 対象となる単語を修正せずに次の単語に進む。 <Number> 選択された単語を修正する。 i 自分用の辞書(環境変数HOMEに,.ispell_americanmed+と言う名前のファイルが出来るらしい)に登録して次の単語に進む。環境変数の</number>…

ヒストグラムの積分

int sum = h_hist->Integral(initial_binnum,final_binnum); とする。binの番号を与える関数は、 h_hist->GetXaxis()->FindBin(value);

ffmpeg

ffmpeg -i inputfilename.flv -acodec copy outfilename.mp3 ffmpeg -i inputfilename.mp4 -ab 128 outfilename.mp3

連番のrootファイルを扱う方法

TTreeを継承したクラス、TChainを使う。 分割の仕方はいつだかのエントリ(http://d.hatena.ne.jp/moreinteraction/20081221/1229842461)参照。 TChain ch("TreeName"); ch.Add("dat/data_0.root"); TString FilePath; for ( int i=1;i<10;i++ ) { sprintf(Fi…

汎用rootマクロ

まだ途中・・・ #ifndef __CINT__ #include <TApplication.h> #include <TCanvas.h> #include <iostream> #include <fstream> #include <TROOT.h> #include <TStyle.h> #include <TString.h> #include <TH1.h> #include <TH2.h> #include <TF1.h> #include <TGraph.h> #include <TGraphErrors.h> #include <TRandom.h> #include </trandom.h></tgrapherrors.h></tgraph.h></tf1.h></th2.h></th1.h></tstring.h></tstyle.h></troot.h></fstream></iostream></tcanvas.h></tapplication.h>