<?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/cons/">
    <title>てきとうメモ - cons @ wiki</title>
    <link>http://w.atwiki.jp/cons/</link>
    <atom:link href="https://w.atwiki.jp/cons/rss10.xml" rel="self" type="application/rss+xml" />
    <atom:link rel="hub" href="https://pubsubhubbub.appspot.com" />
    <description>てきとうメモ - cons @ wiki</description>

    <dc:language>ja</dc:language>
    <dc:date>2010-08-06T11:42:34+09:00</dc:date>
    <utime>1281062554</utime>

    <items>
      <rdf:Seq>
                <rdf:li rdf:resource="https://w.atwiki.jp/cons/pages/20.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/cons/pages/19.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/cons/pages/18.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/cons/pages/17.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/cons/pages/16.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/cons/pages/15.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/cons/pages/14.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/cons/pages/13.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/cons/pages/12.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/cons/pages/11.html" />
              </rdf:Seq>
    </items>
	
		
    
  </channel>
    <item rdf:about="https://w.atwiki.jp/cons/pages/20.html">
    <title>Email</title>
    <link>https://w.atwiki.jp/cons/pages/20.html</link>
    <description>
      **添付ファイルの自動処理
***メールの添付ファイルの仕組み
SMTPでメールを送信するとき、DATAコマンドに続いてメールの内容をMIME形式でテキストを送信する。

 To:Display Name&lt;someone@example.com&gt;\r\n
 From:\r\n
 Subject:
 Content-Type:text/plain
 \r\n
 (本文のテキスト)

添付ファイルを含むメールは、本文のテキストを一つのpart、添付ファイルをエンコードしてMIME形式にしたものをもう一つのpartとしたmultipart MIMEとして送信される。

添付ファイルを抽出するには、POPでmultipart MIMEを取得したあと、MIMEをパースしてファイルを取り出せばよい。

***Perl
use MIME::IMAPClient;
use Email::MIME;
use Email::MIME::Attachment::Stripper;

Thunderbird 2.x から送られてくるメールのテキストの添付ファイルは抽出できない。
 
原因は
[[Thunderbird bug #65794&gt;https://bugzilla.mozilla.org/show_bug.cgi?id=65794]]
 Content-Type: text/plain;
 Content-Disposition: inline; filename=&quot;...&#039;
なんでもかんでもinline扱い。

とりあえず以下のようにすれば動く。

 use Email::MIME::Attachment::Stripper;
 {package Email::MIME::Attachment::Stripper;
 sub _detach_all {
    my ($self, $part) = @_;
    $part ||= $self-&gt;{message};
    return if $part-&gt;parts == 1;
    my @attach = ();
    my @keep   = ();
    foreach ( $part-&gt;parts ) {
        my $    </description>
    <dc:date>2010-08-06T11:42:34+09:00</dc:date>
    <utime>1281062554</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/cons/pages/19.html">
    <title>やっつけ仕事</title>
    <link>https://w.atwiki.jp/cons/pages/19.html</link>
    <description>
      **CP932 (Windowsの日本語コード)
***Perl
 use Encode::Guess qw(cp932 utf8 eucjp);
 print encode(&quot;utf8&quot;, decode(&quot;Guess&quot;, (pack &quot;s&quot;, 0x8740)));    </description>
    <dc:date>2010-07-29T06:36:28+09:00</dc:date>
    <utime>1280352988</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/cons/pages/18.html">
    <title>REPL</title>
    <link>https://w.atwiki.jp/cons/pages/18.html</link>
    <description>
      Read-Eval-Print Loop. interactive mode とも。意味合いは違うが、同じ機能を持つものをShellと呼んでいる場合も多い。
**Perl
***いつもの
list
 perl -ne &#039;print eval, &quot;\n&gt; &quot;&#039;
scalar
 perl -ne &#039;print eval. &quot;\n&quot;&#039;
 perl -pe &#039;$_=eval&#039;
***perl debugger
 perl -de 0
***Shell::Perl
 cpan&gt; install Shell::Perl
 $ pirl
 pirl @&gt; @a=(1, 2, 3);
 (1, 2, 3)
 pirl @&gt; :set ctx $
 pirl $&gt; (1, 2, 3)
 Useless use of a constant in void context at (eval 17) line 1.
 3
 pirl $&gt; :help

表示形式は以下から選べる。
 
 pirl $&gt; :set out [D|DD|DDS|Y|P]
  D : Data::Dump
  DD : Data::Dumper
  DDS : Data::Dump::Streamer
  Y : YAML
  P : Plain

Data::Dumpではうまく日本語を表示できないようだが。

 pirl @&gt; &quot;日本語&quot;
 &quot;\xE6\x97\xA5\xE6\x9C\xAC\xE8\xAA\x9E&quot;

***Devel:PERL
 cpan&gt; install Devel::REPL
 # apt-get install libdevel-repl-perl
 $ re.pl
起動がもたつく…
 $ my @a = (1, 2, 3);
 $ARRAY1 = [
             1,
             2,
             3
           ];
 
 $ {
 &gt;  my @a = (4, 5);
 &gt;  print &quot;@a\n&quot;;
 &gt; }
 4 5
 1
 $ print &quot;@a\n&quot;
 4 5
 1
 $ exit
*** psh
csh    </description>
    <dc:date>2010-07-22T04:18:29+09:00</dc:date>
    <utime>1279739909</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/cons/pages/17.html">
    <title>逐次実行</title>
    <link>https://w.atwiki.jp/cons/pages/17.html</link>
    <description>
      **Scheme
基本の構文とマクロ
 (begin ...)
 (begin0 ...)
 (let (...) ...)
 (let1 x value ...)
 (when pred ...)

代入が続くときは
 (let* (
  ...
  (data ...)
  (surf (cairo_create_image_surface_for_data ... data))
  (cr (cairo_create surf))
  (_ (cairo_rectangle cr ...))
  ...))    </description>
    <dc:date>2010-07-22T04:06:55+09:00</dc:date>
    <utime>1279739215</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/cons/pages/16.html">
    <title>Scheme/Lisp 処理系</title>
    <link>https://w.atwiki.jp/cons/pages/16.html</link>
    <description>
      **Scheme
Gauche
PLT Scheme
guile
SCM
TinyScheme
mosh    </description>
    <dc:date>2010-07-17T22:59:06+09:00</dc:date>
    <utime>1279375146</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/cons/pages/15.html">
    <title>繰り返し</title>
    <link>https://w.atwiki.jp/cons/pages/15.html</link>
    <description>
      **Shell
***bash
 while true; do mplayer *.mp3; done
***csh
;と改行は重要

 while(1); mplayer *.mp3 
 end

 loop:
 mplayer *.mp3
 goto loop
あるいは
 loop:
 mplayer *.mp3;goto loop
**Scheme
 (for-each ... (iota n))

named-letをつかう
 (let loop (...)
   (... (loop ...)))

**Arc
 (to i n (pr i))    </description>
    <dc:date>2010-07-29T06:40:10+09:00</dc:date>
    <utime>1280353210</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/cons/pages/14.html">
    <title>リスト</title>
    <link>https://w.atwiki.jp/cons/pages/14.html</link>
    <description>
      *構造
配列 連結リスト
**append
***R5RS
(append list_1 list_2 ... list_n) - リストの連結
  
 (let* ((a (list 1 2 3)) (b (list 4 5)) (c (append a b)))
  (set-car! (list-tail c 2) &#039;x)
  (set-car! (list-tail c 3) &#039;y)
  (values a b c)) =&gt; (1 2 3) (y 5) (1 2 x y 5)

(append! list_1 list_2 ... list_n) - リストの連結
list1 ... list_n-1 が破壊される場合がある。

 (define x (list &#039;a &#039;b &#039;c))
 (set! x (append! x &#039;(1 2 3))
 x =&gt; (a b c 1 2 3)
**concat
***javascript
**indexOf
**iota
***srfi
srfi-1: (iota count [start] [step]) - 等間隔の数値をもつリスト
 (start start+step ... start+(count-1)*step)

 (iota 6) =&gt; (0 1 2 3 4 5)
 (iota 3 5 0.5) =&gt; (5 5.5 6)
**join
**lastIndexOf
**length
**list
**list-ref
***R5RS
(list-ref list index)
 (list-ref &#039;(a b c d) 2) =&gt; c
**memcpy
***C
 #include &lt;string.h&gt;
 memcpy (void *dest, const void *src, size_t n);
**pop
***Perl
pop array - Pops and returns the last value of the array, shortening the array by one element.
 @a = (1, 2, 3, 4);
 pop (@a) =&gt; 4
 &quot;@a&quot; =&gt; 1 2 3
**    </description>
    <dc:date>2010-07-29T06:33:26+09:00</dc:date>
    <utime>1280352806</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/cons/pages/13.html">
    <title>文字列操作</title>
    <link>https://w.atwiki.jp/cons/pages/13.html</link>
    <description>
      **append
**slice
**splice
**strcmp
**substr
**substring    </description>
    <dc:date>2010-07-17T20:56:49+09:00</dc:date>
    <utime>1279367809</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/cons/pages/12.html">
    <title>プラグイン/人気商品一覧</title>
    <link>https://w.atwiki.jp/cons/pages/12.html</link>
    <description>
      * 人気商品一覧
@wikiのwikiモードでは
 #price_list(カテゴリ名)
と入力することで、あるカテゴリの売れ筋商品の[[リスト]]を表示することができます。

カテゴリには以下のキーワードがご利用できます。
|キーワード|表示される内容|
|ps3|PlayStation3|
|ps2|PlayStation3|
|psp|PSP|
|wii|Wii|
|xbox|XBOX|
|nds|Nintendo DS|
|desctop-pc|デスクトップパソコン|
|note-pc|ノートパソコン|
|mp3player|デジタルオーディオプレイヤー|
|kaden|家電|
|aircon|エアコン|
|camera|カメラ|
|game-toy|ゲーム・おもちゃ全般|
|all|指定無し|

空白の場合はランダムな商品が表示されます。

※このプラグインは[[価格比較サイト@PRICE&gt;&gt;http://atprice.jp]]のデータを利用しています。

-----

たとえば、
 #price_list(game-toy)
と入力すると以下のように表示されます。

ゲーム・おもちゃ全般の売れ筋商品
#price_list(game-toy)

ノートパソコンの売れ筋商品
#price_list(game-toy)

人気商品リスト
#price_list()    </description>
    <dc:date>2010-07-17T20:47:48+09:00</dc:date>
    <utime>1279367268</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/cons/pages/11.html">
    <title>プラグイン/コメント</title>
    <link>https://w.atwiki.jp/cons/pages/11.html</link>
    <description>
      * コメントプラグイン
@wikiのwikiモードでは
 #comment()
と入力することでコメントフォームを簡単に作成することができます。
詳しくはこちらをご覧ください。
＝＞http://atwiki.jp/guide/17_60_ja.html


-----
たとえば、#comment() と入力すると以下のように表示されます。

#comment    </description>
    <dc:date>2010-07-17T20:47:48+09:00</dc:date>
    <utime>1279367268</utime>
  </item>
  </rdf:RDF>
