Disable T

Disable T

--- CSharpMath.Evaluation.Tests/MathSTests.cs
+++ CSharpMath.Evaluation.Tests/MathSTests.cs
@@ -2,208 +2,208 @@
 using Xunit;
 using AngouriMath;

-namespace CSharpMath.Evaluation.Tests {
-  using Atom;
-  public class MathSTests {
-    MathList ParseLaTeX(string latex) =>
-      LaTeXParser.MathListFromLaTeX(latex).Match(list => list, e => throw new Xunit.Sdk.XunitException(e));
-    Entity ParseMath(string latex) =>
-      MathS.FromMathList(ParseLaTeX(latex)).Match(entity => entity, e => throw new Xunit.Sdk.XunitException(e));
-    void Test(string input, string converted, string result) {
-      var math = ParseMath(input);
-      Assert.Equal(converted, LaTeXParser.MathListToLaTeX(MathS.ToMathList(math)).ToString());
-      // Ensure that the converted entity is valid by simplifying it
-      Assert.Equal(result, LaTeXParser.MathListToLaTeX(MathS.ToMathList(math.Simplify())).ToString());
-    }
-    [Theory]
-    [InlineData("1")]
-    [InlineData("1234")]
-    [InlineData(" 1234")]
-    [InlineData("1234 ")]
-    [InlineData(" 1234 ")]
-    [InlineData("1234 5678")]
-    [InlineData(" 1234 5678")]
-    [InlineData("1234 5678 ")]
-    [InlineData(" 1234 5678 ")]
-    public void Numbers(string number) => Test(number, number.Replace(" ", null), number.Replace(" ", null));
-    [Theory]
-    [InlineData("a", "a", "a")]
-    [InlineData("ab", @"a\times b", @"a\times b")]
-    [InlineData(@"\alpha", @"α", "α")]
-    [InlineData(@"\pi", @"pi", @"pi")]
-    [InlineData(@"\alpha\pi", @"α\times pi", @"pi\times α")]
-    [InlineData("abc", @"a\times b\times c", @"a\times b\times c")]
-    [InlineData("3a", @"3\times a", @"3\times a")]
-    [InlineData("3ab", @"3\times a\times b", @"3\times a\times b")]
-    [InlineData("3a3", @"3\times a\times 3", @"9\times a")]
-    [InlineData("3aa", @"3\times a\times a", @"3\times a^2")]
-    public void Variables(string input, string converted, string result) => Test(input, converted, result);
-    [Theory]
-    [InlineData("a + b", @"a+b", "a+b")]
-    [InlineData("a - b", @"a-b", "a-b")]
-    [InlineData("a * b", @"a\times b", @"a\times b")]
-    [InlineData(@"a\times b", @"a\times b", @"a\times b")]
-    [InlineData(@"a\cdot b", @"a\times b", @"a\times b")]
-    [InlineData(@"a / b", @"\frac{a}{b}", @"\frac{a}{b}")]
-    [InlineData(@"a\div b", @"\frac{a}{b}", @"\frac{a}{b}")]
-    [InlineData(@"\frac ab", @"\frac{a}{b}", @"\frac{a}{b}")]
-    [InlineData("a + b + c", @"a+b+c", "a+b+c")]
-    [InlineData("a + b - c", @"a+b-c", "a+b-c")]
-    [InlineData("a + b * c", @"a+b\times c", @"a+b\times c")]
-    [InlineData("a + b / c", @"a+\frac{b}{c}", @"a+\frac{b}{c}")]
-    [InlineData("a - b + c", @"a-b+c", "a+c-b")]
-    [InlineData("a - b - c", @"a-b-c", @"a-\left( b+c\right) ")]
-    [InlineData("a - b * c", @"a-b\times c", @"a-b\times c")]
-    [InlineData("a - b / c", @"a-\frac{b}{c}", @"a-\frac{b}{c}")]
-    [InlineData("a * b + c", @"a\times b+c", @"a\times b+c")]
-    [InlineData("a * b - c", @"a\times b-c", @"a\times b-c")]
-    [InlineData("a * b * c", @"a\times b\times c", @"a\times b\times c")]
-    [InlineData("a * b / c", @"\frac{a\times b}{c}", @"\frac{a\times b}{c}")]
-    [InlineData("a / b + c", @"\frac{a}{b}+c", @"\frac{a}{b}+c")]
-    [InlineData("a / b - c", @"\frac{a}{b}-c", @"\frac{a}{b}-c")]
-    [InlineData("a / b * c", @"\frac{a}{b}\times c", @"\frac{a\times c}{b}")]
-    [InlineData("a / b / c", @"\frac{\frac{a}{b}}{c}", @"\frac{\frac{a}{b}}{c}")]
-    [InlineData(@"2+\frac ab", @"2+\frac{a}{b}", @"2+\frac{a}{b}")]
-    [InlineData(@"\frac ab+2", @"\frac{a}{b}+2", @"2+\frac{a}{b}")]
-    [InlineData(@"2-\frac ab", @"2-\frac{a}{b}", @"2-\frac{a}{b}")]
-    [InlineData(@"\frac ab-2", @"\frac{a}{b}-2", @"\frac{a}{b}-2")]
-    [InlineData(@"2*\frac ab", @"2\times \frac{a}{b}", @"\frac{2\times a}{b}")]
-    [InlineData(@"\frac ab*2", @"\frac{a}{b}\times 2", @"\frac{2\times a}{b}")]
-    [InlineData(@"2/\frac ab", @"\frac{2}{\frac{a}{b}}", @"\frac{2\times b}{a}")]
-    [InlineData(@"\frac ab/2", @"\frac{\frac{a}{b}}{2}", @"\frac{\frac{a}{2}}{b}")]
-    public void BinaryOperators(string latex, string converted, string result) => Test(latex, converted, result);
-    [Theory]
-    [InlineData("+a", "a", "a")]
-    [InlineData("-a", "-a", "-a")]
-    [InlineData("++a", "a", "a")]
-    [InlineData("+-a", "-a", "-a")]
-    [InlineData("-+a", "-a", "-a")]
-    [InlineData("--a", "--a", "a")]
-    [InlineData("+++a", "a", "a")]
-    [InlineData("---a", "---a", "-a")]
-    [InlineData("a++a", "a+a", @"2\times a")]
-    [InlineData("a+-a", "a+-a", "0")]
-    [InlineData("a-+a", "a-a", "0")]
-    [InlineData("a--a", "a--a", @"2\times a")]
-    [InlineData("a+++a", "a+a", @"2\times a")]
-    [InlineData("a---a", "a---a", "0")]
-    [InlineData("a*+a", @"a\times a", "a^2")]
-    [InlineData("a*-a", @"a\times -a", "-a^2")]
-    [InlineData("+a*+a", @"a\times a", "a^2")]
-    [InlineData("-a*-a", @"-a\times -a", "a^2")]
-    [InlineData("a/+a", @"\frac{a}{a}", "1")]
-    [InlineData("a/-a", @"\frac{a}{-a}", "-1")]
-    [InlineData("+a/+a", @"\frac{a}{a}", "1")]
-    [InlineData("-a/-a", @"\frac{-a}{-a}", "1")]
-    public void UnaryOperators(string latex, string converted, string result) => Test(latex, converted, result);
-    [Theory]
-    [InlineData("2^2", "2^2", "4")]
-    [InlineData("a^a", "a^a", "a^a")]
-    [InlineData("a^{a+b}", "a^{a+b}", "a^{a+b}")]
-    [InlineData("a^{-2}", "a^{-2}", "a^{-2}")]
-    [InlineData("2^{3^4}", "2^{3^4}", "2.4178516392292583E+24")]
-    [InlineData("4^{3^2}", "4^{3^2}", "262144")]
-    [InlineData("4^3+2", "4^3+2", "66")]
-    [InlineData("2+3^4", "2+3^4", "83")]
-    [InlineData("4^3*2", @"4^3\times 2", "128")]
-    [InlineData("2*3^4", @"2\times 3^4", "162")]
-    [InlineData("1/x", @"\frac{1}{x}", @"x^{-1}")]
-    [InlineData("2/x", @"\frac{2}{x}", @"\frac{2}{x}")]
-    [InlineData("0^x", @"0^x", @"0")]
-    [InlineData("1^x", @"1^x", @"1")]
-    [InlineData("x^0", @"x^0", @"1")]
-    [InlineData(@"{\frac 12}^4", @"\left( \frac{1}{2}\right) ^4", "0.0625")]
-    [InlineData(@"\sqrt2", @"\sqrt{2}", "1.4142135623730951")]
-    [InlineData(@"\sqrt2^2", @"\left( \sqrt{2}\right) ^2", "2.0000000000000004")]
-    [InlineData(@"\sqrt[3]2", @"2^{\frac{1}{3}}", "1.2599210498948732")]
-    [InlineData(@"\sqrt[3]2^3", @"\left( 2^{\frac{1}{3}}\right) ^3", "2")]
-    [InlineData(@"\sqrt[3]2^{1+1+1}", @"\left( 2^{\frac{1}{3}}\right) ^{1+1+1}", "2")]
-    [InlineData(@"\sqrt[1+1+1]2^{1+1+1}", @"\left( 2^{\frac{1}{1+1+1}}\right) ^{1+1+1}", "2")]
-    public void Exponents(string latex, string converted, string result) => Test(latex, converted, result);
-    [Theory]
-    [InlineData(@"\sin x", @"\sin \left( x\right) ", @"\sin \left( x\right) ")]
-    [InlineData(@"\cos x", @"\cos \left( x\right) ", @"\cos \left( x\right) ")]
-    [InlineData(@"\tan x", @"\tan \left( x\right) ", @"\tan \left( x\right) ")]
-    [InlineData(@"\cot x", @"\cot \left( x\right) ", @"\cot \left( x\right) ")]
-    [InlineData(@"\sec x", @"\frac{1}{\cos \left( x\right) }", @"\cos \left( x\right) ^{-1}")]
-    [InlineData(@"\csc x", @"\frac{1}{\sin \left( x\right) }", @"\sin \left( x\right) ^{-1}")]
-    [InlineData(@"\arcsin x", @"\arcsin \left( x\right) ", @"\arcsin \left( x\right) ")]
-    [InlineData(@"\arccos x", @"\arccos \left( x\right) ", @"\arccos \left( x\right) ")]
-    [InlineData(@"\arctan x", @"\arctan \left( x\right) ", @"\arctan \left( x\right) ")]
-    [InlineData(@"\arccot x", @"\arccot \left( x\right) ", @"\arccot \left( x\right) ")]
-    [InlineData(@"\arcsec x", @"\arccos \left( \frac{1}{x}\right) ", @"\arccos \left( x^{-1}\right) ")]
-    [InlineData(@"\arccsc x", @"\arcsin \left( \frac{1}{x}\right) ", @"\arcsin \left( x^{-1}\right) ")]
-    [InlineData(@"\ln x", @"\ln \left( x\right) ", @"\ln \left( x\right) ")]
-    [InlineData(@"\log x", @"\log \left( x\right) ", @"\log \left( x\right) ")]
-    [InlineData(@"\log_3 x", @"\log _3\left( x\right) ", @"\log _3\left( x\right) ")]
-    [InlineData(@"\log_{10} x", @"\log \left( x\right) ", @"\log \left( x\right) ")]
-    [InlineData(@"\log_e x", @"\ln \left( x\right) ", @"\ln \left( x\right) ")]
-    [InlineData(@"2\sin x", @"2\times \sin \left( x\right) ", @"2\times \sin \left( x\right) ")]
-    [InlineData(@"\sin 2x", @"\sin \left( 2\times x\right) ", @"\sin \left( 2\times x\right) ")]
-    [InlineData(@"\sin xy", @"\sin \left( x\times y\right) ", @"\sin \left( x\times y\right) ")]
-    [InlineData(@"\cos +x", @"\cos \left( x\right) ", @"\cos \left( x\right) ")]
-    [InlineData(@"\tan -x", @"\tan \left( -x\right) ", @"\tan \left( -x\right) ")]
-    [InlineData(@"\cot x*y", @"\cot \left( x\right) \times y", @"\cot \left( x\right) \times y")]
-    [InlineData(@"\cot x/y", @"\frac{\cot \left( x\right) }{y}", @"\frac{\cot \left( x\right) }{y}")]
-    [InlineData(@"\cos \arccos x", @"\cos \left( \arccos \left( x\right) \right) ", @"x")]
-    [InlineData(@"\sin^2 x", @"\sin \left( x\right) ^2", @"\sin \left( x\right) ^2")]
-    [InlineData(@"\sin^2 xy+\cos^2 yx", @"\sin \left( x\times y\right) ^2+\cos \left( y\times x\right) ^2", @"1")]
-    [InlineData(@"\log^2 x", @"\log \left( x\right) ^2", @"\log \left( x\right) ^2")]
-    [InlineData(@"\ln^2 x", @"\ln \left( x\right) ^2", @"\ln \left( x\right) ^2")]
-    [InlineData(@"\log_{10}^2 x", @"\log \left( x\right) ^2", @"\log \left( x\right) ^2")]
-    [InlineData(@"\log_3^2 x", @"\log _3\left( x\right) ^2", @"\log _3\left( x\right) ^2")]
-    public void LargeOperators(string latex, string converted, string result) => Test(latex, converted, result);
-    [Theory]
-    [InlineData(@"1+(2+3)", @"1+2+3", @"6")]
-    [InlineData(@"1+((2+3))", @"1+2+3", @"6")]
-    [InlineData(@"2*(3+4)", @"2\times \left( 3+4\right) ", @"14")]
-    [InlineData(@"(3+4)*2", @"\left( 3+4\right) \times 2", @"14")]
-    [InlineData(@"(5+6)^2", @"\left( 5+6\right) ^2", @"121")]
-    [InlineData(@"+(1)", @"1", @"1")]
-    [InlineData(@"+(-1)", @"-1", @"-1")]
-    [InlineData(@"-(+1)", @"-1", @"-1")]
-    [InlineData(@"-(-1)", @"--1", @"1")]
-    [InlineData(@"--(--1)", @"----1", @"1")]
-    [InlineData(@"(2+3)^{(4+5)}", @"\left( 2+3\right) ^{4+5}", @"1953125")]
-    [InlineData(@"(2+3)^{((4)+5)}", @"\left( 2+3\right) ^{4+5}", @"1953125")]
-    [InlineData(@"2\sin(x)", @"2\times \sin \left( x\right) ", @"2\times \sin \left( x\right) ")]
-    [InlineData(@"(2)\sin(x)", @"2\times \sin \left( x\right) ", @"2\times \sin \left( x\right) ")]
-    [InlineData(@"\sin(x+1)", @"\sin \left( x+1\right) ", @"\sin \left( 1+x\right) ")]
-    [InlineData(@"\sin((x+1))", @"\sin \left( x+1\right) ", @"\sin \left( 1+x\right) ")]
-    [InlineData(@"\sin(2(x+1))", @"\sin \left( 2\times \left( x+1\right) \right) ", @"\sin \left( 2\times \left( 1+x\right) \right) ")]
-    [InlineData(@"\sin((x+1)+2)", @"\sin \left( x+1+2\right) ", @"\sin \left( 3+x\right) ")]
-    [InlineData(@"\sin(x)2", @"\sin \left( x\right) \times 2", @"2\times \sin \left( x\right) ")]
-    [InlineData(@"\sin(x)(x+1)", @"\sin \left( x\right) \times \left( x+1\right) ", @"\sin \left( x\right) \times \left( 1+x\right) ")]
-    [InlineData(@"\sin(x)(x+1)(x)", @"\sin \left( x\right) \times \left( x+1\right) \times x", @"\sin \left( x\right) \times \left( 1+x\right) \times x")]
-    [InlineData(@"\sin(x^2)", @"\sin \left( x^2\right) ", @"\sin \left( x^2\right) ")]
-    [InlineData(@"\sin\ (x^2)", @"\sin \left( x^2\right) ", @"\sin \left( x^2\right) ")]
-    [InlineData(@"\sin\; (x^2)", @"\sin \left( x^2\right) ", @"\sin \left( x^2\right) ")]
-    [InlineData(@"\sin\ \; (x^2)", @"\sin \left( x^2\right) ", @"\sin \left( x^2\right) ")]
-    [InlineData(@"\sin^3(x)", @"\sin \left( x\right) ^3", @"\sin \left( x\right) ^3")]
-    [InlineData(@"\sin^3\ (x)", @"\sin \left( x\right) ^3", @"\sin \left( x\right) ^3")]
-    [InlineData(@"\sin^3\; (x)", @"\sin \left( x\right) ^3", @"\sin \left( x\right) ^3")]
-    [InlineData(@"\sin^3\ \; (x)", @"\sin \left( x\right) ^3", @"\sin \left( x\right) ^3")]
-    [InlineData(@"\sin(x)^2", @"\sin \left( x\right) ^2", @"\sin \left( x\right) ^2")]
-    [InlineData(@"\sin\ (x)^2", @"\sin \left( x\right) ^2", @"\sin \left( x\right) ^2")]
-    [InlineData(@"\sin\; (x)^2", @"\sin \left( x\right) ^2", @"\sin \left( x\right) ^2")]
-    [InlineData(@"\sin\ \; (x)^2", @"\sin \left( x\right) ^2", @"\sin \left( x\right) ^2")]
-    [InlineData(@"\sin^a(x)", @"\sin \left( x\right) ^a", @"\sin \left( x\right) ^a")]
-    [InlineData(@"\sin^a(x)^2", @"\sin \left( x\right) ^{a\times 2}", @"\sin \left( x\right) ^{2\times a}")]
-    [InlineData(@"\sin^a\ (x)^2", @"\sin \left( x\right) ^{a\times 2}", @"\sin \left( x\right) ^{2\times a}")]
-    [InlineData(@"\sin^a\; (x)^2", @"\sin \left( x\right) ^{a\times 2}", @"\sin \left( x\right) ^{2\times a}")]
-    [InlineData(@"\sin^a\ \; (x)^2", @"\sin \left( x\right) ^{a\times 2}", @"\sin \left( x\right) ^{2\times a}")]
-    [InlineData(@"\sin(x)^2(x)", @"\sin \left( x\right) ^2\times x", @"\sin \left( x\right) ^2\times x")]
-    [InlineData(@"\sin\ (x)^2(x)", @"\sin \left( x\right) ^2\times x", @"\sin \left( x\right) ^2\times x")]
-    [InlineData(@"\sin\; (x)^2(x)", @"\sin \left( x\right) ^2\times x", @"\sin \left( x\right) ^2\times x")]
-    [InlineData(@"\sin\ \; (x)^2(x)", @"\sin \left( x\right) ^2\times x", @"\sin \left( x\right) ^2\times x")]
-    [InlineData(@"\sin^a(x)^2(x)", @"\sin \left( x\right) ^{a\times 2}\times x", @"\sin \left( x\right) ^{2\times a}\times x")]
-    [InlineData(@"\sin^a\ (x)^2(x)", @"\sin \left( x\right) ^{a\times 2}\times x", @"\sin \left( x\right) ^{2\times a}\times x")]
-    [InlineData(@"\sin^a\; (x)^2(x)", @"\sin \left( x\right) ^{a\times 2}\times x", @"\sin \left( x\right) ^{2\times a}\times x")]
-    [InlineData(@"\sin^a\ \; (x)^2(x)", @"\sin \left( x\right) ^{a\times 2}\times x", @"\sin \left( x\right) ^{2\times a}\times x")]
-    public void Parentheses(string latex, string converted, string result) {
-      Test(latex, converted, result);
-      Test(latex.Replace("(", @"\left(").Replace(")", @"\right)"), converted, result);
-    }
-    [Fact] void T() => throw new System.Exception(AngouriMath.MathS.FromString("a+b=c").ToString());
+namespace CSharpMath.Evaluation.Tests {
+  using Atom;
+  public class MathSTests {
+    MathList ParseLaTeX(string latex) =>
+      LaTeXParser.MathListFromLaTeX(latex).Match(list => list, e => throw new Xunit.Sdk.XunitException(e));
+    Entity ParseMath(string latex) =>
+      MathS.FromMathList(ParseLaTeX(latex)).Match(entity => entity, e => throw new Xunit.Sdk.XunitException(e));
+    void Test(string input, string converted, string result) {
+      var math = ParseMath(input);
+      Assert.Equal(converted, LaTeXParser.MathListToLaTeX(MathS.ToMathList(math)).ToString());
+      // Ensure that the converted entity is valid by simplifying it
+      Assert.Equal(result, LaTeXParser.MathListToLaTeX(MathS.ToMathList(math.Simplify())).ToString());
+    }
+    [Theory]
+    [InlineData("1")]
+    [InlineData("1234")]
+    [InlineData(" 1234")]
+    [InlineData("1234 ")]
+    [InlineData(" 1234 ")]
+    [InlineData("1234 5678")]
+    [InlineData(" 1234 5678")]
+    [InlineData("1234 5678 ")]
+    [InlineData(" 1234 5678 ")]
+    public void Numbers(string number) => Test(number, number.Replace(" ", null), number.Replace(" ", null));
+    [Theory]
+    [InlineData("a", "a", "a")]
+    [InlineData("ab", @"a\times b", @"a\times b")]
+    [InlineData(@"\alpha", @"α", "α")]
+    [InlineData(@"\pi", @"pi", @"pi")]
+    [InlineData(@"\alpha\pi", @"α\times pi", @"pi\times α")]
+    [InlineData("abc", @"a\times b\times c", @"a\times b\times c")]
+    [InlineData("3a", @"3\times a", @"3\times a")]
+    [InlineData("3ab", @"3\times a\times b", @"3\times a\times b")]
+    [InlineData("3a3", @"3\times a\times 3", @"9\times a")]
+    [InlineData("3aa", @"3\times a\times a", @"3\times a^2")]
+    public void Variables(string input, string converted, string result) => Test(input, converted, result);
+    [Theory]
+    [InlineData("a + b", @"a+b", "a+b")]
+    [InlineData("a - b", @"a-b", "a-b")]
+    [InlineData("a * b", @"a\times b", @"a\times b")]
+    [InlineData(@"a\times b", @"a\times b", @"a\times b")]
+    [InlineData(@"a\cdot b", @"a\times b", @"a\times b")]
+    [InlineData(@"a / b", @"\frac{a}{b}", @"\frac{a}{b}")]
+    [InlineData(@"a\div b", @"\frac{a}{b}", @"\frac{a}{b}")]
+    [InlineData(@"\frac ab", @"\frac{a}{b}", @"\frac{a}{b}")]
+    [InlineData("a + b + c", @"a+b+c", "a+b+c")]
+    [InlineData("a + b - c", @"a+b-c", "a+b-c")]
+    [InlineData("a + b * c", @"a+b\times c", @"a+b\times c")]
+    [InlineData("a + b / c", @"a+\frac{b}{c}", @"a+\frac{b}{c}")]
+    [InlineData("a - b + c", @"a-b+c", "a+c-b")]
+    [InlineData("a - b - c", @"a-b-c", @"a-\left( b+c\right) ")]
+    [InlineData("a - b * c", @"a-b\times c", @"a-b\times c")]
+    [InlineData("a - b / c", @"a-\frac{b}{c}", @"a-\frac{b}{c}")]
+    [InlineData("a * b + c", @"a\times b+c", @"a\times b+c")]
+    [InlineData("a * b - c", @"a\times b-c", @"a\times b-c")]
+    [InlineData("a * b * c", @"a\times b\times c", @"a\times b\times c")]
+    [InlineData("a * b / c", @"\frac{a\times b}{c}", @"\frac{a\times b}{c}")]
+    [InlineData("a / b + c", @"\frac{a}{b}+c", @"\frac{a}{b}+c")]
+    [InlineData("a / b - c", @"\frac{a}{b}-c", @"\frac{a}{b}-c")]
+    [InlineData("a / b * c", @"\frac{a}{b}\times c", @"\frac{a\times c}{b}")]
+    [InlineData("a / b / c", @"\frac{\frac{a}{b}}{c}", @"\frac{\frac{a}{b}}{c}")]
+    [InlineData(@"2+\frac ab", @"2+\frac{a}{b}", @"2+\frac{a}{b}")]
+    [InlineData(@"\frac ab+2", @"\frac{a}{b}+2", @"2+\frac{a}{b}")]
+    [InlineData(@"2-\frac ab", @"2-\frac{a}{b}", @"2-\frac{a}{b}")]
+    [InlineData(@"\frac ab-2", @"\frac{a}{b}-2", @"\frac{a}{b}-2")]
+    [InlineData(@"2*\frac ab", @"2\times \frac{a}{b}", @"\frac{2\times a}{b}")]
+    [InlineData(@"\frac ab*2", @"\frac{a}{b}\times 2", @"\frac{2\times a}{b}")]
+    [InlineData(@"2/\frac ab", @"\frac{2}{\frac{a}{b}}", @"\frac{2\times b}{a}")]
+    [InlineData(@"\frac ab/2", @"\frac{\frac{a}{b}}{2}", @"\frac{\frac{a}{2}}{b}")]
+    public void BinaryOperators(string latex, string converted, string result) => Test(latex, converted, result);
+    [Theory]
+    [InlineData("+a", "a", "a")]
+    [InlineData("-a", "-a", "-a")]
+    [InlineData("++a", "a", "a")]
+    [InlineData("+-a", "-a", "-a")]
+    [InlineData("-+a", "-a", "-a")]
+    [InlineData("--a", "--a", "a")]
+    [InlineData("+++a", "a", "a")]
+    [InlineData("---a", "---a", "-a")]
+    [InlineData("a++a", "a+a", @"2\times a")]
+    [InlineData("a+-a", "a+-a", "0")]
+    [InlineData("a-+a", "a-a", "0")]
+    [InlineData("a--a", "a--a", @"2\times a")]
+    [InlineData("a+++a", "a+a", @"2\times a")]
+    [InlineData("a---a", "a---a", "0")]
+    [InlineData("a*+a", @"a\times a", "a^2")]
+    [InlineData("a*-a", @"a\times -a", "-a^2")]
+    [InlineData("+a*+a", @"a\times a", "a^2")]
+    [InlineData("-a*-a", @"-a\times -a", "a^2")]
+    [InlineData("a/+a", @"\frac{a}{a}", "1")]
+    [InlineData("a/-a", @"\frac{a}{-a}", "-1")]
+    [InlineData("+a/+a", @"\frac{a}{a}", "1")]
+    [InlineData("-a/-a", @"\frac{-a}{-a}", "1")]
+    public void UnaryOperators(string latex, string converted, string result) => Test(latex, converted, result);
+    [Theory]
+    [InlineData("2^2", "2^2", "4")]
+    [InlineData("a^a", "a^a", "a^a")]
+    [InlineData("a^{a+b}", "a^{a+b}", "a^{a+b}")]
+    [InlineData("a^{-2}", "a^{-2}", "a^{-2}")]
+    [InlineData("2^{3^4}", "2^{3^4}", "2.4178516392292583E+24")]
+    [InlineData("4^{3^2}", "4^{3^2}", "262144")]
+    [InlineData("4^3+2", "4^3+2", "66")]
+    [InlineData("2+3^4", "2+3^4", "83")]
+    [InlineData("4^3*2", @"4^3\times 2", "128")]
+    [InlineData("2*3^4", @"2\times 3^4", "162")]
+    [InlineData("1/x", @"\frac{1}{x}", @"x^{-1}")]
+    [InlineData("2/x", @"\frac{2}{x}", @"\frac{2}{x}")]
+    [InlineData("0^x", @"0^x", @"0")]
+    [InlineData("1^x", @"1^x", @"1")]
+    [InlineData("x^0", @"x^0", @"1")]
+    [InlineData(@"{\frac 12}^4", @"\left( \frac{1}{2}\right) ^4", "0.0625")]
+    [InlineData(@"\sqrt2", @"\sqrt{2}", "1.4142135623730951")]
+    [InlineData(@"\sqrt2^2", @"\left( \sqrt{2}\right) ^2", "2.0000000000000004")]
+    [InlineData(@"\sqrt[3]2", @"2^{\frac{1}{3}}", "1.2599210498948732")]
+    [InlineData(@"\sqrt[3]2^3", @"\left( 2^{\frac{1}{3}}\right) ^3", "2")]
+    [InlineData(@"\sqrt[3]2^{1+1+1}", @"\left( 2^{\frac{1}{3}}\right) ^{1+1+1}", "2")]
+    [InlineData(@"\sqrt[1+1+1]2^{1+1+1}", @"\left( 2^{\frac{1}{1+1+1}}\right) ^{1+1+1}", "2")]
+    public void Exponents(string latex, string converted, string result) => Test(latex, converted, result);
+    [Theory]
+    [InlineData(@"\sin x", @"\sin \left( x\right) ", @"\sin \left( x\right) ")]
+    [InlineData(@"\cos x", @"\cos \left( x\right) ", @"\cos \left( x\right) ")]
+    [InlineData(@"\tan x", @"\tan \left( x\right) ", @"\tan \left( x\right) ")]
+    [InlineData(@"\cot x", @"\cot \left( x\right) ", @"\cot \left( x\right) ")]
+    [InlineData(@"\sec x", @"\frac{1}{\cos \left( x\right) }", @"\cos \left( x\right) ^{-1}")]
+    [InlineData(@"\csc x", @"\frac{1}{\sin \left( x\right) }", @"\sin \left( x\right) ^{-1}")]
+    [InlineData(@"\arcsin x", @"\arcsin \left( x\right) ", @"\arcsin \left( x\right) ")]
+    [InlineData(@"\arccos x", @"\arccos \left( x\right) ", @"\arccos \left( x\right) ")]
+    [InlineData(@"\arctan x", @"\arctan \left( x\right) ", @"\arctan \left( x\right) ")]
+    [InlineData(@"\arccot x", @"\arccot \left( x\right) ", @"\arccot \left( x\right) ")]
+    [InlineData(@"\arcsec x", @"\arccos \left( \frac{1}{x}\right) ", @"\arccos \left( x^{-1}\right) ")]
+    [InlineData(@"\arccsc x", @"\arcsin \left( \frac{1}{x}\right) ", @"\arcsin \left( x^{-1}\right) ")]
+    [InlineData(@"\ln x", @"\ln \left( x\right) ", @"\ln \left( x\right) ")]
+    [InlineData(@"\log x", @"\log \left( x\right) ", @"\log \left( x\right) ")]
+    [InlineData(@"\log_3 x", @"\log _3\left( x\right) ", @"\log _3\left( x\right) ")]
+    [InlineData(@"\log_{10} x", @"\log \left( x\right) ", @"\log \left( x\right) ")]
+    [InlineData(@"\log_e x", @"\ln \left( x\right) ", @"\ln \left( x\right) ")]
+    [InlineData(@"2\sin x", @"2\times \sin \left( x\right) ", @"2\times \sin \left( x\right) ")]
+    [InlineData(@"\sin 2x", @"\sin \left( 2\times x\right) ", @"\sin \left( 2\times x\right) ")]
+    [InlineData(@"\sin xy", @"\sin \left( x\times y\right) ", @"\sin \left( x\times y\right) ")]
+    [InlineData(@"\cos +x", @"\cos \left( x\right) ", @"\cos \left( x\right) ")]
+    [InlineData(@"\tan -x", @"\tan \left( -x\right) ", @"\tan \left( -x\right) ")]
+    [InlineData(@"\cot x*y", @"\cot \left( x\right) \times y", @"\cot \left( x\right) \times y")]
+    [InlineData(@"\cot x/y", @"\frac{\cot \left( x\right) }{y}", @"\frac{\cot \left( x\right) }{y}")]
+    [InlineData(@"\cos \arccos x", @"\cos \left( \arccos \left( x\right) \right) ", @"x")]
+    [InlineData(@"\sin^2 x", @"\sin \left( x\right) ^2", @"\sin \left( x\right) ^2")]
+    [InlineData(@"\sin^2 xy+\cos^2 yx", @"\sin \left( x\times y\right) ^2+\cos \left( y\times x\right) ^2", @"1")]
+    [InlineData(@"\log^2 x", @"\log \left( x\right) ^2", @"\log \left( x\right) ^2")]
+    [InlineData(@"\ln^2 x", @"\ln \left( x\right) ^2", @"\ln \left( x\right) ^2")]
+    [InlineData(@"\log_{10}^2 x", @"\log \left( x\right) ^2", @"\log \left( x\right) ^2")]
+    [InlineData(@"\log_3^2 x", @"\log _3\left( x\right) ^2", @"\log _3\left( x\right) ^2")]
+    public void LargeOperators(string latex, string converted, string result) => Test(latex, converted, result);
+    [Theory]
+    [InlineData(@"1+(2+3)", @"1+2+3", @"6")]
+    [InlineData(@"1+((2+3))", @"1+2+3", @"6")]
+    [InlineData(@"2*(3+4)", @"2\times \left( 3+4\right) ", @"14")]
+    [InlineData(@"(3+4)*2", @"\left( 3+4\right) \times 2", @"14")]
+    [InlineData(@"(5+6)^2", @"\left( 5+6\right) ^2", @"121")]
+    [InlineData(@"+(1)", @"1", @"1")]
+    [InlineData(@"+(-1)", @"-1", @"-1")]
+    [InlineData(@"-(+1)", @"-1", @"-1")]
+    [InlineData(@"-(-1)", @"--1", @"1")]
+    [InlineData(@"--(--1)", @"----1", @"1")]
+    [InlineData(@"(2+3)^{(4+5)}", @"\left( 2+3\right) ^{4+5}", @"1953125")]
+    [InlineData(@"(2+3)^{((4)+5)}", @"\left( 2+3\right) ^{4+5}", @"1953125")]
+    [InlineData(@"2\sin(x)", @"2\times \sin \left( x\right) ", @"2\times \sin \left( x\right) ")]
+    [InlineData(@"(2)\sin(x)", @"2\times \sin \left( x\right) ", @"2\times \sin \left( x\right) ")]
+    [InlineData(@"\sin(x+1)", @"\sin \left( x+1\right) ", @"\sin \left( 1+x\right) ")]
+    [InlineData(@"\sin((x+1))", @"\sin \left( x+1\right) ", @"\sin \left( 1+x\right) ")]
+    [InlineData(@"\sin(2(x+1))", @"\sin \left( 2\times \left( x+1\right) \right) ", @"\sin \left( 2\times \left( 1+x\right) \right) ")]
+    [InlineData(@"\sin((x+1)+2)", @"\sin \left( x+1+2\right) ", @"\sin \left( 3+x\right) ")]
+    [InlineData(@"\sin(x)2", @"\sin \left( x\right) \times 2", @"2\times \sin \left( x\right) ")]
+    [InlineData(@"\sin(x)(x+1)", @"\sin \left( x\right) \times \left( x+1\right) ", @"\sin \left( x\right) \times \left( 1+x\right) ")]
+    [InlineData(@"\sin(x)(x+1)(x)", @"\sin \left( x\right) \times \left( x+1\right) \times x", @"\sin \left( x\right) \times \left( 1+x\right) \times x")]
+    [InlineData(@"\sin(x^2)", @"\sin \left( x^2\right) ", @"\sin \left( x^2\right) ")]
+    [InlineData(@"\sin\ (x^2)", @"\sin \left( x^2\right) ", @"\sin \left( x^2\right) ")]
+    [InlineData(@"\sin\; (x^2)", @"\sin \left( x^2\right) ", @"\sin \left( x^2\right) ")]
+    [InlineData(@"\sin\ \; (x^2)", @"\sin \left( x^2\right) ", @"\sin \left( x^2\right) ")]
+    [InlineData(@"\sin^3(x)", @"\sin \left( x\right) ^3", @"\sin \left( x\right) ^3")]
+    [InlineData(@"\sin^3\ (x)", @"\sin \left( x\right) ^3", @"\sin \left( x\right) ^3")]
+    [InlineData(@"\sin^3\; (x)", @"\sin \left( x\right) ^3", @"\sin \left( x\right) ^3")]
+    [InlineData(@"\sin^3\ \; (x)", @"\sin \left( x\right) ^3", @"\sin \left( x\right) ^3")]
+    [InlineData(@"\sin(x)^2", @"\sin \left( x\right) ^2", @"\sin \left( x\right) ^2")]
+    [InlineData(@"\sin\ (x)^2", @"\sin \left( x\right) ^2", @"\sin \left( x\right) ^2")]
+    [InlineData(@"\sin\; (x)^2", @"\sin \left( x\right) ^2", @"\sin \left( x\right) ^2")]
+    [InlineData(@"\sin\ \; (x)^2", @"\sin \left( x\right) ^2", @"\sin \left( x\right) ^2")]
+    [InlineData(@"\sin^a(x)", @"\sin \left( x\right) ^a", @"\sin \left( x\right) ^a")]
+    [InlineData(@"\sin^a(x)^2", @"\sin \left( x\right) ^{a\times 2}", @"\sin \left( x\right) ^{2\times a}")]
+    [InlineData(@"\sin^a\ (x)^2", @"\sin \left( x\right) ^{a\times 2}", @"\sin \left( x\right) ^{2\times a}")]
+    [InlineData(@"\sin^a\; (x)^2", @"\sin \left( x\right) ^{a\times 2}", @"\sin \left( x\right) ^{2\times a}")]
+    [InlineData(@"\sin^a\ \; (x)^2", @"\sin \left( x\right) ^{a\times 2}", @"\sin \left( x\right) ^{2\times a}")]
+    [InlineData(@"\sin(x)^2(x)", @"\sin \left( x\right) ^2\times x", @"\sin \left( x\right) ^2\times x")]
+    [InlineData(@"\sin\ (x)^2(x)", @"\sin \left( x\right) ^2\times x", @"\sin \left( x\right) ^2\times x")]
+    [InlineData(@"\sin\; (x)^2(x)", @"\sin \left( x\right) ^2\times x", @"\sin \left( x\right) ^2\times x")]
+    [InlineData(@"\sin\ \; (x)^2(x)", @"\sin \left( x\right) ^2\times x", @"\sin \left( x\right) ^2\times x")]
+    [InlineData(@"\sin^a(x)^2(x)", @"\sin \left( x\right) ^{a\times 2}\times x", @"\sin \left( x\right) ^{2\times a}\times x")]
+    [InlineData(@"\sin^a\ (x)^2(x)", @"\sin \left( x\right) ^{a\times 2}\times x", @"\sin \left( x\right) ^{2\times a}\times x")]
+    [InlineData(@"\sin^a\; (x)^2(x)", @"\sin \left( x\right) ^{a\times 2}\times x", @"\sin \left( x\right) ^{2\times a}\times x")]
+    [InlineData(@"\sin^a\ \; (x)^2(x)", @"\sin \left( x\right) ^{a\times 2}\times x", @"\sin \left( x\right) ^{2\times a}\times x")]
+    public void Parentheses(string latex, string converted, string result) {
+      Test(latex, converted, result);
+      Test(latex.Replace("(", @"\left(").Replace(")", @"\right)"), converted, result);
+    }
+    [Fact(Skip="Not a real test, this is a playground")] void T() => throw new System.Exception(AngouriMath.MathS.FromString("a+b=c").ToString());
   }
 }


Use CDNJS for everything

Use CDNJS for everything

--- CarpoolPlanner/Views/Shared/Layout.cshtml
+++ CarpoolPlanner/Views/Shared/Layout.cshtml
@@ -8,14 +8,14 @@
   <meta charset="utf-8" />
   <meta name="viewport" content="width=device-width, initial-scale=1.0" />
   <title>@((!string.IsNullOrEmpty(ViewBag.Title) ? ViewBag.Title + " - " : "") + AppUtils.AppName)</title>
-  <link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css" rel="stylesheet" />
+  <link href="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.1/css/bootstrap.min.css" rel="stylesheet" />
   <link href="/Content/datetimepicker.css" rel="stylesheet" />
   <link href="~/Content/Site.css" rel="stylesheet" />
   <!-- Load angular in the head to make sure the user doesn't see Angular brackets for a moment at the beginning -->
-  <script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
-  <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.8/angular.min.js"></script>
-  <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.8/angular-animate.js"></script>
-  <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script>
+  <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
+  <script src="//cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.8/angular.min.js"></script>
+  <script src="//cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.8/angular-animate.min.js"></script>
+  <script src="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.1/js/bootstrap.min.js"></script>
   <script src="//cdnjs.cloudflare.com/ajax/libs/angular-ui-bootstrap/0.12.0/ui-bootstrap.min.js"></script>
   <script src="//cdnjs.cloudflare.com/ajax/libs/angular-ui-bootstrap/0.12.0/ui-bootstrap-tpls.min.js"></script>
   <script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.8.4/moment.min.js"></script>


bmarks updated

bmarks updated


Removed unecessary call to .Set<T>

Removed unecessary call to .Set<T>

--- CmsEngine.Data/Repositories/Repository.cs
+++ CmsEngine.Data/Repositories/Repository.cs
@@ -87,7 +87,7 @@
                 throw new ArgumentNullException(nameof(entity));
             }

-            await dbContext.Set<TEntity>().AddAsync(entity);
+            await dbContext.AddAsync(entity);
         }

         public async Task InsertRange(IEnumerable<TEntity> entities)
