<?xml version="1.0" encoding="UTF-8" ?>
<feed xml:lang="ja" xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:thr="http://purl.org/syndication/thread/1.0">
  <title type="text">メモメモ</title>
  <subtitle type="html">Twitterに投稿するにはちょっと長いメモを書くためのもの。</subtitle>
  <link rel="self" type="application/atom+xml" href="https://cho.guhaw.com/atom"/>
  <link rel="alternate" type="text/html" href="https://cho.guhaw.com/"/>
  <updated>2011-01-21T09:54:18+09:00</updated>
  <author><name>綱布巾</name></author>
  <generator uri="//www.ninja.co.jp/blog/" version="0.9">忍者ブログ</generator>
  <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" />
  <entry>
    <id>cho.guhaw.com://entry/8</id>
    <link rel="alternate" type="text/html" href="https://cho.guhaw.com/program/lightbox%E3%81%AE%E4%BD%BF%E3%81%84%E6%96%B9" />
    <published>2011-08-17T21:25:04+09:00</published> 
    <updated>2011-08-17T21:25:04+09:00</updated> 
    <category term="Program" label="Program" />
    <title>Lightboxの使い方</title>
    <content mode="escaped" type="text/html" xml:lang="utf-8"> 
      <![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>
]]> 
    </content>
    <author>
            <name>綱布巾</name>
        </author>
  </entry>
  <entry>
    <id>cho.guhaw.com://entry/7</id>
    <link rel="alternate" type="text/html" href="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" />
    <published>2011-06-20T15:49:51+09:00</published> 
    <updated>2011-06-20T15:49:51+09:00</updated> 
    <category term="TeX" label="TeX" />
    <title>fboxの余白を0にする</title>
    <content mode="escaped" type="text/html" xml:lang="utf-8"> 
      <![CDATA[\newcommand{\tfbox}[1]{\fboxsep=0pt\fbox{#1}}<br>
で余白を0にできる。<br>
\fboxsep=0ptの値を変更すれば変えられる。<br>
<br>
本文中で使うときは<br>
　\tfbox{*****}<br>
とする]]> 
    </content>
    <author>
            <name>綱布巾</name>
        </author>
  </entry>
  <entry>
    <id>cho.guhaw.com://entry/6</id>
    <link rel="alternate" type="text/html" href="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" />
    <published>2011-05-18T10:33:26+09:00</published> 
    <updated>2011-05-18T10:33:26+09:00</updated> 
    <category term="Program" label="Program" />
    <title>構造体で要素数が不定の配列を保持する。</title>
    <content mode="escaped" type="text/html" xml:lang="utf-8"> 
      <![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 />]]> 
    </content>
    <author>
            <name>綱布巾</name>
        </author>
  </entry>
  <entry>
    <id>cho.guhaw.com://entry/5</id>
    <link rel="alternate" type="text/html" href="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" />
    <published>2011-02-05T15:19:08+09:00</published> 
    <updated>2011-02-05T15:19:08+09:00</updated> 
    <category term="Linux" label="Linux" />
    <title>LinuxでPDFファイル分割や統合</title>
    <content mode="escaped" type="text/html" xml:lang="utf-8"> 
      <![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 />]]> 
    </content>
    <author>
            <name>綱布巾</name>
        </author>
  </entry>
  <entry>
    <id>cho.guhaw.com://entry/4</id>
    <link rel="alternate" type="text/html" href="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" />
    <published>2011-02-05T14:58:08+09:00</published> 
    <updated>2011-02-05T14:58:08+09:00</updated> 
    <category term="TeX" label="TeX" />
    <title>TeXでページ番号をいじる</title>
    <content mode="escaped" type="text/html" xml:lang="utf-8"> 
      <![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 />]]> 
    </content>
    <author>
            <name>綱布巾</name>
        </author>
  </entry>
  <entry>
    <id>cho.guhaw.com://entry/3</id>
    <link rel="alternate" type="text/html" href="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" />
    <published>2011-01-22T10:51:30+09:00</published> 
    <updated>2011-01-22T10:51:30+09:00</updated> 
    <category term="Linux" label="Linux" />
    <title>ターミナルのサイズを変更する</title>
    <content mode="escaped" type="text/html" xml:lang="utf-8"> 
      <![CDATA[デフォルトのサイズを変更する場合、
<ol>
    <li>ターミナルに「gconf-editor」コマンドを入力・実行して設定エディタを開く</li>
    <li>/desktop/gnome/applications/terminalの「exec」の値に『--geometry=数値x数値』を追記する。</li>
</ol>
たとえば、--geometry=100x20とかにすると、横長になる。<br />
<br />]]> 
    </content>
    <author>
            <name>綱布巾</name>
        </author>
  </entry>
  <entry>
    <id>cho.guhaw.com://entry/2</id>
    <link rel="alternate" type="text/html" href="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" />
    <published>2011-01-21T13:33:26+09:00</published> 
    <updated>2011-01-21T13:33:26+09:00</updated> 
    <category term="Emacs" label="Emacs" />
    <title>Emacsでスクリプト保存</title>
    <content mode="escaped" type="text/html" xml:lang="utf-8"> 
      <![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>]]> 
    </content>
    <author>
            <name>綱布巾</name>
        </author>
  </entry>
  <entry>
    <id>cho.guhaw.com://entry/1</id>
    <link rel="alternate" type="text/html" href="https://cho.guhaw.com/emacs/emacs%E8%A8%AD%E5%AE%9A%E3%81%BE%E3%81%A8%E3%82%81" />
    <published>2011-01-21T10:04:54+09:00</published> 
    <updated>2011-01-21T10:04:54+09:00</updated> 
    <category term="Emacs" label="Emacs" />
    <title>Emacs設定まとめ</title>
    <content mode="escaped" type="text/html" xml:lang="utf-8"> 
      <![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 />]]> 
    </content>
    <author>
            <name>綱布巾</name>
        </author>
  </entry>
</feed>