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
// Write a program that converts a human readable column header into a column index. | |
// A column header is an arbitrary length string of the characters A through Z, e.g: "A", "B", "AB", "BA" or "AAK". | |
// A represents the first column and its index is 1, B is the second with an index of 2, AA is the 27th column, etc. | |
// The program should read the column header from standard in and print the result to standard out as a string of digits. | |
// Given an input string of "A" the program should output only "1". | |
// | |
// Note that you can compile and test your code in the browser multiple times before submitting. | |
import java.io.BufferedReader; |
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
/* normalize.css v2.1.0 | MIT License | git.io/normalize */article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary { | |
display: block | |
} | |
audio,canvas,video { | |
display: inline-block | |
} | |
audio:not([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
#!/bin/bash | |
usage() { | |
cat << EOF | |
Usage: $0 [OPTION]... COMMAND | |
Execute the given command in a way that works safely with cron. This should | |
typically be used inside of a cron job definition like so: | |
* * * * * $(which "$0") [OPTION]... COMMAND | |
Arguments: |
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
Google Cloud SQL ON | |
Google Cloud Storage ON | |
Google Cloud Storage JSON API ON | |
Google Compute Engine ON | |
Ad Exchange Seller API | |
Admin SDK | |
AdSense Host API | |
AdSense Management API | |
Analytics API | |
Audit API |
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
Here's where I understand the state of the art to be: | |
- In [this INRIA tech report](http://hal.inria.fr/docs/00/55/55/88/PDF/techreport.pdf), Shapiro, Preguiça, Baquero and Zawirski (SPBZ) prove, amongst other things, that a sufficient condition for CRDTs to achieve eventual consistency on networks which may reorder and duplicate packets (which I'll call **flaky** networks, henceforth) is that | |
1. the underlying datatype forms a semilattice, | |
2. messages are full states, | |
3. incoming messages are combined with the node's current state using the least-upper-bound operation in the semilattice. | |
- It's possible to relax condition 2 and still achieve eventual consistency over flaky networks by fragmenting the state into independent parts and transmitting updates to each part separately. For instance, in the G-Set CRDT (an add-only bitset) one can transmit only the index of the element to be added. | |
- In [these slides from a talk at Dagstuhl](http://www.dagstuhl.de/mat/Files/13/13081/13081.BaqueroCarlos.Sl |
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
/* __ *\ | |
** ________ ___ / / ___ Scala API ** | |
** / __/ __// _ | / / / _ | (c) 2003-2013, LAMP/EPFL ** | |
** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** | |
** /____/\___/_/ |_/____/_/ | | ** | |
** |/ ** | |
\* */ | |
package scala.concurrent |
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
/* __ *\ | |
** ________ ___ / / ___ Scala API ** | |
** / __/ __// _ | / / / _ | (c) 2008-2013, LAMP/EPFL ** | |
** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** | |
** /____/\___/_/ |_/____/_/ | | ** | |
** |/ ** | |
\* */ | |
package scala.util |
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
RATE_LIMIT_SCRIPT = r''' | |
local now = tonumber(ARGV[1]) | |
local required = tonumber(ARGV[2]) | |
local rate = tonumber(ARGV[3]) | |
local per_secs = tonumber(ARGV[4]) | |
local do_subtract = tonumber(ARGV[5]) == 1 | |
local full_at = tonumber(redis.call('GET', KEYS[1])) or 0 | |
local score, result | |
if full_at < now then | |
score = rate |
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
#!/bin/sh | |
# modified by jfro from http://www.cnysupport.com/index.php/linode-dynamic-dns-ddns-update-script | |
# Update: changed because the old IP-service wasn't working anymore | |
# Uses curl to be compatible with machines that don't have wget by default | |
# modified by Ross Hosman for use with cloudflare. | |
# | |
# Place at: | |
# /usr/local/bin/cf-ddns.sh | |
# run `crontab -e` and add next line: | |
# 0 */5 * * * * /usr/local/bin/cf-ddns.sh >/dev/null 2>&1 |
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
{ | |
"_id" : "bpc.views.merchant.abc-def.2014.6.12", | |
"daily" : { | |
"2" : 1 | |
}, | |
"updated_on" : "2014-06-12T21:38:22.620-08:00" | |
} |
OlderNewer