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
| #include <stdbool.h> | |
| #include <avr/io.h> | |
| #include <stdlib.h> | |
| #include <avr/pgmspace.h> | |
| #include "kernel/uzebox.h" | |
| #include "data/fonts.pic.inc" | |
| #define WIDTH 39 | |
| #define HEIGHT 27 |
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 'rubygems' | |
| require 'raspell' | |
| class RdocSpellchecker | |
| attr_accessor :badwords | |
| def initialize | |
| @sp = Aspell.new("en") | |
| @sp.set_option("ignore-case","true") | |
| end | |
| def check(dirry) |
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
| irb(main):001:0> Infinity = 1/0.0 | |
| => Infinity | |
| irb(main):002:0> Infinity.to_s | |
| => "Infinity" | |
| irb(main):003:0> class<<Infinity | |
| irb(main):004:1> def to_s | |
| irb(main):005:2> '' | |
| irb(main):006:2> end | |
| irb(main):007:1> end | |
| TypeError: can't define singleton method "to_s" for Float |
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 Foo < Shoes | |
| url '/', :index | |
| url '/bar', :bar | |
| url '/two', :two | |
| def index | |
| clear | |
| para "hello from Foo" | |
| para(link("/", :click => "/")) | |
| para(link("/bar", :click => "/bar")) |
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
| name' do | |
| - @racer.name = "Evan F" | |
| - diff --git a/test/racer_test.rb b/test/racer_test.rb | |
| index 757e79c..ca54e16 100644 | |
| --- a/test/racer_test.rb | |
| +++ b/test/racer_test.rb | |
| @@ -1,25 +1,17 @@ | |
| require 'lib/setup.rb' | |
| -require 'bacon' | |
| +require 'protest' |
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 'rubygems' | |
| require 'dm-core' | |
| DataMapper.setup(:default, 'sqlite3::memory:') | |
| class Tournament | |
| include DataMapper::Resource | |
| property :id, Serial | |
| has n, :races | |
| has n, :tournament_participations | |
| has n, :racers, :through => :tournament_participations, :mutable => 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
| # Using code to match non-free fonts to free fonts. | |
| # (Delicious won, by the way). | |
| fontslist =[] | |
| Dir.glob('media/fonts/*').each do |f| | |
| fontslist << font(f) | |
| end | |
| font('media/AvenirLTStd-Black.otf') | |
| Shoes.app do | |
| stack do |
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
| #one | |
| button $i18n.save do | |
| if((tournament.racers-[racer]).any? { |r| racer.name == r.name }) | |
| alert("Racer is already in this event.") | |
| elsif racer.name.blank? | |
| alert "Sorry, name is required." | |
| elsif old_racer = Racer.filter(:name => racer.name).exclude(:id => racer.pk).any? | |
| create_old_racer(old_racer, new_racer, tournament) | |
| visit "/races/#{race_id}/edit" | |
| else |
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
| (while true | |
| (if (< 0 (. input-stream available)) | |
| (print (char (.read input-stream))) | |
| (Thread/sleep 10) | |
| ) | |
| ) |
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
| (import '(org.eclipse.swt SWT)) | |
| (import '(org.eclipse.swt.widgets Display Shell Widget)) | |
| (import '(org.eclipse.swt.graphics Font)) | |
| (import '(org.eclipse.swt.events ControlAdapter)) | |
| (import '(org.eclipse.swt.custom StyleRange StyledText VerifyKeyListener)) | |
| (def *display* (new Display)) | |
| (def *shell* (new Shell *display*)) | |
| (def *repl* (new StyledText *shell* SWT/BORDER)) | |