<commit_before>$().ready(function () {
    window.loans = {};
    window.auto_increment = -1;
    window.monthly_payment = 0;
    ApplicationController.monthly_payment_input_change();


    window.payment_type = "avalanche";

    Router.init();

    LoanController.add_loan();
    Router.add_monthly_payment_listener();
    Router.add_calculate_listener();

    Handlebars.registerPartial("row", $("#loan-table-row-partial").html());
});
<commit_msg>starting the load from url code<commit_after>$().ready(function () {

    var params = getSearchParameters();
    console.log(params);
    if (params.empty()) {
        load_empty_loans();
    }
    else {
        load_url_loans(params);
    }

});


// http://localhost:63342/unbury.us/public_html/index.html?name_0=1&balance_0=2&payment_0=4&rate_0=2
var url_loans_valid = function (params) {

};

var load_url_loans = function (params) {
    if (url_loans_valid(params)) {

    }
    else {
        load_empty_loans();
    }
};


var load_empty_loans = function () {
    window.loans = {};
    window.auto_increment = -1;
    window.monthly_payment = 0;
    ApplicationController.monthly_payment_input_change();


    window.payment_type = "avalanche";

    Router.init();

    LoanController.add_loan();
    Router.add_monthly_payment_listener();
    Router.add_calculate_listener();

    Handlebars.registerPartial("row", $("#loan-table-row-partial").html());
};


var getSearchParameters = function () {
    var prmstr = window.location.search.substr(1);
    return prmstr != null && prmstr != "" ? transformToAssocArray(prmstr) : {};
};

var transformToAssocArray = function (prmstr) {
    var params = {};
    var prmarr = prmstr.split("&");
    for (var i = 0; i < prmarr.length; i++) {
        var tmparr = prmarr[i].split("=");
        params[tmparr[0]] = tmparr[1];
    }
    return params;
};



{'fraction_non_alphanumeric': 0.15455035002692516, 'fraction_numerical': 0.011308562197092083, 'mean_word_length': 3.4663461538461537, 'pattern_counts': {'":': 0, '<': 4, '<?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': '3377588', 'n_tokens_mistral': 654, 'n_tokens_neox': 619, 'n_words': 94}