Delete TextInput1.cs

Delete TextInput1.cs

--- TextEditor/TestConsole/CommandProcessor/TextInput1.cs
+++ TextEditor/TestConsole/CommandProcessor/TextInput1.cs
@@ -1,345 +0,0 @@
-/*
-using System;
-using System.Collections.Generic;
-using System.Text;
-
-namespace Kernel.CommandProcessor
-{
-    public enum InputMode { Insert, Override };
-
-    public class ConsoleTextInput : TextInput1
-    {
-        protected override ConsoleKeyInfo ReadKey(bool truncate)
-        {
-            Console.TreatControlCAsInput = true;
-            return Console.ReadKey(true);
-        }
-
-        protected override void Write(string value)
-        {
-            Console.Write(value);
-        }
-
-        protected override void Write(char value)
-        {
-            Console.Write(value);
-        }
-
-        protected override void Write(List<char> chars)
-        {
-            foreach (char c in chars)
-                Console.Write(c);
-        }
-
-        protected override void WriteLine(string value)
-        {
-            Console.WriteLine(value);
-        }
-
-        protected override void MoveCursorLeft()
-        {
-            Console.CursorLeft--;
-        }
-
-        protected override void MoveCursorRight()
-        {
-            Console.CursorLeft++;
-            if (Console.CursorLeft > Console.BufferWidth)
-            {
-                Console.CursorLeft = 1;
-                Console.CursorTop++;
-            }
-        }
-
-        protected override void SetCursorSize(int i)
-        {
-            Console.CursorSize = i;
-        }
-
-        protected override void SetCursorLeft(int top, int left)
-        {
-            if (left > Console.BufferWidth)
-            {
-                left = 1;
-                Console.CursorTop++;
-            }
-
-            Console.CursorLeft = left;
-            Console.CursorTop = top;
-        }
-
-        protected override int GetCursorLeft()
-        {
-            return Console.CursorLeft;
-        }
-    }
-
-    public abstract class TextInput1
-    {
-        protected abstract ConsoleKeyInfo ReadKey(bool truncate);
-        protected abstract void Write(string value);
-        protected abstract void Write(char value);
-        protected abstract void WriteLine(string value = "");
-        protected abstract void MoveCursorLeft();
-        protected abstract void MoveCursorRight();
-        protected abstract void SetCursorSize(int i);
-        protected abstract int GetCursorLeft();
-        protected abstract void SetCursorLeft(int top, int left);
-        protected abstract void Write(List<char> chars);
-
-        private InputMode inputMode = InputMode.Insert;
-        public InputMode InputMode
-        {
-            get
-            {
-                return inputMode;
-            }
-            set
-            {
-                inputMode = value;
-                if (inputMode == InputMode.Insert)
-                    SetCursorSize(25);
-                else
-                    SetCursorSize(100);
-            }
-        }
-
-        private List<List<char>> history = new List<List<char>>();
-        private List<string> tabItems = new List<string>();
-        int historyIndex = 0;
-
-        public string GetText1(List<string> tabItems)
-        {
-            int startLeft = GetCursorLeft();
-            int startTop = Console.CursorTop;
-
-            List<char> chars = new List<char>();
-            int index = 0;
-            int padsize = 0;
-            bool loop = true;
-            int tabSubItemIndex = 0;
-            string tabItemsStartsWith = "";
-            string tabCommand = "";
-            List<string> subTabItems = new List<string>();
-
-            this.tabItems = tabItems;
-            historyIndex = history.Count - 1;
-            InputMode = InputMode.Insert;
-
-            while (loop)
-            {
-                SetCursorLeft(startTop, startLeft);
-                Write(chars);
-                if (padsize > chars.Count)
-                    Write(new string(' ', padsize - chars.Count));
-                padsize = chars.Count;
-                SetCursorLeft(startTop, startLeft + index);
-                ConsoleKeyInfo cki = ReadKey(true);
-
-                if (cki.KeyChar > 31 && cki.KeyChar < 127)
-                {
-                    switch (InputMode)
-                    {
-                        case InputMode.Insert:
-                            chars.Insert(index, cki.KeyChar);
-                            break;
-                        case InputMode.Override:
-                            if (index < chars.Count)
-                                chars[index] = cki.KeyChar;
-                            else
-                                chars.Insert(index, cki.KeyChar);
-                            break;
-                    }
-                    Write(cki.KeyChar);
-                    index++;
-                    continue;
-                }
-
-                switch (cki.Key)
-                {
-                    case ConsoleKey.Backspace:
-                        if (index > 0)
-                        {
-                            index--;
-                            chars.RemoveAt(index);
-                        }
-                        tabItemsStartsWith = "";
-                        subTabItems.Clear();
-                        tabSubItemIndex = 0;
-                        break;
-                    case ConsoleKey.C:
-                        chars.Clear();
-                        WriteLine();
-                        loop = false;
-                        break;
-                    case ConsoleKey.Delete:
-                        if (index < chars.Count)
-                            chars.RemoveAt(index);
-                        break;
-                    case ConsoleKey.DownArrow:
-                        if (historyIndex > -1)
-                        {
-                            if (historyIndex < history.Count - 1)
-                            {
-                                historyIndex++;
-                            }
-                            chars = history[historyIndex];
-                            index = chars.Count;
-                        }
-                        break;
-                    case ConsoleKey.End:
-                        SetCursorLeft(startTop, chars.Count);
-                        index = chars.Count;
-                        break;
-                    case ConsoleKey.Enter:
-                        loop = false;
-                        break;
-                    case ConsoleKey.Home:
-                        SetCursorLeft(startTop, startLeft);
-                        index = 0;
-                        break;
-                    case ConsoleKey.Insert:
-                        if (InputMode == InputMode.Insert)
-                        {
-                            InputMode = InputMode.Override;
-                            SetCursorSize(100);
-                        }
-                        else
-                        {
-                            InputMode = InputMode.Insert;
-                            SetCursorSize(25);
-                        }
-                        break;
-                    case ConsoleKey.LeftArrow:
-                        if (index > 0)
-                        {
-                            index--;
-                            MoveCursorLeft();
-                        }
-                        break;
-                    case ConsoleKey.RightArrow:
-                        if (index < chars.Count)
-                        {
-                            index++;
-                            MoveCursorRight();
-                        }
-                        break;
-                    case ConsoleKey.Tab:
-                        if (tabItemsStartsWith.Length == 0 && subTabItems.Count == 0) // get substring to search on
-                        {
-                            subTabItems.Clear();
-                            if (chars.Contains(' '))
-                            {
-                                string c = CharListToString(chars);
-                                int i = c.IndexOf(' ');
-                                tabCommand = c.Substring(0, i + 1);
-                                tabItemsStartsWith = c.Substring(i + 1);
-                            }
-                            else
-                            {
-                                tabItemsStartsWith = CharListToString(chars);
-                                tabCommand = "";
-                            }
-
-                            foreach (string s in tabItems)
-                            {
-                                if (tabItemsStartsWith.Length > 0)
-                                {
-                                    if (s.ToLower().StartsWith(tabItemsStartsWith.ToLower()))
-                                        subTabItems.Add(s);
-                                }
-                                else
-                                {
-                                    subTabItems.Add(s);
-                                }
-                            }
-                        }
-
-                        if (tabSubItemIndex >= subTabItems.Count)
-                            tabSubItemIndex = 0;
-                        else if (tabSubItemIndex < 0)
-                            tabSubItemIndex = subTabItems.Count - 1;
-
-                        if (subTabItems.Count > 0)
-                        {
-                            chars = StringToCharList(tabCommand + subTabItems[tabSubItemIndex]);
-                            index = chars.Count;
-                            if (cki.Modifiers.HasFlag(ConsoleModifiers.Shift))
-                            {
-                                if (tabSubItemIndex > 0)
-                                    tabSubItemIndex--;
-                                else
-                                    tabSubItemIndex = subTabItems.Count - 1;
-                            }
-                            else
-                            {
-                                if (tabSubItemIndex < subTabItems.Count - 1)
-                                    tabSubItemIndex++;
-                                else
-                                    tabSubItemIndex = 0;
-                            }
-                        }
-                        break;
-                    case ConsoleKey.UpArrow:
-                        if (historyIndex > -1)
-                        {
-                            if (historyIndex > 0)
-                            {
-                                historyIndex--;
-                            }
-                            chars = history[historyIndex];
-                            index = chars.Count;
-                        }
-                        break;
-                }
-            }
-
-            if (chars.Count > 0)
-            {
-                if (history.Count > 0)
-                {
-                    if (!IsSame(history[history.Count - 1], chars)) // make sure current command is not in the top of history, so it's not added twice in a row
-                    {
-                        history.Add(chars);
-                        historyIndex = history.Count - 1;
-                    }
-                }
-                else
-                {
-                    history.Add(chars);
-                    historyIndex = history.Count - 1;
-                }
-            }
-
-            return CharListToString(chars);
-        }
-
-        private bool IsSame(List<char> one, List<char> two)
-        {
-            if (one.Count != two.Count)
-                return false;
-
-            for (int i = 0; i < one.Count; i++)
-                if (one[i] != two[i])
-                    return false;
-            return true;
-        }
-
-        private List<char> StringToCharList(string v)
-        {
-            List<char> cs = new List<char>();
-            for (int i = 0; i < v.Length; i++)
-                cs.Add(v[i]);
-            return cs;
-        }
-
-        private string CharListToString(List<char> cs)
-        {
-            StringBuilder sb = new StringBuilder();
-            foreach (char c in cs)
-                sb.Append(c);
-            return sb.ToString();
-        }
-    }
-}
-*/


expanded test to make sure we get the right stuff back

--- TimeTracker.Core.Tests/UserActivityOverPeriodTests.cs
+++ TimeTracker.Core.Tests/UserActivityOverPeriodTests.cs
@@ -122,6 +122,11 @@

             userActivity.TotalSecondsInSegment.Should().Be(8, "because 8 samples have been added");
             userActivity.PrimaryActivityInSegment.Should().Be(testActivity1, "because that's the primary activity!");
+
+            bool gotActivity1 = false;
+            bool gotActivity4 = false;
+            bool gotInactiveSample = false;
+
             foreach (var sample in userActivity.Samples)
             {
                 if (sample.WasActive)
@@ -129,17 +134,27 @@
                     if (sample.Details.IsEqualishTo(testActivity1))
                     {
                         sample.Seconds.Should().Be(4, "because we added 3 other samples equalish to testActivity1");
+                        gotActivity1 = true;
                     }
                     else if (sample.Details.IsEqualishTo(testActivity4))
                     {
                         sample.Seconds.Should().Be(1, "because we only added 1 sample like testActivity4");
+                        gotActivity4 = true;
+                    }
+                    else
+                    {
+                        Assert.Fail("Got unexpected sample in user activity period");
                     }
                 }
                 else
                 {
                     sample.Seconds.Should().Be(3, "because we added 3 inactive samples");
+                    gotInactiveSample = true;
                 }
             }
+
+            (gotActivity1 && gotActivity4 && gotInactiveSample).
+                Should().BeTrue("because otherwise we didn't get all the samples we should have");
         }
     }
 }


Extra API endpoint for terminology that allows callers to request concepts for a value set for a specific date

--- Trifolia.Web/Controllers/API/TerminologyController.cs
+++ Trifolia.Web/Controllers/API/TerminologyController.cs
@@ -99,6 +99,29 @@
                         Name = vs.Name,
                         Oid = vs.Oid
                     });
