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
// Sum All Primes.js | |
/* | |
Sum all the prime numbers up to and including the provided number. | |
A prime number is defined as a number greater than one and having only two divisors, one and itself. | |
For example, 2 is a prime number because it's only divisible by one and two. | |
The provided number may not be a prime. |
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
{ | |
// Use IntelliSense to learn about possible attributes. | |
// Hover to view descriptions of existing attributes. | |
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"type": "node", | |
"request": "launch", | |
"name": "Launch Program", |
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 showMsg(msg){ | |
console.log(msg); | |
} | |
function passMsg(myMsg){ | |
showMsg(myMsg); | |
return("done"); | |
} | |
var myMsg = "Hello World."; |
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
/* crack.c - program to crack DES encypted passwords of up to 4 characters, plus 2 character salt | |
* | |
* Uses brute force method via recursively generating all combinations of letters contained in alphabet[] | |
* hashing the generated password with the suffixed salt, and returning a match value of 1 if a collision is detected | |
* ie; there is a match between the given hash and generated hash | |
* | |
* Have updated code to eliminate all global variables, instead passing variables into functions where required | |
* Memory overheads still acceptable as recursion depth is low, and arrays are passed by reference not value | |
*/ |