Bot speed optimization.

Bot speed optimization.

--- TicTacToe.Core/Bot.cs
+++ TicTacToe.Core/Bot.cs
@@ -64,12 +64,16 @@
             var opponent = player.Opponent();
             var field = game.Field;
             // Ищем выйгрышные комбинации оппонента, которые мы ещё не блокировали, и пытаемся помешать
-            foreach (var comb in WinCombinations.Where(comb => ((field[comb[0]] == opponent && field[comb[0]] == field[comb[1]] && field[comb[2]] == PlayerCode.None) ||
-                                                                (field[comb[0]] == opponent && field[comb[0]] == field[comb[2]] && field[comb[1]] == PlayerCode.None) ||
-                                                                (field[comb[1]] == opponent && field[comb[1]] == field[comb[2]] && field[comb[0]] == PlayerCode.None))))
+            var combination =
+                WinCombinations.FirstOrDefault(
+                    comb =>
+                        ((field[comb[0]] == opponent && field[comb[0]] == field[comb[1]] && field[comb[2]] == PlayerCode.None) ||
+                         (field[comb[0]] == opponent && field[comb[0]] == field[comb[2]] && field[comb[1]] == PlayerCode.None) ||
+                         (field[comb[1]] == opponent && field[comb[1]] == field[comb[2]] && field[comb[0]] == PlayerCode.None)));
+            if(combination != null)
             {
                 // Занимаем свободную клетку в выйгрышной комбинации
-                cell = comb.Where(position => field[position] == PlayerCode.None).First();
+                cell = combination.Where(position => field[position] == PlayerCode.None).First();
             }
             return cell;
         }
@@ -79,12 +83,16 @@
             var cell = -1;
             var opponent = player.Opponent();
             var field = game.Field;
-            foreach (var comb in WinCombinations.Where(comb => ((field[comb[0]] == player && field[comb[0]] == field[comb[1]] && field[comb[2]] == PlayerCode.None) ||
-                                                                    (field[comb[0]] == player && field[comb[0]] == field[comb[2]] && field[comb[1]] == PlayerCode.None) ||
-                                                                    (field[comb[1]] == player && field[comb[1]] == field[comb[2]] && field[comb[0]] == PlayerCode.None))))
+            var combination =
+                WinCombinations.FirstOrDefault(
+                    comb =>
+                       ((field[comb[0]] == player && field[comb[0]] == field[comb[1]] && field[comb[2]] == PlayerCode.None) ||
+                        (field[comb[0]] == player && field[comb[0]] == field[comb[2]] && field[comb[1]] == PlayerCode.None) ||
+                        (field[comb[1]] == player && field[comb[1]] == field[comb[2]] && field[comb[0]] == PlayerCode.None)));
+            if (combination != null)
             {
                 // Занимаем свободную клетку в выйгрышной комбинации
-                cell = comb.Where(position => field[position] == PlayerCode.None).First();
+                cell = combination.Where(position => field[position] == PlayerCode.None).First();
             }
             return cell;
         }
@@ -94,13 +102,17 @@
             var cell = -1;
             var opponent = player.Opponent();
             var field = game.Field;
-            foreach (var comb in WinCombinations.Where(comb => ((field[comb[0]] == player && field[comb[1]] == field[comb[2]] && field[comb[1]] == PlayerCode.None) ||
-                                                            (field[comb[1]] == player && field[comb[0]] == field[comb[2]] && field[comb[0]] == PlayerCode.None) ||
-                                                            (field[comb[2]] == player && field[comb[0]] == field[comb[1]] && field[comb[0]] == PlayerCode.None))))
+            var combination =
+                WinCombinations.FirstOrDefault(
+                    comb =>
+                       ((field[comb[0]] == player && field[comb[1]] == field[comb[2]] && field[comb[1]] == PlayerCode.None) ||
+                        (field[comb[1]] == player && field[comb[0]] == field[comb[2]] && field[comb[0]] == PlayerCode.None) ||
+                        (field[comb[2]] == player && field[comb[0]] == field[comb[1]] && field[comb[0]] == PlayerCode.None)));
+            if (combination != null)
             {
                 // Занимаем любую свободную клетку
-                cell = comb.Where(position => field[position] == PlayerCode.None).First();
-            }
+                cell = combination.Where(position => field[position] == PlayerCode.None).First();
+            }
             return cell;
         }


Update run.csx

Update run.csx

--- Azure/azure-function-extractgpslocation-onedrive-drawwatermark/run.csx
+++ Azure/azure-function-extractgpslocation-onedrive-drawwatermark/run.csx
@@ -1,4 +1,4 @@
-#r "Microsoft.Azure.WebJobs.Extensions.ApiHub" // Don't forget to blog about it
+#r "Microsoft.Azure.WebJobs.Extensions.ApiHub"

 using System;
 using System.Collections.Generic;
@@ -11,12 +11,25 @@
 using System.Drawing.Drawing2D;
 using System.Drawing.Imaging;

-public static void Run(Stream inputFile, TraceWriter log, Stream outputFile)
+public static void Run(Stream inputFile, Stream outputFile, TraceWriter log)
 {
     log.Info("Image Process Starts");

+    string locationText = GetCoordinate(inputFile, log);
+    log.Info($"Text to be written: '{locationText}'");
+
+    // Reset position. After Exif operations the cursor location is not on position 0 anymore;
+    inputFile.Position = 0;
+
+    WriteWatermark(locationText, inputFile, outputFile, log);
+
+    log.Info("Image Process Ends");
+}
+
+private static string GetCoordinate(Stream image, TraceWriter log)
+{
     log.Info("Extract location information");
-    ExifReader exifReader = new ExifReader(inputFile);
+    ExifReader exifReader = new ExifReader(image);
     double[] latitudeComponents;
     exifReader.GetTagValue(ExifTags.GPSLatitude, out latitudeComponents);
     double[] longitudeComponents;
@@ -38,26 +51,25 @@

         location = $"Latitude: '{latitude}' | Longitude: '{longitude}'";
     }
-    log.Info($"Text to be written: '{location}'");

-    // Reset position. After Exif operations the cursor location is not on position 0 anymore;
-    inputFile.Position = 0;
+    return location;
+}

+private static void WriteWatermark(string watermarkContent, Stream originalImage, Stream newImage, TraceWriter log)
+{
     log.Info("Write text to picture");
-    using (Image inputImage = Image.FromStream(inputFile, true))
+    using (Image inputImage = Image.FromStream(originalImage, true))
     {
         using (Graphics graphic = Graphics.FromImage(inputImage))
         {
             graphic.SmoothingMode = SmoothingMode.HighQuality;
             graphic.InterpolationMode = InterpolationMode.HighQualityBicubic;
             graphic.PixelOffsetMode = PixelOffsetMode.HighQuality;
-            graphic.DrawString(location, new Font("Tahoma", 100, FontStyle.Bold), Brushes.Red, 200, 200);
+            graphic.DrawString(watermarkContent, new Font("Tahoma", 100, FontStyle.Bold), Brushes.Red, 200, 200);
             graphic.Flush();

             log.Info("Write to the output stream");
-            inputImage.Save(outputFile, ImageFormat.Jpeg);
+            inputImage.Save(newImage, ImageFormat.Jpeg);
         }
     }
-
-    log.Info("Image Process Ends");
 }


Make sure invoice show lnurl instead of bolt11 labels

--- BTCPayServer/Views/Shared/Lightning/LightningLikeMethodCheckout.cshtml
+++ BTCPayServer/Views/Shared/Lightning/LightningLikeMethodCheckout.cshtml
@@ -1,6 +1,4 @@
-@using BTCPayServer.Services
 @model BTCPayServer.Models.InvoicingModels.PaymentModel
-


Fixed tests for writing items

Fixed tests for writing items


Fix async load test not allowing child load

--- osu.Framework.Tests/Containers/TestSceneLoadComponentAsync.cs
+++ osu.Framework.Tests/Containers/TestSceneLoadComponentAsync.cs
@@ -25,7 +25,11 @@
             IEnumerable<AsyncChildLoadingComposite> composite = getEnumerableComponent(() =>
             {
                 invocationCount++;
-                return new AsyncChildLoadingComposite();
+
+                var result = new AsyncChildLoadingComposite();
+                result.AllowChildLoad();
+
+                return result;
             });

             AddStep("load async", () => LoadComponentsAsync(composite, AddRange));


Fix potentially incorrect zoom level getting set on very short audio track

--- osu.Game/Screens/Edit/Compose/Components/Timeline/Timeline.cs
+++ osu.Game/Screens/Edit/Compose/Components/Timeline/Timeline.cs
@@ -68,7 +68,7 @@
             }, true);
         }

-        private float getZoomLevelForVisibleMilliseconds(double milliseconds) => (float)(track.Length / milliseconds);
+        private float getZoomLevelForVisibleMilliseconds(double milliseconds) => Math.Max(1, (float)(track.Length / milliseconds));

         /// <summary>
         /// The timeline's scroll position in the last frame.


Update to use `OsuPopover` implementation

--- osu.Game/Screens/OnlinePlay/Lounge/Components/DrawableRoom.cs
+++ osu.Game/Screens/OnlinePlay/Lounge/Components/DrawableRoom.cs
@@ -23,6 +23,7 @@
 using osu.Game.Graphics.Containers;
 using osu.Game.Graphics.Sprites;
 using osu.Game.Graphics.UserInterface;
+using osu.Game.Graphics.UserInterfaceV2;
 using osu.Game.Input.Bindings;
 using osu.Game.Online.Rooms;
 using osu.Game.Screens.OnlinePlay.Components;
@@ -345,7 +346,7 @@
             }
         }

-        public class PasswordEntryPopover : BasicPopover
+        public class PasswordEntryPopover : OsuPopover
         {
             private readonly Room room;


CCI-1770

--- ComputeClient/Compute.Contracts/Requests/Server20/ServerListOptions.cs
+++ ComputeClient/Compute.Contracts/Requests/Server20/ServerListOptions.cs
@@ -107,10 +107,20 @@
 		/// </summary>
 		public const string TagIdField = "tagId.";

-        /// <summary>
+		/// <summary>
+		/// The "replicationEnabled" field name.
+		/// </summary>
+		public const string ReplicationEnabledField = "replicationEnabled";
+
+		/// <summary>
+		/// The "replicationTargetDatacenterId" field name.
+		/// </summary>
+		public const string ReplicationTargetDatacenterIdField = "replicationTargetDatacenterId";
+
+		/// <summary>
 		/// The "deploymentMode" field name.
 		/// </summary>
-        public Guid? TagKeyId { get; set; }
+		public Guid? TagKeyId { get; set; }

         /// <summary>
 		/// The "deploymentMode" field name.
@@ -279,19 +289,38 @@
             set { SetFilter(DrsEligibleField, value); }
         }

-        /// <summary>
-        /// Gets or sets the deploymentMode filter.
-        /// </summary>
-        public string DeploymentMode
+		/// <summary>
+		/// Gets or sets the replicationEnabled filter.
+		/// </summary>
+		public bool? ReplicationEnabled
+		{
+			get { return GetFilter<bool>(ReplicationEnabledField); }
+			set { SetFilter(ReplicationEnabledField, value); }
+		}
+
+
+		/// <summary>
+		/// Gets or sets the deploymentMode filter.
+		/// </summary>
+		public string DeploymentMode
         {
             get { return GetFilter<string>(DeploymentModeField); }
             set { SetFilter(DeploymentModeField, value); }
         }

-        /// <summary>
-        /// Identifies Virtual Listeners by their name.
-        /// </summary>
-        public string TagValue
+		/// <summary>
+		/// Gets or sets the replicationTargetDatacenterId filter.
+		/// </summary>
+		public string ReplicationTargetDatacenterId
+		{
+			get { return GetFilter<string>(ReplicationTargetDatacenterIdField); }
+			set { SetFilter(ReplicationTargetDatacenterIdField, value); }
+		}
+
+		/// <summary>
+		/// Identifies Virtual Listeners by their name.
+		/// </summary>
+		public string TagValue
         {
             get
             {


Fix failing test

Fix failing test

--- OpenKh.Tests/Bbs/PmpTests.cs
+++ OpenKh.Tests/Bbs/PmpTests.cs
@@ -10,38 +10,24 @@
 {
     public class PmpTests
     {
-        private static readonly string FileName = "Bbs/res/jb_23.pmp";
+        private static readonly string FileName = "Bbs/res/bbs-testmap.pmp";

         [Fact]
         public void ReadCorrectHeader() => File.OpenRead(FileName).Using(stream =>
         {
             var TestPmo = Pmp.Read(stream);
             Assert.Equal(0x504D50, (int)TestPmo.header.MagicCode);
-            Assert.Equal(4, (int)TestPmo.header.ObjectCount);
+            Assert.Equal(1, TestPmo.header.ObjectCount);
         });

         [Fact]
-        public void WritesBackCorrectly()
-        {
-            Stream input = File.OpenRead(FileName);
-            var TestPmp = Pmp.Read(input);
-            Stream output = File.Open("Bbs/res/jb_23_TEST.pmp", FileMode.Create);
-            Pmp.Write(output, TestPmp);
+        public void WritesBackCorrectly() => File.OpenRead(FileName).Using(stream =>
+             Helpers.AssertStream(stream, x =>
+             {
+                 var outStream = new MemoryStream();
+                 Pmp.Write(outStream, Pmp.Read(stream));

-            input.Position = 0;
-            output.Position = 0;
-
-            // Check all bytes.
-            for (int i = 0; i < output.Length; i++)
-            {
-                if (input.ReadByte() != output.ReadByte())
-                {
-                    long position = output.Position;
-                    Assert.False(true);
-                }
-            }
-
-            Assert.True(true);
-        }
+                 return outStream;
+             }));
     }
 }


Whoops, made IconFile.Frames publicly accessible ...

--- UIconEdit/IconFile.cs
+++ UIconEdit/IconFile.cs
@@ -57,6 +57,11 @@
         }

         /// <summary>
+        /// Gets a collection containing all frames in the icon file.
+        /// </summary>
+        public FrameSet Frames { get { return _set; } }
+
+        /// <summary>
         /// Returns the color panes.
         /// </summary>
         /// <param name="frame">This parameter is ignored.</param>


LIBOMV-671 Adds Adult Event and Adult Land for sale fields to GridItemType enum to support additional "adult" functionality

git-svn-id: e915c4f8b2ea2a6e63cbe989b51c0994a698cc26@3144 52acb1d6-8a22-11de-b505-999d5b087335

--- OpenMetaverse/GridManager.cs
+++ OpenMetaverse/GridManager.cs
@@ -68,7 +68,11 @@
         /// Land for sale
         LandForSale = 7,
         /// Classified ad
-        Classified = 8
+        Classified = 8,
+        /// Adult rated event
+        AdultEvent = 9,
+        /// Adult land for sale
+        AdultLandForSale = 10
     }

     #endregion Enums


fix formatting

fix formatting

--- Nodejs/Product/TestAdapter/TestExecutor.cs
+++ Nodejs/Product/TestAdapter/TestExecutor.cs
@@ -246,8 +246,7 @@
                         //    }
                         //}
 #if DEBUG
-                    }
-                    catch (COMException ex) {
+                    } catch (COMException ex) {
                         frameworkHandle.SendMessage(TestMessageLevel.Error, "Error occurred connecting to debuggee.");
                         frameworkHandle.SendMessage(TestMessageLevel.Error, ex.ToString());
                         KillNodeProcess();
@@ -295,8 +294,7 @@
             List<ResultObject> jsonResults = null;
             try {
                 jsonResults = JsonConvert.DeserializeObject<List<ResultObject>>(line);
-            }
-            catch (Exception) { }
+            } catch (Exception) { }
             return jsonResults;
         }


Add email addoress validation.

Add email addoress validation.

--- OutlookOkan/SettingWindow.cs
+++ OutlookOkan/SettingWindow.cs
@@ -1,5 +1,7 @@
 using System;
+using System.Net.Mail;
 using System.Windows.Forms;
+using Exception = System.Exception;

 namespace OutlookOkan
 {
@@ -282,11 +284,7 @@
             AutoCcBccKeywordGrid.Columns[2].HeaderText = @"追加アドレス";
             AutoCcBccKeywordGrid.Columns[2].CellTemplate.ToolTipText = @"メールアドレス";

-            AutoCcBccKeywordGrid.DataError += (sender, args) =>
-            {
-                MessageBox.Show("CC または BCCと入力してください。");
-                args.Cancel = true;
-            };
+            AutoCcBccKeywordGrid.CellValidating += (sender, args) => AutoAddEmailAddressValidation(args);
         }

         private void SaveAutoCcBccKeywordListToCsv()
@@ -343,11 +341,7 @@
             AutoCcBccRecipientGrid.Columns[2].HeaderText = @"追加アドレス";
             AutoCcBccRecipientGrid.Columns[2].CellTemplate.ToolTipText = @"メールアドレス";

-            AutoCcBccKeywordGrid.DataError += (sender, args) =>
-            {
-                MessageBox.Show("CC または BCCと入力してください。");
-                args.Cancel = true;
-            };
+            AutoCcBccRecipientGrid.CellValidating += (sender, args) => AutoAddEmailAddressValidation(args);

             // 裏ワザとして、宛先アドレスまたはドメインに@だけの登録で、常にCC/BCCに追加。というのはありな気がするので、あえてバリデーションしない。
         }
@@ -417,5 +411,33 @@
             SaveAutoCcBccRecipientListToCsv();
         }
         #endregion
+
+        #region Validations.
+        private void AutoAddEmailAddressValidation(DataGridViewCellValidatingEventArgs args)
+        {
+            if (args.ColumnIndex == 1)
+            {
+                if (args.FormattedValue.ToString() != "CC" && args.FormattedValue.ToString() != "BCC")
+                {
+                    MessageBox.Show("CCまたはBCCを入力してください。");
+                    args.Cancel = true;
+                }
+            }
+
+            if (args.ColumnIndex == 2)
+            {
+                try
+                {
+                    if (string.IsNullOrEmpty(args.FormattedValue.ToString())) return;
+                    var tempValidationMailAddress = new MailAddress(args.FormattedValue.ToString());
+                }
+                catch (FormatException)
+                {
+                    MessageBox.Show("メールアドレスを入力してください。");
+                    args.Cancel = true;
+                }
+            }
+        }
+        #endregion
     }
 }


[CustomCollectionViewLayout] Images display issues fix

--- CustomCollectionViewLayoutAttributes/SimpleCollectionViewController.cs
+++ CustomCollectionViewLayoutAttributes/SimpleCollectionViewController.cs
@@ -29,20 +29,30 @@
             tapRecognizer = new UITapGestureRecognizer (Tapped);
             CollectionView.AddGestureRecognizer (tapRecognizer);
             CollectionView.RegisterClassForCell (typeof (AnimalCell), animalCellId);
-            CollectionView.BackgroundColor = UIColor.ScrollViewTexturedBackgroundColor;
+			CollectionView.BackgroundColor = UIColor.LightGray;
         }

         void Tapped ()
         {
             if (tapRecognizer.State == UIGestureRecognizerState.Ended) {
                 var pinchPoint = tapRecognizer.LocationInView (CollectionView);
-                var tappedCellPath = CollectionView.IndexPathForItemAtPoint (pinchPoint);
+				var tappedCellPath = GetIndexPathsForVisibleItems (pinchPoint);
                 if (tappedCellPath != null) {
-                    animals.RemoveAt (tappedCellPath.Row);
-                    CollectionView.DeleteItems (new NSIndexPath[] { tappedCellPath });
+					animals.RemoveAt (tappedCellPath.Row);
+					CollectionView.DeleteItems (new NSIndexPath[] { tappedCellPath });
                 }
             }
         }
+
+		public NSIndexPath GetIndexPathsForVisibleItems (PointF touchPoint)
+		{
+			for (int i = 0; i < CollectionView.VisibleCells.Length; i++) {
+				if (CollectionView.VisibleCells [i].Frame.Contains (touchPoint))
+					return CollectionView.IndexPathForCell (CollectionView.VisibleCells [i]);
+			}
+
+			return null;
+		}

         public override int GetItemsCount (UICollectionView collectionView, int section)
         {
@@ -96,6 +106,10 @@
 				var data = attributes.Data;
 				attributes.Center = new PointF (data.Center.X + data.Radius * attributes.Distance * (float) Math.Cos (2 * attributes.Row * Math.PI / data.CellCount),
 				                                data.Center.Y + data.Radius * attributes.Distance * (float) Math.Sin (2 * attributes.Row * Math.PI / data.CellCount));
+
+				if (!float.IsNaN (attributes.Center.X) && !float.IsNaN (attributes.Center.Y) &&
+				   UIDevice.CurrentDevice.SystemVersion.StartsWith ("7"))
+					Center = attributes.Center;
 			}

 			base.ApplyLayoutAttributes (layoutAttributes);


Added swapchain recreation

Added swapchain recreation

The window can now be resized

--- VK_DllTest/Program.cs
+++ VK_DllTest/Program.cs
@@ -22,7 +22,7 @@

         string[] layers = {
             "VK_LAYER_LUNARG_standard_validation",
-            "VK_LAYER_LUNARG_api_dump"
+            //"VK_LAYER_LUNARG_api_dump"
         };

         string[] deviceExtensions = {
@@ -58,7 +58,10 @@
         VkSemaphore imageAvailableSemaphore;
         VkSemaphore renderFinishedSemaphore;

+        bool reCreateSwapchainFlag = false;
+
         void Run() {
+            swapchain = VkSwapchainKHR.Null;
             CreateWindow();
             CreateInstance();
             CreateSurface();
@@ -124,19 +127,33 @@
             presentInfo.pImageIndices = indexMarshalled.Address;

-            //while (!GLFW.WindowShouldClose(window)) {
+            while (!GLFW.WindowShouldClose(window)) {
                 GLFW.PollEvents();

+                if (reCreateSwapchainFlag) {
+                    reCreateSwapchainFlag = false;
+                    RecreateSwapchain();
+                }
+
                 uint imageIndex;
-                VK.AcquireNextImageKHR(device, swapchain, ulong.MaxValue, imageAvailableSemaphore, VkFence.Null, out imageIndex);
+                var result = VK.AcquireNextImageKHR(device, swapchain, ulong.MaxValue, imageAvailableSemaphore, VkFence.Null, out imageIndex);
+
+                if (result == VkResult.ErrorOutOfDateKhr || result == VkResult.SuboptimalKhr) {
+                    RecreateSwapchain();
+                    continue;
+                }

                 commandBuffer.Value = commandBuffers[(int)imageIndex];
-
+                swapchains.Value = swapchain;
                 indexMarshalled.Value = imageIndex;

                 VK.QueueSubmit(graphicsQueue, 1, submitInfoMarshalled.Address, VkFence.Null);
-                VK.QueuePresentKHR(presentQueue, ref presentInfo);
-            //}
+                result = VK.QueuePresentKHR(presentQueue, ref presentInfo);
+
+                if (result == VkResult.ErrorOutOfDateKhr || result == VkResult.SuboptimalKhr) {
+                    RecreateSwapchain();
+                }
+            }

             VK.DeviceWaitIdle(device);
             waitSemaphores.Dispose();
@@ -147,8 +164,26 @@
             submitInfoMarshalled.Dispose();
         }

+        void RecreateSwapchain() {
+            VK.DeviceWaitIdle(device);
+            CreateSwapchain();
+            CreateImageViews();
+            CreateRenderPass();
+            CreateGraphicsPipeline();
+            CreateFramebuffers();
+            CreateCommandBuffers();
+        }
+
         void CreateWindow() {
+            GLFW.WindowHint(WindowHint.ClientAPI, (int)ContextAPI.NoAPI);
             window = GLFW.CreateWindow(height, width, "Vulkan Test", MonitorPtr.Null, WindowPtr.Null);
+
+            GLFW.SetWindowSizeCallback(window, OnWindowResized);
+        }
+
+        void OnWindowResized(WindowPtr window, int width, int height) {
+            if (width == 0 || height == 0) return;
+            reCreateSwapchainFlag = true;
         }

         void CreateInstance() {
@@ -381,7 +416,16 @@
             info.presentMode = mode;
             info.clipped = 1;

-            var result = VK.CreateSwapchainKHR(device, ref info, alloc, out swapchain);
+            var oldSwapchain = swapchain;
+            info.oldSwapchain = oldSwapchain;
+
+            VkSwapchainKHR newSwapchain;
+            var result = VK.CreateSwapchainKHR(device, ref info, alloc, out newSwapchain);
+
+            if (swapchain != VkSwapchainKHR.Null) {
+                VK.DestroySwapchainKHR(device, swapchain, alloc);
+            }
+            swapchain = newSwapchain;

             VK.GetSwapchainImagesKHR(device, swapchain, ref imageCount, IntPtr.Zero);
             var swapchainImagesMarshalled = new MarshalledArray<VkImage>(imageCount);
@@ -471,6 +515,10 @@
             info.dependencyCount = 1;
             info.pDependencies = dependencyMarshalled.Address;

+            if (renderPass != VkRenderPass.Null) {
+                VK.DestroyRenderPass(device, renderPass, alloc);
+            }
+
             var result = VK.CreateRenderPass(device, ref info, alloc, out renderPass);

             colorAttachmentMarshalled.Dispose();
@@ -612,6 +660,10 @@
             var infoMarshalled = new Marshalled<VkGraphicsPipelineCreateInfo>(info);
             var temp = new Marshalled<VkPipeline>();

+            if (pipeline != VkPipeline.Null) {
+                VK.DestroyPipeline(device, pipeline, alloc);
+            }
+
             result = VK.CreateGraphicsPipelines(device, VkPipelineCache.Null, 1, infoMarshalled.Address, alloc, temp.Address);
             pipeline = temp.Value;

@@ -634,6 +686,9 @@
         }

         void CreateFramebuffers() {
+            foreach (var fb in swapchainFramebuffers) {
+                VK.DestroyFramebuffer(device, fb, alloc);
+            }
             swapchainFramebuffers = new List<VkFramebuffer>(swapchainImageViews.Count);

             for (int i = 0; i < swapchainImageViews.Count; i++) {
@@ -666,6 +721,11 @@
         }

         void CreateCommandBuffers() {
+            if (commandBuffers != null) {
+                var marshalled = new MarshalledArray<VkCommandBuffer>(commandBuffers);
+                VK.FreeCommandBuffers(device, commandPool, (uint)commandBuffers.Count, marshalled.Address);
+                marshalled.Dispose();
+            }
             commandBuffers = new List<VkCommandBuffer>(swapchainFramebuffers.Count);

             var info = new VkCommandBufferAllocateInfo();


Use helper in BackupCreationForm

Use helper in BackupCreationForm

--- OBS_Settings_Manager/BackupCreationForm.cs
+++ OBS_Settings_Manager/BackupCreationForm.cs
@@ -46,34 +46,13 @@
                 Directory.CreateDirectory(backupDest);
                 if (meta.SaveData(backupDest))
                 {
-                    copyDir(MainForm.selectedProfilePath, Path.Combine(backupDest, "profileData"));
+                    Helper.copyDir(MainForm.selectedProfilePath, Path.Combine(backupDest, "profileData"));
                     MessageBox.Show("Profile successfully saved!", "Success", MessageBoxButtons.OK);
                     this.Close();
                 }
             }
             else
                 MessageBox.Show("A backup by this name already exists.\nPlease choose a different name or delete the existing backup!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
-        }
-
-        private void copyDir(string sourcePath, string destPath)
-        {
-            if (!Directory.Exists(destPath))
-            {
-                Directory.CreateDirectory(destPath);
-            }
-
-            DirectoryInfo dirInfo = new DirectoryInfo(sourcePath);
-            FileInfo[] files = dirInfo.GetFiles();
-            foreach (FileInfo file in files)
-            {
-                file.CopyTo(Path.Combine(destPath, file.Name));
-            }
-
-            DirectoryInfo[] directories = dirInfo.GetDirectories();
-            foreach (DirectoryInfo dir in directories)
-            {
-                copyDir(Path.Combine(sourcePath, dir.Name), Path.Combine(destPath, dir.Name));
-            }
         }

         private void btnCancel_Click(object sender, EventArgs e)


Fix (#1008)

Fix (#1008)

--- neo/Wallets/Wallet.cs
+++ neo/Wallets/Wallet.cs
@@ -303,7 +303,7 @@
                     ValidUntilBlock = snapshot.Height + Transaction.MaxValidUntilBlockIncrement,
                     Attributes = attributes
                 };
-                using (ApplicationEngine engine = ApplicationEngine.Run(script, snapshot, tx, testMode: true))
+                using (ApplicationEngine engine = ApplicationEngine.Run(script, snapshot.Clone(), tx, testMode: true))
                 {
                     if (engine.State.HasFlag(VMState.FAULT))
                         throw new InvalidOperationException($"Failed execution for '{script.ToHexString()}'");


Print block list before upload/download

Print block list before upload/download

--- net-updown/Program.cs
+++ net-updown/Program.cs
@@ -1,10 +1,15 @@
 using Azure.Core.Pipeline;
 using Azure.Storage.Blobs;
+using Azure.Storage.Blobs.Models;
+using Azure.Storage.Blobs.Specialized;
 using Azure.Storage.Common;
 using CommandLine;
 using System;
+using System.Collections;
+using System.Collections.Generic;
 using System.Diagnostics;
 using System.IO;
+using System.Linq;
 using System.Net.Http;
 using System.Runtime;
 using System.Text;
@@ -66,6 +71,10 @@
             var blobClientOptions = new BlobClientOptions();
             blobClientOptions.Transport = new HttpClientTransport(httpClient);

+            var blockClient = new BlockBlobClient(connectionString, _containerName, _blobName, blobClientOptions);
+            var blockList = (await blockClient.GetBlockListAsync()).Value;
+            PrintBlockList(blockList);
+
             var client = new BlobClient(connectionString, _containerName, _blobName, blobClientOptions);

             var parallelTransferOptions = new ParallelTransferOptions()
@@ -85,7 +94,7 @@
             var sw = new Stopwatch();
             for (var i = 0; i < options.Count; i++)
             {
-                payloadStream.Seek(0, SeekOrigin.Begin);
+                payloadStream.Seek(0, SeekOrigin.Begin);

                 sw.Restart();
                 await client.UploadAsync(payloadStream, parallelTransferOptions: parallelTransferOptions);
@@ -106,5 +115,21 @@
                 Console.WriteLine();
             }
         }
+
+        static void PrintBlockList(BlockList blockList)
+        {
+            PrintBlocks("Committed", blockList.CommittedBlocks);
+            PrintBlocks("Uncommitted", blockList.UncommittedBlocks);
+        }
+
+        static void PrintBlocks(string description, IEnumerable<Block> blocks)
+        {
+            Console.WriteLine($"{description} Blocks: {blocks.Count()}");
+            foreach (var block in blocks)
+            {
+                Console.WriteLine($"  {block.Name}: {block.Size}");
+            }
+            Console.WriteLine();
+        }
     }
 }


* Changed reference to NullReferenceException to System.NullReferenceException for Linux

--- OpenSim/Region/Environment/Scenes/Scene.cs
+++ OpenSim/Region/Environment/Scenes/Scene.cs
@@ -909,7 +909,7 @@
                     {
                         client.SendKillObject(avatar.RegionHandle, avatar.LocalId);
                     }
-                    catch (NullReferenceException NE)
+                    catch (System.NullReferenceException NE)
                     {
                         //We can safely ignore null reference exceptions.  It means the avatar are dead and cleaned up anyway.


- convert comments into documentation - minor formatting adjustments - remove some trailing whitespace

--- OpenSim/Region/Environment/Scenes/Scene.cs
+++ OpenSim/Region/Environment/Scenes/Scene.cs
@@ -60,11 +60,9 @@
         public delegate void SynchronizeSceneHandler(Scene scene);
         public SynchronizeSceneHandler SynchronizeScene = null;
         public int splitID = 0;
-

         #region Fields

-
         protected Timer m_restartWaitTimer = new Timer();

         protected SimStatsReporter m_statsReporter;
@@ -83,8 +81,6 @@
         private readonly Mutex _primAllocateMutex = new Mutex(false);

         private int m_timePhase = 24;
-
-

         /// <summary>
         /// Are we applying physics to any of the prims in this scene?
@@ -262,7 +258,7 @@
                      bool SeeIntoRegionFromNeighbor, IConfigSource config, string simulatorVersion)
         {
             m_config = config;
-
+
             m_moduleLoader = moduleLoader;
             m_authenticateHandler = authen;
             CommsManager = commsMan;
@@ -280,7 +276,7 @@

             m_eventManager = new EventManager();
             m_externalChecks = new SceneExternalChecks(this);
-            m_asyncSceneObjectDeleter = new AsyncSceneObjectGroupDeleter(this);
+            m_asyncSceneObjectDeleter = new AsyncSceneObjectGroupDeleter(this);

             // Load region settings
             m_regInfo.RegionSettings = m_storageManager.DataStore.LoadRegionSettings(m_regInfo.RegionID);
@@ -349,18 +345,21 @@
             return m_simulatorVersion;
         }

+        /// <summary>
+        /// Another region is up. Gets called from Grid Comms:
+        /// (OGS1 -> LocalBackEnd -> RegionListened -> SceneCommunicationService)
+        /// We have to tell all our ScenePresences about it, and add it to the
+        /// neighbor list.
+        ///
+        /// We only add it to the neighbor list if it's within 1 region from here.
+        /// Agents may have draw distance values that cross two regions though, so
+        /// we add it to the notify list regardless of distance. We'll check
+        /// the agent's draw distance before notifying them though.
+        /// </summary>
+        /// <param name="otherRegion">RegionInfo handle for the new region.</param>
+        /// <returns>True after all operations complete, throws exceptions otherwise.</returns>
         public override bool OtherRegionUp(RegionInfo otherRegion)
         {
-            // Another region is up.
-            // Gets called from Grid Comms (SceneCommunicationService<---RegionListener<----LocalBackEnd<----OGS1)
-            // We have to tell all our ScenePresences about it..
-            // and add it to the neighbor list.
-
-            // We only add it to the neighbor list if it's within 1 region from here.
-            // Agents may have draw distance values that cross two regions though, so
-            // we add it to the notify list regardless of distance.
-            // We'll check the agent's draw distance before notifying them though.
-
             if (RegionInfo.RegionHandle != otherRegion.RegionHandle)
             {
                 for (int i = 0; i < m_neighbours.Count; i++)
@@ -391,8 +390,8 @@
                         //m_log.Info("[UP]: " + otherRegion.RegionHandle.ToString());
                     }
                 }
+
                 // If these are cast to INT because long + negative values + abs returns invalid data
-
                 int resultX = Math.Abs((int)otherRegion.RegionLocX - (int)RegionInfo.RegionLocX);
                 int resultY = Math.Abs((int)otherRegion.RegionLocY - (int)RegionInfo.RegionLocY);
                 if (resultX <= 1 && resultY <= 1)
@@ -428,7 +427,6 @@
             return true;
         }

