<?xml version="1.0" encoding="UTF-8" ?><rdf:RDF 
  xmlns="http://purl.org/rss/1.0/"
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:atom="http://www.w3.org/2005/Atom"
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xml:lang="ja">
  <channel rdf:about="http://w.atwiki.jp/thaladabar/">
    <title>thaladabar 備忘録@ ウィキ</title>
    <link>http://w.atwiki.jp/thaladabar/</link>
    <atom:link href="https://w.atwiki.jp/thaladabar/rss10.xml" rel="self" type="application/rss+xml" />
    <atom:link rel="hub" href="https://pubsubhubbub.appspot.com" />
    <description>thaladabar 備忘録@ ウィキ</description>

    <dc:language>ja</dc:language>
    <dc:date>2013-09-23T10:38:29+09:00</dc:date>
    <utime>1379900309</utime>

    <items>
      <rdf:Seq>
                <rdf:li rdf:resource="https://w.atwiki.jp/thaladabar/pages/18.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/thaladabar/pages/27.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/thaladabar/pages/2.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/thaladabar/pages/15.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/thaladabar/pages/26.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/thaladabar/pages/25.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/thaladabar/pages/21.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/thaladabar/pages/24.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/thaladabar/pages/23.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/thaladabar/pages/17.html" />
              </rdf:Seq>
    </items>
	
		
    
  </channel>
    <item rdf:about="https://w.atwiki.jp/thaladabar/pages/18.html">
    <title>C++</title>
    <link>https://w.atwiki.jp/thaladabar/pages/18.html</link>
    <description>
      #contents()

**テンプレートで関数ポインタを利用
メソッドの定義
#html2(){{{{{{
&lt;pre&gt;
template
&lt;
	typename ClassName, 
	void (ClassName::*mem_fun)(args)
&gt;
void method( const TiXmlElement* element, std::vector&lt;String&gt;&amp; tags, ClassName&amp; instance )
{
	(instance.*mem_fun)( child );
}
&lt;/pre&gt;
}}}}}}

利用
#html2(){{{{{{
&lt;pre&gt;
method&lt; classname, &amp;classname::methodname &gt;( args );
&lt;/pre&gt;
}}}}}}


**外部ライブラリ
-[[tinyxml2]]    </description>
    <dc:date>2013-09-23T10:38:29+09:00</dc:date>
    <utime>1379900309</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/thaladabar/pages/27.html">
    <title>vim</title>
    <link>https://w.atwiki.jp/thaladabar/pages/27.html</link>
    <description>
      #contents()

**ソースのコメントアウト
[tcomment.vim]を利用

&amp;bold(){ 【&lt;c-_&gt;a】}
コメントタイプで指定したコメントを選択箇所に挿入する

&amp;bold(){【&lt;c-_&gt; &lt;c-_&gt; 】}
&amp;bold(){【gc】}
コメントアウトしたい行を選択してコメントアウトすることができる（複数行可能）
※選択したのが一行の一部のみ選択指定た場合その選択部分のみをコメントアウトする。

&amp;bold(){【&lt;c-_&gt; b 】}
選択行を囲むようにしてコメントアウトをする。

【&lt;c-_&gt; i】
選択範囲のみを囲むようにしてコメントアウトをする。

【&lt;c-_&gt; r】
現在の位置から右側をコメントアウト

【gc}】
現在の位置から改行以外が入力    </description>
    <dc:date>2013-07-07T02:06:45+09:00</dc:date>
    <utime>1373130405</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/thaladabar/pages/2.html">
    <title>メニュー</title>
    <link>https://w.atwiki.jp/thaladabar/pages/2.html</link>
    <description>
      **メニュー
-[[トップページ]]
-[[プラグイン紹介&gt;プラグイン]]
-[[まとめサイト作成支援ツール]]
-[[メニュー]]
-[[メニュー2]]
-[[プログラム]]
--[[C++]]
--[[C#]]
--[[FSharp]]
--[[java]]
--[[ruby]]
--[[python]]
--[[android]]
--[[iPhone]]
--[[OpenGL]]
--[[vim]]
--[[雑多]]

**リンク
-[[@wiki&gt;&gt;http://atwiki.jp]]
-[[@wikiご利用ガイド&gt;&gt;http://atwiki.jp/guide/]]

**他のサービス
-[[無料ホームページ作成&gt;&gt;http://atpages.jp]]
-[[無料ブログ作成&gt;&gt;http://atword.jp]]
-[[2ch型掲示板レンタル&gt;&gt;http://atchs.jp]]
-[[無料掲示板レンタル&gt;&gt;http://atbbs.jp]]
-[[お絵かきレンタル&gt;&gt;http://atpaint.jp/]]
-[[無料ソーシャルプロフ&gt;&gt;http://sns.atfb.jp/]]

// リンクを張るには &quot;[&quot; 2つで文字列を括ります。
// &quot;&gt;&quot; の左側に文字、右側にURLを記述するとリンクになります


//**更新履歴
//#recent(20)

&amp;link_editmenu(text=ここを編集)    </description>
    <dc:date>2013-07-07T00:28:52+09:00</dc:date>
    <utime>1373124532</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/thaladabar/pages/15.html">
    <title>プログラム</title>
    <link>https://w.atwiki.jp/thaladabar/pages/15.html</link>
    <description>
      -[[C++]]
-[[C#]]
-[[FSharp]]
-[[java]]
-[[ruby]]
-[[python]]
-[[android]]
-[[iPhone]]
-[[OpenGL]]
-[[vim]]
-[[雑多]]    </description>
    <dc:date>2013-07-07T00:28:10+09:00</dc:date>
    <utime>1373124490</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/thaladabar/pages/26.html">
    <title>pythonの正規表現</title>
    <link>https://w.atwiki.jp/thaladabar/pages/26.html</link>
    <description>
      #contents()


**正規表現のメタ文字

|	メタ文字	|	意味	|
|	│	|	この前後にある正規表現のどちらかと一致する	|
|	*	|	直前の正規表現の 0 回以上の繰り返しに一致する	|
|	+	|	直前の正規表現の 1 回以上の繰り返しに一致する	|
|	?	|	直前の正規表現に 0 回もしくは１回一致する	|
|	{m,n}	|	直前の正規表現の m 回以上 n 回以下の繰り返し	|
|	*?	|	直前の正規表現の 0 回以上の繰り返しに一致する（最短一致）	|
|	+?	|	直前の正規表現の 1 回以上の繰り返しに一致する（最短一致）	|
|	??	|	直前の正規表現に 0 回もしくは１回一致する（最短一致）	|
|	{m,n}?	|	直前の正規表現の m 回以上 n 回以下の繰り返し（最短一致）	|
|	[ ]	|	[ ] 内に指定した文字のどれかと一致する	|
|	[^ ]	|	[ ] 内に指定した文字でない場合に一致する	|
|	.	|	任意の１文字と一致する	|
|	^	|	行頭と一致する	|
|	$	|	行末と一致する	|
|	( )	|	正規表現をグループにまとめる	|
|	\	|	メタ文字を打ち消す	|
|	\A	|	文字列の先頭と一致	|
|	\b	|	単語境界と一致 (\w と \W の間の空文字列と一致)	|
|	\B	|	\B 以外と一致	|
|	\d	|	数字と一致 ([0-9] と同じ)	|
|	\D	|	\d 以外と一致	|
|	\s	|	空白文字と一致 ([ \t\n\r\f] と同じ)	|
|	\S	|	\s 以外と一致	|
|	\w	|	英数字とアンダースコア _ に一致 ([_a-zA-Z0-9] と同じ)	|
|	\W	|	 \w 以外と一致	|
|	\Z	|	 文字列の末尾と一致	|    </description>
    <dc:date>2013-06-29T16:25:14+09:00</dc:date>
    <utime>1372490714</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/thaladabar/pages/25.html">
    <title>pythonのファイルIO</title>
    <link>https://w.atwiki.jp/thaladabar/pages/25.html</link>
    <description>
      #contents()

**ファイルを開く
 file = open( &quot;ファイル名&quot; )
 
 file.close()   # 最後に必ず閉じること


**ファイルを開く（モード指定）
ファイルを開く際のopen関数にモードを指定することができる
 file = open( &quot;ファイル名&quot;, &#039;r&#039; ) # 読み込みモード
 file = open( &quot;ファイル名&quot;, &#039;w&#039; ) # 書き込みモード
 file = open( &quot;ファイル名&quot;, &#039;r&#039; ) # 追記モード
 file = open( &quot;ファイル名&quot;, &#039;+&#039; ) # 読み書き両方

また上記指定にプラスしてテキストとバイナリモードの指定を行うこともできる
 file = open( &quot;ファイル名&quot;, &#039;rt&#039; ) # テキストモードでの読み込み
 file = open( &quot;ファイル名&quot;, &#039;rb&#039; ) # バイナリモードでの読み込み

それぞれのモードで書き込みを行いたい場合は&#039;r&#039;を&#039;w&#039;に変更すればよい


**ファイルの内容を読み込む
ファイルの中身を一括で取得したい場合
 file.read()
このメソッドを使用すれば良い

ファイルの中身を1行毎に処理したい場合
 for line in file:
     print( line )
for文でファイルオブジェクトをループ処理して終端までを行ごとに処理することができる。    </description>
    <dc:date>2013-06-28T08:56:10+09:00</dc:date>
    <utime>1372377370</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/thaladabar/pages/21.html">
    <title>python</title>
    <link>https://w.atwiki.jp/thaladabar/pages/21.html</link>
    <description>
      #contents()
-[[pythonのデータ型]]
-[[pythonの文字列]]
-[[pythonの正規表現]]
-[[pythonのファイルIO]]    </description>
    <dc:date>2013-06-28T08:44:15+09:00</dc:date>
    <utime>1372376655</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/thaladabar/pages/24.html">
    <title>pythonのデータ型</title>
    <link>https://w.atwiki.jp/thaladabar/pages/24.html</link>
    <description>
      #contents

**タプル
タプルは複数の要素から構成される。
初期化後に内包する値に対して変更することができないimmutableなコレクションとなる

タプル宣言方法 
 [[python]]_tuple = ( &quot;year&quot;, &quot;month&quot;, &quot;day&quot;, 1, 3 )
 print( python_tuple )

タプルで要素に対してアクセスする場合は配列と同じようにindexを指定してアクセスする
 print( python_tuple[0] )
 print( python_tuple[1] )
 print( python_tuple[2] )

タプルの内包要素数はlen関数で調べることが可能
 print( len( python_tuple ) )


**リスト
リストはタプルと同じように複数の要素から構成される。
リストはタプルと違い内包する値に対して変更を行うことが可能なmutableなコレクションとなる
 python_list = [ &quot;year&quot;, &quot;month&quot;, &quot;day&quot;, 1, 3 ]
 print( python_list )

各要素のアクセスや要素数はタプルと同じように行える
 print( python_list[0] )
 print( python_list[1] )
 print( python_list[2] )
 print( len( python_list ) )

リストの末尾に要素を追加する場合list.append関数を使用する
 python_list.append( &quot;time&quot; )
 print( python_list )

リストの末尾に複数の要素を追加する場合list.extend関数を使用する
 python_list.extend( [1, 2, 3, 5] )
 print( python_list )

リストから要素を取り出す場合list.pop関数を使用する
 popValue = python_list.pop( 2 )  #指定したindexの要素の値を取り出す
 print( python_list )
 print( &quot;popValue =&quot; + str( popValue ) )

 popValue = python_list.pop()  #引数を指定しない場合末尾から取り出す
 print( python_list )
 print( &quot;popValue =&quot; + str( popValue ) )

リストから要素を削除する場合list.remove関数を使用する
 python_list.remove( &quot;year&quot; )
 print( python_list )

** ディクショナリ
リスト・タプルと同じ様な構造ではあるが、キーと値がセットで内包されている

ディクショナリの宣言方法
 python_dict = { &quot;year&quot; : 2013, &quot;month&quot; : 3, &quot;day&quot; : 31 }
 print( python_dict )

ディクショナリ型ではタプル・リストのようにindexでのアクセスをする場合は
keyを配列の演算子に指定してやる
 python_dict = { &quot;year&quot; : 2013, &quot;month&quot; : 3, &quot;day&quot; : 31 }
 print( python_dict[&quot;year&quot;] )
 print( python_dict[&quot;month&quot;] )

要素に対してアクセスする場合はdict.get関数を使用することでも取得できる
 python_dict = { &quot;year&quot; : 2013, &quot;month&quot; : 3, &quot;day&quot; : 31 }
 print( python_dict.get( &quot;day&quot; ) )
 print( python_dict.get( &quot;ddd&quot;, &quot;NON&quot; ) ) #キーが見つからなかった場合第２引数を返す

要素数はタプル・リストと同じように行える
 python_dict = { &quot;year&quot; : 2013, &quot;month&quot; : 3, &quot;day&quot; : 31 }
 print( len( python_dict ) )

ディクショナリに要素を追加する場合dict[key] = valueと
キーに対して代入をするようにすれば追加される
 python_dict = {}
 python_dict[&quot;year&quot;] = 2013
 python_dict[&quot;month&quot;] = 3
 python_dict[&quot;day&quot;] = 31
 print( python_dict )    </description>
    <dc:date>2013-03-31T21:36:32+09:00</dc:date>
    <utime>1364733392</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/thaladabar/pages/23.html">
    <title>計算によるグラフ添付場所</title>
    <link>https://w.atwiki.jp/thaladabar/pages/23.html</link>
    <description>
      *excelで作ったグラフを添付する場所

** log.xlsx log計算のグラフ
徐々に数値の上がり方が緩やかになるグラフ    </description>
    <dc:date>2013-03-31T16:42:21+09:00</dc:date>
    <utime>1364715741</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/thaladabar/pages/17.html">
    <title>雑多</title>
    <link>https://w.atwiki.jp/thaladabar/pages/17.html</link>
    <description>
      &amp;aname(test){ビットシフトの定数でif文を使わない}

*ビットシフトの定数でif文を使わない

#html2(){{{{{{
&lt;pre&gt;
static const int LEFT = 1 &lt;&lt; 0;
static const int RIGHT = 1 &lt;&lt; 1;
static const int HCENTER = 1 &lt;&lt; 2;
&lt;/pre&gt;
}}}}}}

この様な定数を使用する場合if文やswitch文で処理を分岐させているが合によっては使わなくても分岐を行うことが出来る。
ビットシフトで定数を宣言する場合に値は全て2の階乗となるため指数を取り出しindexとして使用することで必要な物を取り出すことができる。
[[プログラム]]で指数を取り出したい場合下記の様な式になる。

#html2()
{
&lt;pre&gt;
指数 = log(乗数を調べたい値) / log(底の値)
&lt;/pre&gt;
}


[[計算によるグラフ添付場所]]    </description>
    <dc:date>2013-03-31T16:37:09+09:00</dc:date>
    <utime>1364715429</utime>
  </item>
  </rdf:RDF>
