Happy “Engineering Day” – JavaScript Huristics, Infinate IFRAME Elements, HTML5 Geo-Location API And Quantum Mechanics

An algorithm-problem I’ve made recently is combined of the inf.geolocaion road-trip,
which is variation of travelling salesman problem (TSP),
it uses web as *nodes* in a chain to avoid detection of the geo-security protocol,
and actual geo-location-api (when HTML5 supported).

I had the full article in publishing process.. need time to find a way to shorten it, to be suitable for a post..

provide a chain of *inf* road-trip into *inf* IFRAME elements, 1->n-1
that have the following content:

<!DOCTYPE html><html><head><script>
window.bubbleUp = function(data,arrPreFrames){
  arrPreFrames.push(document.location.pathname); //preserve logging the chain of frames.
  if(self !== window.parent){
    "function" === typeof window.parent.bubbleUp  &&  window.parent.bubbleUp.call(this,data,arrPreFrames); //push data up
  }else{
    console.log(data,arrPreFrames);  //swindow.parent here
  }
};
</script></head><body><iframe allowtransparency="true" frameborder="0" scrolling="no" style="display:none;width:1px;height:1px;" 
src="http://icompile.eladkarako.com/loc--------------n-1------------.html"></iframe></body></html>

for example the second iframe in the series of [0,1,2,…,n-1,n,…],
will look like this:

<!DOCTYPE html><html><head><script>
window.bubbleUp = function(data,arrPreFrames){
  arrPreFrames.push(document.location.pathname); //preserve logging the chain of frames.
  if(self !== window.parent){
    "function" === typeof window.parent.bubbleUp  &&  window.parent.bubbleUp.call(this,data,arrPreFrames); //push data up
  }else{
    console.log(data,arrPreFrames);  //swindow.parent here
  }
};
</script></head><body><iframe allowtransparency="true" frameborder="0" scrolling="no" style="display:none;width:1px;height:1px;" 
src="http://icompile.eladkarako.com/loc0.html"></iframe></body></html>

and the first iframe in the series of [0,1,2,…,n-1,n,…],
meaning #0 will look like this:

<!DOCTYPE html><html><head></head><body><script>
window.bubbleUp = function(data,arrPreFrames){
  arrPreFrames.push(document.location.pathname); //preserve logging the chain of frames.
  if(self !== window.parent){
    "function" === typeof window.parent.bubbleUp  &&  window.parent.bubbleUp.call(this,data,arrPreFrames); //push data up
  }else{
    console.log(data,arrPreFrames);  //swindow.parent here
  }
};

"undefined" !== typeof window.navigator.geolocation  &&  window.navigator.geolocation.getCurrentPosition(function(geo){ //initial action
  window.bubbleUp({
    "longitude":geo.coords.longitude,
    "latitude":geo.coords.latitude,
    "altitude":geo.coords.altitude,
    "asString":(function(){return "longitude="+geo.coords.longitude+";latitude="+geo.coords.latitude+";altitude="+geo.coords.altitude;}())
  },[]);
},function(positionErr){
    var o = {"verbose": positionErr.message, "errCode": positionErr.code};
    o["errStr"] = (function(){  //add corrent reason as new item
                    for(var errKey in positionErr){ 
                      if("code" !== errKey  &&   positionErr[ errKey ] === positionErr.code){
                        return errKey;
                      } 
                    }
                    return ""; 
                  }());
    o["asString"] = (function(){return "errCode="+o.errCode+";errStr="+o.errStr+";verbose="+o.verbose;}());
    window.bubbleUp(o, []);
},{
"enableHighAccuracy":true,
"maximumAge":600000, //milliseconds (::10 minutes cached)
"timeout":30000,     //milliseconds (::30 seconds till timeout)
});
</script></body></html>

the TOP (which will not be used for natural reasons) will be any target page,
implementing or not implementing the bubbleUp method,

lets make things more fun by introducing JavaScript into quantum mechanics
and to make complexity of TSP algorithm independent to window.TOP at any-point, we’ll attach it to quantum-events of any sort, this way it can be resolved using heuristics such as solutions for another problem dealing with similar probability related case, named Schrödinger’s cat problem.

I wish a very happy “Engineering Day”, to physicists, computer-science researchers and developers everywhere.

p.s.
get your nose up from that screen and go outside for 20 minutes :)