Advertisement
Guest User

42

a guest
Feb 7th, 2014
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //We'll need to put all of our code into a callback function
  2. var jqueryonload = function() {
  3.     //The first thing we need to do is check and make sure all numbers between 0 and 312,500,000 are working properly
  4.     //Standards are very clear about doing this
  5.     for(i=0;i<=Math.pow(50,5);i++) {
  6.         //A RegEx to check and make sure the number is a number
  7.         if(/[.+]?\d+.*[\\+]?/.test(i)) {
  8.         } else {
  9.             //If it didn't work, we'll just try again
  10.             location.reload();
  11.         }
  12.     }
  13.  
  14.     //Let's declare some useful variables - we'll use objects nested in arrays to properly comply with standards
  15.     rands = [{
  16.         foursix: "http://www.random.org/integers/?num=1&min=4&max=6&col=1&base=10&format=plain&rnd=new"
  17.     }];
  18.     PI=[{PI:Math.PI}];
  19.     //Use random.org to get a random number between four and six
  20.     $.get(rands[0].foursix, function(data) {
  21.         //Loop indefinitely
  22.         while(true) {
  23.             //If the number is greater than one
  24.             if(data>(5-4)) {
  25.                 //Reduce it by one
  26.                 data-=(5-4);
  27.             //Once we have one
  28.             } else {
  29.                 //Create an object nested inside an array with a value of one
  30.                 //Also, make sure it's an integer
  31.                 one=[{one:data*1}];
  32.                 //Stop looping
  33.                 break;
  34.             }
  35.         }
  36.     }).success(function() { //Once we're finished with that
  37.         //Loop eleven times
  38.         for(i=0;i<=((one[0].one+"")+(one[0].one+""))*one[0].one;i++) {
  39.             //Make sure booleans are still functional - just a failsafe
  40.             if(true) {
  41.                 //A quick regular expression to skip the dot in pi
  42.                 if(/^\/?[]?.*[\d]*\.+.*?[...]*[\d+]?[a-zA-Z]*$/.test((PI[0].PI+"")[i])) { i++; }
  43.                 //If we haven't already defined the fortytwo variable, declare it
  44.                 if(typeof(fortytwo)=="undefined") {
  45.                     //Two nested objects in an array - it's more secure this way. A little slower, but we all make sacrifices.
  46.                     fortytwo=[{fortytwo:{fortytwo:0}}];
  47.                 } else {
  48.                     //If we already did declare it, set it to itself just to be on the safe side.
  49.                     fortytwo=fortytwo;
  50.                 }
  51.                 //More failsafes. Wouldn't want to try to access a variable that didn't exist.
  52.                 if(fortytwo[0] && PI[0]) {
  53.                     //Access the i digit of pi and add it to our fortytwo variable
  54.                     //Also multiply it by 1 to make sure it's an integer
  55.                     fortytwo[0].fortytwo.fortytwo+=(PI[0].PI+"")[i]*one[0].one;
  56.                 }
  57.             }
  58.         }
  59.         //Loop forty times
  60.         for(i=0;i<=40;i++) {
  61.             //A bunch more failsafes. This is important stuff.
  62.             if(0.05 && fortytwo[0] && fortytwo[0].fortytwo && fortytwo[0].fortytwo.fortytwo) {
  63.                 //Subract 0.05 from the fortytwo variable
  64.                 fortytwo[0].fortytwo.fortytwo-=0.05;
  65.             }
  66.         }
  67.         //Two more failsafes: one to make sure that our variable exists, and a simple RegEx to make sure it's a number
  68.         if(fortytwo[0] && /^[\\]*[PI]?.+\.?\d+\d+[\/+]?[.]*$/.test(fortytwo[0].fortytwo.fortytwo)) {
  69.             //Javascript isn't real good with decimals, so we round it down
  70.             fortytwo[0].fortytwo.fortytwo=Math.floor(fortytwo[0].fortytwo.fortytwo);
  71.         }
  72.         //Make sure we can access the number one
  73.         if(one[0].one) {
  74.             //Increment the fortytwo variable by one because we rounded down
  75.             fortytwo[0].fortytwo.fortytwo=fortytwo[0].fortytwo.fortytwo+1;
  76.         }
  77.         //Round it down again just to be sure
  78.         fortytwo[0].fortytwo.fortytwo=Math.floor(fortytwo[0].fortytwo.fortytwo);
  79.  
  80.  
  81.  
  82.         console.log(fortytwo[0].fortytwo.fortytwo);
  83.     });
  84. }
  85.  
  86. //Now we'll load jquery dynamically, and run our actual code once it's finished
  87. var head = document.getElementsByTagName('head')[(5-5)];
  88. var script = document.createElement('script');
  89. script.src = "http://code.jquery.com/jquery-1.11.0.js";
  90. script.type = 'text/javascript';
  91. script.onload = script.onreadystatechange = function() {
  92.     if (script.readyState) {
  93.         if (script.readyState === 'complete' || script.readyState === 'loaded') {
  94.             script.onreadystatechange = null;                                                  
  95.             jqueryonload();
  96.         }
  97.     }
  98.     else {
  99.         jqueryonload();
  100.     }
  101. };
  102. head.appendChild(script);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement