more changes to fix bugs in pathfinder

more changes to fix bugs in pathfinder

--- Assets/Scripts/PathFinding.cs
+++ Assets/Scripts/PathFinding.cs
@@ -65,42 +65,42 @@
 		Vector3 west;
 		Vector3 northWest;

-		if (y + 1 < columns - 2) {
+		if (y + 1 < columns - 2 && y + 1 > 0) {
 			north = new Vector3 (x, y + 1f, 0f);
 		}else {
 			north = new Vector3 (0f,0f,0f);
 		}
-		if (x + 1 < rows - 2 && y + 1 < columns - 2) {
+		if (x + 1 < rows - 2 && y + 1 < columns - 2 && x + 1 > 0 && y + 1 > 0) {
 			northEast = new Vector3 (x + 1f, y + 1f, 0f);
 		} else {
 			northEast = new Vector3 (0f,0f,0f);
 		}
-		if (x + 1 < rows - 2) {
+		if (x + 1 < rows - 2 && x + 1 > 0) {
 			east = new Vector3 (x + 1f, y, 0f);
 		}else {
 			east = new Vector3 (0f,0f,0f);
 		}
-		if (x + 1 < rows - 2 && y - 1 < columns - 2) {
+		if (x + 1 < rows - 2 && y - 1 < columns - 2 && x + 1 > 0 && y - 1 > 0) {
 			southEast = new Vector3 (x + 1f, y - 1f, 0f);
 		}else {
 			southEast = new Vector3 (0f,0f,0f);
 		}
-		if (y - 1 < columns - 2) {
+		if (y - 1 < columns - 2 && y - 1 > 0) {
 			south = new Vector3 (x, y - 1f, 0f);
 		}else {
 			south = new Vector3 (0f,0f,0f);
 		}
-		if (x - 1 < rows - 2 && y - 1 < columns - 2) {
+		if (x - 1 < rows - 2 && y - 1 < columns - 2 && x - 1 > 0 && y - 1> 0) {
 			southWest = new Vector3 (x - 1f, y - 1f, 0f);
 		}else {
 			southWest = new Vector3 (0f,0f,0f);
 		}
-		if (x - 1 < rows - 2) {
+		if (x - 1 < rows - 2 && x - 1 > 0) {
 			west = new Vector3 (x - 1f, y, 0f);
 		}else {
 			west = new Vector3 (0f,0f,0f);
 		}
-		if (x - 1 < rows - 2 && y + 1 < columns - 2) {
+		if (x - 1 < rows - 2 && y + 1 < columns - 2 && x - 1 > 0 && y + 1 > 0) {
 			northWest = new Vector3 (x - 1f, y + 1f, 0f);
 		}else {
 			northWest = new Vector3 (0f,0f,0f);


Update Catalog.cs

Update Catalog.cs

Missing ;

--- source/ADAPT/ADM/Catalog.cs
+++ source/ADAPT/ADM/Catalog.cs
@@ -76,7 +76,7 @@
             Facilities = new List<Facility>();
             IrrSectionConfigurations = new List<IrrSectionConfiguration>();
             IrrSystemConfigurations = new List<IrrSystemConfiguration>();
-            IrrSystemModels = new List<IrrSystemModel>()
+            IrrSystemModels = new List<IrrSystemModel>();
         }

         public List<Brand> Brands { get; set; }


`XsltViewEngine` now accepts a formatter via fluent method injection


Tests are fixed

Tests are fixed

--- tests/NetIRC.Tests/Connection/TcpClientConnectionTests.cs
+++ tests/NetIRC.Tests/Connection/TcpClientConnectionTests.cs
@@ -59,7 +59,7 @@
                         await stream.FlushAsync();

                         // Wait for the client to receive the data if necessary
-                        Assert.True(pause.WaitOne(60000));
+                        Assert.True(pause.WaitOne(500));
                     }
                 }
             }
@@ -131,7 +131,7 @@
             Assert.Equal(data, dataReceived);
         }

-        [Fact(Skip = "Keeps failing. I need to figure out why.")]
+        [Fact]
         public async Task WhenServerDisconnects_TrigerDisconnectedEvent()
         {
             var pauseConnected = new ManualResetEvent(false);
@@ -149,7 +149,7 @@
                 using (var server = await connectionFixture.TcpListener.AcceptTcpClientAsync())
                 {
                     // Wait for the client to be connected if necessary
-                    Assert.True(pauseConnected.WaitOne(60000));
+                    Assert.True(pauseConnected.WaitOne(500));

                     using (var stream = new StreamWriter(server.GetStream()))
                     {
@@ -157,19 +157,12 @@
                         await stream.FlushAsync();

                         // Wait for the client to receive the data if necessary
-                        Assert.True(pauseDataReceived.WaitOne(60000));
+                        Assert.True(pauseDataReceived.WaitOne(500));
                     }
                 }
             }

-            Assert.True(pauseDisconnected.WaitOne(60000));
-        }
-
-        [Fact]
-        public void WhenDisposingBeforeConnecting_ItShouldBeOK()
-        {
-            var tcpClient = new TcpClientConnection();
-            tcpClient.Dispose();
+            Assert.True(pauseDisconnected.WaitOne(500));
         }
     }
 }


Unit tests for the WeightedAdjacencyList

--- data-structures-csharp/data-structures-csharpTests/AdjacencyList/WeightedAdjacencyListTest.cs
+++ data-structures-csharp/data-structures-csharpTests/AdjacencyList/WeightedAdjacencyListTest.cs
@@ -15,7 +15,6 @@
         private WeightedAdjacencyList<string> _weightedAdjacencyList = new WeightedAdjacencyList<string>();

         private readonly string[] _nodes = new string[] { "1", "2", "3", "4","5", "6" };
-        //private Dictionary<int,HashSet<int>> _dictHashSet = new Dictionary<int, HashSet<int>>();

         [TestInitialize, TestCleanup]
         protected void UnLoadInput()


Refreash

Refreash

--- BDLib/BDLib/BDLibInfo/Info.cs
+++ BDLib/BDLib/BDLibInfo/Info.cs
@@ -16,14 +16,14 @@
             "DataBase/SqliteDataBase.cs - v1.5",
             "DataTypes/S_Int.cs - v1",//new version/better of DynamicInt biggest number is 2,147,483,647 digits large IE int.MaxValue bytes so ye be cairfull with ram
             //^^ is broken so comming soon
-	    "Internal/Chat/InternalAlerts.cs - v1.3",
+			"Internal/Chat/InternalAlerts.cs - v1.3",
             "Internal/Chat/InternalChat.cs - v1.1",
             "Internal/CommandLine/DynamicCMD.cs - v2.5",
             "Internal/DataStream/DataStream.cs - v1.4",
             "Internal/DataStream/TwoWayDataStream.cs - v1.2",
             //"Net/Http/HttpServer.cs - PreRelase Build", working version comming soon
             "Net/Ssh/SSHClient.cs - v1",
-	    "Net/BDSocket.cs - v1",
+            "Net/BDSocket.cs - v1.3",
             "Net/Sockets.cs - v1.1",
             "Net/TcpClientAsync.cs -v1.1",
             "NeuralNetworks/Learning/BackProb.cs - v1.1",


IOC: Fix for parameters in singletons constructors could generate invalid IL code.

--- BTDB/IOC/GenerationContext.cs
+++ BTDB/IOC/GenerationContext.cs
@@ -13,8 +13,8 @@
         IBuildContext _buildContext;
         readonly Dictionary<Type, object> _specifics = new Dictionary<Type, object>();
         readonly ParameterInfo[] _parameterInfos;
-        readonly List<Tuple<object,Type>> _constants = new List<Tuple<object, Type>>();
-        readonly Stack<Tuple<ICReg,string>> _cycleDetectionStack = new Stack<Tuple<ICReg, string>>();
+        readonly List<Tuple<object, Type>> _constants = new List<Tuple<object, Type>>();
+        readonly Stack<Tuple<ICReg, string>> _cycleDetectionStack = new Stack<Tuple<ICReg, string>>();

         public GenerationContext(ContainerImpl container, ICRegILGen registration, IBuildContext buildContext)
         {
@@ -107,18 +107,24 @@
             }
             for (int i = 0; i < regs.Length; i++)
             {
-                if (parsLocals[i] != null)
-                {
-                    IL.Ldloc(parsLocals[i]);
+                var local = parsLocals[i];
+                if (local != null)
+                {
+                    IL.Ldloc(local);
                 }
                 else
                 {
-                    var local = regs[i].GenMain(this);
+                    local = regs[i].GenMain(this);
                     if (local != null)
                     {
                         IL.Ldloc(local);
                     }
                 }
+                if (local == null) continue;
+                if (local.LocalType != needs[i].ClrType && local.LocalType.IsClass)
+                {
+                    IL.UnboxAny(needs[i].ClrType);
+                }
             }
         }

@@ -138,11 +144,11 @@

         public void PushToCycleDetector(ICReg reg, string name)
         {
-            if (_cycleDetectionStack.Any(t=>t.Item1==reg))
-            {
-                throw new InvalidOperationException("Cycle detected in registrations: "+string.Join(", ",_cycleDetectionStack.Select(t=>t.Item2))+". Consider using Lazy<> to break cycle.");
-            }
-            _cycleDetectionStack.Push(new Tuple<ICReg, string>(reg,name));
+            if (_cycleDetectionStack.Any(t => t.Item1 == reg))
+            {
+                throw new InvalidOperationException("Cycle detected in registrations: " + string.Join(", ", _cycleDetectionStack.Select(t => t.Item2)) + ". Consider using Lazy<> to break cycle.");
+            }
+            _cycleDetectionStack.Push(new Tuple<ICReg, string>(reg, name));
         }

         public void PopFromCycleDetector()
@@ -235,7 +241,7 @@
             var comp = ComparerConst.Instance;
             foreach (var constant in _constants)
             {
-                if (comp.Equals(constant,tuple))
+                if (comp.Equals(constant, tuple))
                 {
                     tuple = constant;
                     goto found;
@@ -319,7 +325,7 @@
             public IILLocal GenMain(IGenerationContext context)
             {
                 var consts = ((GenerationContext)context)._constants;
-                context.IL.Ldarg((ushort) (_idx+(consts.Count>0?1:0)));
+                context.IL.Ldarg((ushort)(_idx + (consts.Count > 0 ? 1 : 0)));
                 return null;
             }

@@ -352,14 +358,14 @@
         public object GenerateFunc(Type funcType)
         {
             GatherNeeds(_registration, new HashSet<ICRegILGen>());
-            if (_constants.Count==0)
+            if (_constants.Count == 0)
             {
                 var method = ILBuilder.Instance.NewMethod(_registration.GenFuncName(this), funcType);
                 IL = method.Generator;
                 GenerateBody();
                 return method.Create();
             }
-            if (_constants.Count==1)
+            if (_constants.Count == 1)
             {
                 var method = ILBuilder.Instance.NewMethod(_registration.GenFuncName(this), funcType, _constants[0].Item2);
                 IL = method.Generator;


Fixed name violation

Fixed name violation

--- BattleShip/View/Highscores.cs
+++ BattleShip/View/Highscores.cs
@@ -70,11 +70,11 @@

                // I++;
             }
-            sort();
+            Sort();
             reader.Dispose();

         }
-        private void sort() {
+        private void Sort() {
             for(int i = 0; i < hiScores.Count; i++)
             {
                 for(int j = 0; j < hiScores.Count - 1; j++)
@@ -86,7 +86,7 @@
                             }
                 }
             }
-            for(int i = 0; i < hiScores.Count; i++)
+            for(int i = 0; i < 5; i++)
             {
                 Label l = new Label();
                 l.Text = (i + 1) + "." + hiScores[i].ToString();


Adding support for reviewed/not-reviewed

--- ChangesetsNotReviewed/run.csx
+++ ChangesetsNotReviewed/run.csx
@@ -12,6 +12,9 @@
     DateTime dFrom = DateTime.Now.Subtract(TimeSpan.FromDays(1));
     string from = req.GetQueryNameValuePairs()
         .FirstOrDefault(q => string.Compare(q.Key, "from", true) == 0)
+        .Value;
+    string notReviewed = req.GetQueryNameValuePairs()
+        .FirstOrDefault(q => string.Compare(q.Key, "not-reviewed", true) == 0)
         .Value;

     DateTime tryDate;
@@ -28,6 +31,10 @@
     string tfsPath = ConfigurationManager.AppSettings["Tfs.Path"] ?? "$/";

     var tickets = TfsEx.GetHistory(log, tfsPath, dFrom);
+    if (!string.IsNullOrWhiteSpace(notReviewed))
+    {
+        tickets = TfsEx.NotReviewed(log, history); // Filter for not reviewed items
+    }

     string message = tickets.Count().ToString();
     return Message(req, message);


Changed XmlWriter to XmlTextWriter

Changed XmlWriter to XmlTextWriter

--- CmcLibNet.Export/XMLWriter.cs
+++ CmcLibNet.Export/XMLWriter.cs
@@ -9,7 +9,7 @@
     // Writes data to XML file.
     internal class XmlWriter : BaseWriter
     {
-        System.Xml.XmlWriter _xw = null; // the writer object.
+        XmlTextWriter _xtw = null; // the writer object.
         bool disposed = false;

         #region Constructors
@@ -37,11 +37,11 @@
         {
             // create a new XMLWriterSettings and some starting elements
             // note that the state of the writer is left open.
-            XmlWriterSettings xws = new XmlWriterSettings();
-            xws.Indent = true;
-            _xw = System.Xml.XmlWriter.Create(fileName, xws);
-            _xw.WriteStartDocument();
-            _xw.WriteStartElement("dataroot");
+            //XmlWriterSettings xws = new XmlWriterSettings();
+            //xws.Indent = true;
+            _xtw = new XmlTextWriter(fileName, System.Text.Encoding.UTF8);
+            _xtw.WriteStartDocument();
+            _xtw.WriteStartElement("dataroot");
         }

         protected internal override void HandleProcessedDataRows(object sender, ExportProgressChangedArgs e)
@@ -55,7 +55,7 @@
             // populate XMLWriter with data
             foreach (List<CommenceValue> row in rows) // assume that the minimum amount of data is a complete, single Commence item.
             {
-                _xw.WriteStartElement(XmlConvert.EncodeLocalName(_cursor.Category));
+                _xtw.WriteStartElement(XmlConvert.EncodeLocalName(_cursor.Category));
                 var citems = row.Where(s => s.ColumnDefinition.IsConnection)
                     .OrderBy(o => o.ColumnDefinition.FieldName)
                     .GroupBy(g => g.ColumnDefinition.ColumnName)
@@ -67,17 +67,17 @@
                         // only write if we have something
                         if (!String.IsNullOrEmpty(v.DirectFieldValue))
                         {
-                            _xw.WriteStartElement(XmlConvert.EncodeLocalName(base.ExportHeaders[v.ColumnDefinition.ColumnIndex]));
+                            _xtw.WriteStartElement(XmlConvert.EncodeLocalName(base.ExportHeaders[v.ColumnDefinition.ColumnIndex]));
                             // can we get away with writing the value or do we need to use CData?
                             if (v.ColumnDefinition.CommenceFieldDefinition.MaxChars > 80)
                             {
-                                _xw.WriteCData(v.DirectFieldValue);
+                                _xtw.WriteCData(v.DirectFieldValue);
                             }
                             else
                             {
-                                _xw.WriteString(v.DirectFieldValue);
+                                _xtw.WriteString(v.DirectFieldValue);
                             }
-                            _xw.WriteEndElement();
+                            _xtw.WriteEndElement();
                         }
                     } // if IsConnection
                 } // row
@@ -85,7 +85,7 @@
                 {
                     WriteConnectedItems(citems);
                 }
-                _xw.WriteEndElement();
+                _xtw.WriteEndElement();
             } // rows
         }

@@ -100,13 +100,13 @@
             try
             {
                 // write closing elements and close XMLWriter
-                _xw.WriteEndElement();
-                _xw.WriteEndDocument();
+                _xtw.WriteEndElement();
+                _xtw.WriteEndDocument();
             }
             finally
             {
-                _xw.Flush();
-                _xw.Close();
+                _xtw.Flush();
+                _xtw.Close();
             }
         }

@@ -116,12 +116,12 @@
             foreach (IGrouping<string, CommenceValue> group in list)
             {
                 string connectionName = XmlConvert.EncodeLocalName(group.FirstOrDefault().ColumnDefinition.QualifiedConnection);
-                _xw.WriteStartElement(connectionName);
+                _xtw.WriteStartElement(connectionName);
                 // iterate over the connected value and grab every x-th connected value from the columns
                 for (int i = 0; i < group.FirstOrDefault().ConnectedFieldValues?.Length; i++)
                 {
                     string categoryName = group.FirstOrDefault().ColumnDefinition.Category;
-                    _xw.WriteStartElement(XmlConvert.EncodeLocalName(categoryName));
+                    _xtw.WriteStartElement(XmlConvert.EncodeLocalName(categoryName));
                     // now iterate over the different columns
                     for (int j = 0; j < group.Count(); j++)
                     {
@@ -129,22 +129,22 @@
                         if (!string.IsNullOrEmpty(value))
                         {
                             string fieldName = group.ElementAt(j).ColumnDefinition.FieldName;
-                            _xw.WriteStartElement(XmlConvert.EncodeLocalName(fieldName));
+                            _xtw.WriteStartElement(XmlConvert.EncodeLocalName(fieldName));
                             // are we dealing with a large text field?
                             if (group.ElementAt(j).ColumnDefinition.CommenceFieldDefinition.MaxChars > 80)
                             {
-                                _xw.WriteCData(value);
+                                _xtw.WriteCData(value);
                             }
                             else
                             {
-                                _xw.WriteString(value);
+                                _xtw.WriteString(value);
                             }
-                            _xw.WriteEndElement();
+                            _xtw.WriteEndElement();
                         }
                     }
-                    _xw.WriteEndElement();
+                    _xtw.WriteEndElement();
                 }
-                _xw.WriteEndElement();
+                _xtw.WriteEndElement();
             }
         }

