<?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/massy/">
    <title>massy @ ウィキ</title>
    <link>http://w.atwiki.jp/massy/</link>
    <atom:link href="https://w.atwiki.jp/massy/rss10.xml" rel="self" type="application/rss+xml" />
    <atom:link rel="hub" href="https://pubsubhubbub.appspot.com" />
    <description>massy @ ウィキ</description>

    <dc:language>ja</dc:language>
    <dc:date>2015-07-18T16:17:00+09:00</dc:date>
    <utime>1437203820</utime>

    <items>
      <rdf:Seq>
                <rdf:li rdf:resource="https://w.atwiki.jp/massy/pages/17.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/massy/pages/16.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/massy/pages/15.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/massy/pages/14.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/massy/pages/13.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/massy/pages/9.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/massy/pages/12.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/massy/pages/11.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/massy/pages/10.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/massy/pages/1.html" />
              </rdf:Seq>
    </items>
	
		
    
  </channel>
    <item rdf:about="https://w.atwiki.jp/massy/pages/17.html">
    <title>test3</title>
    <link>https://w.atwiki.jp/massy/pages/17.html</link>
    <description>
      env COMPRESSION=NONE  ./create_table.sh
sudo tsdb tsd


sudo tsdb mkmetric speed
sudo tsdb import ~/a

sudo tsdb query 2000/01/01-00:00 sum speed
sudo tsdb query 2000/01/01-00:00 sum speed reqtype=*

sudo tsdb scan --import 0 sum speed
# delete
sudo tsdb scan --import 0 sum speed --delete    </description>
    <dc:date>2015-07-18T16:17:00+09:00</dc:date>
    <utime>1437203820</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/massy/pages/16.html">
    <title>test2</title>
    <link>https://w.atwiki.jp/massy/pages/16.html</link>
    <description>
      package test.encode;

import java.io.UnsupportedEncodingException;
import java.nio.ByteBuffer;
import java.nio.CharBuffer;
import java.nio.charset.CharacterCodingException;
import java.nio.charset.Charset;
import java.nio.charset.CharsetEncoder;
import java.nio.charset.CodingErrorAction;

public class TestEncode {
    static CharsetEncoder encoder = Charset.forName(&quot;US-ASCII&quot;).newEncoder()
            .onMalformedInput(CodingErrorAction.REPORT)
            .onUnmappableCharacter(CodingErrorAction.REPORT);
    static Charset charset = Charset.forName(&quot;US-ASCII&quot;);
    
    public static void main(String[] args) throws UnsupportedEncodingException {
        int n = 1000000;
        for (int i = 0; i &lt; 100; i++) {
            f0(n);
            f1(n);
            f2(n);
            f3(n);
        }
    }
    
    static void f0(int n) {
        long s1 = System.nanoTime();
        for (int i = 0; i &lt; n; i++) {
            String.valueOf(i);
        }
        long e1 = System.nanoTime();
        
        System.out.println(&quot;f0:&quot; + 0.000001*(e1-s1));
    }
    
    static void f1(int n) {
        long s1 = System.nanoTime();
        for (int i = 0; i &lt; n; i++) {
            encodeString(encoder, String.valueOf(i));
        }
        long e1 = System.nanoTime();
        
        System.out.println(&quot;f1:&quot; + 0.000001*(e1-s1));
    }
    
    static void f2(int n) throws UnsupportedEncodingException {
        long s2 = System.nanoTime();
        for (int i = 0; i &lt; n; i++) {
            String.valueOf(i).getBytes(&quot;US-ASCII&quot;);
        }
        long e2 = System.nanoTime();
        
        System.out.println(&quot;f2:&quot; + 0.000001*(e2-s2));
    }

    static void f3(int n) {
        long s2 = System.nanoTime();
        for (int i = 0; i &lt; n; i++) {
            String.valueOf(i).getBytes(charset);
        }
        long e2 = System.nanoTime();
        
        System.out.println(&quot;f3:&quot; + 0.000001*(e2-s2));
    }
    
    public static byte[] encodeString(CharsetEncoder encoder, String src) {
        ByteBuffer buf = null;
        try {
            CharBuffer cb = CharBuffer.wrap(src);
            buf = encoder.encode(cb);            
        } catch (CharacterCodingException e) {
            e.printStackTrace();
        }
        return buf.array();
    }

}    </description>
    <dc:date>2014-08-23T22:54:42+09:00</dc:date>
    <utime>1408802082</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/massy/pages/15.html">
    <title>test1</title>
    <link>https://w.atwiki.jp/massy/pages/15.html</link>
    <description>
      package test.nonblock;

import java.io.IOException;
import java.net.InetSocketAddress;
import java.net.SocketAddress;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.nio.channels.ServerSocketChannel;
import java.nio.channels.SocketChannel;
import java.util.Arrays;
import java.util.List;

public class TestServer {

    private static int port = 10000;
    private static String group;
    private static String name;
    private static List&lt;String&gt; types = Arrays.asList(new String[]{&quot;aa&quot;, &quot;bb&quot;});
    /**
     * @param args
     */
    public static void main(String[] args) {
        ServerSocketChannel serverChannel = null;
        try {
            serverChannel = ServerSocketChannel.open();
            serverChannel.socket().bind(new InetSocketAddress(port));
            while (true) {
                SocketChannel channel = serverChannel.accept();
                SocketAddress addr = channel.socket().getRemoteSocketAddress();
                System.out.println(addr + &quot;:[接続]&quot;);
                Child child = new Child(channel, addr);
                child.setParam(group, name, types);
                child.start();
            }
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            if (serverChannel != null &amp;&amp; serverChannel.isOpen()) {
                try {
                    System.out.println(&quot;停止&quot;);
                    serverChannel.close();
                } catch (IOException e) {}
            }
        }
    }

    
    static class Child extends Thread {
        private static final short DT_TYPE = 0x01;
        private static final short S_TYPE = 0x03;
        
        private static final int BUF_SIZE = 8192;
        private SocketChannel channel = null;
        private SocketAddress address = null;
        private String group;
        private String name;
        private List&lt;String&gt; types;
        
        public Child(SocketChannel channel, SocketAddress addr) {
            this.channel = channel;
            this.address = addr;
        }

        public void setParam(String group, String name, List&lt;String&gt; types) {
            this.group = group;
            this.name = name;
            this.types = types;
        }

        public void run() {
            ByteBuffer buf = ByteBuffer.allocate(BUF_SIZE);
            buf.order(ByteOrder.BIG_ENDIAN);
            try {                
                this.rcvAndSendSchmea();
                
                int headersize = 6;
                boolean init = true;
                while (true) {
                    if (init) {
                        buf.clear();
                        buf.limit(headersize);
                        if (channel.read(buf) &lt;= 0) {
                            System.out.println(&quot;failed to get header:&quot; + address);
                            return;
                        }
                        this.printData(buf);
                        buf.flip();
                        if (buf.getShort() != DT_TYPE) {
                            System.out.println(&quot;header 0-1 value is invalid:&quot; + address);                            
                        }
                        int dtsize = 0;
                        if ((dtsize = buf.getShort()) &lt; 0) {
                            System.out.println(&quot;header 2-3 value is invalid:&quot; + address);                            
                        }
                        buf.clear();
                        buf.limit(dtsize);
                        // read data
                        if (channel.read(buf) &lt;= 0) {
                            System.out.println(&quot;failed to get data:&quot; + address);
                            return;
                        }
                        this.printData(buf);
                    }
                    if (channel.read(buf) &lt;= 0) {
                        
                    }
                    buf.flip();
                    buf.clear();
                }
            } catch (IOException e) {
                e.printStackTrace();
            } finally {
                System.out.println(address + &quot;:[切断しました]&quot;);
                if (channel != null &amp;&amp; channel.isOpen()) {
                    try {
                        channel.close();
                    } catch (IOException e) {}
                }
            }
        }

        private void printData(ByteBuffer buf) {
            int size = buf.limit();
            System.out.print(&quot;[size=&quot; + size + &quot;]&quot;);
            byte[]  ba = buf.array();
            for (int i = 1; i &lt; size; i++) {
                System.out.printf(&quot;%02x&quot;, ba[i]);                
            }
            System.out.println();

        }

