<commit_before>/**
 * Question Options Configuration
 */

var questions_all = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27];
var questions_eboard = [15];
var questions_rtps = [12, 14];

$(document).ready(function () {

    $.ajax({
        type: "GET",
        url: "/voted",
        success: function (data) {
            if (data.voted) {
                $("#spinnerContainer").fadeOut('slow', function () {
                    $("#thankYouContainer").slideDown('slow');
                });
            } else {
                update_options();
            }
        },
        error: function (data) {
            notify("error", "Unable to retrieve voting status.");
        }
    })


});

/* Form Submission */
$("#submitBtn").click(function (event) {
    // Disable modal buttons and show spinner
    $("#submitConfirmModal button").attr('disabled', 'disabled');
    $("#submitConfirmModal .modal-body p").fadeOut('slow', function () {
        $("#submitConfirmModal .modal-body .spinner").fadeIn('slow', function () {
            if ($("#quote").val() == "" || $("#memory").val() == "") {
                notify("error", "All fields are required. Please try again.");

                // Reset dialog
                $("#submitConfirmModal button").removeAttr('disabled');
                $("#submitConfirmModal .modal-body .spinner").hide();
                $("#submitConfirmModal .modal-body p").show();
                $("#submitConfirmModal").modal('hide');
            } else {
                $.ajax({
                    type: "POST",
                    url: '/submit',
                    contentType: "application/json; charset=utf-8",
                    dataType: "json",
                    data: JSON.stringify({
                        "quote": $("#quote").val(),
                        "history": $("#memory").val(),
                        "answers": [
                            $("#superlative_0").val(),
                            $("#superlative_1").val(),
                            $("#superlative_2").val(),
                            $("#superlative_3").val(),
                            $("#superlative_4").val(),
                            $("#superlative_5").val(),
                            $("#superlative_6").val(),
                            $("#superlative_7").val(),
                            $("#superlative_8").val(),
                            $("#superlative_9").val(),
                            $("#superlative_10").val(),
                            $("#superlative_11").val(),
                            $("#superlative_12").val(),
                            $("#superlative_13").val(),
                            $("#superlative_14").val(),
                            $("#superlative_15").val(),
                            $("#superlative_16").val(),
                            $("#superlative_17").val(),
                            $("#superlative_18").val(),
                            $("#superlative_19").val(),
                            $("#superlative_20").val(),
                            $("#superlative_21").val(),
                            $("#superlative_22").val(),
                            $("#superlative_23").val(),
                            $("#superlative_24").val(),
                            $("#superlative_25").val(),
                            $("#superlative_26").val(),
                            $("#superlative_27").val(),
                            $("#superlative_28").val()
                        ]
                    }),<commit_msg>Removed superlative 28<commit_after>/**
 * Question Options Configuration
 */

var questions_all = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27];
var questions_eboard = [15];
var questions_rtps = [12, 14];

$(document).ready(function () {

    $.ajax({
        type: "GET",
        url: "/voted",
        success: function (data) {
            if (data.voted) {
                $("#spinnerContainer").fadeOut('slow', function () {
                    $("#thankYouContainer").slideDown('slow');
                });
            } else {
                update_options();
            }
        },
        error: function (data) {
            notify("error", "Unable to retrieve voting status.");
        }
    })


});

/* Form Submission */
$("#submitBtn").click(function (event) {
    // Disable modal buttons and show spinner
    $("#submitConfirmModal button").attr('disabled', 'disabled');
    $("#submitConfirmModal .modal-body p").fadeOut('slow', function () {
        $("#submitConfirmModal .modal-body .spinner").fadeIn('slow', function () {
            if ($("#quote").val() == "" || $("#memory").val() == "") {
                notify("error", "All fields are required. Please try again.");

                // Reset dialog
                $("#submitConfirmModal button").removeAttr('disabled');
                $("#submitConfirmModal .modal-body .spinner").hide();
                $("#submitConfirmModal .modal-body p").show();
                $("#submitConfirmModal").modal('hide');
            } else {
                $.ajax({
                    type: "POST",
                    url: '/submit',
                    contentType: "application/json; charset=utf-8",
                    dataType: "json",
                    data: JSON.stringify({
                        "quote": $("#quote").val(),
                        "history": $("#memory").val(),
                        "answers": [
                            $("#superlative_0").val(),
                            $("#superlative_1").val(),
                            $("#superlative_2").val(),
                            $("#superlative_3").val(),
                            $("#superlative_4").val(),
                            $("#superlative_5").val(),
                            $("#superlative_6").val(),
                            $("#superlative_7").val(),
                            $("#superlative_8").val(),
                            $("#superlative_9").val(),
                            $("#superlative_10").val(),
                            $("#superlative_11").val(),
                            $("#superlative_12").val(),
                            $("#superlative_13").val(),
                            $("#superlative_14").val(),
                            $("#superlative_15").val(),
                            $("#superlative_16").val(),
                            $("#superlative_17").val(),
                            $("#superlative_18").val(),
                            $("#superlative_19").val(),
                            $("#superlative_20").val(),
                            $("#superlative_21").val(),
                            $("#superlative_22").val(),
                            $("#superlative_23").val(),
                            $("#superlative_24").val(),
                            $("#superlative_25").val(),
                            $("#superlative_26").val(),
                            $("#superlative_27").val()
                        ]
                    }),
{'fraction_non_alphanumeric': 0.1781569011327087, 'fraction_numerical': 0.026569710529995804, 'mean_word_length': 1.212186823383854, 'pattern_counts': {'":': 6, '<': 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': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '805882', 'n_tokens_mistral': 1871, 'n_tokens_neox': 1754, 'n_words': 307}