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 Revise
456 ms
👀 Reading hidden code
using PlutoUI
557 ms
👀 Reading hidden code
@bind x PlutoUI.PasswordField()
237 ms
""
👀 Reading hidden code
11.4 μs
👀 Reading hidden code
@bind date html"<input type='datetime-local'>"
45.9 ms
👀 Reading hidden code
@bind ddd PlutoUI.TimeField()
44.1 ms
""
👀 Reading hidden code
10.7 μs
Error message

MethodError: no method matching format(::Missing, ::String)

Closest candidates are:

format(::Any, ::Dates.Delim, ::Any, ::Any) at /opt/hostedtoolcache/julia/1.7.3/x64/share/julia/stdlib/v1.7/Dates/src/io.jl:256

format(::Any, ::Dates.DatePart{'d'}, ::Any) at /opt/hostedtoolcache/julia/1.7.3/x64/share/julia/stdlib/v1.7/Dates/src/io.jl:165

format(::Any, ::Dates.DatePart{'p'}, ::Any, ::Any) at /opt/hostedtoolcache/julia/1.7.3/x64/share/julia/stdlib/v1.7/Dates/src/io.jl:176

...

Stack trace

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

  1. Dates.format(alsodate, "Y-m-d")
Don't panic!
Dates.format(alsodate, "Y-m-d")
👀 Reading hidden code
---
missing
date
👀 Reading hidden code
9.5 μs
missing
alsodate
👀 Reading hidden code
10.9 μs
@bind alsodate html"""
<div id="asdf"></div>
<script>

const d = this.querySelector("#asdf")
d.value = new Date()
d.dispatchEvent(new CustomEvent("input"))
</script>
"""
👀 Reading hidden code
665 μs
missing
alsodate
👀 Reading hidden code
9.2 μs
Error message

bitcast: expected primitive type value for second argument

Stack trace

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

  1. reinterpret(#unused#::Type{Int64}, x::Missing)
  2. ttt = reinterpret(Int64, alsodate)[1]
ttt = reinterpret(Int64, alsodate)[1]
👀 Reading hidden code
---
using Dates
👀 Reading hidden code
150 μs
Error message

Another cell defining ttt contains errors.

Computers are hard!
Dates.DateTime(ttt)
👀 Reading hidden code
---
Error message

Another cell defining ttt contains errors.

Probably not your fault!
Dates.DateTime(1970) + Dates.Millisecond(ttt)
👀 Reading hidden code
---
1.600472743808e12
v = 1600472743808.0
👀 Reading hidden code
27.5 μs
reinterpret(UInt8, [v])
👀 Reading hidden code
4.5 ms