This file contains 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 javatest; | |
public class CovariantReturn | |
{ | |
private static class NumberNode | |
{ | |
public Number get() | |
{ | |
return 13; | |
} |
This file contains 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 com.proofpoint.dphillips.bootcamp; | |
import com.google.common.collect.ImmutableListMultimap; | |
import com.google.common.collect.ListMultimap; | |
import com.proofpoint.http.client.HttpClient; | |
import com.proofpoint.http.client.Request; | |
import com.proofpoint.http.client.RequestStats; | |
import com.proofpoint.http.client.Response; | |
import com.proofpoint.http.client.ResponseHandler; |
This file contains 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/sh | |
osascript -e 'tell application "Terminal" to activate' |
This file contains 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 jdbi.helpers; | |
import org.skife.jdbi.v2.Handle; | |
import org.skife.jdbi.v2.tweak.HandleCallback; | |
public abstract class VoidHandleCallback | |
implements HandleCallback<Void> | |
{ | |
@Override | |
public final Void withHandle(Handle handle) |
This file contains 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.acz.hive.serde; | |
import org.apache.hadoop.hive.serde2.typeinfo.ListTypeInfo; | |
import org.apache.hadoop.hive.serde2.typeinfo.MapTypeInfo; | |
import org.apache.hadoop.hive.serde2.typeinfo.PrimitiveTypeInfo; | |
import org.apache.hadoop.hive.serde2.typeinfo.StructTypeInfo; | |
import org.apache.hadoop.hive.serde2.typeinfo.TypeInfo; | |
import org.apache.hadoop.hive.serde2.typeinfo.UnionTypeInfo; | |
import java.util.List; |
This file contains 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 com.amazonaws.AmazonClientException; | |
import com.amazonaws.services.s3.AmazonS3; | |
import com.amazonaws.services.s3.model.ListObjectsRequest; | |
import com.amazonaws.services.s3.model.S3Object; | |
import com.amazonaws.services.s3.model.S3ObjectSummary; | |
import com.google.common.collect.ImmutableList; | |
import com.google.common.io.InputSupplier; | |
import java.io.IOException; | |
import java.io.InputStream; |
This file contains 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 static List<Path> listMatchingFiles(Path start, String glob) | |
throws IOException | |
{ | |
final ImmutableList.Builder<Path> list = ImmutableList.builder(); | |
final PathMatcher matcher = start.getFileSystem().getPathMatcher("glob:" + glob); | |
Files.walkFileTree(start, new SimpleFileVisitor<Path>() | |
{ | |
@Override | |
public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) | |
throws IOException |
This file contains 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
// ==UserScript== | |
// @name Latest Javadoc Redirect | |
// @match http://docs.oracle.com/javase/*/api/* | |
// ==/UserScript== | |
(function() { | |
var oldVersions = ['1.3', '1.4.2', '1.5.0', '1,5.0', '6']; | |
var newVersion = '7'; | |
var url = window.location.toString(); | |
for (var i = 0; i < oldVersions.length; i++) { |
This file contains 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 String toString() { | |
#set ($autoImportPackages = "com.google.common.base.Objects") | |
return Objects.toStringHelper(this) | |
#foreach ($member in $members) | |
.add("$member.name", $member.accessor) | |
#end | |
.toString(); | |
} |
This file contains 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 javatest; | |
import com.google.common.base.*; | |
import java.util.Arrays; | |
public enum RecursiveEnum | |
{ | |
FOO(null), | |
BAR(FOO); |