<commit_before>function requestMPDInformation(){
	var mpdRequest = null;
	mpdRequest = new XMLHttpRequest();
	mpdRequest.open("GET", "http://kiosk.shack:8080/mpd/status", true);
	mpdRequest.setRequestHeader("Content-type","application/json");

	mpdRequest.onreadystatechange=function(){
		if(mpdRequest.readyState==4 && mpdRequest.status==200){
			response = JSON.parse(mpdRequest.responseText);
			console.log(response);
			if(response.error){
				document.getElementById("mpd").innerHTML= "MPD disabled"
			}
			else{
				document.getElementById("mpd").innerHTML=response.artist + " - " + response.title;
			}
		}
	}

	mpdRequest.send();
}

function requestPowerInformation(){
	var powerRequest = null;
	powerRequest = new XMLHttpRequest();
	powerRequest.open("GET", "http://glados.shack/siid/apps/powermeter.py?n=1", true);
	powerRequest.setRequestHeader("Content-type","application/json");

	powerRequest.onreadystatechange=function(){
		if(powerRequest.readyState==4 && powerRequest.status==200){
			response = JSON.parse(powerRequest.responseText);
			console.log(response);
			document.getElementById("power").innerHTML=response.Total[0] + " Watt";
		}
	}

	powerRequest.send();
}

function requestTempInformation(){
	var tempRequest = null;
	tempRequest = new XMLHttpRequest();
	tempRequest.open("GET", "http://heidi:8888/api/env/temperature", true);
	tempRequest.setRequestHeader("Content-type","application/json");

	tempRequest.onreadystatechange=function(){
		if(tempRequest.readyState==4 && tempRequest.status==200){
			response = JSON.parse(tempRequest.responseText);
			console.log(response);
			if(response[0] != "No Data"){
				document.getElementById("temp").innerHTML=response[0] + " &degC";
			}
		}
	}

	tempRequest.send();
}

function requestHumidityInformation(){
	var humidityRequest = null;
	humidityRequest = new XMLHttpRequest();
	humidityRequest.open("GET", "http://heidi:8888/api/env/humidity", true);
	humidityRequest.setRequestHeader("Content-type","application/json");

	humidityRequest.onreadystatechange=function(){
		if(humidityRequest.readyState==4 && humidityRequest.status==200){
			response = JSON.parse(humidityRequest.responseText);
			console.log(response);
			if(response[0] != "No Data"){
				document.getElementById("humidity").innerHTML=response[0] + "%";
			}
		}
	}

	humidityRequest.send();
}

function requestBTCInformation(){
	var btcRequest = null;
	btcRequest = new XMLHttpRequest();
	btcRequest.open("GET", "http://kiosk.shack:8080/btc", true);
	btcRequest.setRequestHeader("Content-type","application/json");

	btcRequest.onreadystatechange=function(){
		if(btcRequest.readyState==4 && btcRequest.status==200){
			response = JSON.parse(btcRequest.responseText);
			console.log(response);
			document.getElementById("btc").innerHTML=response.btc + "$";
		}
	}

	btcRequest.send();
}

function requestKeyInformation(){
	var keyRequest = null;
	keyRequest = new XMLHttpRequest();
	keyRequest.open("GET", "http://portal.shack:8088/status", true);
	keyRequest.setRequestHeader("Content-type","application/json");

	keyRequest.onreadystatechange=function(){
		if(keyRequest.readyState==4 && keyRequest.status==200){
			response = JSON.parse(keyRequest.responseText);
			console.log(response);
			document.getElementById("keyholder").innerHTML= response.keyholder;
		}
	}

	keyRequest.send();
}

function requestPeopleInformation(){
	var peopleRequest = null;
	peopleRequest = new XMLHttpRequest();
	peopleRequest.open("GET", "http://shackles.shack/api/user", true);
	peopleRequest.setRequestHeader("Content-type","application/json");

	peopleRequest.onreadystatechange=function(){
		if(peopleRequest.readyState==4 && peopleRequest.status==200){
			document.getElementById("users").innerHTML = "";
			if(peopleRequest.responseText != "{}"){
				response = JSON.parse(peopleRequest.responseText);
				console.log(response);
				for(key in response){
					if(response[key]["status"] != "logged out"){
						document.getElementById("users").innerHTML = document.getElementById("users").innerHTML + " " + response[key]["_id"] + ",";
					}
				}
			}
		}
	}

	peopleRequest.send();
}

