Fixed (non-)optional 'because' and 'reasonArgs' for Dictionaries

Dictionary<,>.ContainKeys(..) had a non-optional 'because' argument and
so did .ContainValuesAndWhich(..) - the later for 'reasonArgs'.. which
was/is inconsistent with the rest.

--- Src/Core/Collections/GenericDictionaryAssertions.cs
+++ Src/Core/Collections/GenericDictionaryAssertions.cs
@@ -312,7 +312,7 @@
         /// Zero or more objects to format using the placeholders in <see cref="because" />.
         /// </param>
         public AndConstraint<GenericDictionaryAssertions<TKey, TValue>> ContainKeys(IEnumerable<TKey> expected,
-            string because, params object[] reasonArgs)
+            string because = "", params object[] reasonArgs)
         {
             if (expected == null)
             {
@@ -448,8 +448,8 @@
             return ContainValuesAndWhich(expected, because, reasonArgs);
         }

-        private AndWhichConstraint<GenericDictionaryAssertions<TKey, TValue>, IEnumerable<TValue>> ContainValuesAndWhich(IEnumerable<TValue> expected, string because,
-            object[] reasonArgs)
+        private AndWhichConstraint<GenericDictionaryAssertions<TKey, TValue>, IEnumerable<TValue>> ContainValuesAndWhich(IEnumerable<TValue> expected, string because = "",
+            params object[] reasonArgs)
         {
             if (expected == null)
             {


Added tests to cover new feature:: getting a number from a string representing roman numerals. Code will not yet compile.

The method should make use of NullReference and Argument exceptions when dealing with null/empty strings respectively. The method should also throw ArgumentException when strings contain non-numeral characters or when lowercase symbol characters are used. Subtractive notation should be enforced and throw ArgumentException on violations. Finally, the same number range between 1 and 3000 should be enforced on the return values and throw IndexOutOfRangeException on violations.

--- TDD-Samples.UnitTests/RomanNumeralConverterTests.cs
+++ TDD-Samples.UnitTests/RomanNumeralConverterTests.cs
@@ -14,7 +14,9 @@
     {
         [TestCase(1, "I")]
         [TestCase(6, "VI")]
+        [TestCase(101, "CI")]
         [TestCase(2489, "MMCDLXXXIX")]
+        [TestCase(2644, "MMDCXLIV")]
         [TestCase(3000, "MMM")]
         public void GetRomanNumeral_NumberBetween1And3000_ReturnsCorrectRomanNumeral(int numberToConvert, string expectedRomanNumeralString)
         {
@@ -43,6 +45,76 @@
             Assert.Throws<IndexOutOfRangeException>(() => converter.GetRomanNumeral(invalidIndexAbove3000));
         }

+
+        [Test]
+        public void GetNumber_NullString_ThrowsArgumentNullException()
+        {
+            var converter = GetRomanNumeralConverter();
+
+            Assert.Throws<ArgumentNullException>(() => converter.GetNumber(null));
+        }
+
+        [Test]
+        public void GetNumber_EmptyString_ThrowsArgumentException()
+        {
+            var converter = GetRomanNumeralConverter();
+
+            Assert.Throws<ArgumentException>(() => converter.GetNumber(String.Empty));
+        }
+
+        [TestCase("abc")]
+        [TestCase("IVR")]
+        [TestCase("MM ")]
+        [TestCase("O_O")]
+        public void GetNumber_StringContainingInvalidCharacters_ThrowsArgumentException(string invalidInput)
+        {
+            var converter = GetRomanNumeralConverter();
+
+            Assert.Throws<ArgumentException>(() => converter.GetNumber(invalidInput));
+        }
+
+        public void GetNumber_StringContainingLowerCaseSymbols_ThrowsArgumentException()
+        {
+            var converter = GetRomanNumeralConverter();
+            var invalidStringWithLowerCaseSymbols = "mmm";
+
+            Assert.Throws<ArgumentException>(() => converter.GetNumber(invalidStringWithLowerCaseSymbols));
+        }
+
+        [TestCase("IIII")]
+        [TestCase("XXXXX")]
+        [TestCase("MCCCC")]
+        public void GetNumber_InvalidSubtractiveNotation_ThrowsArgumentException(string invalidSubtractiveNotation)
+        {
+            var converter = GetRomanNumeralConverter();
+
+            Assert.Throws<ArgumentException>(() => converter.GetNumber(invalidSubtractiveNotation));
+        }
+
+        [Test]
+        public void GetNumber_NumeralAbove3000_ThrowsIndexOutOfRange()
+        {
+            var converter = GetRomanNumeralConverter();
+            var number3002 = "MMMII";
+
+            Assert.Throws<IndexOutOfRangeException>(() => converter.GetNumber(number3002));
+        }
+
+        [TestCase("I", 1)]
+        [TestCase("VI", 6)]
+        [TestCase("CI", 101)]
+        [TestCase("MMCDLXXXIX", 2489)]
+        [TestCase("MMDCXLIV", 2644)]
+        [TestCase("MMM", 3000)]
+        public void GetNumber_NumeralBetween1And3000_ReturnsCorrectNumber(string validInput, int expectedResult)
+        {
+            var converter = GetRomanNumeralConverter();
+
+            var result = converter.GetNumber(validInput);
+
+            Assert.AreEqual(expectedResult, result);
+        }
+
         public RomanNumeralConverter GetRomanNumeralConverter()
         {
             return new RomanNumeralConverter();


Updated version number

Updated version number

--- TeamProjectManager.Shell/Properties/AssemblyInfo.cs
+++ TeamProjectManager.Shell/Properties/AssemblyInfo.cs
@@ -5,7 +5,7 @@
 using System.Windows;
 using TeamProjectManager.Common;

-[assembly: AssemblyVersion("1.7.*")] // This can be updated anytime as long as .NET user settings are not used (otherwise the settings directory depends on this version).
+[assembly: AssemblyVersion("1.8.*")] // This can be updated anytime as long as .NET user settings are not used (otherwise the settings directory depends on this version).
 [assembly: AssemblyInformationalVersion("1.0.0.0")] // Keep this constant as long as possible to avoid the user's settings getting lost (it is used for the LocalUserAppDataPath where the configuration file is stored).
 [assembly: Guid("70d06212-76d7-492c-8957-9f0b59d1bb2c")]


Simplify method matching by name without using RegEx.

--- Telerik.JustMock/Core/MockingUtil.PrivateMethods.cs
+++ Telerik.JustMock/Core/MockingUtil.PrivateMethods.cs
@@ -36,6 +36,8 @@
 			MethodBody body = method.GetMethodBody();
 			byte[] il = body.GetILAsByteArray();

+			string expectedName = String.Format("<'{0}'>g__'{1}'|", method.Name, localMemberName);
+
 			MethodInfo localMethod = null;
 			for (int i = 0; i < il.Length; i++)
 			{
@@ -46,21 +48,10 @@

 					MethodBase methodBase = type.Module.ResolveMethod(token);

-					if(methodBase.DeclaringType == type)
+					if(methodBase.DeclaringType == type && methodBase.Name.StartsWith(expectedName))
 					{
-						var regEx = new System.Text.RegularExpressions.Regex(@"<(?<ContainingMethod>([a-z,A-Z,0-9]+))>g__(?<LocalFunction>([[a-z,A-Z,0-9]+))[|][0-9]+_[0-9]+");
-						System.Text.RegularExpressions.Match match = regEx.Match(methodBase.Name);
-						if (match.Success)
-						{
-							string containigMethod = match.Groups["ContainingMethod"].Value;
-							string localFunction = match.Groups["LocalFunction"].Value;
-							if (method.Name.Equals(containigMethod) && localMemberName.Equals(localFunction))
-							{
-
-								localMethod = methodBase as MethodInfo;
-								break;
-							}
-						}
+						localMethod = methodBase as MethodInfo;
+						break;
 					}
 					if (localMethod != null)
 					{


Fixed build.

Fixed build.

--- Tests/MQTTnet.Core.Tests/ManagedMqttClient_Tests.cs
+++ Tests/MQTTnet.Core.Tests/ManagedMqttClient_Tests.cs
@@ -1,4 +1,5 @@
-using System.Threading;
+using System.Collections.Generic;
+using System.Threading;
 using System.Threading.Tasks;
 using Microsoft.VisualStudio.TestTools.UnitTesting;
 using MQTTnet.Client;


DuplicatedByteBuf implemented

DuplicatedByteBuf implemented

--- TomP2P/TomP2P.Extensions/Netty/DuplicatedByteBuf.cs
+++ TomP2P/TomP2P.Extensions/Netty/DuplicatedByteBuf.cs
@@ -2,7 +2,7 @@

 namespace TomP2P.Extensions.Netty
 {
-    public class DuplicatedByteBuf : AbstractDerivedByteBuf
+    public sealed class DuplicatedByteBuf : AbstractDerivedByteBuf
     {
         private readonly ByteBuf _buffer;

@@ -20,19 +20,25 @@
             SetIndex(buffer.ReaderIndex, buffer.WriterIndex);
         }

+        public override ByteBuf Unwrap()
+        {
+            return _buffer;
+        }
+
         public override IByteBufAllocator Alloc
         {
             get { return _buffer.Alloc; }
         }

-        public override ByteBuf Unwrap()
-        {
-            return _buffer;
-        }
-
         public override int Capacity
         {
             get { return _buffer.Capacity; }
+        }
+
+        public override ByteBuf SetCapacity(int newCapacity)
+        {
+            _buffer.SetCapacity(newCapacity);
+            return this;
         }

         public override ByteBuf Slice(int index, int length)
@@ -49,5 +55,107 @@
         {
             return _buffer.NioBuffers(index, length);
         }
+
+        public override sbyte GetByte(int index)
+        {
+            return _getByte(index);
+        }
+
+        protected override sbyte _getByte(int index)
+        {
+            return _buffer.GetByte(index);
+        }
+
+        public override short GetShort(int index)
+        {
+            return _getShort(index);
+        }
+
+        protected override short _getShort(int index)
+        {
+            return _buffer.GetShort(index);
+        }
+
+        public override int GetInt(int index)
+        {
+            return _getInt(index);
+        }
+
+        protected override int _getInt(int index)
+        {
+            return _buffer.GetInt(index);
+        }
+
+        public override long GetLong(int index)
+        {
+            return _getLong(index);
+        }
+
+        protected override long _getLong(int index)
+        {
+            return _buffer.GetLong(index);
+        }
+
+        public override ByteBuf GetBytes(int index, sbyte[] dst, int dstIndex, int length)
+        {
+            _buffer.GetBytes(index, dst, dstIndex, length);
+            return this;
+        }
+
+        public override ByteBuf SetByte(int index, int value)
+        {
+            _setByte(index, value);
+            return this;
+        }
+
+        protected override void _setByte(int index, int value)
+        {
+            _buffer.SetByte(index, value);
+        }
+
+        public override ByteBuf SetShort(int index, int value)
+        {
+            _setShort(index, value);
+            return this;
+        }
+
+        protected override void _setShort(int index, int value)
+        {
+            _buffer.SetShort(index, value);
+        }
+
+        public override ByteBuf SetInt(int index, int value)
+        {
+            _setInt(index, value);
+            return this;
+        }
+
+        protected override void _setInt(int index, int value)
+        {
+            _buffer.SetInt(index, value);
+        }
+
+        public override ByteBuf SetLong(int index, long value)
+        {
+            _setLong(index, value);
+            return this;
+        }
+
+        protected override void _setLong(int index, long value)
+        {
+            _buffer.SetLong(index, value);
+        }
+
+        public override ByteBuf SetBytes(int index, sbyte[] src, int srcIndex, int length)
+        {
+            _buffer.SetBytes(index, src, srcIndex, length);
+            return this;
+        }
+
+        public override ByteBuf SetBytes(int index, ByteBuf src, int srcIndex, int length)
+        {
+            _buffer.SetBytes(index, src, srcIndex, length);
+            return this;
+        }
     }
 }


Add unit tests

Add unit tests

--- UnitTestUsefullFunctions/UnitTestFunctionsString.cs
+++ UnitTestUsefullFunctions/UnitTestFunctionsString.cs
@@ -9618,6 +9618,132 @@
     #endregion AddSpaceInNumberWithDecimal
     #region AddSpaceInNumber
     //TODO write unit tests
+    [TestMethod]
+    public void TestMethod_AddSpaceInNumber_value_0()
+    {
+      const long source = 0;
+      const string expected = "0";
+      string result = StringFunc.AddSpaceInNumber(source);
+      Assert.AreEqual(result, expected);
+    }
+
+    [TestMethod]
+    public void TestMethod_AddSpaceInNumber_value_1()
+    {
+      const long source = 1;
+      const string expected = "1";
+      string result = StringFunc.AddSpaceInNumber(source);
+      Assert.AreEqual(result, expected);
+    }
+
+    [TestMethod]
+    public void TestMethod_AddSpaceInNumber_value_10()
+    {
+      const long source = 10;
+      const string expected = "10";
+      string result = StringFunc.AddSpaceInNumber(source);
+      Assert.AreEqual(result, expected);
+    }
+
+    [TestMethod]
+    public void TestMethod_AddSpaceInNumber_value_100()
+    {
+      const long source = 100;
+      const string expected = "100";
+      string result = StringFunc.AddSpaceInNumber(source);
+      Assert.AreEqual(result, expected);
+    }
+
+    [TestMethod]
+    public void TestMethod_AddSpaceInNumber_value_1000()
+    {
+      const long source = 1000;
+      const string expected = "1 000";
+      string result = StringFunc.AddSpaceInNumber(source);
+      Assert.AreEqual(result, expected);
+    }
+
+    [TestMethod]
+    public void TestMethod_AddSpaceInNumber_value_10000()
+    {
+      const long source = 10000;
+      const string expected = "10 000";
+      string result = StringFunc.AddSpaceInNumber(source);
+      Assert.AreEqual(result, expected);
+    }
+
+    [TestMethod]
+    public void TestMethod_AddSpaceInNumber_value_100000()
+    {
+      const long source = 100000;
+      const string expected = "100 000";
+      string result = StringFunc.AddSpaceInNumber(source);
+      Assert.AreEqual(result, expected);
+    }
+
+    [TestMethod]
+    public void TestMethod_AddSpaceInNumber_value_1000000()
+    {
+      const long source = 1000000;
+      const string expected = "1 000 000";
+      string result = StringFunc.AddSpaceInNumber(source);
+      Assert.AreEqual(result, expected);
+    }
+
+    [TestMethod]
+    public void TestMethod_AddSpaceInNumber_value_10000000()
+    {
+      const long source = 10000000;
+      const string expected = "10 000 000";
+      string result = StringFunc.AddSpaceInNumber(source);
+      Assert.AreEqual(result, expected);
+    }
+
+    [TestMethod]
+    public void TestMethod_AddSpaceInNumber_value_100000000()
+    {
+      const long source = 100000000;
+      const string expected = "100 000 000";
+      string result = StringFunc.AddSpaceInNumber(source);
+      Assert.AreEqual(result, expected);
+    }
+
+    [TestMethod]
+    public void TestMethod_AddSpaceInNumber_value_1000000000()
+    {
+      const long source = 1000000000;
+      const string expected = "1 000 000 000";
+      string result = StringFunc.AddSpaceInNumber(source);
+      Assert.AreEqual(result, expected);
+    }
+
+    [TestMethod]
+    public void TestMethod_AddSpaceInNumber_value_10000000000()
+    {
+      const long source = 10000000000;
+      const string expected = "10 000 000 000";
+      string result = StringFunc.AddSpaceInNumber(source);
+      Assert.AreEqual(result, expected);
+    }
+
+    [TestMethod]
+    public void TestMethod_AddSpaceInNumber_value_100000000000()
+    {
+      const long source = 100000000000;
+      const string expected = "100 000 000 000";
+      string result = StringFunc.AddSpaceInNumber(source);
+      Assert.AreEqual(result, expected);
+    }
+
+    [TestMethod]
+    public void TestMethod_AddSpaceInNumber_value_1000000000000()
+    {
+      const long source = 1000000000000;
+      const string expected = "1 000 000 000 000";
+      string result = StringFunc.AddSpaceInNumber(source);
+      Assert.AreEqual(result, expected);
+    }
+    // lon.MaxValue = 9,223,372,036,854,775,807
     #endregion AddSpaceInNumber
     #region AddCommaInNumber
     //TODO write unit tests


fix os detection in some multirun logs

fix os detection in some multirun logs

--- CompatBot/EventHandlers/LogParsing/LogParser.LogSections.cs
+++ CompatBot/EventHandlers/LogParsing/LogParser.LogSections.cs
@@ -108,7 +108,7 @@
                     ["·F "] = new Regex(@"F \d+:\d+:\d+\.\d+ {.+?} (?<fatal_error>.*?(\:\W*\r?\n\(.*?)*)\r?$", DefaultOptions),
                 },
                 OnSectionEnd = MarkAsCompleteAndReset,
-                EndTrigger = "Objects cleared...",
+                EndTrigger = "All threads stopped...",
             }
         };


Renamed parameter

Renamed parameter

--- DynamicTypeWrapBuilder.cs
+++ DynamicTypeWrapBuilder.cs
@@ -169,11 +169,11 @@
             return type;
         }

-        static void ThrowNotSupportedException(ILGenerator setIL)
+        static void ThrowNotSupportedException(ILGenerator generator)
         {
             var caller = Info<NotSupportedException>.Extended.DefaultConstructor;
-            setIL.Emit(OpCodes.Newobj, caller.ConstructorInfo);
-            setIL.Emit(OpCodes.Throw);
+            generator.Emit(OpCodes.Newobj, caller.ConstructorInfo);
+            generator.Emit(OpCodes.Throw);
         }
     }
 }


