Top/Recent-articles
English | Japanese
English | Japanese

Menu

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

Recent articles

最近の記事

< Past 20 pages | 1 to 20 | >
2019-07-02
article/Display-Unix-Time

Display Unix Time

Unix時間を表示

[linux]
2019-07-02

Can be done by combining watch and date commands.

watchとdateコマンドを組み合わせればできる.

... read more (article/Display-Unix-Time)
article/Synchronize-Linux-Time-to-Remote

Synchronize Linux Time to a Remote Server

リモートサーバにLinux時間を同期する

[linux]
2019-07-02

It can be done by stopping the service ntp, and then running the command ntpdate with the remote server.

... read more (article/Synchronize-Linux-Time-to-Remote)
2018-09-27
article/python-multimode-singleton

Implementing "Multimode" Singleton on Python

Pythonで"マルチモード"シングルトンを実装

[python]
2018-09-27

Multimode singleton means: Usually a singleton class has a single instance. A multimode singleton class has a mode parameter x; there is an instance for each different value of x. If x is in {1,3,9}, there are thee instances.

マルチモードシングルトンとは: 通常,シングルトンクラスはひとつのインスタンスを持つ.マルチモードシングルトンクラスは,モードパラメータ x を持ち,各 x の値につき,ひとつのインスタンスが作られる.例えば x が {1,3,9} のモードを持つなら,3つのインスタンスが存在しうる.

... read more (article/python-multimode-singleton)
2018-09-02
article/rosinstall-git-default-remote

rosinstall Git default remote

rosinstall Git default remote

[ros]
2018-09-02

Fixing the warning of rosinstall: WARNING [vcstools] vcstools only handles branches tracking default remote, branch 'master' tracks remote 'None'.

rosinstall の警告に対処する方法について: WARNING [vcstools] vcstools only handles branches tracking default remote, branch 'master' tracks remote 'None'.

... read more (article/rosinstall-git-default-remote)
2017-07-28
article/SubMenu
... read more (article/SubMenu)
2017-03-05
article/Import-a-different-version-of-OpenCV-in-Python

Import a different version of OpenCV in Python

Pythonで異なるバージョンのOpenCVをimportするには

[python]
2017-03-05

When there are two versions of (e.g. OpenCV) libraries in a system, how to specify the imported version in Python?

ひとつのシステムに複数バージョンの(OpenCVなどの)ライブラリがインストールされているとき,Pythonから特定のバージョンをimportするにはどうすればいいのか.

... read more (article/Import-a-different-version-of-OpenCV-in-Python)
2015-08-17
article/DRC-finals-2015

DARPA Robotics Challenge Finals 2015

DARPA ロボティクスチャレンジ Finals 2015

[general]
2015-07-08
2015-07-10
2015-08-02
2015-08-17

Regarding DARPA Robotics Challenge (DRC) Finals held in California US June 2015, I put some notes for exploring the reason of failures of Japan's teams. For the details of DRC, refer to the following articles.

2015年6月に米国カリフォルニアで行われた災害ロボットコンテスト DARPA Robotics Challenge (DRC) Finalsに関して,日本勢の失敗要因を探るためのメモを公開する.DRCについては,以下の記事を参考.

  • How South Korea's DRC-HUBO Robot Won the DARPA Robotics Challenge
  • THE DARPA ROBOTICS CHALLENGE WAS A BUST
... read more (article/DRC-finals-2015)
2015-01-05
article/Upgrade-Android-to-Lollipop

Upgrade Android to Lollipop

AndroidをLollipopにアップグレード

[android]
2015-01-05

I upgraded Android to Lollipop (5.0.1) more than one month ago. Here I summarize the troubles and their solutions.

AndroidをLollipop (5.0.0) にアップグレードして1ヶ月ちょっと経ったので,トラブルと対策についてまとめる.

... read more (article/Upgrade-Android-to-Lollipop)
2015-01-01
article/Kernel-panic-of-Linux-when-using-Xtion

Kernel panic of Linux when using Xtion

XtionをLinuxマシンにつなぐとカーネルパニック

