<commit_before><!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
	<title>First Issue</title>
	<!-- Latest compiled and minified CSS -->
	<link rel="stylesheet" href="https://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">

	<!-- Optional theme -->
	<link rel="stylesheet" href="https://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap-theme.min.css">

	<!-- Latest compiled and minified JavaScript -->
	<script src="https://netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
	
	<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
	<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
	
	<script>
	function handleNewItemSubmit(){
		//alert('in handle func');
		var image_files = $("#video-input")[0].files;
		if (image_files.length>0){
			//we have an image
			var video_file = image_files[0];
			var reader = new FileReader();
			reader.onload = function(e){ 
				alert('in onload func')
				video_blob = e.target.result;
				//upload video somewhere
				
				$.ajax("http://rossboucher.com/test/nhr/upload.php", {
					type: 'POST',
					data: video_blob
				});
			};
			reader.readAsBinaryString(video_file);
		}
		else {
			//we have no image
			submitItem({"description":desc});
		}; 
	};
	
	$(function() {
		$("#video-input").change(function () {
			//alert('in onchange func');
			handleNewItemSubmit();
		})
	})
	
	</script>
	<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
	    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
	    <!--[if lt IE 9]>
	      <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
	      <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
	    <![endif]-->
</head>
<body>
	<div class="container">
		<h1>Upload a video</h1>
		<form>
			<input id="video-input" type="file" accept="video/*" capture="camcorder">
			<input type="submit">Submit</input>
		</form>
	</div>
</body>
</html><commit_msg>added a pure html uploader. Waiting on server to upload to.<commit_after><!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
	<title>First Issue</title>
	<!-- Latest compiled and minified CSS -->
	<link rel="stylesheet" href="https://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">

	<!-- Optional theme -->
	<link rel="stylesheet" href="https://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap-theme.min.css">

	<!-- Latest compiled and minified JavaScript -->
	<script src="https://netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
	
	<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
	<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
	
	<script>
	function handleNewItemSubmit(){
		//alert('in handle func');
		var image_files = $("#video-input")[0].files;
		if (image_files.length>0){
			//we have an image
			var video_file = image_files[0];
			var reader = new FileReader();
			reader.onload = function(e){ 
				alert('in onload func')
				video_blob = e.target.result;
				//upload video somewhere
				
				$.ajax("http://rossboucher.com/test/nhr/upload.php", {
					type: 'POST',
					data: video_blob
				});
			};
			reader.readAsBinaryString(video_file);
		}
		else {
			//we have no image
			submitItem({"description":desc});
		}; 
	};
	
	$(function() {
		$("#video-input").change(function () {
			//alert('in onchange func');
			handleNewItemSubmit();
		})
	})
	
	</script>
	<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
	    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
	    <!--[if lt IE 9]>
	      <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
	      <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
	    <![endif]-->
</head>
<body>
	<div class="container">
		<h1>Upload a video</h1>
		<h2>Pure HTML</h2>
		<p>Capture a video using camcorder without Javascript (<a href="http://www.francesco.iovine.name/w3c/mediacapture/">inspiration</a>)</p>
		<form action="upload.php" method="post" enctype="multipart/form-data">
			<input type="file" name="file" accept="video/*" capture></br>
			<input type="submit" name="upload" value="Upload">
		</form>
		
		<h2>AJAX</h2>
		<a href="http://www.html5rocks.com/en/tutorials/file/dndfiles/?redirect_from_locale=tw">inspiration</a>
		<form>
			<input id="video-input" type="file" accept="video/*" capture="camcorder"></br>
			<input type="submit">Submit</input>
		</form>
	</div>
</body>
</html>
{'fraction_non_alphanumeric': 0.1956521739130435, 'fraction_numerical': 0.014221861032100772, 'mean_word_length': 3.5625579240037073, 'pattern_counts': {'":': 2, '<': 101, '<?xml version=': 0, '>': 103, 'https://': 12, 'lorem ipsum': 0, 'www.': 2, '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': '6481575', 'n_tokens_mistral': 1910, 'n_tokens_neox': 1690, 'n_words': 329}