Minor fixes to WritePostsToAzure custom command

--- src/Hawk/CustomCommands.cs
+++ src/Hawk/CustomCommands.cs
@@ -12,6 +12,7 @@
 using Hawk.Models;
 using Hawk.Services;
 using Microsoft.Framework.OptionsModel;
+using Microsoft.WindowsAzure.Storage.Blob;

 namespace Hawk
 {
@@ -88,6 +89,8 @@

             var contentContainer = blobClient.GetContainerReference("blog-content");
             await contentContainer.CreateIfNotExistsAsync();
+            await contentContainer.SetPermissionsAsync(new BlobContainerPermissions() { PublicAccess = BlobContainerPublicAccessType.Blob });
+
             var postsTable = tableClient.GetTableReference("blogPosts");
             await postsTable.CreateIfNotExistsAsync();
             var commentsTable = tableClient.GetTableReference("blogComments");
@@ -132,7 +135,7 @@
                             .Where(p => FileSystemRepo.IMG_EXTENSIONS.Contains(Path.GetExtension(p).ToLowerInvariant()));
                 foreach (var imagePath in imagePaths)
                 {
-                    var imageBlob = contentContainer.GetBlockBlobReference($"{post.Post.UniqueKey}/{Path.GetFileName(imagePath).ToLowerInvariant()}");
+                    var imageBlob = contentContainer.GetBlockBlobReference($"{post.Post.UniqueKey}/{Path.GetFileName(imagePath)}");
                     await imageBlob.UploadFromFileAsync(imagePath, FileMode.Open);
                 }
             }


#40 Web3 checksum address

#40 Web3 checksum address

--- src/Nethereum.Web3/Web3.cs
+++ src/Nethereum.Web3/Web3.cs
@@ -9,6 +9,8 @@
     {
         public UnitConversion Convert { get; private set; }
         public TransactionSigning OfflineTransactionSigning { get; private set; }
+        private AddressUtil addressUtil;
+
         private Sha3Keccack sha3Keccack;

         public Web3(IClient client)
@@ -35,6 +37,7 @@
             Convert = new UnitConversion();
             sha3Keccack = new Sha3Keccack();
             OfflineTransactionSigning = new TransactionSigning();
+            addressUtil = new AddressUtil();

         }

@@ -62,5 +65,20 @@
         {
             return sha3Keccack.CalculateHash(value);
         }
+
+        public string ToChecksumAddress(string address)
+        {
+            return this.addressUtil.ConvertToChecksumAddress(address);
+        }
+
+        public bool IsChecksumAddress(string address)
+        {
+            return this.addressUtil.IsChecksumAddress(address);
+        }
+
+        public string ToValid20ByteAddress(string address)
+        {
+            return this.addressUtil.ConvertToValid20ByteAddress(address);
+        }
     }
 }


Stop double call of Directory.GetCurrentDirectory on startup, as 20% slower on linux

--- src/Orchard.Web/Program.cs
+++ src/Orchard.Web/Program.cs
@@ -9,11 +9,13 @@
     {
         public static void Main(string[] args)
         {
+            var currentDirectory = Directory.GetCurrentDirectory();
+
             var host = new WebHostBuilder()
                 .UseIISIntegration()
                 .UseKestrel()
-                .UseContentRoot(Directory.GetCurrentDirectory())
-                .UseWebRoot(Directory.GetCurrentDirectory())
+                .UseContentRoot(currentDirectory)
+                .UseWebRoot(currentDirectory)
                 .UseStartup<Startup>()
                 .Build();


Documentation

Documentation

--HG--
branch : dev

--- src/Orchard/IDependency.cs
+++ src/Orchard/IDependency.cs
@@ -2,12 +2,21 @@
 using Orchard.Logging;

 namespace Orchard {
+    /// <summary>
+    /// Base interface for services that are instantiated per unit of work (i.e. web request).
+    /// </summary>
     public interface IDependency {
     }

+    /// <summary>
+    /// Base interface for services that are instantiated per shell/tenant.
+    /// </summary>
     public interface ISingletonDependency : IDependency {
     }

+    /// <summary>
+    /// Base interface for services that are instantiated per usage.
+    /// </summary>
     public interface ITransientDependency : IDependency {
     }


disable retries in tests

disable retries in tests

--- src/Tests/ConfigBuilder.cs
+++ src/Tests/ConfigBuilder.cs
@@ -9,6 +9,17 @@
         configuration.UsePersistence<InMemoryPersistence>();
         configuration.UseTransport<LearningTransport>();
         configuration.PurgeOnStartup(true);
+        var recoverability = configuration.Recoverability();
+        recoverability.Delayed(
+            customizations: settings =>
+            {
+                settings.NumberOfRetries(0);
+            });
+        recoverability.Immediate(
+            customizations: settings =>
+            {
+                settings.NumberOfRetries(0);
+            });
         return configuration;
     }
 }


Combo pages debug

Combo pages debug

--- src/GraphicObjects/ListBox.cs
+++ src/GraphicObjects/ListBox.cs
@@ -148,7 +148,7 @@

 				Group page = _list.Clone () as Group;
 				page.Name = "page" + pageNum;
-				page.Background = Color.Transparent;
+				page.Background = Color.Green;

 				//reset size to fit in the dir of the stacking
 				//because _list total size is forced to approx size
@@ -159,7 +159,7 @@
 //					Bindings.Add(new Binding
 //						(new MemberReference (page, typeof(GraphicObject).GetMember ("Width")[0]), "../../WidthPolicy"));
 					//page.Bindings.Add(new Binding (page, "Width", "../../WidthPolicy"));
-					page.BindMember("Width", "../../WidthPolicy");
+					page.BindMember("Width", "../WidthPolicy");
 				}

 				for (int i = (pageNum - 1) * itemPerPage; i < pageNum * itemPerPage; i++) {


chore(deps): Fix NSwag upgrade

chore(deps): Fix NSwag upgrade

--- src/WeatherLink/Startup.cs
+++ src/WeatherLink/Startup.cs
@@ -39,13 +39,8 @@
             app.UseHttpsRedirection();
 			app.UseMvc();

-			app.UseSwaggerUi3WithApiExplorer(c =>
-			{
-				c.SwaggerRoute = "/swagger/v1/swagger.json";
-                c.SwaggerUiRoute = "/swagger";
-				c.GeneratorSettings.Title = "WeatherLink";
-				c.GeneratorSettings.Description = "An API to get weather based advice.";
-			});
+			app.UseSwagger();
+			app.UseSwaggerUi3();

 			app.UseStaticFiles();
 		}
@@ -70,7 +65,11 @@
 			services.AddTransient<IDarkSkyService, HourlyAndMinutelyDarkSkyService>();

 			// Configure swagger
-			services.AddSwagger();
+			services.AddSwaggerDocument(c =>
+			{
+				c.Title = "WeatherLink";
+				c.Description = "An API to get weather based advice.";
+			});
 		}
 	}
 }


Bounded now builds and has some documentation

--- WoDCharacterData/BoundedInt.cs
+++ WoDCharacterData/BoundedInt.cs
@@ -6,17 +6,34 @@

 namespace Games.RPG.WoDCharacterData
 {
+    /// <summary>
+    /// A bounded generic object - this object has its possible range of values limited within the range normally available to its datatype.
+    /// The generic object type must be IComparable and IEquatable - it must be an object that can be said to be "equal to", "less than"
+    /// or "greater than" another object of the same type.
+    ///
+    /// The bounded generic object can be converted between itself and the generic type, and compared against itself and the generic type.
+    /// </summary>
+    /// <typeparam name="T"></typeparam>
     public class Bounded<T> :
         IComparable<T>, IComparable<Bounded<T>>, IEquatable<T>, IEquatable<Bounded<T>>
-        where T:IComparable<T>  {
+        where T:IComparable<T>, IEquatable<T>  {
         #region Constructors
-        public Bounded<T>()
-        {
-        }
-
-        public Bounded(T d)
-        {
-            this.Value = d;
+        public Bounded() {
+            Value = default(T);
+            Min = default(T);
+            Max = default(T);
+        }
+
+        /// <summary>
+        /// Constructor of most use
+        /// </summary>
+        /// <param name="initial">Initial value of this bounded object - will be immediately bounded by the minimum and maximum Properties even if not specified</param>
+        /// <param name="minimum">Minimum value that this object is allowed to be set to (uses default(T) if not specified)</param>
+        /// <param name="maximum">Maximum value that this object is allowed to be set to (uses default(T) if not specified)</param>
+        public Bounded(T initial, T minimum = default(T), T maximum = default(T)) {
+            Min = minimum;
+            Max = maximum;
+            this.Value = initial;
         }
         #endregion Constructors

@@ -69,12 +86,39 @@
         private T min;
         #endregion fields

+        #region Helper Methods
+
+        /// <summary>
+        /// For Mike so he can get all LINQy with it.
+        /// </summary>
+        /// <typeparam name="T">The generic type of the object</typeparam>
+        /// <param name="initial"></param>
+        /// <param name="function"></param>
+        /// <returns></returns>
+        public static Bounded<T> Bind<T>(this Bounded<T> initial, Func<T, Bounded<T>> function)
+            where T : IEquatable<T>, IComparable<T> {
+            return function(initial.Value);
+        }
+
+        #endregion Helper Methods
+
         #region Operators and Interfaces
-        public static implicit operator T(Bounded<T> d)  // implicit BoundedInt to int conversion operator
+        /// <summary>
+        /// implicit Bounded to T conversion operator
+        /// </summary>
+        /// <param name="d"></param>
+        /// <returns></returns>
+        public static implicit operator T(Bounded<T> d)
         {
             return d.Value;  // implicit conversion
         }
-        public static implicit operator Bounded<T>(T d)  // implicit BoundedInt to int conversion operator
+
+        /// <summary>
+        /// implicit T to Bounded conversion operator
+        /// </summary>
+        /// <param name="d"></param>
+        /// <returns></returns>
+        public static implicit operator Bounded<T>(T d)
         {
             return new Bounded<T>(d);  // implicit conversion
         }


dynamic check pinyin setting

dynamic check pinyin setting

--- Wox.Infrastructure/Alphabet.cs
+++ Wox.Infrastructure/Alphabet.cs
@@ -25,23 +25,30 @@

         public string Translate(string content)
         {
-            string result = _cache[content] as string;
-            if (result == null)
+            if (_settings.ShouldUsePinyin)
             {
-                if (_settings.ShouldUsePinyin && WordsHelper.HasChinese(content))
+                string result = _cache[content] as string;
+                if (result == null)
                 {
-                    // todo change first pinyin to full pinyin list, but current fuzzy match algorithm won't support first char match
-                    result = WordsHelper.GetFirstPinyin(content);
+                    if (WordsHelper.HasChinese(content))
+                    {
+                        // todo change first pinyin to full pinyin list, but current fuzzy match algorithm won't support first char match
+                        result = WordsHelper.GetFirstPinyin(content);
+                    }
+                    else
+                    {
+                        result = content;
+                    }
+                    CacheItemPolicy policy = new CacheItemPolicy();
+                    policy.SlidingExpiration = new TimeSpan(12, 0, 0);
+                    _cache.Set(content, result, policy);
                 }
-                else
-                {
-                    result = content;
-                }
-                CacheItemPolicy policy = new CacheItemPolicy();
-                policy.SlidingExpiration = new TimeSpan(12, 0, 0);
-                _cache.Set(content, result, policy);
+                return result;
             }
-            return result;
+            else
+            {
+                return content;
+            }
         }
     }
 }


update demo

update demo

--- Tutorials/DatabaseMigrateRunner/Program.cs
+++ Tutorials/DatabaseMigrateRunner/Program.cs
@@ -28,50 +28,50 @@

                 #region Run migrate with custom values

-                var runner = ExtMigrationRunner.Initialize();
-                runner.ForDatabases(new SortedList<int, string> { { 1, "MovieStore" }, { 2, "InventoryDb" } });
-                runner.ForRootNamespace("DatabaseMigrateRunner.Migrations");
-                runner.ForDatabaseLayers(new SortedList<int, DatabaseScriptType>
-                {
-                    {2, DatabaseScriptType.SqlFunction},
-                    {3, DatabaseScriptType.SqlStoredProcedure},
-                    {1, DatabaseScriptType.SqlDataAndStructure}
-                });
-                runner.ForMigrationAssembly(typeof(Program).Assembly);
-                runner.Process();
-                Console.ReadKey();
+                //var runner = ExtMigrationRunner.Initialize();
+                //runner.ForDatabases(new SortedList<int, string> { { 1, "MovieStore" }, { 2, "InventoryDb" } });
+                //runner.ForRootNamespace("DatabaseMigrateRunner.Migrations");
+                //runner.ForDatabaseLayers(new SortedList<int, DatabaseScriptType>
+                //{
+                //    {2, DatabaseScriptType.SqlFunction},
+                //    {3, DatabaseScriptType.SqlStoredProcedure},
+                //    {1, DatabaseScriptType.SqlDataAndStructure}
+                //});
+                //runner.ForMigrationAssembly(typeof(Program).Assembly);
+                //runner.Process();
+                //Console.ReadKey();

                 #endregion

                 #region Run migrate with some tricks [THIS'S THE RECOMMENDED]

-                //var runner = ExtMigrationRunner.Initialize();
+                var runner = ExtMigrationRunner.Initialize();

-                //while (true)
-                //{
-                //    Logger.Info("Do you really want to run <type 'yes' to run>: ");
-                //    var result = Console.ReadLine();
-                //    if (!string.IsNullOrWhiteSpace(result))
-                //    {
-                //        Logger.Info("Your answer: " + result);
-                //        Logger.Info("");
-                //        Logger.Info("");
-                //        switch (result.ToLower().Trim())
-                //        {
-                //            case "ok":
-                //            case "yes":
-                //                runner.Process(true);
-                //                Logger.Info("Completed!");
-                //                break;
-                //            case "exit":
-                //            case "quit":
-                //            case "close":
-                //                Logger.Info("\n---------------------------------");
-                //                Logger.Info("System is closing, please wait...");
-                //                return;
-                //        }
-                //    }
-                //}
+                while (true)
+                {
+                    Logger.Info("Do you really want to run <type 'yes' to run>: ");
+                    var result = Console.ReadLine();
+                    if (!string.IsNullOrWhiteSpace(result))
+                    {
+                        Logger.Info("Your answer: " + result);
+                        Logger.Info("");
+                        Logger.Info("");
+                        switch (result.ToLower().Trim())
+                        {
+                            case "ok":
+                            case "yes":
+                                runner.Process(true);
+                                Logger.Info("Completed!");
+                                break;
+                            case "exit":
+                            case "quit":
+                            case "close":
+                                Logger.Info("\n---------------------------------");
+                                Logger.Info("System is closing, please wait...");
+                                return;
+                        }
+                    }
+                }

                 #endregion
             }


Changes complicated backed properties with auto-properties.

Latest code contracts does the right thing with auto-properties.  Still sucks that it can't be marked as readonly.  :(

--- Zoltu.Versioning/VersionTag.cs
+++ Zoltu.Versioning/VersionTag.cs
@@ -8,40 +8,17 @@
 	{
 		private static Regex tagMatcher = new Regex(@"^v(?<Major>\d+).(?<Minor>\d+)(?:-(?<Suffix>.+))?$", RegexOptions.Compiled | RegexOptions.ExplicitCapture);

-		public Int32 MajorVersion
-		{
-			get
-			{
-				Contract.Ensures(Contract.Result<Int32>() >= 0);
-				return _majorVersion;
-			}
-		}
-		private readonly Int32 _majorVersion;
+		public Int32 MajorVersion { get; private set; }

-		public Int32 MinorVersion
-		{
-			get
-			{
-				Contract.Ensures(Contract.Result<Int32>() >= 0);
-				return _minorVersion;
-			}
-		}
-		private readonly Int32 _minorVersion;
+		public Int32 MinorVersion { get; private set; }

-		public String Suffix
-		{
-			get
-			{
-				return _suffix;
-			}
-		}
-		private readonly String _suffix;
+		public String Suffix { get; private set; }

 		[ContractInvariantMethod]
 		private void ContractInvariants()
 		{
-			Contract.Invariant(_majorVersion >= 0);
-			Contract.Invariant(_minorVersion >= 0);
+			Contract.Invariant(MajorVersion >= 0);
+			Contract.Invariant(MinorVersion >= 0);
 		}

 		public VersionTag(Tag tag, Int32 majorVersion, Int32 minorVersion, String suffix) : base(tag.Name, tag.Sha)
@@ -50,9 +27,9 @@
 			Contract.Requires(majorVersion >= 0);
 			Contract.Requires(minorVersion >= 0);

-			_majorVersion = majorVersion;
-			_minorVersion = minorVersion;
-			_suffix = suffix;
+			MajorVersion = majorVersion;
+			MinorVersion = minorVersion;
+			Suffix = suffix;
 		}

 		public static VersionTag TryCreate(Tag tag)


add toggle functionality into the ahelp window method

--- UnityProject/Assets/Scripts/Chat/ChatUI.cs
+++ UnityProject/Assets/Scripts/Chat/ChatUI.cs
@@ -827,6 +827,13 @@
 	public void OnAdminHelpButton()
 	{
 		CloseChatWindow();
-		adminHelpChat.gameObject.SetActive(true);
+		if (adminHelpChat.gameObject.activeInHierarchy)
+		{
+			adminHelpChat.gameObject.SetActive(false);
+		}
+		else
+		{
+			adminHelpChat.gameObject.SetActive(true);
+		}
 	}
 }


marouans ding

marouans ding

--- UserInterface_Mockup_ICT4Reals/MainForm.cs
+++ UserInterface_Mockup_ICT4Reals/MainForm.cs
@@ -162,82 +162,9 @@
                 rail = t.Rail;

                 string id = Convert.ToString(rail.Id);
-                Control c = groupBox1.Controls.Find(id, true).FirstOrDefault();
+                Control c = groupBox1.Controls.Find("spoor" + id, true).FirstOrDefault();
                 c.Text = Convert.ToString(t.Id);
                 c.BackColor = Color.DimGray;
-                /*
-                switch (rail.Id)
-                {
-                    case 1201:
-                        spoor1201.Text = Convert.ToString(t.Id);
-                        spoor1201.BackColor = Color.DimGray;
-                        break;
-                    case 1301:
-                        spoor1301.Text = Convert.ToString(t.Id);
-                        spoor1301.BackColor = Color.DimGray;
-                        break;
-                    case 1401:
-                        spoor1401.Text = Convert.ToString(t.Id);
-                        spoor1401.BackColor = Color.DimGray;
-                        break;
-                    case 1501:
-                        spoor1501.Text = Convert.ToString(t.Id);
-                        spoor1501.BackColor = Color.DimGray;
-                        break;
-                    case 1601:
-                        spoor1601.Text = Convert.ToString(t.Id);
-                        spoor1601.BackColor = Color.DimGray;
-                        break;
-                    case 1701:
-                        spoor1701.Text = Convert.ToString(t.Id);
-                        spoor1701.BackColor = Color.DimGray;
-                        break;
-                    case 1801:
-                        spoor1801.Text = Convert.ToString(t.Id);
-                        spoor1801.BackColor = Color.DimGray;
-                        break;
-                    case 1901:
-                        spoor1901.Text = Convert.ToString(t.Id);
-                        spoor1901.BackColor = Color.DimGray;
-                        break;
-                    case 2001:
-                        spoor2001.Text = Convert.ToString(t.Id);
-                        spoor2001.BackColor = Color.DimGray;
-                        break;
-                    case 2101:
-                        spoor2101.Text = Convert.ToString(t.Id);
-                        spoor2101.BackColor = Color.DimGray;
-                        break;
-                    case 3001:
-                        spoor3001.Text = Convert.ToString(t.Id);
-                        spoor3001.BackColor = Color.DimGray;
-                        break;
-                    case 3002:
-                        spoor3002.Text = Convert.ToString(t.Id);
-                        spoor3002.BackColor = Color.DimGray;
-                        break;
-                    case 3003:
-                        spoor3003.Text = Convert.ToString(t.Id);
-                        spoor3003.BackColor = Color.DimGray;
-                        break;
-                    case 3101:
-                        spoor3101.Text = Convert.ToString(t.Id);
-                        spoor3101.BackColor = Color.DimGray;
-                        break;
-                    case 3102:
-                        spoor3102.Text = Convert.ToString(t.Id);
-                        spoor3102.BackColor = Color.DimGray;
-                        break;
-                    case 3103:
-                        spoor3103.Text = Convert.ToString(t.Id);
-                        spoor3103.BackColor = Color.DimGray;
-                        break;
-                    case 3201:
-                        spoor1201.Text = Convert.ToString(t.Id);
-                        spoor1201.BackColor = Color.DimGray;
-                        break;
-
-                }*/
             }

         }


Changes ?

Changes ?

--- WarframeMarketClient/Logic/SaveLoadFile.cs
+++ WarframeMarketClient/Logic/SaveLoadFile.cs
@@ -120,8 +120,8 @@
         /// </summary>
         public void Save()
         {
-
-            GZipStream WriteStream = new GZipStream(new FileStream(FilePath, FileMode.Create),CompressionLevel.Optimal);
+
+            DeflateStream WriteStream = new DeflateStream(new FileStream(FilePath, FileMode.Create),CompressionLevel.Optimal);
             BinaryFormatter saver = new BinaryFormatter();
             saver.Serialize(WriteStream, dat);
             WriteStream.Close();
@@ -141,7 +141,8 @@
             if (!File.Exists(FilePath)) return;
             try
             {
-                GZipStream ReadStream = new GZipStream(new FileStream(FilePath, FileMode.Open), CompressionMode.Decompress);
+
+                DeflateStream ReadStream = new DeflateStream(new FileStream(FilePath, FileMode.Open), CompressionMode.Decompress);
                 BinaryFormatter Loader = new BinaryFormatter();
                 dat = (Data)Loader.Deserialize(ReadStream);
                 ReadStream.Close();


update

update

--- WebApiDemo/Controllers/UploadController.cs
+++ WebApiDemo/Controllers/UploadController.cs
@@ -43,21 +43,23 @@

     public class UploadController : ApiController
     {
-        //[HttpGet]
-        //public IHttpActionResult Get(string imagePath)
-        //{
-        //    var uploadFolder = "~/App_Data/Tmp/FileUploads"; // you could put this to web.config
-        //    var root = HttpContext.Current.Server.MapPath(uploadFolder);
-        //    var serverPath = Path.Combine(root, imagePath);
-        //    var fileInfo = new FileInfo(serverPath);
+        [HttpGet]
+        public IHttpActionResult Get(string imagePath)
+        {
+            var uploadFolder = "~/App_Data/Tmp/FileUploads"; // you could put this to web.config
+            var root = HttpContext.Current.Server.MapPath(uploadFolder);
+            var serverPath = Path.Combine(root, imagePath);
+            var fileInfo = new FileInfo(serverPath);

-        //    return !fileInfo.Exists
-        //        ? (IHttpActionResult)NotFound()
-        //        : new FileResult(fileInfo.FullName);
-        //}
+            return !fileInfo.Exists
+                ? (IHttpActionResult)NotFound()
+                : new FileResult(fileInfo.FullName);
+        }
+
         [HttpGet]
         public HttpResponseMessage Get()
         {
+
             var uploadFolder = "~/App_Data/Tmp/FileUploads"; // you could put this to web.config
             var root = HttpContext.Current.Server.MapPath(uploadFolder);
             var path = Path.Combine(root, "BodyPart_0259dcd2-b4fd-4777-82c8-bda3272f7e9d.png");


remove c# 6 syntax

remove c# 6 syntax

--- WebApiProxy.Tasks/Models/GenerateConfig.cs
+++ WebApiProxy.Tasks/Models/GenerateConfig.cs
@@ -13,11 +13,16 @@

         public class ServiceConfig
         {
+            public ServiceConfig()
+            {
+                ClientSuffix = "Client";
+            }
+
             public string ProxyEndpoint { get; set; }
             public string Namespace { get; set; }
             public string Name { get; set; }

-            public string ClientSuffix { get; set; } = "Client";
+            public string ClientSuffix { get; set; }

             public bool IncludeValidation { get; set; }
             public bool EnsureSuccess { get; set; }


Replace "Report a bug" button with UserVoice link

--- WebEditor/WebEditor/Views/Edit/Game.cshtml
+++ WebEditor/WebEditor/Views/Edit/Game.cshtml
@@ -109,10 +109,18 @@
     }
 </script>

+
+

         <button type="button" id="button-help">Help</button>
-        <button type="button" id="button-bug">Report a bug</button>
         <button type="button" id="button-settings">Settings</button>


Added repeat logic to the Create screen

Added repeat logic to the Create screen

--- WhatShouldIDoNow/Views/Tasks/Create.cshtml
+++ WhatShouldIDoNow/Views/Tasks/Create.cshtml
@@ -19,10 +19,21 @@

-
+            Does your task repeat?

-                <input asp-for="IntervalByHour" class="form-control" />
-
+
<input class="intervalRadios" type="radio" name="interval" value="0" checked /> Don't Repeat

+
<input class="intervalRadios" type="radio" name="interval" value="24" /> Daily

+
<input class="intervalRadios" type="radio" name="interval" value="168" /> Weekly

+
<input class="intervalRadios" type="radio" name="interval" value="672" /> 4 Weeks

+

+
+                        <input class="intervalRadios" type="radio" name="interval" value="-1" id="customInterval" /> Custom
+
+
+                        <input asp-for="IntervalByHour" disabled /> (hours)
+
+
+

@@ -37,3 +48,25 @@
     Back to List

+


Simplify Autofac setup

Simplify Autofac setup

--- WindowsStore/ViewModel/ViewModelLocator.cs
+++ WindowsStore/ViewModel/ViewModelLocator.cs
@@ -34,18 +34,15 @@

             var manuallyAddedTypes = new[]
             {
-                typeof(DesignDocumentService),
-                typeof(DocumentService),
-                typeof(PageExtractorListService),
-                typeof(PdfPageExtractorService),
-                typeof(ImagePageExtractorService),
+                typeof(IDocumentService),
+                typeof(IPageExtractorService)
             };

             var thisAssembly = typeof(ViewModelLocator).GetTypeInfo().Assembly;

             builder.RegisterAssemblyTypes(thisAssembly)
                 .Where(t => t.Name.EndsWith("Service"))
-                .Where(t => !manuallyAddedTypes.Contains(t))
+                .Where(t => !t.GetTypeInfo().ImplementedInterfaces.Intersect(manuallyAddedTypes).Any())
                 .AsImplementedInterfaces()
                 .SingleInstance();


typed ints in DecimalSerializer

typed ints in DecimalSerializer

--- Wire/ValueSerializers/DecimalSerializer.cs
+++ Wire/ValueSerializers/DecimalSerializer.cs
@@ -16,10 +16,10 @@
         public override void WriteValue(Stream stream, object value, SerializerSession session)
         {
             var data = decimal.GetBits((decimal) value);
-            Int32Serializer.Instance.WriteValue(stream, (object)data[0], session);
-            Int32Serializer.Instance.WriteValue(stream, (object)data[1], session);
-            Int32Serializer.Instance.WriteValue(stream, (object)data[2], session);
-            Int32Serializer.Instance.WriteValue(stream, (object)data[3], session);
+            Int32Serializer.WriteValue(stream, data[0], session);
+            Int32Serializer.WriteValue(stream, data[1], session);
+            Int32Serializer.WriteValue(stream, data[2], session);
+            Int32Serializer.WriteValue(stream, data[3], session);
         }

         public override object ReadValue(Stream stream, SerializerSession session)


[WPF] Return false for unknown clipboard types available

--- Xwt.WPF/Xwt.WPFBackend/ClipboardBackend.cs
+++ Xwt.WPF/Xwt.WPFBackend/ClipboardBackend.cs
@@ -90,8 +90,8 @@
 			}
 			if (type == TransferDataType.Rtf)
 				return WindowsClipboard.ContainsText (TextDataFormat.Rtf);
-
-			throw new NotImplementedException();
+
+			return false;
 		}

 		public object GetData (TransferDataType type)


Remove TryAdd check.

Remove TryAdd check.

It should be enough withe the lock to ensure that the dictionary doesn't contains the key.

--- src/Yarhl/IO/DataStream.cs
+++ src/Yarhl/IO/DataStream.cs
@@ -602,8 +602,7 @@

             lock (BaseStream.LockObj) {
                 if (!Instances.ContainsKey(BaseStream)) {
-                    if (!Instances.TryAdd(BaseStream, 1))
-                        Instances[BaseStream] += 1;
+                    Instances.TryAdd(BaseStream, 1);
                 } else {
                     Instances[BaseStream] += 1;
                 }


Added cancellation support to the IpfsDiag class

Added cancellation support to the methods that end up calling ExecuteGetAsync and ExecutePostAsync

--- src/Ipfs/Commands/IpfsDiag.cs
+++ src/Ipfs/Commands/IpfsDiag.cs
@@ -3,6 +3,7 @@
 using System.Net.Http;
 using System.Threading.Tasks;
 using Ipfs.Json;
+using System.Threading;

 namespace Ipfs.Commands
 {
@@ -46,8 +47,9 @@
         /// </summary>
         /// <param name="timeout">diagnostic timeout duration</param>
         /// <param name="vis">output vis. one of: d3, dot. Default d3</param>
+        /// <param name="cancellationToken">Token allowing you to cancel the request</param>
         /// <returns>UTF-8 encoded byte array of text, d3 or dot format of network graph, depending on vis parameter</returns>
-        public async Task<byte[]> Net(string timeout = null, IpfsVis? vis = null)
+        public async Task<byte[]> Net(string timeout = null, IpfsVis? vis = null, CancellationToken cancellationToken = default(CancellationToken))
         {
             var flags = new Dictionary<string, string>();

@@ -75,7 +77,7 @@
                 flags.Add("vis", visValue);
             }

-            HttpContent content = await ExecuteGetAsync("net", flags);
+            HttpContent content = await ExecuteGetAsync("net", flags, cancellationToken);

             return await content.ReadAsByteArrayAsync();
         }


Restart game

Restart game

Implemented restarting the game

--- src/Minesweeper.Logic/Game.cs
+++ src/Minesweeper.Logic/Game.cs
@@ -12,6 +12,7 @@
         private const string GameWelcomeText = "Welcome to the game Minesweeper. Try to reveal all cells without mines. Use 'top' to view the scoreboard, 'restart' to start a new game and 'exit' to quit the game.";
         private const string InvalidCoordinatesText = "Illegal move";
         private const string GameEndMessage = "Your score: ";
+        private const string RestartMessage = "Press 'enter' for new game";

         private static volatile Game gameInstance;
         private static object lockThis = new object();
@@ -95,10 +96,6 @@
                         this.gameStatus = GameStatus.Restart;
                         break;

-                    case GameStatus.Restart:
-                        this.StartNewGame();
-                        break;
-
                     case GameStatus.YouWin:
                         this.printer.PrintPlayingField(this.gameBoard, this.gameStatus);
                         Console.WriteLine("Congratulations General, you won the game!");
@@ -108,7 +105,13 @@
                     default:
                         throw new Exception("Invalid game state!");
                 }
+
             }
+            Console.WriteLine("{0}",RestartMessage);
+            Console.ReadLine();
+            Console.Clear();
+            this.gameStatus = GameStatus.GameOn;
+            this.StartNewGame();
         }
     }
 }


Update MusicStore SPA

Update MusicStore SPA

--- src/MusicStore.Spa/Startup.cs
+++ src/MusicStore.Spa/Startup.cs
@@ -22,7 +22,7 @@
                 .AddJsonFile("Config.json")
                 .AddEnvironmentVariables();

-            app.UseServices(services =>
+            app.UsePerRequestServices(services =>
             {
                 // Add options accessors to the service container
                 services.SetupOptions<IdentityDbContextOptions>(options =>


remove code duplication

remove code duplication

double checked with textdiff

--- src/NLog/Layouts/CsvLayout.cs
+++ src/NLog/Layouts/CsvLayout.cs
@@ -172,56 +172,9 @@
             for (int i = 0; i < this.Columns.Count; i++)
             {
                 CsvColumn col = this.Columns[i];
-                if (i != 0)
-                {
-                    sb.Append(this.actualColumnDelimiter);
-                }
-
-                bool useQuoting;
                 string text = col.Layout.Render(logEvent);

-                switch (this.Quoting)
-                {
-                    case CsvQuotingMode.Nothing:
-                        useQuoting = false;
-                        break;
-
-                    case CsvQuotingMode.All:
-                        useQuoting = true;
-                        break;
-
-                    default:
-                    case CsvQuotingMode.Auto:
-                        if (text.IndexOfAny(this.quotableCharacters) >= 0)
-                        {
-                            useQuoting = true;
-                        }
-                        else
-                        {
-                            useQuoting = false;
-                        }
-
-                        break;
-                }
-
-                if (useQuoting)
-                {
-                    sb.Append(this.QuoteChar);
-                }
-
-                if (useQuoting)
-                {
-                    sb.Append(text.Replace(this.QuoteChar, this.doubleQuoteChar));
-                }
-                else
-                {
-                    sb.Append(text);
-                }
-
-                if (useQuoting)
-                {
-                    sb.Append(this.QuoteChar);
-                }
+                RenderCol(sb, i, text);
             }
         }

@@ -246,56 +199,68 @@
             for (int i = 0; i < this.Columns.Count; i++)
             {
                 CsvColumn col = this.Columns[i];
-                if (i != 0)
-                {
-                    sb.Append(this.actualColumnDelimiter);
-                }
-
-                bool useQuoting;
                 string text = col.Name;

-                switch (this.Quoting)
-                {
-                    case CsvQuotingMode.Nothing:
+                RenderCol(sb, i, text);
+            }
+        }
+
+        /// <summary>
+        /// Render 1 columnvalue (text or header) to <paramref name="sb"/>
+        /// </summary>
+        /// <param name="sb">write-to</param>
+        /// <param name="columnIndex">current col index</param>
+        /// <param name="columnValue">col text</param>
+        private void RenderCol(StringBuilder sb, int columnIndex, string columnValue)
+        {
+            if (columnIndex != 0)
+            {
+                sb.Append(this.actualColumnDelimiter);
+            }
+
+            bool useQuoting;
+
+            switch (this.Quoting)
+            {
+                case CsvQuotingMode.Nothing:
+                    useQuoting = false;
+                    break;
+
+                case CsvQuotingMode.All:
+                    useQuoting = true;
+                    break;
+
+                default:
+                case CsvQuotingMode.Auto:
+                    if (columnValue.IndexOfAny(this.quotableCharacters) >= 0)
+                    {
+                        useQuoting = true;
+                    }
+                    else
+                    {
                         useQuoting = false;
-                        break;
-
-                    case CsvQuotingMode.All:
-                        useQuoting = true;
-                        break;
-
-                    default:
-                    case CsvQuotingMode.Auto:
-                        if (text.IndexOfAny(this.quotableCharacters) >= 0)
-                        {
-                            useQuoting = true;
-                        }
-                        else
-                        {
-                            useQuoting = false;
-                        }
-
-                        break;
-                }
-
-                if (useQuoting)
-                {
-                    sb.Append(this.QuoteChar);
-                }
-
-                if (useQuoting)
-                {
-                    sb.Append(text.Replace(this.QuoteChar, this.doubleQuoteChar));
-                }
-                else
-                {
-                    sb.Append(text);
-                }
-
-                if (useQuoting)
-                {
-                    sb.Append(this.QuoteChar);
-                }
+                    }
+
+                    break;
+            }
+
+            if (useQuoting)
+            {
+                sb.Append(this.QuoteChar);
+            }
+
+            if (useQuoting)
+            {
+                sb.Append(columnValue.Replace(this.QuoteChar, this.doubleQuoteChar));
+            }
+            else
+            {
+                sb.Append(columnValue);
+            }
+
+            if (useQuoting)
+            {
+                sb.Append(this.QuoteChar);
             }
         }


Remove redundant offset check (now handled in GetOffsetFromLocal) and changed internal structure - we now maintain a LocalInstant and an Offset instead of just an Instant. This makes the type slightly bigger, but is conceptually cleaner - and is likely to increase efficiency as so many properties rely on the local instant.

--- src/NodaTime/ZonedDateTime.cs
+++ src/NodaTime/ZonedDateTime.cs
@@ -38,16 +38,18 @@
     /// </remarks>
     public struct ZonedDateTime
     {
-        private readonly Instant instant;
+        private readonly LocalInstant localInstant;
         private readonly Chronology chronology;
+        private readonly Offset offset;

         public ZonedDateTime(LocalDateTime localDateTime, IDateTimeZone zone)
         {
             if (zone == null)
             {
                 throw new ArgumentNullException("zone");
-            }
-            instant = ConvertLocalToUtc(localDateTime.LocalInstant, zone);
+            }
+            localInstant = localDateTime.LocalInstant;
+            offset = zone.GetOffsetFromLocal(localInstant);
             chronology = new Chronology(zone, localDateTime.Calendar);
         }

@@ -57,7 +59,8 @@
             {
                 throw new ArgumentNullException("chronology");
             }
-            this.instant = instant;
+            offset = chronology.Zone.GetOffsetFromUtc(instant);
+            localInstant = instant + offset;
             this.chronology = chronology;
         }

@@ -104,17 +107,9 @@
             {
                 throw new ArgumentNullException("chronology");
             }
-            LocalInstant localInstant = chronology.Calendar.GetLocalInstant(year, month, day, hour, minute, second, millisecond, tick);
-            instant = ConvertLocalToUtc(localInstant, chronology.Zone);
+            localInstant = chronology.Calendar.GetLocalInstant(year, month, day, hour, minute, second, millisecond, tick);
+            offset = chronology.Zone.GetOffsetFromLocal(localInstant);
             this.chronology = chronology;
-        }
-
-        private static Instant ConvertLocalToUtc(LocalInstant localInstant, IDateTimeZone zone)
-        {
-            // This call will throw SkippedTimeException if necessary
-            Offset offset = zone.GetOffsetFromLocal(localInstant);
-            Instant instant = localInstant - offset;
-            return instant;
         }

         /// <summary>
@@ -128,7 +123,7 @@
         /// </remarks>
         public Instant ToInstant()
         {
-            return instant;
+            return localInstant - offset;
         }

         /// <summary>
@@ -138,7 +133,7 @@

         public IDateTimeZone Zone { get { return Chronology.Zone; } }

-        public LocalInstant LocalInstant { get { return instant + Zone.GetOffsetFromUtc(instant); } }
+        public LocalInstant LocalInstant { get { return localInstant; } }

         public LocalDateTime LocalDateTime { get { return new LocalDateTime(LocalInstant, chronology.Calendar); } }


Fix for error on not found or redirect

Fix for error on not found or redirect

--- src/Red-Folder.com/Startup.cs
+++ src/Red-Folder.com/Startup.cs
@@ -90,12 +90,18 @@
             // Add CSP
             app.Use(async (context, next) =>
             {
-                context.Response.Headers.Add(
-                    "Content-Security-Policy-Report-Only",
-                    "default-src 'none'; " +
-                    "form-action 'none'; " +
-                    "frame-ancestors 'none'; " +
-                    "report-uri https://redfolder.report-uri.com/r/d/csp/wizard");
+                var key = "Content-Security-Policy-Report-Only";
+
+                // Don't add if already exists - otherwise you'll get 500's
+                if (!context.Response.Headers.ContainsKey(key))
+                {
+                    context.Response.Headers.Add(
+                        key,
+                        "default-src 'none'; " +
+                        "form-action 'none'; " +
+                        "frame-ancestors 'none'; " +
+                        "report-uri https://redfolder.report-uri.com/r/d/csp/wizard");
+                }

                 await next();
             });


Added better startup error logging

Added better startup error logging

--- src/Rs317.Client.WF/Client.cs
+++ src/Rs317.Client.WF/Client.cs
@@ -11909,7 +11909,7 @@
 			}
 			catch(Exception exception)
 			{
-				signlink.reporterror("loaderror " + loadingBarText + " " + loadingBarPercentage);
+				signlink.reporterror($"Error loading. During: {loadingBarText} State: {loadingBarPercentage}% Reason: {exception.Message} \n\n Stack: {exception.StackTrace}");
 			}

 			loadingError = true;


RPCGen Generator GenerateDataObjectClass now receives an extra parameter to the Reference base class.

--- src/Tools/RPCGen/Generator.cs
+++ src/Tools/RPCGen/Generator.cs
@@ -31,12 +31,12 @@
             GenerateUsings();
             var className = GetStubsClassName(type, false);
             var parameters = ConvertFieldToParametersList(type);
-            GenerateDataObjectClass(className, parameters, type.Namespace, true);
+            GenerateDataObjectClass(className, parameters, type.Namespace, true, PrettyName(type));

             return type.Namespace + "." + className;
         }