@@ -162,10 +162,10 @@
             {
                 // Free any other managed objects here.
                 //
-                if (_xw != null)
+                if (_xtw != null && _xtw.WriteState != WriteState.Closed)
                 {
-                    _xw.Flush();
-                    _xw.Close();
+                    _xtw.Flush();
+                    _xtw.Close();
                 }
             }


try to build acronyms for all time zones

--- CompatBot/Utils/TimeParser.cs
+++ CompatBot/Utils/TimeParser.cs
@@ -32,6 +32,8 @@
         var tzList = TimeZoneInfo.GetSystemTimeZones();
         Config.Log.Trace("[TZI] System TZI count: " + tzList.Count);
         var result = new Dictionary<string, TimeZoneInfo>();
+        var standardNames = new Dictionary<string, TimeZoneInfo>();
+        var daylightNames = new Dictionary<string, TimeZoneInfo>();
         foreach (var tzi in tzList)
         {
             Config.Log.Trace($"[TZI] Checking {tzi.Id} ({tzi.DisplayName} / {tzi.StandardName} / {tzi.DaylightName})");
@@ -47,9 +49,26 @@
                 foreach (var tza in acronyms)
                     result[tza] = tzi;
             }
+            else
+            {
+                var a = tzi.StandardName.GetAcronym();
+                if (TimeZoneAcronyms.ContainsKey(a))
+                    continue;
+
+                if (!standardNames.ContainsKey(a))
+                    standardNames[a] = tzi;
+                a = tzi.DaylightName.GetAcronym();
+                if (TimeZoneAcronyms.ContainsKey(a) || standardNames.ContainsKey(a))
+                    continue;
+
+                if (!daylightNames.ContainsKey(a))
+                    daylightNames[a] = tzi;
+            }
         }
         Config.Log.Trace("[TZI] Total matched acronyms: " + result.Count);
-        TimeZoneMap = result;
+        TimeZoneMap = result.Concat(standardNames).Concat(daylightNames)
+            .DistinctBy(kvp => kvp.Key)
+            .ToDictionary(kvp => kvp.Key, kvp => kvp.Value);
     }

     public static bool TryParse(string dateTime, out DateTime result)


Remove unused variable

Remove unused variable

--- osu.Framework/Graphics/Sprites/SpriteDrawNode.cs
+++ osu.Framework/Graphics/Sprites/SpriteDrawNode.cs
@@ -26,7 +26,7 @@

             if (!Shader.Loaded) Shader.Compile();

-            RectangleF texRect = Texture.GetTextureRect();
+            Texture.GetTextureRect();

             Shader.Bind();


Refactor tests a bit

Refactor tests a bit

--- osu.Game.Rulesets.Osu.Tests/TestSceneNoteLock.cs
+++ osu.Game.Rulesets.Osu.Tests/TestSceneNoteLock.cs
@@ -31,7 +31,7 @@
         private const double late_miss_window = 500; // time after +500 is considered a miss

         /// <summary>
-        /// Tests clicking the second circle before the first hitobject's start time, while the first hitobject HAS NOT been judged.
+        /// Tests clicking a future circle before the first circle's start time, while the first circle HAS NOT been judged.
         /// </summary>
         [Test]
         public void TestClickSecondCircleBeforeFirstCircleTime()
@@ -66,7 +66,7 @@
         }

         /// <summary>
-        /// Tests clicking the second circle at the first hitobject's start time, while the first hitobject HAS NOT been judged.
+        /// Tests clicking a future circle at the first circle's start time, while the first circle HAS NOT been judged.
         /// </summary>
         [Test]
         public void TestClickSecondCircleAtFirstCircleTime()
@@ -101,7 +101,7 @@
         }

         /// <summary>
-        /// Tests clicking the second circle after the first hitobject's start time, while the first hitobject HAS NOT been judged.
+        /// Tests clicking a future circle after the first circle's start time, while the first circle HAS NOT been judged.
         /// </summary>
         [Test]
         public void TestClickSecondCircleAfterFirstCircleTime()
@@ -136,7 +136,7 @@
         }

         /// <summary>
-        /// Tests clicking the second circle before the first hitobject's start time, while the first hitobject HAS been judged.
+        /// Tests clicking a future circle before the first circle's start time, while the first circle HAS been judged.
         /// </summary>
         [Test]
         public void TestClickSecondCircleBeforeFirstCircleTimeWithFirstCircleJudged()
@@ -172,6 +172,9 @@
             addJudgementOffsetAssert(hitObjects[0], -200); // time_second_circle - first_circle_time - 100
         }

+        /// <summary>
+        /// Tests clicking a future circle after a slider's start time, but hitting all slider ticks.
+        /// </summary>
         [Test]
         public void TestMissSliderHeadAndHitAllSliderTicks()
         {
@@ -211,6 +214,9 @@
             addJudgementAssert("slider tick", () => ((Slider)hitObjects[1]).NestedHitObjects[1] as SliderTick, HitResult.Great);
         }

