Update ProjectEditorViewModel.Editor.cs

Update ProjectEditorViewModel.Editor.cs

--- src/Core2D/ViewModels/Editor/ProjectEditorViewModel.Editor.cs
+++ src/Core2D/ViewModels/Editor/ProjectEditorViewModel.Editor.cs
@@ -38,7 +38,7 @@
             {
                 return;
             }
-            var input = source ?? _project.GetAllShapes();
+            var input = source?.ToList() ?? _project.GetAllShapes().ToList();
             var shapes = input.Where(s => s.GetType() == shape.GetType() && s != shape).ToList();
             var count = shapes.Count + 1;
             var update = string.IsNullOrEmpty(shape.Name) || input.Any(x => x != shape && x.Name == shape.Name);
@@ -74,7 +74,7 @@

             try
             {
-                if (project?.Databases is null)
+                if (project.Databases.Length == 0)
                 {
                     return;
                 }
@@ -101,7 +101,7 @@
                     else
                     {
                         // Create Imported database.
-                        if (project?.CurrentDatabase is null && shape.Record.Owner is DatabaseViewModel owner)
+                        if (project.CurrentDatabase is null && shape.Record.Owner is DatabaseViewModel owner)
                         {
                             var db = viewModelFactory?.CreateDatabase(
                                 ProjectEditorConfiguration.ImportedDatabaseName,
@@ -111,8 +111,8 @@
                         }

                         // Add missing data record.
-                        shape.Record.Owner = project?.CurrentDatabase;
-                        project?.AddRecord(project?.CurrentDatabase, shape.Record);
+                        shape.Record.Owner = project.CurrentDatabase;
+                        project.AddRecord(project.CurrentDatabase, shape.Record);

                         // Recreate records dictionary.
                         records = GenerateRecordDictionaryById();
@@ -178,7 +178,7 @@

         public void OnNewPage(PageContainerViewModel? selected)
         {
-            if (Project is null)
+            if (Project is null || selected is null)
             {
                 return;
             }
@@ -403,7 +403,7 @@

             try
             {
-                using var stream = fileSystem?.Create(path);
+                using var stream = fileSystem.Create(path);
                 if (stream is null)
                 {
                     return;
@@ -530,7 +530,7 @@
                 {
                     var shapes = Enumerable.Concat(
                         page.Layers.SelectMany(x => x.Shapes),
-                        page.Template?.Layers.SelectMany(x => x.Shapes));
+                        page.Template is null ? Enumerable.Empty<BaseShapeViewModel>() : page.Template.Layers.SelectMany(x => x.Shapes));
                     TryToRestoreRecords(shapes);
                 }

@@ -562,7 +562,7 @@
                 {
                     var shapes = Enumerable.Concat(
                         document.Pages.SelectMany(x => x.Layers).SelectMany(x => x.Shapes),
-                        document.Pages.SelectMany(x => x.Template.Layers).SelectMany(x => x.Shapes));
+                        document.Pages.SelectMany(x => x.Template?.Layers ?? Enumerable.Empty<LayerContainerViewModel>()).SelectMany(x => x.Shapes));
                     TryToRestoreRecords(shapes);
                 }

@@ -603,7 +603,7 @@
             try
             {
                 var json = fileSystem.ReadUtf8Text(path);
-                if (!string.IsNullOrWhiteSpace(json))
+                if (json is not null && !string.IsNullOrWhiteSpace(json))
                 {
                     var item = jsonSerializer.Deserialize<object>(json);
                     if (item is { })
@@ -670,12 +670,12 @@

             try
             {
-                using var stream = fileSystem?.Create(path);
+                using var stream = fileSystem.Create(path);
                 if (stream is null)
                 {
                     return;
                 }
-                writer?.Save(stream, item, Project);
+                writer.Save(stream, item, Project);
             }
             catch (Exception ex)
             {
@@ -693,7 +693,7 @@

             try
             {
-                var csharp = fileSystem?.ReadUtf8Text(path);
+                var csharp = fileSystem.ReadUtf8Text(path);
                 if (!string.IsNullOrWhiteSpace(csharp))
                 {
                     if (Project is null)
@@ -770,12 +770,12 @@
                 return default;
             }

-            using var stream = fileSystem?.Open(path);
+            using var stream = fileSystem.Open(path);
             if (stream is null)
             {
                 return default;
             }
-            var bytes = fileSystem?.ReadBinary(stream);
+            var bytes = fileSystem.ReadBinary(stream);
             if (bytes is null)
             {
                 return default;
@@ -1044,7 +1044,7 @@
                     }
                     else if (string.Compare(ext, ProjectEditorConfiguration.CsvExtension, StringComparison.OrdinalIgnoreCase) == 0)
                     {
-                        var reader = TextFieldReaders.FirstOrDefault(x => x.Extension == "csv");
+                        var reader = TextFieldReaders.FirstOrDefault(r => r.Extension == "csv");
                         if (reader is { })
                         {
                             OnImportData(Project, path, reader);
@@ -1053,7 +1053,7 @@
                     }
                     else if (string.Compare(ext, ProjectEditorConfiguration.XlsxExtension, StringComparison.OrdinalIgnoreCase) == 0)
                     {
-                        var reader = TextFieldReaders.FirstOrDefault(x => x.Extension == "xlsx");
+                        var reader = TextFieldReaders.FirstOrDefault(r => r.Extension == "xlsx");
                         if (reader is { })
                         {
                             OnImportData(Project, path, reader);
@@ -1075,7 +1075,7 @@
                         OnImportSvg(path);
                         result = true;
                     }
-                    else if (ProjectEditorConfiguration.ImageExtensions.Any(x => string.Compare(ext, x, StringComparison.OrdinalIgnoreCase) == 0))
+                    else if (ProjectEditorConfiguration.ImageExtensions.Any(r => string.Compare(ext, r, StringComparison.OrdinalIgnoreCase) == 0))
                     {
                         var key = OnGetImageKey(path);
                         if (key is { } && !string.IsNullOrEmpty(key))
@@ -1107,8 +1107,12 @@
             var selected = Project.CurrentStyleLibrary?.Selected ?? viewModelFactory?.CreateShapeStyle(ProjectEditorConfiguration.DefaulStyleName);
             var style = (ShapeStyleViewModel?)selected?.Copy(null);
             var layer = Project.CurrentContainer?.CurrentLayer;
-            var sx = Project.Options.SnapToGrid ? PointUtil.Snap((decimal)x, (decimal)Project.Options.SnapX) : (decimal)x;
-            var sy = Project.Options.SnapToGrid ? PointUtil.Snap((decimal)y, (decimal)Project.Options.SnapY) : (decimal)y;
+            var sx = Project.Options is not null && Project.Options.SnapToGrid
+                ? PointUtil.Snap((decimal)x, (decimal)Project.Options.SnapX)
+                : (decimal)x;
+            var sy = Project.Options is not null && Project.Options.SnapToGrid
+                ? PointUtil.Snap((decimal)y, (decimal)Project.Options.SnapY)
+                : (decimal)y;

             var image = viewModelFactory?.CreateImageShape((double)sx, (double)sy, style, key);
             if (image is { })
@@ -1181,7 +1185,10 @@
                         if (clone is GroupShapeViewModel group)
                         {
                             var shapes = Project?.CurrentContainer?.CurrentLayer?.Shapes.GetAllShapes<LineShapeViewModel>().ToList();
-                            ServiceProvider.GetService<ISelectionService>()?.TryToConnectLines(shapes, group.Connectors);
+                            if (shapes is not null)
+                            {
+                                ServiceProvider.GetService<ISelectionService>()?.TryToConnectLines(shapes, group.Connectors);
+                            }
                         }
                     }
                 }
@@ -1216,12 +1223,14 @@
                 }
                 else
                 {
-                    var layer = Project?.CurrentContainer?.CurrentLayer;
+                    var layer = Project.CurrentContainer?.CurrentLayer;
                     if (layer is { })
                     {
                         var shapes = layer.Shapes.Reverse();
-                        var radius = Project.Options.HitThreshold / PageState.ZoomX;
-                        var result = ServiceProvider.GetService<IHitTest>()?.TryToGetShape(shapes, new Point2(x, y), radius, PageState.ZoomX);
+                        var radius = Project.Options is not null && PageState is not null
+                            ? Project.Options.HitThreshold / PageState.ZoomX
+                            :  7.0;
+                        var result = ServiceProvider.GetService<IHitTest>()?.TryToGetShape(shapes, new Point2(x, y), radius, PageState?.ZoomX ?? 1.0);
                         if (result is { })
                         {
                             if (bExecute)
@@ -1363,11 +1372,13 @@
                     if (layer is { })
                     {
                         var shapes = layer.Shapes.Reverse();
-                        var radius = Project.Options.HitThreshold / PageState.ZoomX;
-                        var result = ServiceProvider.GetService<IHitTest>().TryToGetShape(shapes, new Point2(x, y), radius, PageState.ZoomX);
+                        var radius = Project.Options is not null && PageState is not null
+                            ? Project.Options.HitThreshold / PageState.ZoomX
+                            :  7.0;
+                        var result = ServiceProvider.GetService<IHitTest>()?.TryToGetShape(shapes, new Point2(x, y), radius, PageState?.ZoomX ?? 1.0);
                         if (result is { })
                         {
-                            if (bExecute == true)
+                            if (bExecute)
                             {
                                 Project.ApplyStyle(result, style);
                             }


inline method.

inline method.

--- src/Features/Core/Portable/AddImport/SymbolReferenceFinder.cs
+++ src/Features/Core/Portable/AddImport/SymbolReferenceFinder.cs
@@ -313,14 +313,25 @@
                 if (!_owner.CanAddImportForMethod(_diagnostic, _syntaxFacts, _node, out var nameNode) &&
                     nameNode != null)
                 {
-                    var symbols = await GetSymbolsAsync(searchScope, nameNode).ConfigureAwait(false);
-                    var methodSymbols = OfType<IMethodSymbol>(symbols);
-
-                    var extensionMethodSymbols = GetViableExtensionMethods(
-                        methodSymbols, nameNode.Parent, searchScope.CancellationToken);
-
-                    var namespaceSymbols = extensionMethodSymbols.SelectAsArray(s => s.WithSymbol(s.Symbol.ContainingNamespace));
-                    return GetNamespaceSymbolReferences(searchScope, namespaceSymbols);
+                    searchScope.CancellationToken.ThrowIfCancellationRequested();
+
+                    // See if the name binds.  If it does, there's nothing further we need to do.
+                    if (!ExpressionBinds(nameNode, checkForExtensionMethods: true, cancellationToken: searchScope.CancellationToken))
+                    {
+                        _syntaxFacts.GetNameAndArityOfSimpleName(nameNode, out var name, out var arity);
+                        if (name != null)
+                        {
+                            var symbols = await searchScope.FindDeclarationsAsync(name, nameNode, SymbolFilter.Member).ConfigureAwait(false);
+
+                            var methodSymbols = OfType<IMethodSymbol>(symbols);
+
+                            var extensionMethodSymbols = GetViableExtensionMethods(
+                                methodSymbols, nameNode.Parent, searchScope.CancellationToken);
+
+                            var namespaceSymbols = extensionMethodSymbols.SelectAsArray(s => s.WithSymbol(s.Symbol.ContainingNamespace));
+                            return GetNamespaceSymbolReferences(searchScope, namespaceSymbols);
+                        }
+                    }
                 }

                 return ImmutableArray<SymbolReference>.Empty;
@@ -333,6 +344,7 @@
                 return GetViableExtensionMethodsWorker(methodSymbols, cancellationToken).WhereAsArray(
                     s => _owner.IsViableExtensionMethod(s.Symbol, expression, _semanticModel, _syntaxFacts, cancellationToken));
             }
+
             private ImmutableArray<SymbolResult<IMethodSymbol>> GetViableExtensionMethods(
                 ImmutableArray<SymbolResult<IMethodSymbol>> methodSymbols,
                 ITypeSymbol typeSymbol, CancellationToken cancellationToken)
@@ -655,25 +667,6 @@
                 return references.ToImmutableAndFree();
             }

-            private Task<ImmutableArray<SymbolResult<ISymbol>>> GetSymbolsAsync(SearchScope searchScope, TSimpleNameSyntax nameNode)
-            {
-                searchScope.CancellationToken.ThrowIfCancellationRequested();
-
-                // See if the name binds.  If it does, there's nothing further we need to do.
-                if (ExpressionBinds(nameNode, checkForExtensionMethods: true, cancellationToken: searchScope.CancellationToken))
-                {
-                    return SpecializedTasks.EmptyImmutableArray<SymbolResult<ISymbol>>();
-                }
-
-                _syntaxFacts.GetNameAndArityOfSimpleName(nameNode, out var name, out var arity);
-                if (name == null)
-                {
-                    return SpecializedTasks.EmptyImmutableArray<SymbolResult<ISymbol>>();
-                }
-
-                return searchScope.FindDeclarationsAsync(name, nameNode, SymbolFilter.Member);
-            }
-
             private ImmutableArray<SymbolResult<T>> OfType<T>(ImmutableArray<SymbolResult<ISymbol>> symbols) where T : ISymbol
             {
                 return symbols.WhereAsArray(s => s.Symbol is T)


updated comments

updated comments

--- src/Features/Core/Portable/SolutionCrawler/WorkCoordinator.cs
+++ src/Features/Core/Portable/SolutionCrawler/WorkCoordinator.cs
@@ -74,7 +74,8 @@
                     _registration.Workspace.DocumentClosed += OnDocumentClosed;
                 }

-                // subscribe to option changed event
+                // subscribe to option changed event after all required fields are set
+                // otherwise, we can get null exception when running OnOptionChanged handler
                 _optionService.OptionChanged += OnOptionChanged;
             }


Fixed Twilio SendSmsAsync method #88.

Fixed Twilio SendSmsAsync method #88.

--- src/Integrations/Warden.Integrations.Twilio/ITwilioService.cs
+++ src/Integrations/Warden.Integrations.Twilio/ITwilioService.cs
@@ -19,7 +19,7 @@

         public async Task SendSmsAsync(string sender, string receiver, string message)
         {
-            await Task.Factory.StartNew(() => _twilioRestClient.SendMessage(sender, receiver, message));
+            await Task.FromResult(_twilioRestClient.SendMessage(sender, receiver, message));
         }
     }
 }


Lucene.Net.TestFramework.Analysis.MockGraphTokenFilter: added new keyword to DEBUG field because of conflict with inherited field.

--- src/Lucene.Net.TestFramework/Analysis/MockGraphTokenFilter.cs
+++ src/Lucene.Net.TestFramework/Analysis/MockGraphTokenFilter.cs
@@ -33,7 +33,7 @@

     public sealed class MockGraphTokenFilter : LookaheadTokenFilter<LookaheadTokenFilter.Position>
     {
-        private static bool DEBUG = false;
+        new private static bool DEBUG = false;

         private readonly ICharTermAttribute TermAtt;


Fix boolean operator.

Fix boolean operator.

--- src/MassiveDynamicProxyGenerator.SimpleInjector/TypeHelper.cs
+++ src/MassiveDynamicProxyGenerator.SimpleInjector/TypeHelper.cs
@@ -22,7 +22,7 @@

         public static bool IsPublicInterface(Type type)
         {
-            return type.GetTypeInfo().IsPublic || type.GetTypeInfo().IsInterface;
+            return type.GetTypeInfo().IsPublic && type.GetTypeInfo().IsInterface;
         }
     }
 }


add type check in .net

add type check in .net

--- csharp/SampleBot/SampleBot/Controllers/MessagesController.cs
+++ csharp/SampleBot/SampleBot/Controllers/MessagesController.cs
@@ -125,7 +125,10 @@
             ConnectorClient connector = new ConnectorClient(new Uri(activity.ServiceUrl));
             try
             {
-                await OnMessageAsync(connector, activity);
+                if (activity.Type == "message")
+                {
+                    await OnMessageAsync(connector, activity);
+                }
             }catch(Exception e)
             {
                 //何かエラーが発生するとログに記録してエラー文を出す


unity ui update

unity ui update

--- unity/UnityUIUtil.cs
+++ unity/UnityUIUtil.cs
@@ -17,6 +17,25 @@
             button.onClick.AddListener(handler);
             return button;
         }
+
+
+        public static Button FindButtonAndAddToggleBehavior(string buttonName, Func<bool> getValue, Action<bool> setValue, Action<bool,Button> updateF )
+        {
+            var button = UnityUtil.FindGameObjectByName(buttonName).GetComponent<Button>();
+            button.onClick.AddListener( () => {
+                bool curState = getValue();
+                setValue(! curState);
+                bool newState = getValue();
+                if (newState != curState)
+                    updateF(newState, button);
+
+            });
+            updateF(getValue(), button);
+            return button;
+        }
+
+
+

         public static InputField FindInputAndAddValueChangedHandler(string inputName, UnityAction<string> handler)


Move focus to listbox

Move focus to listbox

git-tfs-id: [https://mikeward.visualstudio.com/DefaultCollection]$/tweetz5;C1853

--- tweetz5/tweetz5/MainWindow.xaml.cs
+++ tweetz5/tweetz5/MainWindow.xaml.cs
@@ -69,6 +69,7 @@

         private void DragMoveWindow(object sender, MouseButtonEventArgs e)
         {
+            Keyboard.Focus(Timeline.TimelineItems);
             DragMove();
             e.Handled = true;
         }


Fix BDAY line

Fix BDAY line

--- vCardLib/Serializers/Serializer.cs
+++ vCardLib/Serializers/Serializer.cs
@@ -223,8 +223,7 @@
             if (birthDay.HasValue)
             {
                 stringBuilder
-                    .AppendLine("BDAY:")
-                    .Append(birthDay.Value.ToString("yyyy-MM-dd"));
+                    .AppendLine($"BDAY:{birthDay.Value:yyyy-MM-dd}");
             }
         }


branchEndsFIx

branchEndsFIx

--- Mothra/Numerics.cs
+++ Mothra/Numerics.cs
@@ -389,6 +389,26 @@
                             xx[k * 3 + 0, 0] = node.x;
                             xx[k * 3 + 1, 0] = node.y;
                             xx[k * 3 + 2, 0] = node.z;
+                        }
+                        if (branch.endTypeL == branch.endtype.fix && node.numberB[i] == 0)
+                        {
+                            node.x = branch.crv.Points[index].Location.X;
+                            node.y = branch.crv.Points[index].Location.Y;
+                            node.z = branch.sliceL.height;
+                            xx[k * 3 + 0, 0] = node.x;
+                            xx[k * 3 + 1, 0] = node.y;
+                            xx[k * 3 + 2, 0] = node.z;
+
+                        }
+                        if (branch.endTypeL == branch.endtype.fix && node.numberB[i] == branch.crv.Points.Count-1)
+                        {
+                            node.x = branch.crv.Points[index].Location.X;
+                            node.y = branch.crv.Points[index].Location.Y;
+                            node.z = branch.sliceR.height;
+                            xx[k * 3 + 0, 0] = node.x;
+                            xx[k * 3 + 1, 0] = node.y;
+                            xx[k * 3 + 2, 0] = node.z;
+
                         }
                     }
                 }
@@ -1283,6 +1303,14 @@
                     double g = branch.tuples[i].gij[0, 0];
                     double val = coeff(g);
                     branch.tuples[i].SPK[0, 0] = branch.tuples[i].H[0, 0] * val*sScale;
+                    if(branch.tuples[i].SPK[0,0]<0)
+                    {
+                        branch.tuples[i].SPK[0, 0] = 0d;
+                    }
+                    /*if (branch.branchType == branch.type.open)
+                    {
+                        branch.tuples[i].SPK[0, 0] = 0d;
+                    }*/
                     /*if (branch.tuples[i].SPK[0, 0] <= 0)
                     {
                         branch.tuples[i].SPK[0, 0] = 0.00000000000001d;//E-14
@@ -1304,10 +1332,10 @@
                     leaf.tuples[j].computeEigenVectors();
                     var tup = leaf.tuples[j];
                     var det = tup.SPK[0, 0] * tup.SPK[1, 1] - tup.SPK[0, 1] * tup.SPK[1, 0];
-                    /*if (tup.eigenValues[0] < 0 || tup.eigenValues[1] < 0)
-                    {
-                        if (tup.eigenValues[0] < 0) tup.eigenValues[0] = 0.00000000000001d;//E-14
-                        if (tup.eigenValues[1] < 0) tup.eigenValues[1] = 0.00000000000001d;//E-14
+                    if (tup.eigenValues[0] < 0 || tup.eigenValues[1] < 0)
+                    {
+                        if (tup.eigenValues[0] < 0) tup.eigenValues[0] = 0;
+                        if (tup.eigenValues[1] < 0) tup.eigenValues[1] = 0;
                         //P
                         double A11 = tup.eigenVectorsB[0][0];
                         double A12 = tup.eigenVectorsB[0][1];
@@ -1331,7 +1359,7 @@
                         tup.SPK[0, 1] = D11 * tup.Gij[0, 1] + D12 * tup.Gij[1, 1];
                         tup.SPK[1, 0] = D21 * tup.Gij[0, 0] + D22 * tup.Gij[1, 0];
                         tup.SPK[1, 1] = D21 * tup.Gij[1, 0] + D22 * tup.Gij[1, 1];
-                    }*/
+                    }
                     tup.SPK[0, 0] *= sScale;
                     tup.SPK[1, 0] *= sScale;
                     tup.SPK[0, 1] *= sScale;


Set up IWC to query the database for saved connections.

--- Aurora/Modules/Communications/InterWorldComms/InterWorldCommunications.cs
+++ Aurora/Modules/Communications/InterWorldComms/InterWorldCommunications.cs
@@ -18,27 +18,45 @@
 using log4net;
 using OpenSim.Services.Interfaces;
 using OpenMetaverse;
-using OpenMetaverse.StructuredData;
-using Aurora.DataManager;
+using OpenMetaverse.StructuredData;
+using DataManager = Aurora.DataManager.DataManager;
 using GridRegion = OpenSim.Services.Interfaces.GridRegion;

 namespace Aurora.Modules
 {
     public class InterWorldCommunications : ISharedRegionStartupModule
     {
-        #region Declares
-
-        private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
-        private IConfig m_config;
-        private IRegistryCore m_registry;
-        private bool m_Enabled = false;
-        private List<Connection> Connections;
+        #region Declares
+
+        protected static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
+        /// <summary>
+        /// The 'AuroraInterWorldConnectors' config
+        /// </summary>
+        protected IConfig m_config;
+        /// <summary>
+        /// The registry where we can get services
+        /// </summary>
+        protected IRegistryCore m_registry;
+        /// <summary>
+        /// Whether we are enabled or not
+        /// </summary>
+        protected bool m_Enabled = false;
+        /// <summary>
+        /// All connections that we have to other hosts
+        /// (Before sending the initial connection requests,
+        ///   this MAY contain connections that we do not currently have)
+        /// </summary>
+        protected List<Connection> Connections;
+        /// <summary>
+        /// The class that sends requests to other hosts
+        /// </summary>
         public IWCOutgoingConnections OutgoingPublicComms;

         #endregion

-        public string Name { get { return "InterWorldCommunications"; } }
-
+        /// <summary>
+        /// Send an initial request to get secure Urls from any and all connections we have
+        /// </summary>
         private void ContactOtherServers()
         {
             List<Connection> NewConnections = new List<Connection>();
@@ -52,10 +70,18 @@
             Connections = NewConnections;
         }

+        /// <summary>
+        /// Query the database for any connections that we have stored
+        /// </summary>
+        /// <returns></returns>
         private List<Connection> BuildConnections()
         {
-            //We can't get the connections from the database yet
-            return new List<Connection>();
+            List<Connection> connections = new List<Connection>();
+            //Ask the database for the connectors
+            IGenericsConnector genericsConnector = DataManager.DataManager.RequestPlugin<IGenericsConnector>();
+            if (genericsConnector != null)
+                connections = genericsConnector.GetGenerics<Connection>(UUID.Zero, "InterWorldConnections", new Connection());
+            return connections;
         }

         #region ISharedRegionStartupModule Members
@@ -66,6 +92,8 @@
             if (m_config != null)
                 m_Enabled = m_config.GetBoolean("Enabled", false);

+            m_registry = openSimBase.ApplicationRegistry;
+
             if (m_Enabled)
                 scene.RegisterModuleInterface<InterWorldCommunications>(this);
         }
@@ -102,11 +130,8 @@
         #endregion
     }

-    #region Public connectors
-
-    /// <summary>
-    /// This deals with making a secure connection with another instance.
-    /// It calls IWCIncomingPublicConnections on the foreign server.
+    /// <summary>
+    /// This class deals with sending requests to other hosts
     /// </summary>
     public class IWCOutgoingConnections
     {
@@ -152,10 +177,8 @@
         }
     }

-    /// <summary>
-    /// This deals with connections that want to become secure with the current instance.
-    /// This handler is not secure and is public and is called by IWCOutgoingPublicConnections on the foreign server.
-    /// This handler sets up IWCIncomingPrivateConnection, which is secured and protected.
+    /// <summary>
+    /// This class deals with incoming requests (secure and insecure) from other hosts
     /// </summary>
     public class IWCIncomingConnections : BaseStreamHandler
     {
@@ -219,10 +242,12 @@
         #endregion
     }

-    #endregion
-
     #region Connector classes

+    /// <summary>
+    /// The base Connection class
+    /// This deals with saving info about other hosts so that we can contact them
+    /// </summary>
     public class Connection : IDataTransferable
     {
         /// <summary>
@@ -284,6 +309,10 @@
         }
     }

+    /// <summary>
+    /// The trust level enum
+    /// Tells how much we trust another host
+    /// </summary>
     public enum TrustLevel : int
     {
         Full = 4,


Incremented version number

Incremented version number

--- Borderlands2GoldenKeys/Borderlands2GoldenKeys/Views/Shared/_Layout.cshtml
+++ Borderlands2GoldenKeys/Borderlands2GoldenKeys/Views/Shared/_Layout.cshtml
@@ -86,7 +86,7 @@

-                Borderlands 2: Golden Keys v1.0 by Laedit - © @if (DateTime.Now.Year > 2014)
+                Borderlands 2: Golden Keys v1.1 by Laedit - © @if (DateTime.Now.Year > 2014)
                 { <text>2014 - </text>@DateTime.Now.Year }
                 else
                 {@DateTime.Now.Year}


fix count interventi vicinanze

fix count interventi vicinanze

--- src/backend/SO115App.Models/Servizi/CQRS/Queries/GestioneSoccorso/GetCountInterventiVicinanze/GetCountInterventiVicinanzeQueryHandler.cs
+++ src/backend/SO115App.Models/Servizi/CQRS/Queries/GestioneSoccorso/GetCountInterventiVicinanze/GetCountInterventiVicinanzeQueryHandler.cs
@@ -35,8 +35,6 @@
                 UnitaOperative = lstPinNodo
             });

-            result.RemoveAll(i => resultStessaVia.Select(ii => ii.Codice).Contains(i.Codice));
-
             var resultChiuseStessoIndirizzo = _getListaSintesi.GetListaSintesiRichieste(new FiltroRicercaRichiesteAssistenza()
             {
                 UnitaOperative = lstPinNodo,
@@ -49,8 +47,6 @@
                 CountInterventiChiusiStessoIndirizzo = resultChiuseStessoIndirizzo.Count,
                 CountStessaVia = resultStessaVia.Count
             };
-
-            return null;
         }
     }
 }


Fixed issue with mapping, where a filename will get a trailing slash making it a directory.

--- source/Drey.Configuration/ServiceModel/OpenLogFileService.cs
+++ source/Drey.Configuration/ServiceModel/OpenLogFileService.cs
@@ -29,7 +29,7 @@

             Log.DebugFormat("After removing starting slash(es), relative path looks like '{relativePath}'", relativePath);

-            var logFile = Drey.Utilities.PathUtilities.MapPath(Path.Combine(_configurationManager.LogsDirectory, relativePath));
+            var logFile = Path.Combine(Drey.Utilities.PathUtilities.MapPath(_configurationManager.LogsDirectory), relativePath);
             Log.DebugFormat("Absolute path for log file is: {absoluteLogPath}", logFile);

             if (File.Exists(logFile))