@@ -97,7 +97,7 @@
                 throw new ArgumentNullException(nameof(entities));
             }

-            await dbContext.Set<TEntity>().AddRangeAsync(entities);
+            await dbContext.AddRangeAsync(entities);
         }

         public void Update(TEntity entity)
@@ -153,7 +153,7 @@
             EntityEntry dbEntityEntry = dbContext.Entry(entity);
             if (dbEntityEntry.State == EntityState.Detached)
             {
-                dbContext.Set<TEntity>().Attach(entity);
+                dbContext.Attach(entity);
             }
         }


Code generator now generates properties instead of fields so that classes can be virtual and have interfaces.

--- CodeOutputPlugin/Manager/CodeGenerator.cs
+++ CodeOutputPlugin/Manager/CodeGenerator.cs
@@ -908,7 +908,7 @@
             bool isPublic = true;
             string accessString = isPublic ? "public " : "";

-            stringBuilder.AppendLine($"{tabs}{accessString}{className} {instance.Name};");
+            stringBuilder.AppendLine($"{tabs}{accessString}{className} {instance.Name} {{ get; private set; }}");
         }

         private static string GetClassNameForType(string gumType, VisualApi visualApi)


Update Tests.cs

Update Tests.cs

--- CodingChallenge.FamilyTree.Tests/Tests.cs
+++ CodingChallenge.FamilyTree.Tests/Tests.cs
@@ -7,7 +7,7 @@
     public class TreeTests
     {

-        [Theory]
+        [Fact]
         public void if_the_person_exists_in_tree_the_result_should_be_january()
         {
             var tree = FamilyTreeGenerator.Make();
@@ -15,7 +15,7 @@
             result.ShouldEqual("January");
         }

-        [Theory]
+        [Fact]
         public void if__the_person_exists_at_the_top_tree_the_result_should_be_may()
         {
             var tree = FamilyTreeGenerator.Make();
@@ -23,7 +23,7 @@
             result.ShouldEqual("May");
         }

-        [Theory]
+        [Fact]
         public void if_the_person_does_not_exist_in_the_tree_the_result_should_be_empty()
         {
             var tree = FamilyTreeGenerator.Make();


Change Assembly version to 1.0.1.18

Change Assembly version to 1.0.1.18

--- CompareFolders/Properties/AssemblyInfo.cs
+++ CompareFolders/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.1.17")]
-[assembly: AssemblyFileVersion("1.0.1.17")]
+[assembly: AssemblyVersion("1.0.1.18")]
+[assembly: AssemblyFileVersion("1.0.1.18")]


remove a debug line

remove a debug line

--- Configuration/AzureApplicationSettings.cs
+++ Configuration/AzureApplicationSettings.cs
@@ -120,8 +120,6 @@
         /// <returns>Setting value or null if such setting does not exist.</returns>
         internal string GetSetting(string name)
         {
-            Debug.Assert(!string.IsNullOrEmpty(name));
-
             string value = null;

             value = GetValue("ServiceRuntime", name, GetServiceRuntimeSetting);


Removed conversion operator to IntPtr completely

--- Core/InteropServices/GenericSafeHandle.cs
+++ Core/InteropServices/GenericSafeHandle.cs
@@ -38,7 +38,7 @@
 		/// Performs an explicit conversion from <see cref="GenericSafeHandle"/> to <see cref="IntPtr"/>.
 		/// <param name="h">The <see cref="GenericSafeHandle"/> instance.</param>
 		/// <returns>The value of the handle. Use caution when using this value as it can be closed by the disposal of the parent <see cref="GenericSafeHandle"/>.</returns>
-		public static explicit operator IntPtr(GenericSafeHandle h) => h.DangerousGetHandle();
+		//public static explicit operator IntPtr(GenericSafeHandle h) => h.DangerousGetHandle();

 		/// When overridden in a derived class, executes the code required to free the handle.
 		/// <returns>


Fix HR mod being applied to non-fruit objects

--- osu.Game.Rulesets.Catch/Mods/CatchModHardRock.cs
+++ osu.Game.Rulesets.Catch/Mods/CatchModHardRock.cs
@@ -20,6 +20,9 @@

         public void ApplyToHitObject(HitObject hitObject)
         {
+            if (!(hitObject is Fruit))
+                return;
+
             var catchObject = (CatchHitObject)hitObject;

             float position = catchObject.X;


Fix TestSceneColumn columns not getting a width

--- osu.Game.Rulesets.Mania.Tests/TestSceneColumn.cs
+++ osu.Game.Rulesets.Mania.Tests/TestSceneColumn.cs
@@ -28,7 +28,9 @@
         {
             typeof(Column),
             typeof(ColumnBackground),
-            typeof(ColumnHitObjectArea)
+            typeof(ColumnHitObjectArea),
+            typeof(DefaultKeyArea),
+            typeof(DefaultHitTarget)
         };

         [Cached(typeof(IReadOnlyList<Mod>))]
@@ -94,6 +96,7 @@
             {
                 Anchor = Anchor.Centre,
                 Origin = Anchor.Centre,
+                Width = 50,
                 Height = 0.85f,
                 AccentColour = Color4.OrangeRed,
                 Action = { Value = action },


Add dropdown option to export score

Add dropdown option to export score

--- osu.Game/Online/Leaderboards/LeaderboardScore.cs
+++ osu.Game/Online/Leaderboards/LeaderboardScore.cs
@@ -60,6 +60,9 @@

         [Resolved(CanBeNull = true)]
         private SongSelect songSelect { get; set; }
+
+        [Resolved]
+        private ScoreManager scoreManager { get; set; }

         public LeaderboardScore(ScoreInfo score, int? rank, bool allowHighlight = true)
         {
@@ -388,6 +391,9 @@
                 if (score.Mods.Length > 0 && modsContainer.Any(s => s.IsHovered) && songSelect != null)
                     items.Add(new OsuMenuItem("Use these mods", MenuItemType.Highlighted, () => songSelect.Mods.Value = score.Mods));

+                if (score.Files.Count > 0)
+                    items.Add(new OsuMenuItem("Export", MenuItemType.Standard, () => scoreManager.Export(score)));
+
                 if (score.ID != 0)
                     items.Add(new OsuMenuItem("Delete", MenuItemType.Destructive, () => dialogOverlay?.Push(new LocalScoreDeleteDialog(score))));


Fix some errors being completely ignored

--- osu.Game/Screens/Multi/Components/RoomManager.cs
+++ osu.Game/Screens/Multi/Components/RoomManager.cs
@@ -76,10 +76,7 @@

             req.Failure += exception =>
             {
-                if (req.Result != null)
-                    onError?.Invoke(req.Result.Error);
-                else
-                    Logger.Log($"Failed to create the room: {exception}", level: LogLevel.Important);
+                onError?.Invoke(req.Result?.Error ?? exception.Message);
             };

             api.Queue(req);


Add a new ProxyAttribute to decorate return types which are hidden proxy objects

--- src/generator.cs
+++ src/generator.cs
@@ -258,6 +258,10 @@
 	public TargetAttribute () {}
 }

+public class ProxyAttribute : Attribute {
+	public ProxyAttribute () {}
+}
+
 public class StaticAttribute : Attribute {
 	public StaticAttribute () {}
 }
@@ -811,26 +815,11 @@
 		return GetAttribute (mi, typeof (BindAttribute)) as BindAttribute;
 	}

-	public bool HasAttribute (PropertyInfo pi, Type t)
-	{
-		return pi.GetCustomAttributes (t, true).Length > 0;
-	}
-
-	public bool HasAttribute (Type queryType, Type t)
-	{
-		return queryType.GetCustomAttributes (t, true).Length > 0;
-	}
-
-	public bool HasAttribute (MethodInfo mi, Type t)
-	{
-		return mi.GetCustomAttributes (t, true).Length > 0;
-	}
-
-	public bool HasAttribute (ParameterInfo pi, Type t)
-	{
-		return pi.GetCustomAttributes (t, true).Length > 0;
-	}
-
+	public bool HasAttribute (ICustomAttributeProvider i, Type t)
+	{
+		return i.GetCustomAttributes (t, true).Length > 0;
+	}
+
 	public bool IsTarget (ParameterInfo pi)
 	{
 		return HasAttribute (pi, typeof (TargetAttribute));
@@ -1564,6 +1553,7 @@
 			(HasAttribute (mi, typeof (FactoryAttribute))) ||
 			(assign != null && (IsWrappedType (mi.ReturnType) || (mi.ReturnType.IsArray && IsWrappedType (mi.ReturnType.GetElementType ())))) ||
 			(mi.ReturnType.IsSubclassOf (typeof (Delegate))) ||
+			(HasAttribute (mi.ReturnTypeCustomAttributes, typeof (ProxyAttribute))) ||
 			(mi.Name != "Constructor" && byRefPostProcessing.Length > 0 && mi.ReturnType != typeof (void));

@@ -1613,6 +1603,9 @@
 		if (byRefPostProcessing.Length > 0)
 			print (byRefPostProcessing.ToString ());
 		if (use_temp_return) {
+			if (HasAttribute (mi.ReturnTypeCustomAttributes, typeof (ProxyAttribute)))
+				print ("ret.SetAsProxy ();");
+
 			if (mi.ReturnType.IsSubclassOf (typeof (Delegate))) {
 				print ("return ({0}) (ret->global_handle != IntPtr.Zero ? GCHandle.FromIntPtr (ret->global_handle).Target : GCHandle.FromIntPtr (ret->local_handle).Target);", FormatType (mi.DeclaringType, mi.ReturnType));
 			} else {


Add closed property to tab

Add closed property to tab

--- WalletWasabi.Gui/ViewModels/WasabiDocumentTabViewModel.cs
+++ WalletWasabi.Gui/ViewModels/WasabiDocumentTabViewModel.cs
@@ -4,6 +4,7 @@
 using Dock.Model;
 using ReactiveUI;
 using System;
+using System.Threading.Tasks;

 namespace WalletWasabi.Gui.ViewModels
 {
@@ -25,11 +26,18 @@
 		public double Height { get; set; }
 		public IView Parent { get; set; }
 		private bool _isSelected;
+		private bool _isClosed;

 		public bool IsSelected
 		{
 			get => _isSelected;
 			set => this.RaiseAndSetIfChanged(ref _isSelected, value);
+		}
+
+		public bool IsClosed
+		{
+			get => _isClosed;
+			set => this.RaiseAndSetIfChanged(ref _isClosed, value);
 		}

 		public bool IsDirty { get; set; }
@@ -46,13 +54,14 @@

 		public virtual void OnOpen()
 		{
+			IsClosed = false;
 		}

 		public virtual bool OnClose()
 		{
 			IsSelected = false;
 			IoC.Get<IShell>().RemoveDocument(this);
-
+			IsClosed = true;
 			return true;
 		}
 	}


Remove assertion to fix "expression always true" inspection

--- osu.Game/Screens/OnlinePlay/Multiplayer/Participants/ParticipantPanel.cs
+++ osu.Game/Screens/OnlinePlay/Multiplayer/Participants/ParticipantPanel.cs
@@ -2,7 +2,6 @@
 // See the LICENCE file in the repository root for full licence text.

 using System.Collections.Generic;
-using System.Diagnostics;
 using System.Linq;
 using osu.Framework.Allocation;
 using osu.Framework.Extensions.Color4Extensions;
@@ -187,8 +186,6 @@
             const double fade_time = 50;

             var currentItem = Playlist.GetCurrentItem();
-            Debug.Assert(currentItem != null);
-
             var ruleset = currentItem != null ? rulesets.GetRuleset(currentItem.RulesetID)?.CreateInstance() : null;

             int? currentModeRank = ruleset != null ? User.User?.RulesetsStatistics?.GetValueOrDefault(ruleset.ShortName)?.GlobalRank : null;


whitespace and style changes

whitespace and style changes

no actual code changes were made in this commit

--- Project-Aurora/Project-Aurora/Devices/Uniwill/UniwillDevice.cs
+++ Project-Aurora/Project-Aurora/Devices/Uniwill/UniwillDevice.cs
@@ -14,24 +14,20 @@

 namespace Aurora.Devices.Uniwill
 {
-
     enum GAMECENTERTYPE
     {
         NONE = 0,
         GAMINGTCENTER = 1,
         CONTROLCENTER = 2
-
     }
-

     public class UniwillDevice : Device
     {
-
-       // Generic Variables
+        // Generic Variables
         private string devicename = "Uniwill";
         private bool isInitialized = false;

-        private System.Diagnostics.Stopwatch watch = new System.Diagnostics.Stopwatch();
+        private Stopwatch watch = new Stopwatch();
         private long lastUpdateTime = 0;

         System.Timers.Timer regTimer;
@@ -39,24 +35,22 @@
         const string subkey = @"SOFTWARE\OEM\Aurora";
         const string keyName = Root + "\\" + subkey;
         int SwitchOn = 0;
-
+
         private AuroraInterface keyboard = null;
-
+
         GAMECENTERTYPE GamingCenterType = 0;
-
+
         float brightness = 1f;
         public UniwillDevice()
         {
             devicename = KeyboardFactory.GetOEMName();
             ChoiceGamingCenter();
-
-        }
-
+        }

         private void ChoiceGamingCenter()
         {
             GamingCenterType = CheckGC();
-
+
             if (GamingCenterType == GAMECENTERTYPE.GAMINGTCENTER)
             {
                 regTimer = new System.Timers.Timer();
@@ -64,20 +58,18 @@
                 regTimer.Elapsed += OnRegChanged;
                 regTimer.Stop();
                 regTimer.Start();
-
-            }
-        }
-
-
+
+            }
+        }

         private GAMECENTERTYPE CheckGC()
         {
             try
             {
-                int Control = (int)Registry.GetValue(keyName, "AuroraSwitch",null);
+                int Control = (int)Registry.GetValue(keyName, "AuroraSwitch", null);
                 GamingCenterType = GAMECENTERTYPE.GAMINGTCENTER;
                 SwitchOn = Control;
-
+
             }
             catch (Exception ex)
             {
@@ -86,28 +78,23 @@
             }
             return GamingCenterType;
         }
-

         public bool CheckGCPower()
         {
-           if(GamingCenterType== GAMECENTERTYPE.GAMINGTCENTER)
-           {
+            if (GamingCenterType == GAMECENTERTYPE.GAMINGTCENTER)
+            {
                 int Control = (int)Registry.GetValue(keyName, "AuroraSwitch", 0);
-                if (Control == 0)
-                    return false;
-                else
-                    return true;
-            }
-
-            else
-              return true;
-        }
-
-
+                return Control != 0;
+            }
+            else
+            {
+                return true;
+            }
+        }
         private void OnRegChanged(object sender, EventArgs e)
         {
-            int newSwtich =(int) Registry.GetValue(keyName, "AuroraSwitch", 0);
-            if(SwitchOn != newSwtich)
+            int newSwtich = (int)Registry.GetValue(keyName, "AuroraSwitch", 0);
+            if (SwitchOn != newSwtich)
             {
                 SwitchOn = newSwtich;
                 if (CheckGCPower())
@@ -119,50 +106,44 @@
                     bRefreshOnce = true;
                     isInitialized = false;
                     Shutdown();
-
-                }
-
-            }
-
-
+                }
+            }
         }

         public string GetDeviceName()
-            {
-                return devicename;
-            }
-
-            public string GetDeviceDetails()
-            {
-                if (isInitialized)
-                {
-                    return devicename + ": Initialized";
-                }
-                else
-                {
-                    return devicename + ": Not initialized";
-                }
-            }
-
-            public bool Initialize()
-            {
-
-
-              if (!isInitialized && CheckGCPower())
-                {
+        {
+            return devicename;
+        }
+
+        public string GetDeviceDetails()
+        {
+            if (isInitialized)
+            {
+                return devicename + ": Initialized";
+            }
+            else
+            {
+                return devicename + ": Not initialized";
+            }
+        }
+
+        public bool Initialize()
+        {
+            if (!isInitialized && CheckGCPower())
+            {
                 try
                 {
-                    keyboard =   KeyboardFactory.CreateHIDDevice("hidkeyboard");
-                        if (keyboard!=null)
-                        {
-                            bRefreshOnce = true;
-                            isInitialized = true;
-                            //SetBrightness();
-                            return true;
-                        }
-
-                        isInitialized = false;
-                        return false;
+                    keyboard = KeyboardFactory.CreateHIDDevice("hidkeyboard");
+                    if (keyboard != null)
+                    {
+                        bRefreshOnce = true;
+                        isInitialized = true;
+                        //SetBrightness();
+                        return true;
+                    }
+
+                    isInitialized = false;
+                    return false;
                 }
                 catch (Exception ex)
                 {
@@ -172,56 +153,57 @@
                 isInitialized = false;
                 return false;
             }
-
-
-            return isInitialized;
-
-            }
-
-            public void Shutdown()
-            {
-                if (this.IsInitialized())
-                {
-                    if(CheckGCPower())
-                     keyboard?.release();
-
-                    bRefreshOnce = true;
-                    isInitialized = false;
-
-                }
-            }
-
-            public void Reset()
-            {
-                if (this.IsInitialized())
-                {
-                 if(CheckGCPower())
+
+            return isInitialized;
+        }
+
+        public void Shutdown()
+        {
+            if (this.IsInitialized())
+            {
+                if (CheckGCPower())
+                {
                     keyboard?.release();
-
-                 bRefreshOnce = true;
-                 isInitialized = false;
-
-                }
-
-            }
-
-            public bool Reconnect()
-            {
-                throw new NotImplementedException();
-            }
-
-            public bool IsInitialized()
-            {
-
-               return isInitialized;
-            }
-
-            public bool IsConnected()
-            {
-                 return isInitialized;
-           }
+                }
+
+                bRefreshOnce = true;
+                isInitialized = false;
+
+            }
+        }
+
+        public void Reset()
+        {
+            if (this.IsInitialized())
+            {
+                if (CheckGCPower())
+                {
+                    keyboard?.release();
+                }
+
+                bRefreshOnce = true;
+                isInitialized = false;
+            }
+        }
+
+        public bool Reconnect()
+        {
+            throw new NotImplementedException();
+        }
+
+        public bool IsInitialized()
+        {
+            return isInitialized;
+        }
+
+        public bool IsConnected()
+        {
+            return isInitialized;
+        }
+
         bool bRefreshOnce = true; // This is used to refresh effect between Row-Type and Fw-Type change or layout light level change
-        public bool UpdateDevice(Dictionary<DeviceKeys, Color> keyColors, DoWorkEventArgs e, bool forced = false)
+
+        public bool UpdateDevice(Dictionary<DeviceKeys, Color> keyColors, DoWorkEventArgs e, bool forced = false)
         {
             if (e.Cancel) return false;

@@ -229,53 +211,47 @@

             watch.Restart();

-
             //Alpha necessary for Global Brightness modifier
             var adjustedColors = keyColors.Select(kc => AdjustBrightness(kc));

             keyboard?.SetEffect(0x32, 0x00, bRefreshOnce, adjustedColors, e);

             bRefreshOnce = false;
-
+
             watch.Stop();

             lastUpdateTime = watch.ElapsedMilliseconds;

             return update_result;
-
-        }
-
+        }

         public bool UpdateDevice(DeviceColorComposition colorComposition, DoWorkEventArgs e, bool forced = false) => UpdateDevice(colorComposition.keyColors, e, forced);

         private KeyValuePair<DeviceKeys, Color> AdjustBrightness(KeyValuePair<DeviceKeys, Color> kc)
         {
             var newEntry = new KeyValuePair<DeviceKeys, Color>(kc.Key, System.Drawing.Color.FromArgb(255, Utils.ColorUtils.MultiplyColorByScalar(kc.Value, (kc.Value.A / 255.0D) * brightness)));
-            kc= newEntry;
+            kc = newEntry;
             return kc;
         }
-

         // Device Status Methods
         public bool IsKeyboardConnected()
-            {
-                return isInitialized;
-            }
-
-            public bool IsPeripheralConnected()
-            {
-                return isInitialized;
-            }
-
-            public string GetDeviceUpdatePerformance()
-            {
-                return (isInitialized ? lastUpdateTime + " ms" : "");
-            }
-
-            public VariableRegistry GetRegisteredVariables()
-            {
-                return new VariableRegistry();
-            }
-        }
-
+        {
+            return isInitialized;
+        }
+
+        public bool IsPeripheralConnected()
+        {
+            return isInitialized;
+        }
+        public string GetDeviceUpdatePerformance()
+        {
+            return (isInitialized ? lastUpdateTime + " ms" : "");
+        }
+
+        public VariableRegistry GetRegisteredVariables()
+        {
+            return new VariableRegistry();
+        }
+    }
 }


