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
public void Echelon_Form() | |
{ | |
// Go through the first column, looking for something that is not a zero, | |
// Swap it with the first row, & make it a 1. | |
Fraction zero = new Fraction(0); | |
for (int i=0; i<columns; i++) // Going up to down | |
{ | |
// Divide each element along the column by pivot | |
Fraction divisor = new Fraction(A[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
// Converts from C# DateTime object to JavaScript Date object | |
function parseDate(date) { | |
return new Date(parseInt(/-?\d+/.exec(date)[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
// What a classic! | |
function fibonacci(n) { | |
if(n == 1) return 1 | |
else if (n == 2) return 1 | |
else return (fibonacci(n-1) + fibonacci(n-2)) | |
} | |
// Uses Node's "readline" module for input | |
// https://nodejs.org/api/readline.html | |
const readline = require('readline').createInterface({ |
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
let requireGlob = require('require-glob') | |
let tests = await requireGlob(['api/**/test.js'], { | |
// Custom reducer returns flat array of functions | |
reducer: (options, moduleExports, module)=> { | |
// 'moduleExports' starts as an object, convert to array | |
if(!Array.isArray(moduleExports)) moduleExports = [] | |
moduleExports.push(module.exports) | |
return moduleExports | |
} |
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
<h2>Headline</h2> | |
<p>This is how I'm feeling:</p> | |
<p>I am feeling okay!</p> |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>Hello, world!</title> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
</head> | |
<body> | |
<h1>Welcome 2 My Homepage</h1> | |
<p>Thank u for visiting <code>https://www.example.com/</code>.</p> |