-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
50 lines (43 loc) · 2.87 KB
/
Copy pathindex.html
File metadata and controls
50 lines (43 loc) · 2.87 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Code Converter 😊</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.0.0/dist/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<link rel="stylesheet" href="style.css">
<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=Bungee+Spice&family=Comfortaa:wght@500&family=Montserrat:wght@300&family=Open+Sans:wght@300&family=Roboto:wght@400;500&family=Sofia+Sans:wght@500;900&display=swap" rel="stylesheet">
</head>
<body background="https://cdn.cbeditz.com/cbeditz/large/11625049314ji68a0ctornpauyi33bglx8hgbmsqgtlmyxrmnbzxu5d0rlftu4rcen9qiio96tcadjbsh87lav4u7mrn0w2uvsw2wst0b9nlkxu.jpg">
<div class="menu card">
<label for="codeChoice">Which code you want to convert? 😊</label>
<select id="codeChoice" class="btn btn-warning dropdown-toggle m-3" onchange="showCodeInterface()">
<option value="none" selected >Select Code</option>
<option value="hamming" class="dropdown">Hamming Code</option>
<option value="crc" class="dropdown">CRC Code</option>
</select>
</div>
<div id="hammingInterface" class="container hidden card">
<h1>Hamming Code Generator</h1>
<label for="inputBinary">Enter Binary String:</label>
<input type="text" id="inputBinary">
<button onclick="generateHammingCode()" class="btn btn-outline-success">Generate</button>
<p id="output"></p>
</div>
<div id="crcInterface" class="container hidden">
<h1>CRC Encoder </h1>
<label for="dataWord">Enter Data Word:</label>
<input type="text" id="dataWord" placeholder="e.g., 100100">
<label for="key">Enter Key:</label>
<input type="text" id="key" placeholder="e.g., 1101">
<button onclick="encodeData()" class="btn btn-outline-success">Encode</button>
<div id="outputCrc"></div>
</div>
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.12.9/dist/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.0.0/dist/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
<script src="index.js"></script>
</body>
</html>