Top/Recent-articles
English | Japanese
English | Japanese

Menu

  • Top
  • Akihiko Yamaguchi 山口 明彦
  • Project プロジェクト
  • Text テキスト
  • Recent articles 最近の記事
  • Articles 記事一覧 (a to z)
  • Search 検索
Access: 2/10729 - Admin

Recent articles

最近の記事

< Past 20 pages | 21 to 40 | Next 20 pages >
2015-01-01
article/Ignore-specific-directories-in-find

Ignore specific directories in find

findで特定のディレクトリを無視するには

[linux][trick]
2012-11-26

オプション -prune を -path などと組み合わせて使えばいいらしい.例えば build ディレクトリを無視しつつ CMakeLists.txt を検索するには,

find . -path './build' -prune -or -name CMakeLists.txt -print

と書く. -path './build' -prune -or のように書くのがポイント.最後の -print がないと,build ディレクトリも出力されてしまう.

... read more (article/Ignore-specific-directories-in-find)
article/OpenCV-imshow-invisible-without-waitKey

OpenCV: imshow is not visible without waitKey

OpenCV: imshow で表示しても waitKey を使わないとウィンドウは描画されない

[c++][opencv]
2012-09-06

ということを今まで知らずに使ってた.User Interface - OpenCV v2.4.2 documentation#waitKey によると:

This function is the only method in HighGUI that can fetch and handle events, so it needs to be called periodically for normal event processing ...

... read more (article/OpenCV-imshow-invisible-without-waitKey)
article/Trouble-shooting-of-ODE-installation-for-graphics-X11

Trouble shooting of ODE installation for graphics (X11) problems

ODEのインストール時にグラフィック(X11)で問題が起きる場合は

[c++][linux][bug]
2012-07-25

ODE (Open Dynamics Engine) を Linux (ここでは Ubuntu) にインストールするときに,以下のようなエラーが出る場合の対処法.

x11.cpp:108: error: undefined reference to 'XOpenDisplay'
x11.cpp:123: error: undefined reference to 'XCreateColormap'
...
... read more (article/Trouble-shooting-of-ODE-installation-for-graphics-X11)
article/Change-width-of-SVG-markers-generated-by-gnuplot

How to change width of SVG markers generated by gnuplot

gnuplotで出力したSVGのマーカの太さを変更するには

[trick]
2012-07-23

論文に掲載するグラフを gnuplot で作るとき,SVG (Scalable Vector Format) で出力して Inkscape などで編集すると便利だ.だが,マーカ(×など)の線の太さを Inkscape で変更できなかったので,直接 SVG (XML) ファイルを編集してマーカの線の太さを変更する方法をメモ.

... read more (article/Change-width-of-SVG-markers-generated-by-gnuplot)
article/Use-function-for-alias-with-arguments-in-bash

Use a function for an alias with arguments in bash

bash で引数つきのエイリアスを使うには関数を使えばいいらしい

[bash][trick][linux]
2012-06-01

tcsh だったら !* を使うのだが, bash の場合は関数を定義しないとダメらしい.

例 (tcsh, bash の順):

alias   pless   '/usr/share/source-highlight/src-hilite-lesspipe.sh \!* | less -R'
function pless(){ /usr/share/source-highlight/src-hilite-lesspipe.sh $@ | less -R;}

bash を使わないので知らなかった.ちなみに pless はソースコードを端末上でハイライトできるようになる.

... read more (article/Use-function-for-alias-with-arguments-in-bash)
article/iPad-cannot-see-videos-through-SSL-https

iPad cannot see videos through SSL (https)

iPad では SSL (https) で接続すると動画が見れない!?

[bug][mac]
2012-04-04

信じられない話だが,iPad (iPhone も) では,SSL で接続すると,動画が見られなくなる場合がある.例えば http://example.com/hoge.mp4 は見られるが,https://example.com/hoge.mp4 は見られない,など.

... read more (article/iPad-cannot-see-videos-through-SSL-https)
article/Reference-type-of-element-of-std-vector-bool-is-NOT-bool

Reference type of an element of std::vector<bool> is NOT bool& (sometimes)

std::vector<bool>の要素の参照型はbool&ではない(場合がある)