Apply HTTPS patch to TryNormalizeYoutubeUrl

--- src/libvideo.compat/DownloadUrlResolver.cs
+++ src/libvideo.compat/DownloadUrlResolver.cs
@@ -51,7 +51,7 @@
             if (!Query.TryGetParamValue("v", url, out value))
                 return false;

-            normalizedUrl = "http://youtube.com/watch?v=" + value;
+            normalizedUrl = "https://youtube.com/watch?v=" + value;
             return true;
         }
     }


v3.7.3-beta2

--- src/main/Service/WebsocketSenderService.cs
+++ src/main/Service/WebsocketSenderService.cs
@@ -13,6 +13,9 @@
     internal class WebsocketSenderService
     {
         private bool _isSendingMultipleFrames;
+
+        private readonly ConcurrentQueue<byte[]> _writePendingData = new ConcurrentQueue<byte[]>();
+        private bool _sendingData;

         internal WebsocketSenderService()
         {
@@ -136,8 +139,7 @@
             await WriteStreamAsync(tcpSocketClient, frame);
         }

-        readonly ConcurrentQueue<byte[]> writePendingData = new ConcurrentQueue<byte[]>();
-        bool sendingData = false;
+

         private async Task WriteStreamAsync(ITcpSocketClient tcpSocketClient, byte[] frame)
         {
@@ -146,49 +148,45 @@
                 return;
             }

-            writePendingData.Enqueue(frame);
+            _writePendingData.Enqueue(frame);

-            lock (writePendingData)
+            lock (_writePendingData)
             {
-                if (sendingData)
+                if (_sendingData)
                 {
                     return;
                 }
-                else
-                {
-                    sendingData = true;
-                }
+                _sendingData = true;
             }

             try
             {
-                byte[] buffer = null;
-                if (writePendingData.Count > 0 && writePendingData.TryDequeue(out buffer))
+                if (_writePendingData.Count > 0 && _writePendingData.TryDequeue(out byte[] buffer))
                 {
                     await tcpSocketClient.WriteStream.WriteAsync(buffer, 0, buffer.Length);
                     await tcpSocketClient.WriteStream.FlushAsync();
                 }
                 else
                 {
-                    lock (writePendingData)
+                    lock (_writePendingData)
                     {
-                        sendingData = false;
+                        _sendingData = false;
                     }
                 }
             }
-            catch (Exception ex)
+            catch (Exception)
             {
                 // handle exception then
-                lock (writePendingData)
+                lock (_writePendingData)
                 {
-                    sendingData = false;
+                    _sendingData = false;
                 }
             }
             finally
             {
-                lock (writePendingData)
+                lock (_writePendingData)
                 {
-                    sendingData = false;
+                    _sendingData = false;
                 }
             }
         }


Resolved collection modification exception

--- Samples/Android/AndroidAltBeaconLibrary.Sample/MainActivity.cs
+++ Samples/Android/AndroidAltBeaconLibrary.Sample/MainActivity.cs
@@ -170,19 +170,13 @@
 			var allBeacons = new List<Beacon>();
 			if(e.Beacons.Count > 0)
 			{
-				var beaconNumber = 0;
 				foreach(var b in e.Beacons)
 				{
 					allBeacons.Add(b);
 				}

 				var orderedBeacons = allBeacons.OrderBy(b => b.Distance).ToList();
-
-				orderedBeacons.ForEach(async (firstBeacon) =>
-				{
-					beaconNumber++;
-					await UpdateData(firstBeacon);
-				});
+				await UpdateData(orderedBeacons);
 			}
 			else
 			{
@@ -252,19 +246,32 @@
 		{
 		}

-		private async Task UpdateData(Beacon beacon)
+		private async Task UpdateData(List<Beacon> beacons)
 		{
 			await Task.Run(() =>
-			{
-				if(_data.All(d => d.Id1.ToString() != beacon.Id1.ToString()))
-				{
-					RunOnUiThread(() =>
+			{
+				var newBeacons = new List<Beacon>();
+				foreach(var beacon in beacons)
+				{
+					if(_data.All(b => b.Id1.ToString() == beacon.Id1.ToString()))
+					{
+						newBeacons.Add(beacon);
+					}
+				}
+
+				RunOnUiThread(() =>
+				{
+					foreach(var beacon in newBeacons)
 					{
 						_data.Add(beacon);
+					}
+
+					if (newBeacons.Count > 0)
+					{
 						_data.Sort((x,y) => x.Distance.CompareTo(y.Distance));
 						UpdateList();
-					});
-				}
+					}
+				});
 			});
 		}


Fix transaction attribute to get correct session key. Fixes #18

--- Solutions/SharpArch.NHibernate/Web/Mvc/TransactionAttribute.cs
+++ Solutions/SharpArch.NHibernate/Web/Mvc/TransactionAttribute.cs
@@ -78,7 +78,7 @@

         private string GetEffectiveFactoryKey()
         {
-            return String.IsNullOrEmpty(this.factoryKey) ? NHibernateSession.DefaultFactoryKey : this.factoryKey;
+            return String.IsNullOrEmpty(factoryKey) ? SessionFactoryKeyHelper.GetKey() : factoryKey;
         }

         private bool ShouldRollback(ControllerContext filterContext)


Add support for StaticResource and ThemeResource

--- XbfAnalyzer/Xbf/XbfReader.cs
+++ XbfAnalyzer/Xbf/XbfReader.cs
@@ -174,6 +174,24 @@
                             }
                             break;