+        /// <summary>
+        /// Tests clicking hitting future slider ticks before a circle.
+        /// </summary>
         [Test]
         public void TestHitSliderTicksBeforeCircle()
         {
@@ -251,11 +257,14 @@
             addJudgementAssert("slider tick", () => ((Slider)hitObjects[1]).NestedHitObjects[1] as SliderTick, HitResult.Great);
         }

+        /// <summary>
+        /// Tests clicking a future circle before a spinner.
+        /// </summary>
         [Test]
         public void TestHitCircleBeforeSpinner()
         {
             const double time_spinner = 1500;
-            const double time_circle = 1510;
+            const double time_circle = 1800;
             Vector2 positionCircle = Vector2.Zero;

             var hitObjects = new List<OsuHitObject>
@@ -275,7 +284,7 @@

             performTest(hitObjects, new List<ReplayFrame>
             {
-                new OsuReplayFrame { Time = time_spinner, Position = positionCircle, Actions = { OsuAction.LeftButton } },
+                new OsuReplayFrame { Time = time_spinner - 100, Position = positionCircle, Actions = { OsuAction.LeftButton } },
                 new OsuReplayFrame { Time = time_spinner + 10, Position = new Vector2(236, 192), Actions = { OsuAction.RightButton } },
                 new OsuReplayFrame { Time = time_spinner + 20, Position = new Vector2(256, 172), Actions = { OsuAction.RightButton } },
                 new OsuReplayFrame { Time = time_spinner + 30, Position = new Vector2(276, 192), Actions = { OsuAction.RightButton } },


Add note about nested masking case

Add note about nested masking case

--- osu.Game/Graphics/Containers/ScalingContainer.cs
+++ osu.Game/Graphics/Containers/ScalingContainer.cs
@@ -136,7 +136,7 @@

         private void updateSize()
         {
-            const float fade_time = 500;
+            const float duration = 500;

             if (targetMode == ScalingMode.Everything)
             {
@@ -155,10 +155,10 @@
                         backgroundStack.Push(new ScalingBackgroundScreen());
                     }

-                    backgroundStack.FadeIn(fade_time);
+                    backgroundStack.FadeIn(duration);
                 }
                 else
-                    backgroundStack?.FadeOut(fade_time);
+                    backgroundStack?.FadeOut(duration);
             }

             RectangleF targetSize = new RectangleF(Vector2.Zero, Vector2.One);
@@ -187,9 +187,14 @@
             if (requiresMasking)
                 sizableContainer.Masking = true;

-            sizableContainer.MoveTo(targetSize.Location, 500, Easing.OutQuart);
-            sizableContainer.ResizeTo(targetSize.Size, 500, Easing.OutQuart).OnComplete(_ => { sizableContainer.Masking = requiresMasking; });
-            sizableContainer.TransformTo(nameof(CornerRadius), requiresMasking ? corner_radius : 0, 500, requiresMasking ? Easing.OutQuart : Easing.None);
+            sizableContainer.MoveTo(targetSize.Location, duration, Easing.OutQuart);
+            sizableContainer.ResizeTo(targetSize.Size, duration, Easing.OutQuart);
+
+            // Of note, this will not working great in the case of nested ScalingContainers where multiple are applying corner radius.
+            // There should likely only be masking and corner radius applied at one point in the full game stack to fix this.
+            // An example of how this can occur is it the skin editor is visible and the game screen scaling is set to "Everything".
+            sizableContainer.TransformTo(nameof(CornerRadius), requiresMasking ? corner_radius : 0, duration, requiresMasking ? Easing.OutQuart : Easing.None)
+                            .OnComplete(_ => { sizableContainer.Masking = requiresMasking; });
         }

         private class ScalingBackgroundScreen : BackgroundScreenDefault


Minor tidying up of Quaternion RotateEuler methods.

--- nml/Quaternion.cs
+++ nml/Quaternion.cs
@@ -508,8 +508,26 @@
         /// <param name="yaw">Yaw (around the Y axis) in radians.</param>
         /// <param name="pitch">Pitch (around the X axis) in radians.</param>
         /// <param name="roll">Roll (around the Z axis) in radians.</param>
-        /// <returns></returns>
+        /// <returns>A quaternion representing a rotation.</returns>
         public static Quaternion RotateEuler(float yaw, float pitch, float roll)
+        {
+            Quaternion result;
+            Quaternion.RotateEuler(yaw, pitch, roll, out result);
+            return result;
+        }
+
+        /// <summary>
+        /// Get a rotation quaternion around the specifieid euler angles.
+        /// The order of the applied rotation is Yaw first, then pitch and finally roll.
+        /// </summary>
+        /// <param name="yaw">Yaw (around the Y axis) in radians.</param>
+        /// <param name="pitch">Pitch (around the X axis) in radians.</param>
+        /// <param name="roll">Roll (around the Z axis) in radians.</param>
+        /// <param name="result">A quaternion representing a rotation.</param>
+#if !COMPAT
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+#endif
+        public static void RotateEuler(float yaw, float pitch, float roll, out Quaternion result)
         {
             float hYaw = yaw * 0.5f;
             float hPitch = pitch * 0.5f;
@@ -527,12 +545,11 @@
             float cosYaw;
             Common.SinCos(hYaw, out sinYaw, out cosYaw);

-            return new Quaternion(
-                    (cosYaw * sinPitch * cosRoll) + (sinYaw * cosPitch * sinRoll),
-                    (sinYaw * cosPitch * cosRoll) - (cosYaw * sinPitch * sinRoll),
-                    (cosYaw * cosPitch * sinRoll) - (sinYaw * sinPitch * cosRoll),
-                    (cosYaw * cosPitch * cosRoll) + (sinYaw * sinPitch * sinRoll)
-            );
+            result = Quaternion.Identity;
+            result.x = (cosYaw * sinPitch * cosRoll) + (sinYaw * cosPitch * sinRoll);
+            result.y = (sinYaw * cosPitch * cosRoll) - (cosYaw * sinPitch * sinRoll);
+            result.z = (cosYaw * cosPitch * sinRoll) - (sinYaw * sinPitch * cosRoll);
+            result.w = (cosYaw * cosPitch * cosRoll) + (sinYaw * sinPitch * sinRoll);
         }

         /// <summary>
@@ -629,11 +646,15 @@
             float wz = w * z;

             result = Matrix4x4.Identity;
-            result.Set( 1.0f - 2.0f * (y2 + z2), 2.0f * (xy - wz), 2.0f * (xz + wy), 0.0f,
-                        2.0f * (xy + wz), 1.0f - 2.0f * (x2 + z2), 2.0f * (yz - wx), 0.0f,
-                        2.0f * (xz - wy), 2.0f * (yz + wx), 1.0f - 2.0f * (x2 + y2), 0.0f,
-                        0.0f, 0.0f, 0.0f, 1.0f
-           );
+            result.M11 = 1.0f - 2.0f * (y2 + z2);
+            result.M12 = 2.0f * (xy - wz);
+            result.M13 = 2.0f * (xz + wy);
+            result.M21 = 2.0f * (xy + wz);
+            result.M22 = 1.0f - 2.0f * (x2 + z2);
+            result.M23 = 2.0f * (yz - wx);
+            result.M31 = 2.0f * (xz - wy);
+            result.M32 = 2.0f * (yz + wx);
+            result.M33 = 1.0f - 2.0f * (x2 + y2);
         }

         /// <summary>


Don't have noMissingFilterValues report the same missing thing twice


Use UpdateDate, don't use EDSMLastSystems

Using EDSMLastSystems can result in updates being missed

--- EDDiscovery/EDSM/EDSMClass.cs
+++ EDDiscovery/EDSM/EDSMClass.cs
@@ -182,7 +182,6 @@
         {
             string lstsyst;

-            DateTime NewSystemTime;
             DateTime lstsystdate;
             // First system in EDSM is from 2015-05-01 00:39:40
             DateTime gammadate = new DateTime(2015, 5, 1, 0, 0, 0, DateTimeKind.Utc);
@@ -194,20 +193,11 @@
             else
             {
                 // Get the most recent modify time returned from EDSM
-                NewSystemTime = SystemClass.GetLastSystemModifiedTime();
-                lstsyst = NewSystemTime.ToString("yyyy-MM-dd HH:mm:ss", CultureInfo.InvariantCulture);
-                lstsyst = SQLiteDBClass.GetSettingString("EDSMLastSystems", lstsyst);
-
-                if (!DateTime.TryParseExact(lstsyst, "yyyy-MM-dd HH:mm:ss", CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal, out lstsystdate))
-                {
-                    lstsystdate = NewSystemTime;
-                }
-                else if (lstsystdate < gammadate)
-                {
-                    if (NewSystemTime > gammadate)
-                        lstsystdate = NewSystemTime;
-                    else
-                        lstsystdate = gammadate;
+                lstsystdate = SystemClass.GetLastSystemModifiedTime();
+
+                if (lstsystdate < gammadate)
+                {
+                    lstsystdate = gammadate;
                 }
             }


Reorganize DistributeNodeSpeedValues()

Reorganize DistributeNodeSpeedValues()

--- Editor/AnimationPathEditor.cs
+++ Editor/AnimationPathEditor.cs
@@ -1118,32 +1118,29 @@
         }

         private void DistributeNodeSpeedValues() {
+            // Calculate path curved length.
             float pathLength = script.CalculatePathCurvedLength(
                 script.GizmoCurveSamplingFrequency);
-
             // Calculate time for one meter of curve length.
             float timeForMeter = 1 / pathLength;
-
             // Helper variable.
             float prevTimestamp = 0;

+            // For each node calculate and apply new timestamp.
             for (var i = 1; i < script.NodesNo - 1; i++) {
                 // Calculate section curved length.
                 float sectionLength = script.CalculateSectionCurvedLength(
                     i - 1,
                     i,
                     script.GizmoCurveSamplingFrequency);
-
                 // Calculate time interval.
                 float sectionTimeInterval = sectionLength * timeForMeter;
-
                 // Calculate new timestamp.
                 float newTimestamp = prevTimestamp + sectionTimeInterval;
-
                 // Update previous timestamp.
                 prevTimestamp = newTimestamp;

-                // Add timestamp to the list.
+                // Update node timestamp.
                 script.ChangeNodeTimestamp(i, newTimestamp);
             }
         }


Fixed issue when trimming fields and the field is null.

--- src/CsvHelper/CsvReader.cs
+++ src/CsvHelper/CsvReader.cs
@@ -266,7 +266,7 @@
 			}

 			var field = currentRecord[index];
-			if( configuration.TrimFields )
+			if( configuration.TrimFields && field != null )
 			{
 				field = field.Trim();
 			}
@@ -1160,7 +1160,7 @@
 				{
 					namedIndex = Regex.Replace( namedIndex, "\\s", string.Empty );
 				}
-				else if( configuration.TrimHeaders )
+				else if( configuration.TrimHeaders && namedIndex != null )
 				{
 					namedIndex = namedIndex.Trim();
 				}


Update DataTableExtensions.cs

Update DataTableExtensions.cs

--- src/DataTableExtensions.cs
+++ src/DataTableExtensions.cs
@@ -158,7 +158,7 @@
 				);
 			}

