Click here to Skip to main content
15,884,298 members
Articles / Programming Languages / C++

Error Detection Based on Check Digit Schemes

Rate me:
Please Sign up or sign in to vote.
4.72/5 (27 votes)
27 Nov 2007CPOL12 min read 90.7K   2.9K   50  
A Survey of Popular Check Digit Schemes
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
            "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- @author Edward Hieatt, edward@jsunit.net -->
  <head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">  
    <title>JsUnit Test Container Controller</title>
<script language="javascript" type="text/javascript">
var containerReady=false;

function init()
{
  containerReady = true;
}

function isPageLoaded() 
{
  if (!containerReady) 
    return false;

  var isTestPageLoaded=false;

  try 
  {
    // attempt to access the var isTestPageLoaded in the testFrame
    if (typeof(top.testManager.containerTestFrame.isTestPageLoaded) != 'undefined')
    {
      isTestPageLoaded=top.testManager.containerTestFrame.isTestPageLoaded;
    }

    // ok, if the above did not throw an exception, then the 
    // variable is defined. If the onload has not fired in the
    // testFrame then isTestPageLoaded is still false. Otherwise
    // the testFrame has set it to true
  }
  catch (e) 
  {
    // an error occured while attempting to access the isTestPageLoaded
    // in the testFrame, therefore the testFrame has not loaded yet
    isTestPageLoaded=false;
  }
  return isTestPageLoaded;
}

function isContainerReady() 
{
    return containerReady;
}

function setNotReady() 
{
  try 
  {
    // attempt to set the isTestPageLoaded variable
    // in the test frame to false. 
    top.testManager.containerTestFrame.isTestPageLoaded=false;
  } 
  catch (e) 
  {
    // testFrame.isTestPageLoaded not available... ignore
  }
}
function setTestPage(fileName) {
  setNotReady();
  top.jsUnitParseParms(fileName);
  top.testManager.containerTestFrame.location.href=fileName;
}
</script>
  </head>

  <body onload="init()">
    Test Container Controller
  </body>
</html>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Systems / Hardware Administrator
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions