code
stringlengths
1
2.08M
language
stringclasses
1 value
Math.clamp = function(value, min, max) { return value < min ? min : value > max ? max : value; } Math.absFloat = function(value) { return value < 0 ? -value : value; } Math.absInt = function(value) { var aux = value >> 31; return (value ^ aux) - aux; } Math.toInt = function(value) { return ~~v...
JavaScript
function Scene() { var _current = null; var _next = null; this.getCurrent = function() { return _current; } this.getNext = function() { return _next; } this.setNext = function(next) { if (_current) _current.terminate(); _next = next; } this.update = function() ...
JavaScript
function Point(object, y) { var _x; var _y; this.getX = function() { return _x; } this.setX = function(value) { _x = value ? Math.toInt(value) : 0; } this.getY = function() { return _y; } this.setY = function(value) { _y = value ? Math.toInt(value) : 0; } thi...
JavaScript
function Bitmap(object, height) { var _canvas = document.createElement("canvas"); var _context = _canvas.getContext("2d"); if ((object instanceof HTMLImageElement) || (object instanceof Image)) { _canvas.width = Math.absInt(object.width); _canvas.height = Math.absInt(object.height); _context.d...
JavaScript
function Benchmark(iterations, functionA, argumentsA, functionB, argumentsB) { var time = new Date().getTime(); var i = iterations; while (i--) functionA.apply(this, argumentsA); var timeA = new Date().getTime(); var delayA = timeA - time; i = iterations; while (i--) functionB.apply(this, ar...
JavaScript
function Rect(object, y, width, height) { var _x; var _y; var _width; var _height; this.getX = function() { return _x; } this.setX = function(value) { _x = value ? Math.absInt(value) : 0; } this.getY = function() { return _y; } this.setY = function(value) { _y =...
JavaScript
function Sprite() { var _bitmap = null; var _x = 0; var _y = 0; var _zoom = false; var _zoomX = 1; var _zoomY = 1; var _zoomWidth = 0; var _zoomHeight = 0; var _srcRect = false; var _srcRectX = 0; var _srcRectY = 0; var _srcRect...
JavaScript
function SceneTitle() { cache.load("img", "Koala.jpg", "Koala"); this.start = function() { this.sprite = new Sprite(); this.sprite.setBitmap(new Bitmap(cache.get("img", "Koala"))); } this.update = function() { var n = 0.5 + 1.0 - Math.random(); this.sprite.setZoom(n, n); } this....
JavaScript
function Cache() { var _tagNames = new Array(); this.load = function(tagName, url, id) { if (!this[tagName]) { this[tagName] = new Object(); _tagNames.push(tagName); } var element = document.createElement(tagName); element.src = url; element.id = id; this[tag...
JavaScript
( function() { var vendors = new Array("ms", "moz", "webkit", "o"); for (var i = vendors.length - 1; !window.requestAnimationFrame && i--;) window.requestAnimationFrame = window[vendors[i] + "RequestAnimationFrame"]; for (i = vendors.length - 1; !window.cancelAnimationFrame && i--;) window.cancelA...
JavaScript
Math.PIOVER2 = .5 * Math.PI; Math.PIOVER4 = .5 * Math.PIOVER2; Math.TWOPI = 2 * Math.PI; Math.acosh = function(value) { return Math.log(value + Math.sqrt(value * value - 1)); } Math.asinh = function(value) { return Math.log(value + Math.sqrt(value * value + 1)); } Math.atanh = function(value) { ...
JavaScript
function Rectangle(x, y, width, height) { this.x = x; this.y = y; this.width = width; this.height = height; }
JavaScript
function Graphics() { var _element = document.createElement("canvas"); var _context = _element.getContext("2d"); document.body.appendChild(_element); this.getContext = function() { return _context; } this.update = function() { _context.clearRect(0, 0, _element.width, _element.height); ...
JavaScript
/** Vector2 @author Bruno Miguel de Oliveira Tamer <bmotamer@gmail.com> @version 2013.04.19 **/ function Vector2(x, y) { this.x = x; this.y = y; this.add = function(value) { if (value instanceof Vector2) { this.x += value.x; this.y += value.y; return; } this.x += value;...
JavaScript
function Audio() { var element = document.createElement("audio"); var sources = new Array(); var ready = false; var onReady = function() { ready = true; element.currentTime %= element.duration; element.removeEventListener("canplaythrough", onReady); } var autoload = fun...
JavaScript
function Scene() { var _current = null; var _next = null; this.getCurrent = function() { return _current; } this.getNext = function() { return _next; } this.setNext = function(next) { if (_current) _current.terminate(); _next = next; } this.update = function() ...
JavaScript
function Source(url, mimeType) { var _element = document.createElement("source"); _element.src = url; _element.type = mimeType; this.getElement = function() { return _element; } this.getURL = function() { return _element.src; } this.setURL = function(value) { _element.src =...
JavaScript
function Sprite() { this.position = Vector2.zero(); this.scale = Vector2.one(); this.sourceRectangle = null; var _element = document.createElement("img"); this.getElement = function() { return _element; } this.getURL = function() { return _element.src; } this...
JavaScript
function SceneTitle() { this.sprite = new Sprite(); this.sprite.setURL("http://aircraftdetector.googlecode.com/svn/tags/Kalman%20Filter%20works%20and%20just%20started%20working%20on%20the%20baysian%20filter/AirplaneDetector/assets/huge_blue_sky_10000x7500.jpg"); this.bgm = new Audio(); this.bgm.appendSou...
JavaScript
try { var graphics = new Graphics(); var scene = new Scene(); scene.setNext(new SceneTitle()); function loop() { var nextScene = scene.getNext(); var ready = true; if (nextScene) { var object; for (property in nextScene) { object = nextScene[property]; if (((obj...
JavaScript
google.load("jquery", "1.5"); var domain_str = "http://localhost:8090"; var domain_str = ""; var page_str = "top_users.json"; // jsonp callback required var twitter_addr = "http://api.twitter.com/1/users/lookup.json" var current_results = []; var user_profiles = {}; function update_domain(form) { domain_str ...
JavaScript
google.load("jquery", "1.5"); google.load("jqueryui", "1.7.2"); google.load("visualization", "1"); var domain_str = "http://localhost:8090"; var page_str = "/wordclouds"; var update_interval = 2000; function update_domain(form) { domain_str = form.inputbox.value; get_top_words(); } var term_clouds = []; //...
JavaScript
const RESET_PROB = 0.15; var PageRank = (function(){ var cls = function(){ var last_change = 0.0; this.gather = function(vertex, edge){ return ((1.0 - RESET_PROB) / edge.source().numOutEdges()) * edge.source().data; }; this.apply = function(vertex, total){ var newval = total + RESET_P...
JavaScript
google.load("jquery", "1.5"); google.load("jqueryui", "1.7.2"); google.load("visualization", "1", {"packages":["corechart", "table", "gauge"]}); var domain_str = "http://localhost:8090"; var update_interval = 5000; var last_minutes=5; function update_domain(value) { console.log("Setting domain to " ...
JavaScript
google.load("jquery", "1.5"); google.load("jqueryui", "1.7.2"); google.load("visualization", "1", {"packages":["corechart", "table", "gauge"]}); var domain_str = "http://localhost:8090"; var update_interval = 5000; var last_minutes=5; // This function is called when the update domain button is clicked f...
JavaScript
document.createElement('header'); document.createElement('nav'); document.createElement('section'); document.createElement('article'); document.createElement('aside'); document.createElement('footer'); document.createElement('hgroup'); $(document).ready(function () { $('.section-content,#status-container').addClas...
JavaScript
(function () { //var host = "192.168.0.100", var host = window.location.hostname, // Encapsulation of the vlc plugin Stream = function (object,type,callbacks) { var restarting = false, starting = false, error = false, restartTimer, startTimer, // Register an event listener registerE...
JavaScript
(function () { var translations = { en: { 1:"About", 2:"Return", 3:"Change quality settings", 4:"Toggle flash", 5:"Click on the torch to enable or disable the flash", 6:"Play a prerecorded sound", 7:"Connect !!", 8:"Disconnect ?!", 9:"STATUS", 10:"NOT...
JavaScript
/* * jQuery UI 1.7.1 * * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT (MIT-LICENSE.txt) * and GPL (GPL-LICENSE.txt) licenses. * * http://docs.jquery.com/UI */ ;jQuery.ui || (function($) { var _remove = $.fn.remove, isFF2 = $.browser.mozilla && (parseFloat($.browser....
JavaScript
/* * jQuery UI Ribbon * * Copyright (c) 2008, 2009 sompylasar (maninblack.msk@hotmail.com ; http://maninblack.info/) * Licensed under the MIT (MIT-LICENSE.txt) * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "...
JavaScript
/* * jQuery UI Ribbon * * Copyright (c) 2008, 2009 Babak (babak@fintech.ru) * * Depends: * ui.core.js * jquery.blockUI.js */ ;(function($) { $.widget("ui.orbButton", { init: function() { this.options.event += '.ui-orbButton'; // namespace event this.extend(true); }, setData: functio...
JavaScript
/* * jQuery UI Button * * Copyright (c) 2009 sompylasar (maninblack.msk@hotmail.com ; http://maninblack.info/) * Licensed under the MIT (MIT-LICENSE.txt) * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to ...
JavaScript
(function ($) { uiButtonsetClasses = { widgetBase: 'ui-buttonset', widgetSpec: 'ui-widget ui-widget-content', hover: 'ui-buttonset-hover' // not to apply hover style to all child buttons }; $.widget('ui.buttonset', { _init: function () { var self = this, options = this.options; th...
JavaScript
/* * jQuery UI Tabs 1.7.1 * * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT (MIT-LICENSE.txt) * and GPL (GPL-LICENSE.txt) licenses. * * http://docs.jquery.com/UI/Tabs * * Depends: * ui.core.js */ (function($) { $.widget("ui.tabs", { _init: function() { if (this...
JavaScript
describe("Searching by tags", function () { it("should find tags by name", function () { expect(model.containsTag(['name'], 'name')).toBeTruthy(); expect(model.containsTag(['x', 'y', 'z'], 'y')).toBeTruthy(); expect(model.containsTag([], 'name')).not.toBeTruthy(); expect(model.conta...
JavaScript
window.teardownFailureOutput = {}; window.teardownFailureOutput["suite"] = [1,2,0,0,[],[0,0,21,3],[[4,5,0,0,[],[0,4,14,6],[],[[7,0,1,0,[],[0,8,3,6],[[0,8,0,9,10,[1,9,1],[],[[10,2,10]]]]],[11,0,1,0,[],[0,11,6,12],[[0,13,0,14,15,[0,12,4],[],[[16,4,15]]]]]],[],[2,0,2,0]]],[],[[2,13,0,14,0,[0,19,2],[],[[20,4,16]]]],[2,0,2...
JavaScript
window.suiteOutput = {}; window.suiteOutput["suite"] = [1,2,0,3,[4,5],[1,0,159],[],[[6,7,1,8,[9,10],[1,44,115],[[0,11,0,12,13,[1,45,102],[],[[146,2,14]]],[3,15,0,0,0,[1,148,10],[[4,16,0,0,0,[1,149,5],[[0,17,0,0,18,[1,150,4],[[0,19,0,20,21,[1,152,1],[],[[153,2,22]]]],[]]],[]],[4,23,0,0,0,[1,155,3],[[0,17,0,0,18,[1,155,...
JavaScript
window.messagesOutput = {}; window.messagesOutput["suite"] = [1,2,0,0,[],[1,0,19],[],[[3,0,1,0,[],[1,4,14],[[0,4,0,5,6,[1,5,1],[],[[6,2,7]]],[0,4,0,5,8,[1,7,1],[],[[8,2,8]]],[0,4,0,5,9,[1,9,1],[],[[9,3,11]]],[0,12,0,13,14,[1,11,1],[],[[12,2,15],[12,0,16]]],[0,4,0,5,17,[1,13,1],[],[[13,0,18],[13,1,19],[14,0,20]]],[0,4,...
JavaScript
window.passingFailingOutput = {}; window.passingFailingOutput["suite"] = [1,2,0,0,[],[0,0,14],[],[[3,0,1,0,[],[1,4,2],[[0,4,0,5,6,[1,5,1],[],[[5,2,6]]]]],[7,0,1,0,[],[0,11,3,8],[[0,9,0,10,8,[0,12,1],[],[[13,4,8]]]]]],[],[2,1,2,1]]; window.passingFailingOutput["strings"] = []; window.passingFailingOutput["strings"] =...
JavaScript
window.testsAndKeywordsOutput = {}; window.testsAndKeywordsOutput["suite"] = [1,2,0,0,[],[1,0,25],[],[[3,0,1,0,[],[1,4,12],[[0,4,0,0,0,[1,5,2],[[0,5,0,6,0,[1,6,1],[],[]]],[]],[0,7,0,0,0,[1,8,2],[[0,5,0,6,0,[1,9,0],[],[]]],[]],[0,8,0,0,0,[1,10,2],[[0,5,0,6,0,[1,11,1],[],[]]],[]],[0,9,0,0,0,[1,13,2],[[0,5,0,6,0,[1,14,1]...
JavaScript
window.setupsAndTeardownsOutput = {}; window.setupsAndTeardownsOutput["suite"] = [1,2,0,0,[],[1,0,16],[],[[3,0,1,0,[],[1,5,9],[[1,4,0,5,6,[1,6,1],[],[[7,2,6]]],[0,7,0,0,0,[1,8,4],[[0,8,0,9,0,[1,9,1],[],[]],[2,4,0,5,10,[1,10,1],[],[[11,2,10]]]],[]],[2,4,0,5,11,[1,12,1],[],[[13,2,11]]]]]],[[1,4,0,5,12,[1,4,1],[],[[5,2,1...
JavaScript
describe("Text decoder", function () { function multiplyString(string, times) { var result = ""; for (var i = 0; i < times; i++){ result += string; } return result; } it("should have empty string with id 0", function () { var strings = window.testdata.ge...
JavaScript
window.output = {}; describe("Statistics", function () { var totals = [ {label: "Critical Tests", pass: 1, fail: 1}, {label: "All Tests", pass: 2, fail: 3} ]; var tags = [ {label: "first tag", pass: 3, fail: 0, ...
JavaScript
/** * Top level namespace for Jasmine, a lightweight JavaScript BDD/spec/testing framework. * * @namespace */ var jasmine = {}; /** * @private */ jasmine.unimplementedMethod_ = function() { throw new Error("unimplemented method"); }; /** * Use <code>jasmine.undefined</code> instead of <code>undefined</code>,...
JavaScript
jasmine.TrivialReporter = function(doc) { this.document = doc || document; this.suiteDivs = {}; this.logRunningSpecs = false; }; jasmine.TrivialReporter.prototype.createDom = function(type, attrs, childrenVarArgs) { var el = document.createElement(type); for (var i = 2; i < arguments.length; i++) { var ...
JavaScript
window.model = (function () { function Suite(data) { var suite = createModelObject(data, "s"); suite.source = data.source; suite.relativeSource = data.relativeSource; suite.fullName = data.parent ? data.parent.fullName + "." + data.name : data.name; setStats(suite, data.stat...
JavaScript
window.testdata = function () { var elementsById = {}; var idCounter = 0; var _statistics = null; var LEVELS = ['TRACE', 'DEBUG', 'INFO', 'WARN', 'FAIL', 'ERROR']; var STATUSES = ['FAIL', 'PASS', 'NOT_RUN']; var KEYWORDS = ['KEYWORD', 'SETUP', 'TEARDOWN', 'FOR', 'VAR']; function addElement...
JavaScript
window.util = function () { function map(elems, func){ var ret = []; for (var i=0; i<elems.length; i++) { ret[i] = func(elems[i]); } return ret; } function filter(elems, predicate) { var ret = []; for (var i=0; i<elems.length; i++) { ...
JavaScript
window.fileLoading = (function () { var fileLoadingCallbacks = {}; var timestamp = new Date().getTime(); function loadKeywordsFile(filename, callback) { fileLoadingCallbacks[filename] = callback; var script = document.createElement('script'); script.type = 'text/javascript'; ...
JavaScript
function removeJavaScriptDisabledWarning() { // Not using jQuery here for maximum speed document.getElementById('javascript_disabled').style.display = 'none'; } function addJavaScriptDisabledWarning() { document.getElementById('javascript_disabled').style.display = 'block'; } function initLayout(suiteName...
JavaScript
function toggleSuite(suiteId) { toggleElement(suiteId, ['keyword', 'suite', 'test']); } function toggleTest(testId) { toggleElement(testId, ['keyword']); } function toggleKeyword(kwId) { toggleElement(kwId, ['keyword', 'message']); } function addElements(elems, templateName, target){ for (var i in el...
JavaScript
/** * Creates a new Floor. * @constructor * @param {google.maps.Map=} opt_map */ function Floor(opt_map) { /** * @type Array.<google.maps.MVCObject> */ this.overlays_ = []; /** * @type boolean */ this.shown_ = true; if (opt_map) { this.setMap(opt_map); } } /** * @param {google.maps.M...
JavaScript
/** * Creates a new level control. * @constructor * @param {IoMap} iomap the IO map controller. * @param {Array.<string>} levels the levels to create switchers for. */ function LevelControl(iomap, levels) { var that = this; this.iomap_ = iomap; this.el_ = this.initDom_(levels); google.maps.event.addList...
JavaScript
/** * @license * * Copyright 2011 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 l...
JavaScript
// Copyright 2011 Google /** * 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 in wri...
JavaScript
var Wami = window.Wami || {}; // Upon a creation of a new Wami.GUI(options), we assume that a WAMI recorder // has been initialized. Wami.GUI = function(options) { var RECORD_BUTTON = 1; var PLAY_BUTTON = 2; setOptions(options); setupDOM(); var recordButton, playButton; var recordInterval, playInterval; func...
JavaScript
var Wami = window.Wami || {}; // Returns a (very likely) unique string with of random letters and numbers Wami.createID = function() { return "wid" + ("" + 1e10).replace(/[018]/g, function(a) { return (a ^ Math.random() * 16 >> a / 4).toString(16) }); } // Creates a named callback in WAMI and returns the name as ...
JavaScript
/* jQuery Tags Input Plugin 1.2.5 Copyright (c) 2011 XOXCO, Inc Documentation for this plugin lives here: http://xoxco.com/clickable/jquery-tags-input Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php ben@xoxco.com */ ;(function($) { var delimiter = new Array(); var ...
JavaScript
/* * FancyBox - jQuery Plugin * Simple and fancy lightbox alternative * * Examples and documentation at: http://fancybox.net * * Copyright (c) 2008 - 2010 Janis Skarnelis * That said, it is hardly a one-person project. Many people have submitted bugs, code, and offered their advice freely. Their support i...
JavaScript
/* * SimpleModal 1.4.1 - jQuery Plugin * http://www.ericmmartin.com/projects/simplemodal/ * Copyright (c) 2010 Eric Martin (http://twitter.com/ericmmartin) * Dual licensed under the MIT and GPL licenses * Revision: $Id: jquery.simplemodal.js 261 2010-11-05 21:16:20Z emartin24 $ */ /** * SimpleModal is a lightwe...
JavaScript
/*! * jCarousel - Riding carousels with jQuery * http://sorgalla.com/jcarousel/ * * Copyright (c) 2006 Jan Sorgalla (http://sorgalla.com) * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses. * * Built on top...
JavaScript
$(function() { $('.btn-login').click(function(event) { login_validator.resetForm(); $('.header-login-form form').each (function(){ this.reset(); }); $('.header-login-form .invalid_user').hide(); $(".header-login-form").toggle(100); event.stopPropagation(); ...
JavaScript
/** @preserve jquery.jqDock.js v1.8 */ /*global jQuery, window:false, Image:false*/ /*jslint white:false, regexp:false, plusplus:false, strict:false, forin:true, indent:0 */ /** * jqDock jQuery plugin * Version : 1.8 * Author : Roger Barrett * Date : February 2011 * * Inspired by: * iconDock jQuery...
JavaScript
// Sticky v1.0 by Daniel Raftery // http://thrivingkings.com/sticky // // http://twitter.com/ThrivingKings (function( $ ) { // Using it without an object $.sticky = function(note, options, callback) { return $.fn.sticky(note, options, callback); }; $.fn.sticky = function(note, options, callback) { // Defa...
JavaScript
$(function() { $('.btn-login').click(function(event) { mostrarlogin(); }); $('#feedbackallbtns').quickAccess({ screenPosition: 'top', css: {position: 'absolute'}, itemCss: { 'backgroundColor': '#5C893C', 'borderWidth': 1, 'borderColor'...
JavaScript
;(function($, window, document, undefined){ var pluginName = 'circleMenu', defaults = { depth: 0, item_diameter: 30, circle_radius: 80, angle:{ start: 0, end: 90 }, speed: 500, delay: 1000, ...
JavaScript
/*! * jCarousel - Riding carousels with jQuery * http://sorgalla.com/jcarousel/ * * Copyright (c) 2006 Jan Sorgalla (http://sorgalla.com) * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses. * * Built on top...
JavaScript
// Sticky v1.0 by Daniel Raftery // http://thrivingkings.com/sticky // // http://twitter.com/ThrivingKings (function( $ ) { // Using it without an object $.sticky = function(note, options, callback) { return $.fn.sticky(note, options, callback); }; $.fn.sticky = function(note, options, callback) { // Defa...
JavaScript
/* * SimpleModal 1.4.1 - jQuery Plugin * http://www.ericmmartin.com/projects/simplemodal/ * Copyright (c) 2010 Eric Martin (http://twitter.com/ericmmartin) * Dual licensed under the MIT and GPL licenses * Revision: $Id: jquery.simplemodal.js 261 2010-11-05 21:16:20Z emartin24 $ */ /** * SimpleModal is a lightwe...
JavaScript
/* ### jQuery Star Rating Plugin v3.14 - 2012-01-26 ### * Home: http://www.fyneworks.com/jquery/star-rating/ * Code: http://code.google.com/p/jquery-star-rating-plugin/ * * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/...
JavaScript
/* jQuery Tags Input Plugin 1.2.5 Copyright (c) 2011 XOXCO, Inc Documentation for this plugin lives here: http://xoxco.com/clickable/jquery-tags-input Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php ben@xoxco.com */ ;(function($) { var delimiter = new Array(); var ...
JavaScript
(function($) { $.fn.quickAccess = function(options) { var opts = $.extend(true, {}, $.fn.quickAccess.defaults, options); return new quickAccessClass($(this), opts); }; $.fn.quickAccess.defaults = { screenPosition: 'left', margin: '9px', width: '110px', radius: {}, itemCss: {}, iconType: 'light', ch...
JavaScript
/* Uploadify v2.1.4 Release Date: November 8, 2010 Copyright (c) 2010 Ronnie Garcia, Travis Nickels Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without ...
JavaScript
/* jQuery Tags Input Plugin 1.2.5 Copyright (c) 2011 XOXCO, Inc Documentation for this plugin lives here: http://xoxco.com/clickable/jquery-tags-input Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php ben@xoxco.com */ ;(function($) { var delimiter = new Array(); var ...
JavaScript
$(function() { $('#form-edit-user').validate({ rules: { control_email: { required: true, email: true }, control_nombre: 'required', control_clave: 'required', control_u_pais: 'required', contr...
JavaScript
jQuery.fn.center = function () { this.css("position","absolute"); this.css("z-index","9999"); this.css("top", Math.max(0, (($(window).height() - this.outerHeight()) / 2) + $(window).scrollTop()) + "px"); this.css("left", Math.max(0, (($(window).width() - ...
JavaScript
/** Textualizer v2.5.0 @author Kirollos Risk Dual licensed under the MIT or GPL Version 2 licenses. Copyright (c) 2011 Kirollos Risk Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restr...
JavaScript
'use strict'; var EditorState = { CLEAN:0, // NO CHANGES DIRTY:1, // UNSAVED CHANGES SAVE:2, // SAVE IN PROGRESS LOAD:3, // LOADING READONLY:4 }; google.load('picker', '1'); //gapi.load('drive-share'); angular.module('app', ['app.filters', 'app.services', 'app.directives']) .constant('saveInt...
JavaScript
/** * @license AngularJS v1.0.0 * (c) 2010-2012 Google, Inc. http://angularjs.org * License: MIT */ (function(window, angular, undefined) { 'use strict'; var directive = {}; var service = { value: {} }; var DEPENDENCIES = { 'angular.js': 'http://code.angularjs.org/angular-' + angular.version.full + '.min.js', ...
JavaScript
/** * Configuration for jstd scenario adapter */ var jstdScenarioAdapter = { relativeUrlPrefix: '/build/docs/' };
JavaScript
/** * @license AngularJS v1.0.0 * (c) 2010-2012 Google, Inc. http://angularjs.org * License: MIT */ (function(window, angular, undefined) { 'use strict'; var directive = {}; directive.dropdownToggle = ['$document', '$location', '$window', function ($document, $location, $window) { var openElem...
JavaScript
/** * @license AngularJS v1.0.0 * (c) 2010-2012 Google, Inc. http://angularjs.org * License: MIT */ (function(window, angular, undefined) { 'use strict'; /** * @ngdoc overview * @name ngResource * @description */ /** * @ngdoc object * @name ngResource.$resource * @requires $http * * @description * A fa...
JavaScript
/** * @license AngularJS v1.0.0 * (c) 2010-2012 Google, Inc. http://angularjs.org * License: MIT */ (function(window, document, undefined) { 'use strict'; //////////////////////////////////// /** * @ngdoc function * @name angular.lowercase * @function * * @description Converts the specified string to lowerca...
JavaScript
/*! * jQuery JavaScript Library v1.7.2 * http://jquery.com/ * * Copyright 2011, John Resig * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * Includes Sizzle.js * http://sizzlejs.com/ * Copyright 2011, The Dojo Foundation * Released under the MIT, BSD, and GPL Licenses. ...
JavaScript
/** * @license AngularJS v1.0.0 * (c) 2010-2012 Google, Inc. http://angularjs.org * License: MIT * * TODO(vojta): wrap whole file into closure during build */ /** * @ngdoc overview * @name angular.mock * @description * * Namespace from 'angular-mocks.js' which contains testing related code. */ angular.moc...
JavaScript
/** * @license AngularJS v1.0.0 * (c) 2010-2012 Google, Inc. http://angularjs.org * License: MIT */ (function(window, angular, undefined) { 'use strict'; /** * @ngdoc overview * @name ngSanitize * @description */ /* * HTML Parser By Misko Hevery (misko@hevery.com) * based on: HTML Parser By John Resig (ejo...
JavaScript
/** * @license AngularJS v1.0.0 * (c) 2010-2012 Google, Inc. http://angularjs.org * License: MIT */ ( /** * @ngdoc interface * @name angular.Module * @description * * Interface for configuring angular {@link angular.module modules}. */ function setupModuleLoader(window) { function ensure(obj, name, fact...
JavaScript
/** * @license AngularJS v1.0.0 * (c) 2010-2012 Google, Inc. http://angularjs.org * License: MIT */ (function(window) { 'use strict'; /** * JSTestDriver adapter for angular scenario tests * * Example of jsTestDriver.conf for running scenario tests with JSTD: <pre> server: http://localhost:9877 load: ...
JavaScript
/** * @license AngularJS v1.0.0 * (c) 2010-2012 Google, Inc. http://angularjs.org * License: MIT */ (function(window, angular, undefined) { 'use strict'; /** * @ngdoc overview * @name ngCookies */ angular.module('ngCookies', ['ng']). /** * @ngdoc object * @name ngCookies.$cookies * @requires $brows...
JavaScript
'use strict'; function UserCtrl($scope, backend) { $scope.user = null; $scope.login = function () { backend.user().then(function (response) { $scope.user = response.data; }); } $scope.login(); } function EditorCtrl($scope, $location, $routeParams, $timeout, editor, doc, aut...
JavaScript
'use strict'; /* Filters */ angular.module('app.filters', []) .filter('saveStateFormatter', function () { return function (state) { if (state == EditorState.DIRTY) { return 'You have unsaved changes'; } else if (state == EditorState.SAVE) { retur...
JavaScript
'use strict'; var module = angular.module('app.services', []); var ONE_HOUR_IN_MS = 1000 * 60 * 60; // Shared model for current document module.factory('doc', function ($rootScope) { var service = $rootScope.$new(true); service.dirty = false; service.lastSave = 0; service.timeSinc...
JavaScript
/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (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.mozilla.org/MPL/ * ...
JavaScript
/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (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.mozilla.org/MPL/ * ...
JavaScript
/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (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.mozilla.org/MPL/ * ...
JavaScript
/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (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.mozilla.org/MPL/ * ...
JavaScript
define('ace/mode/latex', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/latex_highlight_rules', 'ace/range'], function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var Tokenizer = require("../tokenizer").Tokenizer; va...
JavaScript
/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (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.mozilla.org/MPL/ * ...
JavaScript
"no use strict"; var console = { log: function(msg) { postMessage({type: "log", data: msg}); } }; var window = { console: console }; var normalizeModule = function(parentId, moduleName) { // normalize plugin requires if (moduleName.indexOf("!") !== -1) { var chunks = moduleName.spl...
JavaScript
/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (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.mozilla.org/MPL/ * ...
JavaScript