9442: Centroid Line's SlopeAngle, SlopeKind

--- a_mini/projects/PixelFarm/Typography/Typography.AutoFit/GlyphCentroidLine.cs
+++ a_mini/projects/PixelFarm/Typography/Typography.AutoFit/GlyphCentroidLine.cs
@@ -478,30 +478,10 @@
     {

         public readonly GlyphTriangle p, q;
-        public readonly double boneLength;
+
         GlyphBoneJoint _boneJoint;

         public GlyphCentroidLine(GlyphTriangle p, GlyphTriangle q)
-        {
-            this.p = p;
-            this.q = q;
-
-            double dy = q.CentroidY - p.CentroidY;
-            double dx = q.CentroidX - p.CentroidX;
-            this.boneLength = Math.Sqrt((dy * dy) + (dx * dx));
-        }
-        public bool SpecialConnectFromLastToFirst { get; set; }
-        public GlyphBoneJoint BoneJoint { get { return _boneJoint; } }
-
-        public double SlopeAngle { get; private set; }
-
-
-        public LineSlopeKind SlopeKind { get; private set; }
-
-        /// <summary>
-        /// add information about edges to each triangle
-        /// </summary>
-        internal void AnalyzeAndMarkEdges()
         {
             //[A]
             //each triangle has 1 centroid point
@@ -512,11 +492,27 @@
             //p triangle=> (x0,y0)  (centroid of p)
             //q triangle=> (x1,y1)  (centroid of q)
             //a centroid line  move from p to q
+
+            this.p = p;
+            this.q = q;
+        }
+        public bool SpecialConnectFromLastToFirst { get; set; }
+        public GlyphBoneJoint BoneJoint { get { return _boneJoint; } }
+
+        public double SlopeAngle { get; private set; }
+
+
+        public LineSlopeKind SlopeKind { get; private set; }
+
+        /// <summary>
+        /// add information about edges to each triangle
+        /// </summary>
+        internal void AnalyzeAndMarkEdges()
+        {
+
             //...
-            //tasks:
-            //1. find slop angle
-            //2. find slope kind
-            //3. mark edge info
+            //tasks:
+            // mark edge info

             //[B]
             //check if q is upper or lower when compare with p
@@ -530,29 +526,6 @@
             double x1 = q.CentroidX;
             double y1 = q.CentroidY;

-            if (x1 == x0)
-            {
-                this.SlopeKind = LineSlopeKind.Vertical;
-                SlopeAngle = 1;
-            }
-            else
-            {
-                SlopeAngle = Math.Abs(Math.Atan2(Math.Abs(y1 - y0), Math.Abs(x1 - x0)));
-                if (SlopeAngle > MyMath._85degreeToRad)
-                {
-                    //assume
-                    SlopeKind = LineSlopeKind.Vertical;
-                }
-                else if (SlopeAngle < MyMath._03degreeToRad) //_15degreeToRad
-                {
-                    //assume
-                    SlopeKind = LineSlopeKind.Horizontal;
-                }
-                else
-                {
-                    SlopeKind = LineSlopeKind.Other;
-                }
-            }

 #if DEBUG
             if (p == q)


Adding a shutdown api method

Adding a shutdown api method

--- Breeze/src/Breeze.Api/Controllers/NodeController.cs
+++ Breeze/src/Breeze.Api/Controllers/NodeController.cs
@@ -1,6 +1,8 @@
 using System.ComponentModel.DataAnnotations;
+using Microsoft.AspNetCore.Hosting;
 using Microsoft.AspNetCore.Mvc;
 using NBitcoin;
+using Stratis.Bitcoin.Builder;
 using Stratis.Bitcoin.Notifications;

 namespace Breeze.Api.Controllers
@@ -8,12 +10,12 @@
 	[Route("api/[controller]")]
 	public class NodeController : Controller
 	{
-		private readonly BlockNotification blockNotification;
+	    private readonly IFullNode fullNode;

-		public NodeController(BlockNotification blockNotification)
-		{
-			this.blockNotification = blockNotification;
-		}
+	    public NodeController(IFullNode fullNode)
+	    {
+	        this.fullNode = fullNode;
+	    }

         /// <summary>
         /// Returns some general information about the status of the underlying node.
@@ -26,28 +28,19 @@
 			return this.NotFound();
 		}

-        /// <summary>
-        /// Starts sending block to the wallet for synchronisation.
-        /// This is for demo and testing use only.
-        /// </summary>
-        /// <param name="model">The hash of the block from which to start syncing.</param>
-        /// <returns></returns>
-		[HttpPost]
-		[Route("sync")]
-		public IActionResult Sync([FromBody] HashModel model)
-		{
-			if (!ModelState.IsValid)
-			{
-				return this.BadRequest();
-			}
-			this.blockNotification.SyncFrom(uint256.Parse(model.Hash));
-			return this.Ok();
-		}
-	}
+	    /// <summary>
+	    /// Trigger a shoutdown of the current running node.
+	    /// </summary>
+	    /// <returns></returns>
+	    [HttpPost]
+	    [Route("shutdown")]
+	    public IActionResult Shutdown()
+	    {
+            // start the node shutdown process
+            this.fullNode.Stop();

-	public class HashModel
-	{
-		[Required(AllowEmptyStrings = false)]
-		public string Hash { get; set; }
-	}
+	        return this.Ok();
+	    }
+    }
+
 }


Fix memory leak

Fix memory leak

--- Source/HelixToolkit.Wpf.SharpDX/Model/Elements3D/ViewBoxModel3D.cs
+++ Source/HelixToolkit.Wpf.SharpDX/Model/Elements3D/ViewBoxModel3D.cs
@@ -107,7 +107,7 @@
                 var material = (ViewBoxMeshModel.Material as PhongMaterial);
                 if (material.DiffuseMap == null)
                 {
-                    material.DiffuseMap = ViewBoxTexture == null ? BitmapExtensions.CreateViewBoxTexture(host.EffectsManager.DeviceContext2D,
+                    material.DiffuseMap = ViewBoxTexture == null ? BitmapExtensions.CreateViewBoxTexture(host.EffectsManager,
                         "F", "B", "L", "R", "U", "D", Color.Red, Color.Red, Color.Blue, Color.Blue, Color.Green, Color.Green,
                         Color.White, Color.White, Color.White, Color.White, Color.White, Color.White) : ViewBoxTexture;
                 }


Table provider handling of missing tables now supports DevStorage behavior (different to Azure); all table storage unit tests now succeed against DevStorage. #149

--- Source/Lokad.Cloud.Framework/Storage/Azure/TableStorageProvider.cs
+++ Source/Lokad.Cloud.Framework/Storage/Azure/TableStorageProvider.cs
@@ -199,7 +199,8 @@
 						{
 							// if the table does not exist, there is nothing to return
 							var errorCode = AzurePolicies.GetErrorCode(ex);
-							if (TableErrorCodeStrings.TableNotFound == errorCode)
+							if (TableErrorCodeStrings.TableNotFound == errorCode
+								|| StorageErrorCodeStrings.ResourceNotFound == errorCode)
 							{
 								fatEntities = new FatEntity[0];
 								return;
@@ -278,7 +279,8 @@
 							catch (DataServiceRequestException ex)
 							{
 								var errorCode = AzurePolicies.GetErrorCode(ex);
-								if (errorCode == TableErrorCodeStrings.TableNotFound)
+								if (errorCode == TableErrorCodeStrings.TableNotFound
+									|| errorCode == StorageErrorCodeStrings.ResourceNotFound)
 								{
 									AzurePolicies.SlowInstantiation.Do(() =>
 										{


insert break;

insert break;

--- CSharp_1/Arrays/12.IndexOfLetters/IndexOfLetters.cs
+++ CSharp_1/Arrays/12.IndexOfLetters/IndexOfLetters.cs
@@ -16,9 +16,10 @@
             {
                 alphabet[i] = (char)(97 + i);
             }
-
+            // input string
             string input = Console.ReadLine();

+            // decoding
             foreach (char ch in input)
             {
                 for (int i = 0; i < 26; i++)
@@ -26,6 +27,7 @@
                     if (ch == alphabet[i])
                     {
                         Console.WriteLine(i);
+                        break;
                     }
                 }
             }


Assembly Commit

Assembly Commit

--- Cactus-pageobject/Cactus/Properties/AssemblyInfo.cs
+++ Cactus-pageobject/Cactus/Properties/AssemblyInfo.cs
@@ -6,9 +6,11 @@
 // set of attributes. Change these attribute values to modify the information
 // associated with an assembly.
 [assembly: AssemblyTitle("Cactus")]
+[assembly: AssemblyDescription("PageObject Style Framework On top of Selenium WebDriver")]
 [assembly: AssemblyConfiguration("")]
 [assembly: AssemblyCompany("")]
 [assembly: AssemblyProduct("Cactus")]
+[assembly: AssemblyCopyright("Copyright © 2015")]
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyCulture("")]

@@ -30,4 +32,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("0.1.0.0")]
+[assembly: AssemblyFileVersion("0.1.0.0")]


Code optimization

Code optimization

--- Src/Asp.Net/SqlSugar/Abstract/UpdateProvider/UpdateableProvider.cs
+++ Src/Asp.Net/SqlSugar/Abstract/UpdateProvider/UpdateableProvider.cs
@@ -302,7 +302,7 @@

         public IUpdateable<T> Where(Expression<Func<T, bool>> expression)
         {
-            Check.Exception(UpdateObjs.Length > 1, ErrorMessage.GetThrowMessage("insert List no support where","集合插入不支持Where请使用WhereColumns"));
+            Check.Exception(UpdateObjs.Length > 1, ErrorMessage.GetThrowMessage("update List no support where","集合更新不支持Where请使用WhereColumns"));
             var expResult = UpdateBuilder.GetExpressionValue(expression, ResolveExpressType.WhereSingle);
             var whereString = expResult.GetResultString();
             if (expression.ToString().Contains("Subqueryable()"))
@@ -314,7 +314,7 @@
         }
         public IUpdateable<T> Where(string whereSql, object parameters = null)
         {
-            Check.Exception(UpdateObjs.Length > 1, ErrorMessage.GetThrowMessage("insert List no support where", "集合插入不支持Where请使用WhereColumns"));
+            Check.Exception(UpdateObjs.Length > 1, ErrorMessage.GetThrowMessage("update List no support where", "集合更新不支持Where请使用WhereColumns"));
             if (whereSql.HasValue())
             {
                 UpdateBuilder.WhereValues.Add(whereSql);
@@ -327,7 +327,7 @@
         }
         public IUpdateable<T> Where(string fieldName, string conditionalType, object fieldValue)
         {
-            Check.Exception(UpdateObjs.Length > 1, ErrorMessage.GetThrowMessage("insert List no support where", "集合插入不支持Where请使用WhereColumns"));
+            Check.Exception(UpdateObjs.Length > 1, ErrorMessage.GetThrowMessage("update List no support where", "集合更新不支持Where请使用WhereColumns"));
             var whereSql = this.SqlBuilder.GetWhere(fieldName, conditionalType, 0);
             this.Where(whereSql);
             string parameterName = this.SqlBuilder.SqlParameterKeyWord + fieldName + "0";


＼(#`・△・)/ < Add parameters of UserStreams in UserStreamReceiver.

--- Cadena/Engine/StreamReceivers/UserStreamReceiver.cs
+++ Cadena/Engine/StreamReceivers/UserStreamReceiver.cs
@@ -1,4 +1,5 @@
 using System;
+using System.Collections.Generic;
 using System.Diagnostics;
 using System.Linq;
 using System.Net;
@@ -8,6 +9,7 @@
 using Cadena.Api.Streams;
 using Cadena.Data.Streams.Internals;
 using Cadena.Engine._Internals.Parsers;
+using JetBrains.Annotations;

 namespace Cadena.Engine.StreamReceivers
 {
@@ -42,6 +44,26 @@

         private int _hardErrorCount = 0;

+        #region User Stream properties
+
+        /// <summary>
+        /// Track keywords
+        /// </summary>
+        [CanBeNull]
+        public IEnumerable<string> TrackKeywords { get; set; }
+
+        /// <summary>
+        /// replies=all flag
+        /// </summary>
+        public bool RepliesAll { get; set; }
+
+        /// <summary>
+        /// include_followings_activity flag
+        /// </summary>
+        public bool IncludeFollowingsActivities { get; set; }
+
+        #endregion
+
         UserStreamReceiver(IApiAccess access, IStreamHandler handler)
         {
             _access = access;
@@ -57,7 +79,8 @@
                 _handler.OnStateChanged(StreamState.Connecting);
                 try
                 {
-                    await UserStreams.Connect(_access, ParseLine, _userStreamTimeout, cancellationToken)
+                    await UserStreams.Connect(_access, ParseLine, _userStreamTimeout, cancellationToken,
+                        TrackKeywords, RepliesAll, IncludeFollowingsActivities)
                                      .ConfigureAwait(false);
                 }
                 catch (Exception ex)
@@ -202,4 +225,4 @@
         NetworkError,
         ProtocolError,
     }
-}+}


Update Service.cs

Update Service.cs

--- src/Hprose.RPC/Service.cs
+++ src/Hprose.RPC/Service.cs
@@ -57,7 +57,7 @@
             }
             Add(methodManager.GetNames, "~");
         }
-        public void Bind<T>(T server, string name = null) {
+        public Service Bind<T>(T server, string name = null) {
             if (serverTypes.TryGetValue(typeof(T), out var names)) {
                 foreach (var n in names) {
                     if (name == null || name == n) {
@@ -70,6 +70,7 @@
             else {
                 throw new NotSupportedException("This type server is not supported.");
             }
+            return this;
         }
         public async Task<Stream> Handle(Stream request, Context context) {
             var result = ioManager.Handler(request, context);


Wrapped the `ResolutionManager` calls with try/catch.

As if the nested property data (e.g. Archetype) throws an inner-exception it would throw over the entire Mortar value.

--- Src/Our.Umbraco.Mortar.Courier/DataResolvers/MortarDataResolver.cs
+++ Src/Our.Umbraco.Mortar.Courier/DataResolvers/MortarDataResolver.cs
@@ -9,6 +9,7 @@
 using Our.Umbraco.Mortar.ValueConverters;
 using Our.Umbraco.Mortar.Web.PropertyEditors;
 using Umbraco.Core;
+using Umbraco.Core.Logging;
 using Umbraco.Core.Models;
 using Umbraco.Core.Models.PublishedContent;
 using Umbraco.Courier.Core;
@@ -180,8 +181,15 @@

 			if (direction == Direction.Packaging)
 			{
-				// run the 'fake' item through Courier's data resolvers
-				ResolutionManager.Instance.PackagingItem(fakeItem, propertyItemProvider);
+				try
+				{
+					// run the 'fake' item through Courier's data resolvers
+					ResolutionManager.Instance.PackagingItem(fakeItem, propertyItemProvider);
+				}
+				catch (Exception ex)
+				{
+					LogHelper.Error<MortarDataResolver>(string.Concat("Error packaging data value: ", fakeItem.Name), ex);
+				}

 				// pass up the dependencies
 				if (fakeItem.Dependencies != null && fakeItem.Dependencies.Count > 0)
@@ -193,8 +201,15 @@
 			}
 			else if (direction == Direction.Extracting)
 			{
-				// run the 'fake' item through Courier's data resolvers
-				ResolutionManager.Instance.ExtractingItem(fakeItem, propertyItemProvider);
+				try
+				{
+					// run the 'fake' item through Courier's data resolvers
+					ResolutionManager.Instance.ExtractingItem(fakeItem, propertyItemProvider);
+				}
+				catch (Exception ex)
+				{
+					LogHelper.Error<MortarDataResolver>(string.Concat("Error extracting data value: ", fakeItem.Name), ex);
+				}
 			}

 			// return the resolved data from the 'fake' item


Might help to actually connect handlers

Might help to actually connect handlers

--- Cfa533Rs232Driver/Internal/Cfa533Rs232Connection.cs
+++ Cfa533Rs232Driver/Internal/Cfa533Rs232Connection.cs
@@ -105,9 +105,9 @@
         {
             if (_serialPort == null)
                 return;
-            _serialPort.PinChanged += null;
-            _serialPort.DataReceived += null;
-            _serialPort.ErrorReceived += null;
+            _serialPort.PinChanged += PinChangeHandler;
+            _serialPort.DataReceived += DataReceivedHandler;
+            _serialPort.ErrorReceived += ErrorReceivedHandler;
         }

         private void DisconnectHandlers()


Set Width and Height variable private

Set Width and Height variable private

Set Width and Height variable private

--- QueueDataGraphic/QueueDataGraphic/CSharpFiles/QueueDataGraphic.cs
+++ QueueDataGraphic/QueueDataGraphic/CSharpFiles/QueueDataGraphic.cs
@@ -23,12 +23,12 @@
 		/// <summary>
 		/// Width is the width of Graph
 		/// </summary>
-		int Width;                                                              //	Width variable, Width變數
+		private int Width;                                                      //	Width variable, Width變數

 		/// <summary>
 		/// Height is the height of Graph
 		/// </summary>
-		int Height;																//	Height variable, Height變數
+		private int Height;														//	Height variable, Height變數

 		/// <summary>
 		/// QueueDataGraphic constructor, QueueDataGraphic建構子


Fix logging in DirectoryCopyTask, change directory checking to be the combined process when creating a destination file

--- RelhaxModpack/RelhaxModpack/Automation/Tasks/DirectoryCopyTask.cs
+++ RelhaxModpack/RelhaxModpack/Automation/Tasks/DirectoryCopyTask.cs
@@ -61,7 +61,7 @@

             if (!Directory.Exists(DestinationPath))
             {
-                Logging.Info("Directory {0} does not exist", DestinationPath);
+                Logging.Debug("DestinationPath {0} does not exist, create", DestinationPath);
                 Directory.CreateDirectory(DestinationPath);
             }

@@ -93,16 +93,6 @@
                         Reporter = this.progress
                     };

-                    //create the destination folders at the target
-                    string[] directoreisToCreate = Directory.GetDirectories(DirectoryPath, SearchPattern, recursive? SearchOption.AllDirectories: SearchOption.TopDirectoryOnly);
-                    foreach (string s in directoreisToCreate)
-                    {
-                        if (!Directory.Exists(Path.Combine(DestinationPath, s)))
-                        {
-                            Directory.CreateDirectory(Path.Combine(DestinationPath, s));
-                        }
-                    }
-
                     if (reportingProgress)
                         relhaxProgress.ParrentTotal = searchResults.Count();

@@ -114,7 +104,12 @@
                             relhaxProgress.ParrentCurrent++;
                             (progress as IProgress<RelhaxProgress>).Report(relhaxProgress);
                         }
+
                         string destinationFile = sourceFile.Replace(DirectoryPath, DestinationPath);
+                        string destinationPath = Path.GetDirectoryName(destinationFile);
+                        if (!Directory.Exists(destinationPath))
+                            Directory.CreateDirectory(destinationPath);
+
                         bool result = await fileCopier.CopyFileAsync(sourceFile, destinationFile);
                         if (!result)
                             return;


Fix test which fails due to LinqBridge behavior difference

--- System.Collections.Immutable/tests/ImmutableArrayExtensionsTest.cs
+++ System.Collections.Immutable/tests/ImmutableArrayExtensionsTest.cs
@@ -211,7 +211,11 @@
         {
             // Basis for some assertions that follow
             Assert.Throws<IndexOutOfRangeException>(() => Enumerable.ElementAt(s_empty, 0));
+#if NET35PLUS // .NET Framework
             Assert.Throws<IndexOutOfRangeException>(() => Enumerable.ElementAt(s_manyElements, -1));
+#else // LinqBridge
+            Assert.Throws<ArgumentOutOfRangeException>(() => Enumerable.ElementAt(s_manyElements, -1));
+#endif

             Assert.Throws<NullReferenceException>(() => ImmutableArrayExtensions.ElementAt(s_emptyDefault, 0));
             Assert.Throws<IndexOutOfRangeException>(() => ImmutableArrayExtensions.ElementAt(s_empty, 0));


trying without integrated security (unsupported)

--- src/JabbR-Core/Startup.cs
+++ src/JabbR-Core/Startup.cs
@@ -49,7 +49,8 @@
             //
             // Reference the Configuration API with the key you defined, and your env variable will be referenced.
             //string connection = _configuration["connectionString"];
-            string connection = "Data Source=(localdb)\\MSSQLLocalDB;Initial Catalog=JabbREFTest;Integrated Security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=True;ApplicationIntent=ReadWrite;MultiSubnetFailover=False";
+            //string connection = "Data Source=(localdb)\\MSSQLLocalDB;Initial Catalog=JabbREFTest;Integrated Security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=True;ApplicationIntent=ReadWrite;MultiSubnetFailover=False";
+            string connection = "Data Source=(localdb)\\MSSQLLocalDB;Initial Catalog=JabbREFTest;Connect Timeout=30;Encrypt=False;TrustServerCertificate=True;ApplicationIntent=ReadWrite;MultiSubnetFailover=False";
             services.AddDbContext<JabbrContext>(options => options.UseSqlServer(connection));

             //services.AddEntityFrameworkInMemoryDatabase();


Request Build Message missing prefab check

--- UnityProject/Assets/Scripts/Messages/Client/RequestBuildMessage.cs
+++ UnityProject/Assets/Scripts/Messages/Client/RequestBuildMessage.cs
@@ -37,6 +37,14 @@
 		//if we are building something impassable, check if there is anything on the space other than the performer.
 		var atPosition =
 			MatrixManager.GetAt<RegisterTile>((Vector3Int) SentByPlayer.GameObject.TileWorldPosition(), true);
+
+		if (entry.Prefab == null)
+		{
+			//requires immediate attention, show it regardless of log filter:
+			Logger.Log($"Construction entry is missing prefab for {entry.Name}");
+			yield break;
+		}
+
 		var registerTile = entry.Prefab.GetComponent<RegisterTile>();
 		if (registerTile == null)
 		{


adjust bullet trails to start a little bit closer to the shooter

--- UnityProject/Assets/Scripts/Weapons/Projectiles/BulletBehaviour.cs
+++ UnityProject/Assets/Scripts/Weapons/Projectiles/BulletBehaviour.cs
@@ -80,7 +80,7 @@
 		shooter = controlledByPlayer;

 		transform.parent = controlledByPlayer.transform.parent;
-		Vector3 startPos = new Vector3(dir.x, dir.y, transform.position.z);
+		Vector3 startPos = new Vector3(dir.x, dir.y, transform.position.z) / 2;
 		transform.position += startPos;
 		rigidBody.transform.rotation = Quaternion.AngleAxis(Mathf.Atan2(dir.x, dir.y) * Mathf.Rad2Deg, Vector3.forward);
 		rigidBody.transform.localPosition = Vector3.zero;


delete validationAttributeCore

delete validationAttributeCore

--- ValidationAttributeCore/Strategy/Interface/IValidatableStrategy.cs
+++ ValidationAttributeCore/Strategy/Interface/IValidatableStrategy.cs
@@ -1,10 +0,0 @@
-using DiscoverValidationCore.Model.Context;
-using FluentValidation.Results;
-
-namespace DiscoverValidationCore.Strategy.Interface
-{
-    public interface IValidatableStrategy
-    {
-        void UpdateValidationResuls<T>(DiscoverValidatorContext context, T element, ValidationResult validationResult = null);
-    }
-}


Vectorize MT19937_64 state checks. This time, it's not as much of a relative improvement over MT19937_32 because there wasn't the low-hanging 2x speedup of "just use the native word size", but it's still very noticeable in microbenchmarks.

--- Source/AirBreather.Common/AirBreather.Common/Random/MT19937_64.cs
+++ Source/AirBreather.Common/AirBreather.Common/Random/MT19937_64.cs
@@ -32,6 +32,7 @@
 */
 using System;
 using System.Diagnostics.CodeAnalysis;
+using System.Numerics;

 using static System.FormattableString;

@@ -66,7 +67,7 @@
             else
             {
                 this.data = new ulong[312];
-                Buffer.BlockCopy(copyFrom.data, 0, this.data, 0, 312 * sizeof(ulong));
+                copyFrom.data.CopyTo(this.data);
             }
         }

@@ -85,10 +86,22 @@
                 return false;
             }

+            int end = 312 - (312 % Vector<ulong>.Count);
+            Vector<ulong> accumulatorVector = Vector<ulong>.Zero;
+            for (int i = 0; i < end; i += Vector<ulong>.Count)
+            {
+                accumulatorVector |= new Vector<ulong>(state.data, i);
+            }
+
             ulong accumulator = 0;
-            foreach (ulong value in state.data)
-            {
-                accumulator |= value;
+            for (int i = end; i < 312; ++i)
+            {
+                accumulator |= state.data[i];
+            }
+
+            for (int i = 0; i < Vector<ulong>.Count; ++i)
+            {
+                accumulator |= accumulatorVector[i];
             }

             return accumulator != 0;
@@ -114,11 +127,22 @@
                 return true;
             }

+            int end = 312 - (312 % Vector<ulong>.Count);
+            Vector<ulong> accumulatorVector = Vector<ulong>.Zero;
+            for (int i = 0; i < end; i += Vector<ulong>.Count)
+            {
+                accumulatorVector |= (new Vector<ulong>(first.data, i) ^ new Vector<ulong>(second.data, i));
+            }
+
             ulong accumulator = 0;
-            for (int i = 0; i < 312; i++)
-            {
-                ulong differentBits = first.data[i] ^ second.data[i];
-                accumulator |= differentBits;
+            for (int i = end; i < 312; ++i)
+            {
+                accumulator |= (first.data[i] ^ second.data[i]);
+            }
+
+            for (int i = 0; i < Vector<ulong>.Count; ++i)
+            {
+                accumulator |= accumulatorVector[i];
             }

             return accumulator == 0;
@@ -135,15 +159,25 @@
                 return hashCode;
             }

+            int end = 312 - (312 % Vector<ulong>.Count);
+            Vector<ulong> accumulatorVector = Vector<ulong>.Zero;
+            for (int i = 0; i < end; i += Vector<ulong>.Count)
+            {
+                accumulatorVector ^= new Vector<ulong>(state.data, i);
+            }
+
             ulong accumulator = 0;
-            foreach (ulong value in state.data)
-            {
-                accumulator ^= value;
-            }
-
-            hashCode = hashCode.HashWith(accumulator);
-
-            return hashCode;
+            for (int i = end; i < 312; ++i)
+            {
+                accumulator ^= state.data[i];
+            }
+
+            for (int i = 0; i < Vector<ulong>.Count; ++i)
+            {
+                accumulator ^= accumulatorVector[i];
+            }
+
+            return hashCode.HashWith(accumulator);
         }

         public static string ToString(MT19937_64State state) => Invariant($"{nameof(MT19937_64State)}[]");


No need to skip, its in memory

No need to skip, its in memory

--- Source/EventFlow.EventStores.EventStore.Tests/EventStoreRunner.cs
+++ Source/EventFlow.EventStores.EventStore.Tests/EventStoreRunner.cs
@@ -67,8 +67,7 @@
                 Path.Combine(GetEventStorePath(eventStoreVersion.Key), "EventStore.ClusterNode.exe"),
                 "'admin' user added to $users",
                 "--mem-db=True",
-                "--cluster-size=1",
-                "--skip-db-verify=True");
+                "--cluster-size=1");

             var connectionSettings = ConnectionSettings.Create()
                 .EnableVerboseLogging()


Ensures Current responder is not throwing an exception

--- VisualStudio.ViewInspector.Mac/Services/NSFirstResponderWatcher.cs
+++ VisualStudio.ViewInspector.Mac/Services/NSFirstResponderWatcher.cs
@@ -43,7 +43,14 @@

                 WindowChanged?.Invoke(this, new ObservableWindow(window));

-                CurrentResponder = window.NextResponder;
+                try
+                {
+                    CurrentResponder = window.NextResponder;
+                }
+                catch (Exception ex)
+                {
+
+                }
             }
         }


FunctionSeriesExamples: add 3 new curves

--- Source/Examples/ExampleLibrary/Examples/FunctionSeriesExamples.cs
+++ Source/Examples/ExampleLibrary/Examples/FunctionSeriesExamples.cs
@@ -191,6 +191,20 @@
             return m;
         }

+        [Example("Folium of Descartes")]
+        public static PlotModel DescartesFolium()
+        {
+            // http://www.wolframalpha.com/input/?i=folium+of+Descartes
+
+            var m = new PlotModel("Folium of Descartes") { PlotType = PlotType.Cartesian };
+            m.Axes.Add(new LinearAxis(AxisPosition.Left, -3, 3));
+            m.Axes.Add(new LinearAxis(AxisPosition.Bottom, -3, 3));
+            double a = 1;
+            m.Series.Add(new FunctionSeries(t => 3 * a * t / (t * t * t + 1), t => 3 * a * t * t / (t * t * t + 1), -30, 30, 1001, string.Format("a={0}", a)));
+
+            return m;
+        }
+
         [Example("Trisectrix of Maclaurin")]
         public static PlotModel TrisectrixOfMaclaurin()
         {
@@ -200,6 +214,31 @@
             var m = new PlotModel("Trisectrix of Maclaurin") { PlotType = PlotType.Cartesian };
             double a = 1;
             m.Series.Add(new FunctionSeries(t => a * (t * t - 3) / (t * t + 1), t => a * t * (t * t - 3) / (t * t + 1), -5, 5, 1000));
+            return m;
+        }
+
+        [Example("Fermat's spiral")]
+        public static PlotModel FermatsSpiral()
+        {
+            // http://en.wikipedia.org/wiki/Fermat's_spiral
+            // http://www.wolframalpha.com/input/?i=Fermat%27s+spiral
+            var m = new PlotModel("Fermat's spiral") { PlotType = PlotType.Cartesian };
+            double a = 1;
+            m.Series.Add(new FunctionSeries(t => a * Math.Sqrt(t) * Math.Cos(t), t => a * Math.Sqrt(t) * Math.Sin(t), 0, 20, 1000));
+            m.Series.Add(new FunctionSeries(t => -a * Math.Sqrt(t) * Math.Cos(t), t => -a * Math.Sqrt(t) * Math.Sin(t), 0, 20, 1000));
+            return m;
+        }
+
+        [Example("Fish curve")]
+        public static PlotModel FishCurve()
+        {
+            // http://www.wolframalpha.com/input/?i=fish+curve
+            var m = new PlotModel("Fish curve") { PlotType = PlotType.Cartesian };
+            for (double a = 0.1; a < 1; a += 0.1)
+            {
+                m.Series.Add(new FunctionSeries(t => a * (Math.Cos(t) - Math.Sin(t) * Math.Sin(t) / Math.Sqrt(2)), t => a * Math.Cos(t) * Math.Sin(t), 0, 2 * Math.PI, 1000));
+            }
+
             return m;
         }


fix concurrency issue in remote context

fix concurrency issue in remote context

--- Source/LinqToDB/ServiceModel/RemoteDataContextBase.QueryRunner.cs
+++ Source/LinqToDB/ServiceModel/RemoteDataContextBase.QueryRunner.cs
@@ -120,17 +120,23 @@

 			public override int ExecuteNonQuery()
 			{
-				SetCommand(true);
-
-				var queryContext = Query.Queries[QueryNumber];
-
-				var q = _dataContext.GetSqlOptimizer().OptimizeStatement(queryContext.Statement, _dataContext.MappingSchema);
-
-				var data = LinqServiceSerializer.Serialize(
-					_dataContext.SerializationMappingSchema,
-					q,
-					q.IsParameterDependent ? q.Parameters.ToArray() : queryContext.GetParameters(),
-					QueryHints);
+				string data;
+
+				// locks are bad, m'kay?
+				lock (Query)
+				{
+					SetCommand(true);
+
+					var queryContext = Query.Queries[QueryNumber];
+
+					var q = _dataContext.GetSqlOptimizer().OptimizeStatement(queryContext.Statement, _dataContext.MappingSchema);
+
+					data = LinqServiceSerializer.Serialize(
+						_dataContext.SerializationMappingSchema,
+						q,
+						q.IsParameterDependent ? q.Parameters.ToArray() : queryContext.GetParameters(),
+						QueryHints);
+				}

 				if (_dataContext._batchCounter > 0)
 				{


[Toolkit.Graphics] Add stock SamplerStates with Mirror mode for UVW

--- Source/Toolkit/SharpDX.Toolkit.Graphics/SamplerStateCollection.cs
+++ Source/Toolkit/SharpDX.Toolkit.Graphics/SamplerStateCollection.cs
@@ -43,6 +43,11 @@
         public readonly SamplerState PointClamp;

         /// <summary>
+        /// Point filtering with texture coordinate mirroring.
+        /// </summary>
+        public readonly SamplerState PointMirror;
+
+        /// <summary>
         /// Linear filtering with texture coordinate wrapping.
         /// </summary>
         public readonly SamplerState LinearWrap;
@@ -51,6 +56,11 @@
         /// Linear filtering with texture coordinate clamping.
         /// </summary>
         public readonly SamplerState LinearClamp;
+
+        /// <summary>
+        /// Linear filtering with texture coordinate mirroring.
+        /// </summary>
+        public readonly SamplerState LinearMirror;

         /// <summary>
         /// Anisotropic filtering with texture coordinate wrapping.
@@ -63,6 +73,11 @@
         public readonly SamplerState AnisotropicClamp;

         /// <summary>
+        /// Anisotropic filtering with texture coordinate mirroring.
+        /// </summary>
+        public readonly SamplerState AnisotropicMirror;
+
+        /// <summary>
         /// Initializes a new instance of the <see cref="SamplerStateCollection" /> class.
         /// </summary>
         /// <param name="device">The device.</param>
@@ -70,10 +85,13 @@
         {
             PointWrap = Add(SamplerState.New(device, "PointWrap", Filter.MinMagMipPoint, TextureAddressMode.Wrap));
             PointClamp = Add(SamplerState.New(device, "PointClamp", Filter.MinMagMipPoint, TextureAddressMode.Clamp));
+            PointMirror = Add(SamplerState.New(device, "PointMirror", Filter.MinMagMipPoint, TextureAddressMode.Mirror));
             LinearWrap = Add(SamplerState.New(device, "LinearWrap", Filter.MinMagMipLinear, TextureAddressMode.Wrap));
             LinearClamp = Add(SamplerState.New(device, "LinearClamp", Filter.MinMagMipLinear, TextureAddressMode.Clamp));
+            LinearMirror = Add(SamplerState.New(device, "LinearMirror", Filter.MinMagMipLinear, TextureAddressMode.Mirror));
             AnisotropicWrap = Add(SamplerState.New(device, "AnisotropicWrap", Filter.Anisotropic, TextureAddressMode.Wrap));
             AnisotropicClamp = Add(SamplerState.New(device, "AnisotropicClamp", Filter.Anisotropic, TextureAddressMode.Clamp));
+            AnisotropicMirror = Add(SamplerState.New(device, "AnisotropicMirror", Filter.Anisotropic, TextureAddressMode.Mirror));
             Default = LinearClamp;
         }
     }


Provide better exception if one uses the unsupported [area] token in routes which shoudl be deconstructed

--- Source/WebApi.HypermediaExtensions/JsonSchema/JsonDeserializer.cs
+++ Source/WebApi.HypermediaExtensions/JsonSchema/JsonDeserializer.cs
@@ -75,6 +75,11 @@
                     var basePathTrimmed = TrimFirstPathPart(request.LocalPath);
                     if (!schemaProperyGroup.TemplateMatchers.Any(t => t.TryGetValuesFromRequest(basePathTrimmed, out values)))
                     {
+                        if (request.LocalPath.Contains("[Area]") || request.LocalPath.Contains("[area]"))
+                        {
+                            throw new ArgumentException($"Local path '{request.LocalPath}' contains unsupported tokens. The tokens '[Area]' and '[area]' are not supported. Please replace them with fixed values.");
+                        }
+
                         throw new ArgumentException($"Local path '{request.LocalPath}' does not match any expected route template '{string.Join(",", schemaProperyGroup.TemplateMatchers.Select(r => r.Template.TemplateText))}'");
                     }
                 }


Fix fetching error screenshot

Fix fetching error screenshot

--- Src/Dashboard/Services/TestResults/Queries/FindErrorScreenshot.cs
+++ Src/Dashboard/Services/TestResults/Queries/FindErrorScreenshot.cs
@@ -19,7 +19,6 @@
             return query.Where(x => x.Id == testId)
                 .Fetch(x => x.Pattern)
                 .ThenFetch(x=>x.PatternScreenshot)
-                .FetchMany(x=>x.BlindRegionsSnapshot)
                 .First();
         }
     }


