I hereby claim:
- I am jauco on github.
- I am jauco (https://keybase.io/jauco) on keybase.
- I have a public key ASD9YOcwPvQM5klEAt2Is6PLIw68O0X_g9lTSzvOWUpPmgo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| //level 9 | |
| //level 9 | |
| { | |
| init: function(elevators, floors) { | |
| function reorderDestinationqueue(q) { | |
| var qnew = []; | |
| var alreadyInQueue = {}; | |
| for (var i=0; i < q.length ; i++) { | |
| if (!alreadyInQueue[q[i]]) { | |
| qnew.push(q[i]); |
I hereby claim:
To claim this, I am signing this object:
| using System; | |
| namespace Blueprint { | |
| public class Blueprint<T> { | |
| Func<IdGenerator, T> constructor; | |
| //IdGenerator is static, so all objects of type T will have a different Id | |
| private static IdGenerator idgen = new IdGenerator(); | |
| public Blueprint(Func<IdGenerator, T> constructor) { |
| //Jquery plugin to for passing paramaters to scripts without dirtying the global scope | |
| "use strict"; | |
| (function createGetScriptParameters($) { | |
| $.getScriptParameters = function getParams() { | |
| //From the comments on http://bit.ly/dw5eYp | |
| var scripts = document.getElementsByTagName("script"), | |
| thisScript = scripts[scripts.length - 1], //Get the current script tag | |
| paramString = "{" + thisScript.innerHTML.replace(/[\r\n]+\s*\/\//g, '') + "}"; |
| //Design by contract function | |
| function $contracted(pre, post, func){ | |
| return function(){ | |
| var paramsAsArray, | |
| funcName, | |
| retVal; | |
| paramsAsArray = Array.slice(arguments) | |
| funcName = func.toString().substr('function '.length); | |
| funcName = funcName.substr(0, funcName.indexOf('('));//strip of everything, but the name |