This file contains 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
- (void)updateInterface { | |
if ([myPoly numberOfSides] > [myPoly minimumNumberOfSides]) { | |
decreaseButton.enabled = YES; | |
} | |
if ([myPoly numberOfSides] < [myPoly maximumNumberOfSides]) { | |
increaseButton.enabled = YES; | |
} | |
if ([myPoly numberOfSides] == [myPoly minimumNumberOfSides]) { | |
decreaseButton.enabled = NO; | |
} else if ([myPoly numberOfSides] == [myPoly maximumNumberOfSides]) { |
This file contains 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
/opt/local/lib/ruby/gems/1.8/gems/yard-0.2.3.3/lib/rubygems_plugin.rb:17: warning: method redefined; discarding old has_rdoc? | |
/opt/local/lib/ruby/gems/1.8/gems/yard-0.2.3.3/lib/rubygems_plugin.rb:56: warning: method redefined; discarding old setup_rdoc | |
/opt/local/lib/ruby/gems/1.8/gems/yard-0.2.3.3/lib/rubygems_plugin.rb:80: warning: discarding old install_ri | |
/opt/local/lib/ruby/gems/1.8/gems/yard-0.2.3.3/lib/rubygems_plugin.rb:91: warning: discarding old install_rdoc |
This file contains 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
$(document).ready(function(){ | |
row = 1; | |
// Add another row function. I'm not proud of this at all. | |
$("#addrow").click(function(){ | |
var fn = '<input type="text" name="data['+row+'][first_name]" value="" id="first_name'+row+'"/>'; | |
var ln = '<input type="text" name="data['+row+'][last_name]" value="" id="last_name'+row+'"/>'; | |
var em = '<input type="text" name="data['+row+'][email]" value="" id="email'+row+'"/>'; | |
var att = '<select name="data['+row+'][attending]" value="" id="attending'+row+'"><option class="attendingyes" value="1">Yes</option><option class="attendingno" value="0">No</option></select>'; | |
var rem = '<a class="removebutton" name="row'+row+'" href="#"><img src="/images/remove.png"/></a>' | |
var tr = '<tr class="extratrs" id="row'+row+'"><td>'+fn+'</td><td>'+ln+'</td><td>'+em+'</td><td>'+att+'</td><td id="removetd">'+rem+'</td></tr>'; |
This file contains 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
<form action="/rsvp" method="post" accept-charset="utf-8" id="rsvp_form" class="rsvps"> | |
<fieldset id="rsvp_fields"> | |
<table border="2" cellspacing="5" cellpadding="5" id="rsvp_table"> | |
<tr> | |
<th>First Name:</th> | |
<th>Last Name:</th> | |
<th>Email:</th> | |
<th>Attending</th> | |
<th></th> | |
</tr> |
This file contains 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 "sinatra" | |
require "dm-core" | |
require "dm-validations" | |
require "json" | |
class RSVP | |
include DataMapper::Resource | |
property :id, Serial | |
property :first_name, String, :nullable => false, :message => "first_name" | |
property :last_name, String, :nullable => false, :message => "last_name" |
This file contains 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 Array | |
def sum | |
self.inject(0) { |x,n| x+n } | |
end | |
end | |
class FairDistribution | |
attr_accessor :jobs, :queues, :presses, :fair_time, :sort_method, :try_method | |
def initialize(jobs, presses) |
This file contains 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
# MIT Licensed | |
# Author: Boxcar, http://boxcar.io | |
# | |
# requires: em-http-request, em-websocket gems. | |
# | |
# Be sure to modify the SETTINGS hash and replace it with your Boxcar email and password. | |
require 'rubygems' | |
require 'eventmachine' |
This file contains 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
#!/usr/bin/env ruby | |
# Usage: | |
# ruby parser.rb "http://www.leapfile.com" | |
require "hpricot" | |
require "open-uri" | |
page = ARGV[0] | |
if page == nil |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<style> | |
p { | |
margin: 8px; | |
font-size:16px; | |
} |
This file contains 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
Tue Nov 16 23:25:19 2010 INF: Connecting to agent-endpoint.cloudkick.com:4166 in 17.936536 seconds | |
Tue Nov 16 23:25:37 2010 CRT: Unable to connect to agent-endpoint.cloudkick.com:4166: connection refused | |
Tue Nov 16 23:25:37 2010 ERR: Connect to agent-endpoint.cloudkick.com:4166 failed: [string "helen.lua"]:80: Failed to connect to Helen |
OlderNewer