Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
montyvesselinov committed Mar 11, 2024
1 parent 6cc9d44 commit 1bac654
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 7 deletions.
14 changes: 8 additions & 6 deletions scripts/stipple_new.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Stipple

@Stipple.vars Name begin
name::R{String} = "World!"
name::Stipple.R{String} = "World!"
end

function ui()
Expand All @@ -19,10 +19,12 @@ function ui()
end

Stipple.route("/") do
global model
model = Name
Stipple.init(model)
Stipple.html(Stipple.page(model, ui()))
# global model
# model = Stipple.init(Name)
# Stipple.html(Stipple.page(model, ui()))
# model = Name |> Stipple.init
# Stipple.page(model, ui()) |> Stipple.html
Stipple.html(Stipple.page(Stipple.init(Name), ui()))
end

up()
Stipple.up()
41 changes: 41 additions & 0 deletions scripts/stipple_newer.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import Stipple
import StippleUI

@Stipple.vars Inverter begin
process::Bool = false
input::String = ""
# you can explicitly define the type of the variable
output::String = ""
images_filename::Vector{String} = []
end

function handlers(model)
Stipple.on(model.input) do input
model.output[] = reverse(input)
end
Stipple.onbutton(model.process) do
model.output[] = reverse(model.output)
end
return model
end

function ui()
Stipple.row(Stipple.cell(class = "st-module", [
StippleUI.textfield(class = "q-my-md", "Input", :input, hint = "Please enter some words", @Stipple.on("keyup.enter", "process = true"))

StippleUI.btn(class = "q-my-md", "Action!", @Stipple.click(:process), color = "primary")

StippleUI.card(class = "q-my-md", [
StippleUI.card_section(Stipple.h2("Output"))
StippleUI.card_section("Variant 1: {{ output }}")
StippleUI.card_section(["Variant 2: ", Stipple.span(class = "text-red", @Stipple.text(:output))])
])
]))
end

Stipple.route("/") do
model = Inverter |> Stipple.init |> handlers
Stipple.page(model, ui()) |> Stipple.html
end

Stipple.up()
1 change: 0 additions & 1 deletion src/MadsSensitivityAnalysis.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1517,7 +1517,6 @@ function efast(md::AbstractDict; N::Integer=100, M::Integer=6, gamma::Number=4,
if load
rootname = Mads.getmadsrootname(md)
filename = "$(rootname)-efast-$(Ns_total).jld2"
@show filename
if isfile(filename)
flag_bad_data = false
efast_results = JLD2.load(filename, "efast_results")
Expand Down

0 comments on commit 1bac654

Please sign in to comment.