To be able to edit code and run cells, you need to run the notebook yourself. Where would you like to run the notebook?

This notebook takes about 20 seconds to run.

In the cloud (experimental)

Binder is a free, open source service that runs scientific notebooks in the cloud! It will take a while, usually 2-7 minutes to get a session.

On your computer

(Recommended if you want to store your changes.)

  1. Copy the notebook URL:
  2. Run Pluto

    (Also see: How to install Julia and Pluto)

  3. Paste URL in the Open box

Frontmatter

If you are publishing this notebook on the web, you can set the parameters below to provide HTML metadata. This is useful for search engines and social media.

Author 1
👀 Reading hidden code
using PlutoUI
195 ms

Note: you are not supposed to bind to the same variable multiple times - this might not be supported in the future.

👀 Reading hidden code
260 μs
Error message

MethodError: no method matching PlutoUI.BuiltinsNotebook.Slider(::UnitRange{Int64}, ::Int64)

Closest candidates are:

PlutoUI.BuiltinsNotebook.Slider(::AbstractVector{T}, ::T, ::Bool) where T at ~/.julia/packages/PlutoUI/hjutS/src/Builtins.jl:141

PlutoUI.BuiltinsNotebook.Slider(::AbstractVector{T}; default, show_value, max_steps) where T at ~/.julia/packages/PlutoUI/hjutS/src/Builtins.jl:158

Stack trace

Here is what happened, the most recent locations are first:

  1. macro expansion
  2. Show more...
👀 Reading hidden code
md"
$(@bind s Slider(1:10))
$(@bind s Slider(1:10,4))
$(@bind s Slider(1:10,default=11))
$(@bind s Slider(1:0.01:10,4))
"
---
1
👀 Reading hidden code
8.9 μs
md"
$(@bind n NumberField(1:10))
$(@bind n NumberField(1:10,4))
$(@bind n NumberField(1:10,default=11))
$(@bind n NumberField(1:0.01:10,4))
"
👀 Reading hidden code
124 ms
4
n
👀 Reading hidden code
9.4 μs
begin
bad_str = "Very \"cool\" <b>yo</b> & wow\""
md"""
$(@bind b Button())
$(@bind b Button(bad_str))
"""
end
👀 Reading hidden code
42.1 ms
"Very \"cool\" <b>yo</b> & wow\""
b
👀 Reading hidden code
8.9 μs
md"
$(@bind c CheckBox())
$(@bind c CheckBox(true))
$(@bind c CheckBox(default=true))
"
👀 Reading hidden code
46.3 ms
true
c
👀 Reading hidden code
9.0 μs
md"
$(@bind t TextField())
$(@bind t TextField(default=bad_str))
$(@bind t TextField((3,3)))
"
👀 Reading hidden code
52.6 ms
""
t
👀 Reading hidden code
8.6 μs
begin
eq = md"$\frac{\pi^2}{6}$"
img = md"![dogs](https://external-content.duckduckgo.com/iu/?u=http%3A%2F%2Fgraphics.wsj.com%2Fmost-popular-dogs%2Fphoto%2FGolden-Retriever.png&f=1&nofb=1)"
md"""
$(@bind se Select(["a","b"]))
$(@bind se Select(["c" => 123, "d" => eq, "e" => img]))
"""
end
# (this shouldn't actually show the image/equation unfortunately)
👀 Reading hidden code
221 ms
"c"
se
👀 Reading hidden code
9.6 μs
image/svg+xml image/svg+xml image/svg+xml speed: image/svg+xml image/svg+xml image/svg+xml speed: image/svg+xml image/svg+xml image/svg+xml speed:
md"
$(@bind cl Clock())
$(@bind cl Clock(20.0))
$(@bind cl Clock(5.0, true))
"
👀 Reading hidden code
49.9 ms
1
cl
👀 Reading hidden code
9.1 μs
Error message

UndefVarError: @js_str not defined

Stack trace

Here is what happened, the most recent locations are first:

  1. from :0
  2. #macroexpand#51
  3. macroexpand
js""
👀 Reading hidden code
---