-			writer.WriteLine(@"insert into " + tableName + @" (" +
+			writer.WriteLine(@"insert into " + (tableName.StartsWith(tableVariableChar) ? tableName : escapeIfNecessary(tableName)) + @" (" +
 				string.Join(@", ", dt.Columns.OfType<DataColumn>().Select(
 					col => escapeIfNecessary(col.ColumnName)
 				)) + @") values");


Fixed BuildInsert() invocation.

Fixed BuildInsert() invocation.

--- src/Dommel/DommelMapper.cs
+++ src/Dommel/DommelMapper.cs
@@ -107,7 +107,7 @@

                 var builder = GetBuilder(connection);

-                sql = builder.BuildInsert(tableName, columnNames, paramNames);
+                sql = builder.BuildInsert(tableName, columnNames, paramNames, keyProperty);

                 _insertQueryCache[type] = sql;
             }


Ensure we add the superhandle to the dispose, and invoke the method on it, instead of on the superclass of the object

--- src/Foundation/NSObject.cs
+++ src/Foundation/NSObject.cs
@@ -128,8 +128,8 @@
 					Release ();
 					Marshal.FreeHGlobal (SuperHandle);
 				} else {
-					if (disposer.Add (handle))
-						Messaging.void_objc_msgSend_intptr_intptr_bool (SuperHandle, selPerformSelectorOnMainThreadWithObjectWaitUntilDone, selDrain, IntPtr.Zero, false);
+					if (disposer.Add (SuperHandle))
+						Messaging.void_objc_msgSend_intptr_intptr_bool (disposer.Handle, selPerformSelectorOnMainThreadWithObjectWaitUntilDone, selDrain, IntPtr.Zero, false);
 				}
 				handle = IntPtr.Zero;
 				super = IntPtr.Zero;


Avoid a double free

Avoid a double free

--- src/Foundation/NSObject.cs
+++ src/Foundation/NSObject.cs
@@ -134,6 +134,7 @@
 			}
 			if (super != IntPtr.Zero) {
 				Marshal.FreeHGlobal (super);
+				super = IntPtr.Zero;
 			}
 		}


Fixing .NET test EnvironmentManager directory detection

--- dotnet/test/common/Environment/EnvironmentManager.cs
+++ dotnet/test/common/Environment/EnvironmentManager.cs
@@ -87,7 +87,7 @@
                             string javaOutDirectory = Path.Combine(childDir.FullName, "java");
                             if (Directory.Exists(javaOutDirectory))
                             {
-                                info = new DirectoryInfo(javaOutDirectory);
+                                info = childDir;
                                 continueTraversal = false;
                                 break;
                             }


Remove hacky DrawableMenuItem RelativeSizeAxes/AutoSizeAxes setting

--- osu.Framework/Graphics/UserInterface/Menu.cs
+++ osu.Framework/Graphics/UserInterface/Menu.cs
@@ -252,11 +252,11 @@
         public virtual void Add(MenuItem item)
         {
             var drawableItem = CreateDrawableMenuItem(item);
-            drawableItem.AutoSizeAxes = ItemsContainer.AutoSizeAxes;
-            drawableItem.RelativeSizeAxes = ItemsContainer.RelativeSizeAxes;
             drawableItem.Clicked = menuItemClicked;
             drawableItem.Hovered = menuItemHovered;
             drawableItem.StateChanged += s => itemStateChanged(drawableItem, s);
+
+            drawableItem.SetFlowDirection(Direction);

             ItemsContainer.Add(drawableItem);
         }
@@ -580,7 +580,11 @@
                 InternalChildren = new[]
                 {
                     Background = CreateBackground(),
-                    Foreground = new Container { Child = Content = CreateContent() },
+                    Foreground = new Container
+                    {
+                        AutoSizeAxes = Axes.Both,
+                        Child = Content = CreateContent()
+                    },
                 };

                 var textContent = Content as IHasText;
@@ -591,6 +595,17 @@
                 }
             }

+            /// <summary>
+            /// Sets various properties of this <see cref="DrawableMenuItem"/> that depend on the direction in which
+            /// <see cref="DrawableMenuItem"/>s flow inside the containing <see cref="Menu"/> (e.g. sizing axes).
+            /// </summary>
+            /// <param name="direction">The direction in which <see cref="DrawableMenuItem"/>s will be flowed.</param>
+            public virtual void SetFlowDirection(Direction direction)
+            {
+                RelativeSizeAxes = direction == Direction.Horizontal ? Axes.Y : Axes.X;
+                AutoSizeAxes = direction == Direction.Horizontal ? Axes.X : Axes.Y;
+            }
+
             private Color4 backgroundColour = Color4.DarkSlateGray;
             /// <summary>
             /// Gets or sets the default background colour.
@@ -644,26 +659,6 @@
                 {
                     foregroundColourHover = value;
                     UpdateForegroundColour();
-                }
-            }
-
-            public override Axes RelativeSizeAxes
-            {
-                get { return base.RelativeSizeAxes; }
-                set
-                {
-                    base.RelativeSizeAxes = value;
-                    Foreground.RelativeSizeAxes = value;
-                }
-            }
-
-            public new Axes AutoSizeAxes
-            {
-                get { return base.AutoSizeAxes; }
-                set
-                {
-                    base.AutoSizeAxes = value;
-                    Foreground.AutoSizeAxes = value;
                 }
             }


Adjust transition duration slightly

Adjust transition duration slightly

--- osu.Game/Graphics/UserInterface/LineGraph.cs
+++ osu.Game/Graphics/UserInterface/LineGraph.cs
@@ -26,7 +26,7 @@
         public float ActualMaxValue { get; private set; } = float.NaN;
         public float ActualMinValue { get; private set; } = float.NaN;

-        private const double transform_duration = 500;
+        private const double transform_duration = 1500;

         /// <summary>
         /// Hold an empty area if values are less.


Expose triangles in OsuButton for further customisation

--- osu.Game/Graphics/UserInterface/OsuButton.cs
+++ osu.Game/Graphics/UserInterface/OsuButton.cs
@@ -23,6 +23,8 @@

         private SampleChannel sampleClick;
         private SampleChannel sampleHover;
+
+        protected Triangles Triangles;

         public OsuButton()
         {
@@ -52,7 +54,7 @@

             AddRange(new Drawable[]
             {
-                new Triangles
+                Triangles = new Triangles
                 {
                     RelativeSizeAxes = Axes.Both,
                     ColourDark = colours.BlueDarker,
@@ -120,4 +122,4 @@
             }
         }
     }
-}+}


Fix frames potentially getting lost due to non-matching `Schedule` usage

--- osu.Game/Online/Spectator/SpectatorClient.cs
+++ osu.Game/Online/Spectator/SpectatorClient.cs
@@ -12,6 +12,7 @@
 using osu.Framework.Bindables;
 using osu.Framework.Development;
 using osu.Framework.Graphics;
+using osu.Framework.Logging;
 using osu.Game.Beatmaps;
 using osu.Game.Online.API;
 using osu.Game.Replays.Legacy;
@@ -156,6 +157,8 @@

                 IsPlaying = true;

+                totalBundledFrames = 0;
+
                 // transfer state at point of beginning play
                 currentState.BeatmapID = score.ScoreInfo.BeatmapInfo.OnlineID;
                 currentState.RulesetID = score.ScoreInfo.RulesetID;
@@ -168,6 +171,21 @@
                 BeginPlayingInternal(currentState);
             });
         }
+
+        public void HandleFrame(ReplayFrame frame) => Schedule(() =>
+        {
+            if (!IsPlaying)
+            {
+                Logger.Log($"Frames arrived at {nameof(SpectatorClient)} outside of gameplay scope and will be ignored.");
+                return;
+            }
+
+            if (frame is IConvertibleReplayFrame convertible)
+                pendingFrames.Enqueue(convertible.ToLegacy(currentBeatmap));
+
+            if (pendingFrames.Count > max_pending_frames)
+                purgePendingFrames();
+        });

         public void EndPlaying(GameplayState state)
         {
@@ -236,6 +254,8 @@

         private Task? lastSend;

+        private int totalBundledFrames;
+
         private const int max_pending_frames = 30;

         protected override void Update()
@@ -246,20 +266,6 @@
                 purgePendingFrames();
         }

-        public void HandleFrame(ReplayFrame frame)
-        {
-            Debug.Assert(ThreadSafety.IsUpdateThread);
-
-            if (!IsPlaying)
-                return;
-
-            if (frame is IConvertibleReplayFrame convertible)
-                pendingFrames.Enqueue(convertible.ToLegacy(currentBeatmap));
-
-            if (pendingFrames.Count > max_pending_frames)
-                purgePendingFrames();
-        }
-
         private void purgePendingFrames()
         {
             if (pendingFrames.Count == 0)
@@ -269,6 +275,10 @@

             var frames = pendingFrames.ToArray();
             var bundle = new FrameDataBundle(currentScore.ScoreInfo, frames);
+
+            totalBundledFrames += frames.Length;
+
+            Console.WriteLine($"Purging {pendingFrames.Count} frames (total {totalBundledFrames})");

             pendingFrames.Clear();
             lastPurgeTime = Time.Current;


Add health check

Add health check

--- src/JustSending/Startup.cs
+++ src/JustSending/Startup.cs
@@ -46,6 +46,7 @@
             services.AddTransient<BackgroundJobScheduler>();

             services.AddHangfire(x => x.UseLiteDbStorage(Helper.BuildDbConnectionString("BackgroundJobs", _hostingEnvironment)));
+            services.AddHealthChecks();
         }

         public void Configure(IApplicationBuilder app, IHostingEnvironment env)
@@ -60,14 +61,16 @@
                 app.UseExceptionHandler("/Home/Error");
             }

+            app.UseHealthChecks("/api/test");
+
             app.UseCors(c =>
             {
                 c
-                   .AllowAnyHeader()
-                   .AllowAnyMethod()
-                   .AllowAnyOrigin()
-                   .AllowCredentials()
-                   .Build();
+                    .AllowAnyHeader()
+                    .AllowAnyMethod()
+                    .AllowAnyOrigin()
+                    .AllowCredentials()
+                    .Build();
             });

             app.UseStaticFiles();


Fixed invalid cast

Fixed invalid cast

--- nUpdate.Administration/UI/Dialogs/ProjectDialog.cs
+++ nUpdate.Administration/UI/Dialogs/ProjectDialog.cs
@@ -1350,7 +1350,7 @@
                 Invoke(
                     new Action(
                         () =>
-                            packageVersion = (UpdateVersion) packagesList.SelectedItems[0].Tag));
+                            packageVersion = new UpdateVersion((string)packagesList.SelectedItems[0].Tag)));
                 _ftp.DeleteDirectory(String.Format("{0}/{1}", _ftp.Directory, packageVersion));
             }
             catch (Exception deletingEx)


improved WorkingLine.WaitForEnd()

improved WorkingLine.WaitForEnd()

--- src/Library/WorkingLine.cs
+++ src/Library/WorkingLine.cs
@@ -18,6 +18,7 @@
         private readonly TaskQueue _queue = new TaskQueue();
         private readonly List<WorkerThread> _threads = new List<WorkerThread>();
         private readonly Dictionary<WorkerThread, bool> _threadBusy = new Dictionary<WorkerThread, bool>();
+        private readonly ManualResetEvent _startedEvent = new ManualResetEvent(false);
         private readonly ManualResetEvent _busyEvent = new ManualResetEvent(true);

         public ICollection<WorkerThread> WorkerThreads => _threads.ToArray();
@@ -49,7 +50,7 @@
         public int BusyWorkerCount
         {
             get => _busyWorkerCount;
-            set
+            private set
             {
                 if (_busyWorkerCount == value) return;
                 _busyWorkerCount = value;
@@ -79,6 +80,10 @@
                 }
             }
             BusyWorkerCount = count;
