This file contains hidden or 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() { | |
| var Actor, Meta, flatten_world, flywheel, inner_loop, pure, render, _; | |
| flywheel = require("./lib/flywheel"); | |
| _ = require("./lib/underscore"); | |
| pure = {}; | |
| Actor = function() { |
This file contains hidden or 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
| <script type="text/javascript"> | |
| var counter = 0; | |
| function execLot() | |
| { | |
| var grpNums1 = new Array(1,2,3,4,5,6,7,8,9,10); | |
| var index1 = Math.floor(Math.random()*grpNums1.length); |
This file contains hidden or 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
| // initialize the counter and the array | |
| var numnames = 0; | |
| var names = new Array(); | |
| function SortNames(){ | |
| // Get the name from the text field and convert it to Upper Case | |
| var thename = document.theform.newname.value; | |
| thename=thename.toUpperCase(); | |
| // Add the name to the array | |
| names[numnames] = thename; | |
| // Increment the counter |
This file contains hidden or 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
| <html> | |
| <head> | |
| <script type="text/javascript"> | |
| function newTable(form)//begins function | |
| { | |
| var rows = Number(form.rows.value);//number function converts object values to their numbers | |
| var cols = Number(form.columns.value);//number function converts object values to their numbers |
This file contains hidden or 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
| What I want: Load a number of images and fire a callback once all are loaded. The image objects of all images need to be available, this is *not* just for caching. | |
| Example use: | |
| var loader = new ImageLoader(); | |
| var img1 = loader.addImage('someurl'); | |
| var img2 = loader.addImage('anotherurl'); | |
| loader.beginLoading(function() { | |
| /* do something with the loaded images img1 and img2, which are Image objects | |
| }); |
This file contains hidden or 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
| void function(){ | |
| var InstM=jQuery('#InstitutionalM'); | |
| var SolutM=jQuery('#SolutionsM'); | |
| var DevM=jQuery('#DevelopersM'); | |
| InstM.subname=jQuery('#InstitutionalSM'); | |
| SolutM.subname=jQuery('#SolutionsSM'); | |
| DevM.subname=jQuery('#DevelopersSM'); | |
| var AllSubMenu=jQuery('#InstitutionalM,#SolutionsM,#DevelopersM'); |
This file contains hidden or 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 selectStoreValues(fromElementID,toElementID) | |
| { | |
| var fileToTableObj = document.getElementById('ImportexportFilesSelected'); | |
| var fileToTable = fileToTableObj.options[fileToTableObj.selectedIndex].value; | |
| var txtSelectedValuesObj = document.getElementById(toElementID); | |
| var selectedArray = new Array(); | |
| var selObj = document.getElementById(fromElementID); | |
| var i; | |
| var count = 0; | |
| for (i=0; i<selObj.options.length; i++) |
This file contains hidden or 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 foo(a){ | |
| return a == 1 ? "that was one!" | |
| : a == 2 ? "and that one was twoooo" | |
| : /* otherwise */ "I can't deal with bigger numbers" | |
| } |
This file contains hidden or 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 fizzbuzz(len){ | |
| var res = [] | |
| for ( var i = 1; i <= len; i += 1 ) res.push(fizz_or_buzz(i)) | |
| return res | |
| function fizz_or_buzz(num){ | |
| return num % 3 == 0 && num % 5 == 0 ? "fizzbuzz" | |
| : num % 3 == 0 ? "fizz" |
This file contains hidden or 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(){ | |
| var game = { | |
| foo: function(){ | |
| return game | |
| } | |
| } | |
| console.log(game.foo()) | |
| }() |