        private void rcvAndSendSchmea() throws IOException {
            int rcvsize = 4;
            int cnt = 0;
            int rc;
            ByteBuffer buf = ByteBuffer.allocate(rcvsize);
            buf.order(ByteOrder.BIG_ENDIAN);
            if ((rc = channel.read(buf)) &gt;= 0) {
                this.printData(buf);
                cnt += rc;
                if (cnt &gt;= 4) {                    
                    this.sendSchema(buf);
                }
            } else {
                throw new IOException(&quot;already closed&quot;);
            }
        }

        private void sendSchema(ByteBuffer buf) throws IOException {
            buf.flip();
            short type = buf.getShort();
            short ext = buf.getShort();
            if (type != S_TYPE || ext != 0) {
                ///
            }
            
            ByteBuffer sndbuf = ByteBuffer.allocate(BUF_SIZE);
            sndbuf.order(ByteOrder.BIG_ENDIAN);
            ////
            byte[] ba = new byte[]{1,1,1,1,1,1,1};
            sndbuf.putShort((short) ba.length);
            sndbuf.put(ba);
            sndbuf.flip();
            channel.write(sndbuf);
        }

    }
    
}    </description>
    <dc:date>2014-08-23T15:33:13+09:00</dc:date>
    <utime>1408775593</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/massy/pages/14.html">
    <title>hash関数</title>
    <link>https://w.atwiki.jp/massy/pages/14.html</link>
    <description>
          static int getHash(int key, int seed) {
        int c1 = 0xcc9e2d51;
        int c2 = 0x1b873593;
        int r1 = 15;
        int r2 = 13;
        int m = 5;
        int n = 0xe6546b64;
        
        int hash = seed;

        int k = key;
        k *= c1;
        k = (k &lt;&lt; r1) | (k&gt;&gt;&gt;(32-r1));
        k *= c2;
        hash ^= k;
        hash = ((hash &lt;&lt; r2) | (hash &gt;&gt;&gt; (32 - r2))) * m + n;        
     
        hash ^= 4;
        hash ^= (hash &gt;&gt;&gt; 16);
        hash *= 0x85ebca6b;
        hash ^= (hash &gt;&gt;&gt; 13);
        hash *= 0xc2b2ae35;
        hash ^= (hash &gt;&gt;&gt; 16);
        
        return hash;
    }    </description>
    <dc:date>2014-07-27T19:23:24+09:00</dc:date>
    <utime>1406456604</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/massy/pages/13.html">
    <title>JAXBメモ</title>
    <link>https://w.atwiki.jp/massy/pages/13.html</link>
    <description>
      スキーマからxjcコマンドを使ってJavaのクラスを生成した。
ただし、一部エラーが出たためスキーマを編集している。


RMIのサンプル添付。    </description>
    <dc:date>2014-03-23T22:35:19+09:00</dc:date>
    <utime>1395581719</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/massy/pages/9.html">
    <title>プラグイン</title>
    <link>https://w.atwiki.jp/massy/pages/9.html</link>
    <description>
      @wikiにはいくつかの便利なプラグインがあります。

-----


#ls

-----

これ以外のプラグインについては@wikiガイドをご覧ください
=&gt;http://atwiki.jp/guide/
    </description>
    <dc:date>2011-08-03T22:25:14+09:00</dc:date>
    <utime>1312377914</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/massy/pages/12.html">
    <title>プラグイン/人気商品一覧</title>
    <link>https://w.atwiki.jp/massy/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>2011-08-03T22:25:14+09:00</dc:date>
    <utime>1312377914</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/massy/pages/11.html">
    <title>プラグイン/コメント</title>
    <link>https://w.atwiki.jp/massy/pages/11.html</link>
    <description>
      * コメントプラグイン
@wikiのwikiモードでは
 #comment()
と入力することでコメントフォームを簡単に作成することができます。
詳しくはこちらをご覧ください。
＝＞http://atwiki.jp/guide/17_60_ja.html


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

