<commit_before><!DOCTYPE html>
<html>
<head>
	<title>Bolt Calculator</title>
	<link href="../forum/Smileys/default/aether.png" rel="shortcut icon" />
	<style>
		body{
			background-color:black;
			color:white;
			margin:0;
		}
		a{
			color:#6699FF;
			text-decoration:none;
		}
	</style>
</head>
<body>
	<input id="quantainput" type="text" placeholder="Quanta"><br>
	Upped: <span id="uppedcount"></span><input id="upped" type="range" min="0" max="6" value="0"><br>
	<div id="infobox"></div>
	<script>
	"use strict";
	var infobox = document.getElementById("infobox"), uppedcount = document.getElementById("uppedcount"), upped = document.getElementById("upped");
	function mkTable(x){
		var tbl = document.createElement("table");
		for(var i=0; i<x.length; i++){
			var row = document.createElement("tr");
			var data = x[i];
			for(var j=0; j<data.length; j++){
				var col = document.createElement("td");
				col.appendChild(document.createTextNode(data[j]));
				row.appendChild(col);
			}
			tbl.appendChild(row);
		}
		return tbl;
	}
	var costs = [3, 1, 2, 1, 3, 1];
	uppedcount.appendChild(document.createTextNode(upped.value));
	upped.addEventListener("input", function(e){
		while (uppedcount.firstChild) uppedcount.firstChild.remove();
		uppedcount.appendChild(document.createTextNode(this.value));
	});
	document.getElementById("quantainput").addEventListener("keydown", function(e){
		if (e.keyCode != 13) return;
		while (infobox.firstChild) infobox.firstChild.remove();
		var quanta = parseInt(this.value), ups = upped.value;
		var calcs = [["Fire"], ["Water"], ["Darkness"], ["Fahrenheit Bonus", Math.floor(quanta/5)]];
		for(var j=0; j<3; j++){
			var q = quanta;
			for(var i=0; i<6; i++){
				var cost = costs[j*2+(i<ups)];
				if (q >= costs[j]) calcs[j].push((j?2:3)*Math.floor(1+q/10)+(i>0?calcs[j][i]:0));
				else break;
				q -= cost;
			}
		}
		infobox.appendChild(mkTable(calcs))
	});
	</script>
</body>
</html><commit_msg>updateTable on slider input<commit_after><!DOCTYPE html>
<html>
<head>
	<title>Bolt Calculator</title>
	<link href="../forum/Smileys/default/aether.png" rel="shortcut icon" />
	<style>
		body{
			background-color:black;
			color:white;
			margin:0;
		}
		a{
			color:#6699FF;
			text-decoration:none;
		}
	</style>
</head>
<body>
	<input id="quantainput" type="text" placeholder="Quanta"><br>
	Upped: <span id="uppedcount"></span><input id="upped" type="range" min="0" max="6" value="0"><br>
	<div id="infobox"></div>
	<script>
	"use strict";
	var infobox = document.getElementById("infobox"), uppedcount = document.getElementById("uppedcount"), upped = document.getElementById("upped"), quantainput = document.getElementById("quantainput");
	function mkTable(x){
		var tbl = document.createElement("table");
		for(var i=0; i<x.length; i++){
			var row = document.createElement("tr");
			var data = x[i];
			for(var j=0; j<data.length; j++){
				var col = document.createElement("td");
				col.appendChild(document.createTextNode(data[j]));
				row.appendChild(col);
			}
			tbl.appendChild(row);
		}
		return tbl;
	}
	var costs = [3, 1, 2, 1, 3, 1];
	uppedcount.appendChild(document.createTextNode(upped.value));
	function updateTable(e){
		if (e.keyCode != 13) return;
		while (infobox.firstChild) infobox.firstChild.remove();
		var quanta = parseInt(quantainput.value), ups = upped.value;
		var calcs = [["Fire"], ["Water"], ["Darkness"], ["Fahrenheit Bonus", Math.floor(quanta/5)]];
		for(var j=0; j<3; j++){
			var q = quanta;
			for(var i=0; i<6; i++){
				var cost = costs[j*2+(i<ups)];
				if (q >= costs[j]) calcs[j].push((j?2:3)*Math.floor(1+q/10)+(i>0?calcs[j][i]:0));
				else break;
				q -= cost;
			}
		}
		infobox.appendChild(mkTable(calcs))
	}
	upped.addEventListener("input", function(e){
		while (uppedcount.firstChild) uppedcount.firstChild.remove();
		uppedcount.appendChild(document.createTextNode(this.value));
		updateTable({keyCode:13});
	});
	quantainput.addEventListener("keydown", updateTable);
	</script>
</body>
</html>
{'fraction_non_alphanumeric': 0.1986986986986987, 'fraction_numerical': 0.016016016016016016, 'mean_word_length': 4.852122986822841, 'pattern_counts': {'":': 0, '<': 57, '<?xml version=': 0, '>': 51, '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': '4457936', 'n_tokens_mistral': 1640, 'n_tokens_neox': 1456, 'n_words': 277}