<commit_before>var pickerWindowNamePrefix = 'picker_';

var floatEpsilon = 0.000001;

//if (!window.console) console = {log: function() {}};

function blink() {
	var blinks = document.getElementsByTagName('blink');
	for ( var i = blinks.length - 1; i >= 0; i--) {
		var s = blinks[i];
		s.style.visibility = (s.style.visibility === 'visible') ? 'hidden' : 'visible';
	}
	window.setTimeout(blink, 1000);
}

function zeroFill(integer,digits) {
    var result;
    var numberOfZeroes;
    if (integer == null || (integer + '').length == 0) {
        result = '';
        numberOfZeroes = digits;
    } else {
        result = integer + '';
        numberOfZeroes = digits - (integer + '').length;
    }
    for (var i = 0; i < numberOfZeroes; i++) {
        result = '0' + result;
    }
    return result;
}

//var ajaxWait = true;
var suppressWait = false;
var showDialogQueue = [];
function setSupressWait() {
	suppressWait = true;
}

function dequeueShowDialog() {
	var method;
	var count = 1;
	if (typeof waitDialog !== 'undefined') {
		method = showDialogQueue.shift();
		if (method) {
			while (showDialogQueue[0] == method) {
				showDialogQueue.shift();
				count++;
			}
			waitDialog[method]();
			//console.log(method + " dequeued " + count + " times");
		}
	}
}

function showWaitDialog() {
	if (!suppressWait) {
		if (typeof waitDialog !== 'undefined') {
			showDialogQueue.push('show');
			dequeueShowDialog();
		}
	}

}
function hideWaitDialog() {

	if (typeof waitDialog !== 'undefined') {
		showDialogQueue.push('hide');
		dequeueShowDialog();
	}

	suppressWait = false;
}

function showErrorMessage(error_message_id) {
	var errorMessageDivElement = _getElement(error_message_id + '_div');
	if (errorMessageDivElement != null) {
		errorMessageDivElement.show();
	}
}

function hideErrorMessage(error_message_id) {
	var errorMessageDivElement = _getElement(error_message_id + '_div');
	if (errorMessageDivElement != null) {
		errorMessageDivElement.hide();
	}
}

function setErrorMessageText(error_message_id,output) {
	var errorMessageSpanElement = _getElement(error_message_id);
	if (errorMessageSpanElement != null) {
		errorMessageSpanElement.text(output);
		//var textElement = errorMessageSpanElement.contents()[0];

		//if (typeof textElement.textContent !== 'undefined') {
		//	textElement.textContent = msg;
		//} else {
		//	textElement.innerText = msg;
		//}
	}
}

function setErrorMessageTexts(error_message_id,msgs) {
	var msgsLength = msgs.length;
	var errorMessageDivElement;
	var ulElement;
	var liElement;
	var spanId;
	var errorMessageSpanElement;
	var i;
	if (msgsLength > 0) {
		setErrorMessageText(error_message_id, msgs[0].output);
		errorMessageDivElement = _getElement(error_message_id + '_div');
		if (errorMessageDivElement != null) {
			ulElement = errorMessageDivElement.find('ul').first();
			ulElement.find('li:not(:first)').remove();
			if (msgsLength > 1) {
				liElement = ulElement.find('li').first();
				errorMessageSpanElement = liElement.find('span').first();
				spanId = errorMessageSpanElement.attr('id');
				for (i = 1; i < msgsLength; i++) {
					liElement = liElement.clone();
					errorMessageSpanElement = liElement.find('span').first();
					errorMessageSpanElement.text(msgs[i].output);
					errorMessageSpanElement.attr('id', spanId + '_' + i);
					ulElement.append(liElement);
				}
			}
		}
	} else {
		setErrorMessageText(error_message_id, '');
		errorMessageDivElement = _getElement(error_message_id + '_div');
		if (errorMessageDivElement != null) {
			ulElement = errorMessageDivElement.find('ul').first();
			ulElement.find('li:not(:first)').remove();
		}
	}
}<commit_msg>show linebreaks in field calculation output in messages<commit_after>var pickerWindowNamePrefix = 'picker_';

var floatEpsilon = 0.000001;

