2004-07-01から1ヶ月間の記事一覧
Does pike really need Iterator object ? Even pike has foreach. Iterator it; foreach (it; int index; mixed value) { write("%2d\t%s\n", index, value); } // other way to do it. it->first(); do { write( it->value() + "\n" ); } while (it->next(…
I had noticed PHP HAD the function after I made that library. I was careless to search it =/PHP print_r(read_exif_data($filename, "TAG_ALL")); Pike Stdio.File file = Stdio.File(filename); mapping exif = Standards.EXIF.get_propaties( file )…
ポータビリティのあるMakefileを生成するconfigure(shell script)を生成する ツール郡(説明長)。とてもじゃないけど使いやすいとは思えない。 ディレクトリ構造だけでも何とかならないかな。 autogen.sh というシェルスクリプトを使うと雛型生成 => コマンド…
WWW::Mechanizeは、LWP::UserAgentを継承しているので、 LWP::UserAgentと同じ方法でBasic or Digest認証が出来ます。リクエスト発生からの処理の流れは、 LWP::UserAgent::get LWP::UserAgent::request LWP::Authen::[Basic|Digest]::authenticate LWP::Use…
#define debug_print(...) \ printf("debug: " __VA_ARGS__)
"attrs" methods is now "attr_" attribute which contains attributes. the sample x extension module code here does not work with 0.1.0.
Mini.c /* Minimum extension module */ #include "prothon/prothon_dll.h" MODULE_DECLARE(Mini); MODULE_START(Mini) { Mini_OBJ = NEW_OBJ(NULL); MODULE_SET_DOC(Mini, "Sample module"); MODULE_ADD_TO_BASE(Mini); } DEF(Mini, sayHello, NULL) { retu…