[c++]
2012-03-07

std::vector<T>::back() を使うと,末尾の要素の参照を取得できる.これは普通は,T&型だ.ところが,T=bool に限っては,「std::_Bit_reference」型なのだ(少なくとも g++ の場合).

通常,bool を関数の引数として渡すとき,わざわざ参照渡ししようとは思わないから(別に効率がよくなるわけではない),意識する必要はないのだが,テンプレート関数やクラスを作る場合には,知っておかないと理解不能なエラーに直面することがある.なので,忘備録も兼ねてメモ.

... read more (article/Reference-type-of-element-of-std-vector-bool-is-NOT-bool)
article/Specialize-template-member-methods-outside-the-class

Specialize template member methods outside the class

テンプレートメンバ関数の特殊化はクラス外で

[c++]
2012-03-04

クラスのメンバ関数をテンプレート関数として作成し,さらにそれを特殊化する場合,特殊化は,特殊化宣言も含めてクラス外で行わなければならないらしい.

... read more (article/Specialize-template-member-methods-outside-the-class)
article/Minimum-code-to-use-Microsoft-kinect-SDK-Skeleton

Minimum code to use Microsoft kinect SDK

Skeleton

Microsoft kinect SDK を手っ取り早く使ってみるミニマムプログラム

~スケルトン編~

[c++][windows]
2011-12-21

Microsoft の kinect SDK をダウンロードしてくると,インストールは簡単だし,Visual Studio でサンプルプログラムを簡単にコンパイルして実行できる.しかし,コードはそれなりに煩雑で(と言っても1000行程度だが),自分でアプリを作る場合にどこから始めればいいか,今一つピンとこない.

そこで,GUIなどを一切使わず,単にkinectでスケルトン (skeleton) を計測してファイルに保存するだけ,という最小のプログラムを書いてみた.言語は C++.基本的には,このページの内容をそのまま流用している.

... read more (article/Minimum-code-to-use-Microsoft-kinect-SDK-Skeleton)
article/Make-friendly-templates

Make friendly templates

template な friend

[c++]
2011-12-07

テンプレートクラスや関数を friend にする方法のメモ.危険性についても言及.

... read more (article/Make-friendly-templates)
article/Put-image-on-LaTeX-by-converting-PDF-to-PS-by-Acrobat-Reader

Put image on LaTeX by converting PDF to PS by Acrobat Reader

Acrobat Reader で PDF を PS に変換して LaTeX に貼り付け

[latex][trick]
2011-11-21

過去記事 もう eps でトラブらない...LaTeX で PDF を張り付ける では,PDFをLaTeXに貼り付ける方法を紹介したが,学会によっては画像ファイルの形式として PDF を許可していない場合がある.また,dvips で変換した PS ファイルが表示できなかったりするトラブルも発生した.やはり,PS/EPS の需要は大きい,ということで,acroread を使って PDF を PS に変換する小技を紹介する.

なお,今回紹介する方法は,Inkscape で eps をきれいに出力する方法で解決できなかった,xdvi で表示時に画像がずれて見える問題も解決する...かもしれない.

... read more (article/Put-image-on-LaTeX-by-converting-PDF-to-PS-by-Acrobat-Reader)
article/Japanese-font-is-weird

Japanese font is weird!

日本語フォントがおかしい!

[linux][bug]
2011-11-08

KDE4 で,日本語のフォントの句読点がずれて表示される問題があった.中国語用のフォントが原因のようなので,そのパッケージを削除してみたらなおった.

Before:

20111108155934.jpg

After:

20111108155933.png
... read more (article/Japanese-font-is-weird)
article/No-more-eps-troubles-Put-PDF-figures-on-LaTeX

No more eps troubles... Put PDF figures on LaTeX

もう eps でトラブらない...LaTeX で PDF を張り付ける

[latex][trick]
2011-10-07

過去記事 Inkscape で eps をきれいに出力する方法 で紹介している方法などで eps 画像を作って LaTeX で読み込むと,何かしらのトラブルが起こりがちだ.dvipdfmx で PDF 化したときに画像が表示されないこともある.

