Skip to content

Instantly share code, notes, and snippets.

@ashigeru
ashigeru / MEMO.md
Created March 1, 2014 05:09
Headless Eclipse Plug-in Installation memo
eclipse \
  -nosplash \
  -application org.eclipse.equinox.p2.director \
  -repository <update-site-urls> \
  -installIU <install-unit-id>
  • <update-site-urls> はカンマ区切りでURLを複数指定可能
  • `` は Eclipseの Help &gt; About &gt; Installation Details の `Id` カラムの値
@ashigeru
ashigeru / memo.md
Last active December 30, 2020 14:33
Prestoソースコードリーディング#2 メモ

Presto メモ

  • presto 0.60
  • [ QueryResource , TaskResource )

環境

なんかそのまま mvn clean install eclipse:eclipse -DskipTests コマンド叩いても checkstyle で落ちたので:

mvn clean install -DskipTests
mvn eclipse:eclipse -Dcheckstyle.skip
public class InferExc {
public static void main(String[] args) /*never throw*/ {
caller(() -> { return; });
}
private static <T extends Throwable> void caller(Capture<T> c) throws T {
c.f();
}
@FunctionalInterface
public interface Capture<T extends Throwable> {
void f() throws T;
@ashigeru
ashigeru / BreakExample.java
Created January 17, 2017 01:33
break w/ target label in Java
public class BreakExample {
public static void main(String... args) {
boolean always = true;
String message;
body:
{
if (always) {
message = "OK";
// http://docs.oracle.com/javase/specs/jls/se8/html/jls-14.html#jls-14.15
break body;
@ashigeru
ashigeru / SubSubCommands.java
Created July 21, 2017 07:19
sub-sub-commands on JCommander
public class SubSubCommands {
public static void main(String[] args) {
exec("a");
exec("b");
exec("a", "c");
/*
args: [a]
program: "root a"
command: [A]
@ashigeru
ashigeru / MRC.java
Created July 26, 2017 04:29
method reference w/ capturing left terms
public class MRC {
public static void main(String[] args) {
Supplier<Integer> s = new AtomicInteger()::incrementAndGet;
System.out.println(s.get());
System.out.println(s.get());
System.out.println(s.get());
}
}
{
"notebook:close-and-shutdown": {
"command": "notebook:close-and-shutdown",
"keys": [
"Alt W"
],
"selector": ".jp-Notebook"
},
"notebook:change-cell-to-raw": {
"command": "notebook:change-cell-to-raw",