<commit_before><%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<link rel="SHORTCUT ICON" href="http://upload.wikimedia.org/wikipedia/commons/f/f0/Car_with_Driver-Silhouette.svg">
<link rel="icon" href="http://upload.wikimedia.org/wikipedia/commons/f/f0/Car_with_Driver-Silhouette.svg" type="image/ico">
<title>CarCV Car Table</title>
<link rel="stylesheet" type="text/css" href="/resources/site.css">
<link rel="stylesheet" type="text/css" href="/resources/jquery.dataTables.css">
<style type="text/css">
#tabulator {
    text-align: center;
    height: 25px
}
</style>

<script type="text/javascript" language="javascript" src="/resources/jquery-1.11.1.min.js"></script>
<script type="text/javascript" language="javascript" src="/resources/jquery.dataTables.min.js"></script>
<script type="text/javascript" class="init">
$(document).ready(function() {
	var table = $('#carTable').DataTable();

	$('#carTable tbody').on( 'click', 'tr', function () {
		$(this).toggleClass('selected');
    } );

	$('#deleteButton').click( function () {
	    console.log("delete clicked");
        if (!confirm("Are you sure you want to delete?")) {
            return;
        }
        var rows = table.rows('.selected');
        if (!(rows instanceof Array) || rows.length <= 0) {
            alert("The selection is empty!");
            return;
        }
        var idString += rows[0][0];
        console.log("idString: " + idString);
        console.log(rows[0].data());
        for (i = 1; i < rows.length; i++) {
            idString += "," + rows[i][0];
        }
        console.log("idString: " + idString);
        window.parent.location.replace("/admin/servlet/RemoveEntry?entry_id=" + idString);
		//table.rows('.selected').remove().draw( false ); //TODO 3 Make table editable w/o reload
	} );
} );
	</script>

</head>
<body>
    <c:if test="${isAdmin}"><button id="deleteButton">Delete selected rows</button></c:if><br>
    <table id="carTable" class="display" cellspacing="0" width="100%">
    <thead>
        <tr>
            <th>ID</th><commit_msg>stupid typo<commit_after><%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<link rel="SHORTCUT ICON" href="http://upload.wikimedia.org/wikipedia/commons/f/f0/Car_with_Driver-Silhouette.svg">
<link rel="icon" href="http://upload.wikimedia.org/wikipedia/commons/f/f0/Car_with_Driver-Silhouette.svg" type="image/ico">
<title>CarCV Car Table</title>
<link rel="stylesheet" type="text/css" href="/resources/site.css">
<link rel="stylesheet" type="text/css" href="/resources/jquery.dataTables.css">
<style type="text/css">
#tabulator {
    text-align: center;
    height: 25px
}
</style>

<script type="text/javascript" language="javascript" src="/resources/jquery-1.11.1.min.js"></script>
<script type="text/javascript" language="javascript" src="/resources/jquery.dataTables.min.js"></script>
<script type="text/javascript" class="init">
$(document).ready(function() {
	var table = $('#carTable').DataTable();

	$('#carTable tbody').on( 'click', 'tr', function () {
		$(this).toggleClass('selected');
    } );

	$('#deleteButton').click( function () {
	    console.log("delete clicked");
        if (!confirm("Are you sure you want to delete?")) {
            return;
        }
        var rows = table.rows('.selected');
        if (!(rows instanceof Array) || rows.length <= 0) {
            alert("The selection is empty!");
            return;
        }
        var idString = rows[0][0];
        console.log("idString: " + idString);
        console.log(rows[0].data());
        for (i = 1; i < rows.length; i++) {
            idString += "," + rows[i][0];
        }
        console.log("idString: " + idString);
        window.parent.location.replace("/admin/servlet/RemoveEntry?entry_id=" + idString);
		//table.rows('.selected').remove().draw( false ); //TODO 3 Make table editable w/o reload
	} );
} );
	</script>

</head>
<body>
    <c:if test="${isAdmin}"><button id="deleteButton">Delete selected rows</button></c:if><br>
    <table id="carTable" class="display" cellspacing="0" width="100%">
    <thead>
        <tr>
            <th>ID</th>
{'fraction_non_alphanumeric': 0.2032369942196532, 'fraction_numerical': 0.009248554913294798, 'mean_word_length': 3.611940298507463, 'pattern_counts': {'":': 0, '<': 69, '<?xml version=': 0, '>': 65, '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': '4254717', 'n_tokens_mistral': 1429, 'n_tokens_neox': 1394, 'n_words': 260}