<commit_before>define([], function() {

    return ["$timeout", function($timeout) {

        return {
            scope: {
                symbols: "=",
            },
            restrict: "A",
            templateUrl: "/partials/equation_editor/number_entry.html",
            link: function(scope, element, attrs) {
                scope.name = "NUMBER ENTRY"

                scope.currentNumber = "";
                scope.currentExponent = null;
                scope.negate = false;
                scope.currentSymbol = null;

                scope.clearOnClose = false;


                scope.buttonClick = function(btn) {
                    if (btn == "^") {
                        scope.currentExponent = "";
                    } else if (btn == "-") {
                      scope.negate = !scope.negate;
                      if(scope.currentNumber[0] != '-') {
                        scope.currentNumber = "-" + scope.currentNumber;
                      }
                      else {
                        scope.currentNumber = scope.currentNumber.substring(1);
                      }
                    } else {
                        if (scope.currentExponent != null) {
                            scope.currentExponent += btn;
                        } else {
                            scope.currentNumber += btn;
                        }
                    }
                }

                scope.$on("numberClicked", function(_, num) {
                    if (num == "^") {
                        scope.currentExponent = "";
                    } else if (num == "-") {
                        scope.negate = !scope.negate;
                        if(scope.currentNumber[0] != '-') {
                            console.debug("51", scope.currentNumber);
                          scope.currentNumber = "-" + scope.currentNumber;
                        }
                        else {
                            console.debug("55", scope.currentNumber.substring(1));
                          scope.currentNumber = scope.currentNumber.substring(1);
                        }

                    } else {<commit_msg>Minor changes.<commit_after>define([], function() {

    return ["$timeout", function($timeout) {

        return {
            scope: {
                symbols: "=",
            },
            restrict: "A",
            templateUrl: "/partials/equation_editor/number_entry.html",
            link: function(scope, element, attrs) {
                scope.name = "NUMBER ENTRY"

                scope.currentNumber = "";
                scope.currentExponent = null;
                scope.negate = false;
                scope.currentSymbol = null;

                scope.clearOnClose = false;


                scope.buttonClick = function(btn) {
                    if (btn == "^") {
                        scope.currentExponent = "";
                    } else if (btn == "-") {
                      scope.negate = !scope.negate;
                      if(scope.currentNumber[0] != '-') {
                        scope.currentNumber = "-" + scope.currentNumber;
                      }
                      else {
                        scope.currentNumber = scope.currentNumber.substring(1);
                      }
                    } else {
                        if (scope.currentExponent != null) {
                            scope.currentExponent += btn;
                        } else {
                            scope.currentNumber += btn;
                        }
                    }
                }

                scope.$on("numberClicked", function(_, num) {
                    if (num == "^") {
                        scope.currentExponent = "";
                    } else if (num == "-") {
                        scope.negate = !scope.negate;
                        if(scope.currentNumber[0] != '-') {
                          scope.currentNumber = "-" + scope.currentNumber;
                        }
                        else {
                          scope.currentNumber = scope.currentNumber.substring(1);
                        }

                    } else {
{'fraction_non_alphanumeric': 0.10951008645533142, 'fraction_numerical': 0.003121998078770413, 'mean_word_length': 0.8949044585987261, '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': '3516358', 'n_tokens_mistral': 975, 'n_tokens_neox': 890, 'n_words': 147}