code
stringlengths
1
2.08M
language
stringclasses
1 value
// Copyright 2012 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicabl...
JavaScript
// Copyright 2012 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicabl...
JavaScript
// Copyright 2012 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicabl...
JavaScript
// Copyright 2012 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicabl...
JavaScript
// Copyright 2012 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicabl...
JavaScript
// Copyright 2012 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicabl...
JavaScript
// Copyright 2012 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicabl...
JavaScript
// Copyright 2012 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicabl...
JavaScript
// Copyright 2012 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicabl...
JavaScript
// Copyright 2012 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicabl...
JavaScript
// Copyright 2012 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicabl...
JavaScript
// Copyright 2012 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicabl...
JavaScript
// Copyright 2012 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicabl...
JavaScript
// Copyright 2012 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicabl...
JavaScript
// Copyright 2012 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicabl...
JavaScript
// Copyright 2012 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicabl...
JavaScript
// Copyright 2012 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicabl...
JavaScript
// Copyright 2012 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicabl...
JavaScript
// Copyright 2012 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicabl...
JavaScript
// Copyright 2013 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicabl...
JavaScript
// Copyright 2013 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicabl...
JavaScript
$(function() { function showMenu() { $("#gcb-nav-y").addClass("shown"); $(document.body).addClass('hide-overflow'); } function hideMenu() { $("#gcb-nav-y").removeClass("shown"); $(document.body).removeClass('hide-overflow'); } function toggleMenu() { if ($("#gcb-nav-y").hasClass("shown")) ...
JavaScript
describe('normalize scores', function() { var oldY; function arrayEqual(a, b) { if (a.length != b.length) { return false; } for (var i = 0; i < a.length; i++) { if (a[i] !== b[i]) { return false; } } return true; } beforeEach(function() { if (window.Y) { ...
JavaScript
basePath = '../../../..'; var YUI_BASE = process.env.YUI_BASE; var KARMA_LIB = process.env.KARMA_LIB; files = [ JASMINE, JASMINE_ADAPTER, YUI_BASE + '/yui/yui.js', YUI_BASE + '/yui-base/yui-base.js', YUI_BASE + '/node-core/node-core.js', YUI_BASE + '/array-extras/array-extras.js', YUI_BASE + '/dom-scree...
JavaScript
describe('assessment tags', function() { var LOGGING_LOCATION = 'http://localhost:8080/unit?unit=1&lesson=2'; var MESSAGES = { correctAnswer: 'Yes, the answer is correct.', incorrectAnswer: 'No, the answer is incorrect.', partiallyCorrectAnswer: 'The answer is partially correct.', yourScoreIs: 'Your...
JavaScript
basePath = '../../../..'; var KARMA_LIB = process.env.KARMA_LIB; files = [ JASMINE, JASMINE_ADAPTER, 'https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js', KARMA_LIB + '/jasmine-jquery-1.5.2.js', // Test files 'tests/unit/javascript_tests/modules_assessment_tags/*.js', // Test resources ...
JavaScript
// GoogleDriveTagParent refers to top, but karma tests run inside of an iframe. // Bind top to window so this difference doesn't cause breakage. // TODO(johncox): get rid of this when we write real tests using iframs. top = window; describe('core tags module', function() { window.cb_global = { schema: { p...
JavaScript
basePath = '../../../..'; var KARMA_LIB = process.env.KARMA_LIB; files = [ JASMINE, JASMINE_ADAPTER, 'https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js', KARMA_LIB + '/jasmine-jquery-1.5.2.js', // Test files 'tests/unit/javascript_tests/modules_core_tags/*.js', // Files to test 'modul...
JavaScript
describe('ButterBar', function() { var popup, message, close, butterBar; beforeEach(function() { jasmine.getFixtures().fixturesPath = 'base/'; loadFixtures( 'tests/unit/javascript_tests/assets_lib_butterbar/fixture.html'); popup = $('#gcb-butterbar-top').get(0); message = $('#gcb-butterbar-...
JavaScript
basePath = '../../../..'; var KARMA_LIB = process.env.KARMA_LIB; files = [ JASMINE, JASMINE_ADAPTER, 'https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js', KARMA_LIB + '/jasmine-jquery-1.5.2.js', // Test files 'tests/unit/javascript_tests/assets_lib_butterbar/*.js', // Files to test 'mo...
JavaScript
describe('V 1.4 Activities and Assessments', function() { var event_payloads, interactions; var auditDataDict, auditSource, auditIsAsync, mockLocation; function checkAuditValues(expectedData, expectedSource, expectedAsync) { // This addition to the data dict mocks the corresponding action in gcbAudit au...
JavaScript
{ "multiple_choice_activity": [{ "questionType": "multiple choice", "choices": [ ["A", true, "Correct."], ["B", false, "Incorrect"], ["C", false, "Incorrect"], ["D", false, "Incorrect"] ] }], "multiple_choice_group_activity": [{ "questionType": "multiple choice group", ...
JavaScript
basePath = '../../../..'; var KARMA_LIB = process.env.KARMA_LIB; files = [ JASMINE, JASMINE_ADAPTER, 'https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js', KARMA_LIB + '/jasmine-jquery-1.5.2.js', // Test file 'tests/unit/javascript_tests/assets_lib_activity_generic/tests.js', { patter...
JavaScript
describe('certificate criteria user interface', function() { window.cb_global = { schema: { properties: { course: { properties: { certificate_criteria: { _inputex : { is_peer_assessment_table : { 1: true, 2: fals...
JavaScript
basePath = '../../../..'; var KARMA_LIB = process.env.KARMA_LIB; files = [ JASMINE, JASMINE_ADAPTER, 'https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js', KARMA_LIB + '/jasmine-jquery-1.5.2.js', // Test files 'tests/unit/javascript_tests/modules_certificate/*.js', // Test resources { ...
JavaScript
describe('deepEquals', function() { it('matches objects which are equal', function() { var a = { 'a': [1, 2, 3], 'b': {'c': 'C', 'd': null} }; var b = { 'b': {'d': null, 'c': 'C'}, 'a': [1, 2, 3] }; expect(deepEquals(a, b)).toBe(true); }); it('distinguishes objects are ...
JavaScript
basePath = '../../../..'; files = [ JASMINE, JASMINE_ADAPTER, // Test files 'tests/unit/javascript_tests/modules_oeditor/*.js', // Files to test 'modules/oeditor/oeditor.js', 'modules/oeditor/popup.js', 'modules/oeditor/rte.js' ]; exclude = [ '**/karma.conf.js' ]; browsers = ['PhantomJS']; single...
JavaScript
<!-- -*- mode: javascript; -*- --> <div id="model_visualizations_dump"></div> <div id="answers_pie_chart"></div> <script> // Integration tests want to know what data page we're on, so give // them some text with which they can tell. Since these values are // supplied by the REST service, we can be sure we're on the ...
JavaScript
<!-- -*- mode: javascript; -*- --> <script src="/static/crossfilter-1.3.7/crossfilter-1.3.7/crossfilter.min.js"> </script> <script src="/static/d3-3.4.3/d3.min.js"> </script> <script src="/static/dc.js-1.6.0/dc.js-1.6.0/dc.min.js"> </script> <link rel="stylesheet" type="text/css" href="/static/dc.js-...
JavaScript
console.profile(); //start firefox javascript profiler /* Mikhail Breslav and Chris Kwan {breslav, ckwan}@cs.bu.edu http://cs-people.bu.edu/ckwan/cs511/ CS 511 Spring 2011 Project Client-side Parsing and Verification Parser for Propositional Logic Last update: 05/10/2011 */ /* Initialize tex...
JavaScript
/* StringFunctions.js Functions for Manipulating Strings Last update: 05/07/2011 Mikhail Breslav and Chris Kwan {breslav, ckwan}@cs.bu.edu http://cs-people.bu.edu/ckwan/cs511/ CS 511 Spring 2011 Project Client-side Parsing and Verification */ /* Return a new version of str with the first word removed....
JavaScript
/* Mikhail Breslav and Chris Kwan {breslav, ckwan}@cs.bu.edu http://cs-people.bu.edu/ckwan/cs511/ CS 511 Spring 2011 Project Client-side Parsing and Verification Parser for Propositional Logic Last update: 04/24/2011 */ /* Initialize text areas and class variables */ var message = "Enter an expression, then pre...
JavaScript
// include StringFunctions.js //document.write("<script type="text/javascript" src = "StringFunctions.js"></script>" ); /* Shortcut to get a document element by id. */ function $(id) { return document.getElementById(id); } /* Call update method if user presses Shift+Enter. */ function keypress(key...
JavaScript
var url = window.location.href; var link = ""; var linkIndex = 0; var linkUrl = ""; var numArray = new Array; numArray[0] = 15; numArray[1] = 20; numArray[2] = 30; for(i = 0; i < 3 ; i++) { linkUrl = "<button type = \"button\" onclick = fn(" + i + ")> Details </button>"; document.write(lin...
JavaScript
console.profile(); /* Mikhail Breslav and Chris Kwan {breslav, ckwan}@cs.bu.edu http://cs-people.bu.edu/ckwan/cs511/ CS 511 Spring 2011 Project Client-side Parsing and Verification Parser for Propositional Logic Last update: 04/24/2011 */ /* Initialize text areas and class variables */ v...
JavaScript
/* Mikhail Breslav and Chris Kwan {breslav, ckwan}@cs.bu.edu http://cs-people.bu.edu/ckwan/cs511/ CS 511 Spring 2011 Project Client-side Parsing and Verification Parser for Propositional Logic Last update: 04/24/2011 */ /* Initialize text areas and class variables */ var message = "Enter an e...
JavaScript
/* Mikhail Breslav and Chris Kwan {breslav, ckwan}@cs.bu.edu http://cs-people.bu.edu/ckwan/cs511/ CS 511 Spring 2011 Project Client-side Parsing and Verification Function to store propositional atoms in a table. */ function getTruthValue(input,table) { //for each propositional atom we want to // 1.) check if ...
JavaScript
BrowserHistoryUtils = { addEvent: function(elm, evType, fn, useCapture) { useCapture = useCapture || false; if (elm.addEventListener) { elm.addEventListener(evType, fn, useCapture); return true; } else if (elm.attachEvent) { var r = elm.att...
JavaScript
/*! SWFObject v2.2 <http://code.google.com/p/swfobject/> is released under the MIT License <http://www.opensource.org/licenses/mit-license.php> */ var swfobject = function() { var UNDEF = "undefined", OBJECT = "object", SHOCKWAVE_FLASH = "Shockwave Flash", SHOCKWAVE_FLASH_AX = "ShockwaveFlash.Shoc...
JavaScript
BrowserHistoryUtils = { addEvent: function(elm, evType, fn, useCapture) { useCapture = useCapture || false; if (elm.addEventListener) { elm.addEventListener(evType, fn, useCapture); return true; } else if (elm.attachEvent) { var r = elm.att...
JavaScript
// Flash Player Version Detection - Rev 1.6 // Detect Client Browser type // Copyright(c) 2005-2006 Adobe Macromedia Software, LLC. All rights reserved. var isIE = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false; var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false; var...
JavaScript
BrowserHistoryUtils = { addEvent: function(elm, evType, fn, useCapture) { useCapture = useCapture || false; if (elm.addEventListener) { elm.addEventListener(evType, fn, useCapture); return true; } else if (elm.attachEvent) { var r = elm.att...
JavaScript
// Flash Player Version Detection - Rev 1.6 // Detect Client Browser type // Copyright(c) 2005-2006 Adobe Macromedia Software, LLC. All rights reserved. var isIE = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false; var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false; var...
JavaScript
BrowserHistoryUtils = { addEvent: function(elm, evType, fn, useCapture) { useCapture = useCapture || false; if (elm.addEventListener) { elm.addEventListener(evType, fn, useCapture); return true; } else if (elm.attachEvent) { var r = elm.att...
JavaScript
// Flash Player Version Detection - Rev 1.6 // Detect Client Browser type // Copyright(c) 2005-2006 Adobe Macromedia Software, LLC. All rights reserved. var isIE = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false; var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false; var...
JavaScript
BrowserHistoryUtils = { addEvent: function(elm, evType, fn, useCapture) { useCapture = useCapture || false; if (elm.addEventListener) { elm.addEventListener(evType, fn, useCapture); return true; } else if (elm.attachEvent) { var r = elm.att...
JavaScript
/* * Mouse wheel support for OS X - implemented in javascript because Adobe * hasn't implemented it in the mac version of Flash Player >:( * * Copyright (c) 2007-2008 Ali Rantakari ( http://hasseg.org/blog ) * * Requires related ActionScript 3 class: * org.hasseg.externalMouseWheel.ExternalMouseWheelS...
JavaScript
/*! SWFObject v2.2 <http://code.google.com/p/swfobject/> is released under the MIT License <http://www.opensource.org/licenses/mit-license.php> */ var swfobject = function() { var UNDEF = "undefined", OBJECT = "object", SHOCKWAVE_FLASH = "Shockwave Flash", SHOCKWAVE_FLASH_AX = "ShockwaveFlash.Shoc...
JavaScript
// Flash Player Version Detection - Rev 1.6 // Detect Client Browser type // Copyright(c) 2005-2006 Adobe Macromedia Software, LLC. All rights reserved. var isIE = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false; var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false; var...
JavaScript
/* * jQuery treeTable Plugin VERSION * http://ludo.cubicphuse.nl/jquery-plugins/treeTable/doc/ * * Copyright 2011, Ludo van den Boom * Dual licensed under the MIT or GPL Version 2 licenses. */ (function($) { // Helps to make options available to all functions // TODO: This gives problems when there are both e...
JavaScript
/*! * jQuery corner plugin: simple corner rounding * Examples and documentation at: http://jquery.malsup.com/corner/ * version 2.12 (23-MAY-2011) * Requires jQuery v1.3.2 or later * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gp...
JavaScript
/** * @license Data plugin for Highcharts v0.1 * * (c) 2012 Torstein Hønsi * * License: www.highcharts.com/license */ /* * Demo: http://jsfiddle.net/highcharts/SnLFj/ */ (function (Highcharts) { // Utilities var each = Highcharts.each; // The Data constructor var Data = function (options) { this....
JavaScript
/** * @license A class to parse color values * @author Stoyan Stefanov <sstoo@gmail.com> * @link http://www.phpied.com/rgb-color-parser-in-javascript/ * Use it if you like it * */ function RGBColor(color_string) { this.ok = false; // strip any leading # if (color_string.charAt(0) == '#') { // remov...
JavaScript
/** * @license Highcharts JS v2.3.3 (2012-10-04) * Exporting module * * (c) 2010-2011 Torstein Hønsi * * License: www.highcharts.com/license */ // JSLint options: /*global Highcharts, document, window, Math, setTimeout */ (function () { // encapsulate // create shortcuts var HC = Highcharts, Chart = HC.Chart...
JavaScript
/** * @license Highcharts JS v2.3.3 (2012-10-04) * MooTools adapter * * (c) 2010-2011 Torstein Hønsi * * License: www.highcharts.com/license */ // JSLint options: /*global Fx, $, $extend, $each, $merge, Events, Event, DOMEvent */ (function () { var win = window, doc = document, mooVersion = win.MooTools.ver...
JavaScript
/** * Dark blue theme for Highcharts JS * @author Torstein Hønsi */ Highcharts.theme = { colors: ["#DDDF0D", "#55BF3B", "#DF5353", "#7798BF", "#aaeeee", "#ff0066", "#eeaaee", "#55BF3B", "#DF5353", "#7798BF", "#aaeeee"], chart: { backgroundColor: { linearGradient: [0, 0, 250, 500], stops: [ [0, 'rgb(...
JavaScript
/** * Grid theme for Highcharts JS * @author Torstein Hønsi */ Highcharts.theme = { colors: ['#058DC7', '#50B432', '#ED561B', '#DDDF00', '#24CBE5', '#64E572', '#FF9655', '#FFF263', '#6AF9C4'], chart: { backgroundColor: { linearGradient: { x1: 0, y1: 0, x2: 1, y2: 1 }, stops: [ [0, 'rgb(255, 255, 255)'...
JavaScript
/** * Skies theme for Highcharts JS * @author Torstein Hønsi */ Highcharts.theme = { colors: ["#514F78", "#42A07B", "#9B5E4A", "#72727F", "#1F949A", "#82914E", "#86777F", "#42A07B"], chart: { className: 'skies', borderWidth: 0, plotShadow: true, plotBackgroundImage: '/demo/gfx/skies.jpg', plotBackground...
JavaScript
/** * Gray theme for Highcharts JS * @author Torstein Hønsi */ Highcharts.theme = { colors: ["#DDDF0D", "#7798BF", "#55BF3B", "#DF5353", "#aaeeee", "#ff0066", "#eeaaee", "#55BF3B", "#DF5353", "#7798BF", "#aaeeee"], chart: { backgroundColor: { linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 }, stops: [ ...
JavaScript
/** * Dark blue theme for Highcharts JS * @author Torstein Hønsi */ Highcharts.theme = { colors: ["#DDDF0D", "#55BF3B", "#DF5353", "#7798BF", "#aaeeee", "#ff0066", "#eeaaee", "#55BF3B", "#DF5353", "#7798BF", "#aaeeee"], chart: { backgroundColor: { linearGradient: { x1: 0, y1: 0, x2: 1, y2: 1 }, stops: [...
JavaScript
// ==ClosureCompiler== // @compilation_level SIMPLE_OPTIMIZATIONS /** * @license Highcharts JS v2.3.3 (2012-10-04) * * (c) 2009-2011 Torstein Hønsi * * License: www.highcharts.com/license */ // JSLint options: /*global Highcharts, document, window, navigator, setInterval, clearInterval, clearTimeout, setTimeout...
JavaScript
$(document).ready(function() { corners(); ambitoChange(); $('#container').shadow(); $('#headerwraper').shadow({type:'sides', sides:'hz-1'}); $('.parent ul li').hide(); $('.parent').hover(function() { $(this).find('li').slideDown('fast'); },function() { $(this).find('li').slideUp('...
JavaScript
/** * @preserve 2011 Syd Lawrence ( www.sydlawrence.com ). * Version: 0.1 * * Licensed under MIT and GPLv2. * * Adapted from Nicholas Gallagher's CSS drop shadows without images demo * http://nicolasgallagher.com/css-drop-shadows-without-images/demo/ * * Usage: $('.box').shadow(options); * */ (function( $ )...
JavaScript
/** * @license A class to parse color values * @author Stoyan Stefanov <sstoo@gmail.com> * @link http://www.phpied.com/rgb-color-parser-in-javascript/ * Use it if you like it * */ function RGBColor(color_string) { this.ok = false; // strip any leading # if (color_string.charAt(0) == '#'...
JavaScript
/** * @license Highcharts JS v2.2.5 (2012-06-08) * Exporting module * * (c) 2010-2011 Torstein Hønsi * * License: www.highcharts.com/license */ // JSLint options: /*global Highcharts, document, window, Math, setTimeout */ (function () { // encapsulate // create shortcuts var HC = Highcharts, ...
JavaScript
/** * @license Highcharts JS v2.2.5 (2012-06-08) * MooTools adapter * * (c) 2010-2011 Torstein Hønsi * * License: www.highcharts.com/license */ // JSLint options: /*global Fx, $, $extend, $each, $merge, Events, Event, DOMEvent */ (function () { var win = window, doc = document, mooVersion = ...
JavaScript
/** * Dark blue theme for Highcharts JS * @author Torstein Hønsi */ Highcharts.theme = { colors: ["#DDDF0D", "#55BF3B", "#DF5353", "#7798BF", "#aaeeee", "#ff0066", "#eeaaee", "#55BF3B", "#DF5353", "#7798BF", "#aaeeee"], chart: { backgroundColor: { linearGradient: [0, 0, 250, 500], stops: [ ...
JavaScript
/** * Grid theme for Highcharts JS * @author Torstein Hønsi */ Highcharts.theme = { colors: ['#058DC7', '#50B432', '#ED561B', '#DDDF00', '#24CBE5', '#64E572', '#FF9655', '#FFF263', '#6AF9C4'], chart: { backgroundColor: { linearGradient: [0, 0, 500, 500], stops: [ [0, 'rgb(255, 255, 255)'], ...
JavaScript
/** * Skies theme for Highcharts JS * @author Torstein Hønsi */ Highcharts.theme = { colors: ["#514F78", "#42A07B", "#9B5E4A", "#72727F", "#1F949A", "#82914E", "#86777F", "#42A07B"], chart: { className: 'skies', borderWidth: 0, plotShadow: true, plotBackgroundImage: '/demo/gfx/skies.jpg', pl...
JavaScript
/** * Gray theme for Highcharts JS * @author Torstein Hønsi */ Highcharts.theme = { colors: ["#DDDF0D", "#7798BF", "#55BF3B", "#DF5353", "#aaeeee", "#ff0066", "#eeaaee", "#55BF3B", "#DF5353", "#7798BF", "#aaeeee"], chart: { backgroundColor: { linearGradient: [0, 0, 0, 400], stops: [ [0, ...
JavaScript
/** * Dark blue theme for Highcharts JS * @author Torstein Hønsi */ Highcharts.theme = { colors: ["#DDDF0D", "#55BF3B", "#DF5353", "#7798BF", "#aaeeee", "#ff0066", "#eeaaee", "#55BF3B", "#DF5353", "#7798BF", "#aaeeee"], chart: { backgroundColor: { linearGradient: [0, 0, 250, 500], stops: [ ...
JavaScript
// ==ClosureCompiler== // @compilation_level SIMPLE_OPTIMIZATIONS /** * @license Highcharts JS v2.2.5 (2012-06-08) * * (c) 2009-2011 Torstein Hønsi * * License: www.highcharts.com/license */ // JSLint options: /*global Highcharts, document, window, navigator, setInterval, clearInterval, clearTimeout...
JavaScript
/** * Copyright 2010 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to...
JavaScript
importScripts('ejohn.Class.js'); var HistoryWorker = Class.extend({ init: function() { this._MAX_UNDO = 10; this._history = []; this._lastdata = []; }, _addState: function(state) { this._history.push(state); if (this._history.length > this._MAX_UNDO) { this._history.shift(); } }, ...
JavaScript
/** * Copyright 2010 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to...
JavaScript
/** * Copyright 2010 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to...
JavaScript
/** * From http://ejohn.org/blog/simple-javascript-inheritance/ */ // Inspired by base2 and Prototype (function(){ var initializing = false, fnTest = /xyz/.test(function(){xyz;}) ? /\b_super\b/ : /.*/; // The base Class implementation (does nothing) this.Class = function(){}; // Create a new Class that in...
JavaScript
/** * Copyright 2010 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to...
JavaScript
cb.Sound = Class.extend({ init: function() { this.clips = {}; }, play: function(filename) { if (this.clips.hasOwnProperty(filename)) { delete this.clips[filename]; } var audio = new Audio(filename); this.clips[filename] = audio; audio.play(); } });
JavaScript
var cb = cb || {}; cb.ui = cb.ui || {}; cb.ui.CLASS_POSITIONER = 'cb_ui_positioner'; cb.ui.CLASS_HIDDEN = 'cb_ui_hidden'; cb.ui.CLASS_POPUP = 'cb_ui_popup'; cb.ui.CLASS_POPUPWRAP = 'cb_ui_popupwrap'; cb.ui.CLASS_MODALBG = 'cb_ui_modalbg'; cb.ui.CLASS_CLOSEBUTTON = 'cb_ui_closebutton'; cb.ui.CLASS_MENUITEM = 'cb_ui_men...
JavaScript
var cb = cb || {}; cb.filters = {}; cb.filters.Filter = Class.extend({ init: function() { this._LAST_PROGRESS = 0; }, filter: function(canvas) { return canvas; }, _setProgress: function(progress) { if (this._LAST_PROGRESS != progress) { $(this).trigger('progress', progress); this._LA...
JavaScript
onmessage = function (event) { var imagedata = event.data.imagedata; var width = event.data.width; var height = event.data.height; var radius = event.data.radius; var sum_r, sum_g, sum_b, sum_a; var scale = (radius * 2 + 1) * (radius * 2 + 1); var num_pixels = width * height; function getPixel(x...
JavaScript
/** * Copyright 2010 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to...
JavaScript
/** * Copyright 2010 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to...
JavaScript
importScripts('ejohn.Class.js'); var HistoryWorker = Class.extend({ init: function() { this._MAX_UNDO = 10; this._history = []; this._lastdata = []; }, _addState: function(state) { this._history.push(state); if (this._history.length > this._MAX_UNDO) { this._history.shift(); } }, ...
JavaScript
/** * Copyright 2010 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to...
JavaScript
/** * Copyright 2010 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to...
JavaScript
/** * From http://ejohn.org/blog/simple-javascript-inheritance/ */ // Inspired by base2 and Prototype (function(){ var initializing = false, fnTest = /xyz/.test(function(){xyz;}) ? /\b_super\b/ : /.*/; // The base Class implementation (does nothing) this.Class = function(){}; // Create a new Class that in...
JavaScript
/** * Copyright 2010 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to...
JavaScript
cb.Sound = Class.extend({ init: function() { this.clips = {}; }, play: function(filename) { if (this.clips.hasOwnProperty(filename)) { delete this.clips[filename]; } var audio = new Audio(filename); this.clips[filename] = audio; audio.play(); } });
JavaScript