<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:blogChannel="http://backend.userland.com/blogChannelModule" >
  <channel>
  <title>メモメモ</title>
  <link>https://cho.guhaw.com/</link>
  <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="https://cho.guhaw.com/RSS/" />
  <description>Twitterに投稿するにはちょっと長いメモを書くためのもの。</description>
  <lastBuildDate>Wed, 17 Aug 2011 12:24:50 GMT</lastBuildDate>
  <language>ja</language>
  <copyright>© Ninja Tools Inc.</copyright>
  <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" />

    <item>
    <title>Lightboxの使い方</title>
    <description>
    <![CDATA[Lightboxのjsファイルなどを<a href="http://www.huddletogether.com/projects/lightbox2/">ここ</a>からDLする。<br />
使用するのは「css」「js」「images（image-1.jpg、thumb-1.jpgを除く）」の三つのフォルダ<br />
タグ内で次のようにして宣言する<br />
<blockquote>
	<p>
		&lt;head&gt;<br />
		&lt;link href=&quot;../css/lightbox.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; /&gt;<br />
		&lt;script src=&quot;../js/prototype.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;<br />
		&lt;script src=&quot;../js/scriptaculous.js?load=effects,builder&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;<br />
		&lt;script src=&quot;../js/lightbox.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;<br />
		&lt;/head&gt;</p>
</blockquote>
<p>
	jsファイルとcssファイルの相対パスは適宜変更のこと。<br />
	表示させたい画像について次の文を書く。</p>
<blockquote>
	<p>
		&lt;a href=&quot;./img/01.jpg&quot; rel=&quot;lightbox&quot;&gt; リンク文字 &lt;/a&gt;<br />
		&lt;a href=&quot;./img/01.jpg&quot; rel=&quot;lightbox&quot;&gt;&lt;img src=&quot;./img/s/01.jpg&quot; alt=&quot;01&quot;&gt;&lt;/a&gt;<br />
		（画像のサムネを表示させるとき）<br />
		&lt;a href=&quot;./img/01.jpg&quot; rel=&quot;lightbox[anithing]&quot;&gt;&lt;img src=&quot;./img/s/01.jpg&quot; alt=&quot;01&quot;&gt;&lt;/a&gt;<br />
		（グループ表示させるとき）</p>
</blockquote>
]]>
    </description>
    <category>Program</category>
    <link>https://cho.guhaw.com/program/lightbox%E3%81%AE%E4%BD%BF%E3%81%84%E6%96%B9</link>
    <pubDate>Wed, 17 Aug 2011 12:25:04 GMT</pubDate>
    <guid isPermaLink="false">cho.guhaw.com://entry/8</guid>
  </item>
    <item>
    <title>fboxの余白を0にする</title>
    <description>
    <![CDATA[\newcommand{\tfbox}[1]{\fboxsep=0pt\fbox{#1}}<br>
で余白を0にできる。<br>
\fboxsep=0ptの値を変更すれば変えられる。<br>
<br>
本文中で使うときは<br>
　\tfbox{*****}<br>
とする]]>
    </description>
    <category>TeX</category>
    <link>https://cho.guhaw.com/tex/fbox%E3%81%AE%E4%BD%99%E7%99%BD%E3%82%920%E3%81%AB%E3%81%99%E3%82%8B</link>
    <pubDate>Mon, 20 Jun 2011 06:49:51 GMT</pubDate>
    <guid isPermaLink="false">cho.guhaw.com://entry/7</guid>
  </item>
    <item>
    <title>構造体で要素数が不定の配列を保持する。</title>
    <description>
    <![CDATA[複数の画像中の特徴点を保持するときに使いそう。<br />
各画像中の点の数は不定で、プログラム中で取得する。<br />
<br />
構造体の型宣言<br />
struct point{<br />
&nbsp;&nbsp;int *x;<br />
&nbsp;&nbsp;int *y;<br />
};<br />
<br />
構造体の宣言<br />
struct point Point[image];<br />
<br />
pix個の特徴点があるとき<br />
Point[i].x = Initialize_1dimInt(Point[i].x, pix);<br />
Point[i].y = Initialize_1dimInt(Point[i].y, pix);<br />
<br />
構造体で宣言しているポインタを配列化する<br />
int* Initialize_1dimInt(int *array,　int max){<br />
&nbsp;&nbsp; array = (int *)calloc(max, sizeof(int));<br />
&nbsp;&nbsp; return array;<br />
}<br />
<br />
データにアクセスするとき<br />
x = Point[i].x[p];<br />
y = Point[i].y[p];<br />]]>
    </description>
    <category>Program</category>
    <link>https://cho.guhaw.com/program/%E6%A7%8B%E9%80%A0%E4%BD%93%E3%81%A7%E8%A6%81%E7%B4%A0%E6%95%B0%E3%81%8C%E4%B8%8D%E5%AE%9A%E3%81%AE%E9%85%8D%E5%88%97%E3%82%92%E4%BF%9D%E6%8C%81%E3%81%99%E3%82%8B%E3%80%82</link>
    <pubDate>Wed, 18 May 2011 01:33:26 GMT</pubDate>
    <guid isPermaLink="false">cho.guhaw.com://entry/6</guid>
  </item>
    <item>
    <title>LinuxでPDFファイル分割や統合</title>
    <description>
    <![CDATA[LinuxでPDFファイルの分割や統合をするには「pdftk」を用いる。<br />
ここで書く環境はUbuntu10.04を仮定。<br />
<br />
インストールはSynapticで「pdftk」と探すと出る<br />
・分割<br />
sample.pdfというファイルから2ページ目を取り出して2.pdfを作成<br />
&nbsp;&nbsp;&nbsp; $ pdftk sample.pdf cat 2 output 2.pdf<br />
<br />
ページ範囲を指定して抜き出し<br />
&nbsp;&nbsp;&nbsp; $ pdftk sample.pdf cat 1-5 7-end output out.pdf<br />
<br />
・統合<br />
1.pdfと2.pdfを統合してout.pdfを作成<br />
&nbsp;&nbsp;&nbsp; $ pdftk 1.pdf 2.pdf cat output out.pdf<br />
<br />
ワイルドカードを使っても統合可（順番はアルファベット順？）<br />
&nbsp;&nbsp;&nbsp; $pdftk *.pdf cat output out.pdf<br />]]>
    </description>
    <category>Linux</category>
    <link>https://cho.guhaw.com/linux/linux%E3%81%A7pdf%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E5%88%86%E5%89%B2%E3%82%84%E7%B5%B1%E5%90%88</link>
    <pubDate>Sat, 05 Feb 2011 06:19:08 GMT</pubDate>
    <guid isPermaLink="false">cho.guhaw.com://entry/5</guid>
  </item>
    <item>
    <title>TeXでページ番号をいじる</title>
    <description>
    <![CDATA[学位論文などを書くとき、冒頭の概要や目次は本文とせず、「はじめに」などから本文が始まるということで、<br />
このページからページ番号が振られるようにしたい。<br />
<br />
文書の作成方法にもよるが、各章ごとにTeXファイルを作り、<br />
&nbsp; \input{introduction.tex}<br />
&nbsp; \setcounter{page}{1}<br />
などとするとき、PDFを生成すると<br />
introduction.texのページが2ページにわたる場合、<br />
この章の１ページ目のページ番号は、「そのファイルのページ番号」となってしまう。<br />
（ex. 1ページ目の番号「9」、2ページ目の番号「1」といった具合）<br />
<br />
このとき、1ページ目からページ番号が「1」となるようにするには、<br />
introduction.texのファイル内で<br />
&nbsp; \chapter{はじめに}<br />
&nbsp; \setcounter{page}{1}<br />
と書けばいい。<br />]]>
    </description>
    <category>TeX</category>
    <link>https://cho.guhaw.com/tex/tex%E3%81%A7%E3%83%9A%E3%83%BC%E3%82%B8%E7%95%AA%E5%8F%B7%E3%82%92%E3%81%84%E3%81%98%E3%82%8B</link>
    <pubDate>Sat, 05 Feb 2011 05:58:08 GMT</pubDate>
    <guid isPermaLink="false">cho.guhaw.com://entry/4</guid>
  </item>
    <item>
    <title>ターミナルのサイズを変更する</title>
    <description>
    <![CDATA[デフォルトのサイズを変更する場合、
<ol>
    <li>ターミナルに「gconf-editor」コマンドを入力・実行して設定エディタを開く</li>
    <li>/desktop/gnome/applications/terminalの「exec」の値に『--geometry=数値x数値』を追記する。</li>
</ol>
たとえば、--geometry=100x20とかにすると、横長になる。<br />
<br />]]>
    </description>
    <category>Linux</category>
    <link>https://cho.guhaw.com/linux/%E3%82%BF%E3%83%BC%E3%83%9F%E3%83%8A%E3%83%AB%E3%81%AE%E3%82%B5%E3%82%A4%E3%82%BA%E3%82%92%E5%A4%89%E6%9B%B4%E3%81%99%E3%82%8B</link>
    <pubDate>Sat, 22 Jan 2011 01:51:30 GMT</pubDate>
    <guid isPermaLink="false">cho.guhaw.com://entry/3</guid>
  </item>
    <item>
    <title>Emacsでスクリプト保存</title>
    <description>
    <![CDATA[<pre>
ファイルトップに#!があるスクリプトファイルを保存するとき、
自動的に+x（実行権）を付加する
.emacsに以下を追加

(defun make-file-executable ()
  &quot;Make the file of this buffer executable, when it is a script source.&quot;
  (save-restriction
    (widen)
    (if (string= &quot;#!&quot; (buffer-substring-no-properties 1 (min 3 (point-max))))
        (let ((name (buffer-file-name)))
          (or (equal ?. (string-to-char (file-name-nondirectory name)))
              (let ((mode (file-modes name)))
                (set-file-modes name (logior mode (logand (/ mode 4) 73)))
                (message (concat &quot;Wrote &quot; name &quot; (+x)&quot;))))))))
(add-hook 'after-save-hook 'make-file-executable)
</pre>]]>
    </description>
    <category>Emacs</category>
    <link>https://cho.guhaw.com/emacs/emacs%E3%81%A7%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%97%E3%83%88%E4%BF%9D%E5%AD%98</link>
    <pubDate>Fri, 21 Jan 2011 04:33:26 GMT</pubDate>
    <guid isPermaLink="false">cho.guhaw.com://entry/2</guid>
  </item>
    <item>
    <title>Emacs設定まとめ</title>
    <description>
    <![CDATA[ウィンドウサイズや色などを変更<br />
.emacsに以下を追記<br />
<br />
(setq initial-frame-alist<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (append (list<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '(foreground-color . &quot;white&quot;) ;; 文字色<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '(background-color . &quot;black&quot;) ;; 背景色<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '(border-color . &quot;black&quot;)<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '(mouse-color . &quot;white&quot;)<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '(cursor-color . &quot;white&quot;)<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '(width . 40)&nbsp; ;; ウィンドウ横幅<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '(height . 50) ;; ウィンドウ縦幅<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '(top . 0)&nbsp; ;; 最上部<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '(left . 0) ;; 左端<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; )<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; initial-frame-alist))<br />
(setq default-frame-alist initial-frame-alist)<br />
<br />
;; スクロールバーを右側に表示する<br />
(set-scroll-bar-mode 'right)<br />
<br />
;; 行の先頭から何文字目かを表示<br />
(column-number-mode 1)<br />
<br />
;; メニューバーを消す<br />
(menu-bar-mode nil)<br />
<br />
;; ツールバーを消す<br />
(tool-bar-mode nil)<br />
<br />
;; キーバインド<br />
;; HOME(バッファの先頭に飛ぶ)<br />
(global-set-key [home] 'beginning-of-buffer)<br />
;; END(バッファの最後に飛ぶ)<br />
(global-set-key [end] 'end-of-buffer)<br />]]>
    </description>
    <category>Emacs</category>
    <link>https://cho.guhaw.com/emacs/emacs%E8%A8%AD%E5%AE%9A%E3%81%BE%E3%81%A8%E3%82%81</link>
    <pubDate>Fri, 21 Jan 2011 01:04:54 GMT</pubDate>
    <guid isPermaLink="false">cho.guhaw.com://entry/1</guid>
  </item>

    </channel>
</rss>