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 30 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
@bind nasdasd Slider(0:2000)
366 ms
👀 Reading hidden code
"<div style='height: $(n)px'></div>" |> HTML
2.0 ms
👀 Reading hidden code
@bind n Slider(0:2000)
665 μs
👀 Reading hidden code
[1,2,1:5,6]
29.6 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
You got this!
ap |> sqrt
👀 Reading hidden code
---
-1
ap = -1
👀 Reading hidden code
12.1 μs
@bind oo Slider(1:10000)
👀 Reading hidden code
703 μs
1
sleep(.5); oo
👀 Reading hidden code
502 ms
begin
using Images
using PlutoUI
end
👀 Reading hidden code
6.1 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
38.4 ms
data = let
go
rand(100)
end
👀 Reading hidden code
20.4 μs
50.13485342222733
sum(data)
👀 Reading hidden code
12.7 μs
throwto (generic function with 1 method)
Base.throwto
👀 Reading hidden code
13.6 μs
Docs.keywords
👀 Reading hidden code
15.2 μs

asdf

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

return d3
</script>"""
👀 Reading hidden code
118 μ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.3 ms
"a/b"
begin
m=MIME("a/b")
string(m)
end
👀 Reading hidden code
16.1 ms
@bind x Slider(0:0.01:1)
👀 Reading hidden code
133 ms