Removed debugging information

Removed debugging information

--- DeveImageOptimizer/FileProcessing/FileOptimizerProcessor.cs
+++ DeveImageOptimizer/FileProcessing/FileOptimizerProcessor.cs
@@ -46,72 +46,51 @@
                 Console.WriteLine($"=== Optimizing image: {fileToOptimize} ===");

                 var fileName = Path.GetFileName(fileToOptimize);
-
-                Console.WriteLine($"1: Ultraverbose: {fileToOptimize}");
-
                 var tempFilePath = Path.Combine(_tempDirectory, RandomFileNameHelper.RandomizeFileName(fileName));
-                Console.WriteLine($"2: Ultraverbose: {fileToOptimize}");
                 tempFiles.Add(tempFilePath);
-                Console.WriteLine($"3: Ultraverbose: {fileToOptimize}");

                 await AsyncFileHelper.CopyFileAsync(fileToOptimize, tempFilePath, true);
-                Console.WriteLine($"4: Ultraverbose: {fileToOptimize}");

                 Orientation? jpegFileOrientation = null;
-                Console.WriteLine($"5: Ultraverbose: {fileToOptimize}");
                 bool shouldUseJpgWorkaround = FileTypeHelper.IsJpgFile(tempFilePath);
-                Console.WriteLine($"6: Ultraverbose: {fileToOptimize}");
                 if (shouldUseJpgWorkaround)
                 {
-                    Console.WriteLine($"7: Ultraverbose: {fileToOptimize}");
                     jpegFileOrientation = await ExifImageRotator.UnrotateImageAsync(tempFilePath);
-                    Console.WriteLine($"8: Ultraverbose: {fileToOptimize}");
                 }
-                Console.WriteLine($"9: Ultraverbose: {fileToOptimize}");
+
                 var processStartInfo = new ProcessStartInfo(_pathToFileOptimizer, $" {_fileOptimizerOptions} \"{tempFilePath}\"");
-                Console.WriteLine($"10: Ultraverbose: {fileToOptimize}");
+
                 if (!_shouldShowFileOptimizerWindow)
                 {
                     processStartInfo.WindowStyle = ProcessWindowStyle.Hidden;
                     processStartInfo.UseShellExecute = true;
                     processStartInfo.CreateNoWindow = false;
                 }
-                Console.WriteLine($"11: Ultraverbose: {fileToOptimize}");

                 var exitCode = await ProcessRunner.RunProcessAsync(processStartInfo);

-                Console.WriteLine($"12: Ultraverbose: {fileToOptimize}");
                 if (exitCode != 0)
                 {
                     errors.Add($"Error when running FileOptimizer, Exit code: {exitCode}");
                 }

-                Console.WriteLine($"13: Ultraverbose: {fileToOptimize}");
                 if (shouldUseJpgWorkaround)
                 {
-                    Console.WriteLine($"1: Ultraverbose: {fileToOptimize}");
                     await ExifImageRotator.RerotateImageAsync(tempFilePath, jpegFileOrientation);
-                    Console.WriteLine($"1: Ultraverbose: {fileToOptimize}");
                 }

-                Console.WriteLine($"14: Ultraverbose: {fileToOptimize}");
                 var imagesEqual = await ImageComparer.AreImagesEqualAsync(fileToOptimize, tempFilePath);

-                Console.WriteLine($"15: Ultraverbose: {fileToOptimize}");
                 if (!imagesEqual)
                 {
                     errors.Add("Optimized image isn't equal to source image.");
                 }
-
-                Console.WriteLine($"16: Ultraverbose: {fileToOptimize}");

                 var newSize = new FileInfo(tempFilePath).Length;
                 if (newSize > originalFileSize)
                 {
                     errors.Add($"Result image size is bigger then original. Original: {originalFileSize}, NewSize: {newSize}");
                 }
-
-                Console.WriteLine($"17: Ultraverbose: {fileToOptimize}");

                 if (errors.Count == 0 && newSize < originalFileSize)
                 {


fix wrong completed event name

fix wrong completed event name

--- ElectronNET.API/Screen.cs
+++ ElectronNET.API/Screen.cs
@@ -161,6 +161,6 @@
         /// </summary>
         /// <param name="rectangle"></param>
         /// <returns>The display that most closely intersects the provided bounds.</returns>
-        public Task<Display> GetDisplayMatchingAsync(Rectangle rectangle) => BridgeConnector.OnResult<Display>("screen-getDisplayMatching", "screen-getDisplayMatching", rectangle);
+        public Task<Display> GetDisplayMatchingAsync(Rectangle rectangle) => BridgeConnector.OnResult<Display>("screen-getDisplayMatching", "screen-getDisplayMatchingCompleted", rectangle);
     }
 }


Update HomeController.cs

Update HomeController.cs

Adding reference to  using Microsoft.Azure; as it is not compiling without it.

--- WebApp-Storage-DotNet/Controllers/HomeController.cs
+++ WebApp-Storage-DotNet/Controllers/HomeController.cs
@@ -22,6 +22,7 @@
     using Microsoft.WindowsAzure;
     using Microsoft.WindowsAzure.Storage;
     using Microsoft.WindowsAzure.Storage.Blob;
+    using Microsoft.Azure;

     /// <summary>
     /// Azure Blob Storage Photo Gallery - Demonstrates how to use the Blob Storage service.
@@ -186,4 +187,4 @@
             return string.Format("{0:10}_{1}{2}", DateTime.Now.Ticks, Guid.NewGuid(), ext);
         }
     }
-}+}


DynamicExpression review

DynamicExpression review

--- Framework.Core/System/Linq/Expressions/DynamicExpression.cs
+++ Framework.Core/System/Linq/Expressions/DynamicExpression.cs
@@ -171,13 +171,6 @@
             throw ContractUtils.Unreachable;
         }

-        /// <summary>
-        /// Makes a copy of this node replacing the args with the provided values.  The
-        /// number of the args needs to match the number of the current block.
-        ///
-        /// This helper is provided to allow re-writing of nodes to not depend on the specific optimized
-        /// subclass of DynamicExpression which is being used.
-        /// </summary>
         internal virtual DynamicExpression Rewrite(Expression[] args)
         {
             throw ContractUtils.Unreachable;
@@ -188,9 +181,6 @@
             throw ContractUtils.Unreachable;
         }

-        /// <summary>
-        /// Dispatches to the specific visit method for this node type.
-        /// </summary>
         protected internal override Expression Accept(ExpressionVisitor visitor)
         {
             if (visitor is DynamicExpressionVisitor dynVisitor)
@@ -500,7 +490,7 @@

         internal override bool SameArguments(ICollection<Expression> arguments)
         {
-            if (arguments != null && arguments.Count == 1)
+            if (arguments?.Count == 1)
             {
                 using (var en = arguments.GetEnumerator())
                 {
@@ -552,7 +542,7 @@

         internal override bool SameArguments(ICollection<Expression> arguments)
         {
-            if (arguments != null && arguments.Count == 2)
+            if (arguments?.Count == 2)
             {
                 if (_arg0 is Expression[] alreadyArray)
                 {
@@ -615,7 +605,7 @@

         internal override bool SameArguments(ICollection<Expression> arguments)
         {
-            if (arguments != null && arguments.Count == 3)
+            if (arguments?.Count == 3)
             {
                 if (_arg0 is Expression[] alreadyArray)
                 {
@@ -684,7 +674,7 @@

         internal override bool SameArguments(ICollection<Expression> arguments)
         {
-            if (arguments != null && arguments.Count == 4)
+            if (arguments?.Count == 4)
             {
                 if (_arg0 is Expression[] alreadyArray)
                 {
@@ -1066,6 +1056,8 @@

                 case 4:
                     return MakeDynamic(delegateType, binder, argumentList[0], argumentList[1], argumentList[2], argumentList[3]);
+                default:
+                    break;
             }

             ContractUtils.RequiresNotNull(delegateType, nameof(delegateType));


解决分支第一个子元件就是管子的问题

解决分支第一个子元件就是管子的问题

--- ExportModel/ExportData.cs
+++ ExportModel/ExportData.cs
@@ -155,33 +155,28 @@
 		{
 			double ltLength = tubeEle.GetDouble(DbAttributeInstance.ITLE);
 			double lbore = tubeEle.GetDoubleArray(DbAttributeInstance.PARA)[1];
+			Direction dir = null;

 			DbElement prevEle = tubeEle.Previous;
-			int leave = 1;
 			if (prevEle == null || !prevEle.IsValid)
 			{
-				prevEle = tubeEle.Next();
-				leave = prevEle.GetInteger(DbAttributeInstance.ARRI);
+				DbElement branchEle = tubeEle.Owner;
+				dir = branchEle.GetDirection(DbAttributeInstance.HDIR);
 			}
 			else
-				leave = prevEle.GetInteger(DbAttributeInstance.LEAV);
-			AxisDir ptax = EvalDirection.Eval(prevEle, "P" + leave);
-
-			Aveva.Pdms.Geometry.Orientation ori = prevEle.GetOrientation(DbAttributeInstance.ORI);
-			Direction dir = ori.AbsoluteDirection(ptax.Dir);
-			//Position pos = Position.Create();
-			//double dist = ptax.Pos.Distance(pos);
-			//if (dist > 0.00001)
-			//{
-			//	pos.MoveBy(ori.AbsoluteDirection(Direction.Create(ptax.Pos)), dist);
-			//}
+			{
+				int leave = prevEle.GetInteger(DbAttributeInstance.LEAV);
+				AxisDir ptax = EvalDirection.Eval(prevEle, "P" + leave);
+
+				Aveva.Pdms.Geometry.Orientation ori = prevEle.GetOrientation(DbAttributeInstance.ORI);
+				dir = ori.AbsoluteDirection(ptax.Dir);
+			}

 			Position pos = tubeEle.GetPosition(DbAttributeInstance.ITPS);
 			pos.MoveBy(dir, -ltLength / 2);

 			Cylinder cyl = new Cylinder();
 			cyl.Org = new Point(pos);
-				//.MoveBy(prevEle.GetPosition(DbAttributeInstance.POS));
 			cyl.Height = new Point(dir).Mul(ltLength);
 			cyl.Radius = lbore / 2.0;
 			session.Save(cyl);


nullity equals

nullity equals

--- MasDev.Common/MasDev.Common.Portable/Source/Utils/Assert.cs
+++ MasDev.Common/MasDev.Common.Portable/Source/Utils/Assert.cs
@@ -89,6 +89,24 @@

 	public static class Check
 	{
+		public static bool NullityEquals<T> (T o1, T o2)
+		{
+			EnsureIsNullable<T> ();
+			if (BothNull (o1, o2))
+				return false;
+
+			return BothNotNull (o1, o2);
+		}
+
+		public static bool LeftNullityEquals<T> (T o1, T o2)
+		{
+			EnsureIsNullable<T> ();
+			if (o1 != null)
+				return true;
+
+			return o2 == null;
+		}
+
 		public static bool IsNull<T> (T what) where T : class
 		{
 			return what == null;
@@ -195,6 +213,19 @@

 			return true;
 		}
+
+		private static void EnsureIsNullable<T> ()
+		{
+			var type = typeof(T);
+
+			if (Nullable.GetUnderlyingType (type) != null)
+				return;
+
+			if (type.IsByRef)
+				return;
+
+			throw new InvalidOperationException ("Type is not nullable or reference type.");
+		}
 	}
 }


Seek based on TotalMilliseconds, not ms component.

--- MediaManager/Platforms/Android/Player/AndroidMediaPlayer.cs
+++ MediaManager/Platforms/Android/Player/AndroidMediaPlayer.cs
@@ -280,7 +280,7 @@

         public Task SeekTo(TimeSpan position)
         {
-            Player.SeekTo(position.Milliseconds);
+            Player.SeekTo((long)position.TotalMilliseconds);
             return Task.CompletedTask;
         }


fix comment

fix comment

--- punku/Extensions/CharExtensions.cs
+++ punku/Extensions/CharExtensions.cs
@@ -4,7 +4,7 @@
 public static class CharExtensions
 {
 	/**
-	 * Returns a 4-letter long hex value representation of char (UTF-16)
+	 * Returns a 4-letter long hex value representation of a UTF-16 code unit
 	 */
 	public static string ToHexString (this char c)
 	{


Added Path properties

Added Path properties

--- Core2D/Editor/DesignerContext.cs
+++ Core2D/Editor/DesignerContext.cs
@@ -151,6 +151,56 @@
         /// The design time <see cref="Core2D.XText"/>.
         /// </summary>
         public static XText Text { get; set; }
+
+        /// <summary>
+        /// The design time <see cref="Core2D.XArcSegment"/>.
+        /// </summary>
+        public static XArcSegment ArcSegment { get; set; }
+
+        /// <summary>
+        /// The design time <see cref="Core2D.XBezierSegment"/>.
+        /// </summary>
+        public static XBezierSegment BezierSegment { get; set; }
+
+        /// <summary>
+        /// The design time <see cref="Core2D.XLineSegment"/>.
+        /// </summary>
+        public static XLineSegment LineSegment { get; set; }
+
+        /// <summary>
+        /// The design time <see cref="Core2D.XPathFigure"/>.
+        /// </summary>
+        public static XPathFigure PathFigure { get; set; }
+
+        /// <summary>
+        /// The design time <see cref="Core2D.XPathGeometry"/>.
+        /// </summary>
+        public static XPathGeometry PathGeometry { get; set; }
+
+        /// <summary>
+        /// The design time <see cref="Core2D.XPathSize"/>.
+        /// </summary>
+        public static XPathSize PathSize { get; set; }
+
+        /// <summary>
+        /// The design time <see cref="Core2D.XPolyBezierSegment"/>.
+        /// </summary>
+        public static XPolyBezierSegment PolyBezierSegment { get; set; }
+
+        /// <summary>
+        /// The design time <see cref="Core2D.XPolyLineSegment"/>.
+        /// </summary>
+        public static XPolyLineSegment PolyLineSegment { get; set; }
+
+        /// <summary>
+        /// The design time <see cref="Core2D.XPolyQuadraticBezierSegment"/>.
+        /// </summary>
+        public static XPolyQuadraticBezierSegment PolyQuadraticBezierSegment { get; set; }
+
+        /// <summary>
+        /// The design time <see cref="Core2D.XQuadraticBezierSegment"/>.
+        /// </summary>
+        public static XQuadraticBezierSegment QuadraticBezierSegment { get; set; }

         /// <summary>
         /// Initialize platform commands used by <see cref="EditorContext"/>.
@@ -393,7 +443,16 @@

             // Path

-            // TODO:
+            ArcSegment = XArcSegment.Create(XPoint.Create(), XPathSize.Create(), 180, true, XSweepDirection.Clockwise, true, true);
+            BezierSegment = XBezierSegment.Create(XPoint.Create(), XPoint.Create(), XPoint.Create(), true, true);
+            LineSegment = XLineSegment.Create(XPoint.Create(), true, true);
+            PathFigure = XPathFigure.Create(XPoint.Create(), ImmutableArray.Create<XPathSegment>(), false, true);
+            PathGeometry = XPathGeometry.Create(ImmutableArray.Create<XPathFigure>(), XFillRule.EvenOdd);
+            PathSize = XPathSize.Create();
+            PolyBezierSegment = XPolyBezierSegment.Create(ImmutableArray.Create<XPoint>(), true, true);
+            PolyLineSegment = XPolyLineSegment.Create(ImmutableArray.Create<XPoint>(), true, true);
+            PolyQuadraticBezierSegment = XPolyQuadraticBezierSegment.Create(ImmutableArray.Create<XPoint>(), true, true);
+            QuadraticBezierSegment = XQuadraticBezierSegment.Create(XPoint.Create(), XPoint.Create(), true, true);
         }
     }
 }


Converted all public fields into public properties

--- DDay.iCal/DataTypes/Recur/DaySpecifier.cs
+++ DDay.iCal/DataTypes/Recur/DaySpecifier.cs
@@ -12,10 +12,26 @@
     {
         public class DaySpecifier : iCalDataType, IComparable
         {
-            #region Public Fields
-
-            public int Num;
-            public DayOfWeek DayOfWeek;
+            #region Private Fields
+
+            private int m_Num;
+            private DayOfWeek m_DayOfWeek;
+
+            #endregion
+
+            #region Public Properties
+
+            public int Num
+            {
+                get { return m_Num; }
+                set { m_Num = value; }
+            }
+
+            public DayOfWeek DayOfWeek
+            {
+                get { return m_DayOfWeek; }
+                set { m_DayOfWeek = value; }
+            }

             #endregion


Values to long

Values to long

--- DDsControlCollection/SimpleProgressBar.cs
+++ DDsControlCollection/SimpleProgressBar.cs
@@ -204,9 +204,9 @@
             }
         }

-        int _maximum;
+        long _maximum;
         [DefaultValue(100)]
-        public int Maximum
+        public long Maximum
         {
             get { return _maximum; }
             set
@@ -220,9 +220,9 @@
             }
         }

-        int _minimum;
+        long _minimum;
         [DefaultValue(0)]
-        public int Minimum
+        public long Minimum
         {
             get { return _minimum; }
             set
@@ -236,9 +236,9 @@
             }
         }

-        int _value;
+        long _value;
         [DefaultValue(0)]
-        public int Value
+        public long Value
         {
             get { return _value; }
             set
@@ -387,53 +387,54 @@

         protected override void OnPaint(PaintEventArgs e)
         {
-            switch (_style)
-            {
-                case ProgressBarStyle.Blocks:
-                    {
-                        //TODO: ProgressBarStyle.Blocks rendering
-                    }
-                    break;
-                case ProgressBarStyle.Continuous:
-                    {
-                        switch (_orientation)
-                        {
-                            case Orientation.Horizontal:
-                                {
-                                    if (_invertOrientation)
-                                        e.Graphics.FillRectangle(_foreColorBrush,
-                                            (Width - ((_value * Width) / _maximum)) + Padding.Left, Padding.Top,
-                                            ((_value * Width) / _maximum) - Padding.Horizontal, Height - Padding.Vertical);
-                                    else
-                                        e.Graphics.FillRectangle(_foreColorBrush,
-                                            Padding.Left, Padding.Top,
-                                            ((_value * Width) / _maximum) - Padding.Horizontal, Height - Padding.Vertical);
-                                }
-                                break;
-
-                            case Orientation.Vertical:
-                                {
-                                    if (_invertOrientation)
-                                        e.Graphics.FillRectangle(_foreColorBrush,
-                                            Padding.Left, Padding.Top,
-                                            Width - Padding.Horizontal, ((_value * Height) / _maximum) - Padding.Vertical);
-                                    else
-                                        e.Graphics.FillRectangle(_foreColorBrush,
-                                            Padding.Left, (Height - ((_value * Height) / _maximum)) + Padding.Top,
-                                            Width - Padding.Horizontal, ((_value * Height) / _maximum) - Padding.Vertical);
-                                }
-                                break;
-                        }
-                    }
-                    break;
-                case ProgressBarStyle.Marquee:
-                    {
-                        e.Graphics.FillRectangle(_foreColorBrush,
-                            _marqueePosition, Padding.Top,
-                            MarqueeWidth, Height - Padding.Vertical);
-                    }
-                    break;
-            }
+            if (_value > 0)
+                switch (_style)
+                {
+                    case ProgressBarStyle.Blocks:
+                        {
+                            //TODO: ProgressBarStyle.Blocks rendering
+                        }
+                        break;
+                    case ProgressBarStyle.Continuous:
+                        {
+                            switch (_orientation)
+                            {
+                                case Orientation.Horizontal:
+                                    {
+                                        if (_invertOrientation)
+                                            e.Graphics.FillRectangle(_foreColorBrush,
+                                                (Width - ((_value * Width) / _maximum)) + Padding.Left, Padding.Top,
+                                                ((_value * Width) / _maximum) - Padding.Horizontal, Height - Padding.Vertical);
+                                        else
+                                            e.Graphics.FillRectangle(_foreColorBrush,
+                                                Padding.Left, Padding.Top,
+                                                ((_value * Width) / _maximum) - Padding.Horizontal, Height - Padding.Vertical);
+                                    }
+                                    break;
+
+                                case Orientation.Vertical:
+                                    {
+                                        if (_invertOrientation)
+                                            e.Graphics.FillRectangle(_foreColorBrush,
+                                                Padding.Left, Padding.Top,
+                                                Width - Padding.Horizontal, ((_value * Height) / _maximum) - Padding.Vertical);
+                                        else
+                                            e.Graphics.FillRectangle(_foreColorBrush,
+                                                Padding.Left, (Height - ((_value * Height) / _maximum)) + Padding.Top,
+                                                Width - Padding.Horizontal, ((_value * Height) / _maximum) - Padding.Vertical);
+                                    }
+                                    break;
+                            }
+                        }
+                        break;
+                    case ProgressBarStyle.Marquee:
+                        {
+                            e.Graphics.FillRectangle(_foreColorBrush,
+                                _marqueePosition, Padding.Top,
+                                MarqueeWidth, Height - Padding.Vertical);
+                        }
+                        break;
+                }

             if (_textStyle != ProgressBarTextStyle.None)
             {


Purged unused function.

Purged unused function.

--- Demos/Demos/ContactEventsDemo.cs
+++ Demos/Demos/ContactEventsDemo.cs
@@ -346,16 +346,6 @@
             collision.ContactCount = manifold.Count;
             collision.Fresh = true;
             collision.WasTouching = isTouching;
-        }
-
-        bool IsTouching<TManifold>(ref TManifold manifold) where TManifold : unmanaged, IContactManifold<TManifold>
-        {
-            for (int i = 0; i < manifold.Count; ++i)
-            {
-                if (manifold.GetDepth(ref manifold, i) >= 0)
-                    return true;
-            }
-            return false;
         }

         void HandleManifoldForCollidable<TManifold>(int workerIndex, CollidableReference source, CollidableReference other, CollidablePair pair, ref TManifold manifold) where TManifold : unmanaged, IContactManifold<TManifold>


Fix missing immediate type identifiers

Fix missing immediate type identifiers

--- mareep/performer.cotton.cs
+++ mareep/performer.cotton.cs
@@ -425,7 +425,7 @@
 				return BmsWordType.VariableName;
 			}

-			if (Regex.IsMatch(word, @"^-?\$?[0-9]+[bBsShH]?$")) {
+			if (Regex.IsMatch(word, @"^-?\$?[0-9]+[bBsShHqQwW]?$")) {
 				return BmsWordType.Immediate;
 			}


[Modify] Edit it

[Modify] Edit it

--- websocket-sharp/Server/HttpServer.cs
+++ websocket-sharp/Server/HttpServer.cs
@@ -1579,23 +1579,19 @@
     /// <summary>
     /// Stops receiving incoming requests and closes each connection.
     /// </summary>
-    /// <remarks>
-    /// This method does nothing if the server is not started,
-    /// it is shutting down, or it has already stopped.
-    /// </remarks>
     /// <param name="code">
     ///   <para>
     ///   One of the <see cref="CloseStatusCode"/> enum values.
     ///   </para>
     ///   <para>
-    ///   It represents the status code indicating the reason for
-    ///   the WebSocket connection close.
+    ///   It represents the status code indicating the reason for the WebSocket
+    ///   connection close.
     ///   </para>
     /// </param>
     /// <param name="reason">
     ///   <para>
-    ///   A <see cref="string"/> that represents the reason for
-    ///   the WebSocket connection close.
+    ///   A <see cref="string"/> that represents the reason for the WebSocket
+    ///   connection close.
     ///   </para>
     ///   <para>
     ///   The size must be 123 bytes or less in UTF-8.
@@ -1614,8 +1610,7 @@
     ///   </para>
     ///   <para>
     ///   <paramref name="code"/> is
-    ///   <see cref="CloseStatusCode.NoStatus"/> and
-    ///   there is <paramref name="reason"/>.
+    ///   <see cref="CloseStatusCode.NoStatus"/> and there is reason.
     ///   </para>
     ///   <para>
     ///   -or-


Added GetCurrentDisplayDevice() - Get's the currently attached display and what their DevModes

--- DisplayChanger/DisplayDevices.cs
+++ DisplayChanger/DisplayDevices.cs
@@ -87,6 +87,21 @@
             }
         }

+        public Dictionary<DisplayDevice, DevMode> GetCurrentDisplayDevices()
+        {
+            Dictionary<DisplayDevice, DevMode> currentDisplayAndSettings = new Dictionary<DisplayDevice, DevMode>();
+
+            if(displayAndSettings != null)
+            {
+                //first entry in each Display Device is current settings
+                foreach(var key in displayAndSettings.Keys)
+                {
+                    currentDisplayAndSettings.Add(key, displayAndSettings[key][0]);
+                }
+            }
+            return currentDisplayAndSettings;
+        }
+
         //Get's list of DisplayDevices that are able to set a screen resolution
         public Dictionary<DisplayDevice, List<DevMode>> GetActiveDisplayDevices()
         {


[Modify] Edit it

[Modify] Edit it

--- websocket-sharp/Server/HttpServer.cs
+++ websocket-sharp/Server/HttpServer.cs
@@ -353,11 +353,20 @@

     /// <summary>
     /// Gets or sets a value indicating whether the server cleans up
-    /// the inactive sessions in the WebSocket services periodically.
-    /// </summary>
+    /// the inactive sessions periodically.
+    /// </summary>
+    /// <remarks>
+    /// The set operation does nothing if the server has already
+    /// started or it is shutting down.
+    /// </remarks>
     /// <value>
-    /// <c>true</c> if the server cleans up the inactive sessions every 60 seconds;
-    /// otherwise, <c>false</c>. The default value is <c>true</c>.
+    ///   <para>
+    ///   <c>true</c> if the server cleans up the inactive sessions
+    ///   every 60 seconds; otherwise, <c>false</c>.
+    ///   </para>
+    ///   <para>
+    ///   The default value is <c>true</c>.
+    ///   </para>
     /// </value>
     public bool KeepClean {
       get {


[Modify] Polish it

[Modify] Polish it

--- websocket-sharp/Server/HttpServer.cs
+++ websocket-sharp/Server/HttpServer.cs
@@ -753,8 +753,9 @@
     private void receiveRequest ()
     {
       while (true) {
+        HttpListenerContext ctx = null;
         try {
-          var ctx = _listener.GetContext ();
+          ctx = _listener.GetContext ();
           ThreadPool.QueueUserWorkItem (
             state => {
               try {
@@ -766,22 +767,37 @@
                 processRequest (ctx);
               }
               catch (Exception ex) {
-                _log.Fatal (ex.ToString ());
+                _log.Fatal (ex.Message);
+                _log.Debug (ex.ToString ());
+
                 ctx.Connection.Close (true);
               }
-            });
+            }
+          );
         }
         catch (HttpListenerException ex) {
-          _log.Warn ("Receiving has been stopped.\n  reason: " + ex.Message);
+          if (_state == ServerState.ShuttingDown) {
+            _log.Info ("The receiving is stopped.");
+            break;
+          }
+
+          _log.Fatal (ex.Message);
+          _log.Debug (ex.ToString ());
+
           break;
         }
         catch (Exception ex) {
-          _log.Fatal (ex.ToString ());
+          _log.Fatal (ex.Message);
+          _log.Debug (ex.ToString ());
+
+          if (ctx != null)
+            ctx.Connection.Close (true);
+
           break;
         }
       }

-      if (IsListening)
+      if (_state != ServerState.ShuttingDown)
         abort ();
     }


[Modify] Polish it

[Modify] Polish it

--- websocket-sharp/Server/HttpServer.cs
+++ websocket-sharp/Server/HttpServer.cs
@@ -276,13 +276,15 @@
         throw new ArgumentNullException ("address");

       if (!address.IsLocal ())
-        throw new ArgumentException ("Not a local IP address: " + address, "address");
-
-      if (!port.IsPortNumber ())
-        throw new ArgumentOutOfRangeException (
-          "port", "Not between 1 and 65535 inclusive: " + port);
-
-      init (null, address, port, secure);
+        throw new ArgumentException ("Not a local IP address.", "address");
+
+      if (!port.IsPortNumber ()) {
+        var msg = "Less than 1 or greater than 65535.";
+        throw new ArgumentOutOfRangeException ("port", msg);
+      }
+
+      var host = convertToString (address);
+      init (host, address, port, secure);
     }

     #endregion


TcpClientBase: fixed Connected property

TcpClientBase: fixed Connected property

--- x2/Links/SocketLink/TcpClientBase.cs
+++ x2/Links/SocketLink/TcpClientBase.cs
@@ -34,7 +34,7 @@
         public bool AutoReconnect { get; set; }
         public int ReconnectDelay { get; set; }  // in millisec

-        public bool Connected { get { return (session != null); } }
+        public bool Connected { get { return (socket != null && socket.Connected); } }

         public SocketLinkSession Session {
             get { return session; }


added MatingSpeedMultiplier to import/export settings

--- ARKBreedingStats/settings/Settings.cs
+++ ARKBreedingStats/settings/Settings.cs
@@ -511,6 +511,7 @@
             // breeding
             ParseAndSetValue(nudMatingInterval, @"MatingIntervalMultiplier ?= ?(\d*\.?\d+)");
             ParseAndSetValue(nudEggHatchSpeed, @"EggHatchSpeedMultiplier ?= ?(\d*\.?\d+)");
+            ParseAndSetValue(nudMatingSpeed, @"MatingSpeedMultiplier ?= ?(\d*\.?\d+)");
             ParseAndSetValue(nudBabyMatureSpeed, @"BabyMatureSpeedMultiplier ?= ?(\d*\.?\d+)");
             ParseAndSetValue(nudBabyImprintingStatScale, @"BabyImprintingStatScaleMultiplier ?= ?(\d*\.?\d+)");
             ParseAndSetValue(nudBabyCuddleInterval, @"BabyCuddleIntervalMultiplier ?= ?(\d*\.?\d+)");
@@ -784,6 +785,7 @@
             // breeding multipliers
             sb.AppendLine($"MatingIntervalMultiplier = {nudMatingInterval.Value.ToString(cultureForStrings)}");
             sb.AppendLine($"EggHatchSpeedMultiplier = {nudEggHatchSpeed.Value.ToString(cultureForStrings)}");
+            sb.AppendLine($"MatingSpeedMultiplier = {nudMatingSpeed.Value.ToString(cultureForStrings)}");
             sb.AppendLine($"BabyMatureSpeedMultiplier = {nudBabyMatureSpeed.Value.ToString(cultureForStrings)}");
             sb.AppendLine($"BabyImprintingStatScaleMultiplier = {nudBabyImprintingStatScale.Value.ToString(cultureForStrings)}");
             sb.AppendLine($"BabyCuddleIntervalMultiplier = {nudBabyCuddleInterval.Value.ToString(cultureForStrings)}");


restart landing program

restart landing program

--- Aiv.Research.Tests.Landing/Program.cs
+++ Aiv.Research.Tests.Landing/Program.cs
@@ -20,14 +20,19 @@
         private static Recorder     m_hRecorder;
         private static int          m_iCounter;

+        static void InitLander()
+        {
+            m_hLander = new LanderHuman(m_hSite);
+            m_hRecorder = new Recorder(m_hLander);
+        }
+

         static void Main(string[] args)
         {
             m_hWnd      = new Window(800, 600, "Lander");
             m_hGround   = new Ground();
             m_hSite     = new LandingSite(m_hGround.GroundLevel);
-            m_hLander   = new LanderHuman(m_hSite);
-            m_hRecorder = new Recorder(m_hLander);
+            InitLander();

             while (m_hWnd.IsOpened)
@@ -46,6 +51,11 @@
                         m_hRecorder.Stop();
                         Console.WriteLine("Recorder Stopped");
                     }
+                }
+
+                if (Input.IsKeyDown(KeyCode.Q))
+                {
+                    InitLander();
                 }

                 m_hGround.Update();


Added test to omit invalid medium decl altogether

--- AngleSharp.Core.Tests/Css/CssSheet.cs
+++ AngleSharp.Core.Tests/Css/CssSheet.cs
@@ -1,10 +1,13 @@
 using AngleSharp;
 using AngleSharp.Css;
 using AngleSharp.Dom.Css;
+using AngleSharp.Network.Default;
 using AngleSharp.Parser.Css;
 using NUnit.Framework;
 using System;
 using System.IO;
+using System.Threading;
+using System.Threading.Tasks;

 namespace AngleSharp.Core.Tests
 {
@@ -871,5 +874,18 @@
             Assert.AreEqual("p", style.Selector.Text);
             Assert.AreEqual(1, style.Style.Length);
         }
+
+        [Test]
+        public void CssParseMediaRuleWithInvalidMediumEntities()
+        {
+            var src = "@media only screen and (min--moz-device-pixel-ratio:1.5),only screen and (-o-min-device-pixel-ratio:3/2),only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (min-device-pixel-ratio:1.5){.favicon{background-image:url('../img/favicons-sprite32.png?v=1b9547cf9cee3350a5b4875951e3e552');background-size:16px 5634px}}";
+            var sheet = ParseStyleSheet(src);
+            Assert.AreEqual(1, sheet.Rules.Length);
+            var media = sheet.Rules[0] as ICssMediaRule;
+            Assert.IsNotNull(media);
+            Assert.AreEqual(1, media.Media.Length);
+            Assert.AreEqual(1, media.Rules.Length);
+            Assert.AreEqual("only screen and (min-device-pixel-ratio:1.5)", media.ConditionText);
+        }
     }
 }


(WidgetXP3): better remember last used scheme.

--- ArcFormats/KiriKiri/WidgetXP3.xaml.cs
+++ ArcFormats/KiriKiri/WidgetXP3.xaml.cs
@@ -15,11 +15,14 @@
     {
         public WidgetXP3 ()
         {
+            var last_selected = Properties.Settings.Default.XP3Scheme;
             InitializeComponent();
             var keys = new[] { new KeyValuePair<string, ICrypt> (arcStrings.ArcNoEncryption, Xp3Opener.NoCryptAlgorithm) };
             this.DataContext = keys.Concat (Xp3Opener.KnownSchemes.OrderBy (x => x.Key));
             this.Loaded += (s, e) => {
-                if (-1 == this.Scheme.SelectedIndex)
+                if (!string.IsNullOrEmpty (last_selected))
+                    this.Scheme.SelectedValue = last_selected;
+                else
                     this.Scheme.SelectedIndex = 0;
             };
         }


assembly version update.

assembly version update.

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


Bump to 2.4.1

Bump to 2.4.1

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


Fix update

Fix update

--- Articles.Entities/NineMonthArticle.cs
+++ Articles.Entities/NineMonthArticle.cs
@@ -1,32 +1,34 @@
-using System;
-using System.Collections.Generic;
-using System.ComponentModel.DataAnnotations;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace MomWorld.Entities
-{
-    public class NineMonthArticle
-    {
-        [Key]
-        [MaxLength(128)]
-        public string Id { get; set; }
-
-        [Required]
-        public int Date { get; set; }
-
-        [Required]
-        public string Content { get; set; }
-
-        public string Description { get; set; }
-
-        #region Constructor
-        public NineMonthArticle()
-        {
-            Id = Guid.NewGuid().ToString();
-        }
-
-        #endregion
-    }
-}
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace MomWorld.Entities
+{
+    public class NineMonthArticle
+    {
+        [Key]
+        [MaxLength(128)]
+        public string Id { get; set; }
+
+        [Required]
+        public int Date { get; set; }
+
+        [Required]
+        public string Content { get; set; }
+
+        public string Description { get; set; }
+
+        public string Tags { get; set; }
+
+        #region Constructor
+        public NineMonthArticle()
+        {
+            Id = Guid.NewGuid().ToString();
+        }
+
+        #endregion
+    }
+}


Fixed bug where disabled buttons were too dark upon reset and disabling

--- Assets/Resources/Scripts/BoardSpot.cs
+++ Assets/Resources/Scripts/BoardSpot.cs
@@ -23,10 +23,10 @@
     {
         Clicked = false;
         GetComponent<Image>().sprite = Resources.Load<Sprite>("Sprites/empty");
-        GetComponent<Image>().color = Color.white;
+        GetComponent<Image>().color = Game.enabledColor;

         ColorBlock cb = GetComponent<Button>().colors;
-        cb.disabledColor = Color.gray;
+        cb.disabledColor = Game.enabledColor;
         GetComponent<Button>().colors = cb;
     }
 }


TODO coment added in CreateNewSave

TODO coment added in CreateNewSave

--- Assets/Scripts/Utils/CreateNewSave.cs
+++ Assets/Scripts/Utils/CreateNewSave.cs
@@ -12,6 +12,8 @@
         SaveData data = FileSaveLoad.Load();
         List<ShipConfig> ships = GlobalData.instance.gameData.ships;

+        //TODO upgrades init
+
         data.selectedWeapons = new List<int>();
         data.selectedWeapons.Add(0);


DNN-5467 Error when trying to open the module settings after upgrading to dnn 7.3.0

--- Website/DesktopModules/Admin/Security/Roles.ascx.cs
+++ Website/DesktopModules/Admin/Security/Roles.ascx.cs
@@ -134,7 +134,7 @@

             var ctlEntry = new ListController();
             ListEntryInfo entry = ctlEntry.GetListEntryInfo("Frequency", frequency);
-            return entry.Text;
+            return entry != null ? entry.Text : frequency;
         }

         #endregion


* Quick fix. Re-enabled some code which registers the Terrain Module's Commander with the scene (whoops).

--- OpenSim/Region/Environment/Modules/Terrain/TerrainModule.cs
+++ OpenSim/Region/Environment/Modules/Terrain/TerrainModule.cs
@@ -297,7 +297,7 @@
             m_commander.RegisterCommand("newbrushes", experimentalBrushesCommand);

             // Add this to our scene so scripts can call these functions
-            //TMPm_scene.RegisterModuleCommander("Terrain", m_commander);
+            m_scene.RegisterModuleCommander("Terrain", m_commander);
         }

         #endregion


Refactor GeneratorFactory.Random

Refactor GeneratorFactory.Random

Former-commit-id: 4dddfccd1b8f47fbb1aa9b449de30d3098530679

--- GeneratorAPI/Generator.cs
+++ GeneratorAPI/Generator.cs
@@ -242,11 +242,16 @@
     /// </summary>
     public class GeneratorFactory {
         /// <summary>
-        ///     A Generator using System.Random as provider.
-        /// </summary>
-        public IGenerator<Random> Random(Random random) {
-            return Generator.Create(random);
-        }
+        ///     A Generator using System.Random with the arguments supplied.
+        /// </summary>
+        public IGenerator<int> Randomizer(int min = 0, int max = int.MaxValue, int? seed = null) {
+            return Generator.Create(seed == null
+                    ? new Random()
+                    : new Random(seed.Value)
+                )
+                .Select(rnd => rnd.Next(min, max));
+        }
+

         /// <summary>
         ///     A Guid Generator
@@ -255,4 +260,4 @@
             return Generator.Function(System.Guid.NewGuid);
         }
     }
-}
+}


Fix the above

Fix the above

--- OpenSim/Services/Connectors/Simulation/EstateDataService.cs
+++ OpenSim/Services/Connectors/Simulation/EstateDataService.cs
@@ -60,9 +60,8 @@
             if (dbConfig != null)
             {
                 dllName = dbConfig.GetString("StorageProvider", String.Empty);
-                connString = dbConfig.GetString("EstateConnectionString", String.Empty);
-                if (String.IsNullOrEmpty(connString))
-                    connString = dbConfig.GetString("ConnectionString", String.Empty);
+                connString = dbConfig.GetString("ConnectionString", String.Empty);
+                connString = dbConfig.GetString("EstateConnectionString", connString);
             }

             // Try reading the [EstateDataStore] section, if it exists
@@ -70,7 +69,7 @@
             if (estConfig != null)
             {
                 dllName = estConfig.GetString("StorageProvider", dllName);
-                connString = dbConfig.GetString("ConnectionString", connString);
+                connString = estConfig.GetString("ConnectionString", connString);
             }

             // We tried, but this doesn't exist. We can't proceed


Update CommandLine.cs

Update CommandLine.cs

Spelling error

--- GitCleanup/CommandLine.cs
+++ GitCleanup/CommandLine.cs
@@ -30,7 +30,7 @@
             parser.Setup(x => x.MaxDaysSinceOrphan)
                   .As('o', "Orphan")
                   .SetDefault(30 * 6)
-                  .WithDescription("Maximum days since orphan (has incomplete development). 180 days by default.");
+                  .WithDescription("Maximum days since orphaned (has incomplete development). 180 days by default.");

             parser.Setup(x => x.AuthType)
                   .As('a', "AuthType")
@@ -60,7 +60,7 @@
             parser.Setup(x => x.ExclusionMasks)
                   .As('e', "Mask")
                   .SetDefault(null)
-                  .WithDescription("Set of regular expression to mark branches for exclusion from processing.");
+                  .WithDescription("Set of regular expressions to mark branches for exclusion from processing.");

             return parser;
         }
@@ -75,4 +75,4 @@
             }
         }
     }
-}+}


FileParser now trims string chunks

FileParser now trims string chunks

--- Graph/Graph/FileParser.cs
+++ Graph/Graph/FileParser.cs
@@ -16,11 +16,17 @@

             foreach(string line in content)
             {
-                string[] subs = line.Split(' ');
+                string[] subs = line.Split(new char[] { ' ', '\t' }, StringSplitOptions.RemoveEmptyEntries);

                 if(subs.Length <= 1)
                     continue;
-
+
+                // Remove whitespaces
+                for (int i = 0; i < subs.Length-1; i++)
+                {
+                    subs[i] = subs[i]?.Trim();
+                }
+
                 if(subs[0] == "knoten")
                 {
                     string name = subs[1];


fix for 0 span ranges (quantitative where min and max are equal)

--- PanoramicDataWin8/model/data/common/QuantitativeBinRange.cs
+++ PanoramicDataWin8/model/data/common/QuantitativeBinRange.cs
@@ -110,6 +110,11 @@

         private double[] getExtent(double dataMin, double dataMax, double m)
         {
+            if (dataMin == dataMax)
+            {
+                dataMin -= 0.1;
+                dataMax += 0.1;
+            }
             double span = dataMax - dataMin;

             double step = Math.Pow(10, Math.Floor(Math.Log10(span / m)));


PageGenerator_GeneratePostPage_Should tests - Green

--- PrehensilePonyTail/PPTail.Generator.T4Html/PageGenerator.cs
+++ PrehensilePonyTail/PPTail.Generator.T4Html/PageGenerator.cs
@@ -62,13 +62,16 @@
             if (template == null)
                 throw new TemplateNotFoundException(Enumerations.TemplateType.ContentPage, string.Empty);

-            return pageData.ProcessTemplate(this.ContentPageTemplate.Content, this.DateTimeFormatSpecifier);
+            return pageData.ProcessTemplate(template.Content, this.DateTimeFormatSpecifier);
         }

         public string GeneratePostPage(ContentItem article)
         {
-            //TODO: Verify required templates are available
-            throw new NotImplementedException();
+            var template = this.PostPageTemplate;
+            if (template == null)
+                throw new TemplateNotFoundException(Enumerations.TemplateType.PostPage, string.Empty);
+
+            return article.ProcessTemplate(template.Content, this.DateTimeFormatSpecifier);
         }

         //public void LoadContentPageTemplate(string path)


Ticket #51
- Minor modifications to SDL Fullscreen handling

git-svn-id: 53f2a8ff3606f182ef4420064c1f4a5cdcbe6bb1@1675 bb9bf1cf-960d-0410-9a3a-baeba60cf407

--- Projects/Axiom/Source/RenderSystems/OpenGL/SDL/SdlWindow.cs
+++ Projects/Axiom/Source/RenderSystems/OpenGL/SDL/SdlWindow.cs
@@ -217,6 +217,10 @@

 		public void Show()
 		{
+            if ( FullScreen )
+            {
+                this.SavePreviousWindowSettings();
+            }
 			InitializeWindow();
 		}

@@ -241,28 +245,30 @@
 			// full screen?
 			if ( FullScreen )
 			{
-				flags |= Sdl.SDL_FULLSCREEN;
-
-				// remember previous window settings for when we destroy it
-				IntPtr info = Sdl.SDL_GetVideoInfo();
-				Sdl.SDL_VideoInfo videoInfo = (Sdl.SDL_VideoInfo) Marshal.PtrToStructure(info, typeof(Sdl.SDL_VideoInfo));
-				Sdl.SDL_PixelFormat vfmt = (Sdl.SDL_PixelFormat) Marshal.PtrToStructure(videoInfo.vfmt, typeof(Sdl.SDL_PixelFormat));
-
-				_previousWidth = videoInfo.current_w;
-				_previousHeight = videoInfo.current_h;
-				_previousColorDepth = vfmt.BitsPerPixel;
-			}
-
-			// set the video mode (and create the surface)
+			    flags |= Sdl.SDL_FULLSCREEN;
+			}
+
+		    // set the video mode (and create the surface)
 			// TODO: Grab return val once changed to the right type
 			SdlWindow._hWindow = Sdl.SDL_SetVideoMode( Width, Height, ColorDepth, flags );

 			if ( _hWindow == IntPtr.Zero )
-				throw new Exception( "Failed to create SDL window :" + Sdl.SDL_GetError() );
-
-		}
-
-		internal void WndProc()
+				throw new Exception( String.Format( "SDL: failed to set video mode to {0}x{1}, color depth: {2}./n{3}",  Width, Height, ColorDepth, Sdl.SDL_GetError() ) );
+
+		}
+
+	    private void SavePreviousWindowSettings()
+	    {
+	        IntPtr info = Sdl.SDL_GetVideoInfo();
+	        Sdl.SDL_VideoInfo videoInfo = (Sdl.SDL_VideoInfo) Marshal.PtrToStructure(info, typeof(Sdl.SDL_VideoInfo));
+	        Sdl.SDL_PixelFormat vfmt = (Sdl.SDL_PixelFormat) Marshal.PtrToStructure(videoInfo.vfmt, typeof(Sdl.SDL_PixelFormat));
+
+	        this._previousWidth = videoInfo.current_w;
+	        this._previousHeight = videoInfo.current_h;
+	        this._previousColorDepth = vfmt.BitsPerPixel;
+	    }
+
+	    internal void WndProc()
 		{
             Sdl.SDL_Event sdlEvent;


後はデバックだけだけど、取りあえず完了したぽよ

後はデバックだけだけど、取りあえず完了したぽよ

--- QRCodeGeneraterForDotNet/QRCodeGenerater/QRCodeGenerater.cs
+++ QRCodeGeneraterForDotNet/QRCodeGenerater/QRCodeGenerater.cs
@@ -1,8 +1,7 @@
 using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 using Windows.UI.Xaml.Media.Imaging;
+using System.IO;
+using System.Runtime.InteropServices.WindowsRuntime;

 namespace QRCodeGenerater
 {
@@ -16,38 +15,56 @@
     //  </autogenerated>
     // ------------------------------------------------------------------------------
     using System;
+    using System.IO;
     using System.Net.Http;
+    using System.Threading.Tasks;

     namespace QRCodeGeneraterForDotNet
     {
         public class QRCodeGenerater
         {
+            public int Width { get; set; } = 256;
+            public int Height { get; set; } = 256;

-            public WriteableBitmap GenerateQRCode(string source, short width, short height)
+            public async Task<WriteableBitmap> GenerateQRCode(string source)
             {
-                string URL = makeURL(source, width, height);
+                string URL = makeURL(source);

+                var bitmap = await getImageFromURL(URL);
+                return bitmap ?? new WriteableBitmap(Width, Height);
             }

-            protected writeableBitmap getImageFromURL(string url)
+            protected async Task<WriteableBitmap> getImageFromURL(string url)
             {
                 HttpClient client = new HttpClient();
-                var response = client.GetAsync(url);
+                var response = await client.GetAsync(url);

-                if (!response.Result.IsSuccessStatusCode)
+                if (!response.IsSuccessStatusCode)
                 {
                     throw new Exception("画像の取得に失敗しました");
                 }

+                byte[] resultByte = await response.Content.ReadAsByteArrayAsync();
+
+
+                var bitmap = new WriteableBitmap(Width, Height);
+
+                using (var pixelStream = bitmap.PixelBuffer.AsStream())
+                {
+                    pixelStream.Seek(0, SeekOrigin.Begin);
+                    pixelStream.Write(resultByte, 0, resultByte.Length);
+                }
+
+                return bitmap;

             }

-            protected string makeURL(string source, short width, short height)
+            protected string makeURL(string source)
             {
                 string result = "http://chart.googleapis.com/chart?cht=qr";

                 result += "&" + "chl=" + source;
-                result += "&" + "chs=" + width + "x" + height;
+                result += "&" + "chs=" + Width + "x" + Height;
                 return result;

             }


added functions to publish the new minimum and maximum values for scans and bins when axis changed (haven't hooked them up yet)

--- Atreyu/ViewModels/HeatMapViewModel.cs
+++ Atreyu/ViewModels/HeatMapViewModel.cs
@@ -784,6 +784,24 @@
             ////this._eventAggregator.GetEvent<YAxisChangedEvent>().Publish(this._heatMapPlotModel.Axes[2] as LinearAxis);
         }

+        protected void PublishXAxisChange(object sender, AxisChangedEventArgs e)
+        {
+            var axis = sender as LinearAxis;
+            if (axis == null) return;
+            this.CurrentMinScan = (int)axis.ActualMinimum;
+            this.CurrentMaxScan = (int)axis.ActualMaximum;
+        }
+
+        protected void PublishYAxisChange(object sender, AxisChangedEventArgs e)
+        {
+            var axis = sender as LinearAxis;
+            if (axis == null) return;
+            this.CurrentMinBin = (int)axis.ActualMinimum;
+            this.CurrentMaxBin = (int)axis.ActualMaximum;
+        }
+
+
+
         /// <summary>
         /// TODO The handle zoom.
         /// </summary>


Move to busy state log level Warn->Info

Move to busy state log level Warn->Info

--- SS.Integration.Adapter/Actors/StreamListenerBuilderActor.cs
+++ SS.Integration.Adapter/Actors/StreamListenerBuilderActor.cs
@@ -112,7 +112,7 @@
         {
             State = StreamListenerBuilderState.Active;

-            _logger.Warn(
+            _logger.Info(
                 $"Moved to Active State" +
                 $" - _creationInProgressFixtureIdSetCount={_creationInProgressFixtureIdSet.Count} items");

@@ -131,7 +131,7 @@
         {
             State = StreamListenerBuilderState.Busy;

-            _logger.Warn(
+            _logger.Info(
                 $"Moved to Busy State" +
                 $" - _creationInProgressFixtureIdSetCount={_creationInProgressFixtureIdSet.Count} items");

@@ -302,7 +302,7 @@
             {
                 if (_creationInProgressFixtureIdSet.Count + 1 > _settings.FixtureCreationConcurrency)
                 {
-                    _logger.Warn(
+                    _logger.Info(
                         $"BuildStreamListenerActorInstance - {resource}" +
                         $" - {msg.GetType().Name}" +
                         $" - fixture creation concurrency limit of {_settings.FixtureCreationConcurrency} has been reached" +


Solitude.Android : Fixed crash when no internet connection, also displays error-message

--- Solitude.Android/CommunicationAPI/CommunicationInterface.cs
+++ Solitude.Android/CommunicationAPI/CommunicationInterface.cs
@@ -174,6 +174,13 @@

 			//Execute and await response, parse afterwards
 			var tokenResponse = client.Execute (request);
+
+			if (tokenResponse.StatusCode == 0)
+			{
+				latestError = "No internet connection, please connect before logging in.";
+				return false;
+			}
+
 			JsonValue o = System.Json.JsonObject.Parse(tokenResponse.Content);

 			//Saves the user and return true, if the login was successful and false otherwise


Refs #1723 - foutafhandeling backend verkeerde e-mail/telefoonnr

--- Solution/Chiro.Gap.Services/GelieerdePersonenService.svc.cs
+++ Solution/Chiro.Gap.Services/GelieerdePersonenService.svc.cs
@@ -747,12 +747,12 @@
                 {
                     if (ex.FoutNummer == FoutNummer.ValidatieFout)
                     {
-                        problemen.Add("EMail_Nummer", new FoutBericht
+                        problemen.Add("EMail.Nummer", new FoutBericht
                                                       {
                                                           FoutNummer = FoutNummer.ValidatieFout,
                                                           Bericht =
                                                               string.Format(Resources.OngeldigeCommunicatie,
-                                                                  details.EMail,
+                                                                  details.EMail.Nummer,
                                                                   eMail.CommunicatieType.Omschrijving)
                                                       });
                     }
@@ -786,7 +786,7 @@
                 {
                     if (ex.FoutNummer == FoutNummer.ValidatieFout)
                     {
-                        problemen.Add("TelefoonNummer_Nummer", new FoutBericht
+                        problemen.Add("TelefoonNummer.Nummer", new FoutBericht
                                                                {
                                                                    FoutNummer = FoutNummer.ValidatieFout,
                                                                    Bericht =


Preserve Parameters case on dictionary serialization (#76)

--- Source/EasyNetQ.Management.Client/RabbitContractResolver.cs
+++ Source/EasyNetQ.Management.Client/RabbitContractResolver.cs
@@ -1,4 +1,5 @@
-using System.Text.RegularExpressions;
+using System;
+using System.Text.RegularExpressions;
 using Newtonsoft.Json.Serialization;

 namespace EasyNetQ.Management.Client
@@ -9,5 +10,12 @@
         {
             return Regex.Replace(propertyName, "([a-z])([A-Z])", "$1_$2").ToLower();
         }
+
+        protected override JsonDictionaryContract CreateDictionaryContract(Type objectType)
+        {
+            var contract = base.CreateDictionaryContract(objectType);
+            contract.DictionaryKeyResolver = propertyName => propertyName;
+            return contract;
+        }
     }
-}
+}


Separate tests for NotCounted collections

--- Spa/NakedObjects.Spa.Selenium.Test/tests/ObjectViewTests.cs
+++ Spa/NakedObjects.Spa.Selenium.Test/tests/ObjectViewTests.cs
@@ -64,15 +64,6 @@
             wait.Until(d => br.FindElements(By.CssSelector(".collection"))[0].Text == "Product Inventory:\r\n2 Items");
             wait.Until(d => br.FindElements(By.CssSelector(".collection"))[1].Text == "Product Reviews:\r\nEmpty");
             wait.Until(d => br.FindElements(By.CssSelector(".collection"))[2].Text == "Special Offers:\r\n1 Item");
-
-            //Test NotCounted collection
-            GeminiUrl("object?i1=View&o1=___1.Vendor--1662");
-            WaitForView(Pane.Single, PaneType.Object, "Northern Bike Travel");
-
-            wait.Until(d => br.FindElements(By.CssSelector(".collection")).Count == 1);
-            collections = br.FindElements(By.CssSelector(".collection"));
-            wait.Until(d => br.FindElements(By.CssSelector(".collection"))[0].Text == "Product - Order Info:\r\nUnknown Size");
-
         }

         public virtual void NonNavigableReferenceProperty()
@@ -144,7 +135,28 @@

             // cancel table view
             Click(WaitForCss(".icon-summary"));
-            WaitUntilGone(d => d.FindElement(By.CssSelector(".table")));
+            WaitUntilGone(d => d.FindElement(By.CssSelector(".table")));
+        }
+        public virtual void NotCountedCollection()
+        {
+            //Test NotCounted collection
+            GeminiUrl("object?i1=View&o1=___1.Vendor--1662");
+            WaitForView(Pane.Single, PaneType.Object, "Northern Bike Travel");
+
+            Assert.IsTrue(WaitForCssNo(".collection", 0).Text.Contains("Unknown Size"));
+
+            var iconList = WaitForCssNo(".collection .icon-list", 0);
+            Click(iconList);
+            WaitForCss("table");
+            Assert.IsTrue(WaitForCssNo(".collection",0).Text.Contains("1 Item"));
+
+            //wait.Until(dr => dr.FindElements(By.CssSelector(".collection"))[0].Text == "Product - Order Info:\r\n1 Item");
+
+            // cancel table view
+            Click(WaitForCss(".icon-summary"));
+            WaitUntilGone(dr => dr.FindElement(By.CssSelector(".table")));
+
+            Assert.IsTrue(WaitForCssNo(".collection", 0).Text.Contains("Unknown Size"));
         }
         public virtual void ClickOnLineItemWithCollectionAsList()
         {
@@ -289,6 +301,8 @@

         [TestMethod]
         public override void OpenCollectionAsList() { base.OpenCollectionAsList(); }
+        [TestMethod]
+        public override void NotCountedCollection() { base.NotCountedCollection(); }

         [TestMethod]
         public override void ClickOnLineItemWithCollectionAsList() { base.ClickOnLineItemWithCollectionAsList(); }
@@ -344,7 +358,7 @@
         }
     }

-    //[TestClass]
+    [TestClass]
     public class ObjectViewTestsFirefox : ObjectViewTests
     {
         [ClassInitialize]
@@ -410,6 +424,7 @@
             base.TableViewHonouredOnCollection();
             base.ClickReferenceProperty();
             base.OpenCollectionAsList();
+            base.NotCountedCollection();
             base.ClickOnLineItemWithCollectionAsList();
             base.ClickOnLineItemWithCollectionAsTable();
             base.AttachmentProperty();


add DisconnectedMessage on ValidateState

--- SportingSolutions.Udapi.Sdk/Actors/StreamControllerActor.cs
+++ SportingSolutions.Udapi.Sdk/Actors/StreamControllerActor.cs
@@ -324,10 +324,7 @@
                     Self.Tell(DefaultDisconnectedMessage);
                 else
                     DisconnectedHandler(DefaultDisconnectedMessage);
-
-
-
-                DisconnectedHandler(DefaultDisconnectedMessage);
+

                 return false;
             }
@@ -552,6 +549,10 @@
             if (NeedRaiseDisconnect)
             {
                 _logger.Warn($"{message} disconnected event will be raised");
+                if (UDAPI.Configuration.UseStreamControllerMailbox)
+                    Self.Tell(DefaultDisconnectedMessage);
+                else
+                    DisconnectedHandler(DefaultDisconnectedMessage);
             }
             else
             {


Begin implementing TemporalPlotViewModel

--- StressMeasurementSystem/ViewModels/TemporalPlotViewModel.cs
+++ StressMeasurementSystem/ViewModels/TemporalPlotViewModel.cs
@@ -2,6 +2,12 @@
 {
     public class TemporalPlotViewModel : AbstractPlotViewModel
     {
+        public TemporalPlotViewModel()
+        {
+            PlotModel = new TemporalPlot();  //TODO: Create TemporalPlot model
+            Title = GetType().Name;
+        }

+        public string Title { get; }
     }
 }


--- CSharp/Math/RoundNumberPerformance.cs
+++ CSharp/Math/RoundNumberPerformance.cs
@@ -8,66 +8,46 @@
 		var tempo = new Stopwatch();
 		WriteLine("Decimal");
 		tempo.Start();
-		for (var valor = -10000M; valor <= 10000M; valor += 0.05M) {
-			valor.RoundMidPoint();
-		}
+		for (var valor = -10000M; valor <= 10000M; valor += 0.05M) valor.RoundMidPoint();
         tempo.Stop();
         WriteLine("Arredondando em ms: {0}", tempo.ElapsedMilliseconds);
 		WriteLine("Double");
 		tempo.Start();
-		for (var valor = -10000.0; valor <= 10000.0; valor += 0.05) {
-			valor.RoundMidPoint();
-		}
+		for (var valor = -10000.0; valor <= 10000.0; valor += 0.05) valor.RoundMidPoint();
         tempo.Stop();
         WriteLine("Arredondando em ms: {0}", tempo.ElapsedMilliseconds);
 		WriteLine("Decimal Alternativo");
 		tempo.Start();
-		for (var valor = -10000M; valor <= 10000M; valor += 0.05M) {
-			valor.RoundMidPointAlt();
-		}
+		for (var valor = -10000M; valor <= 10000M; valor += 0.05M) valor.RoundMidPointAlt();
         tempo.Stop();
         WriteLine("Arredondando em ms: {0}", tempo.ElapsedMilliseconds);
 		WriteLine("Double Alternativo");
 		tempo.Start();
-		for (var valor = -10000.0; valor <= 10000.0; valor += 0.05) {
-			valor.RoundMidPointAlt();
-		}
+		for (var valor = -10000.0; valor <= 10000.0; valor += 0.05) valor.RoundMidPointAlt();
         tempo.Stop();
         WriteLine("Arredondando em ms: {0}", tempo.ElapsedMilliseconds);
 	}
 }

 public static class RoundUtil {
-	public static Decimal RoundMidPoint(this Decimal value) {
-		return Sign(value) * Ceiling(Abs(value) * 2) / 2;
-	}
+	public static Decimal RoundMidPoint(this Decimal value) => Sign(value) * Ceiling(Abs(value) * 2) / 2;

-	public static double RoundMidPoint(this double value) {
-		return Sign(value) * Ceiling(Abs(value) * 2) / 2;
-	}
+	public static double RoundMidPoint(this double value) => Sign(value) * Ceiling(Abs(value) * 2) / 2;

 	public static Decimal RoundMidPointAlt(this Decimal value) {
 		int intPart = (int)value;
 		decimal decimalPart = value - intPart;
-		if (0 < decimalPart && decimalPart <= 0.5M) {
-			return intPart + 0.5M;
-		} else if (0.5M < decimalPart) {
-			return intPart + 1;
-		} else {
-			return intPart;
-		}
+		if (0 < decimalPart && decimalPart <= 0.5M) return intPart + 0.5M;
+		else if (0.5M < decimalPart) return intPart + 1;
+		else return intPart;
 	}

 	public static double RoundMidPointAlt(this double value) {
 		int intPart = (int)value;
 		double decimalPart = value - intPart;
-		if (0 < decimalPart && decimalPart <= 0.5) {
-			return intPart + 0.5;
-		} else if (0.5 < decimalPart) {
-			return intPart + 1;
-		} else {
-			return intPart;
-		}
+		if (0 < decimalPart && decimalPart <= 0.5) return intPart + 0.5;
+		else if (0.5 < decimalPart) return intPart + 1;
+		else return intPart;
 	}
 }


Interval kth

Interval kth

--- CareerCup/interval_order_statistic.cs
+++ CareerCup/interval_order_statistic.cs
@@ -31,6 +31,45 @@
                 ToList()[k];
     }

+    static int kth_inplace(this Tuple<int, int>[] intervals, int k)
+    {
+        var prev = intervals[0];
+        int start = prev.Item1;
+        int count = prev.Item2 - prev.Item1 + 1;
+        int maxRight = prev.Item2;
+        int maxLeft = prev.Item1;
+        if (k <= count)
+        {
+            return start + (count - k) + 1;
+        }
+
+        foreach (var interval in intervals.Skip(1))
+        {
+            if (interval.Item2 > maxRight)
+            {
+                maxRight = interval.Item2;
+                if (interval.Item1 > maxRight)
+                {
+                    maxLeft = interval.Item2;
+                    k -= count;
+                    count = interval.Item2 - interval.Item1 + 1;
+                    start = interval.Item1;
+                }
+                else
+                {
+                    count += interval.Item2 + 1 - maxLeft;
+                }
+            }
+
+            if (k <= count)
+            {
+                return start + (count - k) + 1;
+            }
+        }
+
+        return 0;
+    }
+
     static void Main()
     {
         var input = new [] {
@@ -39,9 +78,13 @@
             Tuple.Create(7, 20)
         };

-        for (int i = 3; i < 10; i++)
+        for (int i = 3; i <= 10; i++)
         {
-           Console.WriteLine("{0} -> {1}", i, input.kth(i));
+           Console.WriteLine(
+                   "{0} -> {1} -> {2}",
+                   i,
+                   input.kth(i),
+                   input.kth_inplace(i));
         }
     }
 }


Reverting silly config attempts

Reverting silly config attempts

--- Tests/Glav.CognitiveServices.IntegrationTests/TestConfig.cs
+++ Tests/Glav.CognitiveServices.IntegrationTests/TestConfig.cs
@@ -31,9 +31,9 @@

             Configuration = builder.Build();

-            _textAnalyticsApiKey = GetConfigOrEnvironmentVariable("ApiKeys:TextAnalytics", "TEXTANALYTIC_API_KEY", "SECRET_TEXTANALYTIC_API_KEY");
-            _computerVisionApiKey = GetConfigOrEnvironmentVariable("ApiKeys:ComputerVision", "COMPUTERVISION_API_KEY", "SECRET_COMPUTERVISION_API_KEY");
-            _faceApiKey = GetConfigOrEnvironmentVariable("ApiKeys:Face", "FACE_API_KEY", "SECRET_FACE_API_KEY");
+            _textAnalyticsApiKey = GetConfigOrEnvironmentVariable("ApiKeys:TextAnalytics", "TEXTANALYTIC_API_KEY");
+            _computerVisionApiKey = GetConfigOrEnvironmentVariable("ApiKeys:ComputerVision", "COMPUTERVISION_API_KEY");
+            _faceApiKey = GetConfigOrEnvironmentVariable("ApiKeys:Face", "FACE_API_KEY");

@@ -43,13 +43,9 @@
         public static string ComputerVisionApiKey => _computerVisionApiKey;
         public static string FaceApiKey => _faceApiKey;

-        private static string GetConfigOrEnvironmentVariable(string configKey, string envVariable1, string envVariable2)
+        private static string GetConfigOrEnvironmentVariable(string configKey, string envVariable)
         {
-            if (!string.IsNullOrWhiteSpace(Configuration[configKey]))
-            {
-                return Configuration[configKey];
-            }
-            return string.IsNullOrWhiteSpace(Environment.GetEnvironmentVariable(envVariable1)) ? Environment.GetEnvironmentVariable(envVariable1) : Environment.GetEnvironmentVariable(envVariable2);
+            return !string.IsNullOrWhiteSpace(Configuration[configKey]) ? Configuration[configKey] : Environment.GetEnvironmentVariable(envVariable);
         }
     }
 }


testing the CheckCollision() implementation

--- ThreeSheeps.Spritesse/Physics/CollisionResolverComponent.cs
+++ ThreeSheeps.Spritesse/Physics/CollisionResolverComponent.cs
@@ -1,4 +1,5 @@
-using System.Collections.Generic;
+using System;
+using System.Collections.Generic;
 using Microsoft.Xna.Framework;

 namespace ThreeSheeps.Spritesse.Physics
@@ -79,7 +80,47 @@

         protected virtual bool CheckCollision(PhysicalShape shape1, PhysicalShape shape2)
         {
-            // TODO
+            Type shape1Type = shape1.GetType();
+            Type shape2Type = shape2.GetType();
+
+            if (shape1Type == typeof(PhysicalCircle))
+            {
+                if (shape2Type == typeof(PhysicalCircle))
+                {
+                    return CollisionResolverComponent.CheckCollision(shape1 as PhysicalCircle, shape2 as PhysicalCircle);
+                }
+                if (shape2Type == typeof(PhysicalAxisAlignedBox))
+                {
+                    return CollisionResolverComponent.CheckCollision(shape2 as PhysicalAxisAlignedBox, shape1 as PhysicalCircle);
+                }
+            }
+            if (shape1Type == typeof(PhysicalAxisAlignedBox))
+            {
+                if (shape2Type == typeof(PhysicalCircle))
+                {
+                    return CollisionResolverComponent.CheckCollision(shape1 as PhysicalAxisAlignedBox, shape2 as PhysicalCircle);
+                }
+                if (shape2Type == typeof(PhysicalAxisAlignedBox))
+                {
+                    return CollisionResolverComponent.CheckCollision(shape1 as PhysicalAxisAlignedBox, shape2 as PhysicalAxisAlignedBox);
+                }
+            }
+
+            return false;
+        }
+
+        protected static bool CheckCollision(PhysicalCircle shape1, PhysicalCircle shape2)
+        {
+            return false;
+        }
+
+        protected static bool CheckCollision(PhysicalAxisAlignedBox shape1, PhysicalCircle shape2)
+        {
+            return false;
+        }
+
+        protected static bool CheckCollision(PhysicalAxisAlignedBox shape1, PhysicalAxisAlignedBox shape2)
+        {
             return false;
         }


Bash scripts cannot be run on MDS.

Bash scripts cannot be run on MDS.

--- CheckPointObjects/CLIScriptBuilder.cs
+++ CheckPointObjects/CLIScriptBuilder.cs
@@ -22,7 +22,7 @@
 {
     /// <summary>
     /// Generates Management API command line scripts for bash environment.
-    /// </summary>
+    /// </summary>
     public static class CLIScriptBuilder
     {
         public static string GenerateScriptHeader(string toolVersion, bool isObjectsScript)
@@ -128,6 +128,25 @@
               .Append("  exit 1")
               .Append(Environment.NewLine)
               .Append("fi")
+              .Append(Environment.NewLine)
+              .Append(Environment.NewLine);
+
+            // Verify that the script is NOT executed on MDS
+            sb.Append("JQ=${CPDIR}/jq/jq")
+              .Append(Environment.NewLine)
+              .Append("mgmt_cli show mdss -s id.txt --format json > domains.json")
+              .Append(Environment.NewLine)
+              .Append("DOMAINS_COUNT=$($JQ -r \".total\" domains.json)")
+              .Append(Environment.NewLine)
+              .Append("if [ $DOMAINS_COUNT -ne 0 ]; then")
+              .Append(Environment.NewLine)
+              .Append("  echo 'This script cannot be executed on MDS. Please specify a domain name in SmartMove tool.'")
+              .Append(Environment.NewLine)
+              .Append("  mgmt_cli logout -s id.txt")
+              .Append(Environment.NewLine)
+              .Append("  exit 1")
+              .Append(Environment.NewLine)
+              .Append("fi")
               .Append(Environment.NewLine);

             return sb.ToString();
@@ -147,8 +166,8 @@
             if (!string.IsNullOrEmpty(scriptInstruction))
             {
                 sb.Append(GenerateInstructionScript(scriptInstruction)).Append(Environment.NewLine);
-            }
-
+            }
+
             sb.Append("cmd='mgmt_cli ").Append(cpObject.ToCLIScript()).Append(" ignore-warnings true -s id.txt --user-agent mgmt_cli_smartmove'")
               .Append(Environment.NewLine)
               .Append("run_command");
@@ -163,8 +182,8 @@
                 return "";
             }

-            var sb = new StringBuilder();
-
+            var sb = new StringBuilder();
+
             sb.Append("cmd='mgmt_cli ").Append(command).Append(" -s id.txt --user-agent mgmt_cli_smartmove'")
               .Append(Environment.NewLine)
               .Append("run_command");
@@ -172,18 +191,18 @@
             return sb.ToString();
         }

-        public static string GenerateDiagnosticsCommandScript(string command)
-        {
-            if (string.IsNullOrEmpty(command))
-            {
-                return "";
-            }
-
-            var sb = new StringBuilder();
-
-            sb.Append("mgmt_cli ").Append(command).Append(" -s id.txt > /dev/null 2>&1");
-
-            return sb.ToString();
+        public static string GenerateDiagnosticsCommandScript(string command)
+        {
+            if (string.IsNullOrEmpty(command))
+            {
+                return "";
+            }
+
+            var sb = new StringBuilder();
+
+            sb.Append("mgmt_cli ").Append(command).Append(" -s id.txt > /dev/null 2>&1");
+
+            return sb.ToString();
         }

         public static string GenerateRuleInstructionScript(string instruction)


Create external diagnostic record with file path

While creating diagnostic record for PowerShell based external rule violations, the engine would pass file name instead of path for initializing the record. This would lead the ScriptPath and ScriptName property to be identical for external rule violations.

--- Engine/ScriptAnalyzer.cs
+++ Engine/ScriptAnalyzer.cs
@@ -1993,7 +1993,7 @@
                     }
                 }

-                foreach (var ruleRecord in this.GetExternalRecord(scriptAst, scriptTokens, exRules.ToArray(), fileName))
+                foreach (var ruleRecord in this.GetExternalRecord(scriptAst, scriptTokens, exRules.ToArray(), filePath))
                 {
                     var records = SuppressRule(ruleSuppressions, ruleRecord);
                     foreach (var record in records.Item2)


generates diagram without object placement

--- Cogs.Publishers/UmlSchemaPublisher.cs
+++ Cogs.Publishers/UmlSchemaPublisher.cs
@@ -73,6 +73,7 @@
             {
                 reusableList.Add(item.Name);
             }
+            int count = classList.Count;
             // loop through classes and reusable data types
             foreach (var item in model.ItemTypes.Concat(model.ReusableDataTypes))
             {
@@ -80,6 +81,10 @@
                 var newItem = new XElement(new XElement("packagedElement", new XAttribute(xmins + "type", "uml:Class"),
                            new XAttribute(xmins + "id", CreateId(item.Name)),
                            new XAttribute("name", item.Name)));
+                // add class to diagram
+                diagramElements.Add(new XElement("element", new XAttribute("geometry", "Left=306;Top=338;Right=455;Bottom=408;"),
+                    new XAttribute("subject", item.Name), new XAttribute("seqno", count.ToString()), new XAttribute("style",
+                    "DUID=" + "item.Name" + ";NSL=0;BCol=-1;BFol=-1;LCol=-1;LWth=-1;fontsz=0;bold=0;black=0;italic=0;ul=0;charset=0;pitch=0;));")));
                 string extends = item.ExtendsTypeName;
                 // loop through properties of class and add to class
                 foreach(var property in item.Properties)
@@ -162,6 +167,7 @@
                 }
                 // add class to model
                 xmodel.Add(newItem);
+                count -= 1;
             }
             //create document header based on format specified
             XDocument xDoc;
@@ -179,6 +185,7 @@
                 // get current date and time for when setting created and last modified settings
                 var currentTime = DateTime.Today.Year + "-" + DateTime.Today.Month + "-" + DateTime.Today.Day + " " + DateTime.Now.Hour + ":" +
                     DateTime.Now.Minute + ":" + DateTime.Now.Second;
+                // create header + structure of xml 2.5.1 (chunky and unpleasing, but works)
                 xDoc = new XDocument(
                    new XDeclaration("1.0", "utf-8", null),
                    new XElement(xmins + "XMI", new XAttribute(XNamespace.Xmlns + "uml", "http://www.omg.org/spec/UML/20131001"),


If you call a static/instance method without 'this' or the class name, give a decent error message other than "variable not defined".

--- Compiler/Parser/ParseTree/Variable.cs
+++ Compiler/Parser/ParseTree/Variable.cs
@@ -109,6 +109,16 @@
                                 throw new ParserException(this, message);
                             }
                         }
+
+                        foreach (FunctionDefinition fd in cd.Methods)
+                        {
+                            if (fd.NameToken.Value == name)
+                            {
+                                string message = "'" + name + "' is used like a standalone function but it is " + (fd.Modifiers.HasStatic ? "a static" : "an instance") + " method.";
+                                message += " Did you mean '" + (fd.Modifiers.HasStatic ? cd.NameToken.Value : "this") + "." + name + "' instead of '" + name + "'?";
+                                throw new ParserException(this, message);
+                            }
+                        }
                     }

                     // TODO: But if it's being called like a function then...


Resetting shipping options on cart updates

--- Controllers/ShoppingCartController.cs
+++ Controllers/ShoppingCartController.cs
@@ -159,10 +159,7 @@

             _shoppingCart.Country = country;
             _shoppingCart.ZipCode = zipCode;
-            if (!String.IsNullOrWhiteSpace(shippingOption)) {
-                _shoppingCart.ShippingOption =
-                    ShippingService.RebuildShippingOption(shippingOption);
-            }
+            _shoppingCart.ShippingOption = String.IsNullOrWhiteSpace(shippingOption) ? null : ShippingService.RebuildShippingOption(shippingOption);

             if (items != null) {
                 UpdateShoppingCart(items.Reverse());
@@ -178,6 +175,7 @@

             _shoppingCart.Country = country;
             _shoppingCart.ZipCode = zipCode;
+            _shoppingCart.ShippingOption = null;

             UpdateShoppingCart(items.Reverse());
             return new ShapePartialResult(this,


Fix keyspace race bug CSHARP-175

Fix keyspace race bug CSHARP-175

--- src/Cassandra/Connection.cs
+++ src/Cassandra/Connection.cs
@@ -139,10 +139,10 @@
                         return;
                     }
                     _logger.Info("Connection to host " + HostAddress + " switching to keyspace " + value);
-                    this._keyspace = value;
                     var timeout = Configuration.SocketOptions.ConnectTimeoutMillis;
                     var request = new QueryRequest(ProtocolVersion, String.Format("USE \"{0}\"", value), false, QueryProtocolOptions.Default);
                     TaskHelper.WaitToComplete(this.Send(request), timeout);
+                    this._keyspace = value;
                 }
             }
         }


Make OsuConfigManager instances readonly

--- osu.Game/Online/API/APIAccess.cs
+++ osu.Game/Online/API/APIAccess.cs
@@ -9,7 +9,6 @@
 using System.Threading;
 using System.Threading.Tasks;
 using Newtonsoft.Json.Linq;
-using osu.Framework.Allocation;
 using osu.Framework.Bindables;
 using osu.Framework.Extensions.ExceptionExtensions;
 using osu.Framework.Graphics;
@@ -22,7 +21,7 @@
 {
     public class APIAccess : Component, IAPIProvider
     {
-        private OsuConfigManager config { get; set; }
+        private readonly OsuConfigManager config;

         private readonly OAuth authentication;


Tidy up content container specification

Tidy up content container specification

--- osu.Game/Overlays/NewsOverlay.cs
+++ osu.Game/Overlays/NewsOverlay.cs
@@ -16,11 +16,10 @@
     {
         private readonly Bindable<string> article = new Bindable<string>(null);

-        protected override Container<Drawable> Content => content;
+        private readonly Container sidebarContainer;
+        private readonly NewsSidebar sidebar;

         private readonly Container content;
-        private readonly Container sidebarContainer;
-        private readonly NewsSidebar sidebar;

         private CancellationTokenSource cancellationToken;

@@ -29,7 +28,7 @@
         public NewsOverlay()
             : base(OverlayColourScheme.Purple, false)
         {
-            base.Content.Add(new GridContainer
+            Child = new GridContainer
             {
                 RelativeSizeAxes = Axes.X,
                 AutoSizeAxes = Axes.Y,
@@ -58,7 +57,7 @@
                         }
                     }
                 }
-            });
+            };
         }

         protected override void LoadComplete()
@@ -112,16 +111,12 @@
         protected void LoadDisplay(Drawable display)
         {
             ScrollFlow.ScrollToStart();
-            LoadComponentAsync(display, loaded =>
-            {
-                Child = loaded;
-            }, (cancellationToken = new CancellationTokenSource()).Token);
+            LoadComponentAsync(display, loaded => content.Child = loaded, (cancellationToken = new CancellationTokenSource()).Token);
         }

         protected override void UpdateAfterChildren()
         {
             base.UpdateAfterChildren();
-
             sidebarContainer.Height = DrawHeight;
             sidebarContainer.Y = Math.Clamp(ScrollFlow.Current - Header.DrawHeight, 0, Math.Max(ScrollFlow.ScrollContent.DrawHeight - DrawHeight - Header.DrawHeight, 0));
         }


Add cancellation support

Add cancellation support

--- osu.Game/Scoring/ScoreManager.cs
+++ osu.Game/Scoring/ScoreManager.cs
@@ -6,6 +6,7 @@
 using System.IO;
 using System.Linq;
 using System.Linq.Expressions;
+using System.Threading;
 using JetBrains.Annotations;
 using Microsoft.EntityFrameworkCore;
 using osu.Framework.Bindables;
@@ -135,9 +136,13 @@
             }

             private IBindable<StarDifficulty> difficultyBindable;
+            private CancellationTokenSource difficultyCancellationSource;

             private void onScoringModeChanged(ValueChangedEvent<ScoringMode> mode)
             {
+                difficultyCancellationSource?.Cancel();
+                difficultyCancellationSource = null;
+
                 if (score.Beatmap == null)
                 {
                     Value = score.TotalScore;
@@ -156,7 +161,7 @@
                     }

                     // We can compute the max combo locally after the async beatmap difficulty computation.
-                    difficultyBindable = difficulties().GetBindableDifficulty(score.Beatmap, score.Ruleset, score.Mods);
+                    difficultyBindable = difficulties().GetBindableDifficulty(score.Beatmap, score.Ruleset, score.Mods, (difficultyCancellationSource = new CancellationTokenSource()).Token);
                     difficultyBindable.BindValueChanged(d => updateScore(d.NewValue.MaxCombo), true);
                 }
                 else


Add pitch randomisation to the OsuLogo hover sample

--- osu.Game/Screens/Menu/OsuLogo.cs
+++ osu.Game/Screens/Menu/OsuLogo.cs
@@ -283,9 +283,15 @@
                 this.Delay(early_activation).Schedule(() =>
                 {
                     if (beatIndex % timingPoint.TimeSignature.Numerator == 0)
-                        sampleDownbeat.Play();
+                    {
+                        sampleDownbeat?.Play();
+                    }
                     else
-                        sampleBeat.Play();
+                    {
+                        var channel = sampleBeat.GetChannel();
+                        channel.Frequency.Value = 0.95 + RNG.NextDouble(0.1);
+                        channel.Play();
+                    }
                 });
             }