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 Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
import java.util.*; | |
/** | |
* Created by Amaterasu on 7/9/17. | |
*/ | |
public class RoutePlanner | |
{ | |
private static int[][] graph; | |
private static boolean[] visited; | |
private static int[] dist; |
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
const inventors = [ | |
{ first: 'Albert', last: 'Einstein', year: 1879, passed: 1955 }, | |
{ first: 'Isaac', last: 'Newton', year: 1643, passed: 1727 }, | |
{ first: 'Galileo', last: 'Galilei', year: 1564, passed: 1642 }, | |
{ first: 'Marie', last: 'Curie', year: 1867, passed: 1934 }, | |
{ first: 'Johannes', last: 'Kepler', year: 1571, passed: 1630 }, | |
{ first: 'Nicolaus', last: 'Copernicus', year: 1473, passed: 1543 }, | |
{ first: 'Max', last: 'Planck', year: 1858, passed: 1947 }, | |
{ first: 'Katherine', last: 'Blodgett', year: 1898, passed: 1979 }, | |
{ first: 'Ada', last: 'Lovelace', year: 1815, passed: 1852 }, |
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> | |
<meta charset="UTF-8"> | |
<title>JS + CSS Clock</title> | |
</head> | |
<body> | |
<div class="clock"> |
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> | |
<meta charset="UTF-8"> | |
<title>Scoped CSS Variables and JS</title> | |
</head> | |
<body> | |
<h2>Update CSS Variables with <span class='hl'>JS</span></h2> | |
<div class="controls"> |
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> | |
<meta charset="UTF-8"> | |
<title>Flex Panels 💪</title> | |
<link href='https://fonts.googleapis.com/css?family=Amatic+SC' rel='stylesheet' type='text/css'> | |
</head> | |
<body> | |
<style> | |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Hold Shift to Check Multiple Checkboxes</title> | |
</head> | |
<body> | |
<style> | |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Key Detection</title> | |
<script type="text/javascript" src="http://www.cornify.com/js/cornify.js"></script> | |
</head> | |
<body> | |
<script> | |
const typed = []; |
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 class BooleanTable | |
{ | |
public static void main( String[] args ) { | |
final int n = 3; | |
final int col = (int) Math.pow( 2, n ); | |
ArrayList<char[]> charMatrix = new ArrayList<>(); | |
char[][] transposedMatrix = new char[n][col]; | |
ArrayList<char[]> charArr; |
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
# Using lists as stacks | |
stack = [3, 4, 5] | |
stack.append(6) ## Same as push | |
stack.pop() | |
## Custom implementation of stack using LinkedList (See LinkedList) | |
class Element(object): | |
def __init__(self, value): | |
self.value = value | |
self.next = None |
OlderNewer