Fixed unit test

Fixed unit test

--- tests/Exceptionless.Api.Tests/IntegrationTestsBase.cs
+++ tests/Exceptionless.Api.Tests/IntegrationTestsBase.cs
@@ -52,8 +52,10 @@
             var builder = new SendBuilder(request);
             configure(builder);

-            if (request.ContentData != null && request.ContentData.GetType() != typeof(string))
-                request.ContentData = new StringContent(_serializer.SerializeToString(request.ContentData), Encoding.UTF8, "application/json");
+            if (request.ContentData != null && !(request.ContentData is HttpContent)) {
+                string mediaType = !String.IsNullOrEmpty(request.ContentType) ? request.ContentType : "application/json";
+                request.ContentData = new StringContent(_serializer.SerializeToString(request.ContentData), Encoding.UTF8, mediaType);
+            }

             return _client.SendAsync(request);
         }


Update EntityRepository.cs

Update EntityRepository.cs

--- TIKSN.Framework.Core/Data/EntityFrameworkCore/EntityRepository.cs
+++ TIKSN.Framework.Core/Data/EntityFrameworkCore/EntityRepository.cs
@@ -22,7 +22,7 @@
                 throw new ArgumentNullException(nameof(entity));
             }

-            this.dbContext.Add(entity);
+            _ = this.dbContext.Add(entity);

             return Task.CompletedTask;
         }