+            if (thread.Busy)
+            {
+                _startedEvent.Set();
+            }
         }

         private void ThreadWorkerTaskRejectedHandler(object sender, TaskRejectedEventArgs e)
@@ -113,7 +118,7 @@
         public bool Busy
         {
             get => _busy;
-            set
+            private set
             {
                 if (_busy == value) return;
                 _busy = value;
@@ -171,16 +176,24 @@
             }
         }

-        public void WaitForEnd()
-        {
-            _busyEvent.WaitOne();
-        }
-
-        public void WaitForDeath()
-        {
-            foreach (var thread in _threads)
-            {
-                thread.WaitForDeath();
+        public void WaitForEnd(bool mustHaveWorked = true, int timeout = Timeout.Infinite)
+        {
+            try
+            {
+                if (mustHaveWorked)
+                {
+                    _startedEvent.WaitOne(timeout);
+                }
+                _busyEvent.WaitOne(timeout);
+            }
+            catch (ObjectDisposedException) { };
+        }
+
+        public void WaitForDeath(int timeout = Timeout.Infinite)
+        {
+            foreach (var thread in _threads)
+            {
+                thread.WaitForDeath(mustHaveWorked: false, timeout: timeout);
             }
         }

@@ -197,6 +210,8 @@
                 thread.Dispose();
             }
             WaitForDeath();
+            _startedEvent.Close();
+            _busyEvent.Close();
         }
     }
 }


+ added the first OAuth RequestAuthorizationToken method

--- src/LinkedINSharp/OAuth.cs
+++ src/LinkedINSharp/OAuth.cs
@@ -1,5 +1,4 @@
 using System;
-using System.Net;
 using RestSharp;
 using RestSharp.Authenticators;
 using RestSharp.Contrib;
@@ -19,6 +18,14 @@
 		private const string BaseUrl = "https://api.linkedin.com/uas/oauth";
 		#endregion
 		#region Methods
+		/// <summary>
+		///
+		/// </summary>
+		/// <param name="callbackUri">The <see cref="Uri"/> to which the user is redirected when returning from the LinkedIN authorization screen.</param>
+		/// <param name="requestTokenSecret">The secret of the request token. Keep this somewhere safely stored with the user's session. You will need the provide this later in method TODO.</param>
+		/// <returns>Returns the LinkedIN authorization <see cref="Uri"/> to which users must be redirected in order give access to your application.</returns>
+		/// <exception cref="ArgumentNullException">Thrown whe <paramref name="callbackUri"/> is null.</exception>
+		/// <exception cref="LinkedINHttpResponseException">Thrown when LinkedIN did not respond properly while requesting the request token.</exception>
 		public Uri RequestAuthorizationToken( Uri callbackUri, out string requestTokenSecret )
 		{
 			// validate arguments
@@ -36,12 +43,7 @@
 			var request = new RestRequest( "requestToken" );

 			// execute the request
-			var response = client.Execute( request );
-
-			// make sure the request succeeded
-			// TODO: add better error handling
-			if ( response.StatusCode != HttpStatusCode.OK )
-				throw new InvalidOperationException( "Could not make requestToken request succesfully" );
+			var response = ExecuteRequest( client, request );

 			// extract the token from the query string
 			var queryString = HttpUtility.ParseQueryString( response.Content );


PR comment

PR comment

--- src/Marten/StoreOptions.cs
+++ src/Marten/StoreOptions.cs
@@ -219,7 +219,7 @@
         /// <param name="enumStyle"></param>
         /// <param name="casing">Casing style to be used in serialization</param>
         /// <param name="collectionStorage">Allow to set collection storage as raw arrays (without explicit types)</param>
-        /// <param name="nonPublicMembersStorage">Allow to use non public members should be used during deserialization</param>
+        /// <param name="nonPublicMembersStorage">Allow non public members to be used during deserialization</param>
         public void UseDefaultSerialization(
             EnumStorage enumStyle = EnumStorage.AsInteger,
             Casing casing = Casing.Default,


battery push to server fixes #21

battery push to server fixes #21

--- src/MindstormR.EV3/Main.cs
+++ src/MindstormR.EV3/Main.cs
@@ -10,6 +10,7 @@
 using MonoBrickFirmware.Movement;
 using MonoBrickFirmware.UserInput;
 using MonoBrickFirmware.Sensors;
+using MonoBrickFirmware.Management;

 namespace MonoBrickHelloWorld
 {
@@ -53,6 +54,7 @@
                 var gyroSensor = new EV3GyroSensor(SensorPort.In2, GyroMode.Angle);
                 var colorSensor = new EV3ColorSensor(SensorPort.In3) { Mode = ColorMode.Color };
                 var irSensor = new EV3IRSensor(SensorPort.In4, IRMode.Proximity);
+				var battery = Battery.Current;

                 while (running)
                 {
@@ -96,13 +98,14 @@
                     // todo: consider using signalr for this -> #18
                     Thread.Sleep(250);

-                    client.DownloadData(string.Format("{0}/{1}/sensors/push?touch={2}&gyro={3}&color={4}&ir={5}",
+					client.DownloadData(string.Format("{0}/{1}/sensors/push?touch={2}&gyro={3}&color={4}&ir={5}&battery={6}",
                             baseUrl,
                             _id,
                             touchSensor.ReadAsString(),
                             gyroSensor.ReadAsString(),
                             colorSensor.ReadAsString(),
-                            irSensor.ReadAsString()));
+                            irSensor.ReadAsString(),
+							battery.ReadAsString()));
                     Thread.Sleep(250);
                 }


Remove Create factory method

Remove Create factory method

--- cocos2d/actions/action/CCAction.cs
+++ cocos2d/actions/action/CCAction.cs
@@ -16,6 +16,11 @@
         public CCAction()
         {
             m_nTag = (int) ActionTag.kCCActionTagInvalid;
+        }
+
+        public CCAction(CCAction action)
+        {
+            m_nTag = action.m_nTag;
         }

         public CCNode Target
@@ -48,19 +53,7 @@

         public virtual object Copy(ICopyable zone)
         {
-            ICopyable tmpZone = zone;
-            CCAction ret;
-            if (tmpZone != null)
-            {
-                ret = (CCAction) tmpZone;
-            }
-            else
-            {
-                ret = new CCAction();
-            }
-
-            ret.m_nTag = m_nTag;
-            return ret;
+            return zone == null ? new CCAction() : new CCAction((CCAction)zone);
         }

         public virtual bool IsDone
@@ -88,9 +81,5 @@
             CCLog.Log("[Action update]. override me");
         }

-        public static CCAction Create()
-        {
-            return new CCAction();
-        }
     }
 }


word list fixes

word list fixes

--- src/Modules/Admin/Admin.cs
+++ src/Modules/Admin/Admin.cs
@@ -16,8 +16,8 @@
 namespace NinjaBotCore.Modules.Admin
 {
     public class Admin : ModuleBase
-    {
-
+    {
+        private static bool _isLinked = false;
         private static DiscordShardedClient _client;
         private static ChannelCheck _cc;
         private readonly IConfigurationRoot _config;
@@ -27,12 +27,49 @@
         public Admin(IServiceProvider services)
         {
             _client = services.GetRequiredService<DiscordShardedClient>();
-            _cc = services.GetRequiredService<ChannelCheck>();
+            _logger = services.GetRequiredService<ILogger<Admin>>();
+            if (!_isLinked)
+            {
+                _client.MessageReceived += WordFinder;
+                _logger.LogInformation($"Hooked into message received for away commands.");
+            }
+            _isLinked = true;
+            _cc     = services.GetRequiredService<ChannelCheck>();
             _config = services.GetRequiredService<IConfigurationRoot>();
-            _prefix = _config["prefix"];
-            _logger = services.GetRequiredService<ILogger<Admin>>();
-
+            _prefix = _config["prefix"];
             _logger.LogInformation("Admin module loaded!");
+        }
+
+        private async Task WordFinder(SocketMessage messageDetails)
+        {
+            await Task.Run(async () =>
+            {
+                var message = messageDetails as SocketUserMessage;
+                if (!messageDetails.Author.IsBot)
+                {
+                    List<NinjaBotCore.Database.WordList> serverWordList = null;
+                    using (var db = new NinjaBotEntities())
+                    {
+                        SocketGuild guild = (message.Channel as SocketGuildChannel)?.Guild;
+                        serverWordList = db.WordList.Where(w => w.ServerId == (long)guild.Id).ToList();
+                    }
+                    bool wordFound = false;
+                    foreach (var singleWord in serverWordList)
+                    {
+                        foreach (var content in messageDetails.Content.ToLower().Split(' '))
+                        {
+                            if (singleWord.Word.ToLower().Contains(content))
+                            {
+                                wordFound = true;
+                            }
+                        }
+                    }
+                    if (wordFound)
+                    {
+                        await messageDetails.DeleteAsync();
+                    }
+                }
+            });
         }

         [Command("change-prefix", RunMode = RunMode.Async)]
@@ -711,12 +748,20 @@
             var sb = new StringBuilder();
             using (var db = new NinjaBotEntities())
             {
-                var words = db.WordList.Where(w => w.ServerId == (long)Context.Guild.Id).ToList().FirstOrDefault();
-                if (words != null && words.Word.ToLower().Contains(word.ToLower()))
+                var words = db.WordList.Where(w => w.ServerId == (long)Context.Guild.Id).ToList();
+                bool wordFound = false;
+                foreach (var singleWord in words)
+                {
+                    if (singleWord.Word.ToLower().Contains(word.ToLower()))
+                    {
+                        wordFound = true;
+                    }
+                }
+                if (wordFound)
                 {
                     sb.AppendLine($"[{word}] is already in the list!");
                 }
-                else
+                else
                 {
                     sb.AppendLine($"Adding [{word}] to the list!");
                     db.Add(new WordList
@@ -728,8 +773,9 @@
                     });
                     await db.SaveChangesAsync();
                 }
-            }
-            await _cc.Reply(Context, sb.ToString());
+
+            }
+            await _cc.Reply(Context, sb.ToString());
         }

         private async void AddWarning(ICommandContext context, IGuildUser userWarned)
@@ -873,4 +919,4 @@
             }
         }
     }
-}+}


Fix: parsing tan medium name

Fix: parsing tan medium name


Add JsonValue.

Add JsonValue.


Improve log message

Improve log message

Co-Authored-By: lontivero <7fbf69634c7f8746a1585e508ea7bfe6c4c26d19@users.noreply.github.com>


CI fixes

CI fixes

Don't do progress reporting for non-interactive mode.

