<commit_before>﻿using System;
using Gtk;

namespace LynnaLab
{
    [System.ComponentModel.ToolboxItem(true)]
    public partial class SpinButtonHexadecimal : Gtk.SpinButton
    {
        public SpinButtonHexadecimal() : base(0,100,1)
        {
            this.Numeric = false;
        }

        protected override int OnOutput() {
            this.Numeric = false;
            Text = "0x" + ValueAsInt.ToString("X" + Digits);
            return 1;
        }
        protected override int OnInput(out double value) {
            try {
                value = Convert.ToInt32(Text);
            }
            catch (Exception e) {
                try {
                    value = Convert.ToInt32(Text.Substring(2),16);
                }
                catch (Exception) {
                    value = Value;
                }
            }
            return 1;
        }
    }
}
<commit_msg>Use $ for hex symbol to match wla<commit_after>﻿using System;
using Gtk;

namespace LynnaLab
{
    [System.ComponentModel.ToolboxItem(true)]
    public partial class SpinButtonHexadecimal : Gtk.SpinButton
    {
        public SpinButtonHexadecimal() : base(0,100,1)
        {
            this.Numeric = false;
        }

        protected override int OnOutput() {
            this.Numeric = false;
            Text = "$" + ValueAsInt.ToString("X" + Digits);
            return 1;
        }
        protected override int OnInput(out double value) {
            string text = Text.Trim();
            bool success = false;
            value = Value;
            try {
                value = Convert.ToInt32(text);
                success = true;
            }
            catch (Exception e) {
            }
            try {
                if (text.Length > 0 && text[0] == '$') {
                    value = Convert.ToInt32(text.Substring(1),16);
                    success = true;
                }
            }
            catch (Exception) {
            }
            if (!success)
                value = Value;
            return 1;
        }
    }
}

{'fraction_non_alphanumeric': 0.0958171206225681, 'fraction_numerical': 0.015077821011673152, 'mean_word_length': 1.2530120481927711, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '1768769', 'n_tokens_mistral': 584, 'n_tokens_neox': 545, 'n_words': 123}