+                        case 0x1E: // StaticResource
+                            {
+                                string propertyName = GetPropertyNameV2(reader.ReadUInt16());
+                                object propertyValue = GetPropertyValueV2(reader);
+                                propertyValue = string.Format("{{StaticResource {0}}}", propertyValue);
+                                objectStack.Peek().Properties.Add(new XbfObjectProperty(propertyName, propertyValue));
+                            }
+                            break;
+
+                        case 0x24: // ThemeResource
+                            {
+                                string propertyName = GetPropertyNameV2(reader.ReadUInt16());
+                                object propertyValue = GetPropertyValueV2(reader);
+                                propertyValue = string.Format("{{ThemeResource {0}}}", propertyValue);
+                                objectStack.Peek().Properties.Add(new XbfObjectProperty(propertyName, propertyValue));
+                            }
+                            break;
+
                         case 0x0C: // Indicates the object needs to be connected to something (e.g., a named variable, an event handler, etc.)
                             {
                                 // This byte (0x0C) indicates the current object needs to be connected to something in the generated Connect method.


CA-122431: Correct GPU grouping on mixed K1/K2 pools.
GPUs are now grouped by: card type (K1/K2), supported types and enabled types
# HG changeset patch
# User Mihaela Stoica <Mihaela.Stoica@citrix.com>
# Date 1385649218 0
#      Thu Nov 28 14:33:38 2013 +0000
# Node ID 43dbba1e3d6a3bc17862d13450080d014189281e
# Parent  d64f82660078ba76a4c4ceb92cef257d35759c4a

Signed-off-by: Konstantina Chremmou <a7d1f757a659045fb6db8c1e3849a1c8ad00b97a@citrix.com>

--- XenAdmin/TabPages/GpuPage.cs
+++ XenAdmin/TabPages/GpuPage.cs
@@ -107,17 +107,9 @@
                 RegisterPgpuHandlers(pGpu);

                 var enabledTypes = pGpu.Connection.ResolveAll(pGpu.enabled_VGPU_types);
-
-                if (enabledTypes.Count > 1)
-                {
-                    enabledTypes.Sort((t1, t2) =>
-                                          {
-                                              int result = t1.Capacity.CompareTo(t2.Capacity);
-                                              return result != 0 ? result : t1.Name.CompareTo(t2.Name);
-                                          });
-                }
-
-                var newSettings = new GpuSettings(enabledTypes.ToArray());
+                var supportedTypes = pGpu.Connection.ResolveAll(pGpu.supported_VGPU_types);
+
+                var newSettings = new GpuSettings(enabledTypes.ToArray(), supportedTypes.ToArray(), pGpu.Name);

                 var existingSettings = settingsToPGPUs.Keys.FirstOrDefault(ss => ss.Equals(newSettings));

@@ -289,34 +281,50 @@
         internal class GpuSettings : IEquatable<GpuSettings>
         {
             public readonly VGPU_type[] EnabledVgpuTypes;
-
-            public GpuSettings(VGPU_type[] vgpuTypes)
-            {
-                EnabledVgpuTypes = vgpuTypes;
-            }
-
-            public bool Equals(GpuSettings other)
-            {
-                if ((EnabledVgpuTypes == null || EnabledVgpuTypes.Length == 0) &&
-                    (other.EnabledVgpuTypes == null || other.EnabledVgpuTypes.Length == 0))
+            public readonly VGPU_type[] SupportedVgpuTypes;
+            public readonly string GpuName;
+
+            public GpuSettings(VGPU_type[] enabledVgpuTypes, VGPU_type[] supportedVgpuTypes, string name)
+            {
+                EnabledVgpuTypes = enabledVgpuTypes;
+                Array.Sort(EnabledVgpuTypes);
+
+                SupportedVgpuTypes = supportedVgpuTypes;
+                Array.Sort(SupportedVgpuTypes);
+
+                GpuName = name;
+            }
+
+            private static bool EqualArrays(VGPU_type[] x, VGPU_type[] y)
+            {
+                if ((x == null || x.Length == 0) &&
+                    (y == null || y.Length == 0))
                     return true;

-                if ((EnabledVgpuTypes == null || EnabledVgpuTypes.Length == 0) ||
-                    (other.EnabledVgpuTypes == null || other.EnabledVgpuTypes.Length == 0))
+                if ((x == null || x.Length == 0) ||
+                    (y == null || y.Length == 0))
                     return false;

-                if (EnabledVgpuTypes.Length != other.EnabledVgpuTypes.Length)
+                if (x.Length != y.Length)
                     return false;

-                for (int i = 0; i < EnabledVgpuTypes.Length; i++)
+                for (int i = 0; i < x.Length; i++)
                 {
-                    if (!EnabledVgpuTypes[i].Equals(other.EnabledVgpuTypes[i]))
+                    if (!x[i].Equals(y[i]))
                         return false;
                 }

                 return true;
             }

+
+            public bool Equals(GpuSettings other)
+            {
+                return GpuName.Equals(other.GpuName) && EqualArrays(EnabledVgpuTypes, other.EnabledVgpuTypes)
+                    && EqualArrays(SupportedVgpuTypes, other.SupportedVgpuTypes);
+            }
+
+
             public override string ToString()
             {
                 return string.Join(",", EnabledVgpuTypes.Select(t => t.model_name).ToArray());


GenerationGuts: fix-up NPE fix for generated deserialization (was double-handling the resolution of namespaced message names)

--- YAMLParser/GenerationGuts.cs
+++ YAMLParser/GenerationGuts.cs
@@ -677,12 +677,7 @@
         }
         public string GenerateSerializationCode(SingleType st)
         {
-            string pt = st.Type;
-            if (!KnownStuff.KnownTypes.ContainsKey(st.rostype) && !"using Messages.std_msgs;\nusing String=System.String;\nusing Messages.geometry_msgs;\nusing Messages.nav_msgs;".Contains("Messages." + st.Package))
-            {
-                pt = "Messages." + st.Package + "." + pt;
-            }
-            System.Diagnostics.Debug.WriteLine(string.Format(stfmat, st.Name, pt, st.rostype, st.IsLiteral, st.Const, st.ConstValue, st.IsArray, st.length, st.meta));
+            System.Diagnostics.Debug.WriteLine(string.Format(stfmat, st.Name, st.Type, st.rostype, st.IsLiteral, st.Const, st.ConstValue, st.IsArray, st.length, st.meta));
             if (st.Const)
                 return "";
             if (!st.IsArray)
@@ -703,7 +698,7 @@
                 {1}
             }}
 " + @"
-", st.Name, GenerateSerializationForOne(pt, st.Name+"[i]", st));
+", st.Name, GenerateSerializationForOne(st.Type, st.Name+"[i]", st));
             return ret;
         }


Minor cleanup

Minor cleanup

--- Source/Server/NetBots.WebServer.Host/Views/Manage/Index.cshtml
+++ Source/Server/NetBots.WebServer.Host/Views/Manage/Index.cshtml
@@ -10,12 +10,12 @@

Change your account settings

-
@Html.DisplayNameFor(m => m.Name)

+        @*
@Html.DisplayNameFor(m => m.Name)

             @Html.EditorFor(m => m.Name)
             <button id="update-name" class="btn btn-primary btn-sm ">Update</button>
-

+
*@

Password:

             [


change NavPage OnNavigatedFrom/To logic

change NavPage OnNavigatedFrom/To logic

changed the OnNavigatedTo/From logic to be called on the current
navigation root of the Navigation page when navigating within a
NavigationPage that has a current root page in it's navigation stack.
Fixes #492

--- Source/Xamarin/Prism.Forms/Navigation/PageNavigationService.cs
+++ Source/Xamarin/Prism.Forms/Navigation/PageNavigationService.cs
@@ -175,7 +175,7 @@
                     await currentPage.Navigation.PopToRootAsync(false);

                 await ProcessNavigation(currentNavRoot, segments, parameters, false, animated);
-                await DoNavigateAction(currentPage, nextSegment, currentNavRoot, parameters);
+                await DoNavigateAction(currentNavRoot, nextSegment, currentNavRoot, parameters);
                 return;
             }
             else
@@ -184,7 +184,7 @@
                 var newRoot = CreatePageFromSegment(nextSegment);
                 await ProcessNavigation(newRoot, segments, parameters, false, animated);

-                await DoNavigateAction(currentPage, nextSegment, newRoot, parameters, async () =>
+                await DoNavigateAction(currentNavRoot, nextSegment, newRoot, parameters, async () =>
                 {
                     await DoPush(currentPage, newRoot, false, animated);
                     currentPage.Navigation.RemovePage(currentNavRoot);


Fixed Pluralizer to be culture independent

--- Src/Runtime/Source/Runtime.Extensibility/CodeGen/Pluralizer.cs
+++ Src/Runtime/Source/Runtime.Extensibility/CodeGen/Pluralizer.cs
@@ -8,7 +8,8 @@
     /// </summary>
     public static class Pluralizer
     {
-        private static readonly PluralizationService service = PluralizationService.CreateService(CultureInfo.CurrentCulture);
+        private const string UsEnglishCulture = @"en-US";
+        private static readonly PluralizationService service = PluralizationService.CreateService(CultureInfo.GetCultureInfo(UsEnglishCulture));

         /// <summary>
         /// Pluralizes the given word.


Add sample validation in dummy app

Add sample validation in dummy app

--- Swashbuckle.Dummy.Core/Controllers/AnnotatedTypesController.cs
+++ Swashbuckle.Dummy.Core/Controllers/AnnotatedTypesController.cs
@@ -2,6 +2,8 @@
 using System.Collections.Generic;
 using System.ComponentModel.DataAnnotations;
 using System.Web.Http;
+using System.Net.Http;
+using System.Net;

 namespace Swashbuckle.Dummy.Controllers
 {
@@ -9,6 +11,9 @@
     {
         public int Create(Payment payment)
         {
+            if (!ModelState.IsValid)
+                throw new HttpResponseException(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState));
+
             throw new NotImplementedException();
         }
     }


Add a new constructor to StopWatchProfiler taking a min threshold value in millisec to only call the action if it's above By default the value is 0

--- Sharpmake/Util.cs
+++ Sharpmake/Util.cs
@@ -1825,16 +1825,25 @@
         {
             private readonly Stopwatch _stopWatch;
             private readonly Action<long> _disposeAction;
+            private readonly long _minThresholdMs;

             public StopwatchProfiler(Action<long> disposeAction)
+                : this(disposeAction, 0)
+            {
+            }
+
+            public StopwatchProfiler(Action<long> disposeAction, long minThresholdMs)
             {
                 _disposeAction = disposeAction;
                 _stopWatch = Stopwatch.StartNew();
+                _minThresholdMs = minThresholdMs;
             }

             public void Dispose()
             {
-                _disposeAction(_stopWatch.ElapsedMilliseconds);
+                long elapsed = _stopWatch.ElapsedMilliseconds;
+                if (elapsed > _minThresholdMs)
+                    _disposeAction(elapsed);
             }
         }


Fix comments

Fix comments

--- WalletWasabi.Backend/Controllers/ChaumianCoinJoinController.cs
+++ WalletWasabi.Backend/Controllers/ChaumianCoinJoinController.cs
@@ -140,11 +140,10 @@
 							return BadRequest("Provided input is not unspent.");
 						}

-						// ToDo: If unconfirmed, then handle the case if CoinJoin. (You can check for if the fee address in the output to decide if it was our CJ or not.)
-
 						// Check if unconfirmed.
 						if (getTxOutResponse.Confirmations <= 0)
 						{
+							// If it spends a CJ then it may be acceptable to register.
 							if (!Coordinator.ContainsCoinJoin(inputProof.Input.Hash))
 							{
 								return BadRequest("Provided input is neither confirmed, nor is from an unconfirmed coinjoin.");


Improve.

Improve.

--- WalletWasabi/BitcoinCore/Processes/BitcoindRpcProcessBridge.cs
+++ WalletWasabi/BitcoinCore/Processes/BitcoindRpcProcessBridge.cs
@@ -55,7 +55,7 @@
 			try
 			{
 				// Try to connect to bitcoin daemon RPC until we succeed.
-				while (Process is { })
+				while (true)
 				{
 					var ex = await RpcClient.TestAsync().ConfigureAwait(false);
 					if (ex is null)
@@ -69,14 +69,14 @@
 						Logger.LogInfo($"{Constants.BuiltinBitcoinNodeName} is not yet ready... Reason: {latestFailureMessage}");
 					}

-					if (Process.HasExited)
+					if (Process is { } p && p.HasExited)
 					{
-						throw new BitcoindException($"Failed to start daemon, location: '{Process.StartInfo.FileName} {Process.StartInfo.Arguments}'", ex);
+						throw new BitcoindException($"Failed to start daemon, location: '{p.StartInfo.FileName} {p.StartInfo.Arguments}'", ex);
 					}

 					if (cancel.IsCancellationRequested)
 					{
-						await StopAsync(true).ConfigureAwait(false);
+						await StopAsync(onlyOwned: true).ConfigureAwait(false);
 						cancel.ThrowIfCancellationRequested();
 					}


CA-293119: Add the pending master reboot precheck to all wizard modes

Signed-off-by: Mihaela Stoica <be95049f8e30d921fc7e2579c00c48bd84c40606@citrix.com>

--- XenAdmin/Wizards/PatchingWizard/PatchingWizard_PrecheckPage.cs
+++ XenAdmin/Wizards/PatchingWizard/PatchingWizard_PrecheckPage.cs
@@ -493,14 +493,12 @@
                 groups.Add(new CheckGroup(Messages.CHECKING_CANEVACUATE_STATUS, evacuateChecks));
             }

-            if (patch != null || WizardMode == WizardMode.AutomatedUpdates)
-            {
-                var restartChecks = new List<Check>();
-                foreach (var pool in SelectedPools)
-                    restartChecks.Add(new RestartHostOrToolstackPendingOnMasterCheck(pool, WizardMode == WizardMode.AutomatedUpdates ? null : patch.uuid));
-
-                groups.Add(new CheckGroup(Messages.CHECKING_FOR_PENDING_RESTART, restartChecks));
-            }
+            //Checking if a reboot is pending on master
+            var restartChecks = new List<Check>();
+            foreach (var pool in SelectedPools)
+                restartChecks.Add(new RestartHostOrToolstackPendingOnMasterCheck(pool, patch == null ? null : patch.uuid));
+
+            groups.Add(new CheckGroup(Messages.CHECKING_FOR_PENDING_RESTART, restartChecks));

             return groups;
         }
@@ -560,15 +558,11 @@
                 groups.Add(new CheckGroup(Messages.CHECKING_CANEVACUATE_STATUS, evacuateChecks));
             }

-            if (update != null || WizardMode == WizardMode.AutomatedUpdates)
-            {
-                var restartChecks = new List<Check>();
-
-                foreach (var pool in SelectedPools)
-                    restartChecks.Add(new RestartHostOrToolstackPendingOnMasterCheck(pool, WizardMode == WizardMode.AutomatedUpdates ? null : update.uuid));
-
-                groups.Add(new CheckGroup(Messages.CHECKING_FOR_PENDING_RESTART, restartChecks));
-            }
+            //Checking if a reboot is pending on master
+             var restartChecks = new List<Check>();
+            foreach (var pool in SelectedPools)
+                restartChecks.Add(new RestartHostOrToolstackPendingOnMasterCheck(pool, update == null ? null : update.uuid));
+            groups.Add(new CheckGroup(Messages.CHECKING_FOR_PENDING_RESTART, restartChecks));

             return groups;
         }


ERROR: may have broken this.

ERROR: may have broken this.

--- Skylight/Build.cs
+++ Skylight/Build.cs
@@ -94,7 +94,7 @@

             foreach (var b in tempList)
             {
-                BuildBlock(b);
+                BuildBlock(b); // this line has problems but I fixed it in a weird way.
             }
         }
     }


update

update

--- Src/Pc/PToZing.cs
+++ Src/Pc/PToZing.cs
@@ -1230,25 +1230,25 @@
             parameters.Add(MkZingVarDecl("state", Factory.Instance.MkCnst("State")));

             List<AST<Node>> locals = new List<AST<Node>>();
-            locals.Add(MkZingVarDecl("cont", Factory.Instance.MkCnst("Continuation")));
+            locals.Add(MkZingVarDecl("doPop", ZingData.Cnst_Bool));
             locals.Add(MkZingVarDecl("hasDefaultTransition", ZingData.Cnst_Bool));

-            var cont = MkZingIdentifier("cont");
+            var doPop = MkZingIdentifier("doPop");
             var hasDefaultTransition = MkZingIdentifier("hasDefaultTransition");

             List<AST<Node>> initStmts = new List<AST<Node>>();
             initStmts.Add(MkZingCallStmt(MkZingCall(MkZingDot("myHandle", "Push"))));
             initStmts.Add(MkZingAssign(MkZingDot("myHandle", "stack", "state"), MkZingIdentifier("state")));
-            initStmts.Add(MkZingAssign(cont, MkZingCall(MkZingIdentifier("RunHelper"), ZingData.Cnst_True)));
+            initStmts.Add(MkZingAssign(doPop, MkZingCall(MkZingIdentifier("RunHelper"), ZingData.Cnst_True)));
             initStmts.Add(MkZingGoto("dequeue"));
             var initBlock = MkZingBlock("init", MkZingSeq(initStmts));

             List<AST<Node>> dequeueStmts = new List<AST<Node>>();
-            dequeueStmts.Add(MkZingIfThen(MkZingNeq(MkZingDot("cont", "reason"), MkZingDot("ContinuationReason", "Return")),
+            dequeueStmts.Add(MkZingIfThen(doPop,
                              MkZingSeq(MkZingCallStmt(MkZingCall(MkZingDot("myHandle", "Pop"))), MkZingReturn(ZingData.Cnst_Nil))));
             dequeueStmts.Add(MkZingAssign(hasDefaultTransition, MkZingCall(MkZingIdentifier("HasDefaultTransition"), MkZingDot("myHandle", "stack", "state"))));
             dequeueStmts.Add(MkZingCallStmt(MkZingCall(MkZingDot("myHandle", "DequeueEvent"), hasDefaultTransition)));
-            dequeueStmts.Add(MkZingAssign(cont, MkZingCall(MkZingIdentifier("RunHelper"), ZingData.Cnst_False)));
+            dequeueStmts.Add(MkZingAssign(doPop, MkZingCall(MkZingIdentifier("RunHelper"), ZingData.Cnst_False)));
             dequeueStmts.Add(MkZingGoto("dequeue"));
             var dequeueBlock = MkZingBlock("dequeue", MkZingSeq(dequeueStmts));

@@ -1451,7 +1451,7 @@
                                                  MkZingSeq(
                                                  MkZingCallStmt(MkZingCall(MkZingIdentifier("trace"), Factory.Instance.MkCnst(exitTraceString), MkZingDot("myHandle", "instance"))),
                                                  MkZingSeq(MkZingCallStmt(MkZingCall(MkZingIdentifier("ReentrancyHelper"), MkZingActionOrFun(machineName, stateInfo.exitFunName)))))));
-                executeStmts.Add(MkZingReturn(cont));
+                executeStmts.Add(MkZingReturn(MkZingEq(MkZingDot("cont", "reason"), MkZingDot("ContinuationReason", "Pop"))));
                 blocks.Add(MkZingBlock("execute_" + stateName, MkZingSeq(executeStmts)));

                 var callTransitions = new Dictionary<string, TransitionInfo>();
@@ -1480,7 +1480,7 @@
                                                     MkZingSeq(
                                                     MkZingCallStmt(MkZingCall(MkZingIdentifier("trace"), Factory.Instance.MkCnst(exitTraceString), MkZingDot("myHandle", "instance"))),
                                                     MkZingSeq(MkZingCallStmt(MkZingCall(MkZingIdentifier("ReentrancyHelper"), MkZingActionOrFun(machineName, stateInfo.exitFunName)))))),
