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
| import java.text.BreakIterator; | |
| public class UnicodeTest { | |
| public static void main(String[] args) { | |
| String noel = "noe\u0308l"; | |
| System.out.println("noel=" + noel); | |
| System.out.println("Broken (java.lang.String methods):"); | |
| System.out.println("noel.length=" + noel.length()); | |
| System.out.println("noel.substring(0,3)=" + noel.substring(0, 3)); |
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
| package org.github.gist.hborders; | |
| /** | |
| To automatically configure this Shadow for all tests, create a top-level configuration file named: org.robolectric.Config.properties with the following contents: | |
| shadows=org.github.gist.hborders.Fixed895ShadowLooper | |
| */ | |
| @SuppressWarnings({"UnusedDeclaration"}) | |
| @Implements(Looper.class) |
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 A { | |
| } | |
| class B extends A { | |
| } | |
| class C extends A { | |
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
| - (AFHTTPRequestOperation *)operationForEmptyResponseRequest:(NSURLRequest*) request onComplete:(void(^)(void)) completeBlock onError:(void (^)(NSError *)) errorBlock { | |
| void (^nilObjectCompleteBlock)(id); | |
| if (complete) { | |
| void (^heapCompleteBlock)(void) = [completeBlock copy]; | |
| // INTERESTING BITS: | |
| // iOS7: this crashes in weird ways if we don't copy the block we assign to nilObjectComplete here. | |
| // it is supposed to be safe to pass a block down into another block, but maybe not. | |
| nilObjectCompleteBlock = [^(id nilObject) { | |
| heapCompleteBlock(); | |
| } copy]; |
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
| https://developers.google.com/events/io/sessions/326148829 | |
| https://developers.google.com/events/io/2012/sessions/gooio2012/106/ | |
| https://developers.google.com/events/io/2012/sessions/gooio2012/131/ | |
| https://developers.google.com/events/io/2012/sessions/gooio2012/114/ | |
| https://developers.google.com/events/io/2012/sessions/gooio2012/122/ | |
| https://developers.google.com/events/io/2012/sessions/gooio2012/103/ | |
| https://developers.google.com/events/io/2012/sessions/gooio2012/107/ | |
| https://developers.google.com/events/io/2012/sessions/gooio2012/102/ | |
| https://developers.google.com/events/io/sessions/326425499 | |
| https://sites.google.com/site/io/dalvik-vm-internals |
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
| #!/bin/bash -e | |
| # Argument = -h -v -i groupId:artifactId:version -c classifier -p packaging | |
| #shopt -o -s xtrace | |
| # Define Nexus Configuration | |
| NEXUS_BASE=http://repository.example.com:8081/nexus #this URL shouldn't end in a / | |
| REST_PATH=/service/local | |
| ART_REDIR=/artifact/maven/redirect |
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
| #!/bin/bash | |
| # Argument = -h -v -i groupId:artifactId:version -c classifier -p packaging -r repository | |
| #shopt -o -s xtrace | |
| # Define Nexus Configuration | |
| NEXUS_BASE=http://repository.example.com:8081/nexus | |
| REST_PATH=/service/local | |
| ART_REDIR=/artifact/maven/redirect |
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 Box<A> { | |
| public let value: A | |
| init(_ value: A) { self.value = value } | |
| } | |
| enum Result<A> { | |
| case Success(Box<A>) | |
| case Failure(NSError) | |
| } |
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
| private class Poller<ResultType, ErrorType: JiveError, ErrorCodeType where ErrorType.CodeType == ErrorCodeType> { | |
| private let retryInterval: NSTimeInterval | |
| private let timeoutErrorCode: ErrorCodeType | |
| private let expectation: XCTestExpectation | |
| private var state: PollerState<ResultType, ErrorType> | |
| init( | |
| createJiveFuture: () -> JiveFuture<ResultType, ErrorType>, | |
| acceptJiveResult: (JiveResult<ResultType, ErrorType>) -> JiveResult<ResultType, ErrorType>?, | |
| retryInterval: NSTimeInterval, |
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
| enum Foo { | |
| // enums can have many values, and they can be labeled | |
| case Bar( | |
| barString: String, | |
| barInt: Int) | |
| // or unlabeled | |
| case Baz( | |
| String, | |
| Int) | |
| } |