-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
112 lines (97 loc) · 5.56 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
102
103
104
105
106
107
108
109
110
111
112
<!DOCTYPE html>
<html>
<title>Random Numbers - Web Workers</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Raleway">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<style>
body,h1,h2,h3,h4,h5,h6 {font-family: "Raleway", Arial, Helvetica, sans-serif}
.mySlides {display: none}
</style>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script type="text/javascript" src="js/script.js"></script>
<script type="text/javascript" src="js/calculate.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.3/Chart.min.js"></script>
<body class="w3-content w3-border-left w3-border-right">
<!-- Sidebar/menu -->
<nav class="w3-sidebar w3-light-grey w3-collapse w3-top" style="z-index:3;width:260px" id="mySidebar">
<div class="w3-container w3-display-container w3-padding-16">
<i onclick="w3_close()" class="fa fa-remove w3-hide-large w3-button w3-transparent w3-display-topright"></i>
<h3>Parameters</h3>
<hr>
<form action="#" id="form_tests_data">
<p><label><i class="fa fa-arrow-up"></i> First number</label></p>
<input class="w3-input w3-border" type="number" value="0" name="input_first_number">
<p><label><i class="fa fa-arrow-down"></i> Last number</label></p>
<input class="w3-input w3-border" type="number" value="5" name="input_last_number" min="1">
<p><label><i class="fa fa-list-ol"></i> Numbers count</label></p>
<input class="w3-input w3-border" type="number" value="1000" name="input_numbers_count" min="1">
<p><label><i class="fa fa-microchip"></i> Threads</label></p>
<input class="w3-input w3-border" type="number" value="4" name="input_threads" min="1">
<p><button class="w3-button w3-block w3-green w3-left-align" id="button_calc" type="submit"><i class="fa fa-check w3-margin-right"></i> Calculate</button></p>
</form>
</div>
<div class="w3-bar-block">
<a href="#index" class="w3-bar-item w3-button w3-padding-16"><i class="fa fa-microchip"></i> Tests</a>
<a href="#about" class="w3-bar-item w3-button w3-padding-16"><i class="fa fa-question"></i> About</a>
<a href="#contact" class="w3-bar-item w3-button w3-padding-16"><i class="fa fa-envelope"></i> Contact</a>
</div>
</nav>
<!-- Top menu on small screens -->
<header class="w3-bar w3-top w3-hide-large w3-black w3-xlarge">
<span class="w3-bar-item">Random Numbers Statistics</span>
<a href="javascript:void(0)" class="w3-right w3-bar-item w3-button" onclick="w3_open()"><i class="fa fa-bars"></i></a>
</header>
<!-- Overlay effect when opening sidebar on small screens -->
<div class="w3-overlay w3-hide-large" onclick="w3_close()" style="cursor:pointer" title="close side menu" id="myOverlay"></div>
<!-- !PAGE CONTENT! -->
<div class="w3-main w3-white" style="margin-left:260px">
<!-- Push down content on small screens -->
<div class="w3-hide-large" style="margin-top:80px"></div>
<!-- Slideshow Header -->
<div class="w3-container" id="index">
<h2 class="w3-text-green">Random Numbers Statistics</h2>
</div>
<div class="w3-container">
<div>
<h4><strong id="res_label">Results</strong> <strong id="variable_label"></strong></h4>
<div class="w3-row w3-large">
<div class="w3-col w3-half">
<p><i class="fa fa-fw fa-circle"></i> <span id="avg_label">Average</span>: <span id="results_average"></span></p>
<p><i class="fa fa-fw fa-circle"></i> <span id="med_label">Median</span>: <span id="results_median"></span></p>
<p><i class="fa fa-fw fa-circle"></i> <span id="mod_label">Mode</span>: <span id="results_mode"></span></p>
</div>
<div class="w3-col w3-half">
<p><i class="fa fa-fw fa-circle"></i> <span id="var_label">Variance</span>: <span id="results_variance"></span></p>
<p><i class="fa fa-fw fa-circle"></i> <span id="std_label">Standard deviation</span>: <span id="results_deviation"></span></p>
<p><i class="fa fa-fw fa-circle"></i> <span id="ela_label">Elapsed time</span>: <span id="elapsed_time"></span></p>
</div>
<canvas id="chart" width="400" height="200"></canvas>
</div>
</div>
<hr>
<h4 id="about"><strong>About</strong></h4>
<p>This site was developed to an activity for the course Tópicos Especiais em Computação VIII from UFRN in 2020.1. Source available at <a href="https://github.com/dhiogoboza/random-numbers-workers">https://github.com/dhiogoboza/random-numbers-workers</a></p>
<hr>
<h4 id="contact"><strong>Contact</strong></h4>
<p>Find me on github <a href="https://github.com/dhiogoboza/" target="_blank" title="GitHub">dhiogoboza</a> or contact me by email <a href="mailto:[email protected]">[email protected]</a>.</p>
</div>
<hr>
<footer class="w3-container w3-padding-16" style="margin-top:32px">Powered by <a href="https://www.w3schools.com/w3css/default.asp" title="W3.CSS" target="_blank" class="w3-hover-text-green">w3.css</a></footer>
<!-- End page content -->
</div>
<script>
// Script to open and close sidebar when on tablets and phones
function w3_open() {
document.getElementById("mySidebar").style.display = "block";
document.getElementById("myOverlay").style.display = "block";
}
function w3_close() {
document.getElementById("mySidebar").style.display = "none";
document.getElementById("myOverlay").style.display = "none";
}
</script>
</body>
</html>