View gist:948820
def create | |
params.each do |key,value| | |
logger.warn "Param #{key}: #{value}" | |
end | |
url_args = { :latitude => params["longitude"], :longitude => params["longitude"] } | |
logger.debug "url_args = #{url_args}" | |
@count_threshold = CountThreshold.new(url_args) |
View finalizeData => init
I also think that the finalizeData method should be replaced. | |
If both the initRenderer and finalizedData were pushed to an init method, the signature might be: | |
- (id) initWithScriptName:(NSString *) aScriptName; | |
or something like that (maybe it is initWithScriptDirectory). | |
This would as mean that the code that uses the renderer would not need to do stuff like this: |
View gist:955463
- (NSDecimalNumber *) standardDeviationWithPreviousPoints:(NSArray *) dataPoints | |
event:(CountEvent *) event { | |
NSDecimalNumber *result; | |
if ([self canComputeNonMeanStatistics:dataPoints]) { | |
NSDecimalNumber *accumulator = [NSDecimalNumber zero]; | |
NSArray *allMeans = [self arrayWithDataPoints:dataPoints event:event]; | |
NSDecimalNumber *mean = [self mean:allMeans]; | |
NSDecimalNumber *variance; |
View example.csv - lacbcbikecount--iPhoneSimulator--2011_08_20_23_37.csv
We can make this file beautiful and searchable if this error is corrected: It looks like row 3 should actually have 32 columns, instead of 30. in line 2.
count,survey_interval,north_peds,north_bikes,south_peds,south_bikes,east_peds,east_bikes,west_peds,west_bikes,bikes_wrong_way,bikes_no_helmet,bikes_sidewalk_ride,wheelchairs,bikes_female,bikes_child,bikes_ped,occurrence_date,latitude,longitude,heading,survey_start_date,survey_end_date,surveyor_name,weather,location,north_south_street,east_west_street,surveyor_id,uuid,session_uuid,soft_session_uuid | |
1,00-15,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,2011-08-20 23:37:23.582,0,0,0,2011-08-20 23:37:22.908,2011-08-20 23:37:30.850,Fake Name,Fake Weather with some False Clouds. Temp in the 36 C,Paris,Rue Michel Compte,Rue Beaubourg,lacbc.bikecount@gmail.com,C7EBC91D-B2C0-462E-98D4-BCF9B6CA04AC,590171BE-7E65-492F-8FEB-4991DEBB56F1,lacbcbikecount--iPhoneSimulator--2011_08_20_23_37 | |
2,00-15,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,2011-08-20 23:37:24.691,0,0,0,2011-08-20 23:37:22.908,2011-08-20 23:37:30.850,Fake Name,Fake Weather with some False Clouds. Temp in the 36 C,Paris,Rue Michel Compte,Rue Beaubourg,lacbc.bikecount@gmail.com,DD4E1D74-BE |
View gist:1183511
https://github.com/jmoody/AgChoice/issues/8 | |
{ | |
"aps": { | |
"alert": { | |
"loc-args": [ | |
"< commodity >", | |
"< grade >", | |
"< volume >", | |
"< delivery details >", |
View gist:1188626
This is the call: | |
{ | |
"method": "ValidateUser", | |
"params": [ | |
{ | |
"userName": "some-user", | |
"password": "some-pass" | |
} | |
], |
View gist:1199794
{"aps": {"alert": {"body": "Grain (Grade): APH1 Vol: 5,000\nDelivered Depot 20/08-31/12/11 —$188.24t", "action-loc-key": "View"}}, "aliases": ["mercury", "Jesco's iPhone"]} |
View cuke.sh
/usr/bin/osascript -e 'tell application "iPhone Simulator" to activate' | |
NO_LAUNCH=1 OS=ios5 cucumber |
View scroll-until.rb
Then /^I scroll (left|right|up|down) until I see "([^"]*)" limit (\d+)$/ do |dir,name,limit| | |
if (not element_exists("view marked:'#{name}'")) | |
count = 0 | |
begin | |
scroll("scrollView index:0", dir) | |
sleep(STEP_PAUSE) | |
count = count + 1 | |
end while ((not element_exists("view marked:'#{name}'")) and count < limit.to_i) | |
end | |
end |
View keyboard_steps.rb
def should_see_keyboard | |
res = element_exists("keyboardAutomatic") | |
unless res | |
screenshot_and_raise "Expected keyboard to be visible." | |
end | |
end | |
def should_not_see_keyboard | |
res = element_exists("keyboardAutomatic") | |
if res |
OlderNewer