area map


install memcahedlibevent wget tar zxvf libevent-2.0.21-stable.tar.gz cd libevent-2.0.21-stable/ ./configure make make install


Debian wheezy 64bit 環境によって変わるらしい。 size_t 8 char 1 char * 8

Linux socket programming

C言語でサーバとクラアントの作成をするソケット操作の関数 ソケットを作る socket ソケットに名前をつける bind 接続を受け付ける listen 接続を受け入れる accept 接続を要求する connect データを受け取る recv データを送る send ソケットの入出力を停止…



tutorial touch git init git add git commit -m "first commit" git remote add origin git push -u origin master ref…

Virtal Machine on Debian

Debain上に仮想マシンをつくろうとしたら、ドハマりした話 やりたいこと qcow2でvirt-managerを使って仮想マシンをDebian上に建てたい。 Debian squeeze上に qemu-img create -f qcow2 giwawawa.qcow2 80Gqcow2を作る。virt-managerを呼び出す。新規を押す。…

pthread 2 Mutex


i#include <stdio.h> #include <unistd.h> // usleep() #include <pthread.h> pthread_mutex_t mutex; // Mutex // スレッド1 void* thread1( void* args ) { // 他のスレッドが mutex を返却するを待つ // mutex が返却されたら mutex を取得してブロック pthread_mutex_lock( &mutex ); /</pthread.h></unistd.h></stdio.h>…


Process is a running program and in multi task OS, different process is allocated to each memory space. Basically, memory space can not be accessed from different process.Thread is an executable unit which is executed independently in one …

ØMQ Zero Message Query

Leveldb is quite faster for sequencial write and read, compared with other Key-Value Store. But a problem is that leveldb is embedded database, not server-client. Leveldb is used in Riak, as storage engine. And also I found leveldb-server,…

Zeromq install

Installl sudo aptitude install libtool autoconf automake wget ./configure make make installinstall binding cpp git clone sudo cp cppzmq /usr/includeserver.cpp …

CakePHP View

View is like template of pages. It display pages. index.ctp <h1>Index Page</h1> <p>this is test View.</p> <p>message: </p> <p> </p> <p>Data.</p> <div> <ul> <li></li> </ul> </div> <p>NUM </p> <p> </p>

CakePHP Controller

This is a baby model of controller of CakePHP.Redirect autoRender = false; //Redirect $this -> redirect("./other"); // address is same but user is redirected to other //$this->setAction("other") }…


Mac OSX 10.8 install wget tar -zxvf leveldb-1.9.0.tar.gz cd leveldb-1.9.0/ make check cp lib* /usr/local/lib/ cp include/ /usr/local/include/ put #include <cassert> #include <iostream> #include <leveldb/db.h> int ma</leveldb/db.h></iostream></cassert>…

Hello world