<commit_before><head title="Joe's Number Game"></head>
<body onLoad="goJoe()">
<script type="text/javascript">

var onclick = function(event)
{
	alert("you " + event.type +"ed OMG!!!" + "x:" + event.pageX + " y:" + event.pageY);
}

var onresize = function(event)
{
	console.log("event was " + event.type);
	drawIt();
}

var goJoe = function()
{
	var a = document.getElementById ("JoeCanvas");
	a.addEventListener("click",onclick);
	a.addEventListener("resize",onresize);
	drawIt();
}

var drawIt = function()
{
	var a = document.getElementById ("JoeCanvas");
	var b = a.getContext("2d");
	var winWidth = window.innerWidth;
	var winHeight = window.innerHeight;
	console.log("width " + winWidth + " height " + winHeight);
	a.width = winWidth;
	a.height = winHeight;
	b.fillStyle = "#99f35c";	
	b.font = "72px Blackadder";
	b.fillText ("Hello world!",200,50);
	var numButtonsAcross = 6;
	var sideMargins = 10;
	var spaceBetween = 10;
	var size = (winWidth - (2 * sideMargins) - (spaceBetween * (numButtonsAcross - 1))) / numButtonsAcross;
	var distance = size + spaceBetween;
	var ButtonNum = 0;
	while(ButtonNum < 6)
	{
		b.fillRect(ButtonNum * distance + sideMargins,500,size,size);
		ButtonNum ++;
	}
}






















</script>
<canvas id = "JoeCanvas" width = "1000px" height = "1000px"></canvas><commit_msg>numbers in boxes nearly done!!!<commit_after><head title="Joe's Number Game"></head>
<body onLoad="goJoe()">
<script type="text/javascript">

var onclick = function(event)
{
	alert("you " + event.type +"ed OMG!!!" + "x:" + event.pageX + " y:" + event.pageY);
}

var onresize = function(event)
{
	console.log("event was " + event.type);
	drawIt();
}

var goJoe = function()
{
	var a = document.getElementById ("JoeCanvas");
	a.addEventListener("click",onclick);
	a.addEventListener("resize",onresize);
	globNums = pickNumbers(6)
	drawIt();
}

var drawIt = function()
{
	var a = document.getElementById ("JoeCanvas");
	var b = a.getContext("2d");
	var winWidth = window.innerWidth;
	var winHeight = window.innerHeight;
	console.log("width " + winWidth + " height " + winHeight);
	a.width = winWidth;
	a.height = winHeight;
	// b.fillStyle = "#99f35c";	
	// b.font = "72px Blackadder";
	// b.fillText ("Hello world!",200,50);
	var numButtonsAcross = 6;
	var sideMargins = 10;
	var spaceBetween = 10;
	var size = (winWidth - (2 * sideMargins) - (spaceBetween * (numButtonsAcross - 1))) / numButtonsAcross;
	var distance = size + spaceBetween;
	var buttonTopLine = 500;
	var buttonTopLineText = buttonTopLine + size / 2;
	// Draw the buttons
	var ButtonNum = 0;
	while(ButtonNum < 6)
	{
		b.fillStyle = "#99f35c";
		b.fillRect(ButtonNum * distance + sideMargins,buttonTopLine,size,size);
		b.fillStyle = "#000000";
		b.font = "72px Blackadder";
		var n = ButtonNum * distance + sideMargins + size / 2;
		b.textAlign = "center";
		b.textBaseline = "middle";
		b.fillText (globNums.parts[ButtonNum],n,buttonTopLineText);	

		

		ButtonNum ++;
	}
}

var pickNumbers = function(numNumbers)
{
	var Nums = [];
	Nums.push(Math.floor(Math.random() * 4 + 1) * 25);
	for (var i = 0; i < numNumbers - 1; i++)
	{
		Nums.push(Math.floor(Math.random() * 10 + 1));
	}

	var targetNumber = 
	{
		parts: Nums,
		number: (Math.floor(Math.random() * 999 + 1))
	}

	return targetNumber; 
}

</script>
<canvas id = "JoeCanvas" width = "1000px" height = "1000px"></canvas>
{'fraction_non_alphanumeric': 0.16959238321927997, 'fraction_numerical': 0.02737280571258554, 'mean_word_length': 4.156441717791411, 'pattern_counts': {'":': 0, '<': 20, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1474470', 'n_tokens_mistral': 1321, 'n_tokens_neox': 1201, 'n_words': 280}