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 countdown = function(end) { | |
var start = moment(); | |
var d = end.diff(start); | |
var dur = moment.duration(d); | |
var days = dur.days(); | |
var hours = dur.hours(); | |
var minutes = dur.minutes(); | |
var seconds = dur.seconds(); | |
$("#countdown").html(days + " days " + hours + " hours " + minutes + " minutes " + seconds + " seconds "); |
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
class UnionFind { | |
var id:Int[]; | |
var count:Int; | |
init(N:Int) { | |
count = N; | |
id = []; | |
for(var i = 0; i < N; i++) { | |
id.append(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
local Color, colors, Group, groups, styles = require('colorbuddy').setup() | |
local M = {} | |
function M.setup(opts) | |
opts = opts or {} | |
if opts.primary then | |
Color.new('primary', opts.primary) | |
else |