2008-07-21から1日間の記事一覧

getElementsByClassName

FirterがFirefox3で動いていなかったので調査。 「...getElementsByClassName('...').each(...」とかで落ちてた。 そういえばFirefox3でネイティブのgetElementsByClassNameが追加されたんだっけ…ということで、次のように修正。 「$A(...getElementsByClass…

asset id

javascriptタグとかにasset id*1がついていなかったので調査。 urlにプリフィックスがついているとrelative_url_rootを設定しても、ファイルの更新日時を取得できないらしい。*2 とりあえず以下のコードをenvironment.rbに追加。 ENV['RAILS_ASSET_ID'] = Ti…

opender

Cygwinでビルド。d_offとかがなかった。 #include <stdio.h> #include <sys/types.h> #include <dirent.h> #include <errno.h> int main() { DIR *dir; struct dirent *entry; if ((dir = opendir("/usr/bin")) == NULL) { perror("opendir"); exit(1); } entry = readdir(dir); while (entry) { print</errno.h></dirent.h></sys/types.h></stdio.h>…

opendir・readdir・closedirをエミュレートする

空のディレクトリの動作が違いそうな…。 #include <stdio.h> #include <errno.h> #include "dirent.h" int main() { DIR *dir; struct dirent *entry; if ((dir = opendir("/usr/local")) == NULL) { perror("opendir(3)"); exit(1); } entry = readdir(dir); while (entry) { </errno.h></stdio.h>…

glob.cのコントリビューター

libtarのglob.cは、元はOpenBSDのものらしい。 で、何となくヘッダのコメントを見ていたら「This code is derived from software contributed to Berkeley by Guido van Rossum」とか書いてあった。 へーへーへー。Wikipediaにもちゃんと載ってる。