#comment    </description>
    <dc:date>2011-08-03T22:25:14+09:00</dc:date>
    <utime>1312377914</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/massy/pages/10.html">
    <title>プラグイン/関連ブログ</title>
    <link>https://w.atwiki.jp/massy/pages/10.html</link>
    <description>
      * 関連ブログ
@wikiのwikiモードでは
 #bf(興味のある単語)
と入力することで、あるキーワードに関連するブログ一覧を表示することができます

詳しくはこちらをご覧ください。
＝＞http://atwiki.jp/guide/17_161_ja.html

-----


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


#bf(ゲーム)
    </description>
    <dc:date>2011-08-03T22:25:14+09:00</dc:date>
    <utime>1312377914</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/massy/pages/1.html">
    <title>トップページ</title>
    <link>https://w.atwiki.jp/massy/pages/1.html</link>
    <description>
      **@wikiへようこそ
-ウィキはみんなで気軽にホームページ編集できるツールです。
-このページは自由に編集することができます。
-メールで送られてきたパスワードを用いてログインすることで、各種変更（サイト名、トップページ、メンバー管理、サイドページ、デザイン、ページ管理、等）することができます

**まずはこちらをご覧ください。
-[[@wikiの基本操作&gt;http://atwiki.jp/guide/category2.html]]
-[[用途別のオススメ機能紹介&gt;http://atwiki.jp/guide/category22.html]]
-[[@wikiの設定/管理&gt;http://atwiki.jp/guide/category6.html]]

**分からないことは？
-[[@wiki ご利用ガイド&gt;http://atwiki.jp/guide/]]
-[[よくある質問&gt;http://atwiki.jp/guide/category1.html]]
-[[無料で会員登録できるSNS内の@wiki助け合いコミュニティ&gt;http://sns.atfb.jp/view_community2.php?no=112]]
-[[@wiki更新情報&gt;http://www1.atwiki.jp/guide/pages/264.html]]
-[[@wikiへのお問合せフォーム&gt;http://atwiki.jp/helpdesk]]
等をご活用ください

**@wiki助け合いコミュニティの掲示板スレッド一覧
#atfb_bbs_list(112)

**その他お勧めサービスについて
-[[大容量１Ｇ、PHP/CGI、MySQL、FTPが使える無料ホームページは@PAGES&gt;&gt;http://atpages.jp/]]
-[[無料ブログ作成は@WORDをご利用ください&gt;&gt;http://atword.jp/]]
-[[2ch型の無料掲示板は@chsをご利用ください&gt;&gt;http://atchs.jp/]]
-[[フォーラム型の無料掲示板は@bbをご利用ください&gt;&gt;http://atbb.jp/]]
-[[お絵かき掲示板は@paintをご利用ください&gt;&gt;http://atpaint.jp/]]
-[[その他の無料掲示板は@bbsをご利用ください&gt;&gt;http://atbbs.jp/]]
-[[無料ソーシャルプロフィールサービス @flabo(アットフラボ)&gt;&gt;http://sns.atfb.jp]]

**おすすめ機能
-[[気になるニュースをチェック&gt;http://atwiki.jp/guide/17_174_ja.html]]
-[[関連するブログ一覧を表示&gt;http://atwiki.jp/guide/17_161_ja.html]]

**その他にもいろいろな機能満載！！
-[[@wikiプラグイン&gt;http://atwiki.jp/guide/category17.html]]
-[[@wiki便利ツール&gt;http://atwiki.jp/guide/category32.html]]
-[[@wiki構文&gt;http://atwiki.jp/guide/category16.html]]
-[[@wikiプラグイン一覧&gt;http://www1.atwiki.jp/guide/pages/264.html]]
-[[まとめサイト作成支援ツール&gt;http://atwiki.jp/matome/]]

**バグ・不具合を見つけたら？ 要望がある場合は？
お手数ですが、メールでお問い合わせください。
    </description>
    <dc:date>2011-08-03T22:25:14+09:00</dc:date>
    <utime>1312377914</utime>
  </item>
  </rdf:RDF>