+        }
+
+        [HttpGet, Route("api/Terminology/ValueSet/{valueSetId}/Concepts/{activeDate}"), SecurableAction(SecurableNames.VALUESET_LIST)]
+        public ConceptItems Concepts(int valueSetId, DateTime activeDate)
+        {
+            var valueSet = this.tdb.ValueSets.Single(y => y.Id == valueSetId);
+            var activeMembers = valueSet.GetActiveMembers(activeDate);
+            ConceptItems ci = new ConceptItems();
+            ci.rows = (from am in activeMembers
+                       select new ConceptItem()
+                       {
+                           Id = am.Id,
+                           Code = am.Code,
+                           DisplayName = am.DisplayName,
+                           CodeSystemId = am.CodeSystemId,
+                           CodeSystemName = am.CodeSystem.Name,
+                           CodeSystemOid = am.CodeSystem.Oid,
+                           Status = am.Status,
+                           StatusDate = am.StatusDate
+                       }).ToArray();
+            ci.total = ci.rows.Length;
+
+            return ci;
         }

         [HttpGet, Route("api/Terminology/ValueSet/{valueSetId}/Concepts"), SecurableAction(SecurableNames.VALUESET_LIST)]


Add unit test

Add unit test

--- UnitTestUsefullFunctions/UnitTestFunctionsDateTime.cs
+++ UnitTestUsefullFunctions/UnitTestFunctionsDateTime.cs
@@ -2384,6 +2384,15 @@
         Assert.AreEqual(result, expected);
       }

+      [TestMethod]
+      public void TestMethod_Bissextile_2011()
+      {
+        DateTime source = new DateTime(2011, 1, 1);
+        const bool expected = false;
+        bool result = DateFunc.IsBissextile(source);
+        Assert.AreEqual(result, expected);
+      }
+
     [TestMethod]
         public void TestMethod_Bissextile_2012()
         {


Add unittest

Add unittest

--- UnitTestUsefullFunctions/UnitTestFunctionsDateTime.cs
+++ UnitTestUsefullFunctions/UnitTestFunctionsDateTime.cs
@@ -2611,6 +2611,15 @@
       Assert.AreEqual(result, expected);
     }

+    [TestMethod]
+    public void TestMethod_Bissextile_2036()
+    {
+      DateTime source = new DateTime(2036, 1, 1);
+      const bool expected = true;
+      bool result = DateFunc.IsBissextile(source);
+      Assert.AreEqual(result, expected);
+    }
+
     #endregion
   }
 }


Added Purge command

Added Purge command

--- SoraBot-v2/SoraBot-v2/Module/ModModule.cs
+++ SoraBot-v2/SoraBot-v2/Module/ModModule.cs
@@ -1,4 +1,8 @@
-using System.Threading.Tasks;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using Discord;
 using Discord.Commands;
 using Discord.WebSocket;
 using SoraBot_v2.Services;
@@ -51,6 +55,53 @@
             await _modService.RemoveWarnings(Context, user, 0, true);
         }

+        [Command("purge", RunMode = RunMode.Async), Alias("clear"), Summary("Purges some amount of messages")]
+        public async Task PurgeMessages(int amount)
+        {
+            //check perms
+            var user = (SocketGuildUser)Context.User;
+            if (!user.GuildPermissions.Has(GuildPermission.ManageMessages) && !Utility.IsSoraAdmin(user))
+            {
+                await ReplyAsync("", embed: Utility.ResultFeedback(Utility.RedFailiureEmbed,
+                    Utility.SuccessLevelEmoji[2], $"You either need ManageMessages perms or the {Utility.SORA_ADMIN_ROLE_NAME} role!"));
+                return;
+            }
+            //Check if sora has manageMessages perms
+            var sora = Context.Guild.CurrentUser;
+            if (!sora.GuildPermissions.Has(GuildPermission.ManageMessages))
+            {
+                await ReplyAsync("", embed: Utility.ResultFeedback(Utility.RedFailiureEmbed,
+                    Utility.SuccessLevelEmoji[2], $"Sore needs Manage Messages permissions!"));
+                return;
+            }
+            if (amount > 500)
+                amount = 500;
+            if(amount < 0)
+                return;
+            //he has the perms to prune
+            IEnumerable<IMessage> msgs = new List<IMessage>();
+            try
+            {
+                msgs = await Context.Channel.GetMessagesAsync(amount).Flatten();
+            }
+            catch (Exception)
+            {
+                // ignored
+            }
+            try
+            {
+                await Context.Channel.DeleteMessagesAsync(msgs);
+            }
+            catch (Exception)
+            {
+                // ignored
+            }
+            int count = amount - (amount - msgs.Count());
+
+            await ReplyAsync("", embed: Utility.ResultFeedback(Utility.GreenSuccessEmbed,
+                Utility.SuccessLevelEmoji[0], $"Successfully removed {count} messages"));
+        }
+
         [Command("pardon"), Summary("Pardons a user and removes all his cases")]
         public async Task PardonUser(SocketGuildUser user)
         {


Mac: Label should occupy space even when empty

--- Source/Eto.Mac/Forms/Controls/MacLabel.cs
+++ Source/Eto.Mac/Forms/Controls/MacLabel.cs
@@ -105,8 +105,6 @@

 		protected override SizeF GetNaturalSize(SizeF availableSize)
 		{
-			if (string.IsNullOrEmpty(Text))
-				return Size.Empty;
 			if (NaturalSize == null || availableSizeCached != availableSize)
 			{
 				#if XAMMAC2 // TODO: Fix when Xamarin.Mac2 NSEdgeInsets is fixed to use nfloat instead of float


Cleanup test.

Cleanup test.

--- tests/Avalonia.Markup.Xaml.UnitTests/Xaml/BindingTests.cs
+++ tests/Avalonia.Markup.Xaml.UnitTests/Xaml/BindingTests.cs
@@ -190,8 +190,7 @@
             {
                 var xaml = @"
 <Window xmlns='https://github.com/avaloniaui'
-        xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'
-        xmlns:local='clr-namespace:Avalonia.Markup.Xaml.UnitTests.MarkupExtensions;assembly=Avalonia.Markup.Xaml.UnitTests'>
+        xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'>

     <Window.Styles>
         <Style Selector='Button'>


Fix line ending

Fix line ending

--- tests/KNXLibTests/Integration/Tunneling/ActionFeedback.cs
+++ tests/KNXLibTests/Integration/Tunneling/ActionFeedback.cs
@@ -1,75 +1,75 @@
-using System;
-using System.Threading;
-using KNXLib;
+using System;
+using System.Threading;
+using KNXLib;
 using KNXLib.Addressing;
 using KNXLib.Events;
-using NUnit.Framework;
-
-namespace KNXLibTests.Integration.Tunneling
-{
-    [TestFixture, Platform(Exclude = "Win")]
-    internal class ActionFeedback
-    {
-        [OneTimeSetUp]
-        public void SetUp()
-        {
-            try
-            {
-                if (!Support.Eibd.DaemonManager.IsEibdAvailable())
-                    throw new PlatformNotSupportedException(
-                        "Can't run integration tests without eibd daemon installed on the system");
-                if (!Support.Eibd.VBusMonitorManager.IsVBusMonitorAvailable())
-                    throw new PlatformNotSupportedException(
-                        "Can't run integration tests without vbusmonitor installed on the system");
-
-                if (!Support.Eibd.DaemonManager.StartTunneling())
-                    throw new Exception("Could not start eibd daemon");
-                if (!Support.Eibd.VBusMonitorManager.Start())
-                    throw new Exception("Could not start vbusmonitor");
-            }
-            catch (Exception)
-            {
-                TearDown();
-                throw;
-            }
-        }
-
-        [OneTimeTearDown]
-        public void TearDown()
-        {
-            Support.Eibd.DaemonManager.Stop();
-            Support.Eibd.VBusMonitorManager.Stop();
-        }
-
-        private ManualResetEventSlim ResetEvent { get; set; }
-        private const string LightOnOffAddress = "5/0/2";
-        private const bool LightOnOffActionStatus = true;
-        private const int Timeout = 2000;
-
-        [Category("KNXLib.Integration.Tunneling.ActionFeedback"), Test]
-        public void TunnelingActionFeedbackTest()
-        {
-            ResetEvent = new ManualResetEventSlim();
-
-            KnxConnection connection = new KnxConnectionTunneling("127.0.0.1", 3671, "127.0.0.1", 3672) { Debug = false };
-
-            connection.KnxEventDelegate += Event;
-
-            connection.Connect();
-
-            Thread.Sleep(50);
-
-            connection.Action(KnxGroupAddress.Parse(LightOnOffAddress), true);
-
-            if (!ResetEvent.Wait(Timeout))
-                Assert.Fail("Didn't receive feedback from the action");
-        }
-
-        private void Event(object sender, KnxEventArgs args)
-        {
-            //Console.WriteLine("Received feedback from " + address + " with value " + (int) state[0]);
-            if (LightOnOffAddress.Equals(args.SourceAddress.ToString()) && args.State != null && args.State.Length == 1 && args.State[0] == 1)
-                ResetEvent.Set();
-        }
-    }
-}
+using NUnit.Framework;
+
+namespace KNXLibTests.Integration.Tunneling
+{
+    [TestFixture, Platform(Exclude = "Win")]
+    internal class ActionFeedback
+    {
+        [OneTimeSetUp]
+        public void SetUp()
+        {
+            try
+            {
+                if (!Support.Eibd.DaemonManager.IsEibdAvailable())
+                    throw new PlatformNotSupportedException(
+                        "Can't run integration tests without eibd daemon installed on the system");
+                if (!Support.Eibd.VBusMonitorManager.IsVBusMonitorAvailable())
+                    throw new PlatformNotSupportedException(
+                        "Can't run integration tests without vbusmonitor installed on the system");
+
+                if (!Support.Eibd.DaemonManager.StartTunneling())
+                    throw new Exception("Could not start eibd daemon");
+                if (!Support.Eibd.VBusMonitorManager.Start())
+                    throw new Exception("Could not start vbusmonitor");
+            }
+            catch (Exception)
+            {
+                TearDown();
+                throw;
+            }
+        }
+
+        [OneTimeTearDown]
+        public void TearDown()
+        {
+            Support.Eibd.DaemonManager.Stop();
+            Support.Eibd.VBusMonitorManager.Stop();
+        }
+
+        private ManualResetEventSlim ResetEvent { get; set; }
+        private const string LightOnOffAddress = "5/0/2";
+        private const bool LightOnOffActionStatus = true;
+        private const int Timeout = 2000;
+
+        [Category("KNXLib.Integration.Tunneling.ActionFeedback"), Test]
+        public void TunnelingActionFeedbackTest()
+        {
+            ResetEvent = new ManualResetEventSlim();
+
+            KnxConnection connection = new KnxConnectionTunneling("127.0.0.1", 3671, "127.0.0.1", 3672) { Debug = false };
+
+            connection.KnxEventDelegate += Event;
+
+            connection.Connect();
+
+            Thread.Sleep(50);
+
+            connection.Action(KnxGroupAddress.Parse(LightOnOffAddress), true);
+
+            if (!ResetEvent.Wait(Timeout))
+                Assert.Fail("Didn't receive feedback from the action");
+        }
+
+        private void Event(object sender, KnxEventArgs args)
+        {
+            //Console.WriteLine("Received feedback from " + address + " with value " + (int) state[0]);
+            if (LightOnOffAddress.Equals(args.SourceAddress.ToString()) && args.State != null && args.State.Length == 1 && args.State[0] == 1)
+                ResetEvent.Set();
+        }
+    }
+}


Fix addMachineName should be true by default not false

--- Source/LandauMedia.Telemetry/Telemeter.cs
+++ Source/LandauMedia.Telemetry/Telemeter.cs
@@ -22,7 +22,7 @@

         public static void Initialize(string host, int port, string environment = null)
         {
-            Initialize(host, port, environment, addMachineName: false);
+            Initialize(host, port, environment, addMachineName: true);
         }

         public static void Initialize(string host, int port, string environment, bool addMachineName)


Added missing unit tests for TrimTo() extension method.

--- Source/Sugar.Test/StringExtensionsTest.cs
+++ Source/Sugar.Test/StringExtensionsTest.cs
@@ -128,6 +128,30 @@
         }

         [Test]
+        public void TestTrimToWhenShorterThanMax()
+        {
+            var result = "Bonjour".TrimTo(32);
+
+            Assert.AreEqual("Bonjour", result);
+        }
+
+        [Test]
+        public void TestTrimToWhenLongerThanMax()
+        {
+            var result = "Hello World!".TrimTo(6);
+
+            Assert.AreEqual("Hello ", result);
+        }
+
+        [Test]
+        public void TestTrimToWhenLongerThanMaxWithOverrunIndicator()
+        {
+            var result = "Hello World!".TrimTo(6, "...");
+
+            Assert.AreEqual("Hel...", result);
+        }
+
+        [Test]
         public void TestSplitString()
         {
             var result = "one two".Split(" ");


Fix profiler marker labels

Fix profiler marker labels

--- Assets/MRTK/Providers/OpenXR/Scripts/MicrosoftArticulatedHand.cs
+++ Assets/MRTK/Providers/OpenXR/Scripts/MicrosoftArticulatedHand.cs
@@ -66,7 +66,7 @@
         /// <inheritdoc/>
         public override bool IsInPointingPose => HandDefinition.IsInPointingPose;

-        private static readonly ProfilerMarker UpdateControllerPerfMarker = new ProfilerMarker("[MRTK] WindowsMixedRealityOpenXRArticulatedHand.UpdateController");
+        private static readonly ProfilerMarker UpdateControllerPerfMarker = new ProfilerMarker("[MRTK] MicrosoftArticulatedHand.UpdateController");

         /// <summary>
         /// The OpenXR plug-in uses extensions to expose all possible data, which might be surfaced through multiple input devices.
@@ -106,7 +106,7 @@
             }
         }

-        private static readonly ProfilerMarker UpdateSingleAxisDataPerfMarker = new ProfilerMarker("[MRTK] WindowsMixedRealityOpenXRArticulatedHand.UpdateSingleAxisData");
+        private static readonly ProfilerMarker UpdateSingleAxisDataPerfMarker = new ProfilerMarker("[MRTK] MicrosoftArticulatedHand.UpdateSingleAxisData");

         /// <inheritdoc />
         protected override void UpdateSingleAxisData(MixedRealityInteractionMapping interactionMapping, InputDevice inputDevice)
@@ -145,7 +145,7 @@
             }
         }

