<commit_before>/*
 * BioControlSampleUpdater
 * <NAME>
 * 2017-04-02
 *
 * Uses an Ajax call to find sample info from BioControl.
 */
function BioControlSampleUpdater() {

    self.construct = function () {
        var form = $('form');
        form.on('change', 'input[id$="BCSampleID"]', function (e) {
            self.modify(e.target);
        });
    };

    self.modify = function (input_field) {
        if ($(input_field).val().length > 5) {
            $.ajax({
                url: '/bio_control/sample',
                type: 'POST',
                dataType: 'json',
                data: {sample_number: $(input_field).val()},
                success: function (response) {
                    if (response.code == 100 && response.success) {
                        //alert(response.sample_number);
                    }
                }
            });
        }<commit_msg>Added basic skeleton for external database call - current returns COUNT of fos_user table.<commit_after>/*
 * BioControlSampleUpdater
 * <NAME>
 * 2017-04-02
 *
 * Uses an Ajax call to find sample info from BioControl.
 */
function BioControlSampleUpdater() {

    self.construct = function () {
        var form = $('form');
        form.on('change', 'input[id$="BCSampleID"]', function (e) {
            self.modify(e.target);
        });
    };

    self.modify = function (input_field) {
        if ($(input_field).val().length > 5) {
            $.ajax({
                url: '/bio_control/sample',
                type: 'POST',
                dataType: 'json',
                data: {sample_number: $(input_field).val()},
                success: function (response) {
                    if (response.code == 100 && response.success) {
                        alert(response.sample_number);
                    }
                }
            });
        }
{'fraction_non_alphanumeric': 0.1392336751214247, 'fraction_numerical': 0.012951969778737183, 'mean_word_length': 1.5821727019498608, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '6646712', 'n_tokens_mistral': 541, 'n_tokens_neox': 494, 'n_words': 112}