Created
May 13, 2011 14:34
-
-
Save nmilford/970641 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Cassandra Ring Calculator</title> | |
</head> | |
<body> | |
<input id='numNodes' size=10> <button onClick='calcRing()'>Submit</button> | |
<script type='text/javascript'> | |
function calcRing() { | |
var nodes=document.getElementById('numNodes').value; | |
for(i=0; i<nodes; i++) { | |
document.write("Node #" + i + " initial_token: " + (Math.pow(2,127)*i)/nodes) | |
document.write("<br>"); | |
} | |
} | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment