code stringlengths 1 2.08M | language stringclasses 1
value |
|---|---|
// 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 applicable l... | 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 applicable l... | JavaScript |
var fullScreen = false;
var charts = new Array();
var sources;
var combinedGraph = new Array();
function changeCategories(city) {
$.getJSON("assets/php/functions.php",
{
f: "getCategories",
city: city
}, function(data)
{
if(data.length > 0)
... | JavaScript |
jQuery(document).ready(function($) {
$('.city-menu').css({"overflow":"auto"});
//Disable scrolling on ipad
$(document).bind('touchmove', false);
//Load the categories by calling the changeCategories function
var selectedCity = $.cookie('selected_city');
if (selectedCity) {
changeCategories(... | JavaScript |
/*!
* jQuery Cookie Plugin v1.3
* https://github.com/carhartl/jquery-cookie
*
* Copyright 2011, Klaus Hartl
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://www.opensource.org/licenses/mit-license.php
* http://www.opensource.org/licenses/GPL-2.0
*/
(function ($, document, undefined) {
... | JavaScript |
/*global Element */
(function(window, document) {
'use strict';
var keyboardAllowed = typeof Element !== 'undefined' && 'ALLOW_KEYBOARD_INPUT' in Element, // IE6 throws without typeof check
fn = (function() {
var val, valLength;
var fnMap = [
[
... | JavaScript |
dojo.require("dojox.cometd");
//dojo.require("dojox.cometd.ack");
dojo.require("dojoscratch.Board");
dojo.require("dijit.Toolbar");
dojo.require("dojoscratch.LineCommand");
dojo.require("dojoscratch.RectangleCommand");
dojo.require("dojoscratch.CircleCommand");
dojo.require("dojoscratch.TextCommand");
dojo.require("do... | JavaScript |
dojo.provide("dojoscratch.Board");
dojo.require("dojox.gfx");
dojo.require("dojoscratch.Scratch");
dojo.require("dojoscratch.TextScratch");
dojo.declare("dojoscratch.Board", null, {
constructor: function(containerId, data) {
this._id = data.id;
this._boardWidth = data.uiData.boardData.width;
this._boardHeight... | JavaScript |
dojo.provide("dojoscratch.PathCommand");
dojo.require("dojoscratch.AbstractCommand");
dojo.require("dojoscratch.DotCommand");
dojo.declare("dojoscratch.PathCommand", dojoscratch.AbstractCommand, {
constructor : function(boardElement) {
this._minimalRadius = 2;
},
_init : function() {
this._points =... | JavaScript |
dojo.provide("dojoscratch.DotCommand");
dojo.require("dojoscratch.AbstractCommand");
dojo.declare("dojoscratch.DotCommand", dojoscratch.AbstractCommand, {
_command: function() {
var circle = {
"type" : "circle",
"cx" : this._x1,
"cy" : this._y1,
"r... | JavaScript |
dojo.provide("dojoscratch.Scaler");
//based on http://archive.dojotoolkit.org/nightly/checkout/dojox/gfx/Mover.js
dojo.declare("dojoscratch.Scaler", null, {
constructor: function(shape, e, host){
// summary: an object, which makes a shape follow the mouse,
// used as a default scaler, and as a base class for cu... | JavaScript |
dojo.provide("dojoscratch.TextScratch");
dojo.require("dojoscratch.Scratch");
//inheritance based on: http://www.aa3sd.net/using_dojo/draw_rectangle.html
dojo.declare("dojoscratch.TextScratch", dojoscratch.Scratch, {
_init :function() {
//examples: http://www.dreamingpoint.com/vexagon/js/dojox/gfx/tests/test_... | JavaScript |
dojo.provide("dojoscratch.Scalable");
dojo.require("dojox.gfx.matrix");
dojo.require("dojoscratch.Scaler");
//based on http://archive.dojotoolkit.org/nightly/checkout/dojox/gfx/Moveable.js
dojo.declare("dojoscratch.Scalable", null, {
constructor: function(shape, params) {
this._shape = shape;
this._delay ... | JavaScript |
dojo.provide("dojoscratch.Scratch");
dojo.require("dojox.gfx");
dojo.require("dojo.colors");
dojo.require("dojox.gfx.Moveable");
dojo.require("dojoscratch.Scalable");
dojo.declare("dojoscratch.Scratch", null, {
constructor: function(surface, id, shape, fill, stroke, matrix) {
// Create shape in group
this._group... | JavaScript |
dojo.provide("dojoscratch.AbstractCommand");
dojo.declare("dojoscratch.AbstractCommand", null, {
constructor: function(boardElement) {
console.debug("creating abstract command");
//helping in calculating offset
console.debug(boardElement);
this._boardElement = boardElement;
this._init();
console.... | JavaScript |
dojo.provide("dojoscratch.TextCommand");
dojo.require("dojoscratch.AbstractCommand");
dojo.declare("dojoscratch.TextCommand", dojoscratch.AbstractCommand, {
_command: function() {
//TODO externalize? (howto?)
var value = prompt("Value?", "");
if (!value) {
return;
}
var text = {
"type... | JavaScript |
dojo.provide("dojoscratch.LineCommand");
dojo.require("dojoscratch.AbstractCommand");
dojo.declare("dojoscratch.LineCommand", dojoscratch.AbstractCommand, {
_command: function() {
var line = {
"type" : "line",
"x1" : this._x1,
"y1" : this._y1,
"x2" : this._x2,
"y2" : this._y2
};
var... | JavaScript |
dojo.provide("dojoscratch.RectangleCommand");
dojo.require("dojoscratch.AbstractCommand");
dojo.declare("dojoscratch.RectangleCommand", dojoscratch.AbstractCommand, {
_command: function() {
var rect = {
"type" : "rect",
"x" : Math.min(this._x1, this._x2),
"y" : Math.min(this._y1, this._y2),
"... | JavaScript |
dojo.provide("dojoscratch.CircleCommand");
dojo.require("dojoscratch.AbstractCommand");
dojo.declare("dojoscratch.CircleCommand", dojoscratch.AbstractCommand, {
_command: function() {
var dx = Math.abs(this._x1 - this._x2);
var dy = Math.abs(this._y1 - this._y2);
//or max:
var radius = Math.min(dx, ... | JavaScript |
/*
http://www.JSON.org/json2.js
2009-08-17
Public Domain.
NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
See http://www.JSON.org/js.html
This file creates a global JSON object containing two methods: stringify
and parse.
JSON.stringify(value, replacer, space)
... | JavaScript |
var $;
var JSON;
function asyncHelper() {
Game.initAsync.call(Game, arguments);
}
var Game = {
gameId: 'org.ribizli.basicgameserver.AmoebaGame',
TILE_SIZE : 20,
playerMark : 'x',
opponentMark : 'o',
onlineRequestInterval: 10000,
$f : null,
$opponent : null,
init : function(params) {
... | JavaScript |
(function () {
var objects = document.getElementsByTagName('embed');
for (var i = 0; i < objects.length; i++) {
var flash = objects[i];
if (flash.type == 'application/x-shockwave-flash') {
console.log('Flash found!');
/*
var placeholder = document.createElement("div");
placeholder.... | JavaScript |
var $;
var urlBase = 'http://amoebathegame.googlecode.com/svn/trunk/';
function init() {
if (wave != null && wave.isInWaveContainer()) {
google.load("jquery", "1.3.2");
google.setOnLoadCallback(function () {
Game.init($('#content'));
wave.setStateCallback(Game.stateCallback, Game);
... | JavaScript |
{
"table": {
"cols": ["VoteCount-1", "VoteCount-2", "VoteCount-3", "VoteCount-4", "VoteCount-5", "VoteCount-6", "VoteCount-7", "VoteCount-8", "VoteCount-9", "VoteCount-10", "VoteCount-11", "VoteCount-12", "VoteCount-13", "ID", "ValidVotesCount"],
"rows": [
[ 0, 0, 0, 0, 100, 0, 0, 0, 0, 200, ... | JavaScript |
{
"table": {
"cols": ["VoteCount-1", "VoteCount-2", "VoteCount-3", "VoteCount-4", "VoteCount-5", "VoteCount-6", "VoteCount-7", "VoteCount-8", "VoteCount-9", "VoteCount-10", "VoteCount-11", "VoteCount-12", "VoteCount-13", "ID", "ValidVotesCount", "NumDistricts", "NumDistrictsReported"],
"rows": [
... | JavaScript |
{
"table": {
"cols": ["VoteCount-1", "VoteCount-2", "VoteCount-3", "VoteCount-4", "VoteCount-5", "VoteCount-6", "VoteCount-7", "VoteCount-8", "VoteCount-9", "VoteCount-10", "VoteCount-11", "VoteCount-12", "VoteCount-13", "ID", "ValidVotesCount"],
"rows": [
[ 10, 10, 10, 10, 200, 10, 10, 10, 1... | JavaScript |
// results-gadget.js
// By Michael Geary - http://mg.to/
// See UNLICENSE or http://unlicense.org/ for public domain notice.
// Parse the query string in a URL and return an object of
// the key=value pairs.
// Example:
// var url = 'http://example.com/test?a=b&c=d'
// var p = parseQuery(url);
// Now p contain... | JavaScript |
// scriptino.js
// By Michael Geary - http://mg.to/
// See UNLICENSE or http://unlicense.org/ for public domain notice.
if( ! Array.prototype.forEach ) {
Array.prototype.forEach = function( fun /*, thisp*/ ) {
if( typeof fun != 'function' )
throw new TypeError();
var thisp = arguments[1];
for( var i = 0, ... | JavaScript |
// elections.js
// By Michael Geary - http://mg.to/
// See UNLICENSE or http://unlicense.org/ for public domain notice.
var candidatesEG2012 = [
// Candidate order must match the candidate-photos image for this election
{ color: '#E2FF00', id: '1', firstName: 'أبو العز', lastName: 'الحريرى', fullName: 'أبو العز الح... | JavaScript |
// results-map.js
// By Michael Geary - http://mg.to/
// See UNLICENSE or http://unlicense.org/ for public domain notice.
var times = {
gadgetLoaded: now(),
offset: 0
};
// Default params
params.source = ( params.source == 'gop' ? 'gop' : 'ap' );
var hostPrefix = location.host.split('.')[0];
var match = hostPrefix.... | JavaScript |
// polygonzo.js
// By Ernest Delgado and Michael Geary
// http://ernestdelgado.com/
// http://mg.to/
// See UNLICENSE or http://unlicense.org/ for public domain notice
PolyGonzo = {
// PolyGonzo.Frame() - Canvas/VML frame
Frame: function( a ) {
var frame = this;
if( ! PolyGonzo.onetime ) {
onetime();
... | JavaScript |
loadStrings({
"allCandidates": "Tous les candidats",
"allCandidatesShort": "Tous",
"automaticUpdate": "Cette page se met \u00e0 jour automatiquement",
"candidate": "Candidat",
"caucus": "Comit\u00e9 \u00e9lectoral",
"caucuses": "Comit\u00e9s \u00e9lectoraux",
"city": "Ville",
"clickForLocal": "Cliquez pour obten... | JavaScript |
loadStrings({
"allCandidates": "All Candidates",
"allCandidatesShort": "All",
"automaticUpdate": "This page updates automatically",
"candidate": "Candidate",
"caucus": "Caucus",
"caucuses": "Caucuses",
"city": "City",
"clickForLocal": "Click for detailed results",
"countdownHeading": "Live results in:",
"count... | JavaScript |
loadStrings({
"electionTitle": "نتائج انتخابات الرئاسة المصرية 2012",
"allCandidates": "جميع المرشحين",
"allCandidatesShort": "All",
"automaticUpdate": "هذه البيانات يتم تحديثها تلقائيا",
"candidate": "المرشح",
"caucus": "Caucus",
"caucuses": "Caucuses",
"city": "City",
"clickForLocal": "اضغط على المحافظة لمزيد ... | JavaScript |
/*
* jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
*
* Uses the built in easing capabilities added In jQuery 1.1
* to offer multiple easing options
*
* TERMS OF USE - jQuery Easing
*
* Open source under the BSD License.
*
* Copyright © 2008 George McGinley Smith
* All rights reserved.
*
... | 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 |
/*! Copyright (c) 2010 Brandon Aaron (http://brandonaaron.net)
* Licensed under the MIT License (LICENSE.txt).
*
* Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
* Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
* Thanks to: Seamus Leahy for adding deltaX and deltaY
*
*... | JavaScript |
$(function () {
$("#TestDate").datepicker({
changeMonth: true,
dateFormat: "dd-mm-yy",
buttonImageOnly: true
});
});
| JavaScript |
/// <reference path="jquery-1.5.1-vsdoc.js" />
| JavaScript |
$(function () {
$("#DateOfBirth").datepicker({
changeMonth: true,
changeYear: true,
yearRange: '1930:2012',
dateFormat: 'dd-mm-yy'
});
});
| JavaScript |
/// <reference path="jquery-1.5.1-vsdoc.js" />
$(document).ready(
function () {
loadStates();
$("#States").change(loadSuburbs);
$('#Suburbs').change(setSuburbId);
}
);
function loadStates() {
var states = $('#States');
$.ajax({
type: 'POST',
... | JavaScript |
/*
* Spinbutton plugin for jQuery
* http://www.softwareunity.com/jquery/JQuerySpinBtn/
*
* Adds bells and whistles to any ordinary textbox to
* make it look and feel like a SpinButton Control.
*
* Copyright (c) 2006-2009 Software Unity Ltd
* Dual licensed under the MIT and GPL licenses.
* http://www.software... | JavaScript |
function inv(){
FB.init({
appId:'403135549739488', cookie:true,
status:true, xfbml:true
});
FB.ui({ method: 'apprequests',
message: 'كن داعية ... تطبيق آيات يقوم بإضافة آية مختارة من كتاب الله مع رابط للتلاوة والتفسير على حسابك يوميا'});
}
function buClick(link){
if(link.indexOf('http') === 0) t... | JavaScript |
//<![CDATA[
$(document).ready(function() {
//Execute the slideShow, set 6 seconds for each images
slideShow(6000);
});
function slideShow(speed) {
//append a LI item to the UL list for displaying caption
$('ul.slideshow').append('<li id="slideshow-caption" class="caption"><div class="slideshow-caption-conta... | JavaScript |
jQuery.noConflict();
jQuery(function (){
jQuery(document).ready(function()
{
jQuery.noConflict();
jQuery(function (){
jQuery("#likebox_1").hover(function(){
jQuery('#likebox_1').css('z-index',101009);
jQuery(this).stop(true,false).animate({right: 0}, 500); },
... | JavaScript |
$(document).ready(function() {
$.featureList(
$("#tabs li a"),
$("#output li"), {
start_item : 1
}
);
/*
// Alternative
$('#tabs li a').featureList({
output : '#output li',
start_item : 1
});
*/
}); | JavaScript |
//var emf_session_timeout_warner=new SessionTimeoutWarner(7200);
EMF_jQuery(window).load(function(){
post_message_for_frame_height("1di18p07aLX94tq6");
});
EMF_jQuery(function(){
EMF_jQuery("#emf-form").validationEngine({
validationEventTriggers:"blur",
scroll:true
});
EMF_jQuery("#emf-form ul li").mousedo... | JavaScript |
//***********************************************************************************************************************************/
// LyteBox v3.22
//
// Author: Markus F. Hay
// Website: http://www.dolem.com/lytebox
// Date: October 2, 2007
// License: Creative Commons Attribution 3.0 License (http://creative... | JavaScript |
/* JPEGCam v1.0.9 */
/* Webcam library for capturing JPEG images and submitting to a server */
/* Copyright (c) 2008 - 2009 Joseph Huckaby <jhuckaby@goldcartridge.com> */
/* Licensed under the GNU Lesser Public License */
/* http://www.gnu.org/licenses/lgpl.html */
/* Usage:
<script language="JavaScript">
d... | JavaScript |
/*
* jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
*
* Uses the built in easing capabilities added In jQuery 1.1
* to offer multiple easing options
*
* TERMS OF USE - jQuery Easing
*
* Open source under the BSD License.
*
* Copyright © 2008 George McGinley Smith
* All rights reserved.
*
... | JavaScript |
/*
* --------------------------------------------------------------------
* jQuery inputToButton plugin
* Author: Scott Jehl, scott@filamentgroup.com
* Copyright (c) 2009 Filament Group
* licensed under MIT (filamentgroup.com/examples/mit-license.txt)
* -----------------------------------------------------... | JavaScript |
$(document).ready(function(){
var camera = $('#camera'),
photos = $('#photos'),
screen = $('#screen');
var template = '<a href="uploads/original/{src}" rel="cam" '
+'style="background-image:url(uploads/thumbs/{src})"></a>';
/*----------------------------------
Setting up the web camera
-----... | JavaScript |
/**
* jQuery custom selectboxes
*
* Copyright (c) 2008 Krzysztof Suszyński (suszynski.org)
* Licensed under the MIT License:
* http://www.opensource.org/licenses/mit-license.php
*
* @version 0.6.1
* @category visual
* @package jquery
* @subpakage ui.selectbox
* @author Krzysztof Suszyński <k.susz... | JavaScript |
/*
===============================================================================
Chili is the jQuery code highlighter plugin
...............................................................................
Copyright 2007 / Andrea Ercolino
--------------------------... | JavaScript |
// hide boxes on full width page
$(document).ready(function(){
jQuery('a[href*=#]').click(function() {
if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'')
&& location.hostname == this.hostname) {
var jQuerytarget = jQuery(this.hash);
jQuerytarget = jQuerytarget.length && jQuerytarg... | JavaScript |
$(document).ready(function(){
$('.sponsorFlip').bind("click",function(){
var elem = $(this);
if(elem.data('flipped'))
{
elem.revertFlip();
elem.data('flipped',false)
}
else
{
elem.flip({
direction:'lr',
speed: 350,
onBefore: function(){
elem.html(elem.siblings('.spon... | JavaScript |
//Filament Group modification note:
//This version of excanvas is modified to support lazy loading of this file. More info here: http://pipwerks.com/2009/03/12/lazy-loading-excanvasjs/
// Copyright 2006 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file excep... | JavaScript |
/**
* WYSIWYG - jQuery plugin 0.6
*
* Copyright (c) 2008-2009 Juan M Martinez
* http://plugins.jquery.com/project/jWYSIWYG
*
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
* $Id: $
*/
(function( $ )
{
$.fn.... | JavaScript |
/*jslint browser: true */ /*global jQuery: true */
/**
* jQuery Cookie plugin
*
* Copyright (c) 2010 Klaus Hartl (stilbuero.de)
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
*/
/**
* Create a cookie with the giv... | JavaScript |
$(function () {
//start horizontal scroll content
//scrollpane parts
var scrollPane = $('.scroll-pane');
var scrollContent = $('.scroll-content');
//build slider
var scrollbar = $(".scroll-bar").slider({
slide:function(e, ui){
if( scrollContent.width() > scrollPane.width() ){ scrollContent... | JavaScript |
$(window).load(function(){
// We are listening for the window load event instead of the regular document ready.
function animSteam(){
// Create a new span with the steam1, or steam2 class:
$('<span>',{
className:'steam'+Math.floor(Math.random()*2 + 1),
css:{
// Apply a random offset... | JavaScript |
import QtQuick 1.1
import com.nokia.meego 1.0
import com.meego.extras 1.0
import QtMultimediaKit 1.1
Page {
id: amazon
property alias listView: listView
//import Qt.labs.gestures 1.0
// showStatusBar:false
Rectangle {
id: searchBox
y: 25
height:100
width: screen.orient... | JavaScript |
import QtQuick 1.1
import com.nokia.meego 1.0
import com.nokia.extras 1.0
//import qt.labs is new //import Qt.labs.components 1.0 import com.meego 1.0
PageStackWindow {
id: rootWindow
initialPage: amazon
SettingsPage {
id: settingsPage
}
AmazonPage{id:amazon}
//pages
... | JavaScript |
WorkerScript.onMessage = function(message) {
// ... long-running operations and calculations are done here
WorkerScript.sendMessage({"answer":message.msg})
}
| JavaScript |
/** 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 writing, software
* distributed und... | JavaScript |
javascript:(function (){
window.levelups = true;
var rev=/,v \d+\.(\d+)\s201/.exec("$Id: levelupopener.js,v 1.5 2012-02-28 11:51:43 brandon Exp $")[1],
version='Levelupopener v0.'+rev;
var spocklet='levelupopen';
window[spocklet+'_error_timer'] = false;
var debug = false;
var inact_log = {};
var logs=[]... | JavaScript |
$Id: missionlink.js,v 1.34 2012-03-17 06:16:49 eike Exp $
Mission link generator
Script is old needs a rewrite, shame....
*/
javascript:(function (){
var post_groups = false;
var groups;
var wall_button = true;
var stopme= false;
//Storage to save links for posting use
var proplinks = {
shor... | JavaScript |
javascript:(function(){
var http = 'http://';
if (/https/.test(document.location)) {
http = 'https://';
}
if(window.location.href !== http+'facebook.mafiawars.zynga.com/'){
if(confirm('You\'re not on the correct page, Would you like me to load it? (You will need to run script again)')){
window.location.href ... | JavaScript |
// ==UserScript==
// @name MDemonic
// @description Updated
// @include http://facebook.mafiawars.zynga.com/mwfb/remote/html_server.php*
// @include https://facebook.mafiawars.zynga.com/mwfb/remote/html_server.php*
// @version 9.9.4
// ==/UserScript==
{
// inject function so that in will run in the same context as othe... | JavaScript |
// Copyright 2007, Google Inc.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following discl... | JavaScript |
// Copyright 2007, Google Inc.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclai... | JavaScript |
$(document).ready(function() {
var mapSize = "small";
// Map resizing
$("#enlargeToggle").click(function() {
if(mapSize == "small") {
$("#map")
.animate({
"width": "1030px",
"height": "650px"
}, "fast");
mapSize = "large";
}
else {
$("#map")
.animate({
"width": "515px",
... | JavaScript |
google.load("jquery", "1.3.2");
var map;
var mass = "North America";
function initialize() {
if (GBrowserIsCompatible()) {
map = new GMap2(document.getElementById("map"));
// var clnt = new GLatLng();
// Americas
if(mass == "North America") {
map.setCenter(new GLatLng(38, 0), 1);
} else if( mass == "C... | 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 |
/**
* 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 |
/**
* 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 |
/**
* 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 |
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 |
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 |
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 |
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 |
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 |
/**
* 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 |
/**
* 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 |
/**
* 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 |
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 |
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 |
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 |
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 |
function ImageDiffer() {
this.lastData = null;
};
ImageDiffer.prototype.diff = function(imageData, diffData) {
//var diffData = [];
if (this.lastData != null) {
for (var i = 0; i < imageData.data.length; i++) {
diffData.data[i] = Math.abs(imageData.data[i] - this.lastData.data[i]);
}
}
this.las... | JavaScript |
importScripts('history-lib.js');
var imageDiffer = new ImageDiffer();
onmessage = function (event) {
postMessage(imageDiffer.diff(event.data.imageData, event.data.diffData));
}; | 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 |
/**
* 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 |
/**
* 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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.