-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
101 lines (77 loc) · 3.21 KB
/
index.html
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
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<!-- Font -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Fira+Code:wght@300..700&display=swap" rel="stylesheet">
<!-- Bootstrap -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"
integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz"
crossorigin="anonymous"></script>
<!-- jQuery -->
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<!-- Scripts personalizados -->
<script defer src="./eigenmath/eigenmath.min.js"></script>
<script defer src="./eigenmath/emit_graph.js"></script>
<script defer src="./script/stdin.js"></script>
<script defer src="./script/file.js"></script>
<script>
$(document).ready(function () {
$('#boton-ocultar').click(function () {
$('#entrada').toggle();
var stdinVisible = $('#entrada').is(':visible');
if (stdinVisible) {
$('#boton-ocultar').text('Run');
$('#stdout-container').hide(); // Ocultar la salida
} else {
$('#boton-ocultar').text('Edit');
$('#stdout-container').show(); // Mostrar la salida
}
// Llamar a la función run() si es necesario
run();
$('span').removeAttr('style');
});
});
</script>
</head>
<body>
<nav class="navbar fixed-bottom navbar-expand-sm bg-light">
<div class="container-fluid d-flex gap-1">
<button class="btn btn-outline-primary flex-grow-1" type="button" id="boton-ocultar">
Edit
</button>
</div>
</nav>
<div class="container-fluid p-0">
<div class="form-floating" id="entrada">
<textarea style="font-family: 'Fira Code', monospace;"
class="form-control w-100 vh-100 border border-0" placeholder="Hola" id="stdin" wrap="off">
"Planck's law"
rho = 2 h nu^3 / c^2 / (exp(h nu / k / T) - 1)
rho
"For T = 3000 kelvin"
T = 3000 kelvin
c = 299792458 meter / second
h = 6.62607015 10^(-34) joule second -- exact since 2019 definition of kilogram
k = 1.38064852 10^(-23) joule / kelvin
rho = eval(rho, nu, nu / second) meter^2 / joule -- cancel physical units
rho
"Radiant energy (rho) vs frequency (nu)"
xrange = (0,10^15)
yrange = (0,10^(-8))
draw(rho,nu)
</textarea>
</div>
</div>
<div class="container overflow-auto py-3 pb-5 vh-100" id="stdout-container" style="display: none;">
<div class="pb-5" style="white-space: nowrap; font-family: 'Fira Code', monospace;" id="stdout">
</div>
</div>
</body>
</html>