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.util.Iterator; | |
| import com.google.common.collect.AbstractIterator; | |
| import com.google.common.collect.Iterators; | |
| /** | |
| */ | |
| public abstract class CrossProductIterator<A, B, C> extends AbstractIterator<A> { | |
| private Iterator<B> outer_; |
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.util.ArrayList; | |
| import java.util.List; | |
| public class GenericsExample { | |
| public static class CollectionWrapper<T> { | |
| private List<T> stuff; | |
| public List<T> getStuff() { | |
| return stuff; |
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 | |
| mkdir thumbs | |
| cp *.jpg thumbs | |
| perl -e 'while(<*.jpg>) { print "<a href=\"$_\"><img src=\"thumbs/$_\"></a>\n";};' > index.html | |
| mogrify -geometry 100 thumbs/*.jpg |
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
| #!/usr/bin/perl | |
| my $DEBUG=0; | |
| my %indexes = (); | |
| my %keys = (); | |
| my $last = ""; | |
| while(<>) { | |
| if (/^CREATE INDEX.*ON (\S+) USING btree \((\S+)(,.*)?\)/) { |
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 gen { | |
| Object obj; | |
| public gen(Object s) { | |
| obj = s; | |
| } | |
| T test() { | |
| return (T) obj; | |
| } | |
| } | |