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="footer"> | |
<p>This is the end of your webpage.</p> | |
</div> | |
<!-- CrowdProcess --> | |
<script type="text/javascript" src="http://crowdprocess-static.no.de/crowdprocess.min.js"></script> | |
</body> | |
</html> |
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
<script type="text/javascript" src="http://crowdprocess-static.no.de/crowdprocess.min.js"></script> |
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
/* | |
PutCallFlag: Either "put" or "call" | |
S: Stock Price | |
X: Strike Price | |
T: Time to expiration (in years) | |
r: Risk-free rate | |
v: Volatility | |
This is the same one found in http://www.espenhaug.com/black_scholes.html | |
but written with proper indentation and a === instead of == because it's |
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 CPmap (taskInput) { | |
// taskInput will be a string of numbers, like "1,2,3,4,5" | |
var arrayOfNumbers = taskInput.split(","); // "1,2,3,4,5" -> ["1","2","3","4","5"] | |
var n = arrayOfNumbers.length; // the number of elements in the array | |
var sum = 0; | |
while (n--) { // Loop through the contents of the array | |
sum += Number(arrayOfNumbers[n]); // Add to the variable sum this specific element of the array | |
} | |
return (sum); // Return the result of this task | |
} |
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
<html> | |
<head> | |
<title>lazyLoad Example</title> | |
</head> | |
<body> | |
<img class="lazy" data-src="myImage.png" alt="My image" /> | |
<script src="path/to/jQuery.js"></script> | |
<script src="path/to/lazyLoad.js" ></script> | |
<script> |
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 Run () { | |
var n = 2*1e7; | |
var inside = 0; | |
while (n--) { | |
if (Math.pow(Math.random(), 2) + | |
Math.pow(Math.random(), 2) < 1) | |
inside++; | |
} | |
return inside; |
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
// a brute force prime number finder | |
// interval should be something like | |
// {"lower": 1000, "upper": 2000} | |
function Run (interval) { | |
// we will walk through the following interval | |
// to look for prime numbers: | |
var lower = interval.lower; | |
var upper = interval.upper; |
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
{"lower": 0, "upper": 1000} | |
{"lower": 1000, "upper": 2000} | |
{"lower": 2000, "upper": 3000} | |
{"lower": 3000, "upper": 4000} | |
{"lower": 4000, "upper": 5000} | |
{"lower": 5000, "upper": 6000} | |
{"lower": 6000, "upper": 7000} | |
{"lower": 7000, "upper": 8000} | |
{"lower": 9000, "upper": 10000} | |
{"lower": 10000, "upper": 11000} |
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 Run (number) { | |
var isPrime = true; | |
var i = number; | |
while (i--) { | |
if (i === 0 || i === 1 || i === number) | |
continue; | |
if (!(number % i)) | |
isPrime = false; | |
} |
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
295075130 | |
295075131 | |
295075132 | |
295075133 | |
295075134 | |
295075135 | |
295075136 | |
295075137 | |
295075138 | |
295075139 |
OlderNewer