Skip to content

Instantly share code, notes, and snippets.

View lalala's full-sized avatar

Per Andersen lalala

  • Stockholm, Sweden
View GitHub Profile
#define SYSTEM_VERSION_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedSame)
#define SYSTEM_VERSION_GREATER_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedDescending)
#define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending)
#define SYSTEM_VERSION_LESS_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedAscending)
#define SYSTEM_VERSION_LESS_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedDescending)
{
"id": 1,
"title": "foo",
"reviewers":
[
{
"id":1,
"email":"[email protected]"
},
{
def fizz n
eval 'return'[0..(n*6)-(101*6)-1]
s = [["Fizz"][n%3], ["Buzz"][n%5]].join
puts (s + n.to_s)[0..(s.length - 1)]
fizz n + 1
end
fizz 1