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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
[ | |
{ | |
"errors" : "", | |
"numDashboards" : 3, | |
"dashboard" : | |
[ { | |
"id" : 0, | |
"name" : "costs", | |
"numCharts" : 1, | |
"chart" : [ |
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
$(document).ready(function() { | |
var source = null; | |
var activeDashboardId = 0; | |
render = function() { | |
$.getJSON( | |
'/edens_group/test/list', | |
function(data) { | |
console.log(data); | |
for(datum of data) { | |
console.log("Num Dashboards: " + datum.numDashboards); |
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
section#body-section #dashboard-wrapper { | |
width: 97%; | |
display: block; | |
margin-left: auto; | |
margin-right: auto; | |
border: dashed black 1px; | |
padding: 1em; | |
} | |
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
/** | |
* Partial Binary Search Tree class. | |
* @author Bijan Vakili | |
*/ | |
var Node = function() { | |
// Private variable to access 'this' context from privileged method | |
var that = this; | |
// Public variables |
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
.box-wrapper { | |
width: 250px; | |
height: 250px; | |
} | |
.box-wrapper > .box{ | |
background: #000; | |
width: 8px; | |
height: 8px; | |
float: left; |
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
/** | |
* Create 25x25 checker board and add hover and click listeners. | |
* Hovering should cross-hair column and row-wise boxes. | |
* Clicking should toggle box color to red. | |
* Clicking back space should reset colors to default. | |
* @author Bijan Vakili | |
*/ | |
$( document ).ready( function() { | |
var efficientContainer = '#result-efficient', |
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 jsonTable() { | |
var data = { | |
headers: ["First Name", "Last Name", "Age"], | |
rows: [ | |
["John", "Doe", 30], | |
["Jane", "Doe", 27], | |
["Mac", "Smith", 52] | |
] | |
}; |
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
/** | |
* Set intersect | |
* The algorithm is provided by Ophir LOJKINE. I modified it to work for sets. | |
* @author Ophir LOJKINE | |
* https://gist.github.com/lovasoa/3361645 | |
* @author Bijan Vakili | |
*/ | |
Set.prototype.intersect = function() { | |
var i, all, shortest, nShortest, n, len, ret = [], obj={}, nOthers; | |
arguments[arguments.length++] = this; |