-        // Given float seconds, this will restart the region.
         public void AddNeighborRegion(RegionInfo region)
         {
             lock (m_neighbours)
@@ -457,6 +455,10 @@
             return found;
         }

+        /// <summary>
+        /// Given float seconds, this will restart the region.
+        /// </summary>
+        /// <param name="seconds">float indicating duration before restart.</param>
         public virtual void Restart(float seconds)
         {
             // notifications are done in 15 second increments
@@ -853,7 +855,7 @@
                 }
                 maintc = System.Environment.TickCount - maintc;
                 maintc = (int)(m_timespan * 1000) - maintc;
-
+
                 if ((maintc < (m_timespan * 1000)) && maintc > 0)
                     Thread.Sleep(maintc);
             }
@@ -1916,9 +1918,9 @@
         }

         /// <summary>
-        /// Move the given scene object into a new region depending on which region its absolute position has moved
-        /// into.
-        ///
+        /// Move the given scene object into a new region depending on which region its absolute position has moved
+        /// into.
+        ///
         /// This method locates the new region handle and offsets the prim position for the new region
         /// </summary>
         /// <param name="attemptedPosition">the attempted out of region position of the scene object</param>
@@ -1943,7 +1945,7 @@
                 }
                 return;
             }
-
+
             int thisx = (int)RegionInfo.RegionLocX;
             int thisy = (int)RegionInfo.RegionLocY;

@@ -1953,14 +1955,14 @@
             if (attemptedPosition.X > Constants.RegionSize + 0.1f)
             {
                 pos.X = ((pos.X - Constants.RegionSize));
-                newRegionHandle
+                newRegionHandle
                     = Util.UIntsToLong((uint)((thisx + 1) * Constants.RegionSize), (uint)(thisy * Constants.RegionSize));
                 // x + 1
             }
             else if (attemptedPosition.X < -0.1f)
             {
                 pos.X = ((pos.X + Constants.RegionSize));
-                newRegionHandle
+                newRegionHandle
                     = Util.UIntsToLong((uint)((thisx - 1) * Constants.RegionSize), (uint)(thisy * Constants.RegionSize));
                 // x - 1
             }
@@ -1968,14 +1970,14 @@
             if (attemptedPosition.Y > Constants.RegionSize + 0.1f)
             {
                 pos.Y = ((pos.Y - Constants.RegionSize));
-                newRegionHandle
+                newRegionHandle
                     = Util.UIntsToLong((uint)(thisx * Constants.RegionSize), (uint)((thisy + 1) * Constants.RegionSize));
                 // y + 1
             }
             else if (attemptedPosition.Y < -0.1f)
             {
                 pos.Y = ((pos.Y + Constants.RegionSize));
-                newRegionHandle
+                newRegionHandle
                     = Util.UIntsToLong((uint)(thisx * Constants.RegionSize), (uint)((thisy - 1) * Constants.RegionSize));
                 // y - 1
             }
@@ -1986,8 +1988,8 @@

             // If we fail to cross the border, then reset the position of the scene object on that border.
             if (!CrossPrimGroupIntoNewRegion(newRegionHandle, grp))
-            {
-                grp.OffsetForNewRegion(oldGroupPosition);
+            {
+                grp.OffsetForNewRegion(oldGroupPosition);
             }
         }

@@ -1995,16 +1997,16 @@
         /// Move the given scene object into a new region
         /// </summary>
         /// <param name="newRegionHandle"></param>
-        /// <param name="grp">Scene Object Group that we're crossing</param>
+        /// <param name="grp">Scene Object Group that we're crossing</param>
         /// <returns>
         /// true if the crossing itself was successful, false on failure
         /// FIMXE: we still return true if the crossing object was not successfully deleted from the originating region
         /// </returns>
         public bool CrossPrimGroupIntoNewRegion(ulong newRegionHandle, SceneObjectGroup grp)
         {
-            bool successYN = false;
+            bool successYN = false;
             int primcrossingXMLmethod = 0;
-
+
             if (newRegionHandle != 0)
             {
                 successYN
@@ -2021,7 +2023,7 @@
                     catch (Exception e)
                     {
                         m_log.ErrorFormat(
-                            "[INTERREGION]: Exception deleting the old object left behind on a border crossing for {0}, {1}",
+                            "[INTERREGION]: Exception deleting the old object left behind on a border crossing for {0}, {1}",
                             grp, e);
                     }
                 }
@@ -2034,7 +2036,7 @@
                             grp.RootPart.PhysActor.CrossingFailure();
                         }
                     }
-
+
                     m_log.ErrorFormat("[INTERREGION]: Prim crossing failed for {0}", grp);
                 }
             }
@@ -2042,7 +2044,7 @@
             {
                 m_log.Error("[INTERREGION]: region handle was unexpectedly 0 in Scene.CrossPrimGroupIntoNewRegion()");
             }
-
+
             return successYN;
         }

@@ -2300,7 +2302,7 @@

             m_log.DebugFormat("gesture : {0} ", gestureId.ToString());
         }
-
+
         /// <summary>
         /// Teleport an avatar to their home region
         /// </summary>
@@ -2325,7 +2327,7 @@
                     return;
                 }
                 RequestTeleportLocation(
-                    client, regionInfo.RegionHandle, UserProfile.HomeLocation, UserProfile.HomeLookAt,
+                    client, regionInfo.RegionHandle, UserProfile.HomeLocation, UserProfile.HomeLookAt,
                     (uint)(TPFlags.SetLastToTarget | TPFlags.ViaHome));
             }
         }
@@ -3929,7 +3931,7 @@
         //        }

         /// <summary>
-        /// Get a named prim contained in this scene (will return the first
+        /// Get a named prim contained in this scene (will return the first
         /// found, if there are more than one prim with the same name)
         /// </summary>
         /// <param name="name"></param>


ScreenshotStore path handling

ScreenshotStore path handling

--- FinesSE/FinesSE.VisualRegression/Infrastructure/DiskScreenshotStore.cs
+++ FinesSE/FinesSE.VisualRegression/Infrastructure/DiskScreenshotStore.cs
@@ -1,5 +1,6 @@
 using FinesSE.Contracts.Infrastructure;
 using FinesSE.VisualRegression.Contracts;
+using System;
 using System.IO;

 namespace FinesSE.VisualRegression.Infrastructure
@@ -15,17 +16,22 @@
             config = configuration.Get(VisualRegressionConfiguration.Default);
         }

+        string GetPath()
+            => Path.IsPathRooted(config.ScreenshotStorePath) ?
+            config.ScreenshotStorePath :
+            Path.Combine(AppDomain.CurrentDomain.BaseDirectory, config.ScreenshotStorePath);
+
         public string GetPath(string topicId, string objectId, string versionId)
             => Path.Combine(
-                config.ScreenshotStorePath,
+                GetPath(),
                 topicId,
-                versionId,
+                versionId,
                 $"{config.ScreenshotStoreFilePrefix}{objectId}{config.ScreenshotStoreFileExtension}");

         public void Clear()
         {
-            Directory.Delete(config.ScreenshotStorePath, true);
-            Directory.CreateDirectory(config.ScreenshotStorePath);
+            Directory.Delete(GetPath(), true);
+            Directory.CreateDirectory(GetPath());
         }

         public double Compare(string topicId, string objectId, string baseVersionId, string referenceVersionId)


Remove useless argument.

Remove useless argument.

--- PasswordGenerator/Program.cs
+++ PasswordGenerator/Program.cs
@@ -31,11 +31,6 @@
 				if (Regex.IsMatch(arg, @"^\d+$"))
 				{
 					return int.Parse(arg);
-				}
-
-				if (arg == "short")
-				{
-					return 14;
 				}
 			}


Reorder method

Reorder method

--- PathAnimator/PathAnimator.cs
+++ PathAnimator/PathAnimator.cs
@@ -209,40 +209,6 @@

         private void OnValidate() {
         }
-
-        public void ValidateInspectorSettings() {
-            if (Settings == null) return;
-
-            // Limit PositionLerpSpeed value.
-            if (Settings.PositionLerpSpeed < 0) {
-                Settings.PositionLerpSpeed = 0;
-            }
-            else if (Settings.PositionLerpSpeed > 1) {
-                Settings.PositionLerpSpeed = 1;
-            }
-
-            // Limit RotationSpeed value.
-            if (Settings.RotationSpeed < 0) {
-                Settings.RotationSpeed = 0;
-            }
-
-            // Limit ForwardPointOffset value.
-            if (Settings.ForwardPointOffset < 0.001f) {
-                Settings.ForwardPointOffset = 0.001f;
-            }
-            else if (Settings.ForwardPointOffset > 1) {
-                Settings.ForwardPointOffset = 1;
-            }
-
-            // Limit ExmportSamplingFrequency value.
-            if (Settings.ExportSamplingFrequency < 1) {
-                Settings.ExportSamplingFrequency = 1;
-            }
-            else if (Settings.ExportSamplingFrequency > 100) {
-                Settings.ExportSamplingFrequency = 100;
-            }
-        }
-
         [SuppressMessage("ReSharper", "UnusedMember.Local")]
         private void Start() {
             if (Application.isPlaying && Settings.AutoPlay) {
@@ -527,6 +493,39 @@
         #endregion

         #region HELPER METHODS
+        public void ValidateInspectorSettings() {
+            if (Settings == null) return;
+
+            // Limit PositionLerpSpeed value.
+            if (Settings.PositionLerpSpeed < 0) {
+                Settings.PositionLerpSpeed = 0;
+            }
+            else if (Settings.PositionLerpSpeed > 1) {
+                Settings.PositionLerpSpeed = 1;
+            }
+
+            // Limit RotationSpeed value.
+            if (Settings.RotationSpeed < 0) {
+                Settings.RotationSpeed = 0;
+            }
+
+            // Limit ForwardPointOffset value.
+            if (Settings.ForwardPointOffset < 0.001f) {
+                Settings.ForwardPointOffset = 0.001f;
+            }
+            else if (Settings.ForwardPointOffset > 1) {
+                Settings.ForwardPointOffset = 1;
+            }
+
+            // Limit ExmportSamplingFrequency value.
+            if (Settings.ExportSamplingFrequency < 1) {
+                Settings.ExportSamplingFrequency = 1;
+            }
+            else if (Settings.ExportSamplingFrequency > 100) {
+                Settings.ExportSamplingFrequency = 100;
+            }
+        }
+
         // TODO Rename to HandleFiringNodeReachedEvent.
         private void HandleFireNodeReachedEvent() {
             // Get path timestamps.


Remove setter

Remove setter

--- PathEvents/PathEventsData.cs
+++ PathEvents/PathEventsData.cs
@@ -11,7 +11,6 @@

         public List<NodeEvent> NodeEvents {
             get { return nodeEvents; }
-            set { nodeEvents = value; }
         }

         public void ResetEvents() {


Started adding access key support to menus.

Kinda hacky - this probably needs to be refactored into an access key
manager like in WPF.

--- Perspex.Controls/MenuItem.cs
+++ Perspex.Controls/MenuItem.cs
@@ -76,6 +76,11 @@
         private IDisposable submenuTimer;

         /// <summary>
+        /// The submenu popup.
+        /// </summary>
+        private Popup popup;
+
+        /// <summary>
         /// Initializes static members of the <see cref="MenuItem"/> class.
         /// </summary>
         static MenuItem()
@@ -268,12 +273,62 @@
                     }

                     break;
+
+                default:
+                    e.Handled = this.HandleAccessKey(e.Text);
+                    break;
             }

             if (!passStraightToParent)
             {
                 base.OnKeyDown(e);
             }
+        }
+
+        private bool HandleAccessKey(string text)
+        {
+            text = text.ToUpper();
+
+            if (!this.IsSubMenuOpen)
+            {
+                var match = this.GetVisualDescendents()
+                    .OfType<AccessText>()
+                    .FirstOrDefault(x => x.AccessKey.ToString().ToUpper() == text);
+
+                if (match != null)
+                {
+                    this.IsSubMenuOpen = true;
+                    return true;
+                }
+            }
+            else
+            {
+                var match = this.popup.PopupRoot.GetVisualDescendents()
+                    .OfType<AccessText>()
+                    .FirstOrDefault(x => x.AccessKey.ToString().ToUpper() == text)
+                    ?.GetVisualAncestors()
+                    .OfType<MenuItem>()
+                    .FirstOrDefault();
+
+                if (match != null)
+                {
+                    var item = (MenuItem)this.ItemContainerGenerator.GetItemForContainer(match);
+
+                    if (item.HasSubMenu)
+                    {
+                        item.SelectedIndex = 0;
+                        item.IsSubMenuOpen = true;
+                    }
+                    else
+                    {
+                        item.RaiseEvent(new RoutedEventArgs(ClickEvent));
+                    }
+
+                    return true;
+                }
+            }
+
+            return false;
         }

         /// <summary>
@@ -358,14 +413,10 @@
         {
             base.OnTemplateApplied();

-            var popup = this.FindTemplateChild<Popup>("popup");
-
-            if (popup != null)
-            {
-                popup.PopupRootCreated += this.PopupRootCreated;
-                popup.Opened += this.PopupOpened;
-                popup.Closed += this.PopupClosed;
-            }
+            this.popup = this.GetTemplateChild<Popup>("popup");
+            this.popup.PopupRootCreated += this.PopupRootCreated;
+            this.popup.Opened += this.PopupOpened;
+            this.popup.Closed += this.PopupClosed;
         }

         /// <summary>


Implemented IEquatable<T> in UdpIPv4Address

--- src/managed/udpkit/udpAddress.cs
+++ src/managed/udpkit/udpAddress.cs
@@ -22,13 +22,14 @@
 * THE SOFTWARE.
 */

+using System;
 using System.Collections.Generic;
 using System.Net;
 using System.Runtime.InteropServices;

 namespace UdpKit {
     [StructLayout(LayoutKind.Explicit, Pack = 1)]
-    public struct UdpIPv4Address {
+    public struct UdpIPv4Address : IEquatable<UdpIPv4Address> {

         public class Comparer : IComparer<UdpIPv4Address> {
             int IComparer<UdpIPv4Address>.Compare (UdpIPv4Address x, UdpIPv4Address y) {
@@ -71,6 +72,10 @@
             Byte2 = b;
             Byte3 = a;
         }
+
+        public bool Equals (UdpIPv4Address other) {
+            return Compare(this,  other) == 0;
+        }

         public override int GetHashCode () {
             return (int) Packed;
@@ -101,6 +106,5 @@
             if (x.Packed < y.Packed) return -1;
             return 0;
         }
-
     }
 }


Fixed Android media notification play previous behaviour.

--- MediaManager/Plugin.MediaManager.Android/MediaManagerImplementation.cs
+++ MediaManager/Plugin.MediaManager.Android/MediaManagerImplementation.cs
@@ -62,7 +62,7 @@
             }
             else if (action.Equals(MediaServiceBase.ActionPrevious))
             {
-                await PlaybackController.PlayPrevious();
+                await PlaybackController.PlayPreviousOrSeekToStart();
             }
             else if (action.Equals(MediaServiceBase.ActionNext))
             {


Empty array for empty stack traces in iOS

--- Mindscape.Raygun4Net.Xamarin.iOS/Builders/RaygunErrorMessageBuilder.cs
+++ Mindscape.Raygun4Net.Xamarin.iOS/Builders/RaygunErrorMessageBuilder.cs
@@ -75,10 +75,8 @@
       #endif

       string stackTraceStr = exception.StackTrace;
-      if (stackTraceStr == null)
-      {
-        var line = new RaygunErrorStackTraceLineMessage { FileName = "none", LineNumber = 0 };
-        lines.Add(line);
+      if (String.IsNullOrWhiteSpace(stackTraceStr))
+      {
         return lines.ToArray();
       }

@@ -97,8 +95,6 @@

       if (frames == null || frames.Length == 0)
       {
-        var line = new RaygunErrorStackTraceLineMessage { FileName = "none", LineNumber = 0 };
-        lines.Add(line);
         return lines.ToArray();
       }


Update SetRoomRotationUsingHead script to call OsvrUnityNativeVR's RenderManager instance if we're on that path

--- OSVR-Unity/Assets/OSVRUnity/Sample/Scripts/SetRoomRotationUsingHead.cs
+++ OSVR-Unity/Assets/OSVRUnity/Sample/Scripts/SetRoomRotationUsingHead.cs
@@ -32,25 +32,31 @@
             public KeyCode clearRoomRotationKey = KeyCode.U;
             private ClientKit _clientKit;
             private DisplayController _displayController;
+            private OsvrUnityNativeVR _vrController;

             void Awake()
             {
                 _clientKit = ClientKit.instance;
                 _displayController = FindObjectOfType<DisplayController>();
+                _vrController = FindObjectOfType<OsvrUnityNativeVR>();
             }

             void Update()
             {
                 if (Input.GetKeyDown(setRoomRotationKey))
-                {
-
+                {
+
                     if (_displayController != null && _displayController.UseRenderManager)
                     {
                         _displayController.RenderManager.SetRoomRotationUsingHead();
                     }
+                    else if (_vrController != null && _vrController.RenderManager != null)
+                    {
+                        _vrController.RenderManager.SetRoomRotationUsingHead();
+                    }
                     else
                     {
-                        if(_clientKit.context.CheckStatus())
+                        if (_clientKit.context.CheckStatus())
                         {
                             _clientKit.context.SetRoomRotationUsingHead();
                         }
@@ -62,6 +68,10 @@
                     {
                         _displayController.RenderManager.ClearRoomToWorldTransform();
                     }
+                    else if (_vrController != null && _vrController.RenderManager != null)
+                    {
+                        _vrController.RenderManager.ClearRoomToWorldTransform();
+                    }
                     else
                     {
                         _clientKit.context.ClearRoomToWorldTransform();


Comment a debug message so that it doesn't spew the console upon encountering unknown xml elements.

--- OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
+++ OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
@@ -1533,7 +1533,7 @@
                 }
                 else
                 {
-                    m_log.DebugFormat("[SceneObjectSerializer]: caught unknown element {0}", nodeName);
+                    //m_log.DebugFormat("[SceneObjectSerializer]: caught unknown element {0}", nodeName);
                     reader.ReadOuterXml(); // ignore
                 }


Refs #705,#1250 - unit test lege categorie verwijderen

... is opnieuw geimplementeerd

--- Solution/TestProjecten/Chiro.Gap.Services.Test/CategorieVerwijderen.cs
+++ Solution/TestProjecten/Chiro.Gap.Services.Test/CategorieVerwijderen.cs
@@ -78,24 +78,41 @@
         [TestMethod]
         public void CategorieVerwijderenNormaal()
         {
-            throw new NotImplementedException();
-            //using (new TransactionScope())
-            //{
-            //    var catID = _groepenSvc.CategorieToevoegen(TestInfo.GROEP_ID, "CategorieVerwijderenNormaal", "TempCat3");
-
-            //    // Act: verwijder de categorie met gegeven ID, en probeer categorie opnieuw op te halen
-
-            //    _groepenSvc.CategorieVerwijderen(catID, false);
-
-            //    var catIDTest = _groepenSvc.CategorieIDOphalen(
-            //        TestInfo.GROEP_ID,
-            //        "TempCat3");
-
-            //    // Assert: categorie niet meer gevonden.
-            //    Assert.IsTrue(catIDTest == 0);
-
-            //}
-
+            // ARRANGE
+
+            #region testdata
+
+            var groep = new ChiroGroep();
+
+            var categorie = new Categorie
+            {
+                ID = 1,
+                Groep = groep
+            };
+            groep.Categorie.Add(categorie);
+
+            #endregion
+
+            #region dependency injection
+
+            var categorieenRepo = new DummyRepo<Categorie>(new List<Categorie> { categorie });
+
+            var repositoryProviderMock = new Mock<IRepositoryProvider>();
+            repositoryProviderMock.Setup(src => src.RepositoryGet<Categorie>())
+                                  .Returns(categorieenRepo);
+
+            Factory.InstantieRegistreren(repositoryProviderMock.Object);
+            #endregion
+
+            // ACT
+
+            var groepenService = Factory.Maak<GroepenService>();
+            // Verwijder categorie zonder te forceren
+            groepenService.CategorieVerwijderen(categorie.ID, false);
+
+            // ASSERT
+
+            Assert.IsNull(categorieenRepo.ByID(categorie.ID));  // categorie weg
         }

         /// <summary>
@@ -177,7 +194,7 @@
             // ACT

             var groepenService = Factory.Maak<GroepenService>();
-            // Verwijder categorie zonder te forceren
+            // Verwijder categorie door te forceren
             groepenService.CategorieVerwijderen(categorie.ID, true);

             // ASSERT


Change to use static StopWatch.GetTimestamp

--- Source/HelixToolkit.SharpDX.Shared/Render/RenderHost/RenderHostBase.cs
+++ Source/HelixToolkit.SharpDX.Shared/Render/RenderHost/RenderHostBase.cs
@@ -456,8 +456,6 @@
         /// </summary>
         protected volatile bool UpdateRequested = true;

-        private readonly Stopwatch renderTimer = new Stopwatch();
-
         private TimeSpan lastRenderingDuration = TimeSpan.Zero;

         private TimeSpan lastRenderTime = TimeSpan.Zero;
@@ -507,7 +505,7 @@
             if (CanRender())
             {
                 IsBusy = true;
-                var t0 = renderTimer.Elapsed;
+                var t0 = TimeSpan.FromSeconds((double)Stopwatch.GetTimestamp()/Stopwatch.Frequency);
                 RenderStatistics.FPSStatistics.Push((t0 - lastRenderTime).TotalMilliseconds);
                 lastRenderTime = t0;
                 UpdateRequested = false;
@@ -559,7 +557,7 @@
                     PostRender();
                     IsBusy = false;
                 }
-                lastRenderingDuration = renderTimer.Elapsed - t0;
+                lastRenderingDuration = TimeSpan.FromSeconds((double)Stopwatch.GetTimestamp() / Stopwatch.Frequency) - t0;
                 RenderStatistics.LatencyStatistics.Push(lastRenderingDuration.TotalMilliseconds);
             }
         }
@@ -664,7 +662,6 @@
         {
             Log(LogLevel.Information, "");
             RenderStatistics.Reset();
-            renderTimer.Restart();
             lastRenderingDuration = TimeSpan.Zero;
             lastRenderTime = TimeSpan.Zero;
             InvalidateRender();
@@ -792,7 +789,6 @@
         {
             Log(LogLevel.Information, "");
             StopRenderLoop?.Invoke(this, EventArgs.Empty);
-            renderTimer.Stop();
         }
         /// <summary>
         /// Disposes the buffers.


Fix warning in project.

Fix warning in project.

--- Source/MVC6/Boilerplate.AspNetCore.Sample/Services/Feed/FeedService.cs
+++ Source/MVC6/Boilerplate.AspNetCore.Sample/Services/Feed/FeedService.cs
@@ -194,7 +194,7 @@
         /// </summary>
         /// <param name="cancellationToken">A <see cref="CancellationToken"/> signifying if the request is cancelled.</param>
         /// <returns>A collection of <see cref="SyndicationItem"/>'s.</returns>
-        private async Task<List<SyndicationItem>> GetItems(CancellationToken cancellationToken)
+        private Task<List<SyndicationItem>> GetItems(CancellationToken cancellationToken)
         {
             List<SyndicationItem> items = new List<SyndicationItem>();

@@ -259,7 +259,7 @@
                 items.Add(item);
             }

-            return items;
+            return Task.FromResult(items);
         }

         #endregion


Update Product_MenuFunctions.cs

Update Product_MenuFunctions.cs

--- Test/AdventureWorksFunctionalModel/Production/Product_MenuFunctions.cs
+++ Test/AdventureWorksFunctionalModel/Production/Product_MenuFunctions.cs
@@ -10,6 +10,7 @@
 using AW.Types;

 using static AW.Helpers;
+using System.Collections.Generic;

 namespace AW.Functions
 {
@@ -33,5 +34,17 @@
         [MemberOrder(4)]
         public static IQueryable<Product> AllProducts(IContext context) => context.Instances<Product>();

+        [MemberOrder(5)]
+        public static IQueryable<Product> ListProductsByCategory(
+            ProductCategory category, [Optionally] ProductSubcategory subCategory, IContext context)
+        {
+            int catId = category.ProductCategoryID;
+            int subId = subCategory is null ? 0 : subCategory.ProductSubcategoryID;
+            return context.Instances<Product>().Where(p => p.ProductSubcategory.ProductCategoryID == catId
+                && (subId == 0 || p.ProductSubcategoryID.Value == subId));
+        }
+
+        public static List<ProductSubcategory> Choices1ListProductsByCategory(ProductCategory category) =>
+            category.ProductSubcategory.ToList();
     }
 }


[Package Explorer] Fix a bug with dragging files between folders.

--HG--
branch : 1.3

--- Tools/NuGet/NuGetPackageExplorer/PackageExplorer/PackageViewer.xaml.cs
+++ Tools/NuGet/NuGetPackageExplorer/PackageExplorer/PackageViewer.xaml.cs
@@ -172,7 +172,7 @@
                 PackageFile file = item.DataContext as PackageFile;
                 if (file != null) {
                     _dragItem = item;
-                    _dragPoint = e.GetPosition(null);
+                    _dragPoint = e.GetPosition(item);
                     _isDragging = true;
                 }
             }
@@ -185,7 +185,7 @@

             TreeViewItem item = sender as TreeViewItem;
             if (item == _dragItem) {
-                System.Windows.Point newPoint = e.GetPosition(null);
+                System.Windows.Point newPoint = e.GetPosition(item);
                 if (Math.Abs(newPoint.X - _dragPoint.X) >= SystemParameters.MinimumHorizontalDragDistance ||
                     Math.Abs(newPoint.Y - _dragPoint.Y) >= SystemParameters.MinimumVerticalDragDistance) {
                     // initiate a dragging


attribute to set SlotDataAsset to serialization as binary

Large arrays of data cause massive memory usage during serialization to
text, this avoids that.

--- UMAProject/Assets/UMA/Core/StandardAssets/UMA/Scripts/SlotDataAsset.cs
+++ UMAProject/Assets/UMA/Core/StandardAssets/UMA/Scripts/SlotDataAsset.cs
@@ -6,6 +6,7 @@
 	/// Contains the immutable data shared between slots of the same type.
 	/// </summary>
 	[System.Serializable]
+	[PreferBinarySerialization]
 	public partial class SlotDataAsset : ScriptableObject, ISerializationCallbackReceiver, INameProvider
     {
 		public string slotName;


formatting

formatting

--- seed/FulcrumSeed.WebApi/Startup.cs
+++ seed/FulcrumSeed.WebApi/Startup.cs
@@ -1,11 +1,6 @@
-using System;
-using System.Collections.Generic;
-using System.IdentityModel.Tokens;
-using System.Linq;
+using System.Linq;
 using System.Net.Http.Formatting;
 using System.Net.Http.Headers;
-using System.Security.Claims;
-using System.Security.Cryptography.X509Certificates;
 using System.Web.Http;
 using System.Web.Http.Controllers;
 using System.Web.Http.Dispatcher;
@@ -19,24 +14,13 @@
 using Fulcrum.Common.Web;
 using Fulcrum.Runtime;
 using FulcrumSeed.Components;
-using FulcrumSeed.Components.UserAccounts;
-using FulcrumSeed.Components.UserAccounts.Domain.Entities;
-using FulcrumSeed.Components.UserAccounts.Domain.Repositories;
-using FulcrumSeed.Components.UserAccounts.Domain.Services;
-using FulcrumSeed.Infrastructure.Identity;
-using FulcrumSeed.Infrastructure.Membership;
 using FulcrumSeed.WebApi;
 using IdentityManager.Core.Logging;
 using IdentityManager.Core.Logging.LogProviders;
 using IdentityServer3.AccessTokenValidation;
-using IdentityServer3.Core.Configuration;
-using IdentityServer3.Core.Services;
-using IdentityServer3.Core.Services.Default;
-using IdentityServer3.Core.Services.InMemory;
 using log4net.Config;
 using Microsoft.Owin;
 using Microsoft.Owin.Cors;
-using Microsoft.Owin.Security.Jwt;
 using Newtonsoft.Json.Serialization;
 using Owin;

@@ -106,12 +90,11 @@
 				              await next();
 			              });

+			// TODO: pull Authority from config
 			app.UseIdentityServerBearerTokenAuthentication(new IdentityServerBearerTokenAuthenticationOptions
 			{
-				// TODO: pull from config
 				Authority = "http://www.fulcrum-seed.local/auth",
 			});
-
 		}

 		// TODO: move to CommonAppSetup