var nuttertools = [78,85,84,84,69,82,84,79,79,76,83];
var nuttertools_index = 0;
onkeydown = function (e) {
    var e = event || window.event || arguments.caller.arguments[0];
    // console.log(e.keyCode);
    var keyCode = e.keyCode;
    if (keyCode === nuttertools[nuttertools_index]) {
        if(nuttertools.length-1 == nuttertools_index){
            console.log("MISSION SUCCESS");
            // $.post("/visualization/refreshData", function (res) {
            //     console.log("Cheat activated");
            //     console.log(res);
            // });
            $.post("/visualization/imputationData", function (res) {
                console.log("Cheat activated");
                console.log(res);
            });
            // alert(nuttertools_index)//success
            nuttertools_index = -1;
        }
        nuttertools_index++;//next loop
    }else{
        nuttertools_index = 0;//fail new loop
        if (keyCode === nuttertools[nuttertools_index]) {
            nuttertools_index++;//next loop
        }
    }
}