<commit_before>// composer ->  <NAME>
// Assignment #4

//A4.1
 function setBgColor (color) {
    document.body.bgColor = color1;
 }
 
//A4.2
 <script type="text/javascript">
     alert(document.title);
 </script>

//A4.3
 function validateEmail(email) { 
     var re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
         return re.test(email);
 }

//A4.4

 var xmlhttp2 = new XMLHttpRequest();
 xmlhttp2.onreadystatechange = function(){
 		if (xmlhttp2.readyState == 4 && xmlhttp2.status == 200){
				console.log(xmlhttp2.responseText);
						}
						};

						xmlhttp2.open("GET", "http://private-40e0f-smugui2015.apiary-mock.com/assignments/4", true);
						xmlhttp2.send();
<commit_msg>updated A4.js<commit_after>// composer ->  <NAME>
// Assignment #4

//A4.1
 function setBgColor (color) {
    document.body.bgColor = color;
 }
 
//A4.2
 function alertTitle {
	alert(document.title);
}

//A4.3
 function validateEmail(email) { 
     var re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
         return re.test(email);
 }

//A4.4

 var xmlhttp2 = new XMLHttpRequest();
 xmlhttp2.onreadystatechange = function(){
 		if (xmlhttp2.readyState == 4 && xmlhttp2.status == 200){
				console.log(xmlhttp2.responseText);
						}
						};

						xmlhttp2.open("GET", "http://private-40e0f-smugui2015.apiary-mock.com/assignments/4", true);
						xmlhttp2.send();

{'fraction_non_alphanumeric': 0.2904040404040404, 'fraction_numerical': 0.06060606060606061, 'mean_word_length': 2.8753056234718826, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 14}, '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': '266360', 'n_tokens_mistral': 756, 'n_tokens_neox': 671, 'n_words': 82}