Skip to content

Commit

Permalink
change version of home.html, clean some useless file
Browse files Browse the repository at this point in the history
  • Loading branch information
LordCasser committed Jan 18, 2023
1 parent f6a2ee1 commit df02de6
Show file tree
Hide file tree
Showing 4 changed files with 199 additions and 76 deletions.
108 changes: 108 additions & 0 deletions Dynamic Integral Calculator.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>score curve</title>
<script src="https://cdn.plot.ly/plotly-2.13.3.min.js"></script>
<style>
.form {
display: inline-grid;
grid-template-columns: 80px 5rem;
align-items: center;
gap: 8px;
background-color: #eee;
padding: 8px;
position: absolute;
top: 8px;
left: 8px;
}

input {
height: 20px;
/* outline: none; */
border: 1px solid rgb(50 50 150);
border-radius: 0;
background-color: rgb(223, 223, 245);
}

.refresh {
grid-column: 1 / 3;
cursor: pointer;
}

body {
width: 100vw;
height: 100vh;
margin: 0;
}

.main {
display: flex;
width: 100%;
height: 100%;
justify-content: center;
align-items: center;
}

#canv {
width: 800px;
height: 600px;
}
</style>
</head>

<body>
<div class="main">
<div id="canv"></div>
<div class="form">
<label>最大人数:</label>
<input id="max" value="100">
<label>base score:</label>
<input id="baseScore" value="1000">
<label>half life:</label>
<input id="halfLife" value="20">
<input class="refresh" type="button" value="refresh">
</div>
</div>
<script>
let data = [
{
"x": [],
"y": [],
type: 'scatter',
mode: "lines",
}];
Plotly.newPlot("canv", {
"data": data,
"layout": { "width": 800, "height": 600 }
});

function UpdateData() {
console.log('update');
let max = parseInt(document.getElementById("max").value)
let baseScore = parseFloat(document.getElementById("baseScore").value)
let halfLife = parseFloat(document.getElementById("halfLife").value)
max = Math.max(max, 1);
baseScore = Math.max(baseScore, 0);
halfLife = Math.max(0, halfLife);

let x = [];
let y = [];
for (let i = 1; i < max; i++) {
x.push(i);
let coefficient = 1.8414 * (i - 1.0) / halfLife;
y.push(Math.floor(baseScore / (coefficient + Math.exp(-coefficient))));
}
data[0].x = x;
data[0].y = y;
Plotly.redraw("canv");
}
document.getElementsByClassName("refresh")[0].addEventListener('click', UpdateData);
UpdateData();
</script>
</body>

</html>
75 changes: 0 additions & 75 deletions OJ.md

This file was deleted.

90 changes: 90 additions & 0 deletions app/home_example.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="Content-Security-Policy" content="script-src 'self'" />
<meta name="viewport" content="width=device-width initial-scale=1" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Home</title>
<link
href="https://fonts.googleapis.com/css?family=Ubuntu+Mono"
rel="stylesheet"
/>
<style type="text/css">
body {
white-space: pre;
font-size: 10px;
line-height: 10px;
text-align: center;
font-family: "Ubuntu Mono";
}
::-webkit-scrollbar {
width: 4px;
}

::-webkit-scrollbar-track {
background: gray;
opacity: 0.1;
}

::-webkit-scrollbar-thumb {
background: rgb(245, 124, 0);
border-radius: 2px;
}
a {
color: inherit;
}
li {
text-align: left;
}
</style>
</head>
<body>
<h1>Welcome To Tp0t OJ</h1>
<pre>



