[[メモ]][[メモ2]]
#contents
*bashスクリプト内でURLエンコードする [#ae2149ca]
-bashスクリプト内であれば、Perlの URI::Escape モジュールを使うのが簡単
#geshi(bash){{
 value="$(perl -MURI::Escape -e 'print uri_escape($ARGV[0]);' "$2")"
}}
-あとは、URLエンコードしてダウンロードしたいのであれば、curlの --data-urlencode オプションを使うという手もある
-[[scripting - URLEncode from a bash script - Stack Overflow>http://stackoverflow.com/questions/296536/urlencode-from-a-bash-script]]&note{urlencode-from-a-bash-script:[[scripting - URLEncode from a bash script - Stack Overflow>http://stackoverflow.com/questions/296536/urlencode-from-a-bash-script]], 2008-11-17投稿, 2008-11-18回答, 2014-12-01閲覧};
-やっぱりcurlって便利なんだなぁ。

*Jetson TK1のハンズオンセッション [#fb1a9dce]
-やっぱりハンズオンセッションは良い。
-[[NVIDIA Tegra K1搭載開発キット「Jetson TK1」ハンズオンセッションに参加してみた - Car Watch>http://car.watch.impress.co.jp/docs/news/20140821_662643.html]]&note{jetson-k1-hand-on:[[NVIDIA Tegra K1搭載開発キット「Jetson TK1」ハンズオンセッションに参加してみた - Car Watch>http://car.watch.impress.co.jp/docs/news/20140821_662643.html]], 2014-07-16開催, 2014-08-21更新, 2014-12-01閲覧};
-[[Tegra K1搭載の開発キット「Jetson TK1」を動かしてみた - 4Gamer.net>http://www.4gamer.net/games/244/G024410/20140719011/]]&note{jetson-hands-on-4gamer:[[Tegra K1搭載の開発キット「Jetson TK1」を動かしてみた - 4Gamer.net>http://www.4gamer.net/games/244/G024410/20140719011/]], 2014-07-22公開, 2015-01-07閲覧};

*ls コマンドで秒まで表示する方法 [#uf9fb2ec]
-full-time オプションで表示できる
 ls --full-time
-なお、time-styleオプションも使える
 ls -l --time-style=%c
-参考:[[コマンド ファイルの秒までのタイムスタンプを表示 - あるプログラマの日記>http://d.hatena.ne.jp/kaoskfos/20080414/p1]]&note{how-to-show-full-time-of-ls:[[コマンド ファイルの秒までのタイムスタンプを表示 - あるプログラマの日記>http://d.hatena.ne.jp/kaoskfos/20080414/p1]], 2008-04-14公開, 2014-12-01閲覧};
-参考:[[lsコマンドで表示されるタイムスタンプの書式を統一し、秒も表示する方法 【OKWave】>http://okwave.jp/qa/q4503337.html]]&note{how-to-show-second-in-arbitary-format:[[lsコマンドで表示されるタイムスタンプの書式を統一し、秒も表示する方法 【OKWave】>http://okwave.jp/qa/q4503337.html]], 2008-11-24投稿, 2008-11-25更新, 2014-12-01閲覧};

*Ubuntu で gvim を起動すると、 “Unable to create Ubuntu Menu Proxy”と言われる [#bccb4d6c]
-[[こちらのページ>http://askubuntu.com/questions/132977/how-to-get-global-application-menu-for-gvim]]&note{how-to-get-global-application-menu-for-gvim:[[appmenu - How to get global application menu for gvim? - Ask Ubuntu>http://askubuntu.com/questions/132977/how-to-get-global-application-menu-for-gvim]]};では、gvim にオプションを渡せと言ってるが、実装方法がfunctionをbashで定義しているので、これだと、パイプラインで標準入力からテキストを渡すことができない
-[[こちらのページ>http://stackoverflow.com/questions/12540209/unable-to-create-ubuntu-menu-proxy-using-gvim-in-ubuntu]]&note{unable-to-create-ubuntu-menu-proxy-using-gvim-in-ubuntu:[[vim - "Unable to create Ubuntu Menu Proxy" using GVim in Ubuntu - Stack Overflow>http://stackoverflow.com/questions/12540209/unable-to-create-ubuntu-menu-proxy-using-gvim-in-ubuntu]], 2014-12-01閲覧};では、 UBUNTU_MENUPROXY= gvim を gvim のalias として登録しろと説明している

*ペットの火葬 [#e6fd87f2]
-[[自宅で行うペット葬儀・家族葬 ペットの火葬は完全個別火葬のフォーエバーペットにお任せください 東京・神奈川・埼玉・千葉 即日対応>http://forever-pet.com/]]&note{forever-pet-official:[[自宅で行うペット葬儀・家族葬 ペットの火葬は完全個別火葬のフォーエバーペットにお任せください 東京・神奈川・埼玉・千葉 即日対応>http://forever-pet.com/]], 2014-08-30閲覧};
-非常に丁寧に対応してもらった。
-23区内は出張料無料&note{forever-pet-official};

*CMakeを使ってCUDAのプログラムをコンパイルする方法 [#d21ab2f7]
-[[How to build CUDA programs using CMake | chooru.code>http://choorucode.com/2013/09/13/how-to-build-cuda-programs-using-cmake/]]&note{how-to-build-cuda-programs-using-cmake:[[How to build CUDA programs using CMake | chooru.code>http://choorucode.com/2013/09/13/how-to-build-cuda-programs-using-cmake/]], 2013-09-13公開, 2014-12-11閲覧};
-[[GPU Parallel Programming in VS2012 with NVIDIA CUDA - NortuRE Blog>http://blog.norture.com/2012/10/gpu-parallel-programming-in-vs2012-with-nvidia-cuda/]]&note{gpu-parallel-programming-in-vs2012-with-nvidia-cuda:Angga Reza Fardan, [[GPU Parallel Programming in VS2012 with NVIDIA CUDA - NortuRE Blog>http://blog.norture.com/2012/10/gpu-parallel-programming-in-vs2012-with-nvidia-cuda/]], 2012-10-14公開, 2014-12-11閲覧};

*Windows標準のDVDメーカーでDVDビデオを作成する [#p3406494]
-[[Windows DVD メーカーを使用して DVD ビデオ ディスクに書き込む>http://windows.microsoft.com/ja-jp/windows7/burn-a-dvd-video-disc-with-windows-dvd-maker]]&note{how-to-burn-an-video-to-dvd-using-windows-dvd-maker:[[Windows DVD メーカーを使用して DVD ビデオ ディスクに書き込む>http://windows.microsoft.com/ja-jp/windows7/burn-a-dvd-video-disc-with-windows-dvd-maker]], 2014-12-11閲覧};
-[[簡単図解で説明ムービーメーカーの動画をDVDに焼く又はブルーレイに焼くやり方超初心者入門 : 今日からはじめるWindows8.1>http://pc81webinfo.blog.jp/archives/1006986870.html]]&note{how-to-make-a-movie-on-windows-8:[[簡単図解で説明ムービーメーカーの動画をDVDに焼く又はブルーレイに焼くやり方超初心者入門 : 今日からはじめるWindows8.1>http://pc81webinfo.blog.jp/archives/1006986870.html]], 2014-12-11閲覧};

*退職金が出るのか/出ないのか [#v9674415]
-基本的にルールは無い&note{rules-about-work-and-law:[[退職金の支給条件とは? | 労働基準法違反を許すな!労働者>http://www.roudousha.net/change/Work3change005.html]], 2014-12-11閲覧};
-しかし、勝手に変更して良いものでもない。
-雇用者と被雇用者の間に取り決めがある場合は守らなくてはならない

*CUDAのコンパイル時にでるwarningをVisualStudioで抑制する [#k2589273]
- -Xcomiplerというオプションを使って
 -Xcompiler "/wd 4819"
-をCUDAの追加オプションに入れる
-[[CUDAコンパイラ(nvcc)でVisualStudioコンパイラ(cl)の特定の警告を無効にする方法>http://qiita.com/aokomoriuta/items/b2c466b966714a7d5b9a]]&note{how-to-suppres-warning-of-cuda-on-vs:aokomoriuta, [[CUDAコンパイラ(nvcc)でVisualStudioコンパイラ(cl)の特定の警告を無効にする方法>http://qiita.com/aokomoriuta/items/b2c466b966714a7d5b9a]], 2012-11-22公開, 2014-12-11閲覧};

*OpenCVで描画する代わりにOpenGLで描画したい [#d890c6bb]
-現状、OpenGLを使った描画が、2.4.8ぐらいから可能になってるっぽい&note{does-opengl-display-image-faster-than-opencv:[[c++ - Does OpenGL display image faster than OpenCV? - Stack Overflow>http://stackoverflow.com/questions/21129683/does-opengl-display-image-faster-than-opencv]], 2014-01-15投稿, 2014-01-15回答, 2014-12-11閲覧};
-ただし、WITH_OPENGL=ONでビルドし、Win32環境下のみ(回答時点)

*ファイルのn行目以降を表示する [#j2ec8549]
-昔も悩んだ気がするが、まさかの tail に -n + とか付けるとできるとは知らなかった。
#geshi(bash){{
$ cat hoge.txt
header1
header2
header3
header4
-----
text1
text2
text3
$ tail -n 6 hoge.txt
header3
header4
-----
text1
text2
text3
$ tail -n +6 hoge.txt
text1
text2
text3
}}
-[[こっちのサイト>http://qiita.com/sugyan/items/523ed9417678fbdbae53]]&note{how-to-show-after-nth-line-of-the-file-qiita:sugyan, [[tail - ファイルのn行目以降を表示する - Qiita>http://qiita.com/sugyan/items/523ed9417678fbdbae53]], 2012-05-09発表, 2012-05-09更新, 2014-03-10閲覧};の解説の方がわかり易い

*対義語・反対語 [#o786a831]
-[[英語の正しい対義語のリストが書かれている>http://blog.webspace.jp/42]]&note{correct-opposite-word-2:[[対義語・反対語で時間を取らないために ver.1.5 | WebSpaceBlog>http://blog.webspace.jp/42]], 2013-04-02公開, 2013-04-10更新, 2014-08-04閲覧};
-[[英語の正しい対義語のリストが書かれている2>http://webspace.jugem.jp/?eid=947]]&note{correct-opposite-word:[[対義語・反対語で時間を取らないために | WebSpaceの中の人>http://webspace.jugem.jp/?eid=947]],  2009-07-25発表, 2014-08-04閲覧};

*SSEやAVX [#b8829703]
-[[2013-12-08 - A440Hz ブログ>http://d.hatena.ne.jp/wosugi/20131208#1386514756]]&note{is-sse-really-fast:[[2013-12-08 - A440Hz ブログ>http://d.hatena.ne.jp/wosugi/20131208#1386514756]], 2013-12-08発表, 2013-12-08更新, 2014-08-04閲覧};
-[[さかな前線    » SSEとAVXで高次元ベクトルの内積計算を高速化してみた>http://daily.belltail.jp/?p=1520]]&note{how-to-speed-up-inner-product:おさかなさん, [[さかな前線    » SSEとAVXで高次元ベクトルの内積計算を高速化してみた>http://daily.belltail.jp/?p=1520]], 2013.01.28 投稿, 2014-08-04閲覧};

*「嶺南通」(羊城通) [#v68f7d73]
-初回購入価格50元(うちデポジット30元)
&note{traffic-card-in-guanzhou:[[広東省交通カード「嶺南通」(羊城通):エクスプロア広州>http://gz.explore.ne.jp/traffic/card.php]], 2014-08-04閲覧};
&note{guanzhuou-yang-cheng-card:[[广州羊城通有限公司>http://www.gzyct.com/]], 2014-08-04閲覧};

*SSDの容量を空ける方法 [#gafe5cae]
-塵も積もれば山となる
-大量の細かいファイルを削除する説明
**Windows Update でログがたまる(Vista, 7) [#f34f3d96]
-[[Windows Updateで溜まっていくログを削除するバッチ作ったよ。(for Vista,7) - 大人になったら肺呼吸>http://d.hatena.ne.jp/replication/20120220/1329665069]]&note{remove-log-of-windows-update:[[Windows Updateで溜まっていくログを削除するバッチ作ったよ。(for Vista,7) - 大人になったら肺呼吸>http://d.hatena.ne.jp/replication/20120220/1329665069]], 2012-02-20発表, 2012-06-02更新, 2015-01-13閲覧};


*git-svn でSSL certificate の問題が出た場合 [#bd8874fb]
-1回 svn info [リポジトリ] でリポジトリにアクセスし、(p)ermanently でアクセス許可を保存する
-&note{how-to-solve-ssl-certificate-problem-with-git-svn:[[How to solve SSL certificate problem with git-svn - Atlassian Answers>https://answers.atlassian.com/questions/135145/how-to-solve-ssl-certificate-problem-with-git-svn]], 2013-07-02投稿, 2013-07-07更新, 2015-01-13閲覧};

*Makefile で依存関係を自動的に記述する方法 [#h98e15c0]
-gccに -MD オプションを渡すと、 dファイルを生成する
-このファイルに依存関係が記述されている
-&note{how-to-build-dependency-automatically:[[KMC Staff Blog:Makefileの依存関係の記述を自動化する簡単な方法>http://blog.kmckk.com/archives/4395828.html]], 2013-02-08公開, 2015-01-13閲覧};

*インストールしたWindowsのライセンスを別マシンに移行する [#rbde3b3c]
-電話認証で可能っぽい
-[[Windows 7 を、別のPCに移行する。以下のことが可能かどうか、... - Yahoo!知恵袋>http://detail.chiebukuro.yahoo.co.jp/qa/question_detail/q10101947225]]&note{how-to-move-windows-liscence-to-another-pc:[[Windows 7 を、別のPCに移行する。以下のことが可能かどうか、... - Yahoo!知恵袋>http://detail.chiebukuro.yahoo.co.jp/qa/question_detail/q10101947225]], 2013-02-12投稿, 2013-02-13更新, 2015-01-13閲覧};

*vim のおすすめ [#ef10f144]
-vim アドベントカレンダーより
-[[「Vimを使い始めようと思うんですけど、おすすめを教えてください」 - ぼっち勉強会>http://kannokanno.hatenablog.com/entry/20121217/1355694191]]&note{some-tips-of-vim-for-beginner:[[「Vimを使い始めようと思うんですけど、おすすめを教えてください」 - ぼっち勉強会>http://kannokanno.hatenablog.com/entry/20121217/1355694191]], 2012-12-17公開, 2015-01-13閲覧};

*skip/try specific test in gtest (google test) [#jd576113]
-use gtest_filter option&note{stackoverflow-googletest-how-to-skip-a-test:[[GoogleTest: How to skip a test? - Stack Overflow>http://stackoverflow.com/questions/7208070/googletest-how-to-skip-a-test]], 2011-08-26投稿, 2011-08-26回答, 2016-01-11更新, 2017-01-05閲覧};&note{stackoverflow-how-to-specify-multiple-exclusion-filters-in-gtest-filter:[[googletest - How to specify multiple exclusion filters in --gtest_filter? - Stack Overflow>http://stackoverflow.com/questions/14018434/how-to-specify-multiple-exclusion-filters-in-gtest-filter]], 2012-12-24投稿, 2012-12-24回答, 2014-08-06更新, 2017-01-05閲覧};&note{how-to-specify-options-of-gtest:[[gtest 実行時のオプション - Dr.Yellow's blog>http://dr-yellow.hatenablog.com/entry/2015/11/27/004234]], 2015-11-27公開, 2017-01-05閲覧};&note{advancedguide-of-gtest:[[上級ガイド — Google Test ドキュメント日本語訳>http://opencv.jp/googletestdocs/advancedguide.html]], 2017-01-05閲覧};
-run ONLY "''foo''" test case
 $ ./test --gtest_filter=foo
-run ONLY test cases which start with "''foo''"
 $ ./test --gtest_filter=foo.*
-run ONLY test cases which contain "''foo''"
 $./test --gtest_filter=*foo*
-run ONLY test cases which contain "''foo''" or "''bar''"
 $./test --gtest_filter=*foo*:*bar*
-run ONLY test cases which don't start with "''buzz''"
 $./test --gtest_filter=-*buzz*
-run "foo" test case but not "''foo.bug''"
 $./test --gtest_filter=foo*-foo.bug*

*how to avoid vim to make *.un~ file [#q0a0ff1c]
-un~ file is 'undo' file
-following command will preserve that action
 :set noundofile
-write it in ~/.vimrc or ~/_vimrc to make it permanently
-reference:[[Vimが変なファイルを作るようになった — KaoriYa>https://www.kaoriya.net/blog/2014/03/30/]]&note{kaoriya-2014-03-30:[[Vimが変なファイルを作るようになった — KaoriYa>https://www.kaoriya.net/blog/2014/03/30/]], 2014-04-30公開, 2017-01-26閲覧};
-or, another way is to make undo file at specific dir, not every file you edit
 :set undodir=D:/home/koron/var/vim/undo
-for normal backup file, which ends with just "~", use backupdir for same setting
 :set backupdir=D:/home/koron/var/vim/undo

トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS