<commit_before>﻿using System.Collections.Generic;
using System.IO;

namespace Website
{

	public class Connfigger
	{
		public static string GetConnectionString()
		{
			//return @"";
			return @"Data Source=(local)\SQLEXPRESS;Initial Catalog=enelportal;Integrated Security=true;";
		}
		public static string GetTrackingCode()
		{
			//return "<!-- Start of StatCounter Code for Default Guide--><script type=\"text/javascript\"> var sc_project=10391388; var sc_invisible=1; var sc_security=\"51c01d0b\"; var scJsHost = ((\"https:\" == document.location.protocol) ? \"https://secure.\" : \"http://www.\"); document.write(\"<sc\"+\"ript type='text/javascript' src='\" + scJsHost + \"statcounter.com/counter/counter.js'></\"+\"script>\"); </script><noscript><div class=\"statcounter\"><a title=\"site stats\" href=\"http://statcounter.com/free-web-stats/\" target=\"_blank\"><img class=\"statcounter\" src=\"http://c.statcounter.com/10391388/0/51c01d0b/1/\" alt=\"site stats\"></a></div></noscript><!-- End of StatCounter Code for Default Guide -->";
			return "";
		}
		public static string DetectUILang(System.Web.HttpRequest request, Metadata metadata)
		{
			string uilang="";
			if(uilang=="" && request.Cookies["uilang"]!=null) { //try detecting uilang from cookie
				uilang=request.Cookies["uilang"].Value.ToLower();
				if(!metadata.isLangUI(uilang)) uilang="";
			}
			if(uilang=="" && request.UserLanguages!=null) { //try detecting uilang from browser setting
				foreach(string acceptlang in request.UserLanguages) {
					foreach(Language lang in metadata.languages) {
						if(lang.isUI) {
							if(acceptlang.ToLower()==lang.code || acceptlang.ToLower().StartsWith(lang.code+"-") || acceptlang.ToLower().StartsWith(lang.code+";")) {
								uilang=lang.code;
								break;
							}
						}
						if(uilang!="") break;<commit_msg>a bit of cleanup<commit_after>﻿using System.Collections.Generic;
using System.IO;

namespace Website
{

	public class Connfigger
	{
		public static string GetConnectionString()
		{
			//return @"";
			return @"Data Source=(local)\SQLEXPRESS;Initial Catalog=enelportal;Integrated Security=true;";
		}
		public static string GetTrackingCode()
		{
			//return "";
			return "";
		}
		public static string DetectUILang(System.Web.HttpRequest request, Metadata metadata)
		{
			string uilang="";
			if(uilang=="" && request.Cookies["uilang"]!=null) { //try detecting uilang from cookie
				uilang=request.Cookies["uilang"].Value.ToLower();
				if(!metadata.isLangUI(uilang)) uilang="";
			}
			if(uilang=="" && request.UserLanguages!=null) { //try detecting uilang from browser setting
				foreach(string acceptlang in request.UserLanguages) {
					foreach(Language lang in metadata.languages) {
						if(lang.isUI) {
							if(acceptlang.ToLower()==lang.code || acceptlang.ToLower().StartsWith(lang.code+"-") || acceptlang.ToLower().StartsWith(lang.code+";")) {
								uilang=lang.code;
								break;
							}
						}
						if(uilang!="") break;
{'fraction_non_alphanumeric': 0.17359249329758714, 'fraction_numerical': 0.009718498659517426, 'mean_word_length': 4.033726812816189, 'pattern_counts': {'":': 0, '<': 16, '<?xml version=': 0, '>': 16, 'https://': 1, 'lorem ipsum': 0, 'www.': 1, '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': '754660', 'n_tokens_mistral': 1142, 'n_tokens_neox': 956, 'n_words': 180}