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
218 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
271 μ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/5zDF8/src/Builtins.jl:141

PlutoUI.BuiltinsNotebook.Slider(::AbstractVector{T}; default, show_value, max_steps) where T at ~/.julia/packages/PlutoUI/5zDF8/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
10.5 μ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
155 ms
4
n
👀 Reading hidden code
15.8 μs
begin
bad_str = "Very \"cool\" <b>yo</b> & wow\""
md"""
$(@bind b Button())
$(@bind b Button(bad_str))
"""
end
👀 Reading hidden code
48.5 ms
"Very \"cool\" <b>yo</b> & wow\""
b
👀 Reading hidden code
13.7 μs
md"
$(@bind c CheckBox())
$(@bind c CheckBox(true))
$(@bind c CheckBox(default=true))
"
👀 Reading hidden code
55.9 ms
true
c
👀 Reading hidden code
11.6 μs
md"
$(@bind t TextField())
$(@bind t TextField(default=bad_str))
$(@bind t TextField((3,3)))
"
👀 Reading hidden code
62.9 ms
""
t
👀 Reading hidden code
13.2 μ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
275 ms
"c"
se
👀 Reading hidden code
14.7 μ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
60.9 ms
1
cl
👀 Reading hidden code
10.6 μ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
---