<commit_before>$(document).ready(function () {
    //attach a jQuery live event to the button
    $('#getdata-button').on('click', function () {
        $.getJSON('http://localhost:8888/86/app/prediction.php?latitude=42.355375699999996&longitude=-71.149031&direction=outbound', function (data) {
            //alert(data); //uncomment this for debug
            //alert (data.item1+" "+data.item2+" "+data.item3); //further debug
            $('#showdata').html("<p>stop name=" + data.stop_name + " stop id=" + data.stop_id + " minutes=" + data.prediction[0]['pre_away'] + "</p>");
        });
    });
});

//$(document).ready(function () {
//    //attach a jQuery live event to the button
//    $('#getdata-button').on('click', function () {
//        $.ajax({
//            type: "GET",
//            url: 'http://localhost:8888/86/app/prediction.php?latitude=42.355375699999996&longitude=-71.149031&direction=outbound',
//            async: true,
//            dataType: "json",
//            success: function (data) {
//                $('#showdata').html("<p>stop name=" + data.stop_name + " stop id=" + data.stop_id + " minutes=" + data.prediction[0]['pre_away'] + "</p>");
//            }
//        });
//    });
//});<commit_msg>adding interval polling to the ajax call<commit_after>//$(document).ready(function () {
//    //attach a jQuery live event to the button
//    $('#getdata-button').on('click', function () {
//        $.getJSON('http://localhost:8888/86/app/prediction.php?latitude=42.355375699999996&longitude=-71.149031&direction=outbound', function (data) {
//            //alert(data); //uncomment this for debug
//            //alert (data.item1+" "+data.item2+" "+data.item3); //further debug
//            $('#showdata').html("<p>stop name=" + data.stop_name + " stop id=" + data.stop_id + " minutes=" + data.prediction[0]['pre_away'] + "</p>");
//        });
//    });
//});

$(document).ready(function () {
    //attach a jQuery live event to the button
    $('#getdata-button').on('click', function () {
        $.ajax({
            type: "GET",
            url: 'app/prediction.php?latitude=42.355375699999996&longitude=-71.149031&direction=outbound',
            async: true,
            dataType: "json",
            success: function (data) {
                $('#showdata').html("<p>stop name=" + data.stop_name + " stop id=" + data.stop_id + " minutes=" + data.prediction[0]['pre_away'] + "</p>");
            }
        });
    });
});

setInterval(
        function ()
        {
            $.ajax({
                type: "GET",
                url: 'app/prediction.php?latitude=42.355375699999996&longitude=-71.149031&direction=outbound',
                async: true,
                dataType: "json",
                success: function (data) {
                    $('#showdata').html("<p>stop name=" + data.stop_name + " stop id=" + data.stop_id + " minutes=" + data.prediction[0]['pre_away'] + "</p>");
                }
            });
        }, 60);
{'fraction_non_alphanumeric': 0.20595118689401537, 'fraction_numerical': 0.05215646940822467, 'mean_word_length': 2.2345945945945944, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 5, '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': '4275651', 'n_tokens_mistral': 1007, 'n_tokens_neox': 921, 'n_words': 162}