-
-
Notifications
You must be signed in to change notification settings - Fork 285
/
test1.jl
822 lines (626 loc) ยท 29 KB
/
test1.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
### A Pluto.jl notebook ###
# v0.17.5
using Markdown
using InteractiveUtils
# This Pluto notebook uses @bind for interactivity. When running this notebook outside of Pluto, the following 'mock version' of @bind gives bound variables a default value (instead of an error).
macro bind(def, element)
quote
local iv = try Base.loaded_modules[Base.PkgId(Base.UUID("6e696c72-6542-2067-7265-42206c756150"), "AbstractPlutoDingetjes")].Bonds.initial_value catch; b -> missing; end
local el = $(esc(element))
global $(esc(def)) = Core.applicable(Base.get, el) ? Base.get(el) : iv(el)
el
end
end
# โโโก 878a4750-b15e-11ea-2584-8feba490699f
using Test
# โโโก fd0763a0-b163-11ea-23b4-a7bae7052e19
md"# File picker"
# โโโก 592d3ac0-b15e-11ea-313c-db05bc7303cc
md"# Notebook interaction"
# โโโก 6dde0352-b15e-11ea-2fa8-7327cc366c1a
md"## Running multiple cells"
# โโโก 7370dcc0-b15e-11ea-234b-23584c864b61
ma = 1
# โโโก 75b21a30-b15e-11ea-3046-2170ec097e63
mb = 2
# โโโก 7b74dd40-b15e-11ea-291a-d7e10a185718
@test ma + mb == 3
# โโโก f0b821b0-b15f-11ea-1f64-dd33aa85b54e
md"## Moving cells"
# โโโก 4980fc10-b163-11ea-081b-c1335699a8f6
md"## Stopping cells"
# โโโก d2c1d090-b162-11ea-0c17-2b234c098cf9
md"# CodeMirror"
# โโโก bc5bf64e-8b47-45ac-baf2-3cbb8e35d916
"""
Some sample code from https://juliamono.netlify.app/
"""
function T(๐::AbstractArray,
๐::Tuple{AbstractArray,
Vararg{AbstractArray}},
๐::Tuple{AbstractArray, Vararg{AbstractArray}})
โ = kron
l = length(๐)
๐โ = SMatrix{l,l}(1.0I)
๐โ = SMatrix{1,1}(1.0I)
๐ = @SMatrix zeros(l,l)
N = length(๐[1])
โณ, โณสน = ๐
ฮโ, ฮโ = ๐
๐ฒโ = @MMatrix zeros(4,4)
๐โ = @SMatrix [1.0; 0.0; 0.0]
๐โ = @SMatrix [0.0; 1.0; 0.0]
for n = 1:N
index = SVector(1,2)
๐ฒโ[1:2,1:2] .= ฮโ[n][index,index]
๐ฒโ[3:4,3:4] .= ฮโ[n][index,index]
๐ฆ = hom(โณ[n])
๐ฆสน = hom(โณสน[n])
๐โ = (๐ฆ โ ๐ฆสน)
โโ๐ฎโ = [(๐โ โ ๐ฆสน) (๐โ โ ๐ฆสน) (๐ฆ โ ๐โ) (๐ฆ โ ๐โ)]
๐โ = โโ๐ฎโ * ๐ฒโ * โโ๐ฎโ'
๐บโ = ๐' * ๐โ * ๐
๐บโโปยน = inv(๐บโ)
๐โ = @SMatrix zeros(Float64,l,l)
for k = 1:l
๐โ = ๐โ[:,k]
โ๐โ๐บโ = (๐โ โ ๐โ') * ๐โ * (๐โ โ ๐) + (๐โ โ ๐') * ๐โ * (๐โ โ ๐โ)
# Accumulating the result in ๐โ allocates memory,
# even though the two terms in the
# summation are both SArrays.
๐โ = ๐โ + ๐โ * ๐บโโปยน * (โ๐โ๐บโ) * ๐บโโปยน * ๐โ' * ๐ * ๐โ'
end
๐ = ๐ + ๐โ
end
๐
end
# โโโก a28395ed-4004-4731-a0bd-be3398505a0e
# Some sample code from https://juliamono.netlify.app/
quote
using Zygote: @adjoint
function ignore(f)
try return f()
catch e; return 0; end
end
@adjoint function ignore(f)
try Zygote._pullback(__context__, f)
catch e
0, yฬ -> nothing
end
end
end;
# โโโก d890a190-b162-11ea-31dd-8d603787e5c5
md"## Autocomplete"
# โโโก e141f910-b162-11ea-039b-3ba1414cbd07
# โโโก c7a1f21e-c137-11ea-1d11-8fb5508ac80c
md"## Selections"
# โโโก 39724bae-b160-11ea-0af5-737755a57e48
md"# Network"
# โโโก f33dc5b0-b160-11ea-15e3-1b54697b5872
# โโโก 95492630-b15f-11ea-3f16-410fe87cd32c
md"# Errors"
# โโโก c1c894f0-b166-11ea-31e0-dd1cddb7b7ca
md"## Multiple definitions"
# โโโก d05d7df0-b166-11ea-2d8f-39b31a42890d
1
2
# โโโก bdeba8e0-b166-11ea-3913-3138ab428083
md"## Stack traces"
# โโโก 84888e20-b160-11ea-1d61-c5934251d6dd
html"<div style='height: 100vh'></div>"
# โโโก 9dc4a0a0-b15f-11ea-361c-87742cf3f2a2
function ef(x)
sqrt(-x)
end
# โโโก aab109c0-b15f-11ea-275d-31e21fcda8c4
ef(1)
# โโโก 976bc2a0-b160-11ea-3e7a-9f033b0f2daf
function eg(x)
sqrt(-x)
end
# โโโก 9c74f9b2-b160-11ea-35fb-917cb1120f5b
eg(1)
# โโโก ea3f77f0-b166-11ea-046e-ef39bfc57d0f
md"## Bad errors"
# โโโก ee92a570-b166-11ea-38fa-0f3563b3f790
TODO: add that error showing error to the Julia tests
# โโโก 4f32c16e-b15e-11ea-314e-01700baeb92d
md"# Bonds"
# โโโก 3a14b3f0-b165-11ea-153d-796416ee5ccc
md"## Lossy"
# โโโก 41a75500-b165-11ea-2519-bbd0feaef6cf
@bind bl1 html"<input type='range' max='100000'>"
# โโโก 4ccbf670-b165-11ea-1951-c17ffb8a58cf
sleep(.5); bl1
# โโโก 8bb26902-b165-11ea-048c-d7f7a72006ee
@assert bl1 isa Int64
# โโโก e559eaf0-b165-11ea-0d81-ffc480afe8f3
@bind bl2 html"<input type='range' max='100000'>"
# โโโก e63be680-b165-11ea-0fd3-bd4e0bf92eb8
bl2
# โโโก 59966a90-b163-11ea-1786-e56e45f06dd0
md"## Recursive"
# โโโก 55bade10-b163-11ea-327f-132c93471713
md"## Scrolling"
# โโโก 431d17c0-cfff-11ea-39b5-394b34438544
md"### `text/html`"
# โโโก f2c0bb90-b162-11ea-24a1-3f864a09e5ee
@bind bw1 html"<input type='range' value='0'>"
# โโโก a4d4ac28-cfff-11ea-3f14-15d2928d2c88
zeros((bw1, bw1))
# โโโก 56e6f440-b15e-11ea-1327-09932af5b5bd
HTML("<div style='height: $(bw1)vh'></div>")
# โโโก 2296ac80-b163-11ea-3d00-ed366fa9ce3e
@bind bw2 html"<input type='range' value='0'>"
# โโโก 20d72230-b163-11ea-39c2-69bf2c422d50
HTML("<div style='height: $(bw2)vh'></div>")
# โโโก 55d116d6-cfff-11ea-25fc-056ce62c8bcd
zeros((bw2, bw2))
# โโโก 76c98394-cfff-11ea-0b6c-25260a8a3bb9
zeros((10,10));
# โโโก 32b5edc0-b15d-11ea-09d6-3b889f6d397a
md"# Rich display
## `image/svg+xml` and `image/jpeg`"
# โโโก 52cb1264-d824-11ea-332a-55964f3d8b90
begin
struct A end
struct B end
function Base.show(io::IO, ::MIME"image/svg+xml", x::A)
write(io, read(download("https://raw.githubusercontent.com/fonsp/Pluto.jl/main/frontend/img/logo.svg")))
end
function Base.show(io::IO, ::MIME"image/jpg", x::B)
write(io, read(download("https://fonsp.com/img/doggoSmall.jpg?raw=true")))
end
nothing
end
# โโโก 5d59acfe-d824-11ea-1d7b-07551a2b11d4
A()
# โโโก 64d929aa-d824-11ea-2cc1-835fbe38be11
B()
# โโโก 661c112e-d824-11ea-3612-4104449c409e
[A(), B()]
# โโโก 3be84600-b166-11ea-1d24-59212363543f
md"## `text/plain`"
# โโโก 42f0a872-b166-11ea-0c71-355d62f67fca
ra = 1:100
# โโโก 794bc212-b166-11ea-0840-fddb29190841
1:13
# โโโก 95898660-b166-11ea-1db1-df7f3c4f1353
"<b>I am not bold</b>"
# โโโก 2859a890-b161-11ea-14e9-b7ddaf08195a
md"## Tree view"
# โโโก 23f41dd2-b15c-11ea-17d2-45b3e83093ba
Ref(Dict(:a => [1,md"![](https://upload.wikimedia.org/wikipedia/commons/thumb/1/1c/PDS_70.jpg/567px-PDS_70.jpg)", md"# Hello"], [3,4] => (:b, (x=3, y=2))))
# โโโก 88bd7aae-b15f-11ea-270e-ab00e6a01203
["asdf", "<b>I am not bold</b>"]
# โโโก 479df620-b161-11ea-0d2b-293fac4e46bb
md"## Markdown"
# โโโก 57a82490-b162-11ea-0fdb-73c57b08830f
md"Writing a notebook is not just about writing the final document โ Pluto empowers the experiments and discoveries that are essential to getting there.
Writing a notebook is not just about writing the final document โ Pluto empowers the experiments and discoveries that are essential to getting there."
# โโโก 5dbbc6c0-b162-11ea-0890-7f0e994b2691
md"Writing a notebook is not just about writing the final document โ Pluto empowers the experiments and discoveries that are essential to getting there."
# โโโก e9a68626-d04c-11ea-35ae-cb157d97fdf7
md"## CSS defaults"
# โโโก 2afb1380-d04d-11ea-27e6-6733f186032a
md"that are essential to **bold getting** there.
that are essential to _italics getting_ there.
that are essential to _**bold italics getting**_ there.
that are essential to [linky](asfdfds) getting there.
that are essential to `Base.get` getting there.
that are essential to **`Base.bold`** getting there.
that are essential to _`Base.italics`_ getting there.
that are essential to _**`Base.bitald`**_ getting there.
"
# โโโก 539c6442-d04d-11ea-2b5d-8faeb152a6fb
md"""
### Heading 3 - hello **bold** but also _italics_ and _**both**_
Writing a notebook is not just about writing the final document โ Pluto empowers the experiments and discoveries that are essential to getting there.
#### Heading 4 - hello **bold** but also _italics_ and _**both**_
Writing a notebook is not just about writing the final document โ Pluto empowers the experiments and discoveries that are essential to getting there.
##### Heading 5 - hello **bold** but also _italics_ and _**both**_
Writing a notebook is not just about writing the final document โ Pluto empowers the experiments and discoveries that are essential to getting there.
###### Heading 6 - hello **bold** but also _italics_ and _**both**_
Writing a notebook is not just about writing the final document โ Pluto empowers the experiments and discoveries that are essential to getting there.
"""
# โโโก fcf2e354-d04d-11ea-1340-1d6211796d5e
md"""
### Heading 3 - `hey` hello **`bold`** but also _`italics`_ and _**`both`**_
Writing a notebook is not just about writing the final document โ Pluto empowers the experiments and discoveries that are essential to getting there.
#### Heading 4 - `hey` hello **`bold`** but also _`italics`_ and _**`both`**_
Writing a notebook is not just about writing the final document โ Pluto empowers the experiments and discoveries that are essential to getting there.
##### Heading 5 - `hey` hello **`bold`** but also _`italics`_ and _**`both`**_
Writing a notebook is not just about writing the final document โ Pluto empowers the experiments and discoveries that are essential to getting there.
###### Heading 6 - `hey` hello **`bold`** but also _`italics`_ and _**`both`**_
Writing a notebook is not just about writing the final document โ Pluto empowers the experiments and discoveries that are essential to getting there.
"""
# โโโก e8c7abe6-d050-11ea-3999-e3f1d4994c0c
md"Hey I am referencing [^1], [^two], [^Raa97] and [^another_one_here].
[^another_one_here]: Heyy"
# โโโก 95de7fac-d04d-11ea-0d83-f1b05c9bd972
md"""
> **Blockquote:** Writing a notebook is not just about writing the final document โ Pluto empowers the experiments and discoveries that are essential to getting there.
"""
# โโโก 33b2934e-d04e-11ea-0f18-0dfec350bb5e
md"""Here is some generic code:
```
Markdown = "d6f4376e-aef5-505a-96c1-9c027394607a"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
REPL = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb"
Sockets = "6462fe0b-24de-5631-8697-dd941f90decc"
UUIDs = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"
with one very long line that should wrap on spaces with one very long line that should wrap on spaces with one very long line that should wrap on spaces with one very long line that should wrap
andoneverylonglinethathasnospacesandoneverylonglinethathasnospacesandoneverylonglinethathasnospacesandoneverylonglinethathasnospacesandoneverylong
```
And this is Julia code:
```julia
if (isfile(path))
# 4 spaces
return launch_notebook_response(path, title="Failed to load notebook", advice="The file <code>$(htmlesc(path))</code> could not be loaded. Please <a href='https://github.com/fonsp/Pluto.jl/issues'>report this error</a>!")
else
# 1 tab
return error_response(404, "Can't find a file here", "Please check whether <code>$(htmlesc(path))</code> exists.")
end
```
"""
# โโโก a70fc678-d04d-11ea-0390-9705003cd285
md"---"
# โโโก 29565386-d04e-11ea-3a40-47639d1fc22f
md"---
---"
# โโโก 3804ce76-d68e-11ea-1641-b9d5e4d9bace
md"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic
---
typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum."
# โโโก 2ee00948-d04e-11ea-3413-e5fb7dd2a25e
md"""
| Syntax | Description | Test Text |
| :--- | :----: | ---: |
| Header | Title | Here's this |
| Paragraph | Text | And more |
"""
# โโโก f0e92382-d682-11ea-3ede-65cd0f124ea4
md"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum."
# โโโก ac82922e-d04e-11ea-0bac-8530cacc5c72
md"""
Stage | Direct Products | ATP Yields
----: | --------------: | ---------:
Glycolysis | 2 ATP ||
^^ | 2 NADH | 3--5 ATP |
Pyruvaye oxidation | 2 NADH | 5 ATP |
Citric acid cycle | 2 ATP ||
^^ | 6 NADH | 15 ATP |
^^ | 2 FADH2 | 3 ATP |
**30--32** ATP |||
[Net ATP yields per hexose]
"""
# โโโก ee43c1b6-d04f-11ea-3a3d-1384ff255535
md"""
!!! tip
asdf
!!! note "Note - Wowie!"
asdf
!!! info
I don't work?
!!! warning
asdf
line 2
!!! danger
asdf
line 2
"""
# โโโก 17f53606-d051-11ea-3183-b3a4cb7180db
md"### Footnote defs
asdfdasd
[^1]: adsf
[^two]:
asdfasfd
line 2
[^thrice]:
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
line 2"
# โโโก 46fc284a-d682-11ea-34b6-69874efcaf65
md"### Text wrapping"
# โโโก 4d452956-d682-11ea-3aeb-cd7d1b2f67dc
s="12345678012345678012345678012345678012345678012345678012345678012345678012345678012345678012345678012345678056780123456780123456780123456780123456780123456780123456780123456780123456780120123456780\n\n\"\"\n\n5678012345678012
7801234567801234567801234567 7801234567801234567801234567 7801234567801234567801234567 7801234567801234567801234567 7801234567801234567801234567
๐ฉโ๐ฉโ๐งโ๐ฆ๐ฉโ๐ฉโ๐งโ๐ฆ๐ฉโ๐ฉโ๐งโ๐ฆ๐ฉโ๐ฉโ๐งโ๐ฆ๐ฉโ๐ฉโ๐งโ๐ฆ๐ฉโ๐ฉโ๐งโ๐ฆ๐ฉโ๐ฉโ๐งโ๐ฆ๐ฉโ๐ฉโ๐งโ๐ฆ๐ฉโ๐ฉโ๐งโ๐ฆ๐ฉโ๐ฉโ๐งโ๐ฆ๐ฉโ๐ฉโ๐งโ๐ฆ๐ฉโ๐ฉโ๐งโ๐ฆ๐ฉโ๐ฉโ๐งโ๐ฆ๐ฉโ๐ฉโ๐งโ๐ฆ๐ฉโ๐ฉโ๐งโ๐ฆ๐ฉโ๐ฉโ๐งโ๐ฆ๐ฉโ๐ฉโ๐งโ๐ฆ๐ฉโ๐ฉโ๐งโ๐ฆ๐ฉโ๐ฉโ๐งโ๐ฆ๐ฉโ๐ฉโ๐งโ๐ฆ๐ฉโ๐ฉโ๐งโ๐ฆ๐ฉโ๐ฉโ๐งโ๐ฆ๐ฉโ๐ฉโ๐งโ๐ฆ๐ฉโ๐ฉโ๐งโ๐ฆ๐ฉโ๐ฉโ๐งโ๐ฆ๐ฉโ๐ฉโ๐งโ๐ฆ๐ฉโ๐ฉโ๐งโ๐ฆ๐ฉโ๐ฉโ๐งโ๐ฆ๐ฉโ๐ฉโ๐งโ๐ฆ๐ฉโ๐ฉโ๐งโ๐ฆ๐ฉโ๐ฉโ๐ง๐ฉโ๐ฉโ๐ง๐ฉโ๐ฉโ๐ง๐ฉโ๐ฉโ๐ง๐ฉโ๐ฉโ๐ง๐ฉโ๐ฉโ๐ง๐ฉโ๐ฉโ๐ง๐ฉโ๐ฉโ๐ง๐ฉโ๐ฉโ๐ง๐ฉโ๐ฉโ๐ง๐ฉโ๐ฉโ๐งโคโคโคโ
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum."
# โโโก 4e320206-d682-11ea-3dfe-b77f6e96f33a
Text(s)
# โโโก 1bb05fc0-b15d-11ea-3dae-7734f66a0c56
md"# Testing machinery"
# โโโก 9ac925d0-b15d-11ea-2abd-7db360900be0
html"""
<style>
.test {
padding: .5em;
border-radius: 6px;
}
.test::before,
.test::after {
font-weight: bold;
}
.test.broken::after {
content: "BROKEN";
}
.test.manual {
background-color: rgba(200, 150, 0, .2);
}
.test.visual {
background-color: rgba(0, 150, 200, .2);
}
.test.manual::before {
content: "MANUAL ";
}
.test.visual::before {
content: "VISUAL ";
}
</style>
"""
# โโโก 7e2cc6c0-b15d-11ea-32b0-15394cdebd35
function ask(kind, str::Markdown.MD)
HTML("<div class='test $(kind)'>" * sprint(show, MIME"text/html"(), str) * "</div>")
end
# โโโก ce7f9d90-b163-11ea-0ff7-cf7378644741
ask("visual", md"During launch: ๐๐ Header should be BLUE and say LOADING")
# โโโก 11f3ae90-b164-11ea-1027-0d2e6e7048dd
ask("visual", md"Hover shows path outlined and RENAME button")
# โโโก 26d2b310-b164-11ea-0029-f7b04ee5ba73
ask("manual", md"Autocomplete shows on every keystroke")
# โโโก 1c6229f0-b165-11ea-0f1d-674022c43971
ask("manual", md"Autocompleting a **directory** using ENTER does what you expect")
# โโโก 427e4980-b164-11ea-3604-69e5af4ad390
ask("manual", md"Delete `jl` from the end, it gives **one** suggestion: the original path, with a sheet-of-paper icon")
# โโโก 6e04dd80-b164-11ea-0b33-7dc165574a35
ask("manual", md"Delete `?.jl` (4 charachters) from the end, it gives **two** suggestions:
- the original path, with a sheet-of-paper icon
- a new suggested path, which ends with `.jl (new)` and has a different icon
1. Click RENAME
1. _There is a confirmation pop-up_
1. Click CANCEL
1. _The path changes back to the original_
1. Change the name again
1. Press `ENTER`
1. _There is a confirmation pop-up_
1. Click OK
1. _Path remains the same_
1. _The notebook is LOADING for a second_
")
# โโโก 5fd66630-b15e-11ea-29b3-5fdf839d105b
ask("visual", md"Fold symbol should follow page scroll for long cells")
# โโโก 9b26e0c0-b15e-11ea-1fbb-a34d46c520fa
ask("manual", md"Swap names `ma` and `mb`, then use `Ctrl+S` to run both cells. Then again, now use 'Submit all changes' button at top of notebook")
# โโโก f4015940-b15f-11ea-0f3a-1714c79023c3
ask("manual", md"Move this cell:
- before itself (should not change pos)
- after itself (should not change pos)
- somewhere else
Drag to end of the screen, **should autoscroll**")
# โโโก 1b569b72-b167-11ea-1462-63674f7e13db
ask("manual", md"Test autocomplete")
# โโโก cd3f70fc-c137-11ea-2871-936287684d2c
ask("manual", md"Select a chunk of code, then put your cursor in another cell
Selection of the original cell should collapse")
# โโโก f7297d72-c137-11ea-3a9b-a10be62c3976
ask("manual", md"Put your cursor in this cell, scroll down 2 screens, and click somewhere else
Page should not jump back to this cell")
# โโโก 4902abb2-b160-11ea-1120-f501bf151fc2
ask("manual", md"Refresh quickly & slowly a couple of times")
# โโโก 58721630-b160-11ea-30b4-e9667b4df6da
ask("manual", md"Change UUID in URL to something invalid - should redirect to `/`")
# โโโก c8595660-b166-11ea-0b6f-31d05ec9f51f
ask("manual", md"Click on the error")
# โโโก e4a7c0b0-b15f-11ea-2eff-ad120d8cb859
ask("manual", md"Click both yellow items in the stack trace, the relevant line should be selected and scrolled into view")
# โโโก ba734f30-b15f-11ea-0490-a55c3739e4bf
ask("visual", md"Stack trace should have **5** frames and they should look nice
The last **2** should have yellow 'filenames'")
# โโโก a4f07420-b160-11ea-2c62-9115046e4e24
ask("manual broken", md"The `eg` cell should get unfolded when the stack frame is clicked")
# โโโก 5f37b100-b165-11ea-2f65-158f1392aea9
ask("manual", md"Move the slider, the second cell should **not** execute on intermediate values. It should **not** be executing 500ms after releasing the slider.")
# โโโก b3047b10-b165-11ea-014e-25d14d54558c
ask("manual", md"1. Move the slider
1. Uncomment the second cell and run
1. _The second cell has the slider value_
1. Move the slider
1. _Second cell updates_")
# โโโก 0d1ca080-b163-11ea-2927-7b46d602f837
ask("manual", md"Moving slider should **not scroll** window")
# โโโก 0c499910-b163-11ea-3fee-c5d006a97ff7
ask("manual", md"Moving slider should **scroll** window to **keep this message at a fixed position**")
# โโโก b5cf05fa-cfff-11ea-2c43-6748c5d90a1e
ask("manual", md"**Delete** semicolon below, then **add** semicolon back. CodeMirror should stay fixed on screen.")
# โโโก 6f4ba610-d824-11ea-2e8f-a1ec77bcaad3
ask("visual", md"**Pluto logo** and **dogs** visible")
# โโโก 7fc898f4-d824-11ea-0edd-ff2084f0652f
ask("visual", md"**Pluto logo** and **dogs** visible")
# โโโก 486c7770-b166-11ea-22df-b38b69fb51ad
ask("visual", md"Shows assignee `ra`")
# โโโก 5f28c770-b166-11ea-3099-afb5ec07119b
ask("visual", md"Output can be scrolled horizontally")
# โโโก 80e7b1f0-b166-11ea-1434-ff74883f762d
ask("visual", md"No scrollbar")
# โโโก 893d7bf2-b166-11ea-1580-63694795488b
ask("visual", md"HTML tags are visible")
# โโโก de56f5d2-b15c-11ea-320b-31b4da177c3a
ask("manual", md"I must be an expandable tree")
# โโโก f3e429be-b15e-11ea-2a93-4516283aa4c0
ask("visual", md"Element alignment should be on baseline")
# โโโก 4096de22-b15f-11ea-0178-17a2ac624e96
ask("visual broken", md"HTML should be escaped")
# โโโก 9df64d10-b161-11ea-2c8c-ff6f0b978cc2
ask("visual", md"Tests visibile inside the following Markdown")
# โโโก 78ef6e12-b162-11ea-1474-b3e749a7b705
ask("visual", md"Assignment to `ไฝ่ฐๅ็้ผ็็ฑปๅ็ณป็ป` must be visible")
# โโโก e16977de-b15a-11ea-3cbd-35af9445d31d
ไฝ่ฐๅ็้ผ็็ฑปๅ็ณป็ป = md"""
$(ask("visual", md"Heading in simplified Chinese:"))
#### ไฝ่ฐๅ็้ผ็็ฑปๅ็ณป็ป
$(ask("visual", md"Code and LaTeX math inline"))
ๆฏๅฆ๏ผ`sin.(A)` ไผ่ฎก็ฎ A ไธญๆฏไธชๅ
็ด ็ $\sin(A)$ ๅผ
$(ask("visual", md"Bigger and centered LaTeX math"))
``\frac{\pi^2}{2}``
$(ask("visual broken", md"Heading & text in Arabic displayed right-to-left"))
## ุงููููููุจ
ูุธู ุจุฃู ูููุจ ุงูุฃุฑุถ ูู ู
ุฑูุฒ ุงูููู
$(ask("visual", md"Greek"))
ฮ ฮปฮธฯฮฟ ฮนฯ ฮตฮตฮฝ ฯฮปฮฑฮฝฮตฮตฯ! Some maths:
$(ask("visual broken", md"Identical symbols:"))
``\pi = ฯ``
$(ask("visual", md"Image **should not** fill page when widescreen, image **should** fill page when narrow screen"))
![](https://upload.wikimedia.org/wikipedia/commons/thumb/1/1c/PDS_70.jpg/567px-PDS_70.jpg)"""
# โโโก 21bd9950-b15d-11ea-2632-41b1c66563bd
ask("visual", md"These three paragraphs must have equal spacing between them")
# โโโก 00000000-0000-0000-0000-000000000001
PLUTO_PROJECT_TOML_CONTENTS = """
[deps]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
"""
# โโโก 00000000-0000-0000-0000-000000000002
PLUTO_MANIFEST_TOML_CONTENTS = """
# This file is machine-generated - editing it directly is not advised
julia_version = "1.7.0"
manifest_format = "2.0"
[[deps.Base64]]
uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
[[deps.InteractiveUtils]]
deps = ["Markdown"]
uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
[[deps.Logging]]
uuid = "56ddb016-857b-54e1-b83d-db4d58db5568"
[[deps.Markdown]]
deps = ["Base64"]
uuid = "d6f4376e-aef5-505a-96c1-9c027394607a"
[[deps.Random]]
deps = ["SHA", "Serialization"]
uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
[[deps.SHA]]
uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce"
[[deps.Serialization]]
uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b"
[[deps.Test]]
deps = ["InteractiveUtils", "Logging", "Random", "Serialization"]
uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
"""
# โโโก Cell order:
# โโce7f9d90-b163-11ea-0ff7-cf7378644741
# โ โ878a4750-b15e-11ea-2584-8feba490699f
# โโfd0763a0-b163-11ea-23b4-a7bae7052e19
# โโ11f3ae90-b164-11ea-1027-0d2e6e7048dd
# โโ26d2b310-b164-11ea-0029-f7b04ee5ba73
# โโ1c6229f0-b165-11ea-0f1d-674022c43971
# โโ427e4980-b164-11ea-3604-69e5af4ad390
# โโ6e04dd80-b164-11ea-0b33-7dc165574a35
# โโ592d3ac0-b15e-11ea-313c-db05bc7303cc
# โโ5fd66630-b15e-11ea-29b3-5fdf839d105b
# โโ6dde0352-b15e-11ea-2fa8-7327cc366c1a
# โโ9b26e0c0-b15e-11ea-1fbb-a34d46c520fa
# โ โ7370dcc0-b15e-11ea-234b-23584c864b61
# โ โ75b21a30-b15e-11ea-3046-2170ec097e63
# โ โ7b74dd40-b15e-11ea-291a-d7e10a185718
# โ โf0b821b0-b15f-11ea-1f64-dd33aa85b54e
# โโf4015940-b15f-11ea-0f3a-1714c79023c3
# โโ4980fc10-b163-11ea-081b-c1335699a8f6
# โโd2c1d090-b162-11ea-0c17-2b234c098cf9
# โ โbc5bf64e-8b47-45ac-baf2-3cbb8e35d916
# โ โa28395ed-4004-4731-a0bd-be3398505a0e
# โโd890a190-b162-11ea-31dd-8d603787e5c5
# โโ1b569b72-b167-11ea-1462-63674f7e13db
# โ โe141f910-b162-11ea-039b-3ba1414cbd07
# โโc7a1f21e-c137-11ea-1d11-8fb5508ac80c
# โ โcd3f70fc-c137-11ea-2871-936287684d2c
# โ โf7297d72-c137-11ea-3a9b-a10be62c3976
# โโ39724bae-b160-11ea-0af5-737755a57e48
# โโ4902abb2-b160-11ea-1120-f501bf151fc2
# โโ58721630-b160-11ea-30b4-e9667b4df6da
# โ โf33dc5b0-b160-11ea-15e3-1b54697b5872
# โโ95492630-b15f-11ea-3f16-410fe87cd32c
# โโc1c894f0-b166-11ea-31e0-dd1cddb7b7ca
# โโc8595660-b166-11ea-0b6f-31d05ec9f51f
# โ โd05d7df0-b166-11ea-2d8f-39b31a42890d
# โโbdeba8e0-b166-11ea-3913-3138ab428083
# โโe4a7c0b0-b15f-11ea-2eff-ad120d8cb859
# โโba734f30-b15f-11ea-0490-a55c3739e4bf
# โ โaab109c0-b15f-11ea-275d-31e21fcda8c4
# โโ84888e20-b160-11ea-1d61-c5934251d6dd
# โ โ9dc4a0a0-b15f-11ea-361c-87742cf3f2a2
# โโa4f07420-b160-11ea-2c62-9115046e4e24
# โโ976bc2a0-b160-11ea-3e7a-9f033b0f2daf
# โ โ9c74f9b2-b160-11ea-35fb-917cb1120f5b
# โโea3f77f0-b166-11ea-046e-ef39bfc57d0f
# โ โee92a570-b166-11ea-38fa-0f3563b3f790
# โโ4f32c16e-b15e-11ea-314e-01700baeb92d
# โโ3a14b3f0-b165-11ea-153d-796416ee5ccc
# โโ5f37b100-b165-11ea-2f65-158f1392aea9
# โ โ41a75500-b165-11ea-2519-bbd0feaef6cf
# โ โ4ccbf670-b165-11ea-1951-c17ffb8a58cf
# โ โ8bb26902-b165-11ea-048c-d7f7a72006ee
# โโb3047b10-b165-11ea-014e-25d14d54558c
# โ โe559eaf0-b165-11ea-0d81-ffc480afe8f3
# โ โe63be680-b165-11ea-0fd3-bd4e0bf92eb8
# โโ59966a90-b163-11ea-1786-e56e45f06dd0
# โโ55bade10-b163-11ea-327f-132c93471713
# โโ431d17c0-cfff-11ea-39b5-394b34438544
# โโ0d1ca080-b163-11ea-2927-7b46d602f837
# โ โf2c0bb90-b162-11ea-24a1-3f864a09e5ee
# โ โa4d4ac28-cfff-11ea-3f14-15d2928d2c88
# โ โ56e6f440-b15e-11ea-1327-09932af5b5bd
# โ โ20d72230-b163-11ea-39c2-69bf2c422d50
# โ โ55d116d6-cfff-11ea-25fc-056ce62c8bcd
# โโ0c499910-b163-11ea-3fee-c5d006a97ff7
# โ โ2296ac80-b163-11ea-3d00-ed366fa9ce3e
# โโb5cf05fa-cfff-11ea-2c43-6748c5d90a1e
# โ โ76c98394-cfff-11ea-0b6c-25260a8a3bb9
# โโ32b5edc0-b15d-11ea-09d6-3b889f6d397a
# โโ52cb1264-d824-11ea-332a-55964f3d8b90
# โโ6f4ba610-d824-11ea-2e8f-a1ec77bcaad3
# โ โ5d59acfe-d824-11ea-1d7b-07551a2b11d4
# โ โ64d929aa-d824-11ea-2cc1-835fbe38be11
# โโ7fc898f4-d824-11ea-0edd-ff2084f0652f
# โ โ661c112e-d824-11ea-3612-4104449c409e
# โโ3be84600-b166-11ea-1d24-59212363543f
# โโ486c7770-b166-11ea-22df-b38b69fb51ad
# โโ5f28c770-b166-11ea-3099-afb5ec07119b
# โ โ42f0a872-b166-11ea-0c71-355d62f67fca
# โโ80e7b1f0-b166-11ea-1434-ff74883f762d
# โ โ794bc212-b166-11ea-0840-fddb29190841
# โโ893d7bf2-b166-11ea-1580-63694795488b
# โโ95898660-b166-11ea-1db1-df7f3c4f1353
# โโ2859a890-b161-11ea-14e9-b7ddaf08195a
# โโde56f5d2-b15c-11ea-320b-31b4da177c3a
# โโf3e429be-b15e-11ea-2a93-4516283aa4c0
# โโ23f41dd2-b15c-11ea-17d2-45b3e83093ba
# โโ4096de22-b15f-11ea-0178-17a2ac624e96
# โ โ88bd7aae-b15f-11ea-270e-ab00e6a01203
# โโ479df620-b161-11ea-0d2b-293fac4e46bb
# โโ9df64d10-b161-11ea-2c8c-ff6f0b978cc2
# โโ78ef6e12-b162-11ea-1474-b3e749a7b705
# โโe16977de-b15a-11ea-3cbd-35af9445d31d
# โโ21bd9950-b15d-11ea-2632-41b1c66563bd
# โโ57a82490-b162-11ea-0fdb-73c57b08830f
# โโ5dbbc6c0-b162-11ea-0890-7f0e994b2691
# โโe9a68626-d04c-11ea-35ae-cb157d97fdf7
# โโ2afb1380-d04d-11ea-27e6-6733f186032a
# โโ539c6442-d04d-11ea-2b5d-8faeb152a6fb
# โ โfcf2e354-d04d-11ea-1340-1d6211796d5e
# โโe8c7abe6-d050-11ea-3999-e3f1d4994c0c
# โโ95de7fac-d04d-11ea-0d83-f1b05c9bd972
# โโ33b2934e-d04e-11ea-0f18-0dfec350bb5e
# โ โa70fc678-d04d-11ea-0390-9705003cd285
# โ โ29565386-d04e-11ea-3a40-47639d1fc22f
# โ โ3804ce76-d68e-11ea-1641-b9d5e4d9bace
# โโ2ee00948-d04e-11ea-3413-e5fb7dd2a25e
# โโf0e92382-d682-11ea-3ede-65cd0f124ea4
# โโac82922e-d04e-11ea-0bac-8530cacc5c72
# โ โee43c1b6-d04f-11ea-3a3d-1384ff255535
# โโ17f53606-d051-11ea-3183-b3a4cb7180db
# โโ46fc284a-d682-11ea-34b6-69874efcaf65
# โโ4d452956-d682-11ea-3aeb-cd7d1b2f67dc
# โ โ4e320206-d682-11ea-3dfe-b77f6e96f33a
# โโ1bb05fc0-b15d-11ea-3dae-7734f66a0c56
# โ โ9ac925d0-b15d-11ea-2abd-7db360900be0
# โ โ7e2cc6c0-b15d-11ea-32b0-15394cdebd35
# โโ00000000-0000-0000-0000-000000000001
# โโ00000000-0000-0000-0000-000000000002