<commit_before>﻿using System;
using System.ComponentModel;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Windows.Forms;

//
// BitMaskCheckedListBox
//
// Extenders for WinForms controls, such as DataGridView, 
// BindingSource, BindingNavigator and so on 
//
// Author: <NAME> (CanadianBeaver)
// Email: <EMAIL>
// GitHub: https://github.com/CanadianBeaver/DataViewExtenders
// 

namespace CBComponents
{
  [ToolboxBitmap(typeof(CheckedListBox))]
  public class BitMaskCheckedListBox : CheckedListBox
  {
    public BitMaskCheckedListBox()
    {
      this.CheckOnClick = true;
      /*this.ItemCheck += (sender, e) => { this.ValueChanged?.Invoke(sender, EventArgs.Empty); };*/
      this.SelectedValueChanged += (sender, e) => { this.ValueChanged?.Invoke(sender, EventArgs.Empty); };
    }
    
    [BrowsableAttribute(false)]
    public event EventHandler ValueChanged;

    [DefaultValue(0)]
    [Bindable(true), Browsable(true)]
    public long Value
    {
      get
      {
        long result = 0;
        for (int i = 0; i < this.Items.Count; i++)
          if (this.GetItemChecked(i)) result |= (long)1 << i;
        return result;
      }
      set
      {
        this.BeginUpdate();
        for (int i = 0; i < this.Items.Count; i++)
        {
          long j = (long)1 << i;
          bool nch = (value & j) == j;
          bool och = this.GetItemChecked(i);
          if (nch != och) this.SetItemChecked(i, nch);
        }
        this.EndUpdate();
      }
    }

  }
}
<commit_msg>1L is the long number<commit_after>﻿using System;
using System.ComponentModel;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Windows.Forms;

//
// BitMaskCheckedListBox
//
// Extenders for WinForms controls, such as DataGridView, 
// BindingSource, BindingNavigator and so on 
//
// Author: <NAME> (CanadianBeaver)
// Email: <EMAIL>
// GitHub: https://github.com/CanadianBeaver/DataViewExtenders
// 

namespace CBComponents
{
  [ToolboxBitmap(typeof(CheckedListBox))]
  public class BitMaskCheckedListBox : CheckedListBox
  {
    public BitMaskCheckedListBox()
    {
      this.CheckOnClick = true;
      /*this.ItemCheck += (sender, e) => { this.ValueChanged?.Invoke(sender, EventArgs.Empty); };*/
      this.SelectedValueChanged += (sender, e) => { this.ValueChanged?.Invoke(sender, EventArgs.Empty); };
    }
    
    [BrowsableAttribute(false)]
    public event EventHandler ValueChanged;

    [DefaultValue(0)]
    [Bindable(true), Browsable(true)]
    public long Value
    {
      get
      {
        long result = 0;
        for (int i = 0; i < this.Items.Count; i++)
          if (this.GetItemChecked(i)) result |= 1L << i;
        return result;
      }
      set
      {
        this.BeginUpdate();
        for (int i = 0; i < this.Items.Count; i++)
        {
          long j = 1L << i;
          bool nch = (value & j) == j;
          bool och = this.GetItemChecked(i);
          if (nch != och) this.SetItemChecked(i, nch);
        }
        this.EndUpdate();
      }
    }

  }
}

{'fraction_non_alphanumeric': 0.13513513513513514, 'fraction_numerical': 0.004943968358602505, 'mean_word_length': 2.4765177548682704, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 11, 'https://': 2, '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': '113158', 'n_tokens_mistral': 982, 'n_tokens_neox': 953, 'n_words': 218}