This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var cW = document.getElementById("canvasMain").width; | |
var cH = document.getElementById("canvasMain").height; | |
var mainCanvas = document.getElementById("canvasMain"); | |
mainCanvas.addEventListener('click', on_canvas_click, false); | |
var con = mainCanvas.getContext("2d"); | |
var circles = new linkedList(); | |
var fps = 30; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def send_string_data(str) | |
case str | |
when "" | |
put_string('""') | |
when /[\x80-\xff\r\n]/n | |
# literal | |
send_literal(str) | |
when /[(){ \x00-\x1f\x7f%*"\\]/n | |
# quoted string | |
send_quoted_string(str) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var agent; | |
function loadAgent(a){ | |
agent = a; | |
agent.show(); | |
$('.post').append($('.clippy')) | |
$('.post').append($('.clippy-balloon')) | |
} | |
clippy.load('Clippy', function(agent){ loadAgent(agent); }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function localStack(name){ | |
var o = new Object(); | |
o.name = name; | |
// initialize index if it doesn't exist | |
if(!localStorage[o.name]) localStorage[o.name] = 0; | |
// push an item onto stack | |
o.push = function(data){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// create a new dbStore stack | |
var myStack = localStack('myLocalStack'); | |
function onFormSubmit(){ | |
// push form data into local storage | |
myStack.push( $('form').serializeArray() ); | |
// see if we can send data to the server | |
checkForConnection(); | |
} |