Click here to Skip to main content
15,903,201 members

DieOnTime - Professional Profile



Summary

    Blog RSS
5
Debator
2
Editor
17
Enquirer
15
Organiser
277
Participant
0
Author
0
Authority
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Reputation

Weekly Data. Recent events may not appear immediately. For information on Reputation please see the FAQ.

Privileges

Members need to achieve at least one of the given member levels in the given reputation categories in order to perform a given action. For example, to store personal files in your account area you will need to achieve Platinum level in either the Author or Authority category. The "If Owner" column means that owners of an item automatically have the privilege. The member types column lists member types who gain the privilege regardless of their reputation level.

ActionAuthorAuthorityDebatorEditorEnquirerOrganiserParticipantIf OwnerMember Types
Have no restrictions on voting frequencysilversilversilversilver
Bypass spam checks when posting contentsilversilversilversilversilversilvergoldSubEditor, Mentor, Protector, Editor
Store personal files in your account areaplatinumplatinumSubEditor, Editor
Have live hyperlinks in your profilebronzebronzebronzebronzebronzebronzesilverSubEditor, Protector, Editor
Have the ability to include a biography in your profilebronzebronzebronzebronzebronzebronzesilverSubEditor, Protector, Editor
Edit a Question in Q&AsilversilversilversilverYesSubEditor, Protector, Editor
Edit an Answer in Q&AsilversilversilversilverYesSubEditor, Protector, Editor
Delete a Question in Q&AYesSubEditor, Protector, Editor
Delete an Answer in Q&AYesSubEditor, Protector, Editor
Report an ArticlesilversilversilversilverSubEditor, Mentor, Protector, Editor
Approve/Disapprove a pending ArticlegoldgoldgoldgoldSubEditor, Mentor, Protector, Editor
Edit other members' articlesSubEditor, Protector, Editor
Create an article without requiring moderationplatinumSubEditor, Mentor, Protector, Editor
Approve/Disapprove a pending QuestionProtector
Approve/Disapprove a pending AnswerProtector
Report a forum messagesilversilverbronzeProtector, Editor
Approve/Disapprove a pending Forum MessageProtector
Have the ability to send direct emails to members in the forumsProtector
Create a new tagsilversilversilversilver
Modify a tagsilversilversilversilver

