<commit_before>﻿/********************************************************************
 * Develop by <NAME>												*
 * This program is licensed under the Apache License 2.0.			*
 * DataArray.cs														*
 * 本檔案建立繪圖資料陣列單元物件									*
 ********************************************************************
 */

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ArrayDataGraphic.CSharpFiles
{                                                                               //	namespace start, 進入命名空間
	class DataArray                                                             //	DataArray class, DataArray類別
	{                                                                           //	DataArray class start, 開始DataArray類別
		/// <summary>
		/// GraphicData is the queue for storing the graphic data.
		/// GraphicData陣列用於儲存繪圖資料
		/// </summary>
		private object[] GraphicData;                                           //	GraphicData object, GraphicData陣列物件

		/// <summary>
		/// GraphicDataIndex variable is the number record the array index of the new data. 
		/// GraphicDataIndex變數用於紀錄新資料寫入index
		/// </summary>
		private int GraphicDataIndex;                                           //	GraphicDataIndex variable, GraphicDataIndex變數

		/// <summary>
		/// DataArrayName is the name of DataArray.
		/// DataArray名稱
		/// </summary>
		private string DataArrayName;                                           //	DataArrayName string, DataArrayName字串

		/// <summary>
		/// GraphicDataArrayMax is the max number of count of GraphData elements.
		/// GraphicDataArrayMax為GraphData物件數量上限
		/// </summary>
		private int GraphicDataArrayMax;                                        //	GraphicDataArrayMax variable, GraphicDataArrayMax變數

		/// <summary>
		/// DataArray constructor, DataArray建構子
		/// </summary>
		/// <param name="NewDataArrayName">為DataArray名稱</param>
		public DataArray(string NewDataArrayName)                               //	DataArray constructor, DataArray建構子
		{                                                                       //	DataArray constructor start, 進入DataArray建構子
			this.GraphicDataArrayMax = 100;                                     //	initialize GraphicDataArrayMax, 初始化GraphicDataArrayMax變數
			this.DataArrayName = NewDataArrayName;                              //	initialize DataArrayName, 初始化DataArrayName字串
			Array.Resize<object>(ref this.GraphicData, this.GraphicDataArrayMax);
			//	initialize GraphicData, 初始化GraphicData物件(配置陣列大小空間)
		}                                                                       //	DataArray constructor end, 結束DataArray建構子

		/// <summary>
		/// DataArray constructor with NewGraphicDataArrayMax, 具NewGraphicDataArrayMax輸入之DataArray建構子
		/// </summary>
		/// <param name="NewDataArrayName">為DataArray名稱</param>
		/// <param name="NewGraphicDataArrayMax">為GraphicDataArray資料儲存數量上限值</param>
		public DataArray(string NewDataArrayName, int NewGraphicDataArrayMax)   //	DataArray constructor, DataArray建構子
		{                                                                       //	DataArray constructor start, 進入DataArray建構子
			this.DataArrayName = NewDataArrayName;                              //	initialize DataArrayName, 初始化DataArrayName字串
			this.GraphicDataArrayMax = NewGraphicDataArrayMax;                  //	initialize GraphicDataArrayMax, 初始化GraphicDataArrayMax變數
			Array.Resize<object>(ref this.GraphicData, this.GraphicDataArrayMax);
			//	initialize GraphicData, 初始化GraphicData物件(配置陣列大小空間)
		}                                                                       //	DataArray constructor end, 結束DataArray建構子

		/// <summary>
		/// GetGraphicDataArrayMax return GraphicDataArrayMax.
		/// GetGraphicDataArrayMax方法回傳GraphicDataArrayMax變數
		/// </summary>
		/// <returns>GraphicDataArrayMax</returns>
		public int GetGraphicDataArrayMax()                                     //	GetGraphicDataArrayMax method, GetGraphicDataArrayMax方法<commit_msg>Initialize GraphicDataIndex<commit_after>﻿/********************************************************************
 * Develop by <NAME>												*
 * This program is licensed under the Apache License 2.0.			*
 * DataArray.cs														*
 * 本檔案建立繪圖資料陣列單元物件									*
 ********************************************************************
 */

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ArrayDataGraphic.CSharpFiles
{                                                                               //	namespace start, 進入命名空間
	class DataArray                                                             //	DataArray class, DataArray類別
	{                                                                           //	DataArray class start, 開始DataArray類別
		/// <summary>
		/// GraphicData is the queue for storing the graphic data.
		/// GraphicData陣列用於儲存繪圖資料
		/// </summary>
		private object[] GraphicData;                                           //	GraphicData object, GraphicData陣列物件

		/// <summary>
		/// GraphicDataIndex variable is the number record the array index of the new data. 
		/// GraphicDataIndex變數用於紀錄新資料寫入index
		/// </summary>
		private int GraphicDataIndex;                                           //	GraphicDataIndex variable, GraphicDataIndex變數

		/// <summary>
		/// DataArrayName is the name of DataArray.
		/// DataArray名稱
		/// </summary>
		private string DataArrayName;                                           //	DataArrayName string, DataArrayName字串

		/// <summary>
		/// GraphicDataArrayMax is the max number of count of GraphData elements.
		/// GraphicDataArrayMax為GraphData物件數量上限
		/// </summary>
		private int GraphicDataArrayMax;                                        //	GraphicDataArrayMax variable, GraphicDataArrayMax變數

		/// <summary>
		/// DataArray constructor, DataArray建構子
		/// </summary>
		/// <param name="NewDataArrayName">為DataArray名稱</param>
		public DataArray(string NewDataArrayName)                               //	DataArray constructor, DataArray建構子
		{                                                                       //	DataArray constructor start, 進入DataArray建構子
			this.GraphicDataArrayMax = 100;                                     //	initialize GraphicDataArrayMax, 初始化GraphicDataArrayMax變數
			this.DataArrayName = NewDataArrayName;                              //	initialize DataArrayName, 初始化DataArrayName字串
			this.GraphicDataIndex = 0;                                          //	initialize GraphicDataIndex, 初始化GraphicDataIndex變數
			Array.Resize<object>(ref this.GraphicData, this.GraphicDataArrayMax);
			//	initialize GraphicData, 初始化GraphicData物件(配置陣列大小空間)
		}                                                                       //	DataArray constructor end, 結束DataArray建構子

		/// <summary>
		/// DataArray constructor with NewGraphicDataArrayMax, 具NewGraphicDataArrayMax輸入之DataArray建構子
		/// </summary>
		/// <param name="NewDataArrayName">為DataArray名稱</param>
		/// <param name="NewGraphicDataArrayMax">為GraphicDataArray資料儲存數量上限值</param>
		public DataArray(string NewDataArrayName, int NewGraphicDataArrayMax)   //	DataArray constructor, DataArray建構子
		{                                                                       //	DataArray constructor start, 進入DataArray建構子
			this.DataArrayName = NewDataArrayName;                              //	initialize DataArrayName, 初始化DataArrayName字串
			this.GraphicDataArrayMax = NewGraphicDataArrayMax;                  //	initialize GraphicDataArrayMax, 初始化GraphicDataArrayMax變數
			this.GraphicDataIndex = 0;                                          //	initialize GraphicDataIndex, 初始化GraphicDataIndex變數
			Array.Resize<object>(ref this.GraphicData, this.GraphicDataArrayMax);
			//	initialize GraphicData, 初始化GraphicData物件(配置陣列大小空間)
		}                                                                       //	DataArray constructor end, 結束DataArray建構子

		/// <summary>
		/// GetGraphicDataArrayMax return GraphicDataArrayMax.
		/// GetGraphicDataArrayMax方法回傳GraphicDataArrayMax變數
		/// </summary>
		/// <returns>GraphicDataArrayMax</returns>
		public int GetGraphicDataArrayMax()                                     //	GetGraphicDataArrayMax method, GetGraphicDataArrayMax方法
{'fraction_non_alphanumeric': 0.10795180722891566, 'fraction_numerical': 0.0014457831325301205, 'mean_word_length': 1.783702213279678, 'pattern_counts': {'":': 0, '<': 53, '<?xml version=': 0, '>': 53, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 66, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5328535', 'n_tokens_mistral': 2379, 'n_tokens_neox': 2283, 'n_words': 422}