Inclusion of large eps files with dvipdfm によると,dvipdfm(x) における eps の読み込みには問題があるから,画像を PDF 化して読み込むとよい,と書いてある.これからはそうしよう.

... read more (article/No-more-eps-troubles-Put-PDF-figures-on-LaTeX)
article/Command-to-rotate-eps

Command to rotate eps

eps を回転するコマンド

[latex][trick][linux][bash]
2011-10-05

epsffit というコマンドを使えば,eps を回転できる.epsffit は少々使い勝手が悪いので,使いやすくするスクリプトを書いてみた.

... read more (article/Command-to-rotate-eps)
article/Serial-communication-trouble-on-Ubuntu-10.10-and-11.04

Serial communication trouble on Ubuntu 10.10 and 11.04

Ubuntu の 10.10 や 11.04 でシリアル通信ができない

[c++][bug][linux]
2011-06-07

シリアルケーブルをUSBに変換するコネクタを使って,BioloidというROBOTIS社のロボットを,PCで制御する際の問題について.

... read more (article/Serial-communication-trouble-on-Ubuntu-10.10-and-11.04)
article/Encode-H.264-videos-with-ffmpeg

Encode H.264 videos with ffmpeg

ffmpeg で H.264 エンコーディングの動画を作る

[linux][trick]
2010-12-01

HTML5 のvideo要素で使えたり使えなかったりするH.264だが,使えるにこしたことはないと思い,ffmpegでエンコーディングしようとしてみた.少しコツが必要なので,メモしておく.

... read more (article/Encode-H.264-videos-with-ffmpeg)
article/Setup-Japanese-TeX-on-Debian

Setup memo of Japanese TeX on Debian

Debian で日本語 TeX 環境を構築するメモ

[latex][linux][setup]
2010-11-01

Debian で日本語 TeX 環境を構築するには,以下のような手順を踏めばよいようだ.

... read more (article/Setup-Japanese-TeX-on-Debian)
article/Most-powerful-command-line-graph-plotter

Most powerful command line graph plotter

最強のコマンドライン グラフ プロット ツール

[python]
2010-10-09

いちいち Gnuplot を起動してグラフを描画するのが面倒なので,コマンドラインから使える Gnuplot のラッパスクリプトを書いた.変化するデータファイルをリアルタイムにプロットするスクリプトも組み込んだ.とても使いやすいので紹介する.

20100427232543.gif
... read more (article/Most-powerful-command-line-graph-plotter)
article/Forward-declaration-of-STL-containers

Forward declaration of STL containers

How to make light header files?

STL コンテナの前方宣言

軽いヘッダファイルを作るには

[c++][trick]
2010-09-02

STL (standard template library) コンテナを include すると,それなりにコストが掛かる(参考).このコストは,場合によっては「前方宣言 (forward declaration)」によって大幅に軽減できる.STL コンテナの場合,前方宣言が少々ややこしいので,まとめておく.

... read more (article/Forward-declaration-of-STL-containers)
article/Speedup-Google-Chrome-with-RAM-disk

Speedup Google Chrome with RAM disk

Google Chrome が重いので RAMディスク を使って高速化!

[linux][bash]
2010-08-31

Google Chrome がたまにすごく重くなる.ディスクアクセスが原因のようだ.そこでキャッシュ(消えても問題ないファイル群)~/.cache/google-chrome を RAMディスク /dev/shm 以下に移動したのだが,それでも改善されない.そこで,設定ファイル~/.config/google-chrome も RAMディスク 上に置くことにした.

# 追記@Sep.04,2010:スクリプト修正.

... read more (article/Speedup-Google-Chrome-with-RAM-disk)
< Past 20 pages | 21 to 40 | Next 20 pages >

Last-modified:2015-01-04 (Sun) 22:03:53 (3779d)
Link: MenuBar(2843d) Top(2843d) article/No-more-eps-troubles-Put-PDF-figures-on-LaTeX(3782d) article/Real-time-plot-script(3782d) article/Include-cost-of-header-files(3784d) article/Beautiful-eps-generation-with-Inkscape(3784d)
Site admin: Akihiko Yamaguchi.
Written by: Akihiko Yamaguchi.
System: PukiWiki 1.5.0. PHP 5.2.17. HTML conversion time: 0.035 sec.