This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="Projects" style="visibility: hidden"></div> | |
<!-- Projects SECTION --> | |
<div class="container-fluid rounded" style="background-color:#FF6600;"> | |
<!-- HEADER --> | |
<div class="jumbotron" style="background-color: black; margin-top:50px"> | |
<h1 class="text-center" style="color: #FF6600; font-family: 'Cinzel Decorative', cursive; margin-top: -30px "> | |
<hr> Projects <hr> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// How in gods name did this work? I don't understand what I even did. It started off making sense and 25 console logs and muckeries later | |
// it has come to this. Literally wtf. | |
function sumPrimes(num){ | |
var i = 2, nums = [], primes = []; | |
while(i <= num){ | |
nums.push(i); | |
i++; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function smallestCommons(arr) { | |
// sort to ensure smallest to largest | |
function sorting_hat(a,b){ | |
return a-b; | |
} | |
arr.sort(sorting_hat); | |
// set lower and upper bounds for range |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var arr1 = [ | |
[21, "Bowling Ball"], | |
[2, "Dirty Sock"], | |
[1, "Hair Pin"], | |
[5, "Microphone"] | |
]; | |
var arr2 = [ | |
[2, "Hair Pin"], | |
[3, "Half-Eaten Apple"], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// I am a fucking savage. | |
function updateInventory(arr1, arr2){ | |
var merged = arr1.concat(arr2); | |
var JSON_merged = {}; | |
// utilizes fact that objects can not have repeating properties with the same name | |
// to filter out duplicates | |
// will retain the last seen duplicate element during loop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var map = { | |
"should return true." : '\n', | |
"should return false." : '\n', | |
"should return a boolean." : '\n', | |
"should return false" : '\n', | |
"should return true" : '\n', | |
"telephoneCheck(" : '', | |
'")' : '"', | |
'.' : '', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Created by Vampiire on 5/12/17. | |
*/ | |
// jQuery shortcuts | |
var i = 0, rand = 0, square = $('.square'), reset = $('#reset'); | |
// squares | |
var center = $('#square_5'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Created by Vampiire on 5/12/17. | |
Completely refactored thanks to Dan for his advice in teaching me how to use Jasmine for unit tests. | |
Was able to build a much more efficient and elegant board state checker by starting with simple cases and building up. | |
unit tests can be found here: http://jsfiddle.net/he6L475b/1/ | |
*/ | |
// jQuery shortcuts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Created by Vampiire on 5/12/17. | |
*/ | |
// jQuery shortcuts | |
var square = $('.square'), reset = $('#reset'), modal = $('.modal'), winnerOutput = $('#winnerOutput'); | |
// global variables | |
var userSelect, compSelect, row, column, board = [ ['1','2','3'], ['4','5','6'], ['7','8','9'] ], timeout, winner, boardCount = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Created by Vampiire on 5/11/17. | |
*/ | |
// jQuery shortcuts | |
var square = $('.square'), center = $('#square_5'), modal = $('.modal'), winnerOutput = $('#winnerOutput'); | |
// global variables | |
var userSelect, compSelect, row, column, board = [ ['1','2','3'], ['4','5','6'], ['7','8','9'] ], |