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
<?php | |
header("Content-Type: text/event-stream\n\n"); | |
echo 'data: ' . json_encode( | |
array( | |
0 => array( | |
'time' => time(), | |
'message' => 'Some kind of foo' | |
), | |
1 => array( |
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>Simple Sparkline using SVG Path and d3.js</title> | |
<script src="http://mbostock.github.com/d3/d3.v2.js"></script> | |
<style> | |
/* tell the SVG path to be a thin blue line without any area fill */ | |
path { | |
stroke: steelblue; | |
stroke-width: 1; | |
fill: none; |
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>Animated Sparkline using SVG Path and d3.js</title> | |
<script src="http://mbostock.github.com/d3/d3.v2.js"></script> | |
<style> | |
/* tell the SVG path to be a thin blue line without any area fill */ | |
path { | |
stroke: steelblue; | |
stroke-width: 1; | |
fill: none; |
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>Animated Sparkline using SVG Path and d3.js</title> | |
<script src="http://mbostock.github.com/d3/d3.v2.js"></script> | |
<style> | |
/* tell the SVG path to be a thin blue line without any area fill */ | |
path { | |
stroke: steelblue; | |
stroke-width: 1; | |
fill: none; |
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>DIV Popup with "Lightbox" Style</title> | |
<script src="http://code.jquery.com/jquery-1.6.2.min.js"></script> | |
<style> | |
/* popup div contents */ | |
DIV.lightbox-content { | |
position: absolute; | |
margin-right: auto; | |
margin-left: 5%; |
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 static org.junit.Assert.*; | |
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.Collection; | |
import java.util.Iterator; | |
import java.util.LinkedHashMap; | |
import java.util.List; | |
import java.util.Map; | |
import java.util.logging.Level; |
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
/** | |
* Use reflection to allow performing the same tests on all GETTER methods. | |
* | |
* @param cache | |
* @param m | |
* @param argArray | |
* @throws IllegalAccessException | |
* @throws InvocationTargetException | |
*/ | |
private void testGetMethod(Method m, Object[] argArray) throws IllegalAccessException, InvocationTargetException { |
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
#!/usr/bin/env python | |
import subprocess | |
import argparse | |
import zipfile | |
import os | |
parser = argparse.ArgumentParser(description='Upload a file or files to a RESTful endpoint') | |
parser.add_argument('-e', '--environment', metavar='TEST/PROD', | |
help='The environment to upload to: TEST/PROD') |
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 java.util.ArrayList; | |
import java.util.Collection; | |
import java.util.LinkedHashMap; | |
import java.util.Map; | |
import java.util.logging.Level; | |
import java.util.logging.Logger; | |
import junit.framework.TestCase; | |
import org.junit.Test; |
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 java.lang.reflect.Array; | |
import java.lang.reflect.InvocationHandler; | |
import java.lang.reflect.InvocationTargetException; | |
import java.lang.reflect.Method; | |
import java.lang.reflect.Proxy; | |
import java.util.ArrayList; | |
import java.util.List; | |
import com.sun.javadoc.Doc; | |
import com.sun.javadoc.DocErrorReporter; |
OlderNewer