Categories
Computer Science School

01 06

Progress – No progress.

1. 4/12 Intro to CS & Python – Dr. Ana Bell
2. 1/22 Structures
3. 2/30 AI – Dr. Patrick Winston
4. 0/4 (0/11, 0/11, 0/5, 0/8) Math for CS
5. 0/11 Puzzled
6. ? EECS, Remedial 3/19 Think Python – Dr. Allen Downey

***

In trying to get a visual for all the Alt codes (Alt + Numpad number = special character), I wrote the following in HTML/Javascript:

<!DOCTYPE html>
<html>
<head>
<title>Characters</title>
</head>
<body style="color:#00FF00; background-color:#000000;">

<h1>The goal of this program is to print out characters and their Alt code references.</h1>
<p>If failed at showing the Alt codes.  It shows instead JavaScript's fromCharCode outputs.</p>
<p id="demo"></p>

<script>
var text = "";
var i;
var j;
for (i = 0; i < 65560; i=i+10) {
  text += i + " " 
  for (j = 0; j < 10; j++) {
	text += String.fromCharCode(i+j)+ " "
  }
  text += "<br>";
}
document.getElementById("demo").innerHTML = text;
</script>

</body>
</html> 

This doesn’t give the Alt codes, it gives JavaScript’s fromCharCode outputs. Still an interesting result.

***

Leave a Reply

Your email address will not be published. Required fields are marked *