<commit_before>
var isOperating = false;
var isFloating = false;
var toBeCleared = false;
var operator;
var operand;
var display;

$(document).ready(init);

function init() {
	display = $('#display');
	$('.num').on('click', numClicked);
	$('.operator').on('click', operatorClicked);
	$('#invert').on('click', invertClicked);
	$('#root').on('click', rootClicked);
	$('#decimal').on('click', decimalClicked);
	$('#equals').on('click', equalsClicked);
	$('#clear').on('click', clearClicked);
}

function numClicked () {
	alert('Number button clicked!');
}

function operatorClicked () {
	alert('Operator button clicked!');
}

function invertClicked () {
	alert('Invert button clicked!');
}

function rootClicked () {
	alert('Root button clicked!');
}

function decimalClicked () {
	alert('Decimal button clicked!');
}

function equalsClicked () {
	alert('Equals button clicked!');
}

function clearClicked () {
	alert('Clear button clicked!');
}


<commit_msg>Calculation button event add<commit_after>
var isOperating = false;
var isFloating = false;
var toBeCleared = false;
var operator;
var operand;
var display;

$(document).ready(init);

function init() {
	display = $('#display');
	$('.num').on('click', numClicked);
	$('.operator').on('click', operatorClicked);
	$('#invert').on('click', invertClicked);
	$('#root').on('click', rootClicked);
	$('#decimal').on('click', decimalClicked);
	$('#equals').on('click', equalsClicked);
	$('#clear').on('click', clearClicked);
}

function numClicked() {

	var currVal = display.val();
	var clickedNum = $(this).text();

	if(currVal === '0' || toBeCleared) {
		toBeCleared = false;
		display.val(clickedNum);
	} else {
		display.val(currVal + clickedNum);
	}
}

function operatorClicked () {
	alert('Operator button clicked!');
}

function invertClicked () {
	alert('Invert button clicked!');
}

function rootClicked () {
	alert('Root button clicked!');
}

function decimalClicked () {
	alert('Decimal button clicked!');
}

function equalsClicked () {
	alert('Equals button clicked!');
}

function clearClicked () {
	reset();
	display.val('0');
}

function reset() {

	toBeCleared = true;
	isOperating = false;
	isFloating = false;
	operator = null;
	operand = null;

	$('#currop').text('');
}

function invertClicked() {
	display.val(display.val() * -1);
}
{'fraction_non_alphanumeric': 0.19852302345786274, 'fraction_numerical': 0.0013032145960034753, 'mean_word_length': 5.636887608069165, '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': '4412559', 'n_tokens_mistral': 773, 'n_tokens_neox': 767, 'n_words': 171}