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 TableRow(col1: String, col2: String, col3: String): BaseDataComponent() { | |
var col1 by obs(col1) | |
var col2 by obs(col2) | |
var col3 by obs(col3) | |
} | |
override fun start(state: Map<String, Any>) { | |
I18n.manager = |
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
MAXIONS = 3 | |
intensite=[1000,20,30,100,1000] | |
masse=[1,2,3,4,5] | |
intensite,masse = zip(*sorted(zip(intensite,masse))[-MAXIONS:]) | |
print(intensite,masse) |
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
fun run(): arrow.core.Tuple2<IO<ResultSet>, () -> kotlin.Unit> { | |
val (localExec, cancelQuery) = fxCancellable { | |
createQueryExecutionInExternalLib(…Some query…) // returns immediately with an object that allows to abort | |
} | |
val (localResult, cancelResult) = fxCancellable { | |
localExec.bind().executequery() // Blocking task | |
} | |
return fx { localResult.bind() } toT { |
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.mnwe | |
import javafx.scene.input.KeyCombination | |
import tornadofx.* | |
class MainView: View() { | |
override val root = tabpane { | |
tab("1") { | |
button("Click me") { |
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 |
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
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
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
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
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") |