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 com.google.common.base.Joiner; | |
import javax.annotation.Nonnull; | |
import java.net.MalformedURLException; | |
import java.net.URL; | |
import java.util.List; | |
import java.util.Map; | |
import static com.google.common.base.Preconditions.checkArgument; | |
import static com.google.common.base.Preconditions.checkNotNull; |
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.SimpleDateFormat; | |
import java.util.Date; | |
import java.util.TimeZone; | |
import javax.annotation.Nonnull; | |
public class TimeZoneInfo | |
{ | |
public static void main(@Nonnull final String[] args) | |
{ | |
final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssXXX"); |
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 com.google.common.io.ByteStreams; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.io.PipedInputStream; | |
import java.io.PipedOutputStream; | |
public class PipedInputOutputStreams | |
{ | |
public static void main(String[] args) |
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
final String bytes = new String(new byte[]{0x4a,0x61,0x72,0x72,0x6f,0x64}, Charsets.UTF_8); |
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 com.vertigrated.servlet; | |
import com.google.appengine.api.ThreadManager; | |
import com.googlecode.objectify.ObjectifyFactory; | |
import com.googlecode.objectify.ObjectifyService; | |
import com.googlecode.objectify.annotation.Entity; | |
import org.reflections.Reflections; | |
import org.reflections.util.ClasspathHelper; | |
import org.reflections.util.ConfigurationBuilder; | |
import org.slf4j.Logger; |
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
#include <I2Cdev.h> | |
#include <LiquidCrystal.h> | |
#include "MPU6050_6Axis_MotionApps20.h" | |
#if I2CDEV_IMPLEMENTATION == I2CDEV_ARDUINO_WIRE | |
#include "Wire.h" | |
#endif |
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 com.stackoverflow.scanner; | |
import javax.annotation.Nonnull; | |
import java.math.BigInteger; | |
import java.net.MalformedURLException; | |
import java.net.URL; | |
import java.util.*; | |
import java.util.regex.Pattern; | |
import static java.lang.String.format; |
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 class DocumentedRuntimeExceptionExample | |
{ | |
public static void main(final String[] args) | |
{ | |
test(); | |
} | |
public static void test() throws TestFailedRuntimeException | |
{ | |
// do some stuff that may or may not throw an exception |
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 com.google.common.reflect.TypeToken; | |
@SuppressWarnings("unchecked") | |
public T get() | |
{ | |
final Class<T> entityType = (Class<T>) new TypeToken<T>(getClass()) {}.getRawType(); | |
try { return entityType.newInstance(); } | |
catch (InstantiationException | IllegalAccessException e) { throw new RuntimeException(e); } | |
} |
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
var underscore = (function(underscore){ | |
// Build several namespaces, globally... | |
var UUID = {}; | |
var Sha1 = function(str){return Sha1.hash(str, true);}; | |
var Utf8 = {}; | |
var extend = function() { | |
var options, name, src, copy, copyIsArray, clone, |