[linux]
2014-05-12

Xtion PRO LIVE をLinuxマシン(Linux Mint 16, kernel ver. 3.11.0, x86_64)につなぐとカーネルパニックを起こして強制終了.原因を調べてみたら,どうやらUSB3用のコントローラxHCIに問題があるようで,BIOSでUSB3.0 Modeを"Disabled"に変更したら一応は解決した.

... read more (article/Kernel-panic-of-Linux-when-using-Xtion)
article/Do-not-skip-freeing-data-when-using-tri-mesh-in-ODE

Don't skip freeing data when using tri-mesh in ODE

ODE で tri-mesh を使うときはデータの解放を忘れずに

[c++]
2013-11-21

ODE (Open Dynamics Engine) で tri-mesh (三角形メッシュ) を使うとき,dGeomTriMeshDataCreate で確保したデータを,dGeomTriMeshDataDestroy で破棄するのを忘れてはならない.破棄しなければ,メモリリークの原因となる(特に,シミュレーションのリセットを何度も繰り返す場合).

... read more (article/Do-not-skip-freeing-data-when-using-tri-mesh-in-ODE)
article/Draw-Koch-curve-with-Python

Draw Koch curves with Python

Pythonでコッホ曲線を描く

[python]
2013-10-26

土曜日なので,コッホ曲線を描いて遊んでみた.

20131026123542.png
... read more (article/Draw-Koch-curve-with-Python)
article/Open-directory-in-Cygwin-in-right-click-menu

Add "Open directory in Cygwin" to right click menu

「ディレクトリをCygwinで開く」を右クリックメニューで

[windows][trick]
2013-10-02

エクスプローラでファイル操作中に,今いるディレクトリでCygwinを開きたい場合がある.nkf で文字コードを変換したりとかスクリプトを適用したりとかで. いくつかスクリプトを書けばできる.

... read more (article/Open-directory-in-Cygwin-in-right-click-menu)
article/Using-Joystick-in-C++-on-Linux

It's easy! to use Joystick in C++ on Linux

意外に簡単! LinuxでジョイスティックをC++から使う方法

[linux][trick][c++]
2013-07-29

デバイスをオープンし,ちょっとした設定のあと,Linuxで提供されている js_event 構造体に読みこむだけ.Cでも同様.PlayStation 2/3用のコントローラをUSB接続したものでも使えた.

参考: joystick tutorial and code

... read more (article/Using-Joystick-in-C++-on-Linux)
article/Do-not-skip-initialization-use-Wshadow-option

Do not skip initializing variables, use -Wshadow gcc option

変数の初期化をサボるな,それから -Wshadow オプションを使え

[c++]
2013-07-18

という自戒.前にも似たような話を書いたのだが,懲りずにまたやった.

今回は,未初期化の変数と未発見のバグを含んだプログラムを使っていて,まったく関係のないコードを加えたタイミングで変数の初期値変動によってバグが顕在化した場合に,新しく加えたコードがバグの原因のように見えてしまって,デバッグに苦労する,という話.で,この手のトラブルを避けるには,変数を必ず初期化し,gccなら -Wshadow オプションを使おう,という内容.

... read more (article/Do-not-skip-initialization-use-Wshadow-option)
article/Changing-environment-variables-of-parent-process-in-child-process

Changing environment variables of the parent process in a child process

子プロセスで親プロセスの環境変数を変更したい

[linux][trick][bash]
2013-07-09

...が,簡単にはできないらしい.今やりたいことを整理すると: (1) ある bash スクリプト hoge.sh では何か環境変数が定義される,(2) シェル (tcsh) で hoge.sh を実行して,hoge.sh の中で定義される環境変数をシェルで使いたい,(3) hoge.sh は変更しない.

使ってるシェルが bash なら,以下で解決.

. hoge.sh

tcsh だから話がややこしくなってる.子プロセス (hoge.sh) で定義された環境変数を無理やり tcsh で使う方法を考えた.

... read more (article/Changing-environment-variables-of-parent-process-in-child-process)
article/Formatting-CSV-in-command-line

Formatting CSV-like data in command line

