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
2011-07-26 16:47:50,809 [TP-Processor25] DEBUG facebook.FacebookController - params: [id:660, action:challenge, controller:facebook] | |
2011-07-26 16:47:50,812 [TP-Processor25] ERROR util.FacebookHelperService - Couldn't tokenize signedRequest: null | |
2011-07-26 16:47:50,813 [TP-Processor25] DEBUG facebook.FacebookController - signed request: [:] | |
2011-07-26 16:47:50,814 [TP-Processor25] DEBUG facebook.FacebookController - person: null person.id: null uid: null pid: null isPageAdmin: null |
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
List.metaClass.safeFirst = { -> delegate[0] } | |
List.metaClass.safeLast = { -> delegate.size() > 0 ? delegate[-1] : null } | |
def a = [] | |
assert null == a.safeFirst() | |
assert null == a.safeLast() | |
a += [1,2] | |
assert 1 == a.safeFirst() | |
assert 2 == a.safeLast() |
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
def dir = new File(args.length > 0 ? args[0] : "/Users/josh/Desktop/image") | |
def fps = args.length > 1 ? args[1] as int : 10 | |
def parser = new java.text.SimpleDateFormat(args.length > 2 ? args[2] : "yyyy_MM_dd_-_hh_mm_ss.SSS") | |
def formatter = new java.text.SimpleDateFormat("hh:mm:ss") | |
// find all image files and sort them by the date encoded in the filename | |
def files = [:] as TreeMap | |
dir.eachFileMatch(~/.*\.jpg/) { file -> | |
def date = parser.parse(file.name - "_UTF.jpg") | |
files[date.time] = file |
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
if (condition) | |
statement | |
else { | |
statement | |
statement | |
} |
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 Person { | |
String firstName | |
String lastName | |
transient getFullName() { "${firstName} ${lastName}" } | |
} |
NewerOlder