-                                      MkZingReturn(cont)));
+                                      MkZingReturn(MkZingEq(MkZingDot("cont", "reason"), MkZingDot("ContinuationReason", "Pop")))));
                 AST<Node> callTransitionStmt = ZingData.Cnst_Nil;
                 foreach (var eventName in callTransitions.Keys)
                 {
@@ -1489,14 +1489,14 @@
                     var callStmt = MkZingCallStmt(MkZingCall(MkZingIdentifier("Run"), MkZingState(targetStateName)));
                     var ite = MkZingIfThenElse(
                         MkZingApply(ZingData.Cnst_Eq, MkZingDot("myHandle", "currentEvent"), MkZingIdentifier("null")),
-                        MkZingReturn(cont),
+                        MkZingReturn(ZingData.Cnst_False),
                         MkZingGoto("transition_" + stateName)
                         );
                     callTransitionStmt = MkZingIfThenElse(condExpr, MkZingSeq(callStmt, ite), callTransitionStmt);
                 }

                 AST<Node> exitFunStmt = MkZingAssign(MkZingIdentifier("exitFun"), MkZingActionOrFun(machineName, allMachines[machineName].stateNameToStateInfo[stateName].exitFunName));
-                AST<Node> ordinaryTransitionStmt = MkZingReturn(cont);
+                AST<Node> ordinaryTransitionStmt = MkZingReturn(ZingData.Cnst_True);
                 foreach (var eventName in ordinaryTransitions.Keys)
                 {
                     var targetStateName = ordinaryTransitions[eventName].target;
@@ -1515,7 +1515,7 @@
                 blocks.Add(MkZingBlock("transition_" + stateName, MkZingSeq(actionStmt, callTransitionStmt, exitFunStmt, ordinaryTransitionStmt)));
             }
             AST<Node> body = ConstructList(ZingData.App_Blocks, blocks);
