2008-07-01から1ヶ月間の記事一覧
従来ののチャットといえば、メタタグやJavascript等で定期的に更新処理がされていたのでストレスだったはず。サーバが送りたいタイミング(プッシュ型通信)でクライアントに更新をかけられれば、無駄な更新はしなくても良いし、無駄なトラフィックも無くな…
#include <stdio.h> #include <string.h> #include "xl_hash.h" #define HASH_TABLE_SIZE 1000 /* ハッシュ関数(適当) */ int str_calc_hash(XL_KEY_TYPE key){ unsigned int sum = 0; int i; for(i = 0; i < strlen((char *)key); i++){ sum = sum * 62423 + *((char*)key + </string.h></stdio.h>…
#include "xl_hash.h" xl_hash *xl_hash_init(xl_hash_type *type){ return xl_hash_init_with_size(type, 0); } xl_hash *xl_hash_init_with_size(xl_hash_type *type, XL_HASH_KEY_TYPE size){ xl_hash *hash = (xl_hash *)calloc(1, sizeof(xl_hash)); ha…
#ifndef __XL_HASH__ #define __XL_HASH__ #include <stdio.h> typedef void * XL_VALUE_TYPE; typedef void * XL_KEY_TYPE; typedef unsigned long XL_HASH_KEY_TYPE; #define XL_HASH_CALC(hash, key) ((*hash->type->hash)(key)) #define XL_HASH_KEY_COMP(hash, a</stdio.h>…
CだとC++と違ってが使えないので、別のデータを格納するハッシュを利用するには、それ専用のソースを用意する必要がある。 そこで、Ruby等で使われているst_tableを参考に、柔軟なHashを自分なりに一から作ってみた。突っ込み、機能拡張大歓迎。一応一通りメ…
OpenSSLを/usr/local/下にインストールして、それを使ったアプリケーションをインストールするとき。。親切なのか不親切なのかconfigureでMakefileを作ると、 -I/usr/local/openssl-0.9.x/include/openssl までインクルードディレクトリに指定される。。。よ…
適当なディレクトリworkを作り、以下の2つを解凍 apache-log4cxx-0.10.0.zip apr-all-1.2.12-win32-x86-msvcrt60.zip(aprという名前に変更) work←適当なディレクトリ ├apache-log4cxx-0.10.0 │└src │ └main │ └include←INCLUDEパス └apr ├include←INCLUDE…
それわかる!!!めっさ気持ち悪い・・・
あなたに最適なドメインを検索します←絶対こんな売り文句になる! http://xona.com/domainhacks/
OAuth Authentication for Web Applications