--- Winston/User/ConsoleUserAdapter.cs
+++ Winston/User/ConsoleUserAdapter.cs
@@ -43,14 +43,21 @@

         public void Message(string message)
         {
-            ConsoleEx.Move(0, startRow + lastPrintRow + lastProgressRow);
+            if (Environment.UserInteractive)
+            {
+                ConsoleEx.Move(0, startRow + lastPrintRow + lastProgressRow);
+            }
             output.WriteLine(message);
             lastPrintRow++;
         }

         public Progress NewProgress(string name)
         {
-            var result = new Progress {Name = name};
+            var result = new Progress { Name = name };
+            if (!Environment.UserInteractive)
+            {
+                return result;
+            }
             result.UpdateDownload = p =>
             {
                 lock (progressLock)


fix bug preventing exception information from being logged

--- modules/Common.Logging.EntLib/src/Common/Common.Logging.EntLib/Logging/EntLib/EntLibLogger.cs
+++ modules/Common.Logging.EntLib/src/Common/Common.Logging.EntLib/Logging/EntLib/EntLibLogger.cs
@@ -305,7 +305,7 @@
         protected virtual void ConfigureLogEntry(LogEntry log, object message, Exception ex)
         {
             string nullSafeMessage = (message == null ? null : message.ToString());
-            if (ex != null)
+            if (ex == null)
             {
                 log.Message = nullSafeMessage;
             }


Server redirection fixed.

Server redirection fixed.

--- Infusion.Proxy/Program.cs
+++ Infusion.Proxy/Program.cs
@@ -260,6 +260,8 @@
             if (rawPacket.Id == PacketDefinitions.ConnectToGameServer.Id)
             {
                 var packet = packetRegistry.Materialize<ConnectToGameServerPacket>(rawPacket);
+                serverEndpoint = new IPEndPoint(new IPAddress(packet.GameServerIp), packet.GameServerPort);
+
                 packet.GameServerIp = new byte[] {0x7F, 0x00, 0x00, 0x01};
                 packet.GameServerPort = proxyLocalPort;
                 rawPacket = packet.RawPacket;


fixed casing of string to String

fixed casing of string to String

--- JabbR/Nancy/HomeModule.cs
+++ JabbR/Nancy/HomeModule.cs
@@ -77,7 +77,7 @@
                     binData = Convert.FromBase64String(info.Groups["data"].Value);
                     contentType = info.Groups["type"].Value;

-                    if (string.IsNullOrWhiteSpace(contentType))
+                    if (String.IsNullOrWhiteSpace(contentType))
                     {
                         contentType = "application/octet-stream";
                     }


Maaaario! :running:

Maaaario! :running:

--- KuhlEngineTester/Form1.cs
+++ KuhlEngineTester/Form1.cs
@@ -35,8 +35,8 @@
         private void Form1_Load(object sender, EventArgs e)
         {
             label1.Parent = pictureBox1;
-            Renderer.newFrame += new Renderer.RenderHandler(rendererEvent);
-            Renderer.Collision += new Renderer.CollisionHandler(collisionEvent);
+            Event.NewFrame += new Event.RenderHandler(rendererEvent);
+            Event.Collision += new Event.CollisionHandler(collisionEvent);
             mBackTexture = new Texture(KuhlEngineTester.Properties.Resources.ground);
             mBackTexture.Stretch = false;

@@ -58,6 +58,7 @@
             uuid.Add("Player", renderer.CreateItem());
             uuid.Add("ObjectAbove", renderer.CreateItem());
             uuid.Add("ObjectBelow", renderer.CreateItem());
+            uuid.Add("Platform", renderer.CreateItem());

             // object benchmarker
             //for(int i = 0; i < 100; i++)
@@ -69,7 +70,8 @@
             //    itm.Height = 100;
             //    itm.X = i;
             //    itm.Y = i;
-            //    itm.Visible = true;
+            //    itm.Enabled = true;
+            //    itm.CheckCollision = true;
             //    renderer.SetItem(uuid["TestItem" + i.ToString()], itm);
             //}

@@ -78,7 +80,8 @@
             item.Texture.Stretch = false;
             item.Width = 640;
             item.Height = 32;
-            item.Visible = true;
+            item.Enabled = true;
+            item.CheckCollision = true;
             renderer.SetItem(uuid["WallTop"], item);

             item = renderer.GetItem(uuid["WallBottom"]);
@@ -87,8 +90,20 @@
             item.Y = 288;
             item.Width = 640;
             item.Height = 32;
-            item.Visible = true;
+            item.Enabled = true;
+            item.CheckCollision = true;
             renderer.SetItem(uuid["WallBottom"], item);
+
+            item = renderer.GetItem(uuid["Platform"]);
+            item.Texture = new Texture(123, 84, 3);
+            item.Texture.Stretch = false;
+            item.Y = 250;
+            item.X = 320;
+            item.Width = 288;
+            item.Height = 32;
+            item.Enabled = true;
+            item.CheckCollision = true;
+            renderer.SetItem(uuid["Platform"], item);

             item = renderer.GetItem(uuid["WallRight"]);
             item.Texture = wallTexture;
@@ -96,7 +111,8 @@
             item.X = 608;
             item.Width = 32;
             item.Height = 256;
-            item.Visible = true;
+            item.Enabled = true;
+            item.CheckCollision = true;
             renderer.SetItem(uuid["WallRight"], item);

             item = renderer.GetItem(uuid["WallLeft"]);
@@ -104,17 +120,19 @@
             item.Y = 32;
             item.Width = 32;
             item.Height = 256;
-            item.Visible = true;
+            item.Enabled = true;
+            item.CheckCollision = true;
             renderer.SetItem(uuid["WallLeft"], item);

             item = renderer.GetItem(uuid["Player"]);
             item.Texture = playerTexture;
-            item.Y = 54;
+            item.Y = 188;
             item.X = 32;
             item.Width = 100;
             item.Height = 100;
-            item.Visible = true;
+            item.Enabled = true;
             item.Layer = 5;
+            item.CheckCollision = true;
             renderer.SetItem(uuid["Player"], item);

             item = renderer.GetItem(uuid["ObjectAbove"]);
@@ -124,8 +142,9 @@
             item.X = 200;
             item.Width = 54;
             item.Height = 54;
-            item.Visible = true;
+            item.Enabled = true;
             item.Layer = 6;
+            item.CheckCollision = true;
             renderer.SetItem(uuid["ObjectAbove"], item);

             item = renderer.GetItem(uuid["ObjectBelow"]);
@@ -135,8 +154,9 @@
             item.X = 300;
             item.Width = 54;
             item.Height = 54;
-            item.Visible = true;
+            item.Enabled = true;
             item.Layer = 4;
+            item.CheckCollision = true;
             renderer.SetItem(uuid["ObjectBelow"], item);
         }

@@ -156,12 +176,9 @@

         }

-        private void collisionEvent(string aUUID1, string aUUID2)
-        {
-            if (this.InvokeRequired) this.Invoke(new emptyFunction(delegate()
-                {
-                    //MessageBox.Show("Kollision");
-                }));
+        private void collisionEvent(CollisionEventArgs e)
+        {
+            e.Cancel = true;
         }

         private void timer1_Tick(object sender, EventArgs e)
@@ -211,9 +228,9 @@
             Item item = renderer.GetItem(uuid["Player"]);
             //item.FlipX = false;
             item.X = item.X + 2;
-            if (jump > 0) item.X = item.X + 3;
+            if (jump > 0) item.X = item.X + 6;
             if (item.X > renderer.Width) item.X = -item.Width;
-            renderer.SetItem(uuid["Player"], item);
+            if(!renderer.SetItemPosition(uuid["Player"], item.X, item.Y)) tmrleft.Enabled = false;
         }

         private void Form1_KeyDown(object sender, KeyEventArgs e)
@@ -279,27 +296,27 @@
             Item item = renderer.GetItem(uuid["Player"]);
             //item.FlipX = false;
             item.X = item.X - 2;
-            if (jump > 0) item.X = item.X - 3;
+            if (jump > 0) item.X = item.X - 6;
             if (item.X < -item.Width) item.X = renderer.Width;
             renderer.SetItem(uuid["Player"], item);
         }

         private void tmrup_Tick(object sender, EventArgs e)
         {
-            Item item = renderer.GetItem(uuid["Player"]);
-            //item.FlipX = false;
-            item.Y = item.Y - 2;
-            if (item.Y < -item.Height) item.Y = renderer.Height;
-            renderer.SetItem(uuid["Player"], item);
+            //Item item = renderer.GetItem(uuid["Player"]);
+            ////item.FlipX = false;
+            //item.Y = item.Y - 2;
+            //if (item.Y < -item.Height) item.Y = renderer.Height;
+            //renderer.SetItem(uuid["Player"], item);
         }

         private void tmrdown_Tick(object sender, EventArgs e)
         {
-            Item item = renderer.GetItem(uuid["Player"]);
-            //item.FlipX = false;
-            item.Y = item.Y + 2;
-            if (item.Y > renderer.Height) item.Y = -item.Height;
-            renderer.SetItem(uuid["Player"], item);
+            //Item item = renderer.GetItem(uuid["Player"]);
+            ////item.FlipX = false;
+            //item.Y = item.Y + 2;
+            //if (item.Y > renderer.Height) item.Y = -item.Height;
+            //renderer.SetItem(uuid["Player"], item);
         }

         private void tmrjump_Tick(object sender, EventArgs e)
@@ -307,21 +324,21 @@
             if (jump < 3)
             {
                 Item item = renderer.GetItem(uuid["Player"]);
-                item.Y = item.Y - 7;
+                item.Y = item.Y - 14;
                 renderer.SetItem(uuid["Player"], item);
                 jump++;
             }
             else if (jump < 6)
             {
                 Item item = renderer.GetItem(uuid["Player"]);
-                item.Y = item.Y - 5;
+                item.Y = item.Y - 10;
                 renderer.SetItem(uuid["Player"], item);
                 jump++;
             }
             else if (jump < 8)
             {
                 Item item = renderer.GetItem(uuid["Player"]);
-                item.Y = item.Y - 3;
+                item.Y = item.Y - 6;
                 renderer.SetItem(uuid["Player"], item);
                 jump++;

@@ -334,7 +351,7 @@
             else if (jump < 12)
             {
                 Item item = renderer.GetItem(uuid["Player"]);
-                item.Y = item.Y + 3;
+                item.Y = item.Y + 6;
                 renderer.SetItem(uuid["Player"], item);
                 jump++;

@@ -342,7 +359,7 @@
             else if (jump < 15)
             {
                 Item item = renderer.GetItem(uuid["Player"]);
-                item.Y = item.Y + 5;
+                item.Y = item.Y + 10;
                 renderer.SetItem(uuid["Player"], item);
                 jump++;

@@ -350,7 +367,7 @@
             else if (jump < 18)
             {
                 Item item = renderer.GetItem(uuid["Player"]);
-                item.Y = item.Y + 7;
+                item.Y = item.Y + 14;
                 renderer.SetItem(uuid["Player"], item);
                 jump++;
             }


Implemented Camera

Implemented Camera

--- KuhlEngineTester/Form1.cs
+++ KuhlEngineTester/Form1.cs
@@ -44,7 +44,7 @@
             renderer.Height = 320;
             renderer.FPS = 60;
             renderer.Background = mBackTexture;
-
+            //renderer.SetCamera(32, 32, 608, 288);
             renderer.Start();

             Texture playerTexture = new Texture(KuhlEngineTester.Properties.Resources.player);


1656: Replaced the Eq method in HyperiaForexTests.cs by an inline method (#1657)

* 1656: Replaced the Eq method in HyperiaForexTests.cs by an inline method

* Removed Eq method from HyperiaForexTests.cs

* Fixed copy and paste mistake

--- exercises/concept/hyperia-forex/HyperiaForexTests.cs
+++ exercises/concept/hyperia-forex/HyperiaForexTests.cs
@@ -7,23 +7,18 @@
     [Fact]
     public void Equality_true()
     {
-        Assert.True(Eq(new CurrencyAmount(55, "HD"), new CurrencyAmount(55, "HD")));
+        Assert.True(new CurrencyAmount(55, "HD") == new CurrencyAmount(55, "HD"));
     }

     [Fact(Skip = "Remove this Skip property to run this test")]
     public void Equality_false()
     {
-        Assert.False(Eq(new CurrencyAmount(55, "HD"), new CurrencyAmount(60, "HD")));
+        Assert.False(new CurrencyAmount(55, "HD") == new CurrencyAmount(60, "HD"));
     }

     [Fact(Skip = "Remove this Skip property to run this test")]
     public void Equality_bad()
     {
-        Assert.Throws<ArgumentException>(() => Eq(new CurrencyAmount(55, "HD"), new CurrencyAmount(60, "USD")));
-    }
-
-    private bool Eq(CurrencyAmount amountA, CurrencyAmount amountB)
-    {
-        return amountA == amountB;
+        Assert.Throws<ArgumentException>(() => new CurrencyAmount(55, "HD") == new CurrencyAmount(60, "USD"));
     }
 }


test(Quartz): amend original trigger to start after 1 min, remove additional trigger


Added MessageSummary.BodyParts and MessageSummary.Attachments convenience properties

--- MailKit/MessageSummary.cs
+++ MailKit/MessageSummary.cs
@@ -70,8 +70,9 @@
 		/// <see cref="BodyPartMessage"/>, <see cref="BodyPartBasic"/>,
 		/// or <see cref="BodyPartMultipart"/>.</para>
 		/// <para>This property will only be set if the
-		/// <see cref="MessageSummaryItems.Body"/> flag is passed to
-		/// <see cref="IMailFolder.Fetch(System.Collections.Generic.IList<UniqueId>,MessageSummaryItems,System.Threading.CancellationToken)"/>.</para>
+		/// <see cref="MessageSummaryItems.BodyStructure"/> or
+		/// <see cref="MessageSummaryItems.Body"/> flag is used
+		/// when fetching summary information from a <see cref="IMailFolder"/>.</para>
 		/// </remarks>
 		/// <value>The body structure of the message.</value>
 		public BodyPart Body {
@@ -201,6 +202,9 @@
 		/// </summary>
 		/// <remarks>
 		/// <para>Gets the text/plain body part of the message.</para>
+		/// <para>In order for this to work properly, it is necessary to include
+		/// <see cref="MessageSummaryItems.BodyStructure"/> when fetching
+		/// summary information from a <see cref="IMailFolder"/>.</para>
 		/// </remarks>
 		/// <value>The text body if it exists; otherwise, <c>null</c>.</value>
 		public BodyPartText TextBody {
@@ -228,6 +232,9 @@
 		/// </summary>
 		/// <remarks>
 		/// <para>Gets the text/html body part of the message.</para>
+		/// <para>In order for this to work properly, it is necessary to include
+		/// <see cref="MessageSummaryItems.BodyStructure"/> when fetching
+		/// summary information from a <see cref="IMailFolder"/>.</para>
 		/// </remarks>
 		/// <value>The html body if it exists; otherwise, <c>null</c>.</value>
 		public BodyPartText HtmlBody {
@@ -248,6 +255,70 @@

 				return null;
 			}
+		}
+
+		static IEnumerable<BodyPartBasic> EnumerateBodyParts (BodyPart entity)
+		{
+			if (entity == null)
+				yield break;
+
+			var multipart = entity as BodyPartMultipart;
+
+			if (multipart != null) {
+				foreach (var subpart in multipart.BodyParts) {
+					foreach (var part in EnumerateBodyParts (subpart))
+						yield return part;
+				}
+
+				yield break;
+			}
+
+			var msgpart = entity as BodyPartMessage;
+
+			if (msgpart != null) {
+				var message = msgpart.Body;
+
+				if (message != null) {
+					foreach (var part in EnumerateBodyParts (message))
+						yield return part;
+				}
+
+				yield break;
+			}
+
+			yield return (BodyPartBasic) entity;
+		}
+
+		/// <summary>
+		/// Gets the body parts of the message.
+		/// </summary>
+		/// <remarks>
+		/// <para>Traverses over the <see cref="Body"/>, enumerating all of the
+		/// <see cref="BodyPartBasic"/> objects.</para>
+		/// <para>In order for this to work, it is necessary to include
+		/// <see cref="MessageSummaryItems.BodyStructure"/> or
+		/// <see cref="MessageSummaryItems.Body"/> when fetching
+		/// summary information from a <see cref="IMailFolder"/>.</para>
+		/// </remarks>
+		/// <value>The body parts.</value>
+		public IEnumerable<BodyPartBasic> BodyParts {
+			get { return EnumerateBodyParts (Body); }
+		}
+
+		/// <summary>
+		/// Gets the attachments.
+		/// </summary>
+		/// <remarks>
+		/// <para>Traverses over the <see cref="Body"/>, enumerating all of the
+		/// <see cref="BodyPartBasic"/> objects that have a Content-Disposition
+		/// header set to <c>"attachment"</c>.</para>
+		/// <para>In order for this to work properly, it is necessary to include
+		/// <see cref="MessageSummaryItems.BodyStructure"/> when fetching
+		/// summary information from a <see cref="IMailFolder"/>.</para>
+		/// </remarks>
+		/// <value>The attachments.</value>
+		public IEnumerable<BodyPartBasic> Attachments {
+			get { return EnumerateBodyParts (Body).Where (part => part.IsAttachment); }
 		}

 		/// <summary>


MeidoBot: Bugfix, cannot be readonly

MeidoBot: Bugfix, cannot be readonly

Declaring it readonly will blow up the composition.

--- MeidoBot/PluginManager.cs
+++ MeidoBot/PluginManager.cs
@@ -18,7 +18,7 @@
         }

         [ImportMany(typeof(IMeidoHook))]
-        readonly IMeidoHook[] pluginContainer;
+        IMeidoHook[] pluginContainer;

         public PluginManager()


Fix a bug in the auth connector.

Fix a bug in the auth connector.

--- Aurora/Services/DataService/Connectors/Database/LocalAuthConnector.cs
+++ Aurora/Services/DataService/Connectors/Database/LocalAuthConnector.cs
@@ -51,9 +51,10 @@
         public AuthData Get(UUID principalID)
         {
             List<string> query = GD.Query("UUID", principalID.ToString(), m_realm, "*");
-            AuthData data = new AuthData();
+            AuthData data = null;
             for (int i = 0; i < query.Count; i += 5)
             {
+                data = new AuthData();
                 data.PrincipalID = UUID.Parse(query[i]);
                 data.PasswordHash = query[i + 1];
                 data.PasswordSalt = query[i + 2];


added on enter .

added on enter .

--- ExpressCraft/grid/GridView.cs
+++ ExpressCraft/grid/GridView.cs
@@ -348,6 +348,11 @@
             }
         }

+        public void MoveNextCell()
+        {
+
+        }
+
         public void ShowEditor()
         {
             if(!isEditorShown && UseInRowEditor)
@@ -377,9 +382,25 @@

                 _activeEditor = input;

-                _activeEditor.OnLostFocus = (ev) =>
+                _activeEditor.OnLostFocus = (txt) =>
                 {
                     ValidateEditor();
+                };
+
+                _activeEditor.OnKeyDown = (txt, ev) => {
+                    if (ev.keyCode == 9)
+                    {
+                        ev.preventDefault();
+
+                        ValidateEditor();
+
+                        MoveNextCell();
+                    }
+                    else if (ev.keyCode == 13)
+                    {
+                        _activeEditor.OnLostFocus = null;
+                        ValidateEditor();
+                    }
                 };

                 _activeEditor.SetEditValue(dataRow[dataColIndex]);
@@ -391,6 +412,8 @@
                 isEditorShown = true;

                 RenderGrid();
+
+                _activeEditor.Focus();
             }
         }


Show strong hit explosion where applicable

--- osu.Game.Rulesets.Taiko/UI/HitExplosion.cs
+++ osu.Game.Rulesets.Taiko/UI/HitExplosion.cs
@@ -2,6 +2,7 @@
 // See the LICENCE file in the repository root for full licence text.

 using System;
+using System.Linq;
 using osuTK;
 using osu.Framework.Allocation;
 using osu.Framework.Graphics;
@@ -9,6 +10,7 @@
 using osu.Game.Rulesets.Objects.Drawables;
 using osu.Game.Rulesets.Scoring;
 using osu.Game.Rulesets.Taiko.Objects;
+using osu.Game.Rulesets.Taiko.Objects.Drawables;
 using osu.Game.Skinning;

 namespace osu.Game.Rulesets.Taiko.UI
@@ -45,24 +47,41 @@
         [BackgroundDependencyLoader]
         private void load()
         {
-            Child = skinnable = new SkinnableDrawable(new TaikoSkinComponent(getComponentName(JudgedObject.Result?.Type ?? HitResult.Great)), _ => new DefaultHitExplosion());
+            Child = skinnable = new SkinnableDrawable(new TaikoSkinComponent(getComponentName(JudgedObject)), _ => new DefaultHitExplosion());
         }

-        private TaikoSkinComponents getComponentName(HitResult resultType)
+        private TaikoSkinComponents getComponentName(DrawableHitObject judgedObject)
         {
+            var resultType = judgedObject.Result?.Type ?? HitResult.Great;
+
             switch (resultType)
             {
                 case HitResult.Miss:
                     return TaikoSkinComponents.TaikoExplosionMiss;

                 case HitResult.Good:
-                    return TaikoSkinComponents.TaikoExplosionGood;
+                    return useStrongExplosion(judgedObject)
+                        ? TaikoSkinComponents.TaikoExplosionGoodStrong
+                        : TaikoSkinComponents.TaikoExplosionGood;

                 case HitResult.Great:
-                    return TaikoSkinComponents.TaikoExplosionGreat;
+                    return useStrongExplosion(judgedObject)
+                        ? TaikoSkinComponents.TaikoExplosionGreatStrong
+                        : TaikoSkinComponents.TaikoExplosionGreat;
             }

-            throw new ArgumentOutOfRangeException(nameof(resultType), "Invalid result type");
+            throw new ArgumentOutOfRangeException(nameof(judgedObject), "Invalid result type");
+        }
+
+        private bool useStrongExplosion(DrawableHitObject judgedObject)
+        {
+            if (!(judgedObject.HitObject is Hit))
+                return false;
+
+            if (!(judgedObject.NestedHitObjects.SingleOrDefault() is DrawableStrongNestedHit nestedHit))
+                return false;
+
+            return judgedObject.Result.Type == nestedHit.Result.Type;
         }

         /// <summary>


Remove extra comma

Remove extra comma

--- osu.Game/Configuration/OsuConfigManager.cs
+++ osu.Game/Configuration/OsuConfigManager.cs
@@ -170,6 +170,6 @@
         ScalingPositionY,
         ScalingSizeX,
         ScalingSizeY,
-        UIScale,
+        UIScale
     }
 }


Improved read/write variable Int32 test

Improved read/write variable Int32 test

--- FalconUDPTests/PacketTests.cs
+++ FalconUDPTests/PacketTests.cs
@@ -89,11 +89,12 @@
         [TestMethod]
         public void TestReadWriteVariableLengthInt32()
         {
+            int[] valuesToTest = { 0, 1, 127, 128, 16383, 16384, 2097151, 2097152, 268435455, 268435456, Int32.MaxValue };
             var pool = new PacketPool(5, 1);
             var packet = pool.Borrow();

             int valueAsRead;
-            for(int i = 0; i < Int32.MaxValue && i >= 0; i+=127)
+            foreach(int i in valuesToTest)
             {
                 packet.WriteVariableLengthInt32(i);
                 packet.ResetAndMakeReadOnly(-1);
@@ -101,12 +102,6 @@
                 Assert.AreEqual(i, valueAsRead, "Value written: {0}, not as read: {1}", i, valueAsRead);
                 packet.Init();
             }
-
-            // test MaxValue too which the above loop did not
-            packet.WriteVariableLengthInt32(Int32.MaxValue);
-            packet.ResetAndMakeReadOnly(-1);
-            valueAsRead = packet.ReadVariableLengthInt32();
-            Assert.AreEqual(Int32.MaxValue, valueAsRead, "Value written: {0}, not as read: {1}", Int32.MaxValue, valueAsRead);
         }
     }
 }


