I hereby claim:
- I am mikehearn on github.
- I am hearn (https://keybase.io/hearn) on keybase.
- I have a public key ASAtBlfHGFrnjtqS-telpy4tveHymEWbfRtzMnMQYgKOMgo
To claim this, I am signing this object:
package net.corda.node.internal | |
import java.time.Clock | |
import java.time.Duration | |
import java.time.Instant | |
import java.time.ZoneId | |
import kotlin.properties.ReadWriteProperty | |
import kotlin.reflect.KProperty | |
/** |
// Run like this: jjs -fx hello.js | |
load("fx:base.js"); | |
load("fx:controls.js"); | |
load("fx:graphics.js"); | |
// Set the title bar. | |
$STAGE.title = "Hello World!"; | |
// Create a button and place it in a layout that will center it. | |
var button = new Button(); | |
button.text = "Say 'Hello World'"; | |
button.onAction = function() print("Hello World!"); |
<html> | |
<head> | |
<title>Hello World!</title> | |
<style> | |
div.centered { | |
padding: 1em; | |
position: absolute; | |
top: 50%; | |
left: 50%; | |
margin-right: -50%; |
enum SortBy { | |
Featured, | |
Relevance, | |
PriceLowToHigh, | |
PriceHighToLow, | |
Reviews | |
} | |
@PermazenType | |
class AmazonSearch( |
/Library/Java/JavaVirtualMachines/jdk-9.jdk/Contents/Home/bin/jlink --list-plugins | |
List of available plugins: | |
Plugin Name: class-for-name | |
Option: --class-for-name | |
Description: Class optimization: convert Class.forName calls to constant loads. | |
Plugin Name: compress | |
Option: --compress=<0|1|2>[:filter=<pattern-list>] |
I hereby claim:
To claim this, I am signing this object:
import java.io.File | |
import kotlin.system.measureTimeMillis | |
fun main(args: Array<String>) { | |
val name = if (args.size > 1) args[0] else "/usr/share/dict/words" | |
val time = measureTimeMillis { | |
repeat(200) { | |
go(name) | |
} |
open class LinearVal<T>(private val _v: T) { | |
open operator fun invoke(): T { | |
return _v | |
} | |
inline fun move(): LinearVal<T> { | |
if (this !is UnavailableLinearVal) | |
throw AssertionError() | |
@Suppress("DEPRECATION") | |
return __dupe() |
class ThreadBox<T>(private val data: T) { | |
synchronized fun use<R>(block: (T) -> R): R = block(data) | |
synchronized fun useWith<R>(block: T.() -> R): R = data.block() | |
} | |
class UIThreadBox<T>(private val data: T) { | |
fun use(block: (T) -> Unit): Unit = if (Platform.isFxApplicationThread()) block(data) else Platform.runLater { block(data) } | |
fun useWith(block: T.() -> Unit): Unit = if (Platform.isFxApplicationThread()) data.block() else Platform.runLater { data.block() } | |
/** Does a blocking get from the UI thread - danger of deadlock if not used properly! */ |
public static class AnimatedBindInfo { | |
@Nullable public Timeline timeline; | |
public NumberBinding bindFrom; | |
public Runnable onAnimFinish; | |
} | |
public static AnimatedBindInfo animatedBind(Node node, WritableDoubleValue bindTo, NumberBinding bindFrom) { | |
bindTo.set(bindFrom.doubleValue()); // Initialise. | |
bindFrom.addListener((o, prev, cur) -> { | |
AnimatedBindInfo info = (AnimatedBindInfo) node.getUserData(); |