-        private void GenerateDataObjectClass(string className, List<Parameter> parameters, string @namespace, bool isObservable)
+        private void GenerateDataObjectClass(string className, List<Parameter> parameters, string @namespace, bool isObservable, string origClassName = "")
         {
             if (@namespace != null)
             {
@@ -51,7 +51,7 @@
             // Generate fields
             if (isObservable)
             {
-                WriteLine("public class Reference : {0}, IDataObjectReference", className);
+                WriteLine("public class Reference : {0}, IDataObjectReference", origClassName);
                 WriteStartBraceIndent();
                 WriteLine("public RPCPeer Peer { get; private set; }");
                 WriteLine("public int RemoteId { get; private set; }");


1173.1: depth analysis2

1173.1: depth analysis2

--- a_mini/projects/BuildTextureFonts/Form1.cs
+++ a_mini/projects/BuildTextureFonts/Form1.cs
@@ -144,6 +144,90 @@
         {
             int i = 0;
             int p = 0;
+
+            List<int> pxCollection = new List<int>();
+            bool glyphArea = false;
+            for (int row = 0; row < bmpHeight; ++row)
+            {
+                glyphArea = false;
+                pxCollection.Clear();
+                //int prevLevel = 0;
+                //int currentStripLen = 0;
+                //row
+                for (int c = 0; c < bmpWidth; ++c)
+                {
+                    int pixel = intBuffer[i];
+                    int a = (pixel >> 24) & 0xff;
+                    int b = (pixel >> 16) & 0xff;
+                    int g = (pixel >> 8) & 0xff;
+                    int r = (pixel >> 8) & 0xff;
+                    //convert to grey scale
+                    int level = (int)((0.2126 * r) + (0.7152 * g) + (0.0722) * b);
+                    //int luminosity method;
+                    // R' = G' = B' = 0.2126R + 0.7152G + 0.0722B
+
+                    if (level > 0)
+                    {
+                        //this enter glyph area
+                        if (!glyphArea)
+                        {
+                            //just  enter the glyph area
+                            //clear existing data in collection strip
+                            if (pxCollection.Count > 0)
+                            {
+                                FillDataXAxis(distanceBuffer, p, pxCollection.Count, false);
+                            }
+                            pxCollection.Clear();
+                            pxCollection.Add(level);
+                            glyphArea = true;
+                            p = i;
+                        }
+                        else
+                        {
+                            //we alreary in glyph area
+                            //so collect strip len
+                            pxCollection.Add(level);
+                        }
+
+                    }
+                    else
+                    {
+                        //now we are not in glyph area
+                        if (!glyphArea)
+                        {
+                            //already not in glyph area
+                            pxCollection.Add(level);
+                        }
+                        else
+                        {
+
+                            //just exit glyph area
+                            if (pxCollection.Count > 0)
+                            {
+                                FillDataXAxis(distanceBuffer, p, pxCollection.Count, true);
+                            }
+                            pxCollection.Clear();
+                            pxCollection.Add(level);
+                            glyphArea = false;
+                            p = i;
+                        }
+                    }
+                    ++i;
+                }
+                //---------------------------
+                //exit
+                //fill remaining databack
+                if (pxCollection.Count > 0)
+                {
+                    FillDataXAxis(distanceBuffer, p, pxCollection.Count, glyphArea);
+                    p = i;
+                }
+            }
+        }
+        static void DepthAnalysisXAxis2(int[] intBuffer, int bmpWidth, int bmpHeight, int[] distanceBuffer)
+        {
+            int i = 0;
+            int p = 0;
             for (int row = 0; row < bmpHeight; ++row)
             {
                 int prevLevel = 0;


Committing half-working code.

Committing half-working code.

--- ARGame/Assets/Scripts/RemoteLocalUI.cs
+++ ARGame/Assets/Scripts/RemoteLocalUI.cs
@@ -7,33 +7,72 @@
 //     see http://opensource.org/licenses/MIT for the full license.
 // </copyright>
 //----------------------------------------------------------------------------
-using UnityEngine;
-using Network;
 using System;
 using System.Collections;
+using System.Net;
+using Network;
+using UnityEngine;

+/// <summary>
+/// Small script that creates a UI useful for selecting between being a local or remote player.
+/// </summary>
 public class RemoteLocalUI : MonoBehaviour
 {
     public static string ip = "";
+    private bool enteredOnce = false;
+    private bool invalid = false;

     public void OnGUI()
     {
         // Make a background box
         GUI.Box(new Rect(10, 10, 150, 90), "Loader Menu");
         GUI.Box(new Rect(10, 110, 150, 90), "Enter IP");
+        if(!enteredOnce)
+        {
+            GUI.Box(new Rect(170, 10, 200, 190), "Please enter a valid IP.");
+        }

         ip = GUI.TextField(new Rect(20, 130, 130, 60), ip);

         // Make the first button. If it is pressed, Application.Loadlevel (1) will be executed
         if (GUI.Button(new Rect(20, 40, 130, 20), "Local"))
         {
-            Application.LoadLevel(1);
+            enteredOnce = true;
+            invalid = !CheckIPValid(ip);
+            if (invalid)
+            {
+                return;
+            }
+            else
+            {
+                Application.LoadLevel(1);
+            }
         }

         // Make the second button.
         if (GUI.Button(new Rect(20, 70, 130, 20), "Remote"))
         {
-            Application.LoadLevel(2);
+            enteredOnce = true;
+            invalid = !CheckIPValid(ip);
+            if (invalid)
+            {
+                return;
+            }
+            else
+            {
+                Application.LoadLevel(2);
+            }
         }
     }
+
+    public bool CheckIPValid(String strIP)
+    {
+        IPAddress[] addresses = Dns.GetHostEntry(strIP).AddressList;
+        if (addresses.Length == 0)
+        {
+            return false;
+        }
+
+        return true;
+    }
 }


experimental implementation of realtime report generator

--- AppMetrics.Analytics/GetReport.ashx.cs
+++ AppMetrics.Analytics/GetReport.ashx.cs
@@ -15,11 +15,14 @@
 	{
 		public void ProcessRequest(HttpContext context)
 		{
-			InitProcessing();
-
 			context.Response.ContentType = "text/plain";
 			lock (Sync)
 			{
+				if (string.IsNullOrEmpty(_reportText) || DateTime.UtcNow - _lastUpdate > UpdatePeriod)
+				{
+					CreateReport();
+					_lastUpdate = DateTime.UtcNow;
+				}
 				context.Response.Write(_reportText);
 			}
 		}
@@ -32,45 +35,30 @@
 			}
 		}

-		static void InitProcessing()
+		static void CreateReport()
 		{
+			var watch = Stopwatch.StartNew();
+
+			var dataPath = AppSettings.DataStoragePath + @"\CIAPI.CS.Excel";
+			var period = TimeSpan.FromHours(1);
+			var sessions = LogReader.Parse(dataPath, period);
+
+			var convertor = new StatsBuilder();
+			var res = convertor.Process(sessions);
+
+			var latencyReport = Report.GetLatencyStatSummariesReport(res);
 			lock (Sync)
 			{
-				if (_workerThread == null)
-				{
-					_workerThread = new Thread(ThreadStart);
-					_workerThread.Start();
-				}
+				_reportText = latencyReport;
 			}
+
+			watch.Stop();
+			Trace.WriteLine(watch.Elapsed.TotalSeconds);
 		}

-		static void ThreadStart()
-		{
-			while (true)
-			{
-				try
-				{
-					CreateReport();
-					Thread.Sleep(100);
-				}
-				catch (ThreadAbortException)
-				{
-					break;
-				}
-				catch (Exception exc)
-				{
-					Trace.WriteLine(exc);
-				}
-			}
-		}
-
-		static void CreateReport()
-		{
-
-		}
-
-		private static Thread _workerThread;
 		private static readonly object Sync = new object();
 		private static string _reportText = "";
+		private static DateTime _lastUpdate;
+		private static readonly TimeSpan UpdatePeriod = TimeSpan.FromSeconds(10);
 	}
 }


Revert C# 7 syntax

Revert C# 7 syntax

--- Assets/Adjust/Editor/AdjustSettings.cs
+++ Assets/Adjust/Editor/AdjustSettings.cs
@@ -77,37 +77,37 @@

     public static bool IsPostProcessingEnabled
     {
-        get => Instance.isPostProcessingEnabled;
-        set => Instance.isPostProcessingEnabled = value;
+        get { return Instance.isPostProcessingEnabled; }
+        set { Instance.isPostProcessingEnabled = value; }
     }

     public static bool IsiOS14ProcessingEnabled
     {
-        get => Instance.isiOS14ProcessingEnabled;
-        set => Instance.isiOS14ProcessingEnabled = value;
+        get { return Instance.isiOS14ProcessingEnabled; }
+        set { Instance.isiOS14ProcessingEnabled = value; }
     }

     public static string iOSUserTrackingUsageDescription
     {
-        get => Instance._iOSUserTrackingUsageDescription;
-        set => Instance._iOSUserTrackingUsageDescription = value;
+        get { return Instance._iOSUserTrackingUsageDescription; }
+        set { Instance._iOSUserTrackingUsageDescription = value; }
     }

     public static string[] iOSUrlSchemes
     {
-        get => Instance._iOSUrlSchemes;
-        set => Instance._iOSUrlSchemes = value;
+        get { return Instance._iOSUrlSchemes; }
+        set { Instance._iOSUrlSchemes = value; }
     }

     public static string[] iOSUniversalLinksDomains
     {
-        get => Instance._iOSUniversalLinksDomains;
-        set => Instance._iOSUniversalLinksDomains = value;
+        get { return Instance._iOSUniversalLinksDomains; }
+        set { Instance._iOSUniversalLinksDomains = value; }
     }

     public static string[] AndroidUriSchemes
     {
-        get => Instance.androidUriSchemes;
-        set => Instance.androidUriSchemes = value;
+        get { return Instance.androidUriSchemes; }
+        set { Instance.androidUriSchemes = value; }
     }
 }


player can pick up only block objects

player can pick up only block objects

--- Assets/Source/Control/PlayerControl.cs
+++ Assets/Source/Control/PlayerControl.cs
@@ -88,7 +88,11 @@
         {
             RaycastHit2D hitInfo;
             this.target = GetTargetObject(out hitInfo);
-            if (this.target != null && this.GetComponent<Player>().hasObject(target) == false)
+            if (
+                this.target != null &&
+                target.CompareTag("GameBlock") == true &&
+                this.GetComponent<Player>().hasObject(target) == false
+               )
             {
                 this.dragging = true;


Made Beat a class

Made Beat a class

--- CodaProject/Assets/Scripts/Analyzer.cs
+++ CodaProject/Assets/Scripts/Analyzer.cs
@@ -3,14 +3,21 @@
 using System.Collections.Generic;
 using System.Linq;

-public struct Beat
-{
-    private float timeStamp;
-    private float frequency;
+public class Beat {
+    public readonly float timeStamp;
+    public readonly float frequency;
+    public readonly float energy;
+
+    Beat(float tStamp, float freq, float e) {
+        timeStamp = tStamp;
+        frequency = freq;
+        energy = e;
+    }
+
 }

 [System.Serializable]
-public class Analyzer{
+public class Analyzer {

 	public AudioClip clip;
 	private const float a0 = 0.35875f;


Update file naming scheme for LUTs

Update file naming scheme for LUTs

--- ConsoleApplication1/CrpDeserializer.cs
+++ ConsoleApplication1/CrpDeserializer.cs
@@ -125,7 +125,7 @@
             CrpAssetInfoHeader info = header.assets.Find(asset => asset.assetName.Contains(Consts.DATA_EXTENSION));

             //Generate a name for the file
-            string fileName = string.Format("{0}_{1}.png", StrUtils.limitStr(info.assetName), info.assetType.ToString());
+            string fileName = string.Format("{0}.png", StrUtils.limitStr(info.assetName), info.assetType.ToString());

             //Should be unnessecary in current version(stream pointer should already be at start of file),
             //but advance stream pointer to file position


Fixed crash during DDOS with unhandled exception

--- core/UserPool.cs
+++ core/UserPool.cs
@@ -3,6 +3,7 @@
 using System.Linq;
 using System.Text;
 using System.Net.Sockets;
+using core.ib0t;

 namespace core
 {
@@ -50,33 +51,48 @@

         public static void CreateAresClient(Socket sock, ulong time)
         {
-            for (ushort u = 0; u < ushort.MaxValue; u++)
+            try
             {
-                int index = AUsers.FindIndex(x => x.ID == u);
+                for (ushort u = 0; u < ushort.MaxValue; u++)
+                {
+                    int index = AUsers.FindIndex(x => x.ID == u);

-                if (index == -1)
-                {
-                    AUsers.Add(new AresClient(sock, time, u));
-                    AUsers.Sort((x, y) => x.ID.CompareTo(y.ID));
-                    break;
+                    if (index == -1)
+                    {
+                        AUsers.Add(new AresClient(sock, time, u));
+                        AUsers.Sort((x, y) => x.ID.CompareTo(y.ID));
+                        break;
+                    }
                 }
+            }
+            catch(Exception e)
+            {
+                ServerCore.Log(e.ToString());
             }
         }

         public static void CreateIb0tClient(AresClient client, ulong time)
         {
-            for (ushort u = 700; u < ushort.MaxValue; u++)
+            try
             {
-                int index = WUsers.FindIndex(x => x.ID == u);
+                for (ushort u = 700; u < ushort.MaxValue; u++)
+                {
+                    int index = WUsers.FindIndex(x => x.ID == u);

-                if (index == -1)
-                {
-                    WUsers.Add(new ib0t.ib0tClient(client, time, u));
-                    WUsers.Sort((x, y) => x.ID.CompareTo(y.ID));
-                    client.Sock = null;
-                    AUsers.RemoveAll(x => x.ID == client.ID);
-                    break;
+                    if (index == -1)
+                    {
+                        WUsers.Add(new ib0tClient(client, time, u));
+                        WUsers.Sort((x, y) => x.ID.CompareTo(y.ID));
+                        client.Sock = null;
+                        AUsers.RemoveAll(x => x.ID == client.ID);
+                        break;
+                    }
                 }
+            }
+            catch (Exception e)
+            {
+                ServerCore.Log(e.ToString());
+
             }
         }


WIP #AG41 - Fix DI registrations allowing types to be resolved as themselves

--- Agiil.Bootstrap/Data/DataModule.cs
+++ Agiil.Bootstrap/Data/DataModule.cs
@@ -14,30 +14,37 @@
     {
       builder
         .RegisterType<NHibernateQuery>()
+        .AsSelf()
         .As<IQuery>();

       builder
         .RegisterType<NHibernatePersister>()
+        .AsSelf()
         .As<IPersister>();

       builder
         .RegisterType<NHibernateSchemaExportingDatabaseCreator>()
+        .AsSelf()
         .As<IDatabaseCreator>();

       builder
         .RegisterType<DevelopmentInitialDataCreator>()
+        .AsSelf()
         .As<IInitialDataCreator>();

       builder
         .RegisterType<EntityData>()
+        .AsSelf()
         .As<IEntityData>();

       builder
         .RegisterType<TransactionCreator>()
+        .AsSelf()
         .As<ITransactionCreator>();

       builder
         .RegisterType<HardcodedDatabaseConfiguration>()
+        .AsSelf()
         .As<IDatabaseConfiguration>();
     }
   }


convert post date to LocalDateTime from UTC

--- Form1.cs
+++ Form1.cs
@@ -90,7 +90,7 @@

                     // replace template fields
                     outputFile = outputFile.Replace("{{post-title}}", post.Title);
-                    outputFile = outputFile.Replace("{{post-date}}", post.PublishedAtUtc.ToString("MM/dd/yyyy hh:mm:ss tt"));
+                    outputFile = outputFile.Replace("{{post-date}}", post.PublishedAtUtc.LocalDateTime.ToString("MM/dd/yyyy hh:mm:ss tt"));
                     outputFile = outputFile.Replace("{{post-excerpt}}", post.Excerpt);
                     outputFile = outputFile.Replace("{{post-author}}", post.Author.DisplayName);
                     outputFile = outputFile.Replace("{{post-author-email}}", post.Author.Email);


a couple of null propagators

a couple of null propagators

--- Alluvial.ForItsCqrs/EventStream.cs
+++ Alluvial.ForItsCqrs/EventStream.cs
@@ -162,8 +162,8 @@
                 .Select(e => new EventStreamChange
                 {
                     AggregateId = e.Key,
-                    AggregateType = e.FirstOrDefault().StreamName,
-                    AbsoluteSequenceNumber = e.OrderByDescending(ee => ee.Id).FirstOrDefault().Id
+                    AggregateType = e.FirstOrDefault()?.StreamName,
+                    AbsoluteSequenceNumber = e.OrderByDescending(ee => ee.Id).FirstOrDefault()?.Id ?? 0
                 })
                 .OrderBy(e => e.AbsoluteSequenceNumber)
                 .ToArray();


Implemented normalization for \r #142

Implemented normalization for \r #142

--- AngleSharp/Parser/BaseTokenizer.cs
+++ AngleSharp/Parser/BaseTokenizer.cs
@@ -236,17 +236,15 @@
             if (_current == Symbols.LineFeed)
             {
                 _columns.Push(_column);
-                _column = 0;
+                _column = 1;
                 _row++;
             }
-
-            _column++;
-            _current = _source.ReadCharacter();
-
-            while (_current == Symbols.CarriageReturn)
-            {
-                _current = _source.ReadCharacter();
-            }
+            else
+            {
+                _column++;
+            }
+
+            _current = NormalizeForward(_source.ReadCharacter());
         }

         /// <summary>
@@ -264,21 +262,53 @@
                 return;
             }

-            _current = _source[_source.Index - 1];
-
-            if (_current == Symbols.CarriageReturn)
-            {
-                BackUnsafe();
-            }
-            else if (_current == Symbols.LineFeed)
+            var c = NormalizeBackward(_source[_source.Index - 1]);
+
+            if (c == Symbols.LineFeed)
             {
                 _column = _columns.Count != 0 ? _columns.Pop() : (UInt16)1;
                 _row--;
-            }
-            else
-            {
+                _current = c;
+            }
+            else if (c != Symbols.Null)
+            {
+                _current = c;
                 _column--;
             }
+        }
+
+        Char NormalizeForward(Char p)
+        {
+            if (p == Symbols.CarriageReturn)
+            {
+                var n = _source.ReadCharacter();
+
+                if (n == Symbols.LineFeed)
+                    return n;
+
+                _source.Index--;
+                return Symbols.LineFeed;
+            }
+
+            return p;
+        }
+
+        Char NormalizeBackward(Char p)
+        {
+            if (p == Symbols.CarriageReturn)
+            {
+                var n = _source[_source.Index];
+
+                if (n == Symbols.LineFeed)
+                {
+                    BackUnsafe();
+                    return Symbols.Null;
+                }
+
+                return Symbols.LineFeed;
+            }
+
+            return p;
         }

         #endregion


Fixed bug where duplicate packages are installed

This issue stems from a packages.config file changing either by hand or
by incoming version control (ie externally changed).

Previously, NuGet only looked for packages listed in the packages.config
file, when it SHOULD be looking at what packages are ACTUALLY installed
in the project.

--- Assets/NuGet/Editor/NugetHelper.cs
+++ Assets/NuGet/Editor/NugetHelper.cs
@@ -7,6 +7,7 @@
     using System.Linq;
     using System.Net;
     using System.Text;
+    using System.Text.RegularExpressions;
     using Ionic.Zip;
     using UnityEditor;
     using UnityEngine;
@@ -507,6 +508,7 @@

             List<NugetPackage> fullPackages = new List<NugetPackage>(PackagesConfigFile.Packages.Count);

+            // loops through the packages that the packages.config file says are installed
             foreach (var package in PackagesConfigFile.Packages)
             {
                 string installedPackagePath = Path.Combine(NugetConfigFile.RepositoryPath, string.Format("{0}.{1}/{0}.{1}.nupkg", package.Id, package.Version));
@@ -525,8 +527,10 @@
                 fullPackages.Add(NugetPackage.FromNupkgFile(installedPackagePath));
             }

+            // get the packages that are actually present in the project
+
             // sort alphabetically
-            fullPackages.Sort(delegate(NugetPackage x, NugetPackage y)
+            fullPackages.Sort(delegate (NugetPackage x, NugetPackage y)
             {
                 if (x.Id == null && y.Id == null)
                     return 0;
@@ -541,9 +545,49 @@
             });

             stopwatch.Stop();
-            LogVerbose("Getting installed packages locally took {0} ms", stopwatch.ElapsedMilliseconds);
+            LogVerbose("Getting installed packages took {0} ms", stopwatch.ElapsedMilliseconds);

             return fullPackages;
+        }
+
+        /// <summary>
+        /// Gets the list of packages that are actually installed in the project.
+        /// </summary>
+        /// <remarks>
+        /// There may be packages installed that are not listed in the packages.config file.
+        /// This happens when the packages.config file is edited by hand, or when it is edited by a user and checked into source control (and checked out by another user).
+        /// This method parses the installed package directories to find out what is ACTUALLY installed.
+        /// </remarks>
+        /// <returns></returns>
+        private static List<NugetPackageIdentifier> GetActualInstalledPackages()
+        {
+            List<NugetPackageIdentifier> installedPackages = new List<NugetPackageIdentifier>();
+
+            string[] installedPackagePaths = Directory.GetDirectories(NugetConfigFile.RepositoryPath);
+            foreach (string installedPackagePath in installedPackagePaths)
+            {
+                string directoryName = new DirectoryInfo(installedPackagePath).Name;
+
+                // directory should be in the form Package.ID.Version-PrereleaseTag (ex: Newtonsoft.Json.6.0.8-rc02)
+                // so, attempt to find the first case of a period followed by a number (ex: .6), that is the split between ID and Version
+                Match match = Regex.Match(directoryName, @"\.\d");
+                if (match.Success)
+                {
+                    NugetPackageIdentifier package = new NugetPackageIdentifier();
+                    package.Id = directoryName.Substring(0, match.Index);
+                    package.Version = directoryName.Substring(match.Index + 1);
+
+                    installedPackages.Add(package);
+
+                    //LogVerbose("Package installed = {0} {1}", package.Id, package.Version);
+                }
+                else
+                {
+                    Debug.LogErrorFormat("Invalid package path: {0}", installedPackagePath);
+                }
+            }
+
+            return installedPackages;
         }

         /// <summary>
@@ -694,7 +738,8 @@
             // If specific version not found on server, use the next version up (not latest)

             // copy the list since the Update operation below changes the actual installed packages list
-            var installedPackages = new List<NugetPackageIdentifier>(PackagesConfigFile.Packages);
+            //var installedPackages = new List<NugetPackageIdentifier>(PackagesConfigFile.Packages);
+            var installedPackages = GetActualInstalledPackages();

             foreach (var installedPackage in installedPackages)
             {
@@ -720,6 +765,7 @@
                 }
             }

+            // if we reach here, that means no other version of the package is already installed
             NugetPackage foundPackage = GetSpecificPackage(package);

             if (foundPackage != null)
@@ -877,18 +923,18 @@
         {
             try
             {
-                // TODO: Is this reload needed?
+                // Reload since the packages.config file may have been edited by hand
                 PackagesConfigFile = PackagesConfigFile.Load(PackagesConfigFilePath);

                 float progressStep = 1.0f / PackagesConfigFile.Packages.Count;
                 float currentProgress = 0;

                 // copy the list since the InstallIdentifier operation below changes the actual installed packages list
-                var installedPackages = new List<NugetPackageIdentifier>(PackagesConfigFile.Packages);
-
-                LogVerbose("Restoring {0} packages.", installedPackages.Count);
-
-                foreach (var package in installedPackages)
+                var packagesToInstall = new List<NugetPackageIdentifier>(PackagesConfigFile.Packages);
+
+                LogVerbose("Restoring {0} packages.", packagesToInstall.Count);
+
+                foreach (var package in packagesToInstall)
                 {
                     if (package != null)
                     {
@@ -928,12 +974,6 @@
         {
             string packageInstallDirectory = Path.Combine(NugetConfigFile.RepositoryPath, string.Format("{0}.{1}", package.Id, package.Version));
             bool installed = Directory.Exists(packageInstallDirectory);
-
-            if (!installed)
-            {
-                LogVerbose("Directory does NOT exist: {0}", packageInstallDirectory);
-            }
-
             return installed;
         }


Reverted cache checks to get EXACT version

The version range checking for the cache was causing too many issues due
to things like installing newer versions of packages in the cache when
an older package is the one specified in a packages.config file.

--- Assets/NuGet/Editor/NugetHelper.cs
+++ Assets/NuGet/Editor/NugetHelper.cs
@@ -835,7 +835,7 @@
         }

         /// <summary>
-        /// Tries to find an already cached package that matches (or is in the range of) the given package ID.
+        /// Tries to find an already cached package that matches the given package ID.
         /// </summary>
         /// <param name="packageId">The <see cref="NugetPackageIdentifier"/> of the <see cref="NugetPackage"/> to find.</param>
         /// <returns>The best <see cref="NugetPackage"/> match, if there is one, otherwise null.</returns>
@@ -845,35 +845,12 @@

             if (NugetHelper.NugetConfigFile.InstallFromCache)
             {
-                // find all .nupkg files in the cache containing the package ID in the filename
-                List<string> cachedPackages = Directory.GetFiles(NugetHelper.PackOutputDirectory, string.Format("{0}.*.nupkg", packageId.Id)).OrderBy(x => x).ToList();
-
-                foreach (var cachedPackage in cachedPackages)
-                {
-                    //LogVerbose(cachedPackage);
-
-                    // read the version string from the filename
-                    int startIndex = cachedPackage.IndexOf(packageId.Id) + packageId.Id.Length + 1;
-                    int endIndex = cachedPackage.IndexOf(".nupkg");
-                    string version = cachedPackage.Substring(startIndex, endIndex - startIndex);
-
-                    if (char.IsLetter(version[0]))
-                    {
-                        // the id has the same start, but has some additional text, so skip it
-                        // for example, "PackageId.Debug"
-                        // NOTE: This will still fail if it was only a number appended, such as "PackageId2"
-                        continue;
-                    }
-
-                    //LogVerbose(version);
-
-                    if (packageId.InRange(version))
-                    {
-                        // since the packages were sorted in alphabetical order, we take the lowest (first) package that is in range
-                        LogVerbose("Found in local cache: {0}", cachedPackage);
-                        package = NugetPackage.FromNupkgFile(cachedPackage);
-                        break;
-                    }
+                string cachedPackagePath = System.IO.Path.Combine(NugetHelper.PackOutputDirectory, string.Format("./{0}.{1}.nupkg", packageId.Id, packageId.Version));
+
+                if (NugetHelper.NugetConfigFile.InstallFromCache && File.Exists(cachedPackagePath))
+                {
+                    LogVerbose("Getting specific package from the cache: {0}", cachedPackagePath);
+                    package = NugetPackage.FromNupkgFile(cachedPackagePath);
                 }
             }


drawline: fix issue

drawline: fix issue

fix z position

--- Assets/Scripts/Drawing/DrawLine.cs
+++ Assets/Scripts/Drawing/DrawLine.cs
@@ -53,8 +53,9 @@
             }
             if (Input.GetMouseButton(0))
             {
-                Vector3 mousePosition = m_Camera.ScreenToWorldPoint(Input.mousePosition);
-                mousePosition.z = m_LineRenderer.transform.position.z;
+                var pos = new Vector3(Input.mousePosition.x, Input.mousePosition.y, lineRenderer.transform.position.z - m_Camera.transform.position.z);
+                Vector3 mousePosition = m_Camera.ScreenToWorldPoint(pos);
+                mousePosition.z = 0;
                 if (!m_Points.Contains(mousePosition))
                 {
                     m_Points.Add(mousePosition);


Correction bug

Correction bug

--- Assets/Scripts/PlayerController.cs
+++ Assets/Scripts/PlayerController.cs
@@ -92,7 +92,7 @@
 	private void instanciateCraie(float profondeur) {

 		GameObject cr = Instantiate (objetCraie, Input.mousePosition, Quaternion.identity) as GameObject;
-		cr.GetComponent<moveCraie> ().arrivee = new Vector3(pos.x, pos.y, pos.z+profondeur);
+		cr.GetComponent<moveCraie> ().arrivee = new Vector3(pos.x, pos.y, pos.z);
 		Vector3 arm = GameObject.Find ("Main Camera").camera.transform.position;
 		cr.GetComponent<moveCraie> ().depart = new Vector3(arm.x+0.4f, arm.y-0.4f,arm.z);


Disable getting snow ball while jumping

Disable getting snow ball while jumping

--- Assets/Scripts/PlayerController.cs
+++ Assets/Scripts/PlayerController.cs
@@ -145,7 +145,7 @@
 			forwardBackward += forwardBackward * airDragSpeed * Time.deltaTime;
 			sideToSide += sideToSideDirection * airDragSpeed * Time.deltaTime;
 		}
-		else if(characterController.isGrounded && hasStamina() && Input.GetButton("Jump")) {
+		else if(characterController.isGrounded && hasStamina() && Input.GetButtonDown("Jump")) {
 			jumpRotation = transform.rotation;
 			verticalVelocity = jumpSpeed;
 			movementVector.y = verticalVelocity;
@@ -381,7 +381,11 @@
 	 * Get Snowballs
      *****************************/
 	private void getSnowballs() {
-		if(snowballs < maxSnowballs && hasStamina() && Input.GetButton("Reload")) {
+		if (!characterController.isGrounded){
+			stopMakingSnowballs();
+			return;
+		}
+		else if(snowballs < maxSnowballs && hasStamina() && Input.GetButton("Reload")) {
 			makeSnowballs();
 		}
 		else {


use as instead of typecast when calculating timeSimPast for UpdatePastCmdEvt

--- Assets/Scripts/SimEvt/UpdateEvt.cs
+++ Assets/Scripts/SimEvt/UpdateEvt.cs
@@ -44,7 +44,7 @@
 				timeSimPast = g.timeGame + g.updateInterval;
 				foreach (SimEvt evt in g.cmdPending.events) {
 					if (evt is UnitCmdEvt) {
-						UnitCmdEvt unitCmdEvt = (UnitCmdEvt)evt;
+						UnitCmdEvt unitCmdEvt = evt as UnitCmdEvt;
 						if (unitCmdEvt.timeCmd > timeSimPast) timeSimPast = unitCmdEvt.timeCmd;
 					}
 				}


re-commented migration reverter

re-commented migration reverter

--- BBR-ChargebackModel-CLI/Program.cs
+++ BBR-ChargebackModel-CLI/Program.cs
@@ -29,7 +29,7 @@
             var opts = GetCLIOptions(args);

             // Uncomment this to roll back the DB to its initial state on each run
-            migrator.DbMigrator.MigrateToEmptyDb(opts.DbType, opts.ConnectionString);
+            //migrator.DbMigrator.MigrateToEmptyDb(opts.DbType, opts.ConnectionString);
             migrator.DbMigrator.MigrateToLatestDbVersion(opts.DbType, opts.ConnectionString);

             importData(opts.DbType, opts.ConnectionString,


cleanup directory code a bit

cleanup directory code a bit

--- BitSharp.Client/MainWindow.xaml.cs
+++ BitSharp.Client/MainWindow.xaml.cs
@@ -63,11 +63,16 @@
                 var rulesType = RulesEnum.MainNet;
 #endif

+                // directories
+                var baseDirectory = Config.LocalStoragePath;
+                if (false && Debugger.IsAttached)
+                    baseDirectory = Path.Combine(baseDirectory, "Debugger");
+
                 // initialize kernel
                 this.kernel = new StandardKernel();

                 // add logging module
-                this.kernel.Load(new LoggingModule(LogLevel.Info));
+                this.kernel.Load(new LoggingModule(baseDirectory, LogLevel.Info));

                 // log startup
                 this.logger = kernel.Get<Logger>();
@@ -81,12 +86,6 @@
 #elif MEMORY
                 modules.Add(new MemoryStorageModule());
 #else
-                string baseDirectory;
-                if (Debugger.IsAttached)
-                    baseDirectory = Path.Combine(Config.LocalStoragePath, "Debugger", "Data");
-                else
-                    baseDirectory = Path.Combine(Config.LocalStoragePath, "Data");
-
                 modules.Add(new EsentStorageModule(baseDirectory, rulesType, cacheSizeMaxBytes: int.MaxValue - 1));
                 //ChainStateCursor.IndexOutputs = true;
 #endif
@@ -186,7 +185,7 @@
             }.DisposeList();

             base.OnClosed(e);
-
+
             this.logger.Info("Finished shutting down");
         }


OffScreen - BitmapBuffer.CreateBitmap create new bitmap and copy buffer to it's back buffer

Bitmap was not a true snapshot of the image, the backbuffer being updated would change the image

--- CefSharp.OffScreen/BitmapBuffer.cs
+++ CefSharp.OffScreen/BitmapBuffer.cs
@@ -81,12 +81,14 @@
 					return null;
 				}

-				var stride = Width * BytesPerPixel;
+				var bitmap = new Bitmap(Width, Height, Format);

-				var pointer = Marshal.UnsafeAddrOfPinnedArrayElement(buffer, 0);
+				var bitmapData = bitmap.LockBits(new Rectangle(0, 0, Width, Height), ImageLockMode.WriteOnly, Format);

-				var bitmap = new Bitmap(Width, Height, stride, Format, pointer);
+				Marshal.Copy(Buffer, 0, bitmapData.Scan0, NumberOfBytes);

+				bitmap.UnlockBits(bitmapData);
+
 				return bitmap;
 			}
 		}


Fixed what Keys managedCefBrowserAdapter send

Problem: Not all input-keys was sent to handled in Javascript, especially keycombinations like Strg + X, Strg + V and so on wasn't handled. Now, with the fix, this is no longer a problem. Also the keys, special handled in the original version, are no longer needed and so i removed them.

--- CefSharp.Wpf/ChromiumWebBrowser.cs
+++ CefSharp.Wpf/ChromiumWebBrowser.cs
@@ -837,40 +837,20 @@
             // For some reason, not all kinds of keypresses triggers the appropriate WM_ messages handled by our SourceHook, so
             // we have to handle these extra keys here. Hooking the Tab key like this makes the tab focusing in essence work like
             // KeyboardNavigation.TabNavigation="Cycle"; you will never be able to Tab out of the web browser control.
-
-            if (KeysToSendtoBrowser.Contains(e.Key))
+            var modifiers = GetModifiers(e);
+
+            if (KeysToSendtoBrowser.Contains(e.Key) || modifiers > 0)
             {
                 var message = (int)(e.IsDown ? WM.KEYDOWN : WM.KEYUP);
                 var virtualKey = KeyInterop.VirtualKeyFromKey(e.Key);

-                var modifiers = GetModifiers(e);
                 managedCefBrowserAdapter.SendKeyEvent(message, virtualKey, modifiers);
-                e.Handled = true;
-            }
-
-            if (e.IsDown && e.KeyboardDevice.Modifiers == ModifierKeys.Control)
-            {
-                switch (e.Key)
+
+                if (KeysToSendtoBrowser.Contains(e.Key) || (modifiers.HasFlag(CefEventFlags.ShiftDown) && modifiers.HasFlag(CefEventFlags.ControlDown)))
                 {
-                    case Key.X:
-                        managedCefBrowserAdapter.Cut();
-                        break;
-                    case Key.C:
-                        managedCefBrowserAdapter.Copy();
-                        break;
-                    case Key.V:
-                        managedCefBrowserAdapter.Paste();
-                        break;
-                    case Key.A:
-                        managedCefBrowserAdapter.SelectAll();
-                        break;
-                    case Key.Z:
-                        managedCefBrowserAdapter.Undo();
-                        break;
-                    case Key.Y:
-                        managedCefBrowserAdapter.Redo();
-                        break;
+                    e.Handled = true;
                 }
+
             }
         }


Use reflection to load examples

Use reflection to load examples

--- ConsoleExamples/ConsoleExamples.cs
+++ ConsoleExamples/ConsoleExamples.cs
@@ -22,42 +22,10 @@
 //
 using System;
 using System.Collections.Generic;
+using System.Linq;
 using ConsoleExamples.Examples;
 using Encog.Examples;
-using Encog.Examples.Adaline;
-using Encog.Examples.Analyst;
-using Encog.Examples.Analyzer;
-using Encog.Examples.AnnealTSP;
-using Encog.Examples.ARTExample;
-using Encog.Examples.BAM;
-using Encog.Examples.Bayesian;
-using Encog.Examples.Benchmark;
-using Encog.Examples.Boltzmann;
-using Encog.Examples.CPN;
-using Encog.Examples.CSVMarketExample;
-using Encog.Examples.ElmanNetwork;
-using Encog.Examples.Forest;
-using Encog.Examples.ForexExample;
-using Encog.Examples.GeneticTSP;
-using Encog.Examples.Hopfield.Associate;
-using Encog.Examples.Hopfield.Simple;
-using Encog.Examples.Image;
-using Encog.Examples.Indicator.Avg;
-using Encog.Examples.Indicator.CustomInd;
-using Encog.Examples.Indicator.ImportData;
-using Encog.Examples.JordanNetwork;
-using Encog.Examples.LiveSimul;
-using Encog.Examples.Lunar;
-using Encog.Examples.MultiRadial;
-using Encog.Examples.NetWorkPruner;
-using Encog.Examples.Normalize;
-using Encog.Examples.Persist;
-using Encog.Examples.Predict;
-using Encog.Examples.SVM_Predict;
-using Encog.Examples.SVMPredictCSV;
-using Encog.Examples.XOR;
-using Encog.Examples.SVM;
-using MarketPredict = Encog.Examples.Market.MarketPredict;
+using System.Reflection;

 namespace ConsoleExamples
 {
@@ -75,52 +43,21 @@

         public ConsoleExamples()
         {
-            examples.Add(AdalineDigits.Info);
-            examples.Add(SolveTSP.Info);
-            examples.Add(ClassifyART1.Info);
-            examples.Add(BidirectionalAssociativeMemory.Info);
-            examples.Add(EncogBenchmarkExample.Info);
-            examples.Add(BoltzTSP.Info);
-            examples.Add(RocketCPN.Info);
-            examples.Add(ElmanExample.Info);
-            examples.Add(GeneticSolveTSP.Info);
-            examples.Add(HopfieldSimple.Info);
-            examples.Add(HopfieldAssociate.Info);
-            examples.Add(JordanExample.Info);
-            examples.Add(MultiThreadBenchmark.Info);
-            examples.Add(ImageNeuralNetwork.Info);
-            examples.Add(PersistEncog.Info);
-            examples.Add(PersistSerial.Info);
-            examples.Add(WeightInitialization.Info);
-            examples.Add(ThreadCount.Info);
-            examples.Add(SimpleBenchmark.Info);
-            examples.Add(XORFactory.Info);
-            examples.Add(XORHelloWorld.Info);
-            examples.Add(AnalystExample.Info);
-            examples.Add(XORNEAT.Info);
-            examples.Add(ForestCover.Info);
-            examples.Add(MarketPredict.Info);
-            examples.Add(CSVMarketExample.Info);
-            examples.Add(ForexExample.Info);
-            examples.Add(LunarLander.Info);
-            examples.Add(MarketAnalyzer.Info);
-            examples.Add(PrunerLoader.Info);
-            examples.Add(MultiRadial.Info);
-            examples.Add(SVMExample.Info);
-            examples.Add(SVMPredictCSV.Info);
-            examples.Add(FahlmanEncoder.Info);
-            examples.Add(PredictSunspot.Info);
-            examples.Add(SimpleNormalize.Info);
-            examples.Add(NormalizeFile.Info);
-            examples.Add(ElliottBenchmark.Info);
-            examples.Add(XORPSO.Info);
-            examples.Add(BayesianTaxi.Info);
-            examples.Add(SunspotWindow.Info);
-            examples.Add(ImportIndicatorData.Info);
-            examples.Add(RemoteEMA.Info);
-            examples.Add(LiveSimul.Info);
-            examples.Add(IndicatorExample.Info);
-            examples.Add(RegressionSVM.Info);
+            var examplesHandle = Assembly
+                    .GetExecutingAssembly()
+                    .GetTypes().ToList()
+                    .Where(t => t.Namespace != null && t.Namespace.StartsWith("Encog.Examples")).ToList();
+
+            examplesHandle
+                .ForEach(e =>
+                {
+                    const string method = "get_Info";
+                    if (e.GetMembers().Any(m => m.Name == method))
+                    {
+                        var info = e.InvokeMember(method, BindingFlags.Default | BindingFlags.InvokeMethod, null, null, new object[] { });
+                        examples.Add((ExampleInfo)info);
+                    }
+                });
         }

         public void ListCommands()


Convert the StreamManager class into an enumerator

And rename it "DeflateStreamReader" which is more descriptive.

--- Countdown/Models/WordDictionary.cs
+++ Countdown/Models/WordDictionary.cs
@@ -151,10 +151,7 @@
             {
                 using DeflateStream stream = new DeflateStream(resourceStream, CompressionMode.Decompress);

-                StreamManager sm = new StreamManager(stream);
-                ReadOnlySpan<byte> line;
-
-                while ((line = sm.ReadLine()) != Span<byte>.Empty)
+                foreach (ReadOnlySpan<byte> line in new DeflateStreamReader(stream))
                 {
                     int keyLength = line.Length;

@@ -217,31 +214,45 @@
         /// Assumes that the maximum line length is going to be
         /// less than or equal to the buffer size.
         /// </summary>
-        private sealed class StreamManager
+        private ref struct DeflateStreamReader
         {
             private const int cBufferSize = 1024 * 8;

             private readonly DeflateStream stream;
-            private readonly byte[] buffer = new byte[cBufferSize];
-
-            private int dataSize = 0;
-            private int position = 0;
-            private bool endOfStream = false;
-
-            public StreamManager(DeflateStream s)
+            private readonly byte[] buffer;
+
+            private int dataSize;
+            private int position;
+            private bool endOfStream;
+            ReadOnlySpan<byte> current;
+
+            public DeflateStreamReader(DeflateStream s)
             {
                 stream = s ?? throw new ArgumentNullException(nameof(s));
-            }
-
-            public ReadOnlySpan<byte> ReadLine()
+
+                buffer = new byte[cBufferSize];
+
+                dataSize = 0;
+                position = 0;
+                endOfStream = false;
+                current = ReadOnlySpan<byte>.Empty;
+            }
+
+            public DeflateStreamReader GetEnumerator() => this;
+
+            public ReadOnlySpan<byte> Current => current;
+
+            public bool MoveNext() => ReadNextLine();
+
+            private bool ReadNextLine()
             {
                 int length = SeekNextLine();

                 if (length > 0) // simple case, the line is within the buffer
                 {
-                    ReadOnlySpan<byte> line = buffer.AsSpan(position, length);
+                    current = buffer.AsSpan(position, length);
                     position += length + 1;
-                    return line;
+                    return true;
                 }
                 else if (!endOfStream) // some of the line remains in the stream
                 {
@@ -274,10 +285,11 @@
                     Debug.Assert(length >= 0); // its not the end of the stream, it shouldn't be

                     position += length + 1;
-                    return span.Slice(0, sizeLeft + length);
-                }
-
-                return Span<byte>.Empty;
+                    current = span.Slice(0, sizeLeft + length);
+                    return true;
+                }
+
+                return false;
             }

             private int SeekNextLine() => buffer.AsSpan(position, dataSize - position).IndexOf(cLine_seperator);


Move to next version

Move to next version

--- Counter/Properties/AssemblyInfo.cs
+++ Counter/Properties/AssemblyInfo.cs
@@ -24,5 +24,5 @@
 // You can specify all the values or you can default the Build and Revision Numbers
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.1.0.0")]
-[assembly: AssemblyFileVersion("1.1.0.0")]+[assembly: AssemblyVersion("1.1.1.0")]
+[assembly: AssemblyFileVersion("1.1.1.0")]


Remove dead code

Remove dead code

--- CustomWidgets/DockingTabControl.cs
+++ CustomWidgets/DockingTabControl.cs
@@ -53,7 +53,6 @@
 		private PrinterConfig printer;

 		private ThemeConfig theme;
-		private ResizeContainer resizePage;

 		public DockingTabControl(GuiWidget widgetTodockTo, DockSide dockSide, PrinterConfig printer)
 			: base (FlowDirection.TopToBottom)


Using '*' instead of '' for AtomPub filter parameter

--- DotCMIS/binding/atompub/atompub.cs
+++ DotCMIS/binding/atompub/atompub.cs
@@ -720,6 +720,10 @@
             parameters[AtomPubConstants.ParamId] = objectIdOrPath;
             parameters[AtomPubConstants.ParamPath] = objectIdOrPath;
             parameters[AtomPubConstants.ParamReturnVersion] = returnVersion;
+            if (filter == null)
+            {
+                filter = "*";
+            }
             parameters[AtomPubConstants.ParamFilter] = filter;
             parameters[AtomPubConstants.ParamAllowableActions] = includeAllowableActions;
             parameters[AtomPubConstants.ParamACL] = includeAcl;


code reuse

code reuse

--- racr-net/Racr.cs
+++ racr-net/Racr.cs
@@ -172,31 +172,14 @@
 				false);
 		}

-
 		public void SpecifyAttribute<N,R>(string attName, string nonTerminal, string contexName, bool cached, Func<N,R> equation)
 		where N : AstNode {
-			specifyAttribute.Call(
-				spec,
-				SymbolTable.StringToObject(attName),
-				SymbolTable.StringToObject(nonTerminal),
-				SymbolTable.StringToObject(contexName),
-				cached,
-				WrapEquation(equation).ToSchemeProcedure(),
-				false);
+			SpecifyAttribute(attName, nonTerminal, contexName, cached, (Delegate) equation);
 		}
 		public void SpecifyAttribute<N,A1,R>(string attName, string nonTerminal, string contexName, bool cached, Func<N,A1,R> equation)
 		where N : AstNode {
-			specifyAttribute.Call(
-				spec,
-				SymbolTable.StringToObject(attName),
-				SymbolTable.StringToObject(nonTerminal),
-				SymbolTable.StringToObject(contexName),
-				cached,
-				WrapEquation(equation).ToSchemeProcedure(),
-				false);
-		}
-
-
+			SpecifyAttribute(attName, nonTerminal, contexName, cached, (Delegate) equation);
+		}
 	}


Fix pop out wrap on spanel

Fix pop out wrap on spanel

--- EDDiscovery/Forms/SummaryPopOut.cs
+++ EDDiscovery/Forms/SummaryPopOut.cs
@@ -419,10 +419,10 @@
                 cep.Add(new ControlEntryProperties(FontSel(vsc.Columns[2].DefaultCellStyle.Font, vsc.Font), themeColour, (string)vscrow.Cells[2].Value));

             if (Config( Configuration.showInformation))
-                cep.Add(new ControlEntryProperties(FontSel(vsc.Columns[3].DefaultCellStyle.Font, vsc.Font), themeColour, (string)vscrow.Cells[3].Value));
+                cep.Add(new ControlEntryProperties(FontSel(vsc.Columns[3].DefaultCellStyle.Font, vsc.Font), themeColour, ((string)(vscrow.Cells[3].Value)).Replace("\r\n", " ")));

             if (toolStripComboBoxOrder.SelectedIndex == 0 && Config( Configuration.showNotes))
-                cep.Add(new ControlEntryProperties(FontSel(vsc.Columns[4].DefaultCellStyle.Font, vsc.Font), themeColour, (string)vscrow.Cells[4].Value));
+                cep.Add(new ControlEntryProperties(FontSel(vsc.Columns[4].DefaultCellStyle.Font, vsc.Font), themeColour, ((string)vscrow.Cells[4].Value).Replace("\r\n", " ")));

             bool showdistance = !Config( Configuration.showDistancesOnFSDJumpsOnly) || he.IsFSDJump;

@@ -1148,6 +1148,7 @@
                     lab.Text = cep[i].text;
                     lab.Location = new Point(0, vpos);
                     lab.AutoSize = false;
+                    ///////lab.ClipToOneLine = true;
                     lab.Size = new Size(100, vsize-2);
                     parent.Controls.Add(lab);
                     items.Add(lab);


Improving tests

Improving tests

--- EasyActor.FlowTest/BackBoneTest.cs
+++ EasyActor.FlowTest/BackBoneTest.cs
@@ -10,7 +10,6 @@
 using System.Reactive.Linq;
 using System.Reactive.Disposables;
 using Xunit;
-using System.Reactive.Linq;

 namespace EasyActor.FlowTest
 {
@@ -19,7 +18,8 @@
     {
         private IBackbone<bool, int> _BackBone;
         private IDictionary<Type, object> _Processors = new Dictionary<Type, object>();
-        private IProcessor<bool, string, int> _Processor;
+        private IProcessor<bool, string, int> _StringProcessor;
+        private IProcessor<bool, int, int> _IntProcessor;
         private IProgress<int> _Progess;
         private CancellationToken _CancellationToken;
         private IObservable<string> _SingleValue;
@@ -28,12 +28,14 @@
         public BackBoneTest()
         {
             _CancellationToken = new CancellationToken();
-            _Processor = Substitute.For<IProcessor<bool, string, int>>();
+            _StringProcessor = Substitute.For<IProcessor<bool, string, int>>();
+            _IntProcessor = Substitute.For<IProcessor<bool, int, int>>();
             _Progess = Substitute.For<IProgress<int>>();
             _ObservableHelper = new ObservableHelper();
             _Processors = new Dictionary<Type, object>()
             {
-                { typeof(string), _Processor }
+                { typeof(string), _StringProcessor },
+                { typeof(int), _IntProcessor }
             };
             _BackBone = new BackBone<bool, int>(_Processors);
             _SingleValue = Observable.Return("Value");
@@ -55,14 +57,14 @@
         public async Task Process_WithMessageTypeKnown_CallProcessor()
         {
             await _BackBone.Process("test", _Progess, _CancellationToken);
-            await _Processor.Received(1).Process("test", _BackBone, _Progess, Arg.Any<CancellationToken>());
+            await _StringProcessor.Received(1).Process("test", _BackBone, _Progess, Arg.Any<CancellationToken>());
         }

         [Fact]
         public async Task Process_CalledWithANullReferenceProgess_ProvidesANullProgress()
         {
             await _BackBone.Process("test", null, _CancellationToken);
-            await _Processor.Received(1).Process("test", _BackBone, Arg.Any<NullProgess<int>>(), Arg.Any<CancellationToken>());
+            await _StringProcessor.Received(1).Process("test", _BackBone, Arg.Any<NullProgess<int>>(), Arg.Any<CancellationToken>());
         }

         [Fact]
@@ -87,7 +89,7 @@
             _BackBone.Connect(_ObservableHelper.GetObservable());
             _ObservableHelper.Observe("Banana");

-            await _Processor.Received(1).Process("Banana", _BackBone, Arg.Any<NullProgess<int>>(), Arg.Any<CancellationToken>());
+            await _StringProcessor.Received(1).Process("Banana", _BackBone, Arg.Any<NullProgess<int>>(), Arg.Any<CancellationToken>());
         }

         [Fact]
@@ -96,7 +98,7 @@
             using (_BackBone.Connect(_ObservableHelper.GetObservable())) { }
             _ObservableHelper.Observe("Banana");

-            await _Processor.DidNotReceive().Process("Banana", _BackBone, Arg.Any<NullProgess<int>>(), Arg.Any<CancellationToken>());
+            await _StringProcessor.DidNotReceive().Process("Banana", _BackBone, Arg.Any<NullProgess<int>>(), Arg.Any<CancellationToken>());
         }

         [Fact]
@@ -106,7 +108,7 @@
             _BackBone.Dispose();
             _ObservableHelper.Observe("Banana");

-            await _Processor.DidNotReceive().Process("Banana", _BackBone, Arg.Any<NullProgess<int>>(), Arg.Any<CancellationToken>());
+            await _StringProcessor.DidNotReceive().Process("Banana", _BackBone, Arg.Any<NullProgess<int>>(), Arg.Any<CancellationToken>());
         }

         [Fact]
@@ -116,19 +118,32 @@
             var disp =  _BackBone.Connect(_SingleValue);

             disp.Should().Be(Disposable.Empty);
-            await _Processor.DidNotReceive().Process("Value", _BackBone, Arg.Any<NullProgess<int>>(), Arg.Any<CancellationToken>());
+            await _StringProcessor.DidNotReceive().Process("Value", _BackBone, Arg.Any<NullProgess<int>>(), Arg.Any<CancellationToken>());
         }

         [Fact]
-        public async Task GetObservable_SendMessageAsExpected() {
-            var observed = new List<string>();
-            var obs = _BackBone.GetObservable<string>();
+        public async Task GetObservable_SendMessageAsExpected_Result()
+        {
+            var observed = SetUpObservable<string>();
+            await _BackBone.Process("string", null, CancellationToken.None);
+            observed.Should().BeEquivalentTo("string");
+        }
+
+        [Fact]
+        public async Task GetObservable_SendMessageAsExpected_Empty()
+        {
+            var observed = SetUpObservable<string>();
+            await _BackBone.Process(23, null, CancellationToken.None);
+            observed.Should().BeEmpty();
+        }
+
+        private List<T> SetUpObservable<T>()
+        {
+            var observed = new List<T>();
+            var obs = _BackBone.GetObservable<T>();
             obs.Subscribe(s => observed.Add(s));
-
-            await _BackBone.Process("string", null, CancellationToken.None);
-
-            observed.Should().BeEquivalentTo("string");
+            return observed;
         }
     }
 }


Change "throw exception" to add new if call this[] {set } and key is not exist

--- FastCollection/FastDictionaryM2.cs
+++ FastCollection/FastDictionaryM2.cs
@@ -72,7 +72,7 @@
                     next = itempos;
                     for (int i = itempos; i > 0; i = _next[i])
                     {
-                        if (_keys[i].Equals(key)) { _values[i] = value; }
+                        if (_keys[i].Equals(key)) { _values[i] = value; return; }
                     }
                 }
                 if (_freeCount > 0)