function requestHackerspaceInformation(){
	var listRequest = null;
	listRequest = new XMLHttpRequest();
	listRequest.open("GET", "http://localhost:8080/wd.lst", true);
	//listRequest.setRequestHeader("Content-type","application/json");

	listRequest.onreadystatechange=function(){
		if(this.readyState==4 && this.status==200){
			var spaceURLs = this.responseText.split("\n");
			for(key in spaceURLs){
				url = spaceURLs[key];
				var hackerspaceRequest = null;
				hackerspaceRequest = new XMLHttpRequest();
				hackerspaceRequest.open("GET", url, true);
				hackerspaceRequest.setRequestHeader("Content-type","application/json");

				hackerspaceRequest.onreadystatechange = function(){
					if(this.readyState==4 && this.status==200){
						try{ //Spaces may implement the API wrong and we dont want to see all the errors
							var response = JSON.parse(this.responseText);
							if(response.state.open){
								spacesOpen++;
							}
							spacesTotal++;
							document.getElementById("spaces").innerHTML = spacesOpen + "/" + spacesTotal;
						}
						catch(e){
							console.log(e);
						}
					}
				}
				
				hackerspaceRequest.send();
			}
		}
	}

	listRequest.send();
}

function requestGelberSack(){
	var keyRequest = null;
	sackRequest = new XMLHttpRequest();
	sackRequest.open("GET", "http://openhab.shack/muellshack/gelber_sack", true);
	sackRequest.setRequestHeader("Content-type","application/json");

	sackRequest.onreadystatechange=function(){
		if(sackRequest.readyState==4 && sackRequest.status==200){
			response = JSON.parse(sackRequest.responseText);
			var sackdate = new Date(response.gelber_sack);
			document.getElementById("sack").innerHTML= sackdate.toLocaleFormat('%d.%m.%Y');
		}
	}

	sackRequest.send();
}
<commit_msg>fix the fix use toLocaleDateString instead of not supported toLocaleFormat #2<commit_after>function requestMPDInformation(){
	var mpdRequest = null;
	mpdRequest = new XMLHttpRequest();
	mpdRequest.open("GET", "http://kiosk.shack:8080/mpd/status", true);
	mpdRequest.setRequestHeader("Content-type","application/json");

	mpdRequest.onreadystatechange=function(){
		if(mpdRequest.readyState==4 && mpdRequest.status==200){
			response = JSON.parse(mpdRequest.responseText);
			console.log(response);
			if(response.error){
				document.getElementById("mpd").innerHTML= "MPD disabled"
			}
			else{
				document.getElementById("mpd").innerHTML=response.artist + " - " + response.title;
			}
		}
	}

	mpdRequest.send();
}

function requestPowerInformation(){
	var powerRequest = null;
	powerRequest = new XMLHttpRequest();
	powerRequest.open("GET", "http://glados.shack/siid/apps/powermeter.py?n=1", true);
	powerRequest.setRequestHeader("Content-type","application/json");

	powerRequest.onreadystatechange=function(){
		if(powerRequest.readyState==4 && powerRequest.status==200){
			response = JSON.parse(powerRequest.responseText);
			console.log(response);
			document.getElementById("power").innerHTML=response.Total[0] + " Watt";
		}
	}

	powerRequest.send();
}

function requestTempInformation(){
	var tempRequest = null;
	tempRequest = new XMLHttpRequest();
	tempRequest.open("GET", "http://heidi:8888/api/env/temperature", true);
	tempRequest.setRequestHeader("Content-type","application/json");

	tempRequest.onreadystatechange=function(){
		if(tempRequest.readyState==4 && tempRequest.status==200){
			response = JSON.parse(tempRequest.responseText);
			console.log(response);
			if(response[0] != "No Data"){
				document.getElementById("temp").innerHTML=response[0] + " &degC";
			}
		}
	}

	tempRequest.send();
}

function requestHumidityInformation(){
	var humidityRequest = null;
	humidityRequest = new XMLHttpRequest();
	humidityRequest.open("GET", "http://heidi:8888/api/env/humidity", true);
	humidityRequest.setRequestHeader("Content-type","application/json");

	humidityRequest.onreadystatechange=function(){
		if(humidityRequest.readyState==4 && humidityRequest.status==200){
			response = JSON.parse(humidityRequest.responseText);
			console.log(response);
			if(response[0] != "No Data"){
				document.getElementById("humidity").innerHTML=response[0] + "%";
			}
		}
	}

	humidityRequest.send();
}

