This file contains hidden or 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
| 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>() } }; |
This file contains hidden or 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
| 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{ |
This file contains hidden or 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
| 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 '; |
This file contains hidden or 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 Vec2 from 'vec2'; | |
| export default class RayMarcher | |
| { | |
| constructor() | |
| { | |
| this.__init(); | |
| } | |
| /** |
This file contains hidden or 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
| window.WEBLINC = window.WEBLINC || {}; | |
| window.WEBLINC.modules = (function () { | |
| 'use strict'; | |
| var $document = $(document), | |
| validateArgs = function (args) { | |
| _.forEach(args, function (arg) { |
This file contains hidden or 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 React = require('react'); | |
| var test = React.createFactory(require('../views/test.jsx')); | |
| module.exports = HomeActivity; | |
| /** | |
| * @constructor | |
| */ | |
| function HomeActivity($root, storage, transport) | |
| { |
This file contains hidden or 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 React = require('react'); | |
| module.exports = React.createClass({ | |
| render: function() { | |
| return ( | |
| <div className="Bio" id="hi"> | |
| <p className="Bio-text">{this.props.text}</p> | |
| </div> | |
| ) | |
| } |
This file contains hidden or 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
| td { | |
| width: 2px; | |
| height: 2px; | |
| margin: 0; | |
| padding: 2px; | |
| } |
This file contains hidden or 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> | |
| <meta charset="utf-8"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <title>Game of Life</title> | |
| <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries --> | |
| <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> |
This file contains hidden or 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 TABLE_SIZE = 200; | |
| var ALIVE = 'black'; | |
| var DEAD = 'white'; | |
| //gamestate | |
| function initState(size){ | |
| var board = []; | |
| for(var y = 0; y < size; y++){ | |
| var row = []; |