Fixing AssemblyInfo

Fixing AssemblyInfo

--- CSharp/src/Domain/BedBrebo.Domain.Bookings/Properties/AssemblyInfo.cs
+++ CSharp/src/Domain/BedBrebo.Domain.Bookings/Properties/AssemblyInfo.cs
@@ -5,11 +5,11 @@
 // General Information about an assembly is controlled through the following
 // set of attributes. Change these attribute values to modify the information
 // associated with an assembly.
-[assembly: AssemblyTitle("Domain")]
+[assembly: AssemblyTitle("BedBrebo.Domain.Bookings")]
 [assembly: AssemblyDescription("")]
 [assembly: AssemblyConfiguration("")]
 [assembly: AssemblyCompany("Microsoft")]
-[assembly: AssemblyProduct("Domain")]
+[assembly: AssemblyProduct("BedBrebo.Domain.Bookings")]
 [assembly: AssemblyCopyright("Copyright © Microsoft 2016")]
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyCulture("")]


Move font and text size to class ProfileLink class

--- osu.Game/Overlays/Profile/ProfileHeader.cs
+++ osu.Game/Overlays/Profile/ProfileHeader.cs
@@ -125,8 +125,6 @@
                                             Anchor = Anchor.BottomLeft,
                                             Origin = Anchor.BottomLeft,
                                             Y = -48,
