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> | |
<div id="history"> | |
<ul id="completed_tasks"> | |
</ul> | |
</div> | |
<div id="working"> | |
Working on <span id="current_task">current task</span>, <span id="task_countdown">25:00</span> left. | |
</div> | |
<div id="break"> | |
Completed <span id="finished_task">a task</span>. On break, <span id="break_countdown">5:00</span> left. |
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
from itertools import permutations | |
pieces = [[0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0], | |
[0, 0, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0], | |
[0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1], | |
[1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 1], | |
[0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0], | |
[0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1]] | |
def rotations(piece): |
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 objectsEqual = (a, b) => { | |
const aProps = Object.getOwnPropertyNames(a), | |
bProps = Object.getOwnPropertyNames(b); | |
if (aProps.length != bProps.length) { | |
return false; | |
} | |
for (var i=0; i<aProps.length; i++) { | |
const propName = aProps[i]; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
#include <iostream> | |
using namespace std; | |
int main() { | |
int count = 0, foo = 0, i = 0, j = 0, m = 0, n = 0; | |
const int LEN = 10; | |
int a[LEN][LEN]; | |
int b[LEN][LEN]; | |
for (i = 0; i < LEN; i++) { | |
for (j = 0; j < LEN; j++) { |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
HAI 1.1 | |
I HAS A t ITZ A YARN | |
GIMMEH t | |
MAEK t A NUMBR | |
VISIBLE t | |
BTW I HAS A count ITZ 0 | |
IM IN YR mainloop UPPIN YR count TIL BOTH SAEM count AN t | |
I HAS A n ITZ A NUMBR | |
GIMMEH n | |
VISIBLE n |
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 collections | |
class TrieNode(object): | |
def __init__(self, letter=None): | |
self.letter = letter | |
self.freq = 1 | |
self.suffixes = collections.OrderedDict() | |
def add(self, word): | |
node = self | |
for letter in word: |
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
# Definition for a binary tree node | |
class TreeNode: | |
def __init__(self, x): | |
self.val = x | |
self.left = None | |
self.right = None | |
class Solution: | |
# @param A : root node of tree | |
# @return an integer |
NewerOlder