-        private static readonly ProfilerMarker UpdateButtonDataPerfMarker = new ProfilerMarker("[MRTK] WindowsMixedRealityOpenXRArticulatedHand.UpdateButtonData");
+        private static readonly ProfilerMarker UpdateButtonDataPerfMarker = new ProfilerMarker("[MRTK] MicrosoftArticulatedHand.UpdateButtonData");

         /// <inheritdoc />
         protected override void UpdateButtonData(MixedRealityInteractionMapping interactionMapping, InputDevice inputDevice)
@@ -184,7 +184,7 @@
             }
         }

-        private static readonly ProfilerMarker UpdatePoseDataPerfMarker = new ProfilerMarker("[MRTK] WindowsMixedRealityOpenXRArticulatedHand.UpdatePoseData");
+        private static readonly ProfilerMarker UpdatePoseDataPerfMarker = new ProfilerMarker("[MRTK] MicrosoftArticulatedHand.UpdatePoseData");

         /// <inheritdoc />
         protected override void UpdatePoseData(MixedRealityInteractionMapping interactionMapping, InputDevice inputDevice)
@@ -223,7 +223,7 @@
             }
         }

-        private static readonly ProfilerMarker UpdateHandDataPerfMarker = new ProfilerMarker("[MRTK] WindowsMixedRealityOpenXRArticulatedHand.UpdateHandData");
+        private static readonly ProfilerMarker UpdateHandDataPerfMarker = new ProfilerMarker("[MRTK] MicrosoftArticulatedHand.UpdateHandData");

         /// <summary>
         /// Update the hand data from the device.


Update XRSDKDeviceManager.cs

Update XRSDKDeviceManager.cs

--- Assets/MixedRealityToolkit.Providers/XRSDK/XRSDKDeviceManager.cs
+++ Assets/MixedRealityToolkit.Providers/XRSDK/XRSDKDeviceManager.cs
@@ -9,7 +9,6 @@
 using System.Collections.Generic;
 using UnityEngine;
 using UnityEngine.XR;
-using UnityEngine.XR.Management;

 namespace Microsoft.MixedReality.Toolkit.XRSDK
 {
@@ -42,23 +41,6 @@
             return (capability == MixedRealityCapability.MotionController);
         }

-        private XRInputSubsystem inputSubsystem;
-        private XRInputSubsystem InputSubsystem
-        {
-            get
-            {
-                if (inputSubsystem == null &&
-                    XRGeneralSettings.Instance != null &&
-                    XRGeneralSettings.Instance.Manager != null &&
-                    XRGeneralSettings.Instance.Manager.activeLoader != null)
-                {
-                    inputSubsystem = XRGeneralSettings.Instance.Manager.activeLoader.GetLoadedSubsystem<XRInputSubsystem>();
-                }
-
-                return inputSubsystem;
-            }
-        }
-
         protected static readonly Dictionary<string, GenericXRSDKController> ActiveControllers = new Dictionary<string, GenericXRSDKController>();

         private InputDevice leftInputDevice;
@@ -70,9 +52,9 @@
         {
             base.Update();

-            if (InputSubsystem == null || !InputSubsystem.running)
-            {
-                Debug.Log($"Input system null {InputSubsystem == null}");
+            if (XRSDKSubsystemHelpers.InputSubsystem == null || !XRSDKSubsystemHelpers.InputSubsystem.running)
+            {
+                Debug.Log($"Input system null {XRSDKSubsystemHelpers.InputSubsystem == null}");
                 return;
             }


UOErebor: more robust recall.

UOErebor: more robust recall.

--- ExampleScripts/UOErebor/magery.csx
+++ ExampleScripts/UOErebor/magery.csx
@@ -17,9 +17,12 @@

     public static void Recall(Action castRecallAction)
     {
-        Location3D startLocation = UO.Me.Location;
+        UO.Say(".resync");
+        UO.Wait(250);
+        Location2D startLocation = UO.Me.Location;

         bool failed;
+        Location2D currentLocation = UO.Me.Location;
         do
         {
             Meditation.Meditate(24);
@@ -27,6 +30,7 @@
             failed = false;
             recallHomeJournal.Delete();
             castRecallAction();
+            UO.Log("Waiting for changed location.");

             do
             {
@@ -40,12 +44,13 @@
                 if (recallHomeJournal.Contains("You don't know that spell."))
                 {
                     throw new CommandInvocationException("Cannot cast recall!");
-                }
+                }
+                currentLocation = UO.Me.Location;
             }
-            while (UO.Me.Location == startLocation);
+            while (currentLocation == startLocation);
         } while (failed);

-        UO.ClientPrint("Waiting for changed location finished.");
+        UO.Log($"Recall {startLocation} -> {currentLocation} finished.");
     }

     public static void RecallHomeCommand()
@@ -77,7 +82,9 @@
             UO.CastSpell(Spell.Recall);
         }

+        UO.Log("Waiting for target.");
         UO.WaitForTarget();
+        UO.Log("Target rune.");
         UO.Target(rune);
     }

@@ -87,7 +94,7 @@
         {
             throw new CommandInvocationException("Expecting hexadecimal id of a rune.");
         }
-
+
         Recall(() => RecallTo(runeId));
     }
 }


Update Linux IB gateway process check

Update Linux IB gateway process check

--- Brokerages/InteractiveBrokers/InteractiveBrokersGatewayRunner.cs
+++ Brokerages/InteractiveBrokers/InteractiveBrokersGatewayRunner.cs
@@ -198,7 +198,7 @@
                     StartInfo = new ProcessStartInfo
                     {
                         FileName = "bash",
-                        Arguments = "-c 'ps -a | grep IBController'",
+                        Arguments = "-c 'ps aux | grep java | grep ibgateway'",
                         UseShellExecute = false,
                         RedirectStandardOutput = true,
                         CreateNoWindow = true
@@ -207,7 +207,7 @@

                 process.Start();
                 var output = process.StandardOutput.ReadToEnd();
-                var processFound = output.Contains("IBController.sh");
+                var processFound = output.Contains("java") && output.Contains("ibgateway");

                 process.WaitForExit();


Azure

Azure

--- FacturSpaceProgram/Assets/azure.cs
+++ FacturSpaceProgram/Assets/azure.cs
@@ -31,8 +31,8 @@
 		DateTime dt = DateTime.UtcNow;

 		string stringToSign = String.Format("GET\n"
-		                                    + "\n" // content md5
-		                                    + "\n" // content type
+		                                    + "ikBSFEybyyhnVvEBQnhlzQ==\n" // content md5
+		                                    + "image/jpeg\n" // content type
 		                                    + "x-ms-date:" + dt.ToString("R") + "\nx-ms-version:2012-02-12\n" // headers
 		                                    + "/{0}/{1}\ncomp:list\nrestype:container", accountName, container);


Remove superfluous tests for DomainName.

--- Src/AutoFixtureUnitTest/DomainNameTest.cs
+++ Src/AutoFixtureUnitTest/DomainNameTest.cs
@@ -53,19 +53,6 @@
         }

         [Fact]
-        public void SutDoesNotEqualNullSut()
-        {
-            // Fixture setup
-            var sut = new DomainName(Guid.NewGuid().ToString());
-            DomainName other = null;
-            // Exercise system
-            bool result = sut.Equals(other);
-            // Verify outcome
-            Assert.False(result);
-            // Teardown
-        }
-
-        [Fact]
         public void SutDoesNotEqualAnonymousObject()
         {
             // Fixture setup
@@ -84,19 +71,6 @@
             // Fixture setup
             var sut = new DomainName(Guid.NewGuid().ToString());
             object other = new DomainName(Guid.NewGuid().ToString());
-            // Exercise system
-            bool result = sut.Equals(other);
-            // Verify outcome
-            Assert.False(result);
-            // Teardown
-        }
-
-        [Fact]
-        public void SutDoesNotEqualOtherSutWhenDomainNamesDiffer()
-        {
-            // Fixture setup
-            var sut = new DomainName(Guid.NewGuid().ToString());
-            var other = new DomainName(Guid.NewGuid().ToString());
             // Exercise system
             bool result = sut.Equals(other);
             // Verify outcome


remove \t in favour of spaces

remove \t in favour of spaces

--- Src/GoogleApis/Apis/Discovery/IService.cs
+++ Src/GoogleApis/Apis/Discovery/IService.cs
@@ -30,12 +30,12 @@
     /// </summary>
     /// <seealso cref="IResource"/>
     /// <seealso cref="ISchema"/>
-	public interface IService : IResourceContainer
-	{
-		/// <summary> The version of this service </summary>
-		string Version {get;}
-		Uri BaseUri {get;}
-		Uri RpcUri {get;}
+    public interface IService : IResourceContainer
+    {
+        /// <summary> The version of this service </summary>
+        string Version {get;}
+        Uri BaseUri {get;}
+        Uri RpcUri {get;}

         /// <summary>The version of the discovery that defined this service. </summary>
         DiscoveryVersion DiscoveryVersion{get;}
@@ -43,9 +43,9 @@
         /// <summary>A dictionary containing all the schemas defined in this Service </summary>
         IDictionary<string, ISchema> Schemas{get;}

-		/// <summary>
-		/// Creates a Request Object based on the HTTP Method Type.
-		/// </summary>
-		IRequest CreateRequest (string resource, string methodName);
-	}
+        /// <summary>
+        /// Creates a Request Object based on the HTTP Method Type.
+        /// </summary>
+        IRequest CreateRequest (string resource, string methodName);
+    }
 }


parse skills details

parse skills details

--- TCC.Core/Data/Databases/SkillsDatabase.cs
+++ TCC.Core/Data/Databases/SkillsDatabase.cs
@@ -63,10 +63,12 @@
                 //Enum.TryParse(cString, out c);
                 var name = s[4];
                 //var tooltip = s[3];
+                var detail = s[6];
                 var iconName = s[7];

                 var sk = new Skill(id, c, name, "");
                 sk.IconName = iconName;
+                sk.Detail = detail.ToLowerInvariant();
                 if (Skills[c].ContainsKey(id)) continue;
                 Skills[c].Add(id, sk);


Log level changed from error to info

Log level changed from error to info

--- TVHeadEnd/DataHelper/ChannelDataHelper.cs
+++ TVHeadEnd/DataHelper/ChannelDataHelper.cs
@@ -7,7 +7,6 @@
 using System.Threading;
 using System.Threading.Tasks;
 using TVHeadEnd.HTSP;
-

 namespace TVHeadEnd.DataHelper
 {
@@ -102,7 +101,7 @@
                             }
                             else
                             {
-                                _logger.Error("[TVHclient] ChannelDataHelper.buildChannelInfos: channelIcon '" + channelIcon + "' is not a valid HTTP URL!");
+                                _logger.Info("[TVHclient] ChannelDataHelper.buildChannelInfos: channelIcon '" + channelIcon + "' is not a valid HTTP URL!");
                             }
                         }
                         if (m.containsField("channelName"))


Add XML Documents into class Lexer

Add XML Documents into class Lexer

--- lury-lexer/Lexer.cs
+++ lury-lexer/Lexer.cs
@@ -35,6 +35,9 @@

 namespace Lury.Compiling.Lexer
 {
+    /// <summary>
+    /// 与えられた単一のソースコードをトークン列に変換するための字句解析器です。
+    /// </summary>
     public partial class Lexer
     {
         #region -- Private Fields --
@@ -54,10 +57,19 @@

         #region -- Public Properties --

+        /// <summary>
+        /// ソースコードを識別するための名前を取得します。
+        /// </summary>
         public string SourceName { get { return this.sourceName; } }

+        /// <summary>
+        /// ソースコードの文字列を取得します。
+        /// </summary>
         public string SourceCode { get { return this.sourceCode; } }

+        /// <summary>
+        /// 字句解析の結果、出力されたトークン列のリストを取得します。
+        /// </summary>
         public IReadOnlyList<Token> TokenOutput
         {
             get
@@ -68,14 +80,28 @@
                 return this.output;
             }
         }
+
+        /// <summary>
+        /// トークン出力で報告されたメッセージを格納した
+        /// <see cref="Lury.Compiling.Logger.OutputLogger"/> オブジェクトを指定します。
+        /// </summary>
         public OutputLogger Logger { get; private set; }

+        /// <summary>
+        /// 字句解析が終了したかの真偽値を取得します。
+        /// </summary>
         public bool IsFinished { get; private set; }

         #endregion

         #region -- Constructors --

+        /// <summary>
+        /// ソースコードとその名前を指定して、
+        /// 新しい <see cref="Lury.Compiling.Lexer.Lexer"/> クラスのインスタンスを初期化します。
+        /// </summary>
+        /// <param name="sourceName">ソースコードを識別するための null でない名前。</param>
+        /// <param name="sourceCode">ソースコードの文字列。</param>
         public Lexer(string sourceName, string sourceCode)
         {
             this.sourceName = sourceName;
@@ -92,6 +118,10 @@

         #region -- Public Methods --

+        /// <summary>
+        /// ソースコードを字句解析し、結果を TokenOutput プロパティに格納します。
+        /// </summary>
+        /// <returns>字句解析に成功したとき true、それ以外のとき false。</returns>
         public bool Tokenize()
         {
             if (this.IsFinished)
@@ -395,7 +425,7 @@
             #endregion

             int index_old = this.lookIndex;
-
+
             switch (START)
             {
                 case START:
@@ -573,7 +603,7 @@
                     this.lookIndex++;
                     this.AddToken(Lexer.ImaginaryNumber, index_old, this.lookIndex - index_old);
                     break;
-                #endregion
+                    #endregion
             }

             return true;
@@ -684,6 +714,12 @@
                 this.sourceCode,
                 new CodePosition(this.sourceName, this.sourceCode.GetPositionByIndex(index)));
         }
+
+        #region JudgeEqual
+
+        // [JudgeEqualメソッド群] lookIndex以降、一致しているかを判定
+        // パラメータが配列 ... インデクスを返却。全不一致なら -1
+        // パラメータが単一 ... 真偽値を返却。不一致なら false

         /// <summary>
         /// 指定された文字列の配列のうち、いずれかが現在のインデクスから一致しているかを判定します。
@@ -714,6 +750,14 @@
                     this.sourceCode.IndexOf(chars, this.lookIndex, chars.Length, StringComparison.Ordinal) == this.lookIndex);
         }

+        /// <summary>
+        /// 指定された文字列の配列のうち、いずれかが現在のインデクスから一致しているかを判定します。
+        /// </summary>
+        /// <param name="chars">一致を判定する文字列の配列。</param>
+        /// <returns>
+        /// 引数として指定された文字列の配列のうち、最初に一致と判定された要素のインデクス。
+        /// いずれの文字列にも一致しない場合は -1。
+        /// </returns>
         private int JudgeEqual(params char[] chars)
         {
             if (this.sourceLength < this.lookIndex + 1)
@@ -737,6 +781,15 @@
             return (this.sourceLength >= this.lookIndex + 1 &&
                     this.sourceCode[this.lookIndex] == character);
         }
+
+        #endregion
+
+        #region Skip Methods
+
+        // [Skipメソッド群] 一定の条件の下でlookIndex前進
+        // Skip      ... 指定された文字(列)まで前進。文字(列)のインデクスを返却
+        // SkipOver  ... 指定された文字列分だけ前進。文字列のインデクスを返却
+        // SkipWhile ... 指定された文字が続くまで前進。前進文字数を返却

         /// <summary>
         /// 指定された文字列の配列のうち、いずれかの文字列が出現するまでインデクスを前進させます。
@@ -802,6 +855,11 @@
             return elementIndex;
         }

+        /// <summary>
+        /// 指定された文字の配列のうち、いずれかが一致した場合のみのインデクスを前進させます。
+        /// </summary>
+        /// <param name="chars">読み飛ばす文字の配列。</param>
+        /// <returns>読み飛ばした文字数。</returns>
         private int SkipWhile(params char[] chars)
         {
             int length = 0;
@@ -814,5 +872,6 @@
         }

         #endregion
+        #endregion
     }
 }


Extract predicate funtions -- refactoring

--- TsModelGen/Core/Targets/ClosureBuilder.cs
+++ TsModelGen/Core/Targets/ClosureBuilder.cs
@@ -8,19 +8,23 @@
 {
     public sealed class ClosureBuilder
     {
+        private static Func<TypeInfo, bool> GetTypeFilterForNamespace(IEnumerable<string> targetNameSpaces)
+        {
+             return typeInfo =>
+                targetNameSpaces.Any(n => typeInfo.Namespace.StartsWith(n));
+        }
+
+        private static readonly Func<ITypeTranslationContext, bool> UnprocessedTypeTranslationContext =
+            typeContext => typeContext.IsProcessed == false;
+
         public object Build(string @namespace)
         {
             IEnumerable<string> targetNameSpaces = new[] { @namespace }; // TODO Make a parameter

-            Func<TypeInfo, bool> typeFilter =
-                typeInfo => targetNameSpaces.Any(n => typeInfo.Namespace.StartsWith(n));
-
-            var translationContext = CreateTranslationContext(typeFilter);
+            var translationContext = CreateTranslationContext(GetTypeFilterForNamespace(targetNameSpaces));

             ITypeTranslationContext unprocessed;
-            Func<ITypeTranslationContext, bool> predicate =
-                typeContext => typeContext.IsProcessed == false;
-            while ((unprocessed = translationContext.FirstOrDefault(predicate)) != null)
+            while ((unprocessed = translationContext.FirstOrDefault(UnprocessedTypeTranslationContext)) != null)
                 unprocessed.ResolveDependencies();

             // iterate through serializable members of every unvisited type in graph


Remove the initial test

Remove the initial test

--- Tvl.Collections.Trees.Test/InitialTest.cs
+++ Tvl.Collections.Trees.Test/InitialTest.cs
@@ -1,16 +0,0 @@
-// Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved.
-// Licensed under the MIT License. See LICENSE in the project root for license information.
-
-namespace Tvl.Collections.Trees.Test
-{
-    using Xunit;
-
-    public class InitialTest
-    {
-        [Fact]
-        public void EnsureOneTestExists()
-        {
-            Assert.Equal(0, 0);
-        }
-    }
-}


テストケース追加

テストケース追加

--- UnitTest/Sdx/Validation/ImageValidator.cs
+++ UnitTest/Sdx/Validation/ImageValidator.cs
@@ -194,6 +194,30 @@
         Assert.Equal(2, validatorSet.Errors.Count);
         Assert.Equal("幅が100より小さい画像を入力してください。", validatorSet.Errors[0].Message);
         Assert.Equal("高さが100より大きい画像を入力してください。", validatorSet.Errors[1].Message);
+
+        //■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ total ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
+        validatorSet = new Sdx.Validation.Image.ValidatorSet();
+        validatorSet
+          .AddValidator(new Sdx.Validation.Image.MaxSize(height: 101, widht: 100))
+          .AddValidator(new Sdx.Validation.Image.MinSize(height: 100, widht: 90))
+          .AddValidator(new Sdx.Validation.Image.Capacity(5000))
+          .AddValidator(new Sdx.Validation.Image.Type(jpeg: Sdx.Validation.Image.Type.Jpeg, png: Sdx.Validation.Image.Type.png, gif: Sdx.Validation.Image.Type.gif))
+        ;
+        sdxImg = new Sdx.Image(stream);
+        Assert.True(validatorSet.IsValid(sdxImg));
+        Assert.Equal(0, validatorSet.Errors.Count);
+
+        validatorSet = new Sdx.Validation.Image.ValidatorSet();
+        validatorSet
+          .AddValidator(new Sdx.Validation.Image.MaxSize(height: 101, widht: 100))
+          .AddValidator(new Sdx.Validation.Image.MinSize(height: 100, widht: 90))
+          .AddValidator(new Sdx.Validation.Image.Capacity(2000)) // ここでエラーになるようにしています。
+          .AddValidator(new Sdx.Validation.Image.Type(jpeg: Sdx.Validation.Image.Type.Jpeg, png: Sdx.Validation.Image.Type.png, gif: Sdx.Validation.Image.Type.gif))
+        ;
+        sdxImg = new Sdx.Image(stream);
+        Assert.False(validatorSet.IsValid(sdxImg));
+        Assert.Equal(1, validatorSet.Errors.Count);
+        Assert.Equal("2000バイトより小さいサイズの画像を入力してください。", validatorSet.Errors[0].Message);
       }

     }


Red: Can delete with converter

Red: Can delete with converter

--- UnitTests/RepositoryWithConverterTests.cs
+++ UnitTests/RepositoryWithConverterTests.cs
@@ -60,6 +60,23 @@
             Assert.True(repoObj.ContentEquals(obj), "The object returned does not match the one added");
         }

+        [Theory, MemberData("StorageTypes")]
+        public void CanDeleteFromRepo(ITestStorage storage)
+        {
+            m_CurrentStorage = storage;
+            var converter = new TestObjectStorageConverter();
+
+            var repo = storage.GetStorage().GetRepository(converter);
+
+            var obj = new TestObjectNotIStorable();
+            obj.Name = "Test";
+
+            repo.Upsert(obj);
+            repo.Delete(obj);
+
+            Assert.False(repo.Get().Any(), "The object could not be deleted from the repository");
+        }
+
         public void Dispose()
         {
             m_CurrentStorage.CleanUp();


Add lower bounds to SnapshotSelectionCriteria

--- src/core/Akka.Persistence/SnapshotProtocol.cs
+++ src/core/Akka.Persistence/SnapshotProtocol.cs
@@ -416,10 +416,12 @@
         public static readonly SnapshotSelectionCriteria None = new SnapshotSelectionCriteria(0L, DateTime.MinValue);

         [JsonConstructor]
-        public SnapshotSelectionCriteria(long maxSequenceNr, DateTime maxTimeStamp)
+        public SnapshotSelectionCriteria(long maxSequenceNr, DateTime maxTimeStamp, long minSequenceNr = 0L, DateTime? minTimestamp = null)
         {
             MaxSequenceNr = maxSequenceNr;
             MaxTimeStamp = maxTimeStamp;
+            MinSequenceNr = minSequenceNr;
+            MinTimestamp = minTimestamp ?? DateTime.MinValue;
         }

         public SnapshotSelectionCriteria(long maxSequenceNr) : this(maxSequenceNr, DateTime.MaxValue)
@@ -429,12 +431,22 @@
         /// <summary>
         /// Upper bound for a selected snapshot's sequence number.
         /// </summary>
-        public readonly long MaxSequenceNr;
+        public long MaxSequenceNr { get; }

         /// <summary>
         /// Upper bound for a selected snapshot's timestamp.
         /// </summary>
-        public readonly DateTime MaxTimeStamp;
+        public DateTime MaxTimeStamp { get; }
+
+        /// <summary>
+        /// Lower bound for a selected snapshot's sequence number
+        /// </summary>
+        public long MinSequenceNr { get; set; }
+
+        /// <summary>
+        /// Lower bound for a selected snapshot's timestamp
+        /// </summary>
+        public DateTime? MinTimestamp { get; set; }

         internal SnapshotSelectionCriteria Limit(long toSequenceNr)
         {
@@ -445,7 +457,8 @@

         internal bool IsMatch(SnapshotMetadata metadata)
         {
-            return metadata.SequenceNr <= MaxSequenceNr && metadata.Timestamp <= MaxTimeStamp;
+            return metadata.SequenceNr <= MaxSequenceNr && metadata.Timestamp <= MaxTimeStamp &&
+                metadata.SequenceNr >= MinSequenceNr && metadata.Timestamp >= MinTimestamp;
         }

         public bool Equals(SnapshotSelectionCriteria other)
@@ -453,7 +466,8 @@
             if (ReferenceEquals(other, null)) return false;
             if (ReferenceEquals(this, other)) return true;

-            return MaxSequenceNr == other.MaxSequenceNr && MaxTimeStamp == other.MaxTimeStamp;
+            return MaxSequenceNr == other.MaxSequenceNr && MaxTimeStamp == other.MaxTimeStamp &&
+                MinSequenceNr == other.MinSequenceNr && MinTimestamp == other.MinTimestamp;
         }

         public override bool Equals(object obj)
@@ -465,13 +479,20 @@
         {
             unchecked
             {
-                return (MaxSequenceNr.GetHashCode() * 397) ^ MaxTimeStamp.GetHashCode();
-            }
-        }
-
-        public override string ToString()
-        {
-            return string.Format("SnapshotSelectionCriteria<maxSeqNr: {0}, maxTimestamp: {1:yyyy/MM/dd}", MaxSequenceNr, MaxTimeStamp);
+                int hash = 17;
+                hash = hash * 23 + MaxSequenceNr.GetHashCode();
+                hash = hash * 23 + MaxTimeStamp.GetHashCode();
+                hash = hash * 23 + MinSequenceNr.GetHashCode();
+                hash = hash * 23 + MinTimestamp.GetHashCode();
+                return hash;
+            }
+        }
+
+        public override string ToString()
+        {
+            return string.Format(
+                "SnapshotSelectionCriteria<maxSeqNr: {0}, maxTimestamp: {1:yyyy/MM/dd}, minSeqNr: {2}, minTimestamp: {3:yyyy/MM/dd}>",
+                MaxSequenceNr, MaxTimeStamp, MinSequenceNr, MinTimestamp);
         }
     }


Added one tests case that was missed for not having sufficient amounts of change

--- CoinChangeCalculator/VendingMachine.Tests/VendingMachineTests.cs
+++ CoinChangeCalculator/VendingMachine.Tests/VendingMachineTests.cs
@@ -177,5 +177,30 @@
             Assert.AreEqual(userChange, vendingMachine.UserChange.ToString());
             Assert.AreEqual(machineBalance, vendingMachine.AvailableChange.Value);
         }
+
+
+        [TestMethod]
+        public void Cannot_make_change_from_insufficient_amount()
+        {
+            // Arrange : 40p Inserted but no enough amount for change
+            vendingMachine.AvailableChange.Clear();
+            vendingMachine.AvailableChange.Add(OnePence, 5);
+            var originalCount = vendingMachine.Drinks.Values.Sum();
+            vendingMachine.InsertCoin(TenPence);
+            vendingMachine.InsertCoin(TenPence);
+            vendingMachine.InsertCoin(TenPence);
+            vendingMachine.InsertCoin(TenPence);
+            var machineBalance = vendingMachine.AvailableChange.Value;
+            var userChange = vendingMachine.UserChange.ToString();
+
+            // Act : buys Coke for 32p
+            var result = vendingMachine.BuyCan(Coke);
+
+            // Assert : expects fail, user credits unchanged, machine credits unchanged
+            Assert.AreEqual(result, MachineEvent.NoChange);
+            Assert.AreEqual(originalCount, vendingMachine.Drinks.Values.Sum());
+            Assert.AreEqual(userChange, vendingMachine.UserChange.ToString());
+            Assert.AreEqual(machineBalance, vendingMachine.AvailableChange.Value);
+        }
     }
 }


[S3] Format GlacierJobTier

[S3] Format GlacierJobTier

--- src/Amazon.S3/Models/GlacierJobTier.cs
+++ src/Amazon.S3/Models/GlacierJobTier.cs
@@ -1,21 +1,9 @@
 namespace Amazon.S3
 {
-    public enum GlacierJobTier
+    public enum GlacierJobTier : byte
     {
-        Standard  = 0,
-        Expedited = 1,
-        Bulk      = 2
+        Standard  = 0, // $0.01 per GB   + $0.05 per 1,000 requests  [3-5 hours]
+        Expedited = 1, // $0.03 per GP   + $10.00 per 1000 requests  [1-5 minutes]
+        Bulk      = 2  // $0.0025 per GB + $0.025 per 1,000 requests [5-12 hours]
     }
-}
-
-/*
-POST /ObjectName?restore&versionId=VersionID HTTP/1.1
-Host: BucketName.s3.amazonaws.com
-Date: date
-Authorization: authorization string (see Authenticating Requests (AWS Signature Version 4))
-Content-MD5: MD5
-
-<RestoreRequest xmlns="http://s3.amazonaws.com/doc/2006-3-01">
-   <Days>NumberOfDays</Days>
-</RestoreRequest>
-*/
+}


took out test code in FormsAdminController

--- FormsGeneratorWebApplication/Controllers/FormsAdminController.cs
+++ FormsGeneratorWebApplication/Controllers/FormsAdminController.cs
@@ -46,8 +46,6 @@
                 forms = db.FormModels.ToList<FormsModel>()
             };

-            Email("njjakusz@uwm.edu,njjakusz@uwm.edu", "e77a69ed-9574-4daa-b714-748879f7d5ad");
-            Analytic("e77a69ed-9574-4daa-b714-748879f7d5ad");

             return View(adminFormModel);
         }


removed method from IDirectSum

removed method from IDirectSum

--- GenericMathRepository/Math.LinearAlgebra/Contracts/IDirectSum.cs
+++ GenericMathRepository/Math.LinearAlgebra/Contracts/IDirectSum.cs
@@ -1,59 +1,53 @@
-//  *************************************************************
-// <copyright file="IDirectSum.cs" company="${Company}">
-//     Copyright (c)  2014 andy. All rights reserved.
-// </copyright>
-// <author> andy</author>
-// <email>andreas.augustinba@gmx.de</email>
-// *************************************************************
-//   1.0.0  23 / 8 / 2014 Created the Class
-// *************************************************************
-
-namespace Math.LinearAlgebra
-{
-    using System;
-
-    using Math.Base;
-
-    /// <summary>
-    /// Interface for the direct sum of structures.
-    /// </summary>
-    /// <typeparam name="T">The underlying set.</typeparam>
-    /// <typeparam name="TStruct">The structure.</typeparam>
-    public interface IDirectSum<T, TStruct> : IEquatable<IDirectSum<T, TStruct>>
-        where TStruct : IStructure<T>, new()
-    {
-        #region properties
-
-        /// <summary>
-        /// Gets the dimension.
-        /// </summary>
-        /// <value>The dimension.</value>
-        UInt32 Dimension { get; }
-
-        /// <summary>
-        /// Gets or sets the <see cref="IDirectSum{T, TStruct}"/> at the specified index.
-        /// </summary>
-        /// <param name="index">The index.</param>
-        /// <returns>The value at index.</returns>
-        T this[UInt32 index] { get; set; }
-
-        #endregion
-
-        #region methods
-
-        /// <summary>
-        /// Returns a new the instance with same dimension like the calling instance.
-        /// </summary>
-        /// <returns>The instance with same dimension.</returns>
-        IDirectSum<T, TStruct> ReturnNewInstanceWithSameDimension();
-
-        /// <summary>
-        /// Returns the new instance.
-        /// </summary>
-        /// <returns>The new instance.</returns>
-        /// <param name="rowDimension">Row dimension.</param>
-        IDirectSum<T, TStruct> ReturnNewInstance(UInt32 rowDimension);
-
-        #endregion
-    }
+//  *************************************************************
+// <copyright file="IDirectSum.cs" company="${Company}">
+//     Copyright (c)  2014 andy. All rights reserved.
+// </copyright>
+// <author> andy</author>
+// <email>andreas.augustinba@gmx.de</email>
+// *************************************************************
+//   1.0.0  23 / 8 / 2014 Created the Class
+// *************************************************************
+
+namespace Math.LinearAlgebra
+{
+    using System;
+
+    using Math.Base;
+
+    /// <summary>
+    /// Interface for the direct sum of structures.
+    /// </summary>
+    /// <typeparam name="T">The underlying set.</typeparam>
+    /// <typeparam name="TStruct">The structure.</typeparam>
+    public interface IDirectSum<T, TStruct>
+        where TStruct : IStructure<T>, new()
+    {
+        #region properties
+
+        /// <summary>
+        /// Gets the dimension.
+        /// </summary>
+        /// <value>The dimension.</value>
+        UInt32 Dimension { get; }
+
+        /// <summary>
+        /// Gets or sets the <see cref="IDirectSum{T, TStruct}"/> at the specified index.
+        /// </summary>
+        /// <param name="index">The index.</param>
+        /// <returns>The value at index.</returns>
+        T this[UInt32 index] { get; set; }
+
+        #endregion
+
+        #region methods
+
+        /// <summary>
+        /// Returns the new instance.
+        /// </summary>
+        /// <returns>The new instance.</returns>
+        /// <param name="rowDimension">Row dimension.</param>
+        IDirectSum<T, TStruct> ReturnNewInstance(UInt32 rowDimension);
+
+        #endregion
+    }
 }


Avoid using optional arguments in constructor to avoid potential runtime breaking change

--- Libraries/src/Amazon.Lambda.Serialization.Json/JsonSerializer.cs
+++ Libraries/src/Amazon.Lambda.Serialization.Json/JsonSerializer.cs
@@ -23,22 +23,35 @@
         private bool debug;

         /// <summary>
+        /// Constructs instance of serializer.
+        /// </summary>
+        /// <param name="customizeSerializerSettings">A callback to customize the serializer settings.</param>
+        public JsonSerializer(Action<JsonSerializerSettings> customizeSerializerSettings)
+            : this(customizeSerializerSettings, null)
+        {
+
+        }
+
+        /// <summary>
         /// Constructs instance of serializer. This constructor is usefull to
         /// customize the serializer settings.
         /// </summary>
         /// <param name="customizeSerializerSettings">A callback to customize the serializer settings.</param>
         /// <param name="namingStrategy">The naming strategy to use. This parameter makes it possible to change the naming strategy to camel case for example. When not provided, it uses the default Newtonsoft.Json DefaultNamingStrategy.</param>
-        public JsonSerializer(Action<JsonSerializerSettings> customizeSerializerSettings, NamingStrategy namingStrategy = null)
+        public JsonSerializer(Action<JsonSerializerSettings> customizeSerializerSettings, NamingStrategy namingStrategy)
         {
             JsonSerializerSettings settings = new JsonSerializerSettings();
             customizeSerializerSettings(settings);

+
             // Set the contract resolver *after* the custom callback has been
             // invoked. This makes sure that we always use the good resolver.
-            settings.ContractResolver = new AwsResolver
+            var resolver = new AwsResolver();
+            if (namingStrategy != null)
             {
-                NamingStrategy = namingStrategy,
+                resolver.NamingStrategy = namingStrategy;
             };
+            settings.ContractResolver = resolver;

             serializer = Newtonsoft.Json.JsonSerializer.Create(settings);


trimmed usings

trimmed usings

--- MiX.Integrate.Shared/Entities/Organisation/OrganisationDetail.cs
+++ MiX.Integrate.Shared/Entities/Organisation/OrganisationDetail.cs
@@ -1,7 +1,4 @@
 using MiX.Integrate.Shared.Entities.Groups;
-using System;
-using System.Collections.Generic;
-using System.Text;

 namespace MiX.Integrate.Shared.Entities.Organisation
 {


removed instructions state - it was a filler thing anyways

--- Navier-Boats/Navier-Boats/Navier-Boats/Engine/Menu/IGameState.cs
+++ Navier-Boats/Navier-Boats/Navier-Boats/Engine/Menu/IGameState.cs
@@ -13,7 +13,6 @@
         GAMEPLAY,
         CREDITS,
         GAME_OVER,
-        INSTRUCTIONS,
     }
     public interface IGameState
     {


Display message as raw

Display message as raw

--- Noodles.AspMvc.Templates/Views/Shared/Noodles/Node.Object.cshtml
+++ Noodles.AspMvc.Templates/Views/Shared/Noodles/Node.Object.cshtml
@@ -81,7 +81,7 @@
                         if (descriptionAttribute != null)
                         {
                             <div class="noodles-callout noodles-callout-info">
-                                @descriptionAttribute.Description
+                                @Html.Raw(descriptionAttribute.Description)
                             </div>
                         }
                     }


remove some whitespace that snuck in with last patch

--- OpenSim/Region/CoreModules/World/Terrain/FileLoaders/Terragen.cs
+++ OpenSim/Region/CoreModules/World/Terrain/FileLoaders/Terragen.cs
@@ -275,9 +275,9 @@
             bs.Write(enc.GetBytes("ALTW"));
             bs.Write(Convert.ToInt16(horizontalScale)); // range between max and min
             bs.Write(Convert.ToInt16(baseHeight)); // base height or mid point
-
+
             double factor = 65536.0 / horizontalScale; // avoid computing this on each iteration
-
+
             for (int y = 0; y < map.Height; y++)
             {
                 for (int x = 0; x < map.Width; x++)


Fixes Mantis #5999. llSetLinkPrimitiveParams with PRIM_BUMP_SHINY did cause a runtime error.

--- OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -7336,7 +7336,7 @@
                                 return;
                             face = (int)rules.GetLSLIntegerItem(idx++);
                             int shiny = (int)rules.GetLSLIntegerItem(idx++);
-                            Bumpiness bump = (Bumpiness)Convert.ToByte((int)rules.GetLSLIntegerItem(idx++));
+                            Bumpiness bump = (Bumpiness)(int)rules.GetLSLIntegerItem(idx++);

                             SetShiny(part, face, shiny, bump);


Allow reading of notecards by asset ID. Fixes Manthis #3420

--- OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -9167,41 +9167,71 @@
         }

         public LSL_String llGetNumberOfNotecardLines(string name)
-        {
+        {
             m_host.AddScriptLPS(1);

             TaskInventoryDictionary itemsDictionary = (TaskInventoryDictionary)m_host.TaskInventory.Clone();

-            foreach (TaskInventoryItem item in itemsDictionary.Values)
-            {
-                if (item.Type == 7 && item.Name == name)
-                {
-                    UUID tid = AsyncCommands.
-                            DataserverPlugin.RegisterRequest(m_localID,
-                            m_itemID, item.AssetID.ToString());
-                    if (NotecardCache.IsCached(item.AssetID))
-                    {
-                        AsyncCommands.
-                        DataserverPlugin.DataserverReply(item.AssetID.ToString(),
-                                NotecardCache.GetLines(item.AssetID).ToString());
-                        // ScriptSleep(100);
-                        return tid.ToString();
-                    }
-                    WithNotecard(item.AssetID, delegate (UUID id, AssetBase a)
-                    {
-                        System.Text.ASCIIEncoding enc =
-                            new System.Text.ASCIIEncoding();
-                        string data = enc.GetString(a.Data);
-                        //m_log.Debug(data);
-                        NotecardCache.Cache(id, data);
-                        AsyncCommands.
-                                DataserverPlugin.DataserverReply(id.ToString(),
-                                NotecardCache.GetLines(id).ToString());
-                    });
-                    // ScriptSleep(100);
-                    return tid.ToString();
-                }
-            }
+            UUID assetID = UUID.Zero;
+
+            if (!UUID.TryParse(name, out assetID))
+            {
+                foreach (TaskInventoryItem item in itemsDictionary.Values)
+                {
+                    if (item.Type == 7 && item.Name == name)
+                    {
+                        assetID = item.AssetID;
+                        break;
+                    }
+                }
+            }
+
+            if (assetID == UUID.Zero)
+            {
+                // => complain loudly, as specified by the LSL docs
+                ShoutError("Notecard '" + name + "' could not be found.");
+            }
+
+            UUID tid = UUID.Zero;
+
+            if (NotecardCache.IsCached(assetID))
+            {
+                tid = AsyncCommands.
+                        DataserverPlugin.RegisterRequest(m_localID,
+                        m_itemID, assetID.ToString());
+
+                AsyncCommands.
+                DataserverPlugin.DataserverReply(assetID.ToString(),
+                NotecardCache.GetLines(assetID).ToString());
+                // ScriptSleep(100);
+                return tid.ToString();
+            }
+
+            WithNotecard(assetID, delegate (UUID id, AssetBase a)
+            {
+                if (a.Type != 7)
+                    return;
+
+                tid = AsyncCommands.
+                        DataserverPlugin.RegisterRequest(m_localID,
+                        m_itemID, assetID.ToString());
+
+                System.Text.ASCIIEncoding enc =
+                    new System.Text.ASCIIEncoding();
+                string data = enc.GetString(a.Data);
+                //m_log.Debug(data);
+                NotecardCache.Cache(id, data);
+                AsyncCommands.
+                        DataserverPlugin.DataserverReply(id.ToString(),
+                        NotecardCache.GetLines(id).ToString());
+            });
+
+            if (tid != UUID.Zero)
+            {
+                // ScriptSleep(100);
+                return tid.ToString();
+            }
+
             // if we got to here, we didn't find the notecard the script was asking for
             // => complain loudly, as specified by the LSL docs
             ShoutError("Notecard '" + name + "' could not be found.");
@@ -9216,38 +9246,64 @@

             TaskInventoryDictionary itemsDictionary = (TaskInventoryDictionary)m_host.TaskInventory.Clone();

-            foreach (TaskInventoryItem item in itemsDictionary.Values)
-            {
-                if (item.Type == 7 && item.Name == name)
-                {
-                    UUID tid = AsyncCommands.
-                            DataserverPlugin.RegisterRequest(m_localID,
-                            m_itemID, item.AssetID.ToString());
-
-                    if (NotecardCache.IsCached(item.AssetID))
-                    {
-                        AsyncCommands.
-                        DataserverPlugin.DataserverReply(item.AssetID.ToString(),
-                        NotecardCache.GetLine(item.AssetID, line, m_notecardLineReadCharsMax));
-                        // ScriptSleep(100);
-                        return tid.ToString();
-                    }
-
-                    WithNotecard(item.AssetID, delegate (UUID id, AssetBase a)
-                    {
-                        System.Text.ASCIIEncoding enc =
-                            new System.Text.ASCIIEncoding();
-                        string data = enc.GetString(a.Data);
-                        //m_log.Debug(data);
-                        NotecardCache.Cache(id, data);
-                        AsyncCommands.
-                                DataserverPlugin.DataserverReply(id.ToString(),
-                                NotecardCache.GetLine(id, line, m_notecardLineReadCharsMax));
-                    });
-
-                    // ScriptSleep(100);
-                    return tid.ToString();
-                }
+            UUID assetID = UUID.Zero;
+
+            if (!UUID.TryParse(name, out assetID))
+            {
+                foreach (TaskInventoryItem item in itemsDictionary.Values)
+                {
+                    if (item.Type == 7 && item.Name == name)
+                    {
+                        assetID = item.AssetID;
+                        break;
+                    }
+                }
+            }
+
+            if (assetID == UUID.Zero)
+            {
+                // => complain loudly, as specified by the LSL docs
+                ShoutError("Notecard '" + name + "' could not be found.");
+            }
+
+            UUID tid = UUID.Zero;
+
+            if (NotecardCache.IsCached(assetID))
+            {
+                tid = AsyncCommands.
+                        DataserverPlugin.RegisterRequest(m_localID,
+                        m_itemID, assetID.ToString());
+
+                AsyncCommands.
+                DataserverPlugin.DataserverReply(assetID.ToString(),
+                NotecardCache.GetLine(assetID, line, m_notecardLineReadCharsMax));
+                // ScriptSleep(100);
+                return tid.ToString();
+            }
+
+            WithNotecard(assetID, delegate (UUID id, AssetBase a)
+            {
+                if (a.Type != 7)
+                    return;
+
+                tid = AsyncCommands.
+                        DataserverPlugin.RegisterRequest(m_localID,
+                        m_itemID, assetID.ToString());
+
+                System.Text.ASCIIEncoding enc =
+                    new System.Text.ASCIIEncoding();
+                string data = enc.GetString(a.Data);
+                //m_log.Debug(data);
+                NotecardCache.Cache(id, data);
+                AsyncCommands.
+                        DataserverPlugin.DataserverReply(id.ToString(),
+                        NotecardCache.GetLine(id, line, m_notecardLineReadCharsMax));
+            });
+
+            if (tid != UUID.Zero)
+            {
+                // ScriptSleep(100);
+                return tid.ToString();
             }

             // if we got to here, we didn't find the notecard the script was asking for


Allow setting dimple diff to 0.02 from scripts just like from viewer, add clipping and fix old copy-paste error.

--- OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -7579,9 +7579,14 @@
             {
                 dimple.y = 1f;
             }
-            if (dimple.y - cut.x < 0.05f)
-            {
-                dimple.x = cut.y - 0.05f;
+            if (dimple.y - dimple.x < 0.02f)
+            {
+                dimple.x = dimple.y - 0.02f;
+                if (dimple.x < 0.0f)
+                {
+                    dimple.x = 0.0f;
+                    dimple.y = 0.02f;
+                }
             }
             shapeBlock.ProfileBegin = (ushort)(50000 * dimple.x);
             shapeBlock.ProfileEnd   = (ushort)(50000 * (1 - dimple.y));


only rotation of root part change parts positions, so only call ResetChildPrimPhysicsPositions() if root part. Plus 'cosmetics'

--- OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -660,18 +660,24 @@
             m_host.AddScriptLPS(1);

             double x,y,z,s;
-
-            double c1 = Math.Cos(v.x * 0.5);
-            double c2 = Math.Cos(v.y * 0.5);
-            double c3 = Math.Cos(v.z * 0.5);
-            double s1 = Math.Sin(v.x * 0.5);
-            double s2 = Math.Sin(v.y * 0.5);
-            double s3 = Math.Sin(v.z * 0.5);
-
-            x = s1 * c2 * c3 + c1 * s2 * s3;
-            y = c1 * s2 * c3 - s1 * c2 * s3;
-            z = s1 * s2 * c3 + c1 * c2 * s3;
-            s = c1 * c2 * c3 - s1 * s2 * s3;
+            v.x *= 0.5;
+            v.y *= 0.5;
+            v.z *= 0.5;
+            double c1 = Math.Cos(v.x);
+            double c2 = Math.Cos(v.y);
+            double c1c2 = c1 * c2;
+            double s1 = Math.Sin(v.x);
+            double s2 = Math.Sin(v.y);
+            double s1s2 = s1 * s2;
+            double c1s2 = c1 * s2;
+            double s1c2 = s1 * c2;
+            double c3 = Math.Cos(v.z);
+            double s3 = Math.Sin(v.z);
+
+            x = s1c2 * c3 + c1s2 * s3;
+            y = c1s2 * c3 - s1c2 * s3;
+            z = s1s2 * c3 + c1c2 * s3;
+            s = c1c2 * c3 - s1s2 * s3;

             return new LSL_Rotation(x, y, z, s);
         }
@@ -1911,11 +1917,12 @@
             Primitive.TextureEntry tex = part.Shape.Textures;
             Color4 texcolor;
             LSL_Vector rgb = new LSL_Vector();
+            int nsides = GetNumberOfSides(part);
+
             if (face == ScriptBaseClass.ALL_SIDES)
             {
                 int i;
-
-                for (i = 0 ; i < GetNumberOfSides(part); i++)
+                for (i = 0; i < nsides; i++)
                 {
                     texcolor = tex.GetFace((uint)i).RGBA;
                     rgb.x += texcolor.R;
@@ -1923,13 +1930,15 @@
                     rgb.z += texcolor.B;
                 }

-                rgb.x /= (float)GetNumberOfSides(part);
-                rgb.y /= (float)GetNumberOfSides(part);
-                rgb.z /= (float)GetNumberOfSides(part);
+                float invnsides = 1.0f / (float)nsides;
+
+                rgb.x *= invnsides;
+                rgb.y *= invnsides;
+                rgb.z *= invnsides;

                 return rgb;
             }
-            if (face >= 0 && face < GetNumberOfSides(part))
+            if (face >= 0 && face < nsides)
             {
                 texcolor = tex.GetFace((uint)face).RGBA;
                 rgb.x = texcolor.R;
@@ -2369,8 +2378,8 @@
             // without the absoluteposition = absoluteposition happening, the doors do not move in the physics
             // scene
             PhysicsActor pa = part.PhysActor;
-
-            if (pa != null && !pa.IsPhysical)
+            // only root part rot changes positions
+            if (pa != null && !pa.IsPhysical && part == part.ParentGroup.RootPart)
             {
                 part.ParentGroup.ResetChildPrimPhysicsPositions();
             }
@@ -2422,7 +2431,8 @@
         public LSL_Rotation llGetLocalRot()
         {
             m_host.AddScriptLPS(1);
-            return new LSL_Rotation(m_host.RotationOffset.X, m_host.RotationOffset.Y, m_host.RotationOffset.Z, m_host.RotationOffset.W);
+            Quaternion rot = m_host.RotationOffset;
+            return new LSL_Rotation(rot.X, rot.Y, rot.Z, rot.W);
         }

         public void llSetForce(LSL_Vector force, int local)


Mantis 6343: Turn a prim to flexy to OFF don't work llSetPrimParams

Correction so that scripts can turn Flexi off as well as on.

--- OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -1700,10 +1700,17 @@
                 part.Shape.FlexiForceX = (float)Force.x;
                 part.Shape.FlexiForceY = (float)Force.y;
                 part.Shape.FlexiForceZ = (float)Force.z;
-                part.Shape.PathCurve = 0x80;
-                part.ParentGroup.HasGroupChanged = true;
-                part.ScheduleFullUpdate();
-            }
+                part.Shape.PathCurve = (byte)Extrusion.Flexible;
+            }
+            else
+            {
+                // Other values not set, they do not seem to be sent to the viewer
+                // Setting PathCurve appears to be what actually toggles the check box and turns Flexi on and off
+                part.Shape.PathCurve = (byte)Extrusion.Straight;
+                part.Shape.FlexiEntry = false;
+            }
+            part.ParentGroup.HasGroupChanged = true;
+            part.ScheduleFullUpdate();
         }

         /// <summary>


Commented out minecraft white-list command as the cur

--- U413.Domain/Commands/Objects/USER.cs
+++ U413.Domain/Commands/Objects/USER.cs
@@ -94,11 +94,6 @@
                     "b|ban",
                     "Ban the user for a specified amount of time.",
                     x => ban = x != null
-                );
-                options.Add(
-                    "mc|minecraft=",
-                    "White-lists a {Minecraft Username} to play on the U413 Minecraft server.",
-                    x => minecraftUsername = x
                 );
             }
             if (this.CommandResult.CurrentUser.IsAdministrator)
@@ -335,40 +330,6 @@
                             else
                                 this.CommandResult.WriteLine("You must specify a username.");
                         }
-                        else if (minecraftUsername != null)
-                        {
-                            if (parsedArgs.Length == 1)
-                            {
-                                var user = _userRepository.GetUser(parsedArgs[0]);
-                                if (user != null)
-                                {
-                                    user.UserActivityLog.Add(new UserActivityLogItem
-                                    {
-                                        Type = "Generic",
-                                        Date = DateTime.UtcNow,
-                                        Information = string.Format(
-                                            "{0} white-listed Minecraft username {1} for {2}.",
-                                            this.CommandResult.CurrentUser.Username,
-                                            minecraftUsername,
-                                            user.Username
-                                        )
-                                    });
-                                    var service = new ServiceController("U413Minecraft");
-                                    service.Stop();
-                                    service.WaitForStatus(ServiceControllerStatus.Stopped);
-                                    var minecraftWhitelist = File.AppendText(@"C:\Minecraft\U413 Pre Release\white-list.txt");
-                                    minecraftWhitelist.WriteLine(minecraftUsername);
-                                    minecraftWhitelist.Close();
-                                    service.Start();
-                                    service.WaitForStatus(ServiceControllerStatus.Running);
-                                    this.CommandResult.WriteLine("{0} successfully white-listed.", minecraftUsername);
-                                }
-                                else
-                                    this.CommandResult.WriteLine("There is no user with the username '{0}'.", parsedArgs[0]);
-                            }
-                            else
-                                this.CommandResult.WriteLine("You must specify a username.");
-                        }
                         else
                         {
                             if (history)


Fix MangaHere test

Fix MangaHere test

--- MangaRipper.Test/Plugin.cs
+++ MangaRipper.Test/Plugin.cs
@@ -88,20 +88,19 @@
         [TestMethod]
         public async Task MangaHere_Test()
         {
-            string url = "http://www.mangahere.cc/manga/the_god_of_high_school/";
+            string url = "http://www.mangahere.cc/manga/deathtopia/";
             var service = new MangaHere(_logger, new Downloader(), new HtmlAtilityPackAdapter(), new Retry());
             var chapters = await service.FindChapters(url, new Progress<int>(), _source.Token);
-            Assert.IsTrue(chapters.Any(), "Cannot find chapters.");
+            Assert.AreEqual(66, chapters.Count(), "Cannot find chapters.");
             var chapter = chapters.Last();
-            Assert.AreEqual("The God Of High School", chapter.Manga);
-            Assert.AreEqual("The God Of High School 1", chapter.DisplayName);
-            Assert.AreEqual("http://www.mangahere.cc/manga/the_god_of_high_school/c001/", chapter.Url);
+            Assert.AreEqual("Deathtopia", chapter.Manga);
+            Assert.AreEqual("Deathtopia 1", chapter.DisplayName);
+            Assert.AreEqual("http://www.mangahere.cc/manga/deathtopia/c001/", chapter.Url);
             var images = await service.FindImages(chapter, new Progress<int>(), _source.Token);
-            Assert.AreEqual(55, images.Count());
-            Assert.IsTrue(images.ToArray()[0].StartsWith("https://mhcdn.secure.footprint.net/store/manga/9275/001.0/compressed/m001.01.jpg"));
-            Assert.IsTrue(images.ToArray()[1].StartsWith("https://mhcdn.secure.footprint.net/store/manga/9275/001.0/compressed/m001.02.jpg"));
-            Assert.IsTrue(images.ToArray()[54].StartsWith("https://mhcdn.secure.footprint.net/store/manga/9275/001.0/compressed/m001.55.jpg"));
-
+            Assert.AreEqual(59, images.Count());
+            Assert.IsTrue(images.ToArray()[0].StartsWith("https://mhcdn.secure.footprint.net/store/manga/14771/001.0/compressed/uimg001.jpg"));
+            Assert.IsTrue(images.ToArray()[1].StartsWith("https://mhcdn.secure.footprint.net/store/manga/14771/001.0/compressed/uimg002.jpg"));
+            Assert.IsTrue(images.ToArray()[58].StartsWith("https://mhcdn.secure.footprint.net/store/manga/14771/001.0/compressed/uimg059.jpg"));
             string imageString = await downloader.DownloadStringAsync(images.ToArray()[0], _source.Token);
             Assert.IsNotNull(imageString, "Cannot download image!");
         }


crash in HandlerPinsOnCollectionChanged when NewItems is null fixed

--- Mapsui.UI.Forms/MapView.cs
+++ Mapsui.UI.Forms/MapView.cs
@@ -689,12 +689,15 @@
                 }
             }

-            foreach (var item in e.NewItems)
-            {
+            if (e.NewItems != null)
+            {
+              foreach (var item in e.NewItems)
+              {
                 // Add new pins to layer
                 var pin = item as Pin;

                 pin.PropertyChanged += HandlerPinPropertyChanged;
+              }
             }

             Refresh();


update license

update license

--- Unity/EnumConverter/EnumConverter.cs
+++ Unity/EnumConverter/EnumConverter.cs
@@ -2,7 +2,7 @@

 MIT License

-Copyright (c) 2017 - 2018 NDark
+Copyright (c) 2017 - 2019 NDark

 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal


Added a link to Plunkr

Added a link to Plunkr

--- Web/Views/Demos/fullyFeaturedLocal.cshtml
+++ Web/Views/Demos/fullyFeaturedLocal.cshtml
@@ -1,4 +1,4 @@
-


Remove unmatched variables

Remove unmatched variables

--- UnityBuildServer/TextReplacements.cs
+++ UnityBuildServer/TextReplacements.cs
@@ -1,4 +1,5 @@
 using System.Collections.Generic;
+using System.Text.RegularExpressions;

 namespace UnityBuildServer
 {
@@ -11,10 +12,13 @@
     {
         public string ReplaceVariablesInText(string source)
         {
+            // Replace all variables that are known by TextReplacements
             foreach (var kvp in this)
             {
                 source = source.Replace($"%{kvp.Key}%", kvp.Value);
             }
+            // Remove any variables that were not matched
+            source = Regex.Replace(source, "%.*?%", string.Empty, RegexOptions.Multiline);
             return source;
         }
     }


comment fix

comment fix

--- Wox.Infrastructure/Hotkey/GlobalHotkey.cs
+++ Wox.Infrastructure/Hotkey/GlobalHotkey.cs
@@ -63,7 +63,7 @@
             }
             if ((InterceptKeys.GetKeyState(VK_WIN) & 0x8000) != 0)
             {
-                //ALT is pressed
+                //WIN is pressed
                 state.WinPressed = true;
             }


bugfix Behavior of XamlProperty should not be changed

--- WpfDesign.XamlDom/Project/XamlProperty.cs
+++ WpfDesign.XamlDom/Project/XamlProperty.cs
@@ -595,8 +595,8 @@
 						return null;
 				} else {
 					var value =  propertyInfo.GetValue(parentObject.Instance);
-					if (value == null && propertyValue is XamlTextValue)
-						value = propertyValue.GetValueFor(null);
+					//if (value == null && propertyValue is XamlTextValue)
+					//	value = propertyValue.GetValueFor(null);
 					return value;
 				}
 			}


[WPF] Implemented GetRowAtPosition on ListViewBackend

--- Xwt.WPF/Xwt.WPFBackend/ListViewBackend.cs
+++ Xwt.WPF/Xwt.WPFBackend/ListViewBackend.cs
@@ -284,10 +284,33 @@
 		private static readonly Setter BorderBrushSetter = new Setter (ListViewItem.BorderBrushProperty, System.Windows.Media.Brushes.LightGray);

-        public int GetRowAtPosition(Point p)
-        {
-            throw new NotImplementedException();
-        }
+		public int GetRowAtPosition(Point p) {
+
+			System.Windows.Point targetPosition = this.ListView.PointToScreen(new System.Windows.Point(p.X, p.Y));
+
+			DependencyObject container;
+			ListViewItem listViewItem;
+
+			for(int i = 0; i < this.ListView.Items.Count; i++) {
+				container = this.ListView.ItemContainerGenerator.ContainerFromIndex(i);
+
+				if(container == null) {
+					continue;
+				}
+
+				listViewItem = container as ListViewItem;
+
+				System.Windows.Point itemLocation = listViewItem.PointToScreen(new System.Windows.Point(0, 0));
+
+				System.Windows.Rect itemBounds = new System.Windows.Rect(itemLocation, listViewItem.RenderSize);
+
+				if(itemBounds.Contains(targetPosition)) {
+					return i;
+				}
+			}
+
+			return -1;
+		}

         public Rectangle GetCellBounds(int row, CellView cell, bool includeMargin)
         {


Renamed negative lookarounds to match their positive counterparts

--- FriendlyRegex/RegularExpression.cs
+++ FriendlyRegex/RegularExpression.cs
@@ -162,12 +162,12 @@
             return ConcatenateThisWith(PositiveLookahead.At(expression));
         }

-        public RegularExpression NotAheadOf(RegularExpression expression)
+        public RegularExpression NotBefore(RegularExpression expression)
         {
             return ConcatenateThisWith(NegativeLookahead.At(expression));
         }

-        public RegularExpression NotBehind(RegularExpression expression)
+        public RegularExpression NotAfter(RegularExpression expression)
         {
             return ConcatenateThisWith(NegativeLookbehind.At(expression));
         }


Added more commands to control groups

Added more commands to control groups

--- Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Presets.cs
+++ Project-Aurora/Project-Aurora/Profiles/EliteDangerous/Presets.cs
@@ -407,7 +407,7 @@
         {
             new ControlGroup(new[]
             {
-                Command.PhotoCameraToggle, Command.VanityCameraScrollLeft,
+                Command.VanityCameraScrollLeft,
                 Command.VanityCameraScrollRight, Command.ToggleFreeCam, Command.FreeCamToggleHUD,
                 Command.FixCameraRelativeToggle, Command.FixCameraWorldToggle,

@@ -500,6 +500,7 @@
                 Command.SelectTarget,
                 Command.PrimaryFire,
                 Command.SecondaryFire,
+                Command.PhotoCameraToggle,
             }),
             new ControlGroup(new[]
             {
@@ -653,6 +654,7 @@
         {
             new ControlGroup(new[]
             {
+                Command.PhotoCameraToggle_Buggy,
                 Command.ToggleDriveAssist,

                 Command.SteerLeftButton,
@@ -745,7 +747,7 @@
             new ControlGroup(new[]
             {
                 Command.CamPitchUp, Command.CamPitchDown, Command.CamTranslateUp, Command.CamTranslateDown,
-                Command.CamYawLeft, Command.CamYawRight
+                Command.CamYawLeft, Command.CamYawRight, Command.GalaxyMapHome
             })
         }, new GameStateCondition(guiFocus: new[] {GuiFocus.MAP_GALAXY, GuiFocus.MAP_ORRERY}));


フィルター追加

フィルター追加

--- ReferenceViewer/Assets/ReferenceViewer/Editor/ReferenceViewer.cs
+++ ReferenceViewer/Assets/ReferenceViewer/Editor/ReferenceViewer.cs
@@ -1,8 +1,10 @@
-using System.Collections.Generic;
+using System;
+using System.Collections.Generic;
 using UnityEngine;
 using UnityEditor;
 using System.IO;
 using System.Linq;
+using Object = UnityEngine.Object;

 namespace ReferenceViewer
 {
@@ -11,7 +13,7 @@

         private List<Item> hitItems = new List<Item>();
         private Vector2 pos = Vector2.zero;
-
+        private int selectedFilter = 0;
         [MenuItem("Window/ReferenceViewer")]
         private static void Open()
         {
@@ -32,6 +34,7 @@
             var items = (Selection.objects.Select(obj => AssetDatabase.AssetPathToGUID(AssetDatabase.GetAssetPath(obj)))
                 .Select(guid => new
                 {
+                    type = AssetDatabase.LoadAssetAtPath(AssetDatabase.GUIDToAssetPath(guid), typeof(Object)).GetType(),
                     searched = GetGUIContent(guid),
                     referenced =
                         data.assetData.Where(assetData => assetData.reference.Contains(guid))
@@ -41,23 +44,24 @@
                             .ToList(),
                     reference =
                         data.assetData.Find(item => item.guid == guid)
-                                .reference.Select(g => GetGUIContent(g))
-                                .Where(c => c.image)
-                                .OrderBy(c => c.image.name)
-                                .ToList()
+                            .reference.Select(g => GetGUIContent(g))
+                            .Where(c => c.image)
+                            .OrderBy(c => c.image.name)
+                            .ToList()
                 })
                 .Where(item => (item.referenced.Count != 0 || item.reference.Count != 0) && item.searched.image)
                 .OrderBy(item => item.searched.image.name)
                 .Select(item => new Item
                 {
+                    type = item.type,
                     searchedGUIContent = item.searched,
                     referencedGUIContents = item.referenced,
                     referenceGUIContents = item.reference
-                })).ToList();
-
+                }))
+                .Distinct(new CompareSelector<Item, string>(i => i.searchedGUIContent.tooltip))
+                .ToList();
             GetWindow<ReferenceViewer>().Results(items);
         }
-
         private void Results(List<Item> items)
         {
             hitItems = items;
@@ -65,6 +69,7 @@

         private void OnGUI()
         {
+            EditorGUILayout.BeginHorizontal();
             if (GUILayout.Button("Create Json", EditorStyles.toolbarButton))
             {
                 JsonCreator.Build();
@@ -73,16 +78,38 @@

             if (hitItems.Count == 0)
             {
+                EditorGUILayout.EndHorizontal();
                 EditorGUILayout.LabelField("Not Found");
             }
             else
             {
+                EditorGUI.BeginChangeCheck();
+                var types = hitItems.Select(item => item.type).ToArray();
+                var display = types.Select(t => t.Name).ToArray();
+                for (int i = 0; i < display.Length; i++)
+                {
+                    if (display[i] == "Object")
+                    {
+                        display[i] = "Scene";
+                    }
+                }
+                ArrayUtility.Insert(ref display, 0, "All");
+                var selected = EditorGUILayout.Popup(selectedFilter, display, EditorStyles.toolbarPopup);
+                if (EditorGUI.EndChangeCheck())
+                {
+                    selectedFilter = selected;
+                }
+                EditorGUILayout.EndHorizontal();
                 pos = EditorGUILayout.BeginScrollView(pos);

                 foreach (var hitItem in hitItems)
                 {
-
-                    EditorGUILayout.BeginHorizontal("box", GUILayout.Width(Screen.width * 0.98f));
+                    if (selectedFilter != 0 && hitItem.type != types[selectedFilter - 1])
+                    {
+                        continue;
+                    }
+
+                    EditorGUILayout.BeginHorizontal("box", GUILayout.Width(Screen.width * 0.96f));
                     DrawGUIContents(hitItem.referenceGUIContents);
                     var iconSize = EditorGUIUtility.GetIconSize();
                     EditorGUIUtility.SetIconSize(Vector2.one * 32);
@@ -117,11 +144,7 @@
             else
             {
                 GUILayout.Space(Screen.width * 0.3f + 16);
-                //                GUILayout.Box("", GUILayout.Width(Screen.width * 0.3f), GUILayout.ExpandWidth(true), GUILayout.ExpandHeight(true));
-            }
-
-
-
+            }
         }
         private static void PingObjectIfOnMouseDown(string path)
         {
@@ -159,8 +182,28 @@
             return content;
         }

+        private class CompareSelector<T, TKey> : IEqualityComparer<T>
+        {
+            private Func<T, TKey> selector;
+
+            public CompareSelector(Func<T, TKey> selector)
+            {
+                this.selector = selector;
+            }
+
+            public bool Equals(T x, T y)
+            {
+                return selector(x).Equals(selector(y));
+            }
+
+            public int GetHashCode(T obj)
+            {
+                return selector(obj).GetHashCode();
+            }
+        }
         private class Item
         {
+            public Type type;
             public GUIContent searchedGUIContent;
             public List<GUIContent> referencedGUIContents = new List<GUIContent>();
             public List<GUIContent> referenceGUIContents = new List<GUIContent>();


Mark Binary as Serializeable.

Mark Binary as Serializeable.

--- source/MongoDB/Binary.cs
+++ source/MongoDB/Binary.cs
@@ -6,6 +6,7 @@
 {
     /// <summary>
     /// </summary>
+    [Serializable]
     public class Binary : IEquatable<Binary>, ICloneable, IEnumerable<byte>
     {
         /// <summary>


Implement on click command property for datatemplate

--- Schedutalk/Schedutalk/Schedutalk/CustomControl/TimeLineLayout.cs
+++ Schedutalk/Schedutalk/Schedutalk/CustomControl/TimeLineLayout.cs
@@ -40,26 +40,32 @@
             var newValueINotifyCollectionChanged = newValue as INotifyCollectionChanged;
             if (null != newValueINotifyCollectionChanged)
             {
-                foreach (var item in ItemsSource)
+                foreach (MEvent item in ItemsSource)
                 {
-                    var view = (Xamarin.Forms.View)ItemTemplate.CreateContent();
-                    var bindableObject = view as BindableObject;
-                    if (bindableObject != null)
-                        bindableObject.BindingContext = item;
-                    this.Children.Add(view);
+                    addChildToView(item);
                 }

                 newValueINotifyCollectionChanged.CollectionChanged += new NotifyCollectionChangedEventHandler(INotifyCollectionChanged);
             }
         }

+        private void addChildToView(MEvent item)
+        {
+            var view = (Xamarin.Forms.View)ItemTemplate.CreateContent();
+            var tapGestureRecognizer = new TapGestureRecognizer();
+            tapGestureRecognizer.Tapped += (s, e) => {
+                Command.Execute(item);
+            };
+            view.GestureRecognizers.Add(tapGestureRecognizer);
+            var bindableObject = view as BindableObject;
+            if (bindableObject != null)
+                bindableObject.BindingContext = item;
+            this.Children.Add(view);
+        }
+
         private void INotifyCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
         {
-            var view = (Xamarin.Forms.View)ItemTemplate.CreateContent();
-            var bindableObject = view as BindableObject;
-            if (bindableObject != null && ItemsSource.Count > 0)
-                bindableObject.BindingContext = ItemsSource[ItemsSource.Count - 1];
-            this.Children.Add(view);
+            if (ItemsSource.Count > 0) addChildToView((MEvent)ItemsSource[ItemsSource.Count - 1]);
         }

         public IList ItemsSource
@@ -72,6 +78,14 @@
             {
                 SetValue(ItemsSourceProperty, value);
             }
+        }
+
+        public static readonly BindableProperty CommandProperty = BindableProperty.Create<TimeLineLayout, Command>(c => c.Command, null);
+
+        public Command Command
+        {
+            get { return (Command)GetValue(CommandProperty); }
+            set { SetValue(CommandProperty, value); }
         }

         public double Spacing


Remove debug info

Remove debug info

--- Source/HelixToolkit.SharpDX.Shared/Core/ScreenCloneRenderCore.cs
+++ Source/HelixToolkit.SharpDX.Shared/Core/ScreenCloneRenderCore.cs
@@ -46,7 +46,7 @@
             }
         }

-        private Rectangle cloneRectangle = new Rectangle(100, 100, 800, 400);
+        private Rectangle cloneRectangle = new Rectangle();
         public Rectangle CloneRectangle
         {
             set