-;;;;::,,,
,;irrrs111ss11ssri;-:
:rs11hhhh11hhhhhh111r;,.
-iirshhhhhhhhhhhhhhhsssi:
r:. ,:riir5hh5hhhhhhhhhhhhh1rr-
i:hrs-- :is1hhh555hhhhhhhhhhhhh1ss, .. hSh1
sshiii;; :.;rshhh555hhhhhhhhhhhh51i; .,--:-. :rr1h1r
r11si;i;-;:;,-rs155SS5hhh11sshsssr1i: ,:;;i-r-.;- -:-;r;h1s
h111ssrrrrr;ri; ;i1h5555h111ss1rrri-- irsssss11h1ssr:. ;;ii:::;1hr
:1h11111111rr.rii 11hh15hhh11ssrsr:; , rrssssss1111shhsri: ,:;;::--;:;hs
ss111111111111:rr;.1h1hh1hhhhhs1ri:,-ss1111ss1h111111hh1srr:. -;i;:-:-::-:ri-
rsh1hhhhh11hh15-rr;:1hh11rrrrrrri; rrs1hhhhhhhh111111hhhhh1s1r, ;;;;::::---:;-r;
s11hhhhhhhhhhhsirir 5h11iiii;;r-i11hhhhhh5hh11ssssrrsss1hhhhssr;.:;;::-:::-::::;i;
1111hhhhhhhhhhh1rr;, 535h1s;;;;r155555hhhhhhssssssrrrrrrshhhhh1ssi;-;;-;;:::----.-,i-
1s11hhhhhhhhhhhhh;;:s5553S511h1s1hhhhhhhh11sssrssssrrrrrrs1h1h111sii ii:;:::--,:--::-i:
1i1111hhhhhhhhhhh1r155SSSS333SS5551hhhhhhhssssssssrrrrrrrs11hhhhhhss5rssi;i;::--::--:-s;,
;r1111111hhhhhhhhhhh555SSSS33339S51hh11sssrrsssssssrrrrss11hhhhh55555hshsii;;;;:::::::-:i;
rh1111111hhhhhh5555553333SS3333SSSShhh1sssssssrssssrsss11s155555555S3955srir;:,;;;:::-:-i-
sr1111111111hhhh5SS33h3333333333SS9555hh1111ssssssss1hhhhhhhhh55SS559983hsrrii:;;;:::;::;r:
ir11hh1111hhhh555339833SSSSSSSSSSS3355hhhhhh11hh1111hhhh55555555hSS9989S1rrrii:i;;;:-;:::;;
rrhs111111hhhhhh55339XG8333SSSSSSSS33SS5555h5hhhh11hhhhhhhh5555595S3998S5srrrrriiii;;;;::;;.
1s111hhh111h111hh55S9&XG9333333SSSS33SSS55555hhhhhhhhhhhhh55Sh115hS989SShsrrrrrri-;;;;:;:;sS
rs1111111111h111hh55S8&X893SSSSSSSS33SSSS55551555hhhh5555hS5shh5hh19GSSh1sssssrrri;ii:-;1;;
rs111111hhhhhhhhh55S38XG99SS5S33SS33SSSSSS5555555h5s51h555Shs1199G855hhh11ssrrrrrrii;rs;
i1111111hhhhhhhh55SS33399333SS55h1hh99SS553SSrr11shh5555SS9&553X93555hhhhhsssrrrrrrrisi,
;s111hhhhhhhhhh55SS333333SSSS555h5hhhhh1111hs1hhhhhh15hS5h&X933SS55hhhhhhssssrrssrssi-
shhhhh11hhhh5555SS33333993S3S55h555hhhhhhhsshhhhhh5531S8939SSSSS55hhhhhh11ssssssiriG
11hhhhhhhhh5555SS3333999988893-5hhh5511hh5s1h1:9888999933SSSSSS55hhhhhh11sss1i1r
sshhhhh5hhh555SSS3333399999988GGGGG888888888888899999933SSSSSS55hhhhhh11ssshs:.
s5h555555555555SS33339999999988888888888888999999993333SSSS55555hhh11sriss,:
h11hh55555555SS3333333399998898888888999999993333SSSSSSSS55h15hhhhh55ssA
51hSSSSS555SSSS3333999993889999999333333933SSSS33SS555555hhhh5hhs:,
rshSS355SSSSSS3333999399999999333333SSSSSSSSSSSS555555h55S1ii
;1shS5S33SS3333333399999999333333SSSSSS555555S5555S15s,
i5h55S33333333399993333SSSSSSSSSS5555555S5551,
ihshhSS3399939993933333SS3S5hhi,i:
11rr:;is-rr:i

</pre>
<h4>Version 2.3-release</h4>
</body>

</html>
2 changes: 1 addition & 1 deletion app/public/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,6 @@ <h1>Welcome To Tp0t OJ</h1>
11rr:;is-rr:i

</pre>
<h4>Version 2.2-release</h4>
<h4>Version 2.3-release</h4>
</body>
</html>

0 comments on commit df02de6

Please sign in to comment.