<commit_before>$(function(){
    $('.question').css('display', 'none');

    $(document).ready(function(){
        var question_no = '#q-' + q_no;
        $(question_no).css('display', 'block');
    });

    $('button[next]').button().click(function(){
        var this_id     = this.id;
        var id_array    = this_id.split('-');
        var id          = id_array[1];
        var next        = +id+1;
        var this_q      = '#q-' + id;
        var next_q      = '#q-' + next;

        $(this_q).css('display', 'none');
        $(next_q).css('display', 'block');

        $.ajax({
            type: 'post',
            url: base_url + 'index.php/survey/register_q_no_session',
            data: {'q_no':id},

            success: function(data) {

            }
        });

    });

    $('button[pre]').button().click(function(){
        var this_id     = this.id;
        var id_array    = this_id.split('-');
        var id          = id_array[1];
        var pre        = +id-1;
        var this_q      = '#q-' + id;
        var pre_q      = '#q-' + pre;

        $(this_q).css('display', 'none');
        $(pre_q).css('display', 'block');

        $.ajax({
            type: 'post',
            url: base_url + 'index.php/survey/register_q_no_session',
            data: {'q_no':id},

            success: function(data) {

            }
        });

    });
});<commit_msg>store q no to session via ajax<commit_after>$(function(){
    $('.question').css('display', 'none');

    $(document).ready(function(){
        var question_no = '#q-' + q_no;
        $(question_no).css('display', 'block');
    });

    $('button[next]').button().click(function(){
        var this_id     = this.id;
        var id_array    = this_id.split('-');
        var id          = id_array[1];
        var next        = +id+1;
        var this_q      = '#q-' + id;
        var next_q      = '#q-' + next;

        $(this_q).css('display', 'none');
        $(next_q).css('display', 'block');

        $.ajax({
            type: 'post',
            url: base_url + 'index.php/survey/register_q_no_session',
            data: {'q_no':next},

            success: function(data) {

            }
        });

    });

    $('button[pre]').button().click(function(){
        var this_id     = this.id;
        var id_array    = this_id.split('-');
        var id          = id_array[1];
        var pre        = +id-1;
        var this_q      = '#q-' + id;
        var pre_q      = '#q-' + pre;

        $(this_q).css('display', 'none');
        $(pre_q).css('display', 'block');

        $.ajax({
            type: 'post',
            url: base_url + 'index.php/survey/register_q_no_session',
            data: {'q_no':pre},

            success: function(data) {

            }
        });

    });
});
{'fraction_non_alphanumeric': 0.19183965640658554, 'fraction_numerical': 0.002863278453829635, 'mean_word_length': 1.552511415525114, 'pattern_counts': {'":': 0, '<': 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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7084081', 'n_tokens_mistral': 926, 'n_tokens_neox': 888, 'n_words': 166}