タグ

2006年8月17日のブックマーク (2件)

  • The Evolution of a Programmer

    #include <stdio.h> void main(void) { char *message[] = {"Hello ", "World"}; int i; for(i = 0; i < 2; ++i) printf("%s", message[i]); printf("\n"); } #include <iostream.h> #include <string.h> class string { private: int size; char *ptr; string() : size(0), ptr(new char[1]) { ptr[0] = 0; } string(const string &s) : size(s.size) { ptr = new char[size + 1]; strcpy(ptr, s.ptr); } ~string() { delete [] p

    y_saitou
    y_saitou 2006/08/17
    Managerヒドス
  • VikiWiki - htree

    htreeとは Rubyのライブラリ。XMLパーサでもあり、テンプレートエンジンでもある。 テンプレートエンジンはsamidareで使われている。 公式ドキュメント。 htreeの挙動は順次変更になっています。 この解説は、2004/05/30に落としてきたバージョンのhtreeに関するものです。 パース urlからパースして、テキストが空でない要素のパスと内容を表示。とりあえずエンコードのハナシは無視。 require 'htree' require 'open-uri' url="http://kitchon.ddo.jp/~ashiya/diary" ht=HTree.parse(open(url).read) ht.make_loc.traverse_element do |n| txt=n.node.extract_text.to_s if txt !~ /^(\s\t\n\r)

    y_saitou
    y_saitou 2006/08/17
    パースライブラリ