Skip to content

Instantly share code, notes, and snippets.

td {
width: 2px;
height: 2px;
margin: 0;
padding: 2px;
}
var React = require('react');
module.exports = React.createClass({
render: function() {
return (
<div className="Bio" id="hi">
<p className="Bio-text">{this.props.text}</p>
</div>
)
}
var React = require('react');
var test = React.createFactory(require('../views/test.jsx'));
module.exports = HomeActivity;
/**
* @constructor
*/
function HomeActivity($root, storage, transport)
{
window.WEBLINC = window.WEBLINC || {};
window.WEBLINC.modules = (function () {
'use strict';
var $document = $(document),
validateArgs = function (args) {
_.forEach(args, function (arg) {
import Vec2 from 'vec2';
export default class RayMarcher
{
constructor()
{
this.__init();
}
/**
@dshook
dshook / ListToJSDataTable.js
Created October 8, 2014 17:54
ListToJSDataTable Create Table
function buildDataTable(table, id, extraclasses, includeFooter){
extraclasses = extraclasses || '';
includeFooter = includeFooter || false;
var sTbl = '<table cellpadding="0" cellspacing="0" border="0" class="table dataTable ' + extraclasses + '" id="' + id + '">';
sTbl += '<thead>';
for (var h in table.headers) {
var header = table.headers[h];
sTbl += '<tr ';
@dshook
dshook / ListToJSController.cs
Last active August 29, 2015 14:07
ListToJSController
public object Get
(
DateTime start,
DateTime end
)
{
//get model data and format for the table output
var modelData = Model.GetData(start, end)
.Select(l => new{
@dshook
dshook / ListToDataTable.cs
Created October 8, 2014 17:43
ListToDataTable
public static class ListToDataTable
{
public static JsDataTable ConvertListToJsDataTable<T>(List<T> items)
{
JsDataTable dataTable = new JsDataTable();
//Get all the properties for the headers
PropertyInfo[] Props = typeof(T).GetProperties(BindingFlags.Public | BindingFlags.Instance);
//create empty header
var header = new List<JsDataTableRow>() { new JsDataTableRow(){ cells = new List<JsDataTableCell>() } };
@dshook
dshook / map-dropdown.html
Created September 24, 2014 04:33
map dropdown
<select id="map-color">
<option value="rev">Revenue</option>
<option value="revPerPop">Revenue / Population</option>
<option value="popPerRev">Population / Revenue</option>
<option value="medInc">Median Household Income</option>
<option value="medIncPerRev">Median Income / Revenue</option>
<option value="totMoney">Median Income * Population</option>
</select>
@dshook
dshook / map.js
Last active August 29, 2015 14:06
Leaflet map javascript
var map = null;
var zipLayer = null;
var resultStats = {
min: 0,
max: 0,
mean: 0,
variance: 0,
deviation: 0
};