2008-04-01から1ヶ月間の記事一覧
http://www.hde.co.jp/press/column/detail.php?n=200612130 http://localhost:10080/hello?name=asdf とかでGET渡せる #!/opt/local/bin/ruby require 'webrick' class HelloServlet < WEBrick::HTTPServlet::AbstractServlet def do_GET(req, res) res.bod…
Config::Simple [requires] XML::Simple [requires] IO::AtomicFile [requires] Date::Parse [requires] Log::Dispatch [requires] Crypt::SSLeay [requires]http://www.hatayan.org/weblog/archives/2006/02/21/133051.php apt-get build-dep libxml-parser…
rubyを.NET系と連携させたい。関数一発でkey:valueをやりとりできるぐらいまで作る。 1. webrickでサーバー立ててhttpでやる →rubyは充実してるので、C#側でhttp系のラッパー作る。2. XMLSocketのserver/clientを両方で書く。 両方作って置いた方が後々便利…
http://rubyist.g.hatena.ne.jp/muscovyduck/20061114/p1これでディレクトリ下が http://localhost:10080/ で公開される。明日飛行機ではこれとC#で遊ぼう #!/opt/local/bin/ruby require 'webrick' document_root = '/Users/sho/' #document_root = './' se…
mydns.jpはbasic認証でのアップデートができるので */10 * * * * wget --spider http://username:passwd@www.mydns.jp/login.htmlこれをcrontabに登録すればいい 10分おき更新。
WebService::SyncSBS::D2Hを使いたいので、(家のサーバーを1つ止めたので) http://search.cpan.org/~yappo/WebService-SyncSBS-D2H-0.03/lib/WebService/SyncSBS/D2H.pm http://shokai.org/blog/2007/02/04/delicious%e3%81%a8%e3%81%af%e3%81%a6%e3%81%aa…
var req:URLRequest = new URLRequest("pi.mp3"); var s:Sound = new Sound(req); s.play();
前の状態を覚えておく var dist = 0; var dist_threshold = 0.2; // 距離のしきい値 var wifeIsHere = false; serialInit(9600); //serialSend("this wife is watching me"); while(true) { dist = analogRead(0); if(dist > dist_threshold){ if(!wifeIsHer…
var dist = 0; var dist_threshold = 0.2; // 距離のしきい値 serialInit(9600); //serialSend("this wife is watching me"); while(true) { dist = analogRead(0); if(dist > dist_threshold) serialSend("N"); else serialSend("F"); //serialSend(dist + …
SELECT country.cname, country.population, river.rname, river.len, mount.mname, mount.elevation FROM country, river, mount, mhold, rhold WHERE country.population > 50000 AND mount.elevation > 4000 AND river.len > 1000 AND country.cname = mh…
1つ前ののpv3dとの地図のやつだと ライブラリ読み込んで import caurina.transitions.Tweener; planeMapというMovieClipを操作する。 Tweener.addTween(planeMap, { rotationZ:270, time:1, transition:"liner" } ); hashで値と変化先の値を指定する。 この…
http://web.sfc.keio.ac.jp/~shokai/archive/as3/0804_Pv3d/Pv3dTest/Pv3dTest.html http://web.sfc.keio.ac.jp/~shokai/archive/as3/0804_Pv3d/Pv3dTest/ キーボードの数字0〜7キーで回転する package { import flash.display.*; import flash.events.*; im…
これ参考に http://www.atmarkit.co.jp/fjava/javatips/035eclipse012.html Eclipse IDE for Java Developers http://www.eclipse.org/downloads/index.phpJavaScript Editor PlugIn for Eclipse http://sourceforge.net/projects/jseditorで、動かなかった…
joinわかった! select rhold.cname, rhold.rname,len from rhold,river where river.len > 700 AND river.rname = rhold.rname;
授業でもらったビルドを入れたらクライアントツールとか全部はいった。 universal build 8.3.1と書いてあったdmcに。
chsh -s /usr/local/bin/zsh
さくらレンタルサーバー スタンダードプランで。 http://d.hatena.ne.jp/aircastle/20071209/1197144758 mkdir local mkdir local/emacs mkdir tmp cd tmp wget http://core.ring.gr.jp/pub/GNU/emacs/emacs-22.2.tar.gz tar zxvf emacs-22.2.tar.gz cd emac…
sudo apt-get install bind9
CS3 の Configuration が汚すぎる件 - blog.nium.jp C:\Program Files\Adobe\Adobe Flash CS3\ja\Configuration\Component Source\ActionScript 3.0\FLVPlayback C:\Program Files\Adobe\Adobe Flash CS3\ja\Configuration\Component Source\ActionScript 3.…
やっぱcontrolleが何を表示するか?を決めて、viewがどう表示するか?を担当した方がいいので http://shokai.mag.keio.ac.jp/geophoto/photos.kml?lat=35&lon=135&size=thumb でサイズ指定できるようにしてみたcontrollers/photos_controller.rb def index d…
最初helperにしようかと思ったけどmodelにメソッド追加した class Photo < ActiveRecord::Base def source_url_size(size = :medium) if size == :square return source_url.sub(/\.jpg/, '_s.jpg') elsif size == :thumb return source_url.sub(/\.jpg/, '_…
FlashCS3で ウィンドウ→他のパネル でProgressionのパネルが増えているので出すプロジェクトを作成する、で適当に名前をつけて「作成する」 なんか適当に絵でも描いてから、FlashCS3で パブリッシュ設定→バージョン で「Adobe AIR 1.0」を選択 コマンド→「AI…
FlashDevelop+FlashCS3環境なのでFlash CS3用Air拡張入れる http://www.adobe.com/support/flash/downloads.html最新版のFlashDevelopを入れる http://www.flashdevelop.org/community/viewtopic.php?t=2574adobe extension manager入れる http://www.adobe.…
1207619657みたいなのから変換する result = DateTime.new(1970,1,1) + Rational(1207619657, 24*60*60) puts result.to_s 2008-04-08T01:54:17+00:00絶対もっといい方法がある
写真サイズ変える crawler移行 photo_idからcreate
公開した。ただしMサイズの写真のURLにしちゃったので重い。 http://shokai.mag.keio.ac.jp/geophoto/ http://shokai.mag.keio.ac.jp/geophoto/photos手順: これらと同じ MongrelでRailsをデプロイ - shokaiの日記 apache2のサブディレクトリをmongrelで起…
geophoto.kmlから、前記事で作ったlocalhostで動いてるRailsに保存してあるflickrのgeotag写真を緯度経度で検索してさらにkmlを読み出している。 http://earth.google.co.jp/kml/kml_tags_21.html をローカルに保存してあって嬉しかったのでバスの中で作った…
成田帰りのバスで作った。 前ので4万件でwebricが固まったので、ちょっと考え直した。file://localhost/opt/local/lib/ruby/gems/1.8/doc/activerecord-2.0.2/rdoc/classes/ActiveRecord/Base.html を読むなどして ActiveRecord::Base.find_by_sql を使って…
4万枚kml出力は無理すぎ
railsで。飛行機の中で暇だったので作った。dbのmigrate class CreatePhotos < ActiveRecord::Migration def self.up create_table :photos do |t| t.column :photo_id, :string, :limit => 20, :null => false t.column :title, :string, :limit => 30, :nu…