-                                            TextSize = 30,
-                                            Font = @"Exo2.0-RegularItalic",
                                         },
                                         countryFlag = new DrawableFlag(user.Country?.FlagName)
                                         {
@@ -547,6 +545,8 @@
                 {
                     Text = user.Username;
                     Url = $@"https://osu.ppy.sh/users/{user.Id}";
+                    Font = @"Exo2.0-RegularItalic";
+                    TextSize = 30;
                 }
             }
         }


Remove the previous audio file before adding a new one

--- osu.Game/Screens/Edit/Setup/SetupScreen.cs
+++ osu.Game/Screens/Edit/Setup/SetupScreen.cs
@@ -144,14 +144,29 @@
             var info = new FileInfo(filePath.NewValue);

             if (!info.Exists)
+            {
                 audioTrackTextBox.Current.Value = filePath.OldValue;
-
+                return;
+            }
+
+            var beatmapFiles = Beatmap.Value.BeatmapSetInfo.Files;
+
+            // remove the old file
+            var oldFile = beatmapFiles.FirstOrDefault(f => f.Filename == filePath.OldValue);
+
+            if (oldFile != null)
+            {
+                beatmapFiles.Remove(oldFile);
+                files.Dereference(oldFile.FileInfo);
+            }
+
+            // add the new file
             IO.FileInfo osuFileInfo;

             using (var stream = info.OpenRead())
                 osuFileInfo = files.Add(stream);

-            Beatmap.Value.BeatmapSetInfo.Files.Add(new BeatmapSetFileInfo
+            beatmapFiles.Add(new BeatmapSetFileInfo
             {
                 FileInfo = osuFileInfo,
                 Filename = info.Name


Forgot to document that ZonedClock is immutable...

--- src/NodaTime/ZonedClock.cs
+++ src/NodaTime/ZonedClock.cs
@@ -2,6 +2,7 @@
 // Use of this source code is governed by the Apache License 2.0,
 // as found in the LICENSE.txt file.
 using JetBrains.Annotations;
+using NodaTime.Annotations;
 using NodaTime.Utility;

 namespace NodaTime
@@ -10,6 +11,8 @@
     /// A clock with an associated time zone and calendar. This is effectively a convenience
     /// class decorating an <see cref="IClock"/>.
     /// </summary>
+    /// <threadsafety>This type is immutable reference type. See the thread safety section of the user guide for more information.</threadsafety>
+    [Immutable]
     public sealed class ZonedClock
     {
         private readonly IClock clock;
@@ -44,6 +47,7 @@
         /// </summary>
         /// <returns>The current instant provided by the underlying clock, adjusted to the
         /// time zone of this object.</returns>
+        [Pure]
         public ZonedDateTime GetCurrentZonedDateTime()
         {
             return GetCurrentInstant().InZone(zone, calendar);
@@ -55,6 +59,7 @@
         /// </summary>
         /// <returns>The local date/time of the current instant provided by the underlying clock, adjusted to the
         /// time zone of this object.</returns>
+        [Pure]
         public LocalDateTime GetCurrentLocalDateTime()
         {
             return GetCurrentZonedDateTime().LocalDateTime;
@@ -66,6 +71,7 @@
         /// </summary>
         /// <returns>The offset date/time of the current instant provided by the underlying clock, adjusted to the
         /// time zone of this object.</returns>
+        [Pure]
         public OffsetDateTime GetCurrentOffsetDateTime()
         {
             return GetCurrentZonedDateTime().ToOffsetDateTime();
@@ -78,6 +84,7 @@
         /// </summary>
         /// <param name="zone">The time zone for the new <c>ZonedClock</c>.</param>
         /// <returns>A new <c>ZonedClock</c> using the specified time zone.</returns>
+        [Pure]
         public ZonedClock WithZone([NotNull] DateTimeZone zone)
         {
             return new ZonedClock(clock, zone, calendar);
@@ -90,6 +97,7 @@
         /// </summary>
         /// <param name="calendar">The calendar system for the new <c>ZonedClock</c>.</param>
         /// <returns>A new <c>ZonedClock</c> using the specified calendar system.</returns>
+        [Pure]
         public ZonedClock WithCalendar([NotNull] CalendarSystem calendar)
         {
             return new ZonedClock(clock, zone, calendar);


Update to align with implemented functionality (no exception on invalid handler)

--- Core/OfficeDevPnP.Core.Tests/Framework/Providers/XMLProvidersTests.cs
+++ Core/OfficeDevPnP.Core.Tests/Framework/Providers/XMLProvidersTests.cs
@@ -2539,35 +2539,36 @@
             Assert.IsNull(handler.Configuration);
         }

-        [TestMethod]
-        [ExpectedException(typeof(FileNotFoundException))]
-        [TestCategory(TEST_CATEGORY)]
-        public void XMLSerializer_Deserialize_UnavailableExtensibilityHandlersThrowsException_201605()
-        {
-            XMLTemplateProvider provider =
-                new XMLFileSystemTemplateProvider(
-                    String.Format(@"{0}\..\..\Resources\Templates",
-                    AppDomain.CurrentDomain.BaseDirectory),
-                    "UnavailableExtensibilityHandlerTemplates");
-
-            var serializer = new XMLPnPSchemaV201605Serializer();
-            provider.GetTemplate("ProvisioningTemplate-2016-05-Sample.xml", serializer);
-        }
-
-        [TestMethod]
-        [ExpectedException(typeof(FileNotFoundException))]
-        [TestCategory(TEST_CATEGORY)]
-        public void XMLSerializer_Deserialize_UnavailableExtensibilityHandlersThrowsException_201512()
-        {
-            XMLTemplateProvider provider =
-                new XMLFileSystemTemplateProvider(
-                    String.Format(@"{0}\..\..\Resources\Templates",
-                    AppDomain.CurrentDomain.BaseDirectory),
-                    "UnavailableExtensibilityHandlerTemplates");
-
-            var serializer = new XMLPnPSchemaV201512Formatter();
-            provider.GetTemplate("ProvisioningSchema-2015-12-Sample.xml", serializer);
-        }
+        // We're not throwing an exception anymore for invalid handlers, so skip these tests
+        //[TestMethod]
+        //[ExpectedException(typeof(FileNotFoundException))]
+        //[TestCategory(TEST_CATEGORY)]
+        //public void XMLSerializer_Deserialize_UnavailableExtensibilityHandlersThrowsException_201605()
+        //{
+        //    XMLTemplateProvider provider =
+        //        new XMLFileSystemTemplateProvider(
+        //            String.Format(@"{0}\..\..\Resources\Templates",
+        //            AppDomain.CurrentDomain.BaseDirectory),
+        //            "UnavailableExtensibilityHandlerTemplates");
+
+        //    var serializer = new XMLPnPSchemaV201605Serializer();
+        //    provider.GetTemplate("ProvisioningTemplate-2016-05-Sample.xml", serializer);
+        //}
+
+        //[TestMethod]
+        //[ExpectedException(typeof(FileNotFoundException))]
+        //[TestCategory(TEST_CATEGORY)]
+        //public void XMLSerializer_Deserialize_UnavailableExtensibilityHandlersThrowsException_201512()
+        //{
+        //    XMLTemplateProvider provider =
+        //        new XMLFileSystemTemplateProvider(
+        //            String.Format(@"{0}\..\..\Resources\Templates",
+        //            AppDomain.CurrentDomain.BaseDirectory),
+        //            "UnavailableExtensibilityHandlerTemplates");
+
+        //    var serializer = new XMLPnPSchemaV201512Formatter();
+        //    provider.GetTemplate("ProvisioningSchema-2015-12-Sample.xml", serializer);
+        //}

         [TestMethod]
         [TestCategory(TEST_CATEGORY)]


CI fixes

CI fixes

--- osu.Framework.Tests/Visual/TestCaseCountingText.cs
+++ osu.Framework.Tests/Visual/TestCaseCountingText.cs
@@ -2,7 +2,7 @@
 // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE

 using System;
-using OpenTK;
+using System.Globalization;
 using osu.Framework.Graphics;
 using osu.Framework.Graphics.Sprites;
 using osu.Framework.Graphics.UserInterface;
@@ -41,15 +41,15 @@
             {
                 default:
                 case CountType.AsDouble:
-                    return value.ToString();
+                    return value.ToString(CultureInfo.InvariantCulture);
                 case CountType.AsInteger:
                     return ((int)value).ToString();
                 case CountType.AsIntegerCeiling:
                     return ((int)Math.Ceiling(value)).ToString();
                 case CountType.AsDouble2:
-                    return Math.Round(value, 2).ToString();
+                    return Math.Round(value, 2).ToString(CultureInfo.InvariantCulture);
                 case CountType.AsDouble4:
-                    return Math.Round(value, 4).ToString();
+                    return Math.Round(value, 4).ToString(CultureInfo.InvariantCulture);
             }
         }


phantom whitespace

phantom whitespace

--- osu.Game.Rulesets.Osu.Tests/TestCaseSliderInput.cs
+++ osu.Game.Rulesets.Osu.Tests/TestCaseSliderInput.cs
@@ -49,9 +49,7 @@
         {
             loadBeatmap();
         }
-        private List<JudgementResult> judgementResults;
-        private bool allJudgedFired;
-
+
         private const double time_before_slider = 250;
         private const double time_slider_start = 1500;
         private const double time_during_slide_1 = 2500;
@@ -59,6 +57,9 @@
         private const double time_during_slide_3 = 3500;
         private const double time_during_slide_4 = 4000;

+        private List<JudgementResult> judgementResults;
+        private bool allJudgedFired;
+
         /// <summary>
         /// Scenario:
         /// - Press a key before a slider starts


trim whitespace

trim whitespace

--- osu.Game.Rulesets.Osu/Scoring/OsuScoreProcessor.cs
+++ osu.Game.Rulesets.Osu/Scoring/OsuScoreProcessor.cs
@@ -23,7 +23,6 @@
         {
         }

-
         float beatmapHp;

         protected override void ComputeTargets(Game.Beatmaps.Beatmap<OsuHitObject> beatmap)