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 TryOneJar { | |
public static void main(String[] args) { | |
System.out.println("One-JAR"); | |
} | |
} |
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
# (Be in -*- mode: python; coding: utf-8 -*- mode.) | |
# | |
# ==================================================================== | |
# Copyright (c) 2006-2010 CollabNet. All rights reserved. | |
# | |
# This software is licensed as described in the file COPYING, which | |
# you should have received as part of this distribution. The terms | |
# are also available at http://subversion.tigris.org/license-1.html. | |
# If newer versions of this license are posted there, you may use a | |
# newer version instead, at your option. |
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.nio.file.Path; | |
import java.nio.file.Paths; | |
import java.util.ArrayList; | |
import java.util.Collections; | |
import java.util.List; | |
import org.eclipse.aether.RepositorySystem; | |
import org.eclipse.aether.RepositorySystemSession; | |
import org.eclipse.aether.artifact.Artifact; | |
import org.eclipse.aether.resolution.ArtifactResult; |
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 JavaLongCalc { | |
public static void main(String[] args) { | |
final long x = 50 * 1024 * 1024 * 1024; | |
final long y = 50L * 1024 * 1024 * 1024; | |
final long z = 50L * 1024L * 1024L * 1024L; | |
System.out.println(x); | |
System.out.println(y); | |
System.out.println(z); | |
} |
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.HashMap; | |
public class MapEnum { | |
public static void main(String[] args) { | |
System.out.println(OrdinalEnum.FIRST.getCardinal()); | |
System.out.println(OrdinalEnum.ofNumber(2).toString()); | |
System.out.println(OrdinalEnum.ofCardinal("three").toString()); | |
} | |
private static enum OrdinalEnum { |
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
module M | |
REAL_CONST = 'foo' | |
def self.const_missing(name) | |
if name == :MISSING_DUMMY | |
'qux' | |
else | |
super | |
end | |
end |
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.Arrays; | |
import com.vladsch.flexmark.ast.Node; | |
import com.vladsch.flexmark.ast.NodeVisitor; | |
import com.vladsch.flexmark.ast.Text; | |
import com.vladsch.flexmark.ast.VisitHandler; | |
import com.vladsch.flexmark.html.HtmlRenderer; | |
import com.vladsch.flexmark.parser.Parser; | |
import com.vladsch.flexmark.parser.ParserEmulationProfile; | |
import com.vladsch.flexmark.util.options.MutableDataHolder; |
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.vladsch.flexmark.ast.Node; | |
import com.vladsch.flexmark.html.HtmlRenderer; | |
import com.vladsch.flexmark.parser.Parser; | |
import com.vladsch.flexmark.parser.ParserEmulationProfile; | |
import com.vladsch.flexmark.util.options.MutableDataHolder; | |
import com.vladsch.flexmark.util.options.MutableDataSet; | |
public class MarkdownExamples { | |
public static void main(String[] args) { | |
System.out.println(flexmark("This is *Sparta*")); |
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 GradleFlat { | |
public static void main(String[] args) { | |
System.out.println("Hello, Gradle."); | |
} | |
} |
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
/* test.txt: | |
HTTP/1.0 200 OK | |
{} | |
*/ | |
// $ cat test.txt | sudo nc -l 80 | |
// $ javac -cp .:jetty-client-9.3.16.v20170120.jar:jetty-http-9.3.16.v20170120.jar:jetty-io-9.3.16.v20170120.jar:jetty-util-9.3.16.v20170120.jar JettyClient.java | |
// $ java -cp .:jetty-client-9.3.16.v20170120.jar:jetty-http-9.3.16.v20170120.jar:jetty-io-9.3.16.v20170120.jar:jetty-util-9.3.16.v20170120.jar JettyClient | |
import org.eclipse.jetty.client.HttpClient; |