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 3 minutes 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
@bind nasdasd Slider(0:2000)
386 ms
👀 Reading hidden code
"<div style='height: $(n)px'></div>" |> HTML
2.2 ms
👀 Reading hidden code
@bind n Slider(0:2000)
718 μs
👀 Reading hidden code
[1,2,1:5,6]
30.8 ms
Error message

DomainError with -1.0:

sqrt will only return a complex result if called with a complex argument. Try sqrt(Complex(x)).

Stack trace

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

  1. throw_complex_domainerror(f::Symbol, x::Float64)
    from math.jl:33
  2. sqrt
  3. sqrt
  4. |>(x::Int64, f::typeof(sqrt))
  5. ap |> sqrt
ap |> sqrt
👀 Reading hidden code
---
-1
ap = -1
👀 Reading hidden code
11.0 μs
@bind oo Slider(1:10000)
👀 Reading hidden code
653 μs
1
sleep(.5); oo
👀 Reading hidden code
502 ms
begin
using Images
using PlutoUI
end
👀 Reading hidden code
92.8 s
Error message

Multiple expressions in one cell.

How would you like to fix it?

1
2
👀 Reading hidden code
---
Error message

DomainError with -1.0:

sqrt will only return a complex result if called with a complex argument. Try sqrt(Complex(x)).

Stack trace

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

  1. throw_complex_domainerror(f::Symbol, x::Float64)
    from math.jl:33
  2. sqrt
  3. sqrt(x::Int64)
  4. sqrt(-1)
sqrt(-1)
👀 Reading hidden code
---
@bind go Button("Go!")
👀 Reading hidden code
39.0 ms
data = let
go
rand(100)
end
👀 Reading hidden code
21.0 μs
52.51125667643765
sum(data)
👀 Reading hidden code
16.0 μs
throwto (generic function with 1 method)
Base.throwto
👀 Reading hidden code
12.5 μs
Docs.keywords
👀 Reading hidden code
13.6 μs

asdf

md"# asdf"
👀 Reading hidden code
6.1 ms
html"""<script>
d3 = import "d3"

return d3
</script>"""
👀 Reading hidden code
126 μs
grabframe (generic function with 1 method)
function grabframe(relativeframepos)
t = relativeframepos * 2 * π
ω = 2π
c = 4.
frame = [sin(ω*t - √(x^2 + y^2)/300*c) for y in -200:399, x in -300:499]
return Gray.(frame .^ 2)
end
👀 Reading hidden code
1.8 ms
grabframe(x)
👀 Reading hidden code
10.6 ms
"a/b"
begin
m=MIME("a/b")
string(m)
end
👀 Reading hidden code
16.4 ms
@bind x Slider(0:0.01:1)
👀 Reading hidden code
138 ms