Bugfix...

Bugfix...

--- WWCP_Core/Entities/RoamingProvider/EVSEOperatorRoamingProvider.cs
+++ WWCP_Core/Entities/RoamingProvider/EVSEOperatorRoamingProvider.cs
@@ -1910,6 +1910,8 @@
         public async Task FlushServiceQueues()
         {

+            Console.WriteLine("ServiceCheck, as every " + _ServiceCheckEvery + "ms!");
+
             #region Make a thread local copy of all data

             //ToDo: AsyncLocal is currently not implemented in Mono!
@@ -1978,6 +1980,14 @@

             }

+            else
+            {
+
+                Console.WriteLine("ServiceCheckLock missed!");
+                ServiceCheckTimer.Change(_ServiceCheckEvery, Timeout.Infinite);
+
+            }
+
             #endregion

             // Upload status changes...
@@ -2101,6 +2111,8 @@
         public async Task FlushStatusQueues()
         {

+            Console.WriteLine("StatusCheck, as every " + _StatusCheckEvery + "ms!");
+
             #region Make a thread local copy of all data

             //ToDo: AsyncLocal is currently not implemented in Mono!
@@ -2129,7 +2141,7 @@
                     EVSEStatusChangesFastQueue.Clear();

                     // Stop the timer. Will be rescheduled by next EVSE status change...
-                    ServiceCheckTimer.Change(Timeout.Infinite, Timeout.Infinite);
+                    StatusCheckTimer.Change(Timeout.Infinite, Timeout.Infinite);

                 }
                 catch (Exception e)
@@ -2149,6 +2161,14 @@

             }

+            else
+            {
+
+                Console.WriteLine("StatusCheckLock missed!");
+                StatusCheckTimer.Change(_StatusCheckEvery, Timeout.Infinite);
+
+            }
+
             #endregion

             // Upload status changes...


Refactor code

Refactor code

--- WalletWasabi/Tor/Socks5/Models/Fields/OctetFields/AuthVerField.cs
+++ WalletWasabi/Tor/Socks5/Models/Fields/OctetFields/AuthVerField.cs
@@ -1,22 +1,16 @@
-using WalletWasabi.Helpers;
 using WalletWasabi.Tor.Socks5.Models.Bases;

 namespace WalletWasabi.Tor.Socks5.Models.Fields.OctetFields
 {
 	public class AuthVerField : OctetSerializableBase
 	{
+		public static AuthVerField Version1 = new AuthVerField(0x01);
+
 		public AuthVerField(byte value)
 		{
 			ByteValue = value;
 		}

-		public AuthVerField(int value)
-		{
-			ByteValue = (byte)Guard.InRangeAndNotNull(nameof(value), value, 0, 255);
-		}
-
-		public static AuthVerField Version1 => new AuthVerField(1);
-
 		public int Value => ByteValue;
 	}
 }


Extract view models to separate unit.

Extract view models to separate unit.

--- YetAnotherChartComponent/YetAnotherChartComponent/Support/Core.cs
+++ YetAnotherChartComponent/YetAnotherChartComponent/Support/Core.cs
@@ -1,6 +1,5 @@
 using System;
 using System.Collections.Generic;
-using System.ComponentModel;
 using System.ComponentModel.DataAnnotations;
 using Windows.Foundation;
 using Windows.UI.Xaml;
@@ -766,109 +765,4 @@
 		}
 	}
 	#endregion
-	#region ViewModelBase
-	/// <summary>
-	/// Very lightweight VM base class.
-	/// </summary>
-	public abstract class ViewModelBase : INotifyPropertyChanged {
-		/// <summary>
-		/// Implemented for <see cref="Windows.UI.Xaml.Data.INotifyPropertyChanged"/>.
-		/// </summary>
-		public event PropertyChangedEventHandler PropertyChanged;
-		#region helpers
-		/// <summary>
-		/// Hit the <see cref="PropertyChanged"/> event.
-		/// </summary>
-		/// <param name="prop">Property that changed.</param>
-		protected void Changed(String prop) {
-			PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(prop));
-		}
-		#endregion
-	}
-	#endregion
-	#region Shims
-	/// <summary>
-	/// "Internal" VM used as the <see cref="FrameworkElement.DataContext"/> for a <see cref="DataTemplate"/> used by a <see cref="ChartComponent"/>.
-	/// </summary>
-	public class DataTemplateShim : ViewModelBase {
-		#region data
-		Visibility _vis;
-		#endregion
-		#region properties
-		/// <summary>
-		/// Current visibility.
-		/// </summary>
-		public Visibility Visibility { get { return _vis; } set { _vis = value; Changed(nameof(Visibility)); } }
-		#endregion
-	}
-	/// <summary>
-	/// VM for a text label context.
-	/// </summary>
-	public class TextShim : DataTemplateShim {
-		#region data
-		String _text;
-		#endregion
-		#region properties
-		/// <summary>
-		/// Current text.
-		/// </summary>
-		public String Text { get { return _text; } set { _text = value; Changed(nameof(Text)); } }
-		#endregion
-	}
-	/// <summary>
-	/// VM shim for a custom label context.
-	/// </summary>
-	public class ObjectShim : TextShim {
-		#region data
-		object _value;
-		#endregion
-		#region properties
-		/// <summary>
-		/// Additional custom state.
-		/// </summary>
-		public object CustomValue { get { return _value; } set { _value = value; Changed(nameof(CustomValue)); } }
-		#endregion
-	}
-	/// <summary>
-	/// VM shim for a path.
-	/// User must manually bind the <see cref="Transform"/> or otherwise assign it to <see cref="Geometry"/> outside this VM.
-	/// </summary>
-	/// <typeparam name="G">Geometry expected.</typeparam>
-	public class GeometryShim<G> : DataTemplateShim where G: Geometry {
-		#region data
-		G _gx;
-		Transform _matx;
-		#endregion
-		#region properties
-		/// <summary>
-		/// Render transform origin.
-		/// Does Not do change notification.
-		/// Default is (.5,.5) in NDC.
-		/// </summary>
-		public Point RenderTransformOrigin { get; set; } = new Point(.5, .5);
-		/// <summary>
-		/// Path geometry.
-		/// Also set <see cref="Geometry.Transform"/> if <see cref="GeometryTransform"/> is set.
-		/// </summary>
-		public G PathData {
-			get { return _gx; }
-			set {
-				_gx = value;
-				Changed(nameof(PathData));
-			}
-		}
-		/// <summary>
-		/// Geometry transform.
-		/// Also set <see cref="Geometry.Transform"/> if <see cref="PathData"/> is set.
-		/// </summary>
-		public Transform GeometryTransform {
-			get { return _matx; }
-			set {
-				_matx = value;
-				Changed(nameof(GeometryTransform));
-			}
-		}
-		#endregion
-	}
-	#endregion
 }


Fix SP proj SP-config paths

Fix SP proj SP-config paths

--- sp/Startup.cs
+++ sp/Startup.cs
@@ -46,8 +46,8 @@
                     {
                         EntityId = "https://localhost:5000",
                         SigningCertificates = {new X509Certificate2("idsrv3test.cer")},
-                        SingleSignOnEndpoint = new SamlEndpoint("http://localhost:5000/saml/sso", SamlBindingTypes.HttpRedirect),
-                        SingleLogoutEndpoint = new SamlEndpoint("http://localhost:5000/saml/slo", SamlBindingTypes.HttpRedirect),
+                        SingleSignOnEndpoint = new SamlEndpoint("https://localhost:5000/saml/sso", SamlBindingTypes.HttpRedirect),
+                        SingleLogoutEndpoint = new SamlEndpoint("https://localhost:5000/saml/slo", SamlBindingTypes.HttpRedirect),
                     };

                     // Details about yourself (the SP)


changes

changes

--- inspiration.aspx.cs
+++ inspiration.aspx.cs
@@ -39,6 +39,7 @@
         {
             userPnl.Visible = true;
             switchUserBtn.Visible = true;
+            user.loadUsers(userInfoColl, designerUserList, curUser);
         }
         boardNameLbl.Text = boardName;
         userNameLbl.Text = curUser.Username;


add unit test for multiple catches

add unit test for multiple catches

--- tests/unit/Omego.Extensions.Tests.Unit/EnumerableTests.cs
+++ tests/unit/Omego.Extensions.Tests.Unit/EnumerableTests.cs
@@ -26,5 +26,29 @@
             var enumerable = new[] { -1, 0, 1 }.Select(i => 1 / i);
             enumerable.Catch<int, DivideByZeroException>(e => { }).ShouldAllBeEquivalentTo(new[] { -1, 1 });
         }
+
+        [Fact]
+        public void CatchShouldHandleAllRequestedExceptionsWhenCalledOnAnotherCatch()
+        {
+            var enumerable = new[] { -1, 0, 1 }.Select(
+                i =>
+                    {
+                        if (i == 1)
+                        {
+                            throw new InvalidOperationException();
+                        }
+
+                        return 1 / i;
+                    });
+
+            var dividedByZeroExceptionHandled = false;
+            var invalidOperationExceptionHandled = false;
+
+            enumerable.Catch<int, DivideByZeroException>(ex => dividedByZeroExceptionHandled = true)
+                .Catch<int, InvalidOperationException>(ex => invalidOperationExceptionHandled = true).ToList();
+
+            dividedByZeroExceptionHandled.Should().BeTrue();
+            invalidOperationExceptionHandled.Should().BeTrue();
+        }
     }
 }


Delete frmmatchfingerprint.designer.cs

Delete frmmatchfingerprint.designer.cs

--- frmmatchfingerprint.designer.cs
+++ frmmatchfingerprint.designer.cs
@@ -1,115 +0,0 @@
-namespace FingerColaborator
-{
-    partial class frmMatchFingerPrint
-    {
-        /// <summary>
-        /// Required designer variable.
-        /// </summary>
-        private System.ComponentModel.IContainer components = null;
-
-        /// <summary>
-        /// Clean up any resources being used.
-        /// </summary>
-        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
-        protected override void Dispose(bool disposing)
-        {
-            if (disposing && (components != null))
-            {
-                components.Dispose();
-            }
-            base.Dispose(disposing);
-        }
-
-        #region Windows Form Designer generated code
-
-        /// <summary>
-        /// Required method for Designer support - do not modify
-        /// the contents of this method with the code editor.
-        /// </summary>
-        private void InitializeComponent()
-        {
-            this.panel1 = new System.Windows.Forms.Panel();
-            this.progressBar1 = new System.Windows.Forms.ProgressBar();
-            this.labelTitulo = new System.Windows.Forms.Label();
-            this.pictureBox1 = new System.Windows.Forms.PictureBox();
-            this.labelMuestra = new System.Windows.Forms.Label();
-            this.panel1.SuspendLayout();
-            ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
-            this.SuspendLayout();
-            //
-            // panel1
-            //
-            this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
-            this.panel1.Controls.Add(this.progressBar1);
-            this.panel1.Controls.Add(this.labelTitulo);
-            this.panel1.Controls.Add(this.pictureBox1);
-            this.panel1.Controls.Add(this.labelMuestra);
-            this.panel1.Location = new System.Drawing.Point(7, 6);
-            this.panel1.Name = "panel1";
-            this.panel1.Size = new System.Drawing.Size(140, 227);
-            this.panel1.TabIndex = 26;
-            //
-            // progressBar1
-            //
-            this.progressBar1.Location = new System.Drawing.Point(13, 209);
-            this.progressBar1.Name = "progressBar1";
-            this.progressBar1.Size = new System.Drawing.Size(112, 13);
-            this.progressBar1.TabIndex = 28;
-            //
-            // labelTitulo
-            //
-            this.labelTitulo.AutoSize = true;
-            this.labelTitulo.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
-            this.labelTitulo.Location = new System.Drawing.Point(6, 4);
-            this.labelTitulo.Name = "labelTitulo";
-            this.labelTitulo.Size = new System.Drawing.Size(131, 17);
-            this.labelTitulo.TabIndex = 27;
-            this.labelTitulo.Text = "Compara Huellas";
-            //
-            // pictureBox1
-            //
-            this.pictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
-            this.pictureBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
-            this.pictureBox1.Location = new System.Drawing.Point(13, 52);
-            this.pictureBox1.Name = "pictureBox1";
-            this.pictureBox1.Size = new System.Drawing.Size(112, 155);
-            this.pictureBox1.TabIndex = 22;
-            this.pictureBox1.TabStop = false;
-            //
-            // labelMuestra
-            //
-            this.labelMuestra.AutoSize = true;
-            this.labelMuestra.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
-            this.labelMuestra.Location = new System.Drawing.Point(24, 28);
-            this.labelMuestra.Name = "labelMuestra";
-            this.labelMuestra.Size = new System.Drawing.Size(84, 15);
-            this.labelMuestra.TabIndex = 23;
-            this.labelMuestra.Text = "Coloque dedo";
-            //
-            // frmMatchFingerPrint
-            //
-            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
-            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(156, 240);
-            this.Controls.Add(this.panel1);
-            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
-            this.Name = "frmMatchFingerPrint";
-            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
-            this.Text = "Compara Huellas";
-            this.Load += new System.EventHandler(this.frmMatchFingerPrint_Load);
-            this.panel1.ResumeLayout(false);
-            this.panel1.PerformLayout();
-            ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
-            this.ResumeLayout(false);
-
-        }
-
-        #endregion
-
-        private System.Windows.Forms.Panel panel1;
-        private System.Windows.Forms.Label labelTitulo;
-        private System.Windows.Forms.PictureBox pictureBox1;
-        private System.Windows.Forms.Label labelMuestra;
-        private System.Windows.Forms.ProgressBar progressBar1;
-    }
-}


Fix deserialization of RegEx enabled properties

Fix type mismatch for RegEx (introduced in 6e50301 - my bad, sorry)

--- app/Umbraco/Umbraco.Archetype/Models/ArchetypePreValueProperty.cs
+++ app/Umbraco/Umbraco.Archetype/Models/ArchetypePreValueProperty.cs
@@ -33,6 +33,6 @@
         public bool Required { get; set; }

         [JsonProperty("regEx")]
-        public bool RegEx { get; set; }
+        public string RegEx { get; set; }
     }
 }


fixed typo

fixed typo

--- src/Numerics/Constants.cs
+++ src/Numerics/Constants.cs
@@ -165,7 +165,7 @@
         public const int SizeOfDouble = sizeof(double);

         /// <summary>
-        /// The size of a double in bytes.
+        /// The size of an int in bytes.
         /// </summary>
         public const int SizeOfInt = sizeof(int);


modify: Sequenceのプロパティの文法をC#6.0に変更

modify: Sequenceのプロパティの文法をC#6.0に変更

--- src/Sequencer/Sequence.cs
+++ src/Sequencer/Sequence.cs
@@ -67,7 +67,7 @@
         /// <summary>
         /// シーケンスが持つトラックの列挙子を取得します。
         /// </summary>
-        public IEnumerable<Track> Tracks { get { return this.tracks; } }
+        public IEnumerable<Track> Tracks => this.tracks;

         /// <summary>
         /// ループが開始されると判定されたティックを取得します。


Set assembly version

Set assembly version

--- src/SharedAssemblyInfo.cs
+++ src/SharedAssemblyInfo.cs
@@ -2,9 +2,9 @@

 [assembly: AssemblyCompany("")]
 [assembly: AssemblyProduct("Nancy.MSOwinSecurity")]
-[assembly: AssemblyCopyright("Copyright © Damian Hickey 2013-2014")]
+[assembly: AssemblyCopyright("Copyright © Damian Hickey 2013-2018")]
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyCulture("")]

-[assembly: AssemblyVersion("2.0.0.0")]
-[assembly: AssemblyFileVersion("2.0.0.0")]
+[assembly: AssemblyVersion("3.0.0.0")]
+[assembly: AssemblyFileVersion("3.0.0.0")]


Removed beta tag from v0.11.1

Removed beta tag from v0.11.1

--- src/SharedAssemblyInfo.cs
+++ src/SharedAssemblyInfo.cs
@@ -9,4 +9,4 @@

 [assembly: AssemblyVersion("0.11.1")]
 [assembly: AssemblyFileVersion("0.11.1")]
-[assembly: AssemblyInformationalVersion("0.11.1-beta")]
+[assembly: AssemblyInformationalVersion("0.11.1")]


delegate

delegate

--- src/Kakuro.cs
+++ src/Kakuro.cs
@@ -26,7 +26,7 @@
     }

     public static string DrawGrid(IList<List<ICell>> grid) {
-      return grid.Select(k => DrawRow(k))
+      return grid.Select(DrawRow)
               .Aggregate("", (acc, v) => acc + v);
     }

@@ -116,10 +116,10 @@
       int finalIndex = cells.Count - 1;
       var perms = PermuteAll(cells, total)
               .Where(v => IsPossible(cells.Last(), v[finalIndex]))
-              .Where(v => AllDifferent(v))
+              .Where(AllDifferent)
               .ToList();
       return Transpose(perms)
-              .Select(item => v(item))
+              .Select(v)
               .ToList();
     }


win8: move to TLS protocol

win8: move to TLS protocol

--- src/WinRT/TcpTransport.cs
+++ src/WinRT/TcpTransport.cs
@@ -50,7 +50,7 @@
         {
             SocketProtectionLevel spl = !address.UseSsl ?
                 SocketProtectionLevel.PlainSocket :
-#if NETFX_CORE
+#if NETFX_CORE || WINDOWS_STORE
                 SocketProtectionLevel.Tls12;
 #else
                 SocketProtectionLevel.Ssl;


Need to sort indexing of swhc when using a binary search

--- src/PlugIn.cs
+++ src/PlugIn.cs
@@ -261,8 +261,14 @@
                                                ICommunity initialCommunity)
         {
             int swhc = (int)((SiteVars.SoilFieldCapacity[site] - SiteVars.SoilWiltingPoint[site]) * SiteVars.SoilDepth[site]);
+            //if (!PlugIn.SWHC_List.Contains(swhc))
+            //    PlugIn.SWHC_List.Add(swhc);
+
             if (!PlugIn.SWHC_List.Contains(swhc))
+            {
                 PlugIn.SWHC_List.Add(swhc);
+                PlugIn.SWHC_List.Sort();
+            }
             //PlugIn.ModelCore.UI.WriteLine("SWHC = {0}", swhc);

             InitialBiomass initialBiomass = InitialBiomass.Compute(site, initialCommunity);


FileStream.Unix: open with CLOEXEC unless FileShare.Inheritable set (#10251)

* FileStream.Unix: open with CLOEXEC unless FileShare.Inheritable set

* PR feedback

--- src/mscorlib/shared/System/IO/FileStream.Unix.cs
+++ src/mscorlib/shared/System/IO/FileStream.Unix.cs
@@ -45,7 +45,7 @@
                 _asyncState = new AsyncState();

             // Translate the arguments into arguments for an open call.
-            Interop.Sys.OpenFlags openFlags = PreOpenConfigurationFromOptions(mode, _access, options); // FileShare currently ignored
+            Interop.Sys.OpenFlags openFlags = PreOpenConfigurationFromOptions(mode, _access, share, options);

             // If the file gets created a new, we'll select the permissions for it.  Most Unix utilities by default use 666 (read and
             // write for all), so we do the same (even though this doesn't match Windows, where by default it's possible to write out
@@ -120,9 +120,10 @@
         /// <summary>Translates the FileMode, FileAccess, and FileOptions values into flags to be passed when opening the file.</summary>
         /// <param name="mode">The FileMode provided to the stream's constructor.</param>
         /// <param name="access">The FileAccess provided to the stream's constructor</param>
+        /// <param name="share">The FileShare provided to the stream's constructor</param>
         /// <param name="options">The FileOptions provided to the stream's constructor</param>
         /// <returns>The flags value to be passed to the open system call.</returns>
-        private static Interop.Sys.OpenFlags PreOpenConfigurationFromOptions(FileMode mode, FileAccess access, FileOptions options)
+        private static Interop.Sys.OpenFlags PreOpenConfigurationFromOptions(FileMode mode, FileAccess access, FileShare share, FileOptions options)
         {
             // Translate FileMode.  Most of the values map cleanly to one or more options for open.
             Interop.Sys.OpenFlags flags = default(Interop.Sys.OpenFlags);
@@ -164,6 +165,12 @@
                 case FileAccess.Write:
                     flags |= Interop.Sys.OpenFlags.O_WRONLY;
                     break;
+            }
+
+            // Handle Inheritable, other FileShare flags are handled by Init
+            if ((share & FileShare.Inheritable) == 0)
+            {
+                flags |= Interop.Sys.OpenFlags.O_CLOEXEC;
             }

             // Translate some FileOptions; some just aren't supported, and others will be handled after calling open.


Style clean-up runtime.cs

Style clean-up runtime.cs

--- src/runtime/runtime.cs
+++ src/runtime/runtime.cs
@@ -115,7 +115,7 @@
 #elif PYTHON36
         public const string pyversion = "3.6";
         public const string pyver = "36";
-#elif PYTHON37 // TODO: Add interop37 after Python3.7 is released
+#elif PYTHON37 // TODO: Add `interop37.cs` after PY37 is released
         public const string pyversion = "3.7";
         public const string pyver = "37";
 #else
@@ -154,7 +154,7 @@

         // set to true when python is finalizing
         internal static object IsFinalizingLock = new object();
-        internal static bool IsFinalizing = false;
+        internal static bool IsFinalizing;

         internal static bool Is32Bit;
         internal static bool IsPython2;
@@ -401,7 +401,7 @@
             PyTuple_SetItem(items, 0, obj);
             XIncref(obj);

-            for (int i = 0; i < size; i++)
+            for (var i = 0; i < size; i++)
             {
                 IntPtr item = PyTuple_GetItem(args, i);
                 XIncref(item);
@@ -419,14 +419,14 @@
             IntPtr item;

             IntPtr items = PyTuple_New(size + add);
-            for (int i = 0; i < size; i++)
+            for (var i = 0; i < size; i++)
             {
                 item = PyTuple_GetItem(t, i);
                 XIncref(item);
                 PyTuple_SetItem(items, i, item);
             }

-            for (int n = 0; n < add; n++)
+            for (var n = 0; n < add; n++)
             {
                 item = args[n];
                 XIncref(item);
@@ -447,7 +447,7 @@
             // tuple of (managed or unmanaged) type objects, return a Type[]
             // containing the CLR Type objects that map to those types.
             IntPtr args = arg;
-            bool free = false;
+            var free = false;

             if (!PyTuple_Check(arg))
             {
@@ -458,10 +458,10 @@
             }

             int n = PyTuple_Size(args);
-            Type[] types = new Type[n];
+            var types = new Type[n];
             Type t = null;

-            for (int i = 0; i < n; i++)
+            for (var i = 0; i < n; i++)
             {
                 IntPtr op = PyTuple_GetItem(args, i);
                 if (mangleObjects && (!PyType_Check(op)))
@@ -513,7 +513,7 @@
             Py_IncRef(op);
             return;
 #else
-            void* p = (void*)op;
+            var p = (void*)op;
             if ((void*)0 != p)
             {
                 if (Is32Bit)
@@ -536,7 +536,7 @@
             Py_DecRef(op);
             return;
 #else
-            void* p = (void*)op;
+            var p = (void*)op;
             if ((void*)0 != p)
             {
                 if (Is32Bit)
@@ -562,7 +562,6 @@
                         return;
                     }
                     NativeCall.Impl.Void_Call_1(new IntPtr(f), op);
-                    return;
                 }
             }
 #endif
@@ -570,7 +569,7 @@

         internal static unsafe long Refcount(IntPtr op)
         {
-            void* p = (void*)op;
+            var p = (void*)op;
             if ((void*)0 != p)
             {
                 if (Is32Bit)
@@ -786,15 +785,15 @@
         /// </summary>
         internal static unsafe IntPtr PyObject_TYPE(IntPtr op)
         {
-            void* p = (void*)op;
+            var p = (void*)op;
             if ((void*)0 == p)
             {
                 return IntPtr.Zero;
             }
 #if Py_DEBUG
-            int n = 3;
+            var n = 3;
 #else
-            int n = 1;
+            var n = 1;
 #endif
             if (Is32Bit)
             {
@@ -966,13 +965,13 @@

         internal static IntPtr PyInt_FromInt32(int value)
         {
-            IntPtr v = new IntPtr(value);
+            var v = new IntPtr(value);
             return PyInt_FromLong(v);
         }

         internal static IntPtr PyInt_FromInt64(long value)
         {
-            IntPtr v = new IntPtr(value);
+            var v = new IntPtr(value);
             return PyInt_FromLong(v);
         }

@@ -1285,7 +1284,7 @@

         internal static IntPtr PyUnicode_FromString(string s)
         {
-            return PyUnicode_FromUnicode(s, (s.Length));
+            return PyUnicode_FromUnicode(s, s.Length);
         }

         /// <summary>
@@ -1463,7 +1462,7 @@
 #elif PYTHON3
         internal static bool PyIter_Check(IntPtr pointer)
         {
-            IntPtr ob_type = (IntPtr)Marshal.PtrToStructure(pointer + ObjectOffset.ob_type, typeof(IntPtr));
+            var ob_type = (IntPtr)Marshal.PtrToStructure(pointer + ObjectOffset.ob_type, typeof(IntPtr));
             IntPtr tp_iternext = ob_type + TypeOffset.tp_iternext;
             return tp_iternext != null && tp_iternext != _PyObject_NextNotImplemented;
         }


Add validation for downgrading the shutdown mode

--- src/runtime/runtime.cs
+++ src/runtime/runtime.cs
@@ -312,6 +312,34 @@
             return iternext;
         }

+        /// <summary>
+        /// Tries to downgrade the shutdown mode, if possible.
+        /// The only possibles downgrades are:
+        /// Soft -> Normal
+        /// Reload -> Soft
+        /// Reload -> Normal
+        /// </summary>
+        /// <param name="mode">The desired shutdown mode</param>
+        /// <returns>The `mode` parameter if the downgrade is supported, the ShutdownMode
+        ///  set at initialization otherwise.</returns>
+        static ShutdownMode TryDowngradeShutdown(ShutdownMode mode)
+        {
+            if (
+                mode == Runtime.ShutdownMode
+                || mode == ShutdownMode.Normal
+#if !NETSTANDARD
+                || (mode == ShutdownMode.Soft && Runtime.ShutdownMode == ShutdownMode.Reload)
+#endif
+                )
+            {
+                return mode;
+            }
+            else // we can't downgrade
+            {
+                return Runtime.ShutdownMode;
+            }
+        }
+
         internal static void Shutdown(ShutdownMode mode)
         {
             if (Py_IsInitialized() == 0 || !_isInitialized)
@@ -319,6 +347,11 @@
                 return;
             }
             _isInitialized = false;
+
+            // If the shutdown mode specified is not the the same as the one specified
+            // during Initialization, we need to validate it; we can only downgrade,
+            // not upgrade the shutdown mode.
+            mode = TryDowngradeShutdown(mode);

             var state = PyGILState_Ensure();


Marked Dapper as internal

Marked Dapper as internal

--- mpbOrm/mpbOrm/SqlMapper.cs
+++ mpbOrm/mpbOrm/SqlMapper.cs
@@ -5,6 +5,8 @@
  Note: to build on C# 3.0 + .NET 3.5, include the CSHARP30 compiler symbol (and yes,
  I know the difference between language and runtime versions; this is a compromise).
  */
+
+#define DAPPER_MAKE_PRIVATE

 using System;
 using System.Collections;


Add extra logging for disconnect in DefaultBrokerageMessageHandler

--- Common/Brokerages/DefaultBrokerageMessageHandler.cs
+++ Common/Brokerages/DefaultBrokerageMessageHandler.cs
@@ -49,7 +49,6 @@
         /// </summary>
         /// <param name="algorithm">The running algorithm</param>
         /// <param name="job">The job that produced the algorithm</param>
-        /// <param name="results">The result handler for the algorithm</param>
         /// <param name="api">The api for the algorithm</param>
         /// <param name="initialDelay"></param>
         /// <param name="openThreshold">Defines how long before market open to re-check for brokerage reconnect message</param>
@@ -102,6 +101,8 @@
                     // if any are open then we need to kill the algorithm
                     if (open)
                     {
+                        Log.Trace("DefaultBrokerageMessageHandler.Handle(): Disconnect when exchanges are open, trying to reconnect for " + _initialDelay.TotalMinutes + " minutes.");
+
                         // wait 15 minutes before killing algorithm
                         StartCheckReconnected(_initialDelay, message);
                     }
@@ -129,6 +130,7 @@
                         }

                         var timeUntilNextMarketOpen = nextMarketOpenUtc - DateTime.UtcNow - _openThreshold;
+                        Log.Trace("DefaultBrokerageMessageHandler.Handle(): TimeUntilNextMarketOpen: " + timeUntilNextMarketOpen);

                         // wake up 5 minutes before market open and check if we've reconnected
                         StartCheckReconnected(timeUntilNextMarketOpen, message);


Update HW acceleration & GC reload tooltips to note they won't be exported

--- Core/Other/Settings/TabSettingsAdvanced.Designer.cs
+++ Core/Other/Settings/TabSettingsAdvanced.Designer.cs
@@ -68,7 +68,7 @@
             this.checkHardwareAcceleration.Size = new System.Drawing.Size(134, 17);
             this.checkHardwareAcceleration.TabIndex = 0;
             this.checkHardwareAcceleration.Text = "Hardware Acceleration";
-            this.toolTip.SetToolTip(this.checkHardwareAcceleration, "Uses your graphics card to improve performance.\r\nDisable if you experience issues with rendering.");
+            this.toolTip.SetToolTip(this.checkHardwareAcceleration, "Uses graphics card to improve performance. Disable if you experience\r\nvisual glitches. This option will not be exported in a profile.");
             this.checkHardwareAcceleration.UseVisualStyleBackColor = true;
             //
             // btnEditCefArgs
@@ -172,7 +172,7 @@
             this.checkBrowserGCReload.Size = new System.Drawing.Size(190, 17);
             this.checkBrowserGCReload.TabIndex = 3;
             this.checkBrowserGCReload.Text = "Enable Browser Memory Threshold";
-            this.toolTip.SetToolTip(this.checkBrowserGCReload, "Automatically reloads TweetDeck to save memory. This option only works\r\nif the browser is in a \'default state\', i.e. all modals and drawers are closed,\r\nand all columns are scrolled to top.");
+            this.toolTip.SetToolTip(this.checkBrowserGCReload, "Automatically reloads TweetDeck to save memory. This option only works if\r\nthe browser is in a \'default state\', i.e. all modals and drawers are closed, and\r\nall columns are scrolled to top. This option will not be exported in a profile.");
             this.checkBrowserGCReload.UseVisualStyleBackColor = true;
             //
             // labelApp


Fixed so navigation title is used when moving pages. Fixes #459

--- Core/Piranha/Models/Manager/PageModels/EditModel.cs
+++ Core/Piranha/Models/Manager/PageModels/EditModel.cs
@@ -554,7 +554,7 @@
 					} else {
 						refpage = Page.GetSingle(Page.ParentId, true);
 					}
-					PlaceRef = refpage.Title;
+					PlaceRef = !String.IsNullOrWhiteSpace(refpage.NavigationTitle) ? refpage.NavigationTitle : refpage.Title;
 				}
 			}

@@ -653,7 +653,7 @@
 					ret.Add(new PagePlacement() {
 						Id = s.Id,
 						Level = s.Level,
-						Title = prefix + s.Title,
+						Title = prefix + (!String.IsNullOrWhiteSpace(s.NavigationTitle) ? s.NavigationTitle : s.Title),
 						IsSelected = (p != null && s.Id == p.ParentId)
 					});
 					if (s.Pages.Count > 0)
@@ -678,7 +678,7 @@
 			foreach (var page in sib) {
 				ret.Add(new PagePlacement() {
 					Id = page.Id,
-					Title = page.Title,
+					Title = (!String.IsNullOrWhiteSpace(page.NavigationTitle) ? page.NavigationTitle : page.Title),
 					Seqno = page_parentid == parentid && page.Seqno > page_seqno ? page.Seqno : page.Seqno + 1,
 					IsSelected = page_parentid == parentid && (page.Seqno + 1) == page_seqno
 				});


Fixed NeedleBucket implementation of IBucket

--- Core/Theraot/Collections/ThreadSafe/NeedleBucket.cs
+++ Core/Theraot/Collections/ThreadSafe/NeedleBucket.cs
@@ -493,18 +493,19 @@
             return _entries.TryGet(index, out value);
         }

-        public bool Update(int index, T item, T comparisonItem, out T previous, out bool isEmpty)
-        {
-            TNeedle found;
-            var newNeedle = NeedleReservoir<T, TNeedle>.GetNeedle(item);
-            if (_entries.Update(index, newNeedle, needle => _comparer.Equals(needle.Value, comparisonItem), out found, out isEmpty))
-            {
-                // Null resistant
-                found.TryGetValue(out previous);
-                return true;
+        public bool Update(int index, Func<T, T> itemUpdateFactory, Predicate<T> check, out bool isEmpty)
+        {
+            TNeedle newNeedle = null;
+            Func<TNeedle, TNeedle> replacementFactory = needle => newNeedle = NeedleReservoir<T, TNeedle>.GetNeedle(itemUpdateFactory(needle.Value));
+            Predicate<TNeedle> replacementCheck = needle => check(needle.Value);
+            if (_entries.Update(index, replacementFactory, replacementCheck, out isEmpty))
+            {
+                return true;
+            }
+            if (newNeedle != null)
+            {
             }
             NeedleReservoir<T, TNeedle>.DonateNeedle(newNeedle);
-            found.TryGetValue(out previous);
             return false;
         }


LView.SmallImageList = FNodesImageList; in EnsureCategory was temporarly commented out, and I forgot to uncomment it, that is why icons were not being shown in the toolbox

git-svn-id: 1b52f0a7ed2a8098cb721f3b9b4408691a7bfc16@219 c93b7781-d36b-0e4d-be4f-9d94f2a838be

--- Dataphor/Dataphoria/FormDesigner/ToolBox/ToolBox.cs
+++ Dataphor/Dataphoria/FormDesigner/ToolBox/ToolBox.cs
@@ -113,7 +113,7 @@
                 LView.BorderStyle = BorderStyle.None;
                 LView.IntegratedScrolling = false;
                 LView.ItemYSpacing = 2;
-                //LView.SmallImageList = FNodesImageList;
+                LView.SmallImageList = FNodesImageList;
                 LView.SmallImageView = true;
                 LView.SelectedTextColor = Color.Navy;
                 LView.GroupViewItemSelected += new EventHandler(CategoryGroupViewItemSelected);
@@ -137,11 +137,13 @@

                 if (IsTypeListed(LType))
                 {
-                    LItem = new PaletteItem();
-                    LItem.ClassName = LType.Name;
-                    LItem.Text = LType.Name;
-                    LItem.Description = GetDescription(LType);
-                    LItem.ImageIndex = GetDesignerImage(LType);
+                    LItem = new PaletteItem
+                                {
+                                    ClassName = LType.Name,
+                                    Text = LType.Name,
+                                    Description = GetDescription(LType),
+                                    ImageIndex = GetDesignerImage(LType)
+                                };
                     GroupView LCategory = EnsureCategory(GetDesignerCategory(LType));
                     LCategory.GroupViewItems.Add(LItem);
                 }


implement RectRenderer for ColorCodedBarRenderer

--- Demos/GridViewer/Renderers/ColorCodedBarRenderer.cs
+++ Demos/GridViewer/Renderers/ColorCodedBarRenderer.cs
@@ -1,13 +1,16 @@
 using CSharpGL;
 using System;
 using System.Collections.Generic;
+using System.Drawing;
+using System.IO;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
+using System.Windows.Forms;

 namespace GridViewer
 {
-    class ColorCodedBarRenderer : RendererBase
+    class ColorCodedBarRenderer : UIRenderer
     {
         public CodedColor[] CodedColors { get; private set; }

@@ -17,25 +20,95 @@

         public Renderer[] ValueRenderers { get; private set; }

-        public ColorCodedBarRenderer(CodedColor[] codedColors)
+        public ColorCodedBarRenderer(CodedColor[] codedColors,
+            AnchorStyles anchor, Padding margin,
+            System.Drawing.Size size, int zNear, int zFar)
+            : base(anchor, margin, size, zNear, zFar)
         {
+            if (codedColors == null || codedColors.Length < 1)
+            {
+                throw new ArgumentException();
+            }
+
             this.CodedColors = codedColors;
+            {
+                var shaderCodes = new ShaderCode[2];
+                shaderCodes[0] = new ShaderCode(File.ReadAllText(
+                    @"shaders\CodedColorBarRect.vert"), ShaderType.VertexShader);
+                shaderCodes[1] = new ShaderCode(File.ReadAllText(
+                    @"shaders\CodedColorBarRect.frag"), ShaderType.FragmentShader);
+                var map = new PropertyNameMap();
+                map.Add("in_Position", CodedColorBarRect.strPosition);
+                map.Add("in_Coord", CodedColorBarRect.strCoord);
+                var model = new CodedColorBarRect(codedColors);
+                this.RectRenderer = new Renderer(model, shaderCodes, map);
+            }
             this.ValueRenderers = new Renderer[codedColors.Length];
         }

         protected override void DoInitialize()
         {
-            throw new NotImplementedException();
+            Renderer rectRenderer = this.RectRenderer;
+            if (rectRenderer != null)
+            {
+                rectRenderer.Initialize();
+                Bitmap bitmap = this.CodedColors.GetBitmap(1024);
+                var sampler = new sampler1D();
+                sampler.Initialize(bitmap);
+                bitmap.Dispose();
+                rectRenderer.SetUniform("codedColorSampler", new samplerValue(
+                     BindTextureTarget.Texture1D, sampler.Id, OpenGL.GL_TEXTURE0));
+            }
+
+            Renderer lineRenderer = this.LineRenderer;
+            if (lineRenderer != null) { lineRenderer.Initialize(); }
+
+            Renderer[] valueRenderers = this.ValueRenderers;
+            for (int i = 0; i < valueRenderers.Length; i++)
+            {
+                if (valueRenderers[i] != null)
+                { valueRenderers[i].Initialize(); }
+            }
         }

         protected override void DoRender(RenderEventArgs arg)
         {
-            throw new NotImplementedException();
+            Renderer rectRenderer = this.RectRenderer;
+            if (rectRenderer != null)
+            {
+                mat4 projection = this.GetOrthoProjection();
+                mat4 view = glm.lookAt(new vec3(0, 0, 1), new vec3(0, 0, 0), new vec3(0, 1, 0));
+                float length = Math.Max(this.Size.Width, this.Size.Height);
+                mat4 model = glm.scale(mat4.identity(), new vec3(length, length, length));
+                rectRenderer.SetUniform("mvp", projection * view * model);
+                rectRenderer.Render(arg);
+            }
+
+            Renderer lineRenderer = this.LineRenderer;
+            if (lineRenderer != null) { lineRenderer.Render(arg); }
+
+            Renderer[] valueRenderers = this.ValueRenderers;
+            for (int i = 0; i < valueRenderers.Length; i++)
+            {
+                if (valueRenderers[i] != null)
+                { valueRenderers[i].Render(arg); }
+            }
         }

         protected override void DisposeUnmanagedResources()
         {
-            throw new NotImplementedException();
+            Renderer rectRenderer = this.RectRenderer;
+            if (rectRenderer != null) { rectRenderer.Dispose(); }
+
+            Renderer lineRenderer = this.LineRenderer;
+            if (lineRenderer != null) { lineRenderer.Dispose(); }
+
+            Renderer[] valueRenderers = this.ValueRenderers;
+            for (int i = 0; i < valueRenderers.Length; i++)
+            {
+                if (valueRenderers[i] != null)
+                { valueRenderers[i].Dispose(); }
+            }
         }

     }


Implement GetHashCode

Implement GetHashCode

--- Devices.Controllers.Common/ImageSourceController.cs
+++ Devices.Controllers.Common/ImageSourceController.cs
@@ -43,6 +43,11 @@
             {
                 return (obj is ImageFormat) ? (this.JsonFormat.Stringify() == ((ImageFormat)obj).JsonFormat.Stringify()) : false;
             }
+
+            public override int GetHashCode()
+            {
+                return this.JsonFormat.GetHashCode();
+            }
         }

         private ObservableCollection<BitmapImage> images;


Update to handle undiscovery/unknown systems.

--- EDDiscovery/UserControls/UserControlRouteTracker.cs
+++ EDDiscovery/UserControls/UserControlRouteTracker.cs
@@ -20,7 +20,7 @@
         private string DbSave { get { return "RouteTracker" + ((displaynumber > 0) ? displaynumber.ToString() : ""); } }
         private SavedRouteClass _currentRoute;
         private List<SavedRouteClass> _savedRoutes = new List<SavedRouteClass>();
-        private  HistoryEntry lastHE;
+        private  HistoryEntry currentSystem;
         private string lastsystem;

         public UserControlRouteTracker()
@@ -73,13 +73,13 @@

         public void Display(HistoryList hl)            // when user clicks around..  HE may be null here
         {
-            lastHE = hl.GetLastFSD;
+            currentSystem = hl.GetLastFSD;
             updateScreen();
         }

         private void NewEntry(HistoryEntry l, HistoryList hl)
         {
-            lastHE = hl.GetLastFSD;
+            currentSystem = hl.GetLastFSD;
             updateScreen();
         }

@@ -146,115 +146,127 @@
             }
         }

-        private void updateScreen()
-        {
-            if (lastHE == null)
-                return;
-
+        void DisplayText(String topline, String bottomLine)
+        {
             pictureBox.ClearImageList();
             Color textcolour = IsTransparent ? discoveryform.theme.SPanelColor : discoveryform.theme.LabelColor;
-            Color backcolour = IsTransparent ? Color.Black : this.BackColor;
-            backcolour = IsTransparent ? Color.Transparent : this.BackColor;
-
-            String topline = "Please set a route, by right clicking";
-            string bottomLine = "";
-            if (_currentRoute != null)
-            {
-                topline = _currentRoute.Name;
-                if (_currentRoute.Systems.Count == 0)
-                    return;
-                SystemClass scX = SystemClass.GetSystem(_currentRoute.Systems[_currentRoute.Systems.Count -1]);
-                if (scX != null)
-                {
-                    double distX = SystemClass.Distance(lastHE.System, scX);
-                    //Small hack to pull the jump range from TripPanel1
-                    var jumpRange = SQLiteDBClass.GetSettingDouble("TripPanel1" + "JumpRange", -1.0);
-                    string mesg = "remain";
-                    if (jumpRange > 0)
+            Color backcolour = IsTransparent ? Color.Transparent : this.BackColor;
+            pictureBox.AddTextAutoSize(new Point(10, 5), new Size(1000, 35), topline==null?"":topline, displayfont, textcolour, backcolour, 1.0F);
+            pictureBox.AddTextAutoSize(new Point(10, 35), new Size(1000, 35), bottomLine==null?"": bottomLine, displayfont, textcolour, backcolour, 1.0F);
+            pictureBox.Render();
+        }
+
+        private void updateScreen()
+        {
+            if (currentSystem == null)
+                return;
+
+            if (_currentRoute == null)
+            {
+                DisplayText("Please set a route, by right clicking", "");
+                return;
+            }
+
+            if (_currentRoute.Systems.Count == 0)
+            {
+                DisplayText(_currentRoute.Name, "Route contains no waypoints");
+                return;
+            }
+
+            string topline = "";
+            string bottomLine="";
+            string firstSystemName = _currentRoute.Systems[0];
+            SystemClass firstSystem = SystemClass.GetSystem(firstSystemName);
+            SystemClass finalSystem = SystemClass.GetSystem(_currentRoute.Systems[_currentRoute.Systems.Count - 1]);
+            if (finalSystem != null)
+            {
+                string mesg = "remain";
+                double distX = SystemClass.Distance(currentSystem.System, finalSystem);
+                //Small hack to pull the jump range from TripPanel1
+                var jumpRange = SQLiteDBClass.GetSettingDouble("TripPanel1" + "JumpRange", -1.0);
+                if (jumpRange > 0)
+                {
+                    int jumps = (int)Math.Ceiling(distX / jumpRange);
+                    if (jumps > 0)
+                        mesg = "@ " + jumps.ToString() + ((jumps == 1) ? " jump" : " jumps");
+                }
+                topline = String.Format("{0} {1} WPs {2:N2}ly {3}", _currentRoute.Name, _currentRoute.Systems.Count, distX, mesg);
+            }
+            else
+            {
+                topline = String.Format("{0} {1} WPs remain", _currentRoute.Name, _currentRoute.Systems.Count);
+            }
+            SystemClass nearestSystem = null;
+            double minDist = double.MaxValue;
+            int nearestidx = -1;
+            for (int i = 0; i < _currentRoute.Systems.Count; i++)
+            {
+                String sys = _currentRoute.Systems[i];
+                SystemClass sc = SystemClass.GetSystem(sys);
+                if (sc == null)
+                    continue;
+                double dist = SystemClass.Distance(currentSystem.System, sc);
+                if (dist <= minDist)
+                {
+                    if (nearestSystem == null || !nearestSystem.name.Equals(sc.name))
                     {
-                        int jumps = (int)Math.Ceiling(distX / jumpRange);
-                        if (jumps > 0)
-                            mesg = "@ " + jumps.ToString() + ((jumps == 1) ? " jump" : " jumps");
+                        minDist = dist;
+                        nearestidx = i;
+                        nearestSystem = sc;
                     }
-
-                    topline += String.Format(" {0} WPs {1:N2}ly {2}", _currentRoute.Systems.Count, distX, mesg);
-                }
-                //topline += " ," + lastHE.System.name;
-                //String nearestSystem = "";
-                double minDist = double.MaxValue;
-                int nearestidx = -1;
-                SystemClass nearest  =null;
-                for (int i = 0; i < _currentRoute.Systems.Count; i++)
-                {
-                    String sys = _currentRoute.Systems[i];
-                    SystemClass sc = SystemClass.GetSystem(sys);
-                    if (sc == null)
-                        continue;
-                    double dist = SystemClass.Distance(lastHE.System, sc);
-                    if (dist <= minDist )
-                    {
-                        if (nearest == null || !nearest.name.Equals(sc.name))
-                        {
-                            minDist = dist;
-                            nearestidx = i;
-                            nearest = sc;
-                        }
-                    }
-                }
-                if (nearest!=null )
-                {
-                    string name = null;
-                    double dist = 0.0;
-                    int wp = 0;
-
-                    if (nearestidx < _currentRoute.Systems.Count -1)
-                    {
-                        SystemClass next = SystemClass.GetSystem(_currentRoute.Systems[nearestidx + 1]);
-                        double me2next = SystemClass.Distance(lastHE.System, next);
-                        double nearest2next = SystemClass.Distance(nearest, next);
-                        if(me2next > nearest2next)
-                        {
-                            dist = minDist;
-                            wp = nearestidx + 1;
-                            name = nearest.name;
-                        }
-                        else
-                        {
-                            dist = me2next;
-                            wp = nearestidx + 2;
-                            name = next.name;
-                        }
-                    }
-                    else
-                    {
-                        dist = minDist;
-                        wp = nearestidx + 1;
-                        name = nearest.name;
-                    }
-                    bottomLine = String.Format("{0:N2}ly to WP{1}: {2} {3}",
-                        dist, wp, name,
-                        autoCopyWPToolStripMenuItem.Checked?" (AUTO)":"");
-                    if (name.CompareTo(lastsystem) != 0)
-                    {
-                        if (autoCopyWPToolStripMenuItem.Checked)
-                            Clipboard.SetText(name);
-                        if (autoSetTargetToolStripMenuItem.Checked)
-                        {
-                            string targetName;
-                            double x, y, z;
-                            TargetClass.GetTargetPosition(out targetName, out x, out y, out z);
-                            if (name.CompareTo(targetName) != 0)
-                            {
-                                RoutingUtils.setTargetSystem(discoveryform, name, false);
-                            }
-                        }
-                    }
-                    lastsystem = name;
-                }
-            }
-            pictureBox.AddTextAutoSize(new Point(10, 5), new Size(1000, 35), topline, displayfont, textcolour, backcolour, 1.0F);
-            pictureBox.AddTextAutoSize(new Point(10, 35), new Size(1000, 35), bottomLine, displayfont, textcolour, backcolour, 1.0F);
-            pictureBox.Render();
+                }
+            }
+
+
+            string name = null;
+            if (nearestSystem != null && firstSystem != null)
+            {
+                double first2Neasest = SystemClass.Distance(firstSystem, nearestSystem);
+                double first2Me = SystemClass.Distance(firstSystem, currentSystem.System);
+
+                string nextName = null;
+                int wp = nearestidx + 1;
+                if (nearestidx < _currentRoute.Systems.Count - 1)
+                    nextName = _currentRoute.Systems[nearestidx + 1];
+                if (first2Me >= first2Neasest && !String.IsNullOrWhiteSpace(nextName))
+                {
+                    name = nextName;
+                    wp++;
+                }
+                else
+                    name = nearestSystem.name;
+
+                SystemClass nextSystem = SystemClass.GetSystem(name);
+                if (nextSystem == null)
+                {
+                    bottomLine = String.Format("WP{0}: {1} {2}", wp, nextName, autoCopyWPToolStripMenuItem.Checked ? " (AUTO)" : "");
+                }
+                else
+                {
+                    double distance = SystemClass.Distance(currentSystem.System, nextSystem);
+                    bottomLine = String.Format("{0:N2}ly to WP{1}: {2} {3}", distance, wp, name, autoCopyWPToolStripMenuItem.Checked ? " (AUTO)" : "");
+                }
+
+            }else
+            {
+                bottomLine = String.Format("WP{0}: {1} {2}", 1, firstSystemName, autoCopyWPToolStripMenuItem.Checked ? " (AUTO)" : "");
+                name = firstSystemName;
+            }
+            if (name!=null && name.CompareTo(lastsystem) != 0)
+            {
+                if (autoCopyWPToolStripMenuItem.Checked)
+                    Clipboard.SetText(name);
+                if (autoSetTargetToolStripMenuItem.Checked)
+                {
+                    string targetName;
+                    double x, y, z;
+                    TargetClass.GetTargetPosition(out targetName, out x, out y, out z);
+                    if (name.CompareTo(targetName) != 0)
+                        RoutingUtils.setTargetSystem(discoveryform, name, false);
+                }
+            }
+            lastsystem = name;
+            DisplayText(topline, bottomLine);
         }

         private void autoCopyWPToolStripMenuItem_CheckedChanged(object sender, EventArgs e)


Fix potential crash, if status key removed while not locked

--- Exrin/Exrin.Framework/Framework/ViewModelExecute.cs
+++ Exrin/Exrin.Framework/Framework/ViewModelExecute.cs
@@ -7,36 +7,36 @@
     using System.Runtime.CompilerServices;
     using System.Threading;
     using System.Threading.Tasks;
-
+
     public static partial class Process
     {
-		public static IRelayCommand ViewModelExecute(this IExecution sender, Func<object, CancellationToken, Task<IList<IResult>>> operation, int timeout = 10000, [CallerMemberName] string name = "", object precheck = null)
-		{
-			var operationList = new List<IBaseOperation>()
-			{
-				new SingleOperation() { Function = operation }
-			};
-
-			var execute = new BaseViewModelExecute(operationList);
-
-			return new RelayCommand(async (parameter) =>
-			{
-				await ViewModelExecute(sender,
-										operations: execute.Operations,
-										handleTimeout: sender.HandleTimeout,
-										handleUnhandledException: sender.HandleUnhandledException,
-										insights: sender.Insights,
-										notifyActivityFinished: sender.NotifyActivityFinished,
-										notifyOfActivity: sender.NotifyOfActivity,
-										timeoutMilliseconds: timeout,
-										name: name,
-										parameter: parameter,
-										precheck: precheck);
-			})
-			{ Timeout = timeout, Function= operation };
-		}
-
-		public static IRelayCommand ViewModelExecute(this IExecution sender, List<IResult> result, [CallerMemberName] string name = "", object precheck = null)
+        public static IRelayCommand ViewModelExecute(this IExecution sender, Func<object, CancellationToken, Task<IList<IResult>>> operation, int timeout = 10000, [CallerMemberName] string name = "", object precheck = null)
+        {
+            var operationList = new List<IBaseOperation>()
+            {
+                new SingleOperation() { Function = operation }
+            };
+
+            var execute = new BaseViewModelExecute(operationList);
+
+            return new RelayCommand(async (parameter) =>
+            {
+                await ViewModelExecute(sender,
+                                        operations: execute.Operations,
+                                        handleTimeout: sender.HandleTimeout,
+                                        handleUnhandledException: sender.HandleUnhandledException,
+                                        insights: sender.Insights,
+                                        notifyActivityFinished: sender.NotifyActivityFinished,
+                                        notifyOfActivity: sender.NotifyOfActivity,
+                                        timeoutMilliseconds: timeout,
+                                        name: name,
+                                        parameter: parameter,
+                                        precheck: precheck);
+            })
+            { Timeout = timeout, Function = operation };
+        }
+
+        public static IRelayCommand ViewModelExecute(this IExecution sender, List<IResult> result, [CallerMemberName] string name = "", object precheck = null)
         {
             return ViewModelExecute(sender, new BaseViewModelExecute(new List<IBaseOperation>() { new SingleOperation() { Function = (p, t) => {
                 IList<IResult> list = result;
@@ -47,7 +47,7 @@
         public static IRelayCommand ViewModelExecute(this IExecution sender, List<IResult> result, int timeout, [CallerMemberName] string name = "", object precheck = null)
         {
             return ViewModelExecute(sender, new BaseViewModelExecute(new List<IBaseOperation>() { new SingleOperation() { Function = (p, t) => {
-                IList<IResult> list = result;
+                IList<IResult> list = result;
                 return Task.FromResult(list);
                 } } }), timeout, null, name, precheck);
         }
@@ -68,7 +68,7 @@
         {
             return ViewModelExecute(sender, execute, -1, null, name, precheck);
         }
-
+
         public static IRelayCommand ViewModelExecute(this IExecution sender, List<IResult> result, Func<object, bool> canExecute, [CallerMemberName] string name = "", object precheck = null)
         {
             return ViewModelExecute(sender, new BaseViewModelExecute(new List<IBaseOperation>() { new SingleOperation() { Function = (p, t) => {
@@ -99,7 +99,7 @@
         {
             return ViewModelExecute(sender, execute, -1, canExecute, name, precheck);
         }
-
+
         public static IRelayCommand ViewModelExecute(this IExecution sender, IViewModelExecute execute, int timeout, Func<object, bool> canExecute, [CallerMemberName] string name = "", object precheck = null)
         {
             return new RelayCommand(async (param) =>
@@ -114,7 +114,7 @@
                                         timeoutMilliseconds: timeout == -1 ? execute.TimeoutMilliseconds : timeout,
                                         name: name,
                                         parameter: param,
-										precheck: precheck);
+                                        precheck: precheck);
             }, canExecute)
             { Timeout = execute.TimeoutMilliseconds };

@@ -132,7 +132,7 @@
                  IApplicationInsights insights = null,
                  string name = "",
                  object parameter = null,
-				 object precheck = null)
+                 object precheck = null)
         {
             // If currently executing, ignore the latest request
             lock (sender)
@@ -152,7 +152,7 @@
                 throw new Exception($"{nameof(notifyOfActivity)} is null: You must notify the user that something is happening");

             await notifyOfActivity();
-
+
             // Background thread
             var insightTask = Task.Run(() =>
             {
@@ -167,16 +167,16 @@
                 }
             }).ConfigureAwait(false);

-			if (sender.PreCheck != null)
-			{
-				var result = await Task.Run(async () =>
-				{
-					return await sender.PreCheck(precheck);
-				}).ConfigureAwait(false);
-
-				if (result == false)
-					return; // Exit execution
-			}
+            if (sender.PreCheck != null)
+            {
+                var result = await Task.Run(async () =>
+                {
+                    return await sender.PreCheck(precheck);
+                }).ConfigureAwait(false);
+
+                if (result == false)
+                    return; // Exit execution
+            }

             await Task.Run(async () =>
             {
@@ -221,7 +221,7 @@
                             {
                                 try
                                 {
-									await op.Function(results, parameter, task.Token);
+                                    await op.Function(results, parameter, task.Token);
                                 }
                                 catch
                                 {
@@ -238,8 +238,8 @@
                             {
                                 if (op.Function != null)
                                 {
-									var resultList = await op.Function(parameter, task.Token);
-									if (resultList != null)
+                                    var resultList = await op.Function(parameter, task.Token);
+                                    if (resultList != null)
                                         foreach (var result in resultList)
                                             results.Add(result);
                                 }
@@ -302,16 +302,17 @@
                         }
                         catch (Exception e)
                         {
-							if (handleUnhandledException == null)
-								throw;
-
-							var handled = await handleUnhandledException(e);
+                            if (handleUnhandledException == null)
+                                throw;
+
+                            var handled = await handleUnhandledException(e);
                             if (!handled)
                                 throw;
                         }
                         finally
                         {
-                            _status.Remove(sender);
+                            lock (sender)
+                                _status.Remove(sender);
                         }
                     }
                 }