capture taken by
this captures are public domain.
@echo off | |
for /f "tokens=1-2" %%i in ('rake -T ^| peco') do ( | |
echo %%i %%j | |
%%i %%j | |
break | |
) |
@echo off | |
for /f %%i in ('dir /b ^| peco') do ( | |
cd /D %%i | |
break | |
) |
C:/Ruby193 | |
C:/Ruby193/lib |
private String calculateJRubyHome() { | |
String newJRubyHome = null; | |
// try the normal property first | |
if (!Ruby.isSecurityRestricted()) { | |
newJRubyHome = SafePropertyAccessor.getProperty("jruby.home"); | |
} | |
if (newJRubyHome != null) { | |
// verify it if it's there |
import java.io.OutputStream; | |
import java.io.Writer; | |
public class Main { | |
public static String exec(Object value) { return null; } | |
public static void exec(Object value, Appendable appendable) {} | |
public static void main(String[] args) { |
import javax.script.ScriptEngine; | |
import javax.script.ScriptEngineManager; | |
public class Js { | |
public static void main(String[] args) throws Exception { | |
ScriptEngineManager manager = new ScriptEngineManager(); | |
ScriptEngine se = manager.getEngineByExtension("js"); | |
System.out.println(se.eval("Object.freeze")); |
import java.net.InetSocketAddress; | |
import java.net.SocketAddress; | |
import java.nio.channels.SelectableChannel; | |
import java.nio.channels.SelectionKey; | |
import java.nio.channels.Selector; | |
import java.nio.channels.SocketChannel; | |
public class Main { | |
public static void main(String[] args) throws Exception { |
/** | |
* @author taichi | |
*/ | |
@FunctionalInterface | |
public interface ExceptionalFunction<T, R, EX extends Exception> { | |
R apply(T t) throws EX; | |
} |