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
$ -> | |
$('div.client_selector select#project_client_id') | |
.change -> | |
if $(@).val() == "new" | |
$(@).closest('div.client_selector').append '<input id="client_name" name="client[name]" size="30" type="text">' |
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 'spec_helper' | |
describe StaffplansController do | |
before(:each) do | |
@current_user = login_user | |
@company = Factory(:company) | |
@current_user.update_attributes(current_company_id: @company.id) | |
end | |
describe 'GET#show' do |
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
mango:Ray bertrand$ ruby test_fibers.rb | |
test_fibers.rb:38: [BUG] Bus Error | |
ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-darwin11.2.0] | |
-- control frame ---------- | |
c:0014 p:---- s:0050 b:0050 l:000049 d:000049 CFUNC :resume | |
c:0013 p:0079 s:0047 b:0046 l:002078 d:001478 BLOCK test_fibers.rb:38 | |
c:0012 p:---- s:0044 b:0044 l:000043 d:000043 FINISH | |
c:0011 p:---- s:0042 b:0042 l:000041 d:000041 CFUNC :instance_exec | |
c:0010 p:0024 s:0039 b:0039 l:000038 d:000038 METHOD /Users/bertrand/.rvm/gems/ruby-1.9.2-p180/gems/ray-0.2.0/lib/ray/scene.rb:114 |
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 'rubygems' | |
require 'sinatra' | |
get '/' do | |
erb :index | |
end | |
get %r{/(services|faq|about).php} do | |
erb params[:captures].first.to_sym | |
end |
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
#include <stdio.h> | |
#include <stdlib.h> | |
struct node{ | |
void* data; | |
struct node* next; | |
}; | |
void set_int_value(struct node* node, int val) | |
{ |
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
ruby-1.9.2-p180 :002 > test_extractor | |
=> {:emails=>[#<AccountEmailAddress id: 114, account_id: nil, email_address: " [email protected]", email_type: "personal", created_at: "2011-08-15 20:19:22", updated_at: "2011-08-15 20:19:22">], :addresses=>{:origin=>#<Address id: 226, addressable_id: nil, addressable_type: nil, street_1: nil, street_2: nil, city: "Randolph", state: "Massachusetts", zip_code: "02368", floor: nil, latitude: nil, longitude: nil, status: "unverified", created_at: "2011-08-15 20:19:22", updated_at: "2011-08-15 20:19:22">}, :phones=>[#<AccountPhoneNumber id: 208, account_id: nil, number: "7322368849", phone_type: "home", created_at: "2011-08-15 20:19:22", updated_at: "2011-08-15 20:19:22">, #<AccountPhoneNumber id: nil, account_id: nil, number: nil, phone_type: "work", created_at: nil, updated_at: nil>], :first_name=>"Christine", :last_name=>"Langer", :contact_preference=>"No Preference Any Time", :move_date=>Thu, 06 Jan 2011, :move_weight=>"1 Bedroom, 2940 lbs"} | |
ruby-1.9.2-p180 :003 > ap _ |
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
TAILLE DU TABLEAU D'EMAILS: 40 | |
EMAIL NUMERO 1 ==> ["Name: Christine Langer", "Current Zip code: 02368", "Home Phone: 732-236-8849", "Work Phone: --", "Email: [email protected]", "Contact Preference: No Preference Any Time", "Move Date: 6/1/2011", "Move Weight: 1 Bedroom, 2940 lbs", "Origin: Randolph, Massachusetts 02368", "Destination: Old Bridge, New Jersey ", "Requests and Comments: ", "Date Submitted: 5/27/2011 4:38:11 PM", "search for: Residential Movers", "to the following url http://www.123movers.com/companyflaglead.aspx?cid=679%3E&qid=%3C96%3B%3A9%3A&se=&type=rt%7Bnsl or calling us at 201 944 5900."] | |
EMAIL NUMERO 2 ==> [" Move Info:\t", " City: \tCambridge\t", " State:\tMA\t", " ZipCode:\t02138\t", " City: \tReading\t", " State:\tMA\t", " ZipCode:\t01867\t", " Type: \tPartial Home\t", " Move Date:\t06/09/2011\t", " Comments:\tI need to move a large, heavy treadmill.\t", " Name:\tPatricia Sullivan\t", " Email:\[email protected]\t", " Contact Number:\tHome: 617 491 1171 Ext-\t", " Contact Preference:\ |
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 name="viewport" content="initial-scale=1.0, user-scalable=no" /> | |
<style type="text/css"> | |
html { height: 100% } | |
body { height: 100%; margin: 0px; padding: 0px } | |
#map_canvas { height: 100% } | |
</style> | |
<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false"></script> |
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
function initialize(){ | |
with(google.maps){ | |
// Let's query the geocoding service to set the bounds for the map | |
var myOptions = { | |
zoom: 8, | |
mapTypeId: MapTypeId.ROADMAP | |
}; | |
// The actual map | |
var map = new Map(document.getElementById("map_canvas"), myOptions); |
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
module Criterion | |
@@registered = {} | |
def self.register(name, &block) | |
@@registered[name] = block | |
end | |
# Returns a boolean indicating if the user passed | |
# as a parameter satisfies the criterion |