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 java.lang.reflect.Method; | |
import java.text.DateFormatSymbols; | |
import java.util.Arrays; | |
import java.util.Locale; | |
public final class TimeZoneNames { | |
public static void main(final String[] args) throws Exception { | |
final String[][] internal = getInternalZoneStrings(); | |
final String[][] standard = getStandardZoneStrings(); | |
System.out.printf("%d : %d\n", internal.length, standard.length); |
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 java.lang.reflect.Method; | |
import java.util.Arrays; | |
import java.util.Locale; | |
public final class TimeZoneNames { | |
public static void main(final String[] args) throws Exception { | |
for (final String[] e : getZoneStrings()) { | |
System.out.println(String.join(", ", Arrays.asList(e))); | |
} | |
} |
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 java.util.Random; | |
import sun.misc.Unsafe; | |
import sun.nio.ch.DirectBuffer; | |
import java.lang.reflect.Field; | |
import java.nio.ByteBuffer; | |
import java.io.File; | |
import java.io.FileOutputStream; | |
import java.io.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
*~ | |
/.gradle/ | |
/build/ |
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
#!/usr/bin/env python3 | |
import datetime | |
import os | |
import re | |
import subprocess | |
import sys | |
def retag(tag): | |
cat_file = subprocess.run(["git", "cat-file", "-p", "v" + tag], capture_output=True) |
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 java.time.DateTimeException; | |
import java.time.Instant; | |
import java.time.OffsetDateTime; | |
import java.time.ZoneId; | |
import java.time.ZoneOffset; | |
import java.util.ArrayList; | |
import java.util.Collections; | |
import java.util.Date; | |
import java.util.HashSet; | |
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 java.time.Instant; | |
import java.time.OffsetDateTime; | |
import java.time.ZoneId; | |
import java.time.ZoneOffset; | |
import java.time.ZonedDateTime; | |
import org.joda.time.DateTimeZone; | |
public class ConvertLocalUTC { | |
public static void main(final String[] args) { | |
convertUTCToLocal(); |
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 java.io.File; | |
import java.io.IOException; | |
import java.nio.file.Files; | |
import java.nio.file.Path; | |
import java.nio.file.Paths; | |
public class FileFiles { | |
public static void main(final String[] args) throws IOException { | |
final File ofFile = File.createTempFile("fooA/barA", ".tmp", new File("/tmp")); | |
System.out.println(ofFile.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
import java.lang.reflect.Constructor; | |
import java.lang.reflect.InvocationTargetException; | |
public class IndirectConstructor { | |
public static <T> T create( | |
final ClassLoader classLoader, | |
final Class<T> parentClazz, | |
final String childClassName) { | |
try { | |
return createRaw(classLoader, parentClazz, childClassName); |
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 java.io.File; | |
import java.io.IOException; | |
import java.net.URI; | |
import java.net.URISyntaxException; | |
import java.nio.file.Files; | |
import java.nio.file.Path; | |
import java.nio.file.Paths; | |
public class Selfupdate { | |
public static void main(final String[] args) throws URISyntaxException, IOException { |