//if (!window.console) console = {log: function() {}};

function blink() {
	var blinks = document.getElementsByTagName('blink');
	for ( var i = blinks.length - 1; i >= 0; i--) {
		var s = blinks[i];
		s.style.visibility = (s.style.visibility === 'visible') ? 'hidden' : 'visible';
	}
	window.setTimeout(blink, 1000);
}

function zeroFill(integer,digits) {
    var result;
    var numberOfZeroes;
    if (integer == null || (integer + '').length == 0) {
        result = '';
        numberOfZeroes = digits;
    } else {
        result = integer + '';
        numberOfZeroes = digits - (integer + '').length;
    }
    for (var i = 0; i < numberOfZeroes; i++) {
        result = '0' + result;
    }
    return result;
}

//var ajaxWait = true;
var suppressWait = false;
var showDialogQueue = [];
function setSupressWait() {
	suppressWait = true;
}

function dequeueShowDialog() {
	var method;
	var count = 1;
	if (typeof waitDialog !== 'undefined') {
		method = showDialogQueue.shift();
		if (method) {
			while (showDialogQueue[0] == method) {
				showDialogQueue.shift();
				count++;
			}
			waitDialog[method]();
			//console.log(method + " dequeued " + count + " times");
		}
	}
}

function showWaitDialog() {
	if (!suppressWait) {
		if (typeof waitDialog !== 'undefined') {
			showDialogQueue.push('show');
			dequeueShowDialog();
		}
	}

}
function hideWaitDialog() {

	if (typeof waitDialog !== 'undefined') {
		showDialogQueue.push('hide');
		dequeueShowDialog();
	}

	suppressWait = false;
}

function showErrorMessage(error_message_id) {
	var errorMessageDivElement = _getElement(error_message_id + '_div');
	if (errorMessageDivElement != null) {
		errorMessageDivElement.show();
	}
}

function hideErrorMessage(error_message_id) {
	var errorMessageDivElement = _getElement(error_message_id + '_div');
	if (errorMessageDivElement != null) {
		errorMessageDivElement.hide();
	}
}

function setErrorMessageText(error_message_id,output) {
	var errorMessageSpanElement = _getElement(error_message_id);
	if (errorMessageSpanElement != null) {
		errorMessageSpanElement.html(output);
		//var textElement = errorMessageSpanElement.contents()[0];

		//if (typeof textElement.textContent !== 'undefined') {
		//	textElement.textContent = msg;
		//} else {
		//	textElement.innerText = msg;
		//}
	}
}

function setErrorMessageTexts(error_message_id,msgs) {
	var msgsLength = msgs.length;
	var errorMessageDivElement;
	var ulElement;
	var liElement;
	var spanId;
	var errorMessageSpanElement;
	var i;
	if (msgsLength > 0) {
		setErrorMessageText(error_message_id, msgs[0].output);
		errorMessageDivElement = _getElement(error_message_id + '_div');
		if (errorMessageDivElement != null) {
			ulElement = errorMessageDivElement.find('ul').first();
			ulElement.find('li:not(:first)').remove();
			if (msgsLength > 1) {
				liElement = ulElement.find('li').first();
				errorMessageSpanElement = liElement.find('span').first();
				spanId = errorMessageSpanElement.attr('id');
				for (i = 1; i < msgsLength; i++) {
					liElement = liElement.clone();
					errorMessageSpanElement = liElement.find('span').first();
					errorMessageSpanElement.html(msgs[i].output);
					errorMessageSpanElement.attr('id', spanId + '_' + i);
					ulElement.append(liElement);
				}
			}
		}
	} else {
		setErrorMessageText(error_message_id, '');
		errorMessageDivElement = _getElement(error_message_id + '_div');
		if (errorMessageDivElement != null) {
			ulElement = errorMessageDivElement.find('ul').first();
			ulElement.find('li:not(:first)').remove();
		}
	}
}
{'fraction_non_alphanumeric': 0.1490174672489083, 'fraction_numerical': 0.006277292576419214, 'mean_word_length': 4.161267605633803, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, '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': '358651', 'n_tokens_mistral': 2620, 'n_tokens_neox': 2386, 'n_words': 471}