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
// featurea gradle interop | |
void artifact(String artifactId, Closure projects) { | |
String artifactPath = projects() | |
File artifactDir = new File(artifactPath) | |
if (!artifactDir.exists()) throw new RuntimeException("Artifact not found: ${artifactDir.absolutePath}") | |
def includeProject = { File projectFile, String specifier = null -> | |
if (!projectFile.exists()) return | |
File projectDir = projectFile.parentFile |
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
// https://www.shadertoy.com/view/4lKXWD | |
void mainImage( out vec4 fragColor, in vec2 fragCoord ) | |
{ | |
vec2 uv = fragCoord.xy / iResolution.xy; | |
// rect boundaries | |
vec2 rectMin = vec2(0.4, 0.2); | |
vec2 rectMax = vec2(0.8, 0.8); | |
// some people prefer "min + (max - min) / 2", but for floating point UV space it |
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
package featurea | |
import kotlin.jvm.JvmOverloads | |
import kotlin.jvm.Transient | |
class PriorityQueue<E> : Queue<E> { | |
companion object { | |
private const val DEFAULT_INITIAL_CAPACITY = 11 | |
private const val MAX_ARRAY_SIZE = Int.MAX_VALUE - 8 |
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
private void artifact(String path) { | |
File artifactDir = new File(path.replaceAll(":", "")) | |
if (!artifactDir.exists()) throw new RuntimeException("Artifact not found: ${artifactDir.absolutePath}") | |
String projectName | |
if (path.contains(":")) { | |
List<String> tokens = path.split("/").toList() | |
tokens.removeIf {it.endsWith(":")} | |
projectName = tokens.join(":") | |
} else { |
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
/*featurea gradle settings*/ | |
enableFeaturePreview("GRADLE_METADATA") | |
void artifacts(Closure closure) { | |
closure.delegate = new Catalog(this, settings.rootProject.projectDir) | |
closure() | |
} | |
class Catalog { |
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
package org.controlsfx.samples.spreadsheet; | |
import javafx.collections.FXCollections; | |
import javafx.collections.ObservableList; | |
import javafx.scene.Node; | |
import javafx.stage.Stage; | |
import org.controlsfx.ControlsFXSample; | |
import org.controlsfx.control.spreadsheet.GridBase; | |
import org.controlsfx.control.spreadsheet.SpreadsheetCell; | |
import org.controlsfx.control.spreadsheet.SpreadsheetCellType; |
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.lang.Math.* | |
val t: Double = 0.0 | |
data class vec2(var x: Double = 0.0, var y: Double = 0.0) | |
open class Pixel { | |
val uv: vec2 = vec2() | |
} |
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
/* | |
unlike dependencies resources needs to be defined explicitly e. g. without any sort of inheritance | |
*/ | |
/*platform*/ | |
typealias LoaderOnSuccess = Loader.() -> Unit | |
object Loader { | |
fun load(vararg resources: List<String>, onSuccess: LoaderOnSuccess? = null) { |
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
cloc --vcs git --include-lang=Kotlin |
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
// style1.css | |
.split-pane > .split-pane-divider { | |
-fx-padding: 1; | |
} | |
// Sample.java | |
splitPane.getStylesheets().add(getClass().getResource("style1.css").toExternalForm()); |