This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'net/http' | |
| urls = %w( | |
| http://irvsrdves3.flight.yellowpages.com:8080/smm/ypc?field=city_state_business&imei=353763.01541827.6&grammar=/data1/lm/test.lm | |
| http://research.yellowpages.com:8080/smm/ypc?field=city_state_business&imei=353763.01541827.6&grammar=/data1/lm/test.lm | |
| ) | |
| urls.each { |url| | |
| puts url | |
| uri = URI.parse url |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ; A thing: | |
| 'a | |
| ; Some things: | |
| '*b | |
| ; A thing with criteria: | |
| '(int? c) | |
| ; Some things with criteria: | |
| '(int? *d) | |
| ; At least x things, no more than y things: | |
| '(true *f (x y)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module MyLayout | |
| def show(&b) | |
| doctype | |
| html { | |
| head { | |
| link :rel => 'stylesheet', :href => '/stylesheets/site.css' | |
| script :src => '/js/jquery.js' | |
| } | |
| body(:onload => 'return true;') { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Trivial < Hoshi::View :html4 | |
| def show | |
| doctype | |
| html { | |
| head { | |
| title "Hello, world!" | |
| link :rel => 'stylesheet', :href => '/css/hoshi.css' | |
| } | |
| body { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/bin/waves b/bin/waves | |
| index 3b5d1ec..f94694a 100755 | |
| --- a/bin/waves | |
| +++ b/bin/waves | |
| @@ -9,14 +9,21 @@ WAVES = "#{File.dirname(__FILE__)}/.." unless defined? WAVES | |
| waves = [ | |
| WAVES, ENV['WAVES'], './waves' | |
| -].compact.map { |dir| File.join(dir, 'lib') }.find( &File.method( :directory? ) | |
| +].compact.map { |dir| File.join(dir, 'lib') }.find { |d| |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'hoshi' | |
| class Vizziew < Hoshi::View(:html4) | |
| def almost_blank_page | |
| doc { | |
| head { title "test" } | |
| body { h1 "test" } | |
| } | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def require(lib) | |
| @paths ||= [] | |
| return false if @paths.include?(lib) | |
| $:.each { |path| | |
| ['','.rb','.so'].each { |ext| | |
| l = "#{path}/#{lib}#{ext}" | |
| if File.exist?(l) | |
| @paths << l | |
| load l | |
| return true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'hoshi' | |
| module ClaudeHw | |
| module Resources | |
| class UsesHoshi < Default | |
| on(:get, true) { | |
| Hoshi::View(:html4) { | |
| doc { | |
| head { title "Hello, World!" } | |
| body { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| roboto-repl > (def l (*a (id *b 3) *c) (list a b c)) | |
| (lambda (*a (id *b 3) *c) (list a b c)) | |
| roboto-repl > (l nil nil nil 5 6 7 8 nil nil) | |
| ((() () () 5) (6 7 8) (() ())) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| rake test | |
| (in /home/pete/proj/waves) | |
| /usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake/gempackagetask.rb:13:Warning: Gem::manage_gems is deprecated and will be removed on or after March 2009. | |
| Matching The Accepts Header | |
| - Match an implied accept header using the file extension | |
| - Match against an array of options | |
| - Match against a Mime type (rather than subtype) | |
| Matching Request Methods | |
| - Match the 'get' method |
OlderNewer