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
package com.mealbalance.ws; | |
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.Collection; | |
import java.util.LinkedHashMap; | |
import java.util.Map; | |
import java.util.logging.Level; | |
import java.util.logging.Logger; |
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
/** | |
* A mock for the java.util.Timer.schedule() method that allows manually incrementing time | |
* so as to have deterministic unit tests. | |
*/ | |
private static class MockTimer implements ScheduledTimer { | |
private final ArrayList<ATask> tasks = new ArrayList<ATask>(); | |
@Override | |
public synchronized void schedule(TimerTask task, int delay, int period) { |
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 argparse | |
import os | |
import sys | |
import urllib2 | |
import json | |
import collections | |
# initialize the argParser with common arguments such as environment | |
def initArgParser(scriptDescription): | |
parser = argparse.ArgumentParser(description=scriptDescription) |
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> | |
<title>Javascript Scope Test</title> | |
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7; IE=EmulateIE9"> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<script src="http://code.jquery.com/jquery-1.7.2.min.js"></script> | |
</head> |
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
<html> | |
<head> | |
<title>Interactive Line Graph</title> | |
<!--<script src="http://d3js.org/d3.v2.js"></script>--> | |
<script src="https://raw.github.com/mbostock/d3/8fe5b945ed7f4867b13a257d424dd29b1dd37e13/d3.v2.js"></script> | |
<script src="http://code.jquery.com/jquery-1.7.2.min.js"></script> | |
<script src="sample_data.js"></script> | |
<script src="line-graph.js"></script> | |
<link rel="stylesheet" href="style.css" type="text/css"> | |
<style> |
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
// patched version of d3.v2.js | |
// bug report that this patches is at https://github.com/mbostock/d3/issues/655 | |
(function(){if (!Date.now) Date.now = function() { | |
return +new Date; | |
}; | |
try { | |
document.createElement("div").style.setProperty("opacity", 0, ""); | |
} catch (error) { | |
var d3_style_prototype = CSSStyleDeclaration.prototype, |
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
// patched version of d3.v2.js | |
// bug report that this patches is at https://github.com/mbostock/d3/issues/655 | |
(function(){if (!Date.now) Date.now = function() { | |
return +new Date; | |
}; | |
try { | |
document.createElement("div").style.setProperty("opacity", 0, ""); | |
} catch (error) { | |
var d3_style_prototype = CSSStyleDeclaration.prototype, |
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
<html> | |
<head> | |
<title>Interactive Line Graph</title> | |
<!--<script src="http://d3js.org/d3.v2.js"></script>--> | |
<script src="https://raw.github.com/mbostock/d3/8fe5b945ed7f4867b13a257d424dd29b1dd37e13/d3.v2.js"></script> | |
<script src="http://code.jquery.com/jquery-1.7.2.min.js"></script> | |
<script src="sample_data.js"></script> | |
<script src="line-graph.js"></script> | |
<link rel="stylesheet" href="style.css" type="text/css"> | |
<style> |
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
<html> | |
<head> | |
<title>Issue 655</title> | |
<script src="https://github.com/benjchristensen/d3/raw/fix-log-ticks/d3.v2.js"></script> | |
</head> | |
<body> | |
<a href="https://github.com/mbostock/d3/issues/655">D3.js Issue 655</a> | |
<p> | |
Testing this code: | |
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
package pubsub; | |
import java.nio.ByteBuffer; | |
import java.util.concurrent.TimeUnit; | |
import rx.Observable; | |
import rx.Observable.Operator; | |
import rx.Scheduler.Worker; | |
import rx.Subscriber; | |
import rx.functions.Func1; |