Welcome to the Live docs! Keep this little window open while you work on the notebook, and you will get documentation of everything you type!
You can also type a query above.
Still stuck? Here are some tips.
",loading:!1}),c=e=>l(se((t=>e(t))));r.useEffect((()=>{s.loading||(null==t||/[^\s]/.test(t))&&s.searched_query!==t&&d(t)}),[t,s.loading,s.searched_query]),r.useLayoutEffect((()=>{e&&i.current&&(i.current.focus({preventScroll:!0}),i.current.select())}),[e,i.current]);let d=e=>{c((t=>{t.loading=!0,t.searched_query=e})),Promise.race([on.default.Promises.delay(2e3,!1),a.send("docs",{query:e.replace(/^\?/,"")},{notebook_id:o.notebook_id}).then((t=>"⌛"!==t.message.status&&("👍"===t.message.status?(c((n=>{n.shown_query=e,n.body=t.message.doc})),!0):void 0)))]).then((()=>{c((e=>{e.loading=!1}))}))},u=r.useMemo((()=>r.html`<${Si} body=${sn(s.body)} />`),[s.body]),p=!1===s.loading&&""!==s.searched_query&&s.searched_query!==s.shown_query;return r.html` +${s.shown_query}
Syntax error
${e}
`))},s=[{pattern:/syntax: extra token after end of expression/,display:e=>{const t=r.html`{e.preventDefault(),a.wrap_remote_cell(n,"begin")}} + >Wrap all code in a begin ... end block.`;if(e.includes("\n\nBoundaries: ")){const o=JSON.parse(e.split("\n\nBoundaries: ")[1]).map((e=>e-1)),i=r.html`+ {e.preventDefault(),a.split_remote_cell(n,o,!0)}} + >Split this cell into ${o.length} cells, or +
`;return r.html`Multiple expressions in one cell.
+How would you like to fix it?
+Multiple expressions in one cell.
+${t}
`}},{pattern:/LoadError: cannot assign a value to variable workspace#\d+\..+ from module workspace#\d+/,display:()=>r.html`Tried to reevaluate an include
call, this is not supported. You might need to restart this notebook from the main menu.
+ For a workaround, use the alternative version of include
described here:
+ GH issue 115
+
In the future, include
will be deprecated, and this will be the default.
${e}
`))},{pattern:/Cyclic references among (.*)\./,display:e=>e.split("\n").map((e=>{const t=e.match(/Cyclic references among (.*)\./);if(t){let e=t[1].split(/, | and /).map((e=>r.html`${e}`));return r.html`Cyclic references among${" "}${ma(e)}.
`}return r.html`${e}
`}))},{pattern:/Multiple definitions for (.*)\./,display:e=>e.split("\n").map((e=>{const t=e.match(/Multiple definitions for (.*)\./);if(t){let e=t[1].split(/, | and /).map((e=>r.html`{const o=document.querySelector(`pluto-cell:not([id='${n}']) span[id='${encodeURI(e)}']`);t.preventDefault(),null==o||o.scrollIntoView()}}>${e}`));return r.html`Multiple definitions for${" "}${ma(e)}.
`}return r.html`${e}
`}))},{pattern:/^syntax: (.*)$/,display:i.display,show_stacktrace:()=>!1},{pattern:/^UndefVarError: (.*) not defined\.?$/,display:e=>{const t=a.get_notebook(),o=fa(t,n),i=e.match(/UndefVarError: (.*) not defined/);let s=(null==i?void 0:i[1])??"";const l=Object.values((null==t?void 0:t.cell_dependencies)??{}).some((e=>Object.keys(e.downstream_cells_map).includes(s)));if(0===Object.keys(o).length||!l)return r.html`${e}
`;const c=Object.keys(o).map((e=>r.html`{t.preventDefault();const n=document.querySelector(`pluto-cell[id='${o[e]}']`);null==n||n.scrollIntoView()}}>${e}`));return r.html`Another cell defining ${ma(c)} contains errors.
`},show_stacktrace:()=>{const e=fa(a.get_notebook(),n);return 0===Object.keys(e).length}},i],l=s.find((({pattern:t})=>t.test(e)))??i;return r.html`${t}`;case"application/vnd.pluto.tree+object":return r.html`<${wa} cell_id=${n} body=${t} persist_js_state=${o} />`;default:return bi({mime:e,body:t,cell_id:n,persist_js_state:o,last_run_timestamp:null})}},ba=({on_click_more:e})=>{const[t,n]=r.useState(!1);return r.html`
+ ${"To be able to edit code and run cells, you need to run the notebook yourself. "} + Where would you like to run the notebook? +
+ ${null==u?null:r.html`+ 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. +
+(Recommended if you want to store your changes.)
+ `:null} ++ ${"(Also see: "} + How to install Julia and Pluto) +
+ +Type the saved filename in the open box.
+ + `:r.html` +A new server was started - this notebook session is no longer running.
+Would you like to go back to the main menu?
+The latest versions of Firefox and Chrome will work best.