- Twitter: @adman65
- Website or Blog: http://hawkins.io
- Company: Saltside Technologies http://saltside.se
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 changeUrl = "https://commondatastorage.googleapis.com/chromium-browser-snapshots/Linux_x64/LAST_CHANGE" | |
| def latest = changeUrl.toURL().text | |
| println "Latest Revision: ${latest}" |
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 changeUrl = "https://commondatastorage.googleapis.com/chromium-browser-snapshots/Linux_x64/LAST_CHANGE" | |
| def latest = changeUrl.toURL().text | |
| println "Latest Revision: ${latest}" |
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
| /** | |
| * $(document).ready() | |
| **/ | |
| $(document).ready(function() { | |
| // Handler for .ready() called. | |
| }); | |
| $(function() { | |
| // Handler for .ready() called. | |
| }); |
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
| NSUInteger lengthA = [a length]; | |
| NSUInteger lengthB = [b length]; | |
| NSUInteger keyLength = lengthA + lengthB + 1; | |
| assert(keyLength * sizeof(unichar) < SOME_REASONABLE_MAXIMUM_FOR_STACK_ALLOCATION); | |
| unichar cat[keyLength]; | |
| [a getCharacters:cat range:NSMakeRange(0, lengthA)]; | |
| cat[lengthA] = '.'; | |
| [b getCharacters:cat + lengthA + 1 range:NSMakeRange(0, lengthB)]; | |
| NSString *key = [[NSString alloc] initWithCharactersNoCopy:cat length:keyLength freeWhenDone:NO]; | |
| ... [dict objectForKey:key]; |
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
| test("Using a real child actor") { | |
| val underTest = TestActorRef(new ParentActor(actorFactory => actorFactory.actorOf(Props[ChildActor]))) | |
| underTest ! "Go do some work" | |
| // Can't test this but shows how to crate a ParentActor in production code | |
| } |
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
| NSUInteger lengthA = [a length]; | |
| NSUInteger lengthB = [b length]; | |
| NSUInteger keyLength = lengthA + lengthB + 1; | |
| assert(keyLength * sizeof(unichar) < SOME_REASONABLE_MAXIMUM_FOR_STACK_ALLOCATION); | |
| unichar cat[keyLength]; | |
| [a getCharacters:cat range:NSMakeRange(0, lengthA)]; | |
| cat[lengthA] = '.'; | |
| [b getCharacters:cat + lengthA + 1 range:NSMakeRange(0, lengthB)]; | |
| NSString *key = [[NSString alloc] initWithCharactersNoCopy:cat length:keyLength freeWhenDone:NO]; | |
| ... [dict objectForKey:key]; |
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
| Index: llvmpy/include/llvm_binding/extra.h | |
| =================================================================== | |
| --- llvmpy/include/llvm_binding/extra.h (revision 14593) | |
| +++ llvmpy/include/llvm_binding/extra.h (revision 14594) | |
| @@ -164,6 +164,7 @@ | |
| for(; begin != end; ++begin) { | |
| PyObject* cap = pycapsule_new(&*begin, capsuleName, className); | |
| PyList_Append(list, cap); | |
| + Py_DECREF(cap); | |
| } |