<commit_before>﻿//MIT 2014-2016, WinterDev

using System;
using System.Collections.Generic;
using PixelFarm.Agg;
namespace Mini
{
    [AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
    public class InfoAttribute : Attribute
    {
        public InfoAttribute()
        {
        }
        public InfoAttribute(DemoCategory catg)
        {
            this.Category = catg;
        }
        public InfoAttribute(string desc)
        {
            this.Description = desc;
        }
        public InfoAttribute(DemoCategory catg, string desc)
        {
            this.Category = catg;
            this.Description = desc;
        }
        public string Description { get; private set; }
        public DemoCategory Category { get; private set; }
        public string OrderCode { get; set; }
    }

    public enum DemoCategory
    {
        Vector,
        Bitmap
    }
    public delegate Graphics2D RequestNewGraphic2DDelegate();
    public abstract class DemoBase
    {
        public DemoBase()
        {
            this.Width = 800;
            this.Height = 600;
        }


        public abstract void Draw(CanvasPainter p);
        public virtual void Init() { }

        public virtual void MouseDrag(int x, int y) { }
        public virtual void MouseDown(int x, int y, bool isRightButton) { }
        public virtual void MouseUp(int x, int y) { }
        public int Width { get; set; }
        public int Height { get; set; }


        Stack<VertexStore> _tmpVxs = new Stack<VertexStore>();
        public VertexStore GetFreeVxs()
        {
            if (_tmpVxs.Count == 0)
            {
                return new VertexStore();
            }
            return _tmpVxs.Pop();
        }
        public void ReleaseVxs(ref VertexStore vxs)
        {
            _tmpVxs.Push(vxs);
            vxs = null;
        }

    }

    public class DemoConfigAttribute : Attribute
    {
        public DemoConfigAttribute()<commit_msg>1193.7<commit_after>﻿//MIT 2014-2016, WinterDev

using System;
using System.Collections.Generic;
using PixelFarm.Agg;
namespace Mini
{
    [AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
    public class InfoAttribute : Attribute
    {
        public InfoAttribute()
        {
        }
        public InfoAttribute(DemoCategory catg)
        {
            this.Category = catg;
        }
        public InfoAttribute(string desc)
        {
            this.Description = desc;
        }
        public InfoAttribute(DemoCategory catg, string desc)
        {
            this.Category = catg;
            this.Description = desc;
        }
        public string Description { get; private set; }
        public DemoCategory Category { get; private set; }
        public string OrderCode { get; set; }
    }

    public enum DemoCategory
    {
        Vector,
        Bitmap
    }
    public delegate Graphics2D RequestNewGraphic2DDelegate();
    public abstract class DemoBase
    {
        public DemoBase()
        {
            this.Width = 800;
            this.Height = 600;
        }


        public abstract void Draw(CanvasPainter p);
        public virtual void Init() { }

        public virtual void MouseDrag(int x, int y) { }
        public virtual void MouseDown(int x, int y, bool isRightButton) { }
        public virtual void MouseUp(int x, int y) { }
        public int Width { get; set; }
        public int Height { get; set; }


        Stack<VertexStore> _tmpVxs = new Stack<VertexStore>();
        public VertexStore GetFreeVxs()
        {
            if (_tmpVxs.Count == 0)
            {
                return new VertexStore();
            }
            return _tmpVxs.Pop();
        }
        public void ReleaseVxs(ref VertexStore vxs)
        {
            vxs.Clear();
            _tmpVxs.Push(vxs);
            vxs = null;
        }

    }

    public class DemoConfigAttribute : Attribute
    {
        public DemoConfigAttribute()
{'fraction_non_alphanumeric': 0.07990867579908675, 'fraction_numerical': 0.00989345509893455, 'mean_word_length': 1.7230662983425415, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '3861886', 'n_tokens_mistral': 1109, 'n_tokens_neox': 1042, 'n_words': 292}