This file contains hidden or 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() { | |
function getCurrentTime() { | |
var now = new Date(); | |
var nowInUTC = new Date(now.getUTCFullYear(), now.getUTCMonth(), now.getUTCDate(), now.getUTCHours(), now.getUTCMinutes(), now.getUTCSeconds()); | |
var nowInPacific = new Date(nowInUTC - 7*60*60*1000); | |
return nowInPacific; | |
} | |
function getNextStartTimeAfter(time) { | |
var startTimes = [ |
This file contains hidden or 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
-- Haskell solution to Google Code Jam 2011 problem, Bot Trust | |
-- http://code.google.com/codejam/contest/dashboard?c=975485#s=p0 | |
import Data.List (find) | |
import Data.Maybe (fromMaybe) | |
import System.Environment (getArgs) | |
data Robot = Blue | Orange | |
deriving Eq |
This file contains hidden or 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 time | |
import sys | |
arg = sys.argv[1]; | |
def testFun(): | |
pass | |
if arg == 'class': |
This file contains hidden or 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
Eclipse template for showing a Toast. To use it, type ctrl+space, then "toast", then enter. | |
Or, select a String or string ID, type ctrl+space, then end, then enter. | |
Window > Preferences > Java > Editor > Templates | |
Name: Toast | |
Context: Java Statements | |
Description: Create and show a Toast (Android) | |
Pattern: Toast.makeText(this, ${word_selection}${}, Toast.LENGTH_SHORT).show(); |
NewerOlder