aptのパッケージで入れるかとか、ネットで調べて.vimrcをカスタマイズするとか、vimでrailsのアプリを書くには色々なやり方があると思いますが、僕はこんなやり方してます。 1.vimのインストール ubuntuの場合、インストール直後だとvim-tinyという貧弱、貧弱ゥ!!と言いたくなるようなパッケージしか入っていないため、パッケージを追加します。 $ sudo apt-get install vim-full 2.vim-rubyのインストール Contains the official Vim configuration files for the compilation, indenting, and syntax highlighting of Ruby files. If you use Vim to edit Ruby code, you want
■1 『実践Common Lisp』 ここのところオライリー・ジャパンの営業みたいなことが多かったので"本業"に戻ろう。Amazonで予約できるようになっていたことを知ったのでポチっと。 『Practical Common Lisp』(リンク先で全文(!)が読めます)の翻訳。リンク先にも「Going to be huge in Japan!」と見出しがついて: Japanese publisher Ohmsha is publishing a Japanese translation of Practical Common Lisp which should be avaliable in bookstores July 26, 2008. と書いてある。Ohmusha! 2006のJolt AwardsのBooks Technical部門でProductivity Awardを受賞してる
#include #include "libpasori.h" int main(void) { pasori *p; felica *f; uint8 d[16]; p = pasori_open(NULL); pasori_init(p); f = felica_polling(p, 0xfe00, 0, 0); felica_read_without_encryption02(f, 0x170f, 0, 0, d); printf("%d¥n", d[14]*256+d[15]); pasori_close(p); return 0;} require 'dl/import' module Pasori extend DL::Importable dlload '/usr/local/lib/libpasori.dylib' typealias 'uint8', 'unsigned
GeoRuby provides data types intended to hold data returned from PostGIS and the Spatial Extensions of MySql. The data model roughly follows the OGC Simple Features for SQL specification, although without any kind of advanced functionalities (such as geometric operators or reprojections). The library inputs and outputs EWKB, HexEWKB and EWKT. A recent version also includes input and output of
Buat lo yang gak mau ribet soal proses dan butuh kecepatan, Atm189 jadi solusi yang pas! Sistemnya dirancang simpel dengan respons cepat, jadi lo bisa fokus nikmatin tanpa harus nunggu lama. Proses Cepat Tanpa Ribet Atm189 hadir dengan alur yang praktis dan mudah dipahami. Semua proses dibuat efisien supaya lo gak perlu buang waktu untuk hal-hal yang bertele-tele. Penarikan Responsif Minim Delay D
_ Ruby on Windows 以前書影だけ張ったRuby on Windowsですが、cuzicさんから、献本していただきました。どうもありがとうございます。 Rubyist Magazine出張版 Ruby on Windows(cuzic) これは良いです。 ご存知というか、使っていると思いますが、Excelは相変わらず現役で、OLEというかCOMを使って外部プログラムから操作できるわけです。 で、副題の「Rubyで丸投げ! ルーチンワーク」が効いてくると。(「Rubyに」じゃなくて、Rubyのプログラムを作るのはこっちなので、「Rubyで」なわけですね) COM(Win32OLE)の説明としてExcel、ADO、Outlook、IE、WSH、WMI、iTunesが取り上げられていて、よくまとまっています。各章は、課題があって、その解決策としてRubyを利用したプログラムを作成し
スクリプトを書くときの最初のテンプレートをいくつかメモ スクリプトの実行 if $0 == __FILE__ # 実行 end ファイルを更新する require 'fileutils' require 'tempfile' def update(name) tf = Tempfile.new("foo") File.open(name, 'r').each do |line| # tf.puts(line) end tf.close File.rename(name, name + '.bak') FileUtils.copy_file(tf.path, name) end Excelシートを巡回する require 'win32ole' def read_sheets(file) begin excel = WIN32OLE.new('Excel.Application') excel
RubyによるWeb Scrapingライブラリの情報をまとめるためのWikiです。 HpricotHTMLを「Rubyらしく」扱うライブラリ MechanizeWebサイトへ自動でアクセスするためのライブラリ scRUBYt!DSLを使って簡単にスクレイピングを行うライブラリ feedalizerhtmlからRSSフィードを作るのに役立つライブラリ scrAPIパーサを定義することでHTMLを解析するライブラリ ウェブサイトから必要なデータを抽出すること。(Scrape = 削り取る) ライブラリによっては、受信したデータの解析だけでなくデータの送信にも対応している。 例: RSSを配信していないウェブサイトのHTMLをスクレイピングして野良RSSを作る Googleの検索結果をスクレイピングして自動でGoogle検索するスクリプトを書く ブログの投稿ページを解析して、コマンドラインから
Rails には直接関係ない小ネタをひとつ。 Excel の中身を Ruby のプログラムから参照したいことがある。これは、次のように実現できる。win32/clipboard と win32ole という2つのライブラリを使う。 require 'rubygems' require "win32/clipboard" require 'win32ole' excel = WIN32OLE.new('Excel.Application') excel.visible = false excel.displayAlerts = false excel.workbooks.open 'filename' => 'C:\test1.xls' workbook = excel.workbooks(1) sheet = workbook.sheets(1) sheet.select excel.ce
NKFでUTF-16に変換してunpackして〜とかやってもできるんですが、めんどくさいのでUnicodeライブラリを使ってみました。 "ほ".to_u[0] #=> U+307B HIRAGANA LETTER HO "ほ".to_u[0].to_i #=> 12411 0x307b.uchr.to_s #=> "ほ" $KCODE=="EUC"だとちゃんとEUCのStringを処理してくれます。 2007/6/19追記: なんかダウンロード先がリンク切れしてますね。ちょっと探した範囲だとここにあるのが同じものだと思います(未確認)。まとめてダウンロードするには wget -np -r 'http://portal.iri.columbia.edu/Production/ruby/fileupload/lib/'とか。
grat·i·cule, |ˈgratəˌkyoōl|, n. technical Navigation. a network of parallels and meridians on a map or chart. Graticule is a geocoding API for looking up address coordinates and performing distance calculations. It supports many popular APIs, including: Yahoo Google Geocoder.ca Geocoder.us PostcodeAnywhere MetaCarta There is a companion Rails plugin that makes geocoding seem like magic. Example re
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く