-            return MkZingMethodDecl("RunHelper", parameters, Factory.Instance.MkCnst("Continuation"), MkZingVarDecls(locals), body);
+            return MkZingMethodDecl("RunHelper", parameters, ZingData.Cnst_Bool, MkZingVarDecls(locals), body);
         }

         class ZingFoldContext


Inline request flow to make it easier to understand

--- osu.Game/Overlays/NewsOverlay.cs
+++ osu.Game/Overlays/NewsOverlay.cs
@@ -21,7 +21,7 @@
         private readonly NewsSidebar sidebar;
         private readonly Container content;

-        private GetNewsRequest lastRequest;
+        private GetNewsRequest request;

         private Cursor lastCursor;

@@ -139,66 +139,64 @@

         private void loadListing(int? year = null)
         {
-            beginLoading();
-
             Header.SetFrontPage();

             displayedYear = year;
             lastCursor = null;

-            performListingRequest(response =>
-            {
+            beginLoading(true);
+
+            request = new GetNewsRequest(displayedYear);
+            request.Success += response => Schedule(() =>
+            {
+                lastCursor = response.Cursor;
                 sidebar.Metadata.Value = response.SidebarMetadata;

-                var listing = new ArticleListing(response);
-                listing.RequestMorePosts += getMorePosts;
-
-                LoadDisplay(listing);
+                LoadDisplay(new ArticleListing(response)
+                {
+                    RequestMorePosts = getMorePosts
+                });
             });
-        }
-
-        private void loadArticle(string article)
-        {
-            beginLoading();
-
-            Header.SetArticle(article);
-
-            // Temporary, should be handled by ArticleDisplay later
-            LoadDisplay(Empty());
+
+            API.PerformAsync(request);
         }

         private void getMorePosts()
         {
-            lastRequest?.Cancel();
-            performListingRequest(response =>
-            {
+            beginLoading(false);
+
+            request = new GetNewsRequest(displayedYear, lastCursor);
+            request.Success += response => Schedule(() =>
+            {
+                lastCursor = response.Cursor;
                 if (content.Child is ArticleListing listing)
                     listing.AddPosts(response);
             });
-        }
-
-        private void performListingRequest(Action<GetNewsResponse> onSuccess)
-        {
-            lastRequest = new GetNewsRequest(displayedYear, lastCursor);
-            lastRequest.Success += response => Schedule(() =>
-            {
-                lastCursor = response.Cursor;
-                onSuccess?.Invoke(response);
-            });
-
-            API.PerformAsync(lastRequest);
-        }
-
-        private void beginLoading()
-        {
-            lastRequest?.Cancel();
+
+            API.PerformAsync(request);
+        }
+
+        private void loadArticle(string article)
+        {
+            // This is not yet implemented nor called from anywhere.
+            beginLoading(true);
+
+            Header.SetArticle(article);
+            LoadDisplay(Empty());
+        }
+
+        private void beginLoading(bool showLoadingOverlay)
+        {
+            request?.Cancel();
             cancellationToken?.Cancel();
-            Loading.Show();
+
+            if (showLoadingOverlay)
+                Loading.Show();
         }

         protected override void Dispose(bool isDisposing)
         {
-            lastRequest?.Cancel();
+            request?.Cancel();
             cancellationToken?.Cancel();
             base.Dispose(isDisposing);
         }


Return a valid "lighting" response from `DefaultSkin`

This is temporary to allow the new sprite lookup flow to potentially be
merged before hit lighting skinnability is addressed.

--- osu.Game/Skinning/DefaultSkin.cs
+++ osu.Game/Skinning/DefaultSkin.cs
@@ -158,6 +158,13 @@
                     break;
             }

+            switch (component.LookupName)
+            {
+                // Temporary until default skin has a valid hit lighting.
+                case @"lighting":
+                    return Drawable.Empty();
+            }
+
             if (GetTexture(component.LookupName) is Texture t)
                 return new Sprite { Texture = t };


Queue TimerQueueTimer directly to ThreadPool

Eliminate a wrapper ThreadPoolWorkItem that's unnecessary.  Saves an allocation ever time a Timer fires.

--- src/mscorlib/src/System/Threading/Timer.cs
+++ src/mscorlib/src/System/Threading/Timer.cs
@@ -345,20 +345,8 @@

         private static void QueueTimerCompletion(TimerQueueTimer timer)
         {
-            WaitCallback callback = s_fireQueuedTimerCompletion;
-            if (callback == null)
-                s_fireQueuedTimerCompletion = callback = new WaitCallback(FireQueuedTimerCompletion);
-
-            // Can use "unsafe" variant because we take care of capturing and restoring
-            // the ExecutionContext.
-            ThreadPool.UnsafeQueueUserWorkItem(callback, timer);
-        }
-
-        private static WaitCallback s_fireQueuedTimerCompletion;
-
-        private static void FireQueuedTimerCompletion(object state)
-        {
-            ((TimerQueueTimer)state).Fire();
+            // Can use "unsafe" variant because we take care of capturing and restoring the ExecutionContext.
+            ThreadPool.UnsafeQueueCustomWorkItem(timer, forceGlobal: true);
         }

         #endregion
@@ -407,7 +395,7 @@
     //
     // A timer in our TimerQueue.
     //
-    internal sealed class TimerQueueTimer
+    internal sealed class TimerQueueTimer : IThreadPoolWorkItem
     {
         //
         // The associated timer queue.
@@ -600,6 +588,10 @@
                 SignalNoCallbacksRunning();
         }

+        void IThreadPoolWorkItem.ExecuteWorkItem() => Fire();
+
+        void IThreadPoolWorkItem.MarkAborted(ThreadAbortException tae) { }
+
         internal void SignalNoCallbacksRunning()
         {
             Win32Native.SetEvent(m_notifyWhenNoCallbacksRunning.SafeWaitHandle);


Add /FS option to FastBuild example.

Add /FS option to FastBuild example.

Missing this option causes cl.exe to fail.
Altough it's not needed for this simple file example,
it serves as a guide for custom projects.

--- samples/FastBuildSimpleExecutable/FastBuildSimpleExecutable.sharpmake.cs
+++ samples/FastBuildSimpleExecutable/FastBuildSimpleExecutable.sharpmake.cs
@@ -57,6 +57,9 @@
         {
             conf.IsFastBuild = true;
             conf.FastBuildBlobbed = target.Blob == Blob.FastBuildUnitys;
+
+            // Force writing to pdb from different cl.exe process to go through the pdb server
+            conf.AdditionalCompilerOptions.Add("/FS");
         }
     }


Saving the decal that was generated

Saving the decal that was generated

--- DecalGenerator/DecalGenerator/MainForm.cs
+++ DecalGenerator/DecalGenerator/MainForm.cs
@@ -13,6 +13,10 @@
       private void MainForm_Load( object sender, EventArgs e )
       {
          BackgroundImage = DecalGenerator.Create( 10 );
+
+         // Save this wherever you want!
+         // Use it to create more decals!
+         BackgroundImage.Save( "Decal_Number10.png" );
       }
    }
 }


#12 対応

#12 対応

--- Development/Source/STGApp/Models/Model.cs
+++ Development/Source/STGApp/Models/Model.cs
@@ -168,7 +168,11 @@
         /// </summary>
         internal void MoveToLeft()
         {
-            _InputManager.MoveToLeft();
+            System.Threading.Tasks.Task.Run(new Action(() =>
+            {
+                _InputManager.MoveToLeft();
+            }
+            ));
         }

         /// <summary>
@@ -176,7 +180,11 @@
         /// </summary>
         internal void MoveToRight()
         {
-            _InputManager.MoveToRight();
+            System.Threading.Tasks.Task.Run(new Action(() =>
+            {
+                _InputManager.MoveToRight();
+            }
+            ));
         }

         /// <summary>
@@ -184,7 +192,11 @@
         /// </summary>
         internal void MoveToUp()
         {
-            _InputManager.MoveToUpper();
+            System.Threading.Tasks.Task.Run(new Action(() =>
+            {
+                _InputManager.MoveToUpper();
+            }
+            ));
         }

         /// <summary>
@@ -192,7 +204,11 @@
         /// </summary>
         internal void MoveToDown()
         {
-            _InputManager.MoveToUnder();
+            System.Threading.Tasks.Task.Run(new Action(() =>
+            {
+                _InputManager.MoveToUnder();
+            }
+            ));
         }

         #endregion


Capability: add IsSatisfied() method

Capability: add IsSatisfied() method

--- models/SelfOrganizingPillProduction/Capability.cs
+++ models/SelfOrganizingPillProduction/Capability.cs
@@ -1,7 +1,10 @@
-namespace SelfOrganizingPillProduction
+using System.Linq;
+
+namespace SelfOrganizingPillProduction
 {
     abstract class Capability
     {
+        public abstract bool IsSatisfied(Capability[] availableCapabilities);
     }

     /// <summary>
@@ -12,6 +15,8 @@
         private ProduceCapability() { }

         public static readonly ProduceCapability Instance = new ProduceCapability();
+
+        public override bool IsSatisfied(Capability[] availableCapabilities) => availableCapabilities.Contains(Instance);
     }

     /// <summary>
@@ -22,6 +27,8 @@
         private ConsumeCapability() { }

         public static readonly ConsumeCapability Instance = new ConsumeCapability();
+
+        public override bool IsSatisfied(Capability[] availableCapabilities) => availableCapabilities.Contains(Instance);
     }

     /// <summary>