コマンドラインでCSVなどのデータを整形して見るには

[linux][trick]
2013-06-11

column コマンドと less を組み合わせれば,CSVなどのデータファイルはすごく見やすくなる. ソース:[http://stackoverflow.com/questions/1875305/command-line-csv-viewer:title]

column -s, -t < INPUT.csv | less -#2 -N -S
... read more (article/Formatting-CSV-in-command-line)
article/PukiWiki-1.4.7-does-not-work-on-PHP5.4

PukiWiki 1.4.7 does not work on PHP5.4

PukiWiki 1.4.7 はそのままだと PHP5.4 で動作しないらしい

[php][setting]
2013-05-07

PHP5.4 をインストールして,PukiWiki を表示させると,

ウェブサイトでエラーが発生しました。 ウェブサイトがメンテナンスのために停止しているか、正しく設定されていない可能性があります。
HTTP エラー 500(Internal Server Error): サーバーによるリクエストの実行中に、予期しない状況が発生しました。

みたいなエラーが発生する.PukiWiki 1.5 だと問題なく動作する.もしくはPHP5.3 にダウングレードしてもよい.

... read more (article/PukiWiki-1.4.7-does-not-work-on-PHP5.4)
article/Putting-PNG-and-JPEG-on-LaTeX-with-extractbb-to-extract-bounding-box

Putting PNG and JPEG on LaTeX with extractbb to extract the bounding box

LaTeX で PNG や JPEG を読み込むには extractbb でバウンディングボックスを抽出する

[latex][trick][linux]
2013-03-12

よく忘れるので防備録的な感じでメモ.

LaTeX で PNG や JPEG を単純に読み込むと,no BoundingBox とかエラーが出るので,バウンディングボックスを指定してやる必要がある.そのためのコマンドに ebb とか extractbb があるが,extractbb を使おう(解像度が高い).ファイルに出力すると,ファイルが増えて邪魔なので,extractbb に -O オプションをつけて標準出力に出力して,includegraphics の bb オプションでバウンディングボックスを指定する.

... read more (article/Putting-PNG-and-JPEG-on-LaTeX-with-extractbb-to-extract-bounding-box)
article/Counting-different-lines-of-two-text-files

Counting different lines of two text files

2つのテキストファイルで異なる部分の行数をカウントするには

[idea][linux][trick]
2012-12-12

diffを取って,>で始まる行だけ抜き出して,その数を数えればいいのだろうか?

diff -bB FILE1.txt FILE2.txt | sed '/^[^>].*/d'

これで,> で始まる行だけ抜き出せるので,wc でカウントする.

... read more (article/Counting-different-lines-of-two-text-files)
article/Copy-paste-vector-figures-drawn-with-Inkscape-to-Power-Point

Copy and paste vector figures drawn with Inkscape to Power Point

Inkscapeで描いたベクタ図形をパワポにコピー&ペーストするには

[latex][trick]
2012-12-10

イ○ストレータなんて高いものは使わねぇ!というポリシーの人が使ってるInkscape.Linuxでもベクタ図形が描けて便利だし,数式のベクタ図形も,この方法を使えば簡単にSVGとして取得できる.

Inkscapeで描いたベクタ図形を,ベクタとしてパワポなどのOfficeソフトに貼り付ける方法を見つけた.単に「形式を選択して貼り付け」から「図(拡張メタファイル)」を選ぶだけ.

透過データやグラデーションはうまく行かなかったりするが,それなりに使える.

... read more (article/Copy-paste-vector-figures-drawn-with-Inkscape-to-Power-Point)
< Past 20 pages | 1 to 20 | >

Last-modified:2015-01-04 (Sun) 22:03:53 (3780d)
Link: MenuBar(2844d) Top(2844d) article/We-must-initialize-floating-point-variables(3783d) article/LaTeX-eqs-to-PNG-and-SVG(3785d)
Site admin: Akihiko Yamaguchi.
Written by: Akihiko Yamaguchi.
System: PukiWiki 1.5.0. PHP 5.2.17. HTML conversion time: 0.536 sec.