fixing spelling mistake in formatting extension method

--- src/App.Metrics.Formatters.Graphite/MetricsHostExtensions.cs
+++ src/App.Metrics.Formatters.Graphite/MetricsHostExtensions.cs
@@ -41,7 +41,7 @@
         /// </summary>
         /// <param name="host">The metrics host builder.</param>
         /// <returns>The metrics host builder</returns>
-        public static IMetricsHostBuilder AddGraphitSerialization(this IMetricsHostBuilder host)
+        public static IMetricsHostBuilder AddGraphiteSerialization(this IMetricsHostBuilder host)
         {
             host.AddGraphiteMetricsSerialization();
             host.AddGraphiteMetricsTextSerialization();


Use info operation message for not testable archives

ARKADE-463

--- src/Arkivverket.Arkade.GUI/ViewModels/TestRunnerViewModel.cs
+++ src/Arkivverket.Arkade.GUI/ViewModels/TestRunnerViewModel.cs
@@ -257,14 +257,14 @@
                         _statusEventHandler.RaiseEventOperationMessage(
                             Resources.GUI.TestrunnerArchiveTestability,
                             string.Format(Resources.GUI.TestrunnerTestingNotImplemented,_archiveType),
-                            OperationMessageStatus.Warning
+                            OperationMessageStatus.Info
                         );
                     else
                         _statusEventHandler.RaiseEventOperationMessage(
                             Resources.GUI.TestrunnerArchiveTestability,
                             string.Format(Resources.GUI.TestrunnerArchiveNotTestable,
                                 ArkadeProcessingArea.LogsDirectory),
-                            OperationMessageStatus.Warning
+                            OperationMessageStatus.Info
                         );
                 }


Added wait to Feature_PostbackConcurrency_RedirectPostbackQueueSpa_PostbackFromPreviousPage test

--- src/DotVVM.Samples.Tests/Feature/PostbackConcurrencyTests.cs
+++ src/DotVVM.Samples.Tests/Feature/PostbackConcurrencyTests.cs
@@ -233,6 +233,7 @@
         {
             RunInAllBrowsers(browser => {
                 browser.NavigateToUrl(SamplesRouteUrls.FeatureSamples_PostbackConcurrency_RedirectPostbackQueueSpa);
+                browser.WaitUntilDotvvmInited();

                 browser.ElementAt("input[type=button]", 0).Click();
                 browser.ElementAt("input[type=button]", 2).Click();


Fixed compilation error - SamplesRouteUrls

--- src/DotVVM.Testing.Abstractions/SamplesRouteUrls.designer.cs
+++ src/DotVVM.Testing.Abstractions/SamplesRouteUrls.designer.cs
@@ -313,7 +313,6 @@
         public const string FeatureSamples_ViewModelProtection_ViewModelProtection = "FeatureSamples/ViewModelProtection/ViewModelProtection";
         public const string FeatureSamples_Warnings_SelfClosingTags = "FeatureSamples/Warnings/SelfClosingTags";
         public const string FeatureSamples_StaticCommand_CustomAwaitable = "FeatureSamples/StaticCommand/CustomAwaitable";
-    }
         public const string FeatureSamples_MarkupControl_StaticCommandInMarkupControl = "/FeatureSamples/MarkupControl/StaticCommandInMarkupControl";
         public const string FeatureSamples_MarkupControl_StaticCommandInMarkupControlCallingRegularCommand = "/FeatureSamples/MarkupControl/StaticCommandInMarkupControlCallingRegularCommand";
         public const string FeatureSamples_MarkupControl_CommandPropertiesInMarkupControl = "/FeatureSamples/MarkupControl/CommandPropertiesInMarkupControl";


removing further tests

removing further tests

--- src/Humanizer.Tests/Localisation/hu/TimeSpanHumanizeTests.cs
+++ src/Humanizer.Tests/Localisation/hu/TimeSpanHumanizeTests.cs
@@ -18,7 +18,6 @@
         }

         [Theory]
-        [InlineData(6, "6 nap")]
         [InlineData(2, "2 nap")]
         [InlineData(1, "1 nap")]
         public void Days(int days, string expected)
@@ -46,8 +45,6 @@
         }

         [Theory]
-        [InlineData(135, "2 perc")]
-        [InlineData(60, "1 perc")]
         [InlineData(2, "2 másodperc")]
         [InlineData(1, "1 másodperc")]
         public void Seconds(int seconds, string expected)


Lucene.Net.Core.Util.Packed.BlockPackedReaderIterator refactor: renamed private/internal fields camelCase

--- src/Lucene.Net.Core/Util/Packed/BlockPackedReaderIterator.cs
+++ src/Lucene.Net.Core/Util/Packed/BlockPackedReaderIterator.cs
@@ -92,14 +92,14 @@
         }

         internal DataInput @in;
-        internal readonly int PackedIntsVersion;
-        internal long ValueCount;
-        internal readonly int BlockSize;
-        internal readonly long[] Values;
-        internal readonly LongsRef ValuesRef;
-        internal byte[] Blocks;
-        internal int Off;
-        internal long Ord_Renamed;
+        internal readonly int packedIntsVersion;
+        internal long valueCount;
+        internal readonly int blockSize;
+        internal readonly long[] values;
+        internal readonly LongsRef valuesRef;
+        internal byte[] blocks;
+        internal int off;
+        internal long ord;

         /// <summary>
         /// Sole constructor. </summary>
@@ -109,10 +109,10 @@
         public BlockPackedReaderIterator(DataInput @in, int packedIntsVersion, int blockSize, long valueCount)
         {
             PackedInts.CheckBlockSize(blockSize, AbstractBlockPackedWriter.MIN_BLOCK_SIZE, AbstractBlockPackedWriter.MAX_BLOCK_SIZE);
-            this.PackedIntsVersion = packedIntsVersion;
-            this.BlockSize = blockSize;
-            this.Values = new long[blockSize];
-            this.ValuesRef = new LongsRef(this.Values, 0, 0);
+            this.packedIntsVersion = packedIntsVersion;
+            this.blockSize = blockSize;
+            this.values = new long[blockSize];
+            this.valuesRef = new LongsRef(this.values, 0, 0);
             Reset(@in, valueCount);
         }

@@ -124,9 +124,9 @@
         {
             this.@in = @in;
             Debug.Assert(valueCount >= 0);
-            this.ValueCount = valueCount;
-            Off = BlockSize;
-            Ord_Renamed = 0;
+            this.valueCount = valueCount;
+            off = blockSize;
+            ord = 0;
         }

         /// <summary>
@@ -134,15 +134,15 @@
         public void Skip(long count)
         {
             Debug.Assert(count >= 0);
-            if (Ord_Renamed + count > ValueCount || Ord_Renamed + count < 0)
+            if (ord + count > valueCount || ord + count < 0)
             {
                 throw new System.IO.EndOfStreamException();
             }

             // 1. skip buffered values
-            int skipBuffer = (int)Math.Min(count, BlockSize - Off);
-            Off += skipBuffer;
-            Ord_Renamed += skipBuffer;
+            int skipBuffer = (int)Math.Min(count, blockSize - off);
+            off += skipBuffer;
+            ord += skipBuffer;
             count -= skipBuffer;
             if (count == 0L)
             {
@@ -150,8 +150,8 @@
             }

             // 2. skip as many blocks as necessary
-            Debug.Assert(Off == BlockSize);
-            while (count >= BlockSize)
+            Debug.Assert(off == blockSize);
+            while (count >= blockSize)
             {
                 int token = @in.ReadByte() & 0xFF;
                 int bitsPerValue = (int)((uint)token >> AbstractBlockPackedWriter.BPV_SHIFT);
@@ -163,10 +163,10 @@
                 {
                     ReadVLong(@in);
                 }
-                long blockBytes = PackedInts.Format.PACKED.ByteCount(PackedIntsVersion, BlockSize, bitsPerValue);
+                long blockBytes = PackedInts.Format.PACKED.ByteCount(packedIntsVersion, blockSize, bitsPerValue);
                 SkipBytes(blockBytes);
-                Ord_Renamed += BlockSize;
-                count -= BlockSize;
+                ord += blockSize;
+                count -= blockSize;
             }
             if (count == 0L)
             {
@@ -174,10 +174,10 @@
             }

             // 3. skip last values
-            Debug.Assert(count < BlockSize);
+            Debug.Assert(count < blockSize);
             Refill();
-            Ord_Renamed += count;
-            Off += (int)count;
+            ord += count;
+            off += (int)count;
         }

         private void SkipBytes(long count)
@@ -189,15 +189,15 @@
             }
             else
             {
-                if (Blocks == null)
-                {
-                    Blocks = new byte[BlockSize];
+                if (blocks == null)
+                {
+                    blocks = new byte[blockSize];
                 }
                 long skipped = 0;
                 while (skipped < count)
                 {
-                    int toSkip = (int)Math.Min(Blocks.Length, count - skipped);
-                    @in.ReadBytes(Blocks, 0, toSkip);
+                    int toSkip = (int)Math.Min(blocks.Length, count - skipped);
+                    @in.ReadBytes(blocks, 0, toSkip);
                     skipped += toSkip;
                 }
             }
@@ -207,16 +207,16 @@
         /// Read the next value. </summary>
         public long Next()
         {
-            if (Ord_Renamed == ValueCount)
+            if (ord == valueCount)
             {
                 throw new System.IO.EndOfStreamException();
             }
-            if (Off == BlockSize)
+            if (off == blockSize)
             {
                 Refill();
             }
-            long value = Values[Off++];
-            ++Ord_Renamed;
+            long value = values[off++];
+            ++ord;
             return value;
         }

@@ -225,23 +225,23 @@
         public LongsRef Next(int count)
         {
             Debug.Assert(count > 0);
-            if (Ord_Renamed == ValueCount)
+            if (ord == valueCount)
             {
                 throw new System.IO.EndOfStreamException();
             }
-            if (Off == BlockSize)
+            if (off == blockSize)
             {
                 Refill();
             }

-            count = Math.Min(count, BlockSize - Off);
-            count = (int)Math.Min(count, ValueCount - Ord_Renamed);
-
-            ValuesRef.Offset = Off;
-            ValuesRef.Length = count;
-            Off += count;
-            Ord_Renamed += count;
-            return ValuesRef;
+            count = Math.Min(count, blockSize - off);
+            count = (int)Math.Min(count, valueCount - ord);
+
+            valuesRef.Offset = off;
+            valuesRef.Length = count;
+            off += count;
+            ord += count;
+            return valuesRef;
         }

         private void Refill()
@@ -258,40 +258,40 @@

             if (bitsPerValue == 0)
             {
-                Arrays.Fill(Values, minValue);
+                Arrays.Fill(values, minValue);
             }
             else
             {
-                PackedInts.IDecoder decoder = PackedInts.GetDecoder(PackedInts.Format.PACKED, PackedIntsVersion, bitsPerValue);
-                int iterations = BlockSize / decoder.ByteValueCount;
+                PackedInts.IDecoder decoder = PackedInts.GetDecoder(PackedInts.Format.PACKED, packedIntsVersion, bitsPerValue);
+                int iterations = blockSize / decoder.ByteValueCount;
                 int blocksSize = iterations * decoder.ByteBlockCount;
-                if (Blocks == null || Blocks.Length < blocksSize)
-                {
-                    Blocks = new byte[blocksSize];
-                }
-
-                int valueCount = (int)Math.Min(this.ValueCount - Ord_Renamed, BlockSize);
-                int blocksCount = (int)PackedInts.Format.PACKED.ByteCount(PackedIntsVersion, valueCount, bitsPerValue);
-                @in.ReadBytes(Blocks, 0, blocksCount);
-
-                decoder.Decode(Blocks, 0, Values, 0, iterations);
+                if (blocks == null || blocks.Length < blocksSize)
+                {
+                    blocks = new byte[blocksSize];
+                }
+
+                int valueCount = (int)Math.Min(this.valueCount - ord, blockSize);
+                int blocksCount = (int)PackedInts.Format.PACKED.ByteCount(packedIntsVersion, valueCount, bitsPerValue);
+                @in.ReadBytes(blocks, 0, blocksCount);
+
+                decoder.Decode(blocks, 0, values, 0, iterations);

                 if (minValue != 0)
                 {
                     for (int i = 0; i < valueCount; ++i)
                     {
-                        Values[i] += minValue;
+                        values[i] += minValue;
                     }
                 }
             }
-            Off = 0;
+            off = 0;
         }

         /// <summary>
         /// Return the offset of the next value to read. </summary>
         public long Ord
         {
-            get { return Ord_Renamed; }
+            get { return ord; }
         }
     }
 }


Use Quartz TimeZoneUtil to enable extending the timezone ids supported

Fixes #1719

--- src/MassTransit.QuartzIntegration/ScheduleMessageConsumer.cs
+++ src/MassTransit.QuartzIntegration/ScheduleMessageConsumer.cs
@@ -11,6 +11,7 @@
     using Newtonsoft.Json;
     using Newtonsoft.Json.Linq;
     using Quartz;
+    using Quartz.Util;
     using Scheduling;
     using Serialization;

@@ -72,7 +73,7 @@
         {
             var tz = TimeZoneInfo.Local;
             if (!string.IsNullOrWhiteSpace(schedule.TimeZoneId) && schedule.TimeZoneId != tz.Id)
-                tz = TimeZoneInfo.FindSystemTimeZoneById(schedule.TimeZoneId);
+                tz = TimeZoneUtil.FindTimeZoneById(schedule.TimeZoneId);

             var triggerBuilder = TriggerBuilder.Create()
                 .ForJob(jobDetail)


Remove unnecessary trim of passed-in command line in interactive debugging (#8594)

--- src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHost.cs
+++ src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHost.cs
@@ -2450,7 +2450,7 @@

                         if (_parent.InDebugMode)
                         {
-                            DebuggerCommandResults results = ProcessDebugCommand(line.Trim(), out e);
+                            DebuggerCommandResults results = ProcessDebugCommand(line, out e);

                             if (results.ResumeAction != null)
                             {


update Demo

update Demo

--- Senparc.Weixin.MP.Sample/Senparc.Weixin.MP.Sample/Views/Home/Index.cshtml
+++ Senparc.Weixin.MP.Sample/Senparc.Weixin.MP.Sample/Views/Home/Index.cshtml
@@ -6,7 +6,7 @@
 {
     <script>
         $(function () {
-            $(".test table td").hover(function () {
+            $(".test table td:not(:empty)").hover(function () {
                 $(this).addClass('currentTestItem');
             }, function () {
                 $(this).removeClass('currentTestItem');


Fixing typo bug.

Fixing typo bug.

--- Source/CILAssemblyManipulator/CILAssemblyManipulator.Physical/MetaData.cs
+++ Source/CILAssemblyManipulator/CILAssemblyManipulator.Physical/MetaData.cs
@@ -1253,7 +1253,7 @@
             table = md.AssemblyReferences;
             break;
          case Tables.File:
-            table = md.FieldDefinitions;
+            table = md.FileReferences;
             break;
          case Tables.ExportedType:
             table = md.ExportedTypes;


PhasorWebUI: Updated tag templates to accept static singleton declared custom action adapter instances.

--- Source/Libraries/Adapters/PhasorWebUI/Views/AddSynchrophasorDevice.cshtml
+++ Source/Libraries/Adapters/PhasorWebUI/Views/AddSynchrophasorDevice.cshtml
@@ -2529,7 +2529,7 @@
                                         return serviceHub.sendCommand("initialize " + adapter.AdapterName);
                                     })
                                     .fail(function (error) {
-                                        showErrorMessage("Save failed for new custom action measurement: " + error);
+                                        showErrorMessage("Save failed for new custom action adapter: " + error);
                                     });
                                 })
                                 .fail(function (error) {
@@ -2572,7 +2572,7 @@
             //    IAA: Current A-Phase Angle     also IBA, ICA, INA                         IPOSA, INEGA, IZA
             //   FREQ: Frequency
             //   FNOM: Model.Global.NominalFrequency
-            //   FAVG: Frequency Average = system singleton where signal reference is "SYSTEM!FREQ-AVG-FQ"
+            //   FAVG: Frequency Average = system singleton where signal reference is "SYSTEM!FREQ-FQ"
             //  FLAGS: Status Flags

             const promises = [];
@@ -2698,7 +2698,7 @@
             }

             return $(promises).whenAll().then(function () {
-                return phasorHub.queryMeasurement(freqDeviceName + "-AVG-FQ");
+                return phasorHub.queryMeasurement(freqDeviceName + "-FQ");
             })
             .then(function (measurement) {
                 if (measurement && measurement.SignalID)
@@ -2708,7 +2708,7 @@
                 dynamicCalculation.initialized = true;
             })
             .fail(function (error) {
-                showErrorMessage("Failed to find average system frequency with SignalReference = '" + freqDeviceName + "-AVG-FQ': " + error);
+                showErrorMessage("Failed to find average system frequency with SignalReference = '" + freqDeviceName + "-FQ': " + error);
             });
         }

@@ -2935,7 +2935,7 @@
                                             return serviceHub.sendCommand("initialize " + adapter.AdapterName);
                                         })
                                         .fail(function (error) {
-                                            showErrorMessage("Save failed for new custom action measurement: " + error);
+                                            showErrorMessage("Save failed for new custom action adapter: " + error);
                                         });
                                     })
                                     .fail(function (error) {
@@ -2960,7 +2960,29 @@
             });
         }

-        function saveTemplateCalculations(cell) {
+        function saveCustomActionAdapter(tagTemplate) {
+            return phasorHub.newCustomActionAdapter().then(function (adapter) {
+                adapter.NodeID = nodeID;
+                adapter.AdapterName = tagTemplate.TagName;
+                adapter.AssemblyName = tagTemplate.Equation;
+                adapter.TypeName = tagTemplate.Type;
+                adapter.ConnectionString = tagTemplate.Inputs.join(";");
+                adapter.LoadOrder = 1;
+                adapter.Enabled = true;
+
+                return phasorHub.addNewOrUpdateCustomActionAdapter(adapter).then(function () {
+                    return serviceHub.sendCommand("initialize " + adapter.AdapterName);
+                })
+                .fail(function (error) {
+                    showErrorMessage("Save failed for new custom action adapter: " + error);
+                });
+            })
+            .fail(function (error) {
+                showErrorMessage("Failed to create new custom action adapter record: " + error);
+            });
+        }
+
+        function saveTemplateCalculations(cell, index) {
             // Do not create calculations if only forwarding data
             if (viewModel.forwardOnly())
                 return $.Deferred().resolve().promise();
@@ -3023,6 +3045,12 @@
                                 case "DYNAMICCALCULATOR":
                                     promises.push(saveDynamicCalculation(cell, tagTemplate, calcSignalType));
                                     break;
+                                default:
+                                    // All other template types are assumed to be custom action adapter defintions. Since
+                                    // these adpater defintions are singletons, only execute save for first device:
+                                    if (index === 0)
+                                        promises.push(saveCustomActionAdapter(tagTemplate));
+                                    break;
                             }
                         }

@@ -3077,7 +3105,7 @@
                                 return phasorHub.updateDevice(device).then(function () {
                                     // Save measurements and calculations associated with a directly edited child device
                                     return saveDeviceMeasurements(cell).then(function () {
-                                        return saveTemplateCalculations(cell);
+                                        return saveTemplateCalculations(cell, index);
                                     });
                                 });
                             }
@@ -3105,7 +3133,7 @@
                                             cell.ID = newDevice.ID;

                                             return saveDeviceMeasurements(cell).then(function () {
-                                                return saveTemplateCalculations(cell);
+                                                return saveTemplateCalculations(cell, index);
                                             });
                                         })
                                         .fail(function (error) {
@@ -3123,7 +3151,7 @@
                                         cell.ID = device.ID;

                                         return saveDeviceMeasurements(cell).then(function () {
-                                            return saveTemplateCalculations(cell);
+                                            return saveTemplateCalculations(cell, index);
                                         });
                                     })
                                     .fail(function (error) {
@@ -3146,7 +3174,7 @@

                 // Save measurements and calculations  associated with a directly connected device
                 return saveDeviceMeasurements(cell).then(function () {
-                    return saveTemplateCalculations(cell);
+                    return saveTemplateCalculations(cell, 0);
                 });
             }
         }


Update doc

Update doc

--- SwCSharpAddinMF/ManipulatorSample/ManipulatorSamplePropertyManagerPage.cs
+++ SwCSharpAddinMF/ManipulatorSample/ManipulatorSamplePropertyManagerPage.cs
@@ -13,6 +13,12 @@

 namespace SwCSharpAddinMF.ManipulatorSample
 {
+    /// <summary>
+    /// This page allows a user to select a body in the model and then move a copy of it around with
+    /// a manipulator. Demonstrates how to listen for change events on the manipulator. Note we have
+    /// wrapped the manipulator interfaces and objects returned by solidworks to provide a nicer
+    /// interface.
+    /// </summary>
     public class ManipulatorSamplePropertyManagerPage : PropertyManagerPageBase<ManipulatorSampleDatabase>
     {
         private IPropertyManagerPageGroup _PageGroup;
@@ -46,17 +52,31 @@

             yield return SingleSelectionChangedObservable<IBody2>((type,mark)=>type==swSelectType_e.swSelSOLIDBODIES)
                 .Finally(()=>Console.WriteLine("Finally"))
-                .SubscribeDisposable((body, yielder) =>
+                .SubscribeDisposable((body, yield) =>
                 {
+                    // The code here execute every time a new selection is made.
+                    // 'yield' is an action that you pass disposable to. These disposables
+                    // will get run before the next time this callback is activated. Thus
+                    // you can use it to "unselect" or destroy any resources made by
+                    // the previous selection.
+
                     if (body == null)
                         return;

+                    // Copy the selected body so we can transform it
                     var newbody = (IBody2) body.Copy();
                     var mathUtility = (IMathUtility)SwApp.GetMathUtility();
+
+                    // Create our triad. This is a custom class to make working with triads easier
                     var triad = new TriadManipulatorTs(ModelDoc);

                     var displayedBody = newbody;
-                    yielder(triad.DoubleChangedObservable.Subscribe(o =>
+
+                    // Listen for changes to the axis. The subscribe callback
+                    // must accept a Tuple<swTriadManipulatorControPoints_e, double> which
+                    // lets you know which control point was changed and what it's
+                    // current value is.
+                    yield(triad.DoubleChangedObservable.Subscribe(o =>
                     {
                         var handleIndex = o.Item1;
                         var transform = triad.CreateTranslationTransform(handleIndex,mathUtility,o.Item2);
@@ -71,20 +91,31 @@
                         ((IModelView)ModelDoc.ActiveView).GraphicsRedraw(null);

                     }));
-                    yielder(triad.EndDragObservable.Subscribe(handle =>
+
+                    // Listen for end drag so we can move the triad to the
+                    // new position.
+                    yield(triad.EndDragObservable.Subscribe(handle =>
                     {
                         newbody = displayedBody;
                         SetManipulatorPositionToBodyCenter(SwApp,triad,newbody, ModelDoc);
                         GC.Collect();

                     }));
+
                     SetManipulatorPositionToBodyCenter(SwApp, triad, body, ModelDoc);
+
+                    // Show the triad and register it to be removed if the selection changes
                     triad.Show(ModelDoc);
-                    yielder(Disposable.Create(triad.Remove));
+                    yield(Disposable.Create(triad.Remove));

+                    // Display the copied body and register for the current copied
+                    // body to be removed if the selection changes.
                     displayedBody.DisplayTs(ModelDoc);
-                    yielder(Disposable.Create(() => displayedBody.Hide(ModelDoc)));
-                    yielder(body.HideBodyUndoable());
+                    yield(Disposable.Create(() => displayedBody.Hide(ModelDoc)));
+
+                    // Hide the selected body and register it to be shown again
+                    // if the selection changes
+                    yield(body.HideBodyUndoable());

                 });


fixed slowness when editing occlusion mesh rotation

--- UMAProject/Assets/UMA/Core/StandardAssets/UMA/Scripts/GeometrySelector.cs
+++ UMAProject/Assets/UMA/Core/StandardAssets/UMA/Scripts/GeometrySelector.cs
@@ -289,7 +289,7 @@
             Vector3[] newVerts = new Vector3[_occlusionMesh.vertexCount];
             for (int i = 0; i < _occlusionMesh.vertexCount; i++)
             {
-                newVerts[i] = _occlusionMesh.vertices[i] + (_occlusionMesh.normals[i].normalized * offset);
+                newVerts[i] = verts[i] + (normals[i].normalized * offset);
                 newVerts[i] = rotation * (newVerts[i]); //we assume to always be at (0,0,0)
             }
             _occlusionMesh.vertices = newVerts;


Resolve Merge Problems

Resolve Merge Problems

--- src/SFA.DAS.EmployerAccounts.UnitTests/Queries/GetPagedEmployerAccounts/WhenIGetPagedEmployerAccounts.cs
+++ src/SFA.DAS.EmployerAccounts.UnitTests/Queries/GetPagedEmployerAccounts/WhenIGetPagedEmployerAccounts.cs
@@ -1,9 +1,6 @@
 using System;
 using System.Collections.Generic;
 using System.Threading.Tasks;
-using System.Web.Util;
-using ClosedXML.Excel;
-using MediatR;
 using Moq;
 using NUnit.Framework;
 using SFA.DAS.EmployerAccounts.Data;


Update error message for total cost

Update error message for total cost

Changed error message on bulk upload for total cost.

--- src/SFA.DAS.ProviderApprenticeshipsService.Web/Validation/Text/BulkUploadApprenticeshipValidationText.cs
+++ src/SFA.DAS.ProviderApprenticeshipsService.Web/Validation/Text/BulkUploadApprenticeshipValidationText.cs
@@ -42,7 +42,7 @@
             new ValidationMessage("You must not enter an end date that's earlier than today's date", "LearnPlanEndDate_03");

         public ValidationMessage TrainingPrice01 =>
-            new ValidationMessage("You must enter the total cost of training", "TrainingPrice_01");
+            new ValidationMessage("You must enter the total cost of training in whole pounds - don't include any symbols, characters or letters", "TrainingPrice_01");
         public ValidationMessage TrainingPrice02 =>
             new ValidationMessage("The total cost must be £100,000 or less", "TrainingPrice_02");


Test for many partial_field queries.

Test for many partial_field queries.

--- src/Nest.Tests.Unit/Search/SearchOptions/SearchOptionTests.cs
+++ src/Nest.Tests.Unit/Search/SearchOptions/SearchOptionTests.cs
@@ -158,6 +158,25 @@
             Assert.True(json.JsonEquals(expected));
         }

+        [Test]
+        public void TestManyPartialFields()
+        {
+            var s = new SearchDescriptor<ElasticSearchProject>()
+                .PartialFields(x => x.PartialField("partial1").Include("id"), x => x.PartialField("partial2").Exclude("id"));
+            var json = TestElasticClient.Serialize(s);
+            var expected = @"{
+                partial_fields: {
+                    ""partial1"" : {
+                        ""include"" : [ ""id"" ]
+                    },
+                    ""partial2"" : {
+                        ""exclude"" : [ ""id"" ]
+                    }
+                }
+            }";
+            Assert.True(json.JsonEquals(expected));
+        }
+
 		[Test]
 		public void TestSort()
 		{


Use tenant prefix when building menus

Use tenant prefix when building menus

--- src/Orchard.Web/Core/Navigation/Services/NavigationManager.cs
+++ src/Orchard.Web/Core/Navigation/Services/NavigationManager.cs
@@ -4,6 +4,7 @@
 using System.Web.Mvc;
 using System.Web.Routing;
 using Orchard.ContentManagement;
+using Orchard.Environment.Configuration;
 using Orchard.Logging;
 using Orchard.Security;
 using Orchard.Security.Permissions;
@@ -19,6 +20,7 @@
         private readonly IEnumerable<INavigationFilter> _navigationFilters;
         private readonly UrlHelper _urlHelper;
         private readonly IOrchardServices _orchardServices;
+        private readonly ShellSettings _shellSettings;

         public NavigationManager(
             IEnumerable<INavigationProvider> navigationProviders,
@@ -26,13 +28,15 @@
             IAuthorizationService authorizationService,
             IEnumerable<INavigationFilter> navigationFilters,
             UrlHelper urlHelper,
-            IOrchardServices orchardServices) {
+            IOrchardServices orchardServices,
+            ShellSettings shellSettings) {
             _navigationProviders = navigationProviders;
             _menuProviders = menuProviders;
             _authorizationService = authorizationService;
             _navigationFilters = navigationFilters;
             _urlHelper = urlHelper;
             _orchardServices = orchardServices;
+            _shellSettings = shellSettings;
             Logger = NullLogger.Instance;
         }

@@ -90,6 +94,9 @@
                 !(url.StartsWith("/") || schemes.Any(scheme => url.StartsWith(scheme + ":")))) {
                 if (url.StartsWith("~/")) {
                     url = url.Substring(2);
+                    if (!String.IsNullOrEmpty(_shellSettings.RequestUrlPrefix)) {
+                        url = _shellSettings.RequestUrlPrefix + "/" + url;
+                    }
                 }
                 if (!url.StartsWith("#")) {
                     var appPath = _urlHelper.RequestContext.HttpContext.Request.ApplicationPath;


2110.3

--- src/PixelFarm/BackEnd.TreeCollection/HeightTree/HeightTree.cs
+++ src/PixelFarm/BackEnd.TreeCollection/HeightTree/HeightTree.cs
@@ -688,6 +688,8 @@
         }
     }

+
+
     public class HeightNode<T> : IRedBlackTreeNode<HeightNode<T>>
     {
         internal int _totalHeight;
@@ -721,7 +723,24 @@
             return lineNumber + 1;
         }

-        public double Height => _height;
+        public int Height => _height;
+        public int GetY()
+        {
+            int result = left != null ? left._totalHeight : 0;
+            var node = this;
+            while (node.parent != null)
+            {
+                if (node == node.parent.right)
+                {
+                    if (node.parent.left != null)
+                        result += node.parent.left._totalHeight;
+                    if (node.parent._foldLevel == 0)
+                        result += node.parent._height;
+                }
+                node = node.parent;
+            }
+            return result;
+        }
         public int GetVisibleLineNumber()
         {
             int lineNumber = left != null ? left._totalVisibleCount : 0;
@@ -739,25 +758,7 @@
                 node = node.parent;
             }
             return lineNumber + 1;
-        }
-
-        public double GetY()
-        {
-            double result = left != null ? left._totalHeight : 0;
-            var node = this;
-            while (node.parent != null)
-            {
-                if (node == node.parent.right)
-                {
-                    if (node.parent.left != null)
-                        result += node.parent.left._totalHeight;
-                    if (node.parent._foldLevel == 0)
-                        result += node.parent._height;
-                }
-                node = node.parent;
-            }
-            return result;
-        }
+        }

         public override string ToString()
         {
@@ -806,6 +807,8 @@
                     Parent.UpdateAugmentedData();
             }
         }
+
+
         internal HeightNode<T> parent;
         public HeightNode<T> Parent
         {


Fixed deprecated IsPageEditor in default layout

--- src/Project/Habitat/code/Views/Website/Layouts/Default.cshtml
+++ src/Project/Habitat/code/Views/Website/Layouts/Default.cshtml
@@ -15,7 +15,7 @@
   <meta http-equiv="X-UA-Compatible" content="IE=edge">
   <meta http-equiv="Content-type" content="text/html; charset=utf-8">
   <meta content="width=device-width, initial-scale=1.0" name="viewport" />
-  @if (!Sitecore.Context.PageMode.IsPageEditor)
+  @if (!Sitecore.Context.PageMode.IsExperienceEditor)
   {
     @Html.Sitecore().Placeholder("head")
   }
@@ -24,7 +24,7 @@
   @RenderAssetsService.Current.RenderStyles()
   @Html.Sitecore().VisitorIdentification()

-
+

       @Html.Sitecore().Placeholder("header-top")
@@ -38,7 +38,7 @@
       @Html.Sitecore().Placeholder("footer")

-    @if (!Sitecore.Context.PageMode.IsPageEditor)
+    @if (!Sitecore.Context.PageMode.IsExperienceEditor)
     {

         <button type="button" class="btn btn-info pull-right " data-toggle="sidebar" data-side="right">


Fixed name handling in OpenIdOAuthProvider

When retrieving attributes from an OpenID 2.0 source, names were not
being handled well. This change ensures that fullName explicitly uses
the first of "http://schema.openid.net/namePerson",
WellKnownAttributes.Name.FullName, or WellKnownAttributes.Name.Alias to
return a value. Where none of these are present but
WellKnownAttributes.Name.First and/or WellKnownAttributes.Name.Last are
provided, these will be concatenated to infer a fullName.

--- src/ServiceStack.Authentication.OpenId/OpenIdOAuthProvider.cs
+++ src/ServiceStack.Authentication.OpenId/OpenIdOAuthProvider.cs
@@ -1,5 +1,6 @@
 using System;
 using System.Collections.Generic;
+using System.Linq;
 using DotNetOpenAuth.Messaging;
 using DotNetOpenAuth.OpenId.Extensions.AttributeExchange;
 using DotNetOpenAuth.OpenId.Extensions.SimpleRegistration;
@@ -227,17 +228,18 @@

             if (fetchResponse == null) return ret;

+	        string fullName = null;
             var names = new List<string>();
             var emails = new List<string>();

             if (fetchResponse.Attributes.Contains("http://schema.openid.net/namePerson"))
-                names.AddRange(fetchResponse.Attributes["http://schema.openid.net/namePerson"].Values);
-
-            if (fetchResponse.Attributes.Contains(WellKnownAttributes.Name.FullName))
-                names.AddRange(fetchResponse.Attributes[WellKnownAttributes.Name.FullName].Values);
-
-            if (fetchResponse.Attributes.Contains(WellKnownAttributes.Name.Alias))
-                names.AddRange(fetchResponse.Attributes[WellKnownAttributes.Name.Alias].Values);
+                fullName = fetchResponse.Attributes["http://schema.openid.net/namePerson"].Values.FirstOrDefault();
+
+            if (fullName == null && fetchResponse.Attributes.Contains(WellKnownAttributes.Name.FullName))
+                fullName = fetchResponse.Attributes[WellKnownAttributes.Name.FullName].Values.FirstOrDefault();
+
+            if (fullName == null && fetchResponse.Attributes.Contains(WellKnownAttributes.Name.Alias))
+                fullName = fetchResponse.Attributes[WellKnownAttributes.Name.Alias].Values.FirstOrDefault();

             if (fetchResponse.Attributes.Contains(WellKnownAttributes.Name.First))
                 names.AddRange(fetchResponse.Attributes[WellKnownAttributes.Name.First].Values);
@@ -251,8 +253,11 @@
             if (fetchResponse.Attributes.Contains(WellKnownAttributes.Contact.Email))
                 emails.AddRange(fetchResponse.Attributes[WellKnownAttributes.Contact.Email].Values);

-            if (names.Count > 0)
-                ret["FullName"] = names[0];
+			if (fullName == null && names.Count > 0)
+				fullName = string.Join(" ", names.ToArray());
+
+			if (fullName != null)
+                ret["FullName"] = fullName;

             if (emails.Count > 0)
                 ret["Email"] = emails[0];


feat(Topics): Change more text to be more descriptive

--- src/StockportWebapp/Views/stockportgov/Article/Article.cshtml
+++ src/StockportWebapp/Views/stockportgov/Article/Article.cshtml
@@ -95,7 +95,7 @@
                                 {

-                                            More
+                                            More about @Model.Article.ParentTopic.Name

                                 }


Change Python test name to correct format

--- WindowsAzurePowershell/src/Management.CloudService.Test/Tests/Python/Cmdlet/AddAzurePythonWebRoleTests.cs
+++ WindowsAzurePowershell/src/Management.CloudService.Test/Tests/Python/Cmdlet/AddAzurePythonWebRoleTests.cs
@@ -29,7 +29,7 @@
     {

         [TestMethod]
-        public void AddAzureNodeWebRoleProcess()
+        public void AddAzurePythonWebRoleProcess()
         {
             var pyInstall = AddAzureDjangoWebRoleCommand.FindPythonInterpreterPath();
             if (pyInstall == null)


Revert accidental change in last commit.

--- src/runtime/pythonengine.cs
+++ src/runtime/pythonengine.cs
@@ -1,4 +1,4 @@
-work// ==========================================================================
+// ==========================================================================
 // This software is subject to the provisions of the Zope Public License,
 // Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
 // THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED


Fix EngineTests that weren't using the appropriate ServiceContext

- This meant that the affected tests weren't run with the NoOpConnectionFilter

--- test/Microsoft.AspNet.Server.KestrelTests/EngineTests.cs
+++ test/Microsoft.AspNet.Server.KestrelTests/EngineTests.cs
@@ -296,7 +296,7 @@
         [MemberData(nameof(ConnectionFilterData))]
         public async Task Http10KeepAliveContentLength(ServiceContext testContext)
         {
-            using (var server = new TestServer(AppChunked))
+            using (var server = new TestServer(AppChunked, testContext))
             {
                 using (var connection = new TestConnection())
                 {
@@ -327,7 +327,7 @@
         [MemberData(nameof(ConnectionFilterData))]
         public async Task Http10KeepAliveTransferEncoding(ServiceContext testContext)
         {
-            using (var server = new TestServer(AppChunked))
+            using (var server = new TestServer(AppChunked, testContext))
             {
                 using (var connection = new TestConnection())
                 {


Fixing merge error

Fixing merge error

--- test/PowerShellCmdlets.Test/InstallPackageCommandTest.cs
+++ test/PowerShellCmdlets.Test/InstallPackageCommandTest.cs
@@ -354,7 +354,7 @@
             var packageRepository = new MockPackageRepository { packageA.Object };
             var recentPackageRepository = new Mock<IRecentPackageRepository>();
             var packageManager = new VsPackageManager(TestUtils.GetSolutionManagerWithProjects("foo"), packageRepository, new MockFileSystem(), sharedRepository.Object,
-                recentPackageRepository.Object, new VsPackageInstallerEvents(), new MockPackageRepository());
+                recentPackageRepository.Object, new VsPackageInstallerEvents());
             var packageManagerFactory = new Mock<IVsPackageManagerFactory>(MockBehavior.Strict);
             packageManagerFactory.Setup(m => m.CreatePackageManager()).Returns(packageManager);

@@ -410,8 +410,7 @@
                 new MockFileSystem(),
                 sharedRepository.Object,
                 recentPackageRepository.Object,
-                new VsPackageInstallerEvents(),
-                new MockPackageRepository());
+                new VsPackageInstallerEvents());
             var packageManagerFactory = new Mock<IVsPackageManagerFactory>(MockBehavior.Strict);
             packageManagerFactory.Setup(m => m.CreatePackageManager()).Returns(packageManager);


HiistoryLineItems

HiistoryLineItems

--- Purchasing.Core/Domain/HistoryReceivedLineItem.cs
+++ Purchasing.Core/Domain/HistoryReceivedLineItem.cs
@@ -12,7 +12,7 @@
     {
         public HistoryReceivedLineItem()
         {
-            UpdateDate = DateTime.Now;
+            UpdateDate = DateTime.UtcNow.ToPacificTime();
             CommentsUpdated = false;
             PayInvoice = false;
         }


fix NullReferenceException

fix NullReferenceException

--- PureCat/Message/Spi/Heartbeat/Extend/NetworkIO.cs
+++ PureCat/Message/Spi/Heartbeat/Extend/NetworkIO.cs
@@ -24,10 +24,17 @@
                 var nicName = name.Replace('[', '(').Replace(']', ')');
                 if (!interfaces.Select(t => t.Description).Contains(nicName) || nicName.ToLower().Contains("loopback"))
                     continue;
-                NetworkAdapter adapter = new NetworkAdapter(interfaces.First(t => t.Description.Contains(nicName)).Name);
-                adapter.NetworkBytesReceived = new PerformanceCounter("Network Interface", "Bytes Received/sec", name);
-                adapter.NetworkBytesSend = new PerformanceCounter("Network Interface", "Bytes Sent/sec", name);
-                _adappterList.Add(adapter);			// Add it to ArrayList adapter
+                try
+                {
+                    NetworkAdapter adapter = new NetworkAdapter(interfaces.First(t => t.Description.Contains(nicName)).Name);
+                    adapter.NetworkBytesReceived = new PerformanceCounter("Network Interface", "Bytes Received/sec", name);
+                    adapter.NetworkBytesSend = new PerformanceCounter("Network Interface", "Bytes Sent/sec", name);
+                    _adappterList.Add(adapter);         // Add it to ArrayList adapter
+                }
+                catch
+                {
+                    //pass
+                }
             }
         }


Fixes unhandled exceptions when a debuggee process disappears.

--- Python/Product/Debugger/Debugger/PythonProcess.cs
+++ Python/Product/Debugger/Debugger/PythonProcess.cs
@@ -430,9 +430,17 @@

         private void DebugEventThread() {
             Debug.WriteLine("DebugEvent Thread Started " + _processGuid);
-            while ((_process == null || !_process.HasExited) && _stream == null) {
-                // wait for connection...
-                System.Threading.Thread.Sleep(10);
+            try {
+                while ((_process == null || !_process.HasExited) && _stream == null) {
+                    // wait for connection...
+                    System.Threading.Thread.Sleep(10);
+                }
+            } catch (InvalidOperationException) {
+                // Process termination - let any listeners know
+                _process_Exited(this, EventArgs.Empty);
+            } catch (System.ComponentModel.Win32Exception) {
+                // Process termination - let any listeners know
+                _process_Exited(this, EventArgs.Empty);
             }

             try {


GH-31 Make description display configurable

--- R7.Epsilon/Menus/EpsilonCards/EpsilonCards.cshtml
+++ R7.Epsilon/Menus/EpsilonCards/EpsilonCards.cshtml
@@ -57,6 +57,14 @@
 		}
 		return null;
 	}
+
+	bool GetShowDescription ()
+	{
+		if (((IDictionary<string, object>) Model).ContainsKey ("ShowDescription")) {
+			return bool.Parse (Model.ShowDescription);
+		}
+		return false;
+	}
 }

 @helper RenderMenu(IList<MenuNode> nodes) {
@@ -72,10 +80,13 @@
 							else {
 								@node.Text
 							}
-
-
@node.Description

+							@if (GetShowDescription ()) {
+
@node.Description

+							}
 							@if (node.HasChildren ()) {
-

+								if (GetShowDescription ()) {
+

+								}
 								@RenderListFor(node)
 							}


add outcommented code to use cube as floorPlane

--- Assets/Scripts/sim/Floor.cs
+++ Assets/Scripts/sim/Floor.cs
@@ -55,6 +55,19 @@

         AreaGeometry.createOriginTarget(floorId + "_ground", plane, new Color(1.0f, 1.0f, 1.0f, 0.3f), elevation - 0.01f);

+        /*
+        float planeHeight = 0.2f;
+        GameObject cube = GameObject.CreatePrimitive(PrimitiveType.Cube);
+        cube.name = "FloorPlane_" + floorId;
+        Material floorPlaneMaterial = Resources.Load("Materials/FloorPlaneMaterial.mat", typeof(Material)) as Material;
+        cube.GetComponent<Renderer>().sharedMaterial = floorPlaneMaterial;
+        //floorPlaneMaterial.shader = Shader.Find("Standard");
+        cube.transform.position = new Vector3((minX + maxX) / 2, elevation - planeHeight / 2 - 0.01f, (minY + maxY) / 2);
+        cube.transform.localScale = new Vector3(minX + maxX, planeHeight, minY + maxY);
+        GeometryLoader gl = GameObject.Find("GeometryLoader").GetComponent<GeometryLoader>();
+        gl.setWorldAsParent(cube);
+        */
+
         foreach (WunderZone wz in wunderZones) {
             wz.createObject();
         }


Fix being out of range and both new and old methods being tried.

--- Aurora/BotManager/RexBot.cs
+++ Aurora/BotManager/RexBot.cs
@@ -849,8 +849,7 @@
                 m_log.Warn ("Target is out of range");
                 //Try old style then
                 OldFollowing ();
-                //IsFollowing = false;
-                //return;
+                return;
             }

             map = new int[22 * resolution, 22 * resolution]; //10 * resolution squares in each direction from our pos


Fix exception with invalid CLI input.

Fix exception with invalid CLI input.

Fixes #19

--- AuthenticodeLint/Program.cs
+++ AuthenticodeLint/Program.cs
@@ -9,10 +9,20 @@
     {
         static int Main(string[] args)
         {
+
             var commandLineRaw = string.Join(" ", args);
-            var commandLine = CommandLineParser.LexCommandLine(commandLineRaw);
-            var parsedCommandLine = CommandLineParser.CreateCommandLineParametersWithValues(commandLine).ToList();
-            if (parsedCommandLine.Count == 0 || parsedCommandLine.Any(cl => cl.Name == "help"))
+            List<CommandLineParameter> parsedCommandLine;
+            try
+            {
+                var commandLine = CommandLineParser.LexCommandLine(commandLineRaw);
+                parsedCommandLine = CommandLineParser.CreateCommandLineParametersWithValues(commandLine).ToList();
+            }
+            catch(InvalidOperationException)
+            {
+                parsedCommandLine = null;
+            }
+
+            if (parsedCommandLine == null || parsedCommandLine.Count == 0 || parsedCommandLine.Any(cl => cl.Name == "help"))
             {
                 ShowHelp();
                 //Avoid returning success for printing help so that automated build systems do not interpret "show the help"


Jumps Program

Jumps Program

--- Samples.CSharp7/Source/CSharp7.DemoApp/Program.cs
+++ Samples.CSharp7/Source/CSharp7.DemoApp/Program.cs
@@ -86,7 +86,25 @@
             Write($"Please Enter Array of {numberOfItemsNew} Values [Ex: 0 0 0 0 1 0]: ");
             var arrayValuesNew = ReadLine().Trim().Split(' ').Select(int.Parse).ToArray();

-
+            var jumps = 0;
+            for(int iCtr=0; iCtr<numberOfItemsNew-2; iCtr++)
+            {
+                if(arrayValuesNew[iCtr + 1] == 0 && arrayValuesNew[iCtr + 2] == 0)
+                {
+                    iCtr += 1;
+                    jumps++;
+                }
+                else if (arrayValuesNew[iCtr + 1] == 0 && arrayValuesNew[iCtr + 2] == 1)
+                {
+                    jumps++;
+                }
+                else if (arrayValuesNew[iCtr + 1] == 1 && arrayValuesNew[iCtr + 2] == 0)
+                {
+                    jumps++;
+                }
+            }
+
+            WriteLine($"Number Of Jumps: {jumps}");

             new ShowLogicDemos()
                 .SampleSortDemo()


Tried Float datatype in Generic TryParse method.

--- Samples.CSharp7/Source/CSharp7.DemoApp/Program.cs
+++ Samples.CSharp7/Source/CSharp7.DemoApp/Program.cs
@@ -91,6 +91,14 @@
             genericTryParse.TryParse(ref dateTime, "01-Aug-2016");
             WriteLine($"GenericTryParse::TryParse DateTime: {dateTime}");

+            results = false;
+            genericTryParse.TryParse(ref results, "true");
+            WriteLine($"GenericTryParse::TryParse Bool: {results}");
+
+            float salary = 0.0f;
+            genericTryParse.TryParse(ref salary, "125.67");
+            WriteLine($"GenericTryParse::TryParse Float: {salary}");
+
             List<int> generalVariable = new List<int>()
             {
                 45


Fix typo, thus improving previous commit a fair bit

--- Voxalia/ServerGame/EntitySystem/PlayerEntity.cs
+++ Voxalia/ServerGame/EntitySystem/PlayerEntity.cs
@@ -707,7 +707,7 @@
                             if (!seen.Contains(nt) && !toSee.Contains(nt))
                             {
                                 bool val = false;
-                                Chunk ch = TheRegion.LoadChunk(t);
+                                Chunk ch = TheRegion.GetChunk(t);
                                 if (ch == null)
                                 {
                                     val = true;


Added validation attributes to Post class

--- BlogTemplate/Models/Post.cs
+++ BlogTemplate/Models/Post.cs
@@ -1,5 +1,6 @@
 using System;
 using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
@@ -10,7 +11,9 @@
     public class Post
     {
         public List<Comment> Comments { get; set; } = new List<Comment>();
+        [Required(ErrorMessage = "Title required")]
         public string Title { get; set; }
+        [Required(ErrorMessage = "Post text required")]
         public string Body { get; set; }
         public DateTime PubDate { get; set; } = DateTime.Now;
         public DateTime LastModified { get; set; } = DateTime.Now;


reroll loot table intead of item when itemcount > 1

--- UnityProject/Assets/Scripts/Items/Others/RandomItemSpot.cs
+++ UnityProject/Assets/Scripts/Items/Others/RandomItemSpot.cs
@@ -24,53 +24,55 @@

 		private void RollRandomPool()
 		{
-			PoolData pool = null;
-			while (pool == null)
+			for (int i = 0; i <= lootCount; i++)
 			{
+				PoolData pool = null;
+				// Roll attempt is a safe check in the case the mapper did tables with low % and we can't find
+				// anything to spawn in 5 attempts
 				int rollAttempt = 0;

-				var tryPool = poolList.PickRandom();
-				if (DMMath.Prob(tryPool.Probability))
+				while (pool == null)
 				{
-					pool = tryPool;
-				}
-				else
-				{
-					rollAttempt ++;
+
+					if (rollAttempt >= MaxAmountRolls)
+					{
+						continue;
+					}
+
+					var tryPool = poolList.PickRandom();
+					if (DMMath.Prob(tryPool.Probability))
+					{
+						pool = tryPool;
+					}
+					else
+					{
+						rollAttempt ++;
+					}
 				}

-				if (rollAttempt >= MaxAmountRolls)
-				{
-					Destroy(gameObject);
-					break;
-				}
+				SpawnItems(pool);
 			}

-			SpawnItems(pool);
+			Destroy(gameObject);
 		}

 		private void SpawnItems(PoolData poolData)
 		{
-			for (int i = 0; i < lootCount; i++)
+			var item = poolData.RandomItemPool.Pool.PickRandom();
+			var spread = fanOut ? Random.Range(-0.5f,0.5f) : (float?) null;
+
+			if (!DMMath.Prob(item.Probability))
 			{
-				var item = poolData.RandomItemPool.Pool.PickRandom();
-				var spread = fanOut ? Random.Range(-0.5f,0.5f) : (float?) null;
-
-				if (!DMMath.Prob(item.Probability))
-				{
-					continue;
-				}
-
-				var maxAmt = Random.Range(1, item.MaxAmount+1);
-
-				Spawn.ServerPrefab(
-					item.Prefab,
-					gameObject.RegisterTile().WorldPositionServer,
-					count: maxAmt,
-					scatterRadius: spread);
+				return;
 			}

-			Destroy(gameObject);
+			var maxAmt = Random.Range(1, item.MaxAmount+1);
+
+			Spawn.ServerPrefab(
+				item.Prefab,
+				gameObject.RegisterTile().WorldPositionServer,
+				count: maxAmt,
+				scatterRadius: spread);
 		}
 	}


Revert removal of default browser background color

--- Browser/TweetDeckBrowser.cs
+++ Browser/TweetDeckBrowser.cs
@@ -76,6 +76,8 @@
 			this.browser.RegisterJsBridge("$TD", tdBridge);
 			this.browser.RegisterJsBridge("$TDU", updateBridge);

+			// ReSharper disable once PossiblyImpureMethodCallOnReadonlyVariable
+			this.browser.BrowserSettings.BackgroundColor = (uint) TwitterUtils.BackgroundColor.ToArgb();
 			this.browser.Dock = DockStyle.None;
 			this.browser.Location = ControlExtensions.InvisibleLocation;
 			this.browser.SetupZoomEvents();


Update PlayerNetworkActions.cs (#7510)

Update PlayerNetworkActions.cs (#7510)

--- UnityProject/Assets/Scripts/Player/PlayerNetworkActions.cs
+++ UnityProject/Assets/Scripts/Player/PlayerNetworkActions.cs
@@ -355,10 +355,10 @@
 	}

 	[Command]
-	public void CmdInitiateRestartVote(NetworkConnection sender = null)
+	public void CmdInitiateRestartVote()
 	{
 		if (VotingManager.Instance == null) return;
-		VotingManager.Instance.TryInitiateRestartVote(gameObject);
+		VotingManager.Instance.TryInitiateRestartVote(gameObject, connectionToClient);
 	}

 	[Command]


Allow redefining already defined symbols

--- squirrel/Environment.cs
+++ squirrel/Environment.cs
@@ -17,7 +17,7 @@
         {
         }

-        public void Put(string key, INode value) => _definitions.Add(key, value);
+        public void Put(string key, INode value) => _definitions[key] = value;

         public void PutOuter(string key, INode value) => _parent.Put(key, value);


Fix message

Fix message

--- WalletWasabi.Gui/Tabs/WalletManager/LoadWalletViewModel.cs
+++ WalletWasabi.Gui/Tabs/WalletManager/LoadWalletViewModel.cs
@@ -34,12 +34,12 @@
 			this.WhenAnyValue(x => x.IsWalletOpened)
 				.Subscribe(isWalletOpened => CanLoadWallet = !string.IsNullOrEmpty(SelectedWallet) && !isWalletOpened);

-			this.WhenAnyValue(x=>x.IsWalletOpened)
-				.Subscribe(isWalletOpened => WarningMessage = isWalletOpened
-					? "There is an already open wallet. Restart the application in order to be able to open a different wallet."
-					: string.Empty );
+			this.WhenAnyValue(x => x.IsWalletOpened)
+				.Subscribe(isWalletOpened => WarningMessage = isWalletOpened
+					? "There is already an open wallet. Restart the application in order to be able to open a different wallet."
+					: string.Empty);

-			LoadCommand = ReactiveCommand.Create( LoadWallet, this.WhenAnyValue(x => x.CanLoadWallet));
+			LoadCommand = ReactiveCommand.Create(LoadWallet, this.WhenAnyValue(x => x.CanLoadWallet));
 		}

 		public ObservableCollection<string> Wallets
@@ -54,7 +54,7 @@
 			set { this.RaiseAndSetIfChanged(ref _selectedWallet, value); }
 		}

-		public bool IsWalletOpened
+		public bool IsWalletOpened
 		{
 			get { return _isWalletOpened; }
 			set { this.RaiseAndSetIfChanged(ref _isWalletOpened, value); }
@@ -83,7 +83,7 @@
 				_wallets.Add(Path.GetFileNameWithoutExtension(file.FullName));
 			}

-			if(_wallets.Any())
+			if (_wallets.Any())
 			{
 				SelectedWallet = _wallets.First();
 			}
@@ -107,7 +107,7 @@
 			var keyManager = KeyManager.FromFile(walletFullPath);

 			Global.InitializeWalletService(keyManager);
-
+
 			// ToDo: Close the Wallet Manager, Open Wallet Explorer tabs
 		}
 	}


WebPI: hide products with "searchExclude" attribute

--- WebsitePanel/Sources/WebsitePanel.Server/Code/WPIHelper.cs
+++ WebsitePanel/Sources/WebsitePanel.Server/Code/WPIHelper.cs
@@ -216,6 +216,12 @@
                 {
                     // skip this product
                     // usually product without intsallers user as product detection
+                    continue;
+                }
+
+                if (product.GetAttributeValue("searchExclude") != null)
+                {
+                    // skip it, this is internal not visible product
                     continue;
                 }


Core - ResourceHandler Add MimeType Mappings

Adding some newer video/audio/font mappings

#3041

--- CefSharp/ResourceHandler.cs
+++ CefSharp/ResourceHandler.cs
@@ -963,7 +963,31 @@
             {".xtp", "application/octet-stream"},
             {".xwd", "image/x-xwindowdump"},
             {".z", "application/x-compress"},
-            {".zip", "application/x-zip-compressed"}
+            {".zip", "application/x-zip-compressed"},
+
+            // Recently added entries from
+            // https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Complete_list_of_MIME_types
+            // https://cs.chromium.org/chromium/src/net/base/mime_util.cc?sq=package:chromium&g=0&l=147
+            {".wasm", "application/wasm"},
+            {".ogg", "audio/ogg"},
+            {".oga", "audio/ogg"},
+            {".ogv", "video/ogg"},
+            {".opus", "audio/opus"},
+            {".webm", "video/webm"},
+            {".weba", "audio/webm"},
+            //https://developers.google.com/speed/webp
+            {".webp", "image/webp"},
+            {".epub", "application/epub+zip"},
+            // We'll map .woff to font/woff as application/font-woff is deprecated
+            // https://tools.ietf.org/html/rfc8081#section-4.4.5
+            // Deprecated Alias:  The existing registration "application/font-woff" is deprecated in favor of "font/woff".
+            {".woff", "font/woff"},
+            // https://www.w3.org/TR/WOFF2/#IMT
+            // https://tools.ietf.org/html/rfc8081#section-4.4.6
+            {".woff2", "font/woff2"},
+            //TODO: Mapping should be updated (exists above)
+            //{".ttf", "font/ttf"},
+            {".otf", "font/otf"}
         };

         /// <summary>


Added region with SignalR hub methods and fixed private messaging.

Private messaging used string as argument for recipient, it should be User entity.

--- ChatroServer/src/ChatHub.cs
+++ ChatroServer/src/ChatHub.cs
@@ -2,6 +2,7 @@
 using System.Collections.Generic;
 using System.Data;
 using System.Diagnostics;
+using System.IdentityModel.Tokens;
 using System.Linq;
 using System.Threading.Tasks;
 using ChatroServer.Entity;
@@ -25,7 +26,7 @@
 #if DEBUG
                 db.DropAndCreateTable<User>();
                 db.DropAndCreateTable<Message>();
-                User[] users = { new User("Karel", "123456"), new User("Varel", "123456") };
+                User[] users = { new User("Karel", "1"), new User("Varel", "1") };
                 db.SaveAll(users);
 #else
                 db.CreateTableIfNotExists<User>();
@@ -34,7 +35,7 @@

             }
         }
-
+
         /// <inheritdoc />
         public override Task OnConnected()
         {
@@ -50,6 +51,8 @@
             ConnectionIdsUsers.Remove(this.Context.ConnectionId);
             return base.OnDisconnected(stopCalled);
         }
+
+        #region SignalR methods

         public void SendBroadcast(string content)
         {
@@ -76,9 +79,17 @@

             User sender = ConnectionIdsUsers[this.Context.ConnectionId];
             User userRecipient;
+
+            Message msg = new Message(DateTime.Now, sender, message);
+
             using (IDbConnection db = ConnectionFactory.Open())
             {
                 userRecipient = db.Select<User>().FirstOrDefault(user => user.Username == recipient);
+                if (userRecipient != null)
+                {
+                    msg.Recipient = userRecipient;
+                    db.Save(msg);
+                }
             }
             if (userRecipient == null)
             {
@@ -86,29 +97,12 @@
                 throw new Exception($"User {recipient} not found in database...");
             }

-            Message msg = new Message(DateTime.Now, sender, recipient);
-
             // Is the user online?
             string connectionId;
             bool isConnected = TryGetUserConnectionIdFromUsername(recipient, out connectionId);
             if (isConnected)
             {
-                this.Clients.Client(connectionId).NewMessage(message, sender.Username);
-            }
-        }
-
-        private bool TryGetUserConnectionIdFromUsername(string username, out string connectionId)
-        {
-            string result = ConnectionIdsUsers.FirstOrDefault(pair => pair.Value.Username == username).Key;
-            if (result != null)
-            {
-                connectionId = result;
-                return true;
-            }
-            else
-            {
-                connectionId = null;
-                return false;
+                this.Clients.Client(connectionId).NewMessage(message, sender);
             }
         }

@@ -117,7 +111,7 @@
             using (IDbConnection db = ConnectionFactory.Open())
             {
                 List<User> result = db.Select<User>(user => user.Username == username);
-                if (result.Count != 1)
+                if (result.Count > 1)
                 {
                     throw new ApplicationException($"More than one user with username '{username}' found.");
                 }
@@ -155,6 +149,25 @@
             User[] valueCollection = ConnectionIdsUsers.Values.ToArray();
             return valueCollection;
         }
+
+
+        #endregion
+
+        private bool TryGetUserConnectionIdFromUsername(string username, out string connectionId)
+        {
+            string result = ConnectionIdsUsers.FirstOrDefault(pair => pair.Value.Username == username).Key;
+            if (result != null)
+            {
+                connectionId = result;
+                return true;
+            }
+            else
+            {
+                connectionId = null;
+                return false;
+            }
+        }
+
         private bool IsLogged()
         {
             return ConnectionIdsUsers[this.Context.ConnectionId] != null;


Add optional date field to RemoteMedia

Add optional date field to RemoteMedia

--- anime-downloader/Models/Abstract/RemoteMedia.cs
+++ anime-downloader/Models/Abstract/RemoteMedia.cs
@@ -1,4 +1,5 @@
-using System.Linq;
+using System;
+using System.Linq;
 using System.Text.RegularExpressions;
 using anime_downloader.Classes;

@@ -19,6 +20,11 @@
         ///     The given contextually dependant remote accesser (download link, irc message, ...).
         /// </summary>
         public string Remote { get; set; }
+
+        /// <summary>
+        ///     The date published of the remote accessor, if available.
+        /// </summary>
+        public DateTime? Date { get; set; }

         /// <summary>
         ///     Returns the subgroup from the name of the file.


More interface fixes

More interface fixes

Length returns an integer. BitsetNet (singular) is the namespace

--- Source/IBitset.cs
+++ Source/IBitset.cs
@@ -1,4 +1,4 @@
-namespace BitsetsNET
+namespace BitsetNET
 {
     /// <summary>
     /// This is the common interface for all bitsets regardless of compression. It defines common operations.
@@ -7,7 +7,7 @@
     {
         IBitset And(IBitset x);
         IBitset Or(IBitset y);
-        IBitset Length();
+        int Length();
         void SetOne(int index);
         void SetZero(int index);
         bool IsOne(int index);


Reset <non-breaking-feature> version number to 0

--- Source/Version.cs
+++ Source/Version.cs
@@ -2,7 +2,7 @@
 using System.Reflection;

 // EasyNetQ version number: <major>.<minor>.<non-breaking-feature>.<build>
-[assembly: AssemblyVersion("0.56.1.0")]
+[assembly: AssemblyVersion("0.56.0.0")]
 [assembly: CLSCompliant(false)]

 // Note: until version 1.0 expect breaking changes on 0.X versions.


Tidy up Execute, and add a new method which dispatches asynchronously, or runs synchronously

--- Stylet/Execute.cs
+++ Stylet/Execute.cs
@@ -12,24 +12,52 @@
 {
     public static class Execute
     {
+        /// <summary>
+        /// Should be set to the UI thread's SynchronizationContext. This is normally done by the Bootstrapper.
+        /// </summary>
         public static SynchronizationContext SynchronizationContext;
         private static bool? inDesignMode;

-        public static Action<Action> DefaultPropertyChangedDispatcher = Execute.OnUIThread;
+        /// <summary>
+        /// Default dispatcher used by PropertyChangedBase instances. Defaults to BeginOnUIThreadOrSynchronous
+        /// </summary>
+        public static Action<Action> DefaultPropertyChangedDispatcher = Execute.BeginOnUIThreadOrSynchronous;

+        private static void EnsureSynchronizationContext()
+        {
+            if (SynchronizationContext == null)
+                throw new Exception("Execute.SynchronizationContext must be set before this method can be called. This should normally have been done by the Bootstrapper");
+        }
+
+        /// <summary>
+        /// Dispatches the given action to be run on the UI thread, even if the current thread is the UI thread
+        /// </summary>
         public static void BeginOnUIThread(Action action)
         {
-            // If we're already on the given SynchronizationContext, or it hasn't been set, run synchronously
-            if (SynchronizationContext != null && SynchronizationContext != SynchronizationContext.Current)
+            EnsureSynchronizationContext();
+            SynchronizationContext.Post(_ => action(), null);
+        }
+
+        /// <summary>
+        /// Dispatches the given action to be run on the UI thread, or runs it synchronously if the current thread is the UI thread
+        /// </summary>
+        public static void BeginOnUIThreadOrSynchronous(Action action)
+        {
+            EnsureSynchronizationContext();
+            if (SynchronizationContext != SynchronizationContext.Current)
                 SynchronizationContext.Post(_ => action(), null);
             else
                 action();
         }

+        /// <summary>
+        /// Dispatches the given action to be run on the UI thread and blocks until it completes, or runs it synchronously if the current thread is the UI thread
+        /// </summary>
         public static void OnUIThread(Action action)
         {
+            EnsureSynchronizationContext();
             Exception exception = null;
-            if (SynchronizationContext != null && SynchronizationContext != SynchronizationContext.Current)
+            if (SynchronizationContext != SynchronizationContext.Current)
             {
                 SynchronizationContext.Send(_ =>
                 {
@@ -52,10 +80,13 @@
             }
         }

+        /// <summary>
+        /// Dispatches the given action to be run on the UI thread and returns a task that completes when the action completes, or runs it synchronously if the current thread is the UI thread
+        /// </summary>
         public static Task OnUIThreadAsync(Action action)
         {
-            // If we're already on the given SynchronizationContext, or it hasn't been set, run synchronously
-            if (SynchronizationContext != null && SynchronizationContext != SynchronizationContext.Current)
+            EnsureSynchronizationContext();
+            if (SynchronizationContext != SynchronizationContext.Current)
             {
                 var tcs = new TaskCompletionSource<object>();
                 SynchronizationContext.Post(_ =>


added method to set dispatcher

added method to set dispatcher

--- TCC.Core/Utils.cs
+++ TCC.Core/Utils.cs
@@ -162,6 +162,10 @@
         {
             return _dispatcher;
         }
+        public void SetDispatcher(Dispatcher newDispatcher)
+        {
+            _dispatcher = newDispatcher;
+        }
         public event PropertyChangedEventHandler PropertyChanged;
         protected void NotifyPropertyChanged(string v)
         {