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 arrow.effects.IO | |
class File(url: String) { | |
fun open(): File = this | |
fun close(): Unit {} | |
override fun toString(): String = "This file contains some interesting content!" | |
} | |
fun openFile(uri: String): IO<File> = IO { throw RuntimeException() } |
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 arrowdebug | |
import arrow.effects.extensions.io.fx.fx | |
import arrow.effects.IO | |
sealed class Error : RuntimeException() | |
object ClientInvalidQuery : Error() | |
object ClientQueryTimeout : Error() | |
object NotInTransaction : Error() |
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
java.lang.NullPointerException | |
at com.sun.javafx.text.PrismTextLayout.addTextRun(PrismTextLayout.java:755) | |
at com.sun.javafx.text.GlyphLayout.addTextRun(GlyphLayout.java:140) | |
at com.sun.javafx.text.GlyphLayout.breakRuns(GlyphLayout.java:312) | |
at com.sun.javafx.text.PrismTextLayout.buildRuns(PrismTextLayout.java:770) | |
at com.sun.javafx.text.PrismTextLayout.layout(PrismTextLayout.java:1021) | |
at com.sun.javafx.text.PrismTextLayout.ensureLayout(PrismTextLayout.java:223) | |
at com.sun.javafx.text.PrismTextLayout.getBounds(PrismTextLayout.java:246) | |
at javafx.scene.text.Text.getLogicalBounds(Text.java:358) | |
at javafx.scene.text.Text.impl_computeLayoutBounds(Text.java:1115) |
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
class QueryFragment : Fragment() { | |
val name = SimpleStringProperty("Default") | |
val error = SimpleStringProperty("Wow") | |
var query: TextArea by singleAssign() | |
var errorPane: NotificationPane by singleAssign() | |
var button: Button by singleAssign() | |
override val root = vbox { | |
form { | |
fieldset { | |
field("Name") { |
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
class ResultFragment: Fragment() { | |
var insertInQuery: MenuItem by singleAssign() | |
override val scope = super.scope as ResultsScope | |
override val root = tableview(scope.items) { | |
columnResizePolicy = TableView.CONSTRAINED_RESIZE_POLICY | |
smartResize() | |
selectionModel.isCellSelectionEnabled = true | |
contextMenu = ContextMenu().apply { | |
insertInQuery = item("Insert in queryTextArea") |
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
class Query(subject: Resource?, label: String, content: String) { | |
private val originalSubjectProperty = SimpleStringProperty(subject.toString()) | |
fun originalSubjectProperty() = originalSubjectProperty | |
var originalSubject by originalSubjectProperty | |
private val subjectProperty = SimpleStringProperty(subject.toString()) | |
fun subjectProperty() = subjectProperty | |
var subject by subjectProperty | |
private val originalLabelProperty = SimpleStringProperty(label) |
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 unittest | |
import rnaviewparser.rnaview_ast as ast | |
class TestNode(unittest.TestCase): | |
def test_repr(self): | |
node = ast.Node([]) | |
self.assertEqual(node.__repr__(), "Basic Node") | |
if __name__ == '__main__': | |
unittest.main() |
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
from enum import Enum | |
from dataclasses import dataclass, field | |
from typing import List | |
class TYPES(Enum): | |
STD = "std" | |
WW = "W/W" | |
HH = "H/H" | |
SS = "S/S" | |
WH = "W/H" |
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
override fun call(url: String, parameters: Map<String, String>): IO<String> = | |
fx { | |
effect { calcDelay() } | |
val call: HttpClientCall = effect { | |
httpClient.call("$apiURL/$url") { | |
method = HttpMethod.Get | |
parameters.forEach { k, v -> parameter(k, v) } | |
} | |
} | |
effect { |
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 net.nprod.failuretable | |
import javafx.beans.property.SimpleListProperty | |
import javafx.beans.property.SimpleObjectProperty | |
import javafx.scene.control.TableView | |
import javafx.scene.paint.Color | |
import javafx.stage.Stage | |
import tornadofx.* | |
import java.time.LocalDate | |
import java.time.Period |