Actions with a green tick can be performed by this member.


 
GeneralTest Pin
DieOnTime29-Feb-12 2:23
DieOnTime29-Feb-12 2:23 
JavaScript
<script type="text/javascript" language="javascript">
      var userBingoValues = new Array(1, 10, 25, 2, 3, 5, 11, 12, 19, 17, 16, 21, 7, 8, 24, 14, 18, 13, 4, 6, 9, 15, 20, 22, 23);
      var temp = userBingoValues;
      var systemClickValues = GetRandomValue(temp);
      var bingoCount = 0;
      var systemClickCount = 0;
      var systemBingoValues = new Array();
      $(document).ready(function() {
          userBingoValues = GetRandomValue(userBingoValues);
          $("#divGame input:button").each(function(n) {
              var clickedButton = $(this);
              $(this).attr("value", userBingoValues[n]);
              $(this).click(function() {
                  $("#divSystemBingo input:button[value=" + clickedButton.attr("value") + "]").attr("disabled", "disabled");
                  $("#divUserBingoedValues center").append("<span>" + clickedButton.attr("value") + "</span>");
                  $("#divUserBingoedValues span[innerHTML=" + clickedButton.attr("value") + "]").fadeIn("slow");
                  $("#divUserBingoedValues span[innerHTML=" + clickedButton.attr("value") + "]").css("display", "inline");
                  CheckForSystemStrike();
                  $(this).attr("disabled", "disabled");
                  CheckForStrike();
                  systemClickValues.splice($.inArray(parseInt(clickedButton.attr("value")), systemClickValues), 1);
                  if (bingoCount != 5 && systemBingoCount != 5) {
                      $("#divSystemBingo input:button[value=" + systemClickValues[systemClickCount++] + "]").trigger('click');
                  }
              });
          });

          systemBingoValues = GetRandomValue(temp);
          $("#divSystemBingo input:button").each(function(n) {
              var clickedButton = $(this);
              $(this).attr("value", systemBingoValues[n]);
              $(this).click(function() {
                  $("#divGame input:button[value=" + clickedButton.attr("value") + "]").attr("disabled", "disabled");
                  $("#divSystemBingoedValues center").append("<span style='background-color:Lime;color: Black;'>" + clickedButton.attr("value") + "</span>");
                  $("#divSystemBingoedValues span[innerHTML=" + clickedButton.attr("value") + "]").fadeIn("slow");
                  $("#divSystemBingoedValues span[innerHTML=" + clickedButton.attr("value") + "]").css("display", "inline");
                  CheckForStrike();
                  $(this).attr("disabled", "disabled");
                  CheckForSystemStrike();
                  systemClickValues.splice($.inArray(parseInt(clickedButton.attr("value")), systemClickValues), 1);
              });
          });
      });
      var bingoCount = 0;
      var bingoArray = new Array(6);
      for (var i = 0; i < 6; i++) {
          bingoArray[i] = new Array(0, 0, 0, 0, 0, 0, 0);
      }

      function GetRandomValue(array) {
          for (var j, x, i = array.length; i; j = parseInt(Math.random() * i), x = array[--i], array[i] = array[j], array[j] = x);
          return array;
      }
      function CheckForStrike() {
          $("#divGame input:button:disabled").each(function() {
              var currentButton = $(this);
              bingoArray[parseInt(currentButton.attr("rindex")) + 1][parseInt(currentButton.attr("cindex")) + 1] = "B";
          });
          //Row wise strike check
          for (var i = 0; i < 6; i++) {
              if (bingoArray[i][0] != "C") {
                  var isRowBingo = true;
                  for (var j = 1; j < 6; j++) {
                      if (bingoArray[i][j] != "B") {
                          isRowBingo = false;
                          break;
                      }
                  }
                  if (isRowBingo) {
                      bingoArray[i][0] = "C";
                      $("#divGame input:button[rindex=" + (i - 1) + "]").css("border-color", "lightgreen");
                      bingoCount++;
                  }
              }
          }
          //Column wise strike check
          for (var i = 0; i < 6; i++) {
              if (bingoArray[0][i] != "C") {
                  var isColBingo = true;
                  for (var j = 1; j < 6; j++) {
                      if (bingoArray[j][i] != "B") {
                          isColBingo = false;
                          break;
                      }
                  }
                  if (isColBingo) {
                      bingoArray[0][i] = "C";
                      $("#divGame input:button[cindex=" + (i - 1) + "]").css("border-color", "lightgreen");
                      bingoCount++;
                  }
              }
          }
          //Checking norms
          var isNormBingo = true;
          if (bingoArray[0][0] != "C") {
              for (var i = 1; i < 6; i++) {
                  if (bingoArray[i][i] != "B") {
                      isNormBingo = false;
                      break;
                  }
              }
              if (isNormBingo) {
                  bingoCount++;
                  bingoArray[0][0] = "C";
                  for (var i = 0; i < 5; i++) {
                      $("#divGame input:button[rindex=" + i + "][cindex=" + i + "]").css("border-color", "lightgreen");
                  }
                  isNormBingo = null;
              }
          }
          if (bingoArray[0][6] != "C") {
              isNormBingo = true;
              for (var i = 5, j = 1; i > 0; i--, j++) {
                  if (bingoArray[i][j] != "B") {
                      isNormBingo = false;
                      break;
                  }
              }
              if (isNormBingo) {
                  bingoCount++;
                  bingoArray[0][6] = "C";
                  for (var i = 4, j = 0; i >= 0; i--, j++) {
                      $("#divGame input:button[rindex=" + i + "][cindex=" + j + "]").css("border-color", "lightgreen");
                  }
                  isNormBingo = null;
              }
          }
          if (bingoCount == 5) {
              DisableGameBoards();
              AnimateBingo('divUserBingoedValues');
              $("#divSystemBingo").fadeIn("slow");
          }
          if (systemBingoCount == 5) {
              DisableGameBoards();
              AnimateBingo('divSystemBingoedValues');
              $("#divSystemBingo").fadeIn("slow");
          }
      }

      //For System
      var systemBingoCount = 0;
      var systemBingoArray = new Array(6);
      for (var i = 0; i < 6; i++) {
          systemBingoArray[i] = new Array(0, 0, 0, 0, 0, 0, 0);
      }
      function CheckForSystemStrike() {
          $("#divSystemBingo input:button:disabled").each(function() {
              var currentButton = $(this);
              systemBingoArray[parseInt(currentButton.attr("rindex")) + 1][parseInt(currentButton.attr("cindex")) + 1] = "B";
          });
          //Row wise strike check
          for (var i = 0; i < 6; i++) {
              if (systemBingoArray[i][0] != "C") {
                  var isRowBingo = true;
                  for (var j = 1; j < 6; j++) {
                      if (systemBingoArray[i][j] != "B") {
                          isRowBingo = false;
                          break;
                      }
                  }
                  if (isRowBingo) {
                      systemBingoArray[i][0] = "C";
                      $("#divSystemBingo input:button[rindex=" + (i - 1) + "]").css("border-color", "lightgreen");
                      systemBingoCount++;
                  }
              }
          }
          //Column wise strike check
          for (var i = 0; i < 6; i++) {
              if (systemBingoArray[0][i] != "C") {
                  var isColBingo = true;
                  for (var j = 1; j < 6; j++) {
                      if (systemBingoArray[j][i] != "B") {
                          isColBingo = false;
                          break;
                      }
                  }
                  if (isColBingo) {
                      systemBingoArray[0][i] = "C";
                      $("#divSystemBingo input:button[cindex=" + (i - 1) + "]").css("border-color", "lightgreen");
                      systemBingoCount++;
                  }
              }
          }
          //Checking norms
          var isNormBingo = true;
          if (systemBingoArray[0][0] != "C") {
              for (var i = 1; i < 6; i++) {
                  if (systemBingoArray[i][i] != "B") {
                      isNormBingo = false;
                      break;
                  }
              }
              if (isNormBingo) {
                  systemBingoCount++;
                  systemBingoArray[0][0] = "C";
                  for (var i = 0; i < 5; i++) {
                      $("#divSystemBingo input:button[rindex=" + i + "][cindex=" + i + "]").css("border-color", "lightgreen");
                  }
                  isNormBingo = null;
              }
          }
          if (systemBingoArray[0][6] != "C") {
              isNormBingo = true;
              for (var i = 5, j = 1; i > 0; i--, j++) {
                  if (systemBingoArray[i][j] != "B") {
                      isNormBingo = false;
                      break;
                  }
              }
              if (isNormBingo) {
                  systemBingoCount++;
                  systemBingoArray[0][6] = "C";
                  for (var i = 4, j = 0; i >= 0; i--, j++) {
                      $("#divSystemBingo input:button[rindex=" + i + "][cindex=" + j + "]").css("border-color", "lightgreen");
                  }
                  isNormBingo = null;
              }
          }
          if (systemBingoCount == 5) {
              DisableGameBoards();
              AnimateBingo('divSystemBingoedValues');
              $("#divSystemBingo").fadeIn("slow");
          }
          if (bingoCount == 5) {
              DisableGameBoards();
              AnimateBingo('divUserBingoedValues');
              $("#divSystemBingo").fadeIn("slow");
          }
      }

      function AnimateBingo(id) {
          $("#" + id + " center").empty().append("<span>BINGOOOOO!!!</span>");
          $("#" + id + " center span").fadeToggle("fast", function() {
              $("#" + id + " center span").fadeToggle("fast", function() {
                  $("#" + id + " center span").fadeToggle("fast");
              });
          });
      }
      function DisableGameBoards() {
          $("#divSystemBingo,#divGame").attr("disabled", "disabled");
      }
  </script>


span
{
width: 20px;
height: 20px;
border-style: outset;
background-color: Black;
font-family: Comic Sans MS;
font-size: 2em;
vertical-align: middle;
text-align: center;
color: Lime;
display: none;
}

modified 2-Mar-12 5:37am.

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.