@@ -38,5 +45,13 @@
         public IngredientType Type { get; }

         public uint Amount { get; }
+
+        public override bool IsSatisfied(Capability[] availableCapabilities)
+        {
+            return availableCapabilities
+                .OfType<Ingredient>()
+                .Where(ingredient => ingredient.Type == Type)
+                .Any(ingredient => ingredient.Amount >= Amount);
+        }
     }
 }


more space properties accesiblility

more space properties accesiblility

--- src/physics/chipmunk/CCPhysicsWorldInfo.cs
+++ src/physics/chipmunk/CCPhysicsWorldInfo.cs
@@ -35,8 +35,6 @@

 	internal class CCPhysicsWorldInfo
 	{
-
-

 		#region PUBLIC METHODS

@@ -115,6 +113,20 @@

 		}

+		public void SetGravity(cpVect gravity)
+		{
+			_space.SetGravity(gravity);
+		}
+
+		public void SetIterations(int iterations)
+		{
+			_space.SetIterations(iterations);
+		}
+
+		public void SetSleepTimeThreshold(float sleepTimeThreshold)
+		{
+			_space.SetSleepTimeThreshold(sleepTimeThreshold);
+		}
 	}
 }
 #endif


Revert [Add controller's Authorize EndpointMetadata to action].

--- src/Abp.AspNetCore/AspNetCore/Mvc/Conventions/AbpAppServiceConvention.cs
+++ src/Abp.AspNetCore/AspNetCore/Mvc/Conventions/AbpAppServiceConvention.cs
@@ -209,18 +209,12 @@

             foreach (var action in controller.Actions)
             {
-                ConfigureSelector(moduleName, controller.ControllerName, controller.Selectors, action, configuration);
-            }
-        }
-
-        private void ConfigureSelector(string moduleName, string controllerName, IList<SelectorModel> controllerSelectors, ActionModel action, [CanBeNull] AbpControllerAssemblySetting configuration)
-        {
-            //Add controller's Authorize EndpointMetadata to action.
-            foreach (var controllerEndpointMetadata in controllerSelectors.SelectMany(x => x.EndpointMetadata).Where(x => x is IAuthorizeData))
-            {
-                action.Selectors.FirstOrDefault()?.EndpointMetadata.Add(controllerEndpointMetadata);
-            }
-
+                ConfigureSelector(moduleName, controller.ControllerName, action, configuration);
+            }
+        }
+
+        private void ConfigureSelector(string moduleName, string controllerName, ActionModel action, [CanBeNull] AbpControllerAssemblySetting configuration)
+        {
             RemoveEmptySelectors(action.Selectors);

             var remoteServiceAtt = ReflectionHelper.GetSingleAttributeOrDefault<RemoteServiceAttribute>(action.ActionMethod);


Comments removed: clean, clean

Comments removed: clean, clean

--- src/DotVVM.Framework/Compilation/ControlTree/Resolved/ResolvedControl.cs
+++ src/DotVVM.Framework/Compilation/ControlTree/Resolved/ResolvedControl.cs
@@ -8,13 +8,10 @@
     public class ResolvedControl : ResolvedContentNode, IAbstractControl
     {
         public Dictionary<DotvvmProperty, ResolvedPropertySetter> Properties { get; set; } = new Dictionary<DotvvmProperty, ResolvedPropertySetter>();
-        //public Dictionary<PropertyGroupMember, ResolvedPropertySetter> PropertyGroupMembers = new Dictionary<PropertyGroupMember, ResolvedPropertySetter>();
-
+
         public object[] ConstructorParameters { get; set; }

         IEnumerable<IPropertyDescriptor> IAbstractControl.PropertyNames => Properties.Keys;
-
-        //IEnumerable<IAbstractHtmlAttributeSetter> IAbstractControl.HtmlAttributes => HtmlAttributes.Values;

         public ResolvedControl(ControlResolverMetadata metadata, DothtmlNode node, DataContextStack dataContext)
             : base(metadata, node, dataContext) { }
@@ -48,30 +45,7 @@
             value.Parent = this;
             return true;
         }
-
-        //public void SetPropertyGroupMember(PropertyGroupMember member, ResolvedPropertySetter setter) { }

-        //public void SetHtmlAttribute(ResolvedHtmlAttributeSetter value)
-        //{
-        //    ResolvedHtmlAttributeSetter currentSetter;
-        //    if (HtmlAttributes.TryGetValue(value.Name, out currentSetter))
-        //    {
-        //        if (!(currentSetter is ResolvedHtmlAttributeValue) || !(value is ResolvedHtmlAttributeValue))
-        //        {
-        //            throw new NotSupportedException("multiple binding values are not supported in one attribute");
-        //        }
-        //        var currentValueSetter = (ResolvedHtmlAttributeValue)currentSetter;
-        //        var newValueSetter = (ResolvedHtmlAttributeValue)value;
-
-        //        var joinedValue = Controls.HtmlWriter.JoinAttributeValues(currentValueSetter.Name, currentValueSetter.Value, newValueSetter.Value);
-
-        //        value = new ResolvedHtmlAttributeValue(currentValueSetter.Name, joinedValue) { DothtmlNode = currentValueSetter.DothtmlNode };
-        //    }
-
-        //    HtmlAttributes[value.Name] = value;
-        //    value.Parent = this;
-        //}
-
         public override void Accept(IResolvedControlTreeVisitor visitor)
         {
             visitor.VisitControl(this);
@@ -83,11 +57,7 @@
             {
                 prop.Accept(visitor);
             }
-            //foreach (var att in HtmlAttributes.Values)
-            //{
-            //    att.Accept(visitor);
-            //}
-
+
             base.AcceptChildren(visitor);
         }


fix dns endpoint resolver

fix dns endpoint resolver

--- src/EventStore/EventStore.ClientAPI/Core/ClusterDnsEndPointDiscoverer.cs
+++ src/EventStore/EventStore.ClientAPI/Core/ClusterDnsEndPointDiscoverer.cs
@@ -130,10 +130,11 @@
             IPEndPoint[] endpoints;
             if(_gossipSeeds != null && _gossipSeeds.Length > 0)
             {
+                endpoints = _gossipSeeds;
+            }
+            else
+            {
                 endpoints = ResolveDns(_clusterDns).Select(x => new IPEndPoint(x, _managerExternalHttpPort)).ToArray();
-            } else
-            {
-                endpoints = _gossipSeeds;
             }

             RandomShuffle(endpoints, 0, endpoints.Length-1);


Correct timing for company search

Correct timing for company search

--- src/SFA.DAS.EAS.Web/Controllers/EmployerAccountOrganisationController.cs
+++ src/SFA.DAS.EAS.Web/Controllers/EmployerAccountOrganisationController.cs
@@ -132,7 +132,7 @@
             {
                 stopwatch.Stop();

-                _logger.Info($"Company Search for {model.OrganisationType} took {stopwatch.ElapsedMilliseconds *1000d}s");
+                _logger.Info($"Company Search for {model.OrganisationType} took {stopwatch.ElapsedMilliseconds /1000d}s");
             }


Switch blob log capture to async

Switch blob log capture to async

--- src/Services/Work/NuGet.Services.Work/Monitoring/InvocationLogCapture.cs
+++ src/Services/Work/NuGet.Services.Work/Monitoring/InvocationLogCapture.cs
@@ -100,9 +100,10 @@
             {
                 await Storage.Primary.Blobs.DownloadBlob(WorkService.InvocationLogsContainerBaseName, "invocations/" + Path.GetFileName(_tempFile), _tempFile);
             }
-
+
             // Capture the events into a JSON file and a plain text file
-            _eventSubscription = this.LogToFlatFile(_tempFile, new JsonEventTextFormatter(EventTextFormatting.Indented, dateTimeFormat: "O"), isAsync: true);
+            _eventSubscription = this
+                .LogToFlatFile(_tempFile, new JsonEventTextFormatter(EventTextFormatting.Indented, dateTimeFormat: "O"), isAsync: true);
         }

         public override async Task<Uri> End()


style(ArucoCamera.cs): initialize the variables only once at Configure().

--- src/aruco_unity_package/Assets/ArucoUnity/Scripts/Cameras/ArucoCamera.cs
+++ src/aruco_unity_package/Assets/ArucoUnity/Scripts/Cameras/ArucoCamera.cs
@@ -266,6 +266,20 @@
           postDetectflipCode = -1;
         }

+        // Initialize the variables
+        images = new Cv.Mat[CameraNumber];
+        imageDataSizes = new int[CameraNumber];
+        undistordedImages = new Cv.Mat[CameraNumber];
+
+        if (CameraParameters != null)
+        {
+          undistordedImageMaps = new Cv.Mat[CameraNumber][];
+          for (int cameraId = 0; cameraId < CameraNumber; cameraId++)
+          {
+            undistordedImageMaps[cameraId] = new Cv.Mat[2]; // map1 and map2
+          }
+        }
+
         // Update state
         IsConfigured = true;
         OnConfigured();
@@ -390,8 +404,6 @@
       protected void InitializeMatImages()
       {
         // Initialize the images
-        images = new Cv.Mat[CameraNumber];
-        imageDataSizes = new int[CameraNumber];
         for (int cameraId = 0; cameraId < CameraNumber; cameraId++)
         {
           byte[] imageData = ImageTextures[cameraId].GetRawTextureData();
@@ -400,16 +412,9 @@
           imageDataSizes[cameraId] = (int)(images[cameraId].ElemSize() * images[cameraId].Total());
         }

-        // Initialize the undistortion maps and undistorted images
+        // Initialize the undistorted images
         if (CameraParameters != null)
         {
-          // Initialize the undistortion maps
-          undistordedImageMaps = new Cv.Mat[CameraNumber][];
-          for (int cameraId = 0; cameraId < CameraNumber; cameraId++)
-          {
-            undistordedImageMaps[cameraId] = new Cv.Mat[2]; // map1 and map2
-          }
-
           // TODO: scale if there is a difference between camera image size and camera parameters image size (during calibration)

           // Set the undistortion maps for the cameras with stereo calibration results first
@@ -432,7 +437,6 @@
           }

           // Initialize the undistorted images
-          undistordedImages = new Cv.Mat[CameraNumber];
           for (int cameraId = 0; cameraId < CameraNumber; cameraId++)
           {
             undistordedImages[cameraId] = new Cv.Mat(undistordedImageMaps[cameraId][0].Size, ImageType(ImageTextures[cameraId]));