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

PHP で、連想配列の配列を効率よくソートする

php

PHPで、ファイル名を含む連想配列の配列があるとして、 101, 'filename'=>'foo.jpg'), array('id'=>104, 'filename'=>'bar.jpg'), array('id'=>109, 'filename'=>'baz.jpg'), ); ?> これをファイルサイズでソートしたいとする。 この場合、比較関数を定義し…

Ruby on Rails でデータベースの Sharding を実現する DataFabric プラグイン

RubyFlowより。 One of the lingering issues we’ve had to deal with over the last year in the Manage service is ActiveRecord’s reluctance to talk to more than one database. It’s really quite stubborn in that regard and while there are a few …