Skip to content

Commit

Permalink
Merge pull request #9 from CallumGilly/base36
Browse files Browse the repository at this point in the history
made the base 36 converter
  • Loading branch information
CallumGilly authored Jan 18, 2023
2 parents f6d8d93 + 040e6ef commit d2cdd30
Show file tree
Hide file tree
Showing 6 changed files with 104 additions and 0 deletions.
8 changes: 8 additions & 0 deletions CallumGilly.github.io.code-workspace
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"folders": [
{
"path": "."
}
],
"settings": {}
}
37 changes: 37 additions & 0 deletions CompSciSearch/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="apple-touch-icon" sizes="180x180" href="/favicon/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon/favicon-16x16.png">
<link rel="manifest" href="/site.webmanifest">
<title>Callum Gilchrist</title>

<link rel="stylesheet" href="/main.css">
</head>
<body>
<div id="nav-placeholder">

</div>
<div id="main" class="consoleStyle">
<h1>Programming Search Engine</h1>
<p>Utilizing <a href="https://programmablesearchengine.google.com/">Googles Programable Search Engine</a> this site searches from a collection of hand picked site. This is intended for use when searching for programming/ Computer Science help and should allow the annoyance of non related pages coming up. This has been developed for personal use, but feel free to give it a go and let me know if you find issues or wish for improvements, its good to hope, even when there isn't any.</p>
<div id="searchArea">
<script async src="https://cse.google.com/cse.js?cx=d20669a8a0914407b">
</script>
<div class="gcse-searchbox-only"></div>
</div>
<div id="results">
<script async src="https://cse.google.com/cse.js?cx=d20669a8a0914407b">
</script>
<div class="gcse-searchresults-only"></div>
</div>

</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script src="indexScripts.js"></script>
</body>
</html>
1 change: 1 addition & 0 deletions CompSciSearch/indexScripts.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
$("#nav-placeholder").load("/navbar.html");
39 changes: 39 additions & 0 deletions base36/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="apple-touch-icon" sizes="180x180" href="/favicon/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon/favicon-16x16.png">
<link rel="manifest" href="/site.webmanifest">
<title>Callum Gilchrist</title>

<link rel="stylesheet" href="/main.css">
<link rel="stylesheet" href="/split.css">
</head>
<body>
<div id="nav-placeholder">

</div>
<div id="main" class="consoleStyle">
<h1>IGC Helpers</h1>
<div id="converter">
<p>Base 36 is used in the filenames of IGF files, it can be converted to base 10 (decimal) here</p>
<div class="split left">
<form>
<label for="b36in">Base 36 String:</label>
<input id="b36in" oninput="updateB36()">
</form>
<form>
<label for="b10in">Base 10 String:</label>
<input id="b10in" oninput="updateB10()">
</form>
</div>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script src="indexScripts.js"></script>
</body>
</html>
17 changes: 17 additions & 0 deletions base36/indexScripts.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
$("#nav-placeholder").load("/navbar.html");

function b10ToB36(b10) {
return parseInt(b10).toString(36).toUpperCase();
}

function b36ToB10(b36) {
return parseInt(b36, 36);
}

function updateB36() {
$(`#b10in`).val(b36ToB10(document.getElementById(`b36in`).value));
}

function updateB10() {
$(`#b36in`).val(b10ToB36(document.getElementById(`b10in`).value));
}
2 changes: 2 additions & 0 deletions navbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
<a href="#" onclick="showProjects()">Projects</a>
<ul class="subList" id="projectList">
<li><a href="/glidingProjects/V1/index.html">Gliding Utility</a></li>
<li><a href="/base36/index.html">Base 36 Converter</a></li>
<!-- <li><a href="/CompSciSearch/index.html">Programming Search Engine</a></li> -->
<!-- <li><a href="/CircleDetection/index.html">Circle Detection</a></li> -->
</ul>
<a href="#">Contact</a>
Expand Down

0 comments on commit d2cdd30

Please sign in to comment.