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 doc; | |
Document document = collection.getFirstDocument(); | |
while (document != null) { | |
// do something | |
doc = collection.getNextDocument(); | |
document.recycle(); | |
document = doc; | |
} |
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
public Product getProduct(String productId) { | |
Product product = null; | |
Asset asset = getAsset(Product.TYPE, productId); | |
if (asset != null) | |
product = new Product((ProductService) service, asset); | |
return product; | |
} |
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
public static void printPosition(double cell) { | |
int row = (int) ((cell / 9) + 1); | |
int col = (int) ((cell % 9) + 1); | |
int group = (((int) Math.ceil(row / 3.0)) * 3) - (3 - ((int) Math.ceil(col / 3.0))); | |
System.out.println(cell + " : " + row + " : " + col + " : " + group); | |
} |
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
java.lang.StackOverflowError | |
at sun.reflect.generics.parser.SignatureParser.parseFieldTypeSignature(SignatureParser.java:291) | |
at sun.reflect.generics.parser.SignatureParser.parseFieldTypeSignature(SignatureParser.java:285) | |
at sun.reflect.generics.parser.SignatureParser.parseTypeSignature(SignatureParser.java:487) | |
at sun.reflect.generics.parser.SignatureParser.parseTypeSig(SignatureParser.java:190) | |
at sun.reflect.annotation.AnnotationParser.parseSig(AnnotationParser.java:387) | |
at sun.reflect.annotation.AnnotationParser.parseAnnotation(AnnotationParser.java:200) | |
at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:88) | |
at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:70) | |
at java.lang.reflect.Constructor.declaredAnnotations(Constructor.java:630) |
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
/** | |
* Returns defined substring from left, right, leftBack, rightBack, middle, using index or delimiter. | |
* <p/> | |
* Example:<br/> | |
* <code> | |
* Stringer.from("ABCDE-12345/2016").right("-").left("/"); | |
* </code> | |
* <p/> | |
* <code> | |
* Stringer.from("ABCDE-12345/2016").middle("-", "/"); |
OlderNewer