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
final String s = "He said \"Good morning\" while entering the room."; |
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.concurrent.ExecutorService; | |
import java.util.concurrent.Executors; | |
import java.util.concurrent.ThreadFactory; | |
public class ImprovedCachedThreads { | |
public static void main(String[] args) { | |
final ThreadFactory threadFactory = runnable -> { | |
final Thread thread = new Thread(runnable, "HelloWorldThread"); | |
thread.setDaemon(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.util.concurrent.ExecutorService; | |
import java.util.concurrent.Executors; | |
public class CachedThreads { | |
public static void main(String[] args) { | |
final ExecutorService executor = Executors.newCachedThreadPool(); | |
executor.submit(() -> System.out.println("Hello World")); | |
} |
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
public static VNode view(AppModel state) { | |
return Stages() | |
.children( | |
Stage() | |
.title("Left Screen") | |
.showing(state.getScreen() == Screen.LEFT) | |
.scene( | |
Scene() | |
.root( | |
StackPane() |
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
return HBox() | |
.padding(50.0) | |
.spacing(20.0) | |
.children( | |
ColorChooser() | |
.color(state.getColor(), (oldValue, newValue) -> Actions.updateColor(newValue)), | |
Region() | |
.background(state.getColor()) | |
.minWidth(100.0) | |
.minHeight(100.0) |
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
return HBox( | |
padding(50.0), | |
spacing(20.0), | |
ColorChooser( | |
color(state.getColor(), (oldValue, newValue) -> Actions.updateColor(newValue)) | |
), | |
Region( | |
background(state.getColor()), | |
minWidth(100.0), | |
minHeight(100.0) |
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
package com.netopyr.reduxfx.todo.state; | |
import javaslang.collection.Seq; | |
import org.apache.commons.lang3.builder.ToStringBuilder; | |
public final class AppModel { | |
private final String newTodoText; | |
private final Seq<TodoEntry> todos; | |
private final Filter filter; |
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
{ tagName: 'div', | |
attributes: { | |
class: 'view' | |
}, | |
children: [ | |
{ tagName: 'input', ... }, | |
{ tagName: 'label', ... }, | |
{ tagName: 'button', ... } | |
] | |
} |
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
expect(yourTests).to.be("simple"); | |
expect(javasAge).to.be.within(15, 25); | |
expect(collection).to.include(aSpecificValue); | |
expect(java).to.have.a.property("age").which.is.at.least(20); |
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 com.netopyr.javafx.ik.Bone; | |
import com.netopyr.javafx.ik.Skeleton; | |
import javafx.application.Application; | |
import javafx.scene.Scene; | |
import javafx.scene.shape.Circle; | |
import javafx.scene.shape.Ellipse; | |
import javafx.stage.Stage; | |
public class Dummy extends Application { |
NewerOlder