code stringlengths 1 2.08M | language stringclasses 1
value |
|---|---|
// 1 - wall
// 2 - steel wall
// 3 - trees
// 4 - water
// 5 - ice
module.exports.map = [
[0,0,0,0,0,0,0,0,0,0,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,3,3,2,2,3,3,0,0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,3,3,2,2,3,3,0,0,0,0,0,0,0,0,0,0... | JavaScript |
// 1 - wall
// 2 - steel wall
// 3 - trees
// 4 - water
module.exports.map = [
[0,0,0,0,0,0,0,0,0,0,2,2,0,0,1,1,0,0,1,1,1,1,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0,2,2,0,0,1,1,0,0,1,1,1,1,0,0,0,0],
[0,0,0,1,1,1,1,1,1,1,1,1,0,0,1,1,0,0,0,0,0,0,0,0,0,0],
[0,0,0,1,1,1,1,1,1,1,1,1,0,0,1,1,0,0,0,0,0,0,0,0,0,0],
... | JavaScript |
// 1 - wall
// 2 - steel wall
// 3 - trees
// 4 - water
// 5 - ice
module.exports.map = [
[0,0,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,2,2,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,2,2,0,0,0,0,0,0],
[0,0,2,2,0,0,0,0,0,0,2,2,0,0,0,0,2,2,3,3,3,3,0,0,0,0],
[0,0,2,2,0,0,0,0,0,0,2,2,0,0,0,0,2,2,3,3,3,3,0,0... | JavaScript |
// 1 - wall
// 2 - steel wall
// 3 - trees
// 4 - water
module.exports.map = [
[0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,1,1,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,1,1,0,0,0,0,0,0,0,0],
[0,0,3,3,3,3,1,1,1,1,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0],
[0,0,3,3,3,3,1,1,1,1,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0],
... | JavaScript |
// 1 - wall
// 2 - steel wall
// 3 - trees
// 4 - water
// 5 - ice
module.exports.map = [
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,1,1,0,0,0,0,0,0,0,0],
[0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0],
[0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0... | JavaScript |
// 1 - wall
// 2 - steel wall
// 3 - trees
// 4 - water
module.exports.map = [
[0,0,0,0,1,1,0,0,0,0,1,1,0,0,0,0,0,0,1,1,0,0,0,0,0,0],
[0,0,0,0,1,1,0,0,0,0,1,1,0,0,1,1,0,0,1,1,0,0,0,0,0,0],
[3,3,1,1,1,1,1,1,0,0,1,1,0,0,0,0,0,0,1,1,1,0,0,0,0,0],
[3,3,1,1,1,1,1,1,0,0,1,1,0,0,2,2,0,0,1,1,1,0,0,0,0,0],
... | JavaScript |
// 1 - wall
// 2 - steel wall
// 3 - trees
// 4 - water
// 5 - ice
module.exports.map = [
[0,0,0,0,0,0,4,4,0,0,0,0,0,0,0,0,4,4,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,4,4,0,0,0,0,0,0,0,0,4,4,0,0,0,0,0,0,0,0],
[4,4,4,4,0,0,4,4,0,0,4,4,4,4,4,4,4,4,0,0,4,4,4,4,4,4],
[4,4,4,4,0,0,4,4,0,0,4,4,4,4,4,4,4,4,0,0,4,4,4,4... | JavaScript |
// 1 - wall
// 2 - steel wall
// 3 - trees
module.exports.map = [
[0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0],
[0,0,1,1,0,0,1,1,0,0,0,1,1,1,1,0,0,0,1,1,0,0,1,1,0,0],
[0,0,1,1,0,0,1,1,0,0,0,0,0,0,0,0,0,0,1,1,0,0,1,1,0,0],
[0,0,1,1,0,0,... | JavaScript |
isClient = function isClient()
{
return false;
};
var http = require("http"),
url = require("url"),
path = require("path"),
fs = require("fs");
registry = {};
require('./common/event');
require('./common/list');
require('./common/game');
require('./common/premade');
require('./serv... | JavaScript |
//FIXME move to BcClient
var field;
var bcClient, bcUi;
$(function() {
if (typeof WebSocket == 'undefined' && typeof MozWebSocket == 'undefined') {
$('#message-connecting').html('Извините, но ваш браузер не поддерживает websocket. ' +
'Рекомендуемые браузеры - <a href="http://www.google.com/c... | JavaScript |
Premade = function Premade(name, type)
{
this.name = name;
this.type = type || 'classic';
this.level = 1;
this.userCount = 0;
this.locked = false; // lock for new users
if (!isClient()) {
this.users = new TList(); // todo move to clan?
switch (this.type) {
case 'clas... | JavaScript |
/**
* public interface:
* void add(item)
* bool remove(item)
* bool move(item, newX, newY)
* object[] intersects(item)
*/
MapTiled = function MapTiled(width, height)
{
this.all = []; // for fast traversal
this.items = [];
this.maxX = Math.ceil(width/this.tileSize) - 1;
this.maxY = Math.ceil(height... | JavaScript |
/**
* this is for both, client and server.
*/
User = function User()
{
};
/**
* @todo hack for BcClient.onUserChange()
* @param data
* @return
*/
User.prototype.serialize = function()
{
var res = [];
res[1] = this.id;
res[2] = this.nick;
res[3] = this.lives;
res[4] = this.points;
res[5]... | JavaScript |
vector = function vector(x)
{
if (x) {
return x/Math.abs(x);
} else {
return 0;
}
};
serializeTypeMatches = {
'Bullet' : 1,
'Tank' : 2,
'TankBot' : 3,
'HeavyTankBot' : 4,
'FastBulletTankBot' : 5,
'FastTankBot' : 6,
'Wa... | JavaScript |
Game = function Game(level, premade)
{
this.premade = premade;
this.stepableItems = [];
this.field = new Field(13*32, 13*32);
this.field.game = this;
this.field.on('add', this.onAddObject.bind(this));
this.field.on('remove', this.onRemoveObject.bind(this));
var level = require(level);
... | JavaScript |
Message = function Message(text)
{
this.time = Date.now();
this.text = text;
};
Eventable(Message.prototype);
Message.prototype.serialize = function()
{
return [
serializeTypeMatches[this.constructor.name] // 0
, this.id // 1
, this.time // 2
, this.user.id // 3
, this.use... | JavaScript |
// test is this node.js or browser
if (typeof require == 'function') {
EventEmitter = require('events').EventEmitter;
}
Eventable = function Eventable(object)
{
for (var i in EventEmitter.prototype) {
object[i] = EventEmitter.prototype[i];
}
};
| JavaScript |
/**
* !Don't call Array methods which modify items, because they didn't emit events!
*/
TList = function TList()
{
this.items = [];
};
Eventable(TList.prototype);
TList.prototype.get = function(id)
{
return this.items[id];
};
TList.prototype.add = function(item)
{
if (item.id !== undefined) {
... | JavaScript |
function moveToPosition()
{
if (tank.getY() > 13*16) {
tank.startMove('up');
} else {
tank.startMove('left');
tank.stopMove();
store.step = clearLeftLine;
}
}
function clearLeftLine()
{
var inters = field.intersect(tank.getX()/2, tank.getY(),
tank.getX()/2, 8);
... | JavaScript |
var util = require('util');
var vm = require('vm');
var fs = require("fs");
var sandbox = {
};
fs.readFile('untrusted.js', 'utf8', function(err, file) {
if(!err) {
// try {
vm.runInNewContext(file, sandbox);
// } catch (ex) {
// console.log(ex, ex.message);
// ... | JavaScript |
qwe(); | JavaScript |
var n = 0;
var id = 0;
/**
* this is also object manager, so all coordinate operations should be done here
* Ideally object should not know about x and y
*
* public interface:
* add(item)
* remove(item)
* move(item, newX, newY)
* intersects(item)
*/
function Area(x, y, hw, hh, leaf)
{
this.x = x;
thi... | JavaScript |
// Copyright Joyent, Inc. and other Node contributors.
//
// 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 limitation the rights to use, copy, modi... | JavaScript |
// CodeMirror v2.18
// All functions that need access to the editor's state live inside
// the CodeMirror function. Below that, at the bottom of the file,
// some utilities are defined.
// CodeMirror is the only global var we claim
var CodeMirror = (function() {
// This is the function that produces an editor insta... | JavaScript |
CodeMirror.defineMode("javascript", function(config, parserConfig) {
var indentUnit = config.indentUnit;
var jsonMode = parserConfig.json;
// Tokenizer
var keywords = function(){
function kw(type) {return {type: type, style: "keyword"};}
var A = kw("keyword a"), B = kw("keyword b"), C = kw("keyword c"... | JavaScript |
var Wami = window.Wami || {};
Wami.Button = function(guiID, type) {
var self = this;
self.active = false;
// Get the background button image position
// Index: 1) normal 2) pressed 3) mouse-over
function background(index) {
if (index == 1)
return "-56px 0px";
if (index == 2)
return "0px 0px";
if (inde... | JavaScript |
var Wami = window.Wami || {};
// A place to store non-anonymous callback functions.
Wami._callbacks = Wami._callbacks || {};
// This method ensures that a WAMI recorder is operational, and that
// the following API is available in the Wami namespace. All functions
// must be named (i.e. cannot be anonymous).
//
// W... | JavaScript |
/* http://keith-wood.name/timeEntry.html
Time entry for jQuery v1.4.8.
Written by Keith Wood (kbwood{at}iinet.com.au) June 2007.
Dual licensed under the GPL (http://dev.jquery.com/browser/trunk/jquery/GPL-LICENSE.txt) and
MIT (http://dev.jquery.com/browser/trunk/jquery/MIT-LICENSE.txt) licenses.
Please... | JavaScript |
$(document).ready(function() {
alert('it hit here');
$( "#tabs" ).tabs();
}); | JavaScript |
/* jsonstreams plugin
**
** This plugin upgrades Strophe to support XEP-0295: JSON Encodings for XMPP
**
*/
Strophe.addConnectionPlugin('jsonstreams', {
init: function (conn) {
var parseXMLString = function(xmlStr) {
var xmlDoc = null;
if (window.ActiveXObject) {
xmlDoc = new ActiveXObject("Mic... | JavaScript |
// This code was written by Tyler Akins and has been placed in the
// public domain. It would be nice if you left this header intact.
// Base64 code from Tyler Akins -- http://rumkin.com
var Base64 = (function () {
var keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
var obj = {
... | JavaScript |
var xmlns_ibb = "http://jabber.org/protocol/ibb";
var xmlns_tcp = "http://prosody.im/protocol/tcpproxy";
function XMPPIO(xmppconn, xmpptcp_host)
{
this.xmppconn = xmppconn;
this.xmpphost = xmpptcp_host;
this.sid = "FIXME";
this.listeners = [];
return this;
}
XMPPIO.prototype = {
connect: function (host, port)
... | JavaScript |
var BOSH_SERVICE = '/http-bind/';
var show_log = false;
Strophe.addNamespace('C2SSTREAM', 'http://prosody.im/streams/c2s');
Strophe.addNamespace('S2SSTREAM', 'http://prosody.im/streams/s2s');
Strophe.addNamespace('ADMINSUB', 'http://prosody.im/adminsub');
Strophe.addNamespace('CAPS', 'http://jabber.org/protocol/caps')... | JavaScript |
/*
Quicksand 1.2.2
Reorder and filter items with a nice shuffling animation.
Copyright (c) 2010 Jacek Galanciak (razorjack.net) and agilope.com
Big thanks for Piotr Petrus (riddle.pl) for deep code review and wonderful docs & demos.
Dual licensed under the MIT and GPL version 2 licenses.
http://github.com/jquery/jq... | JavaScript |
/* Scal - prototype calendar/date picker
* - Jamie Grove
* - Ian Tyndall
*
* Scal is freely distributable under the terms of an MIT-style license.
* For details, see the Scal web site: http://scal.fieldguidetoprogrammers.com
*
*-----------------------------------------------------------------------... | JavaScript |
var tiempo;
String.prototype.tratarResponseText=function(){
var pat=/<script[^>]*>([\S\s]*?)<\/script[^>]*>/ig;
var pat2=/\b\s+src=[^>\s]+\b/g;
var elementos = this.match(pat) || [];
for(i=0;i<elementos.length;i++) {
var nuevoScript = document.createElement('script');
nuevoScript.... | JavaScript |
// Copyright (c) 2006 Sébastien Gruhier (http://xilinus.com, http://itseb.com)
//
// 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 limitation the ... | JavaScript |
/*
* Really easy field validation with Prototype
* http://tetlaw.id.au/view/javascript/really-easy-field-validation
* Andrew Tetlaw
* Version 1.5.4.1 (2007-01-05)
*
* Copyright (c) 2007 Andrew Tetlaw
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associate... | JavaScript |
/*
*
* Copyright (c) 2007 Andrew Tetlaw & Millstream Web Software
* http://www.millstream.com.au/view/code/tablekit/
* Version: 1.2.1 2007-03-11
*
* 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 Soft... | JavaScript |
// script.aculo.us unittest.js v1.8.3, Thu Oct 08 11:23:33 +0200 2009
// Copyright (c) 2005-2009 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
// (c) 2005-2009 Jon Tirsen (http://www.tirsen.com)
// (c) 2005-2009 Michael Schuerig (http://www.schuerig.de/michael/)
//
// script.aculo.us i... | JavaScript |
// script.aculo.us slider.js v1.8.3, Thu Oct 08 11:23:33 +0200 2009
// Copyright (c) 2005-2009 Marty Haught, Thomas Fuchs
//
// script.aculo.us is freely distributable under the terms of an MIT-style license.
// For details, see the script.aculo.us web site: http://script.aculo.us/
if (!Control) var Control = { };
/... | JavaScript |
// script.aculo.us sound.js v1.8.3, Thu Oct 08 11:23:33 +0200 2009
// Copyright (c) 2005-2009 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
//
// Based on code created by Jules Gravinese (http://www.webveteran.com/)
//
// script.aculo.us is freely distributable under the terms of an MIT-style license.
// ... | JavaScript |
// script.aculo.us scriptaculous.js v1.8.3, Thu Oct 08 11:23:33 +0200 2009
// Copyright (c) 2005-2009 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"),... | JavaScript |
// script.aculo.us builder.js v1.8.3, Thu Oct 08 11:23:33 +0200 2009
// Copyright (c) 2005-2009 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
//
// script.aculo.us is freely distributable under the terms of an MIT-style license.
// For details, see the script.aculo.us web site: http://script.aculo.us/
va... | JavaScript |
/*
* Fabtabulous! Simple tabs using Prototype
* http://tetlaw.id.au/view/blog/fabtabulous-simple-tabs-using-prototype/
* Andrew Tetlaw
* version 1.1 2006-05-06
* http://creativecommons.org/licenses/by-sa/2.5/
*/
var Fabtabs = Class.create();
Fabtabs.prototype = {
initialize : function(element) {
th... | JavaScript |
var _navegador = navigator.userAgent;
var ie = /msi/i.test(_navegador);
var op = /opera/i.test(_navegador);
var mo = /gecko/i.test(_navegador);
var otro = !(ie || mo);
var _insertor, _insertar, _formulario, _texto, _lector = "";
function datos_ie() {
_texto = document.selection.createRange().text;
if (_form... | 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 |
// 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 |
/**
* @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 |
// 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 |
/**
* @author TPS
*/
window.onload = function(){
/*Textarea HTMLElement Finding*/
var txtArea = document.getElementById('ta1');
// Buttons identificators
var btnEditAB = document.getElementById('b1');
var btnJSON = document.getElementById('b2');
/*=================JSON AdBlock v... | JavaScript |
/*
http://www.JSON.org/json2.js
2011-01-18
Public Domain.
NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
See http://www.JSON.org/js.html
This code should be minified before deployment.
See http://javascript.crockford.com/jsmin.html
USE YOUR OWN COPY. IT IS EXTREMELY UNWISE... | JavaScript |
/*
Quicksand 1.2.2
Reorder and filter items with a nice shuffling animation.
Copyright (c) 2010 Jacek Galanciak (razorjack.net) and agilope.com
Big thanks for Piotr Petrus (riddle.pl) for deep code review and wonderful docs & demos.
Dual licensed under the MIT and GPL version 2 licenses.
http://github.com/jquery/jq... | JavaScript |
/*
* jQuery FlexSlider v2.1
* http://www.woothemes.com/flexslider/
*
* Copyright 2012 WooThemes
* Free to use under the GPLv2 license.
* http://www.gnu.org/licenses/gpl-2.0.html
*
* Contributing author: Tyler Smith (@mbmufffin)
*/
;(function ($) {
//FlexSlider: Object Instance
$.flexslider = function(el,... | JavaScript |
/*
Quicksand 1.3
Reorder and filter items with a nice shuffling animation.
Copyright (c) 2010 Jacek Galanciak (razorjack.net) and agilope.com
Big thanks for Piotr Petrus (riddle.pl) for deep code review and wonderful docs & demos.
Dual licensed under the MIT and GPL version 2 licenses.
http://github.com/jquery/jque... | JavaScript |
/*
Slider
*/
$(window).load(function() {
$('.flexslider').flexslider({
animation: "slide",
controlNav: "thumbnails"
});
});
/*
Filterable portfolio
*/
jQuery(document).ready(function() {
$clientsHolder = $('ul.portfolio-img');
$clientsClone = $clientsHolder.clone();
$('.... | JavaScript |
/*
* Copyright (C) 2009 Joel Sutherland
* Licenced under the MIT license
* http://www.newmediacampaigns.com/page/jquery-flickr-plugin
*
* Available tags for templates:
* title, link, date_taken, description, published, author, author_id, tags, image*
*/
(function($) {
$.fn.jflickrfeed = function(settings, cal... | JavaScript |
// jquery.tweet.js - See http://tweet.seaofclouds.com/ or https://github.com/seaofclouds/tweet for more info
// Copyright (c) 2008-2012 Todd Matthews & Steve Purcell
(function (factory) {
if (typeof define === 'function' && define.amd)
define(['jquery'], factory); // AMD support for RequireJS etc.
else
fact... | JavaScript |
/*
* jQuery FlexSlider v2.1
* http://www.woothemes.com/flexslider/
*
* Copyright 2012 WooThemes
* Free to use under the GPLv2 license.
* http://www.gnu.org/licenses/gpl-2.0.html
*
* Contributing author: Tyler Smith (@mbmufffin)
*/
;(function ($) {
//FlexSlider: Object Instance
$.flexslider = function(el,... | JavaScript |
/*
Quicksand 1.3
Reorder and filter items with a nice shuffling animation.
Copyright (c) 2010 Jacek Galanciak (razorjack.net) and agilope.com
Big thanks for Piotr Petrus (riddle.pl) for deep code review and wonderful docs & demos.
Dual licensed under the MIT and GPL version 2 licenses.
http://github.com/jquery/jque... | JavaScript |
/*
Slider
*/
$(window).load(function() {
$('.flexslider').flexslider({
animation: "slide",
controlNav: "thumbnails"
});
});
/*
Filterable portfolio
*/
jQuery(document).ready(function() {
$clientsHolder = $('ul.portfolio-img');
$clientsClone = $clientsHolder.clone();
$('.... | JavaScript |
/*
* Copyright (C) 2009 Joel Sutherland
* Licenced under the MIT license
* http://www.newmediacampaigns.com/page/jquery-flickr-plugin
*
* Available tags for templates:
* title, link, date_taken, description, published, author, author_id, tags, image*
*/
(function($) {
$.fn.jflickrfeed = function(settings, cal... | JavaScript |
// jquery.tweet.js - See http://tweet.seaofclouds.com/ or https://github.com/seaofclouds/tweet for more info
// Copyright (c) 2008-2012 Todd Matthews & Steve Purcell
(function (factory) {
if (typeof define === 'function' && define.amd)
define(['jquery'], factory); // AMD support for RequireJS etc.
else
fact... | JavaScript |
/*
* Copyright 2011 Roman Nurik
*
* 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 2012 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 2012 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 2012 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 2006 The Closure Library Authors. 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 requ... | JavaScript |
/**
* Copyright 2013 Google, Inc.
* @fileoverview Deal with page masters, partition groups, and partitions.
*/
goog.provide('adapt.pm');
goog.require('adapt.base');
goog.require('adapt.expr');
goog.require('adapt.css');
goog.require('adapt.csscasc');
goog.require('adapt.vtree');
/**
* @type {number}
*/
adapt.pm.... | JavaScript |
/**
* Copyright 2013 Google, Inc.
* @fileoverview Fills a region with styled content. This file does not communicate with
* the styling system directly. Instead it goes through the layout interface that gives it one
* view tree node at a time.
*/
goog.require('adapt.base');
goog.require('adapt.geom');
goog.require... | JavaScript |
goog.provide('adapt.toc');
goog.require('adapt.vtree');
goog.require('adapt.vgen');
goog.require('adapt.ops');
goog.require('adapt.font');
goog.require('adapt.expr');
// closed: 25B8
// open: 25BE
// empty: 25B9
/** @const */
adapt.toc.bulletClosed = "\u25B8";
/** @const */
adapt.toc.bulletOpen = "\u25BE";
/** @cons... | JavaScript |
/**
* Copyright 2013 Google, Inc.
* @fileoverview Adaptive Layout expressions.
*/
goog.provide('adapt.expr');
goog.require('adapt.base');
/**
* @typedef {{fontFamily:string, lineHeight:number, margin:number, hyphenate:boolean,
* columnWidth:number, horizontal:boolean, nightMode:boolean}}
* }}
*/
adapt.expr... | JavaScript |
/**
* Copyright 2013 Google, Inc.
* @fileoverview Utility functions to work with XML (mostly XHTML) documents.
*/
goog.provide('adapt.xmldoc');
goog.require('adapt.base');
goog.require('adapt.task');
goog.require('adapt.taskutil');
goog.require('adapt.net');
/**
* @const
*/
adapt.xmldoc.ELEMENT_OFFSET_ATTR = "d... | JavaScript |
/**
* Copyright 2013 Google, Inc.
* @fileoverview Parse validation rules (validation.txt), validate properties and shorthands.
*/
goog.provide('adapt.cssvalid');
goog.require('adapt.base');
goog.require('adapt.net');
goog.require('adapt.task');
goog.require('adapt.taskutil');
goog.require('adapt.css');
goog.require... | JavaScript |
/**
* Copyright 2013 Google, Inc.
* @fileoverview Geometric utilities.
*/
goog.provide('adapt.geom');
/**
* @param {number} x1
* @param {number} y1
* @param {number} x2
* @param {number} y2
* @constructor
*/
adapt.geom.Rect = function(x1, y1, x2, y2) {
/** @type {number} */ this.x1 = x1;
/** @type {number} ... | JavaScript |
/**
* Copyright 2013 Google, Inc.
* @fileoverview Basic view tree data structures and support utilities.
*/
goog.require('adapt.base');
goog.require('adapt.geom');
goog.require('adapt.task');
goog.require('adapt.taskutil');
goog.require('adapt.xmldoc');
goog.require('adapt.css');
goog.provide('adapt.vtree');
/** ... | JavaScript |
/**
* Copyright 2013 Google, Inc.
* @fileoverview CSS Tokenizer.
*/
goog.provide('adapt.csstok');
goog.require('adapt.base');
/**
* @interface
*/
adapt.csstok.TokenizerHandler = function() {};
/**
* @param {string} mnemonics
* @param {adapt.csstok.Token} token
* @return {void}
*/
adapt.csstok.TokenizerHandl... | JavaScript |
/**
* Copyright 2013 Google, Inc.
* @fileoverview Utilities asynchronous execution and cooperative multitasking.
*/
goog.provide('adapt.taskutil');
goog.require('adapt.task');
/**
* A class that can fetch or compute a resource that may be needed by multiple tasks.
* The first time a resource is requested, it is... | JavaScript |
/**
* Copyright 2013 Google, Inc.
* @fileoverview Content developer support.
*/
goog.provide('adapt.devel');
goog.require('adapt.epub');
/**
* @param {adapt.epub.OPFView} viewer
*/
adapt.devel.showTools = function(viewer) {
var tools = adapt.devel.getTools(viewer);
if (!tools) {
tools = new adapt.devel.Tools... | JavaScript |
/**
* Copyright 2013 Google, Inc.
* @fileoverview Sample EPUB rendering application.
*/
goog.provide('adapt.viewer');
goog.require('adapt.task');
goog.require('adapt.vgen');
goog.require('adapt.expr');
goog.require('adapt.epub');
goog.require('adapt.devel');
/**
* @typedef {function(this:adapt.viewer.Viewer,adapt... | JavaScript |
/**
* Copyright 2013 Google, Inc.
* @fileoverview Deal with META-INF/ and .opf files in EPUB container.
*/
goog.provide('adapt.epub');
goog.require('adapt.csscasc');
goog.require('adapt.font');
goog.require('adapt.ops');
goog.require('adapt.cfi');
goog.require('adapt.toc');
/**
* @typedef {{spineIndex:number,page... | JavaScript |
/**
* Copyright 2013 Google, Inc.
* @fileoverview Common utilities.
*/
goog.provide('adapt.base');
/**
* @typedef {*}
*/
adapt.base.JSON;
/**
* @param {adapt.base.JSON} json
* @return {string}
*/
adapt.base.jsonToString = function(json) {
return JSON.stringify(json);
};
/**
* @param {string} str
* @return... | JavaScript |
/**
* Copyright 2013 Google, Inc.
* @fileoverview View tree generator.
*/
goog.provide('adapt.vgen');
goog.require('adapt.task');
goog.require('adapt.taskutil');
goog.require('adapt.css');
goog.require('adapt.csscasc');
goog.require('adapt.cssstyler');
goog.require('adapt.vtree');
goog.require('adapt.xmldoc');
goog... | JavaScript |
/**
* Copyright 2013 Google, Inc.
* @fileoverview Calculate SHA1 hash of the given content.
*/
goog.provide("adapt.sha1");
goog.require("adapt.base");
/**
* @param {number} n
* @return {string} big-endian byte sequence
*/
adapt.sha1.encode32 = function(n) {
return String.fromCharCode((n >>> 24)&0xFF, (n >>> 16... | JavaScript |
/**
* Copyright 2013 Google, Inc.
* @fileoverview Apply CSS cascade to a document incrementally and cache the result.
*/
goog.provide('adapt.cssstyler');
goog.require('adapt.vtree');
goog.require('adapt.csscasc');
goog.require('adapt.xmldoc');
goog.require('adapt.cssprop');
/**
* @constructor
*/
adapt.cssstyler.... | JavaScript |
/**
* Copyright 2013 Google, Inc.
* @fileoverview Support for EPUB Canonical Fragment Identifiers.
*/
goog.provide('adapt.cfi');
goog.require('adapt.base');
/**
* @typedef {{
* node: Node,
* offset: number,
* after: boolean,
* sideBias: ?string,
* ref: adapt.cfi.Fragment
* }}
*/
adapt.cfi.Position;... | JavaScript |
/**
* Copyright 2013 Google, Inc.
* @fileoverview Support for asynchronous execution and cooperative multitasking.
*/
goog.require('adapt.base');
goog.provide('adapt.task');
/**
* External timer. Only needed for testing.
* @interface
*/
adapt.task.Timer = function() {};
/**
* @return {number} current time in... | JavaScript |
/**
* Copyright 2013 Google, Inc.
* @fileoverview Support utilities to extract information from various (parsed) CSS values.
*/
goog.provide('adapt.cssprop');
goog.require('adapt.base');
goog.require('adapt.css');
goog.require('adapt.csstok');
goog.require('adapt.cssparse');
goog.require('adapt.expr');
goog.require... | JavaScript |
/**
* Copyright 2013 Google, Inc.
* @fileoverview CSS Values and utilities to handle them.
*/
goog.provide('adapt.css');
goog.require('adapt.base');
goog.require('adapt.expr');
/**
* Name table. Note that entries will be added to it at run time, but the table
* itself stays the same.
* @type {!Object.<string,a... | JavaScript |
/**
* Copyright 2013 Google, Inc.
* @fileoverview Sample EPUB rendering application.
*/
goog.provide('adapt.sampleapp');
goog.require('adapt.base');
goog.require('adapt.viewer');
/** @type {number} */ adapt.sampleapp.fontSize = 16;
/** @type {boolean} */ adapt.sampleapp.touchActive = false;
/** @type {number} */ a... | JavaScript |
/**
* Copyright 2013 Google, Inc.
* @fileoverview Render EPUB content files by applying page masters, styling and layout.
*/
goog.provide('adapt.ops');
goog.require('adapt.task');
goog.require('adapt.geom');
goog.require('adapt.expr');
goog.require('adapt.css');
goog.require('adapt.csstok');
goog.require('adapt.css... | JavaScript |
/**
* Copyright 2013 Google, Inc.
* @fileoverview CSS Parser.
*/
goog.require('adapt.base');
goog.require('adapt.expr');
goog.require('adapt.css');
goog.require('adapt.csstok');
goog.require('adapt.task');
goog.require('adapt.net');
goog.provide('adapt.cssparse');
/**
* User agent stylesheet base specificity.
* ... | JavaScript |
/**
* Copyright 2013 Google, Inc.
* @fileoverview Fetch resource from a URL.
*/
goog.provide('adapt.net');
goog.require('adapt.task');
/** @typedef {{status:number, url:string, responseText:?string, responseXML:Document, responseBlob:Blob}} */
adapt.net.Response;
/**
* @param {string} url
* @param {boolean=} op... | JavaScript |
/**
* Copyright 2013 Google, Inc.
* @fileoverview Deal with embedded fonts.
*/
goog.provide('adapt.font');
goog.require('adapt.task');
goog.require('adapt.taskutil');
goog.require('adapt.net');
goog.require('adapt.expr');
goog.require('adapt.css');
goog.require('adapt.cssprop');
goog.require('adapt.cssparse');
/*... | JavaScript |
/**
* Copyright 2013 Google, Inc.
* @fileoverview CSS Cascade.
*/
goog.provide('adapt.csscasc');
goog.require('adapt.expr');
goog.require('adapt.css');
goog.require('adapt.task');
goog.require('adapt.taskutil');
goog.require('adapt.cssprop');
goog.require('adapt.cssparse');
goog.require('adapt.cssvalid');
adapt.cs... | JavaScript |
const WIDTH = 800;
const HEIGHT = 600;
function initGame(fbInfo) {
experiment(fbInfo);
}
function experiment(response) {
var canvas = document.getElementById("canvas");
var context = canvas.getContext("2d");
context.moveTo(0,0);
context.lineTo(WIDTH, HEIGHT);
context.stroke();
var names = "";
... | JavaScript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.