diff --git a/Lab 4/Question Answers.txt b/Lab 4/Question Answers.txt new file mode 100644 index 0000000000000000000000000000000000000000..1d57a76da7ba8d13ee33c1f31a2c9dc2e25695c6 --- /dev/null +++ b/Lab 4/Question Answers.txt @@ -0,0 +1,5 @@ +1. I see the value of Agile software development, but this + trial run was too rushed to fully represent its benefits. +2. My role as programmer was fun, I'm not very good at coming + up with ideas on short notice, but I can implement other + people's ideas and have fun doing it. \ No newline at end of file diff --git a/Lab 4/css/index.css b/Lab 4/css/index.css new file mode 100644 index 0000000000000000000000000000000000000000..03e6c86a8dbeb53bdd75f35ec40b246672a8068f --- /dev/null +++ b/Lab 4/css/index.css @@ -0,0 +1,53 @@ +*{ + font-family: verdana; +} + +#Main{ + padding-left: 20px; + padding-top: 4px; +} +.navbar-brand{ + user-select: none; + cursor: default; +} + +/* Begin rainbow background (https://codepen.io/nohoid/pen/kIfto?editors=1100) */ +.wrapper{ + z-index: -1; + height: 100%; + width: 100%; + left:0; + right: 0; + top: 0; + bottom: 0; + position: absolute; + background: linear-gradient(124deg, #ff2400, #e81d1d, #e8b71d, #e3e81d, #1de840, #1ddde8, #2b1de8, #dd00f3, #dd00f3); + background-size: 1800% 1800%; + + -webkit-animation: rainbow 120s ease infinite; + -z-animation: rainbow 120s ease infinite; + -o-animation: rainbow 120s ease infinite; + animation: rainbow 120s ease infinite; +} + +@-webkit-keyframes rainbow{ + 0%{background-position:0% 82%} + 50%{background-position:100% 19%} + 100%{background-position:0% 82%} +} +@-moz-keyframes rainbow{ + 0%{background-position:0% 82%} + 50%{background-position:100% 19%} + 100%{background-position:0% 82%} +} +@-o-keyframes rainbow{ + 0%{background-position:0% 82%} + 50%{background-position:100% 19%} + 100%{background-position:0% 82%} +} +@keyframes rainbow{ + 0%{background-position:0% 82%} + 50%{background-position:100% 19%} + 100%{background-position:0% 82%} +} +/* End rainbow background */ \ No newline at end of file diff --git a/Lab 4/index.html b/Lab 4/index.html new file mode 100644 index 0000000000000000000000000000000000000000..7ceab1464fee0642e5c888fc670be1d148bb56f9 --- /dev/null +++ b/Lab 4/index.html @@ -0,0 +1,35 @@ +<!doctype html> +<html> + <!-- Hosted on https://www.cs.drexel.edu/~nim28/CS101/Lab-4/index.html --> + <head> + <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" + integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous"> + <link rel="stylesheet" href="./css/index.css"/> + <!-- Util Libraries --> + <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" + integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script> + <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" + integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script> + <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" + integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script> + <script src="./js/index.js"></script> + <head> + <body> + <nav class="navbar navbar-expand-lg navbar-dark bg-dark"> + <div class="collapse navbar-collapse" id="navbarSupportedContent"> + <div class="navbar-brand"> + Password Generator + </div> + <input id="in" class="form-control mr-sm-2"> + <button id="bt" class="btn btn-outline-success my-2 my-sm-0">Generate</button> + </div> + </nav> + <div class="wrapper"> + <div id="Main"> + <p class="output"></p> + </div> + </div> + <body> + + +</html> \ No newline at end of file diff --git a/Lab 4/js/index.js b/Lab 4/js/index.js new file mode 100644 index 0000000000000000000000000000000000000000..01d034825cc00fbba7fab83136a90f5904655a5e --- /dev/null +++ b/Lab 4/js/index.js @@ -0,0 +1,73 @@ +var invalid = new Set(["and","not","the","it","is","or","an","a","i"]); +var passes = 10; // Change pass number (WIP) +var output; +var input; +var questions = new Array( + "Describe your dream house", // ~Nick + "Describe the term \"family\"", // ~Nick + "Describe why your role model is your role model", // ~Alec + "Describe your ideal vacation" // ~Alec +); + +$(document).ready(function(){ // Upon DOM load + $("#in").attr("placeholder", questions[Math.floor(Math.random()*questions.length)] + "..."); // Ask question +}); + +$(function(){ // JQuery event listener + $("#bt").click(function(){ // On button click + /* Logic */ + input = new String($('input.form-control').val()); // Get input + $('input.form-control').val(""); // Clear box + if(input.trim() === "")return; // Abort if no input + $('p.input').html(input); // Print input text for user + var parse = input.split(" "); + for(var i=0; i<parse.length; i++){ + // Delete invalid words + if(invalid.has(parse[i].toLowerCase())){ + delete parse[i]; + } + } + for(var j=0; j<passes; j++){ + $("p.output").append(getRandomPass() + "<br/>"); // Display passwords for user + } + /* Nested Functions */ + function getRandomPass(){ + return populate( + shuffle( // Fisher-Yates shuffle + parse.filter(function (el){ + // Remove empty elements + return el != null; + }) + ).join(" ").split("") // To char array -> Spaces to numbers + ); + } + // Replace spaces with single digit random numbers + function populate(input){ + var output = ""; + for(var j in input){ + if(input[j] === " "){ + input[j] = Math.round(Math.random() * 9); + } + output += input[j]; + } + return output; + } + // Begin Fisher-Yates randomization algorithm (http://sedition.com/perl/javascript-fy.html) + function shuffle(array){ + var currentIndex = array.length, temporaryValue, randomIndex; + // While there remain elements to shuffle... + while (0 !== currentIndex){ + // Pick a remaining element... + randomIndex = Math.floor(Math.random() * currentIndex); + currentIndex -= 1; + // And swap it with the current element. + temporaryValue = array[currentIndex]; + array[currentIndex] = array[randomIndex]; + array[randomIndex] = temporaryValue; + } + return array; + } + // End Fisher-Yates randomization algorithm + }); +}); + diff --git a/Lab 5/CI101-Lab5-InfoRetrieval.docx b/Lab 5/CI101-Lab5-InfoRetrieval.docx new file mode 100644 index 0000000000000000000000000000000000000000..d5f49c58c01a3642afe0a28499b455b921e984dc Binary files /dev/null and b/Lab 5/CI101-Lab5-InfoRetrieval.docx differ