function requestBTCInformation(){
	var btcRequest = null;
	btcRequest = new XMLHttpRequest();
	btcRequest.open("GET", "http://kiosk.shack:8080/btc", true);
	btcRequest.setRequestHeader("Content-type","application/json");

	btcRequest.onreadystatechange=function(){
		if(btcRequest.readyState==4 && btcRequest.status==200){
			response = JSON.parse(btcRequest.responseText);
			console.log(response);
			document.getElementById("btc").innerHTML=response.btc + "$";
		}
	}

	btcRequest.send();
}

function requestKeyInformation(){
	var keyRequest = null;
	keyRequest = new XMLHttpRequest();
	keyRequest.open("GET", "http://portal.shack:8088/status", true);
	keyRequest.setRequestHeader("Content-type","application/json");

	keyRequest.onreadystatechange=function(){
		if(keyRequest.readyState==4 && keyRequest.status==200){
			response = JSON.parse(keyRequest.responseText);
			console.log(response);
			document.getElementById("keyholder").innerHTML= response.keyholder;
		}
	}

	keyRequest.send();
}

function requestPeopleInformation(){
	var peopleRequest = null;
	peopleRequest = new XMLHttpRequest();
	peopleRequest.open("GET", "http://shackles.shack/api/user", true);
	peopleRequest.setRequestHeader("Content-type","application/json");

	peopleRequest.onreadystatechange=function(){
		if(peopleRequest.readyState==4 && peopleRequest.status==200){
			document.getElementById("users").innerHTML = "";
			if(peopleRequest.responseText != "{}"){
				response = JSON.parse(peopleRequest.responseText);
				console.log(response);
				for(key in response){
					if(response[key]["status"] != "logged out"){
						document.getElementById("users").innerHTML = document.getElementById("users").innerHTML + " " + response[key]["_id"] + ",";
					}
				}
			}
		}
	}

	peopleRequest.send();
}

function requestHackerspaceInformation(){
	var listRequest = null;
	listRequest = new XMLHttpRequest();
	listRequest.open("GET", "http://localhost:8080/wd.lst", true);
	//listRequest.setRequestHeader("Content-type","application/json");

	listRequest.onreadystatechange=function(){
		if(this.readyState==4 && this.status==200){
			var spaceURLs = this.responseText.split("\n");
			for(key in spaceURLs){
				url = spaceURLs[key];
				var hackerspaceRequest = null;
				hackerspaceRequest = new XMLHttpRequest();
				hackerspaceRequest.open("GET", url, true);
				hackerspaceRequest.setRequestHeader("Content-type","application/json");

				hackerspaceRequest.onreadystatechange = function(){
					if(this.readyState==4 && this.status==200){
						try{ //Spaces may implement the API wrong and we dont want to see all the errors
							var response = JSON.parse(this.responseText);
							if(response.state.open){
								spacesOpen++;
							}
							spacesTotal++;
							document.getElementById("spaces").innerHTML = spacesOpen + "/" + spacesTotal;
						}
						catch(e){
							console.log(e);
						}
					}
				}
				
				hackerspaceRequest.send();
			}
		}
	}

	listRequest.send();
}

function requestGelberSack(){
	var keyRequest = null;
	sackRequest = new XMLHttpRequest();
	sackRequest.open("GET", "http://openhab.shack/muellshack/gelber_sack", true);
	sackRequest.setRequestHeader("Content-type","application/json");

	sackRequest.onreadystatechange=function(){
		if(sackRequest.readyState==4 && sackRequest.status==200){
			response = JSON.parse(sackRequest.responseText);
			var sackdate = new Date(response.gelber_sack);
			var options = { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' };
			document.getElementById("sack").innerHTML= sackdate.toLocaleDateString('de-DE', options);
		}
	}

	sackRequest.send();
}

{'fraction_non_alphanumeric': 0.15739654883565085, 'fraction_numerical': 0.011811023622047244, 'mean_word_length': 5.157297576070139, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '600128', 'n_tokens_mistral': 4261, 'n_tokens_neox': 3662, 'n_words': 531}