*Added Operation enumerator

*Added Operation enumerator

--- ModelViewPresenter/MessageDispatcher/Telegram.cs
+++ ModelViewPresenter/MessageDispatcher/Telegram.cs
@@ -6,16 +6,24 @@

 namespace ModelViewPresenter.MessageDispatcher
 {
+    public enum Operation
+    {
+        None = 0,
+        OpenView = 1
+    }
+
     public struct Telegram
     {
         public int _sender;
         public int _receiver;
         public dynamic _data;
+        public Operation _operation;

-        public Telegram(int sender, int receiver, dynamic data)
+        public Telegram(int sender, int receiver, Operation operation, dynamic data)
         {
             this._sender = sender;
             this._receiver = receiver;
+            this._operation = operation;
             this._data = data;
         }
     }


Removed filtered tests.

Removed filtered tests.

--- MovieMiner.Tests/MineFandangoTicketSalesTests.cs
+++ MovieMiner.Tests/MineFandangoTicketSalesTests.cs
@@ -217,27 +217,6 @@
 			WriteMovies(bonusPicks);
 		}

-		[TestMethod, TestCategory(PRIMARY_TEST_CATEGORY), TestCategory("Single")]
-		public void MineFandangoTicketSales_TotalsFiltered()
-		{
-			var test = new MineFandangoTicketSales();
-			var movies = new List<string>() { "Crazy Rich Asians", "The Meg", "Mission Impossible - Fallout", "Mile 22" };
-
-			var actual = test.Mine();
-
-			Assert.IsNotNull(actual);
-			Assert.IsTrue(actual.Any(), "The list was empty.");
-
-			actual = actual.Where(movie => movies.Contains(movie.Name))
-							.GroupBy(movie => movie.Name)
-							.Select(group => new Movie { Name = group.Key, Earnings = group.Sum(item => item.Earnings) })
-							.Cast<IMovie>()
-							.OrderByDescending(movie => movie.Earnings)
-							.ToList();
-
-			WriteMovies(actual);
-		}
-
 		private void RemoveSameName(List<IMovie> list, IMovie toRemove)
 		{
 			var indexToRemove = 0;


Adds the -help option and the server configuration documentation (#19)

* Adds the -help option and the server configuration documentation

* Now opens the browser and displays the documentation when launched with -help.

--- NTumbleBit.TumblerServer/TumblerConfiguration.cs
+++ NTumbleBit.TumblerServer/TumblerConfiguration.cs
@@ -12,6 +12,8 @@
 using NTumbleBit.Common.Logging;
 using Microsoft.Extensions.Logging;
 using System.Text;
+using System.Diagnostics;
+using System.Runtime.InteropServices;

 namespace NTumbleBit.TumblerServer
 {
@@ -136,7 +138,15 @@
 			var config = TextFileConfiguration.Parse(File.ReadAllText(ConfigurationFile));
 			consoleConfig.MergeInto(config, true);

+			if (config.Contains("help"))
+			{
+				Console.WriteLine("Details on the wiki page :  https://github.com/NTumbleBit/NTumbleBit/wiki/Server-Config");
+				OpenBrowser("https://github.com/NTumbleBit/NTumbleBit/wiki/Server-Config");
+				System.Environment.Exit(0);
+			}
+
 			var defaultPort = config.GetOrDefault<int>("port", 5000);
+
 			Listen = config
 						.GetAll("bind")
 						.Select(p => ConvertToEndpoint(p, defaultPort))
@@ -210,6 +220,29 @@
 			clone.VoucherKey = VoucherKey.PubKey;
 			return clone;
 		}
+
+		public void OpenBrowser(string url)
+		{
+			try
+			{
+				if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
+				{
+					Process.Start(new ProcessStartInfo("cmd", $"/c start {url}")); // Works ok on windows
+				}
+				else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
+				{
+					Process.Start("xdg-open", url);  // Works ok on linux
+				}
+				else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
+				{
+					Process.Start("open", url); // Not tested
+				}
+			}
+			catch(Exception)
+			{
+				// nothing happens
+			}
+		}
 	}
 }


fixing an issue

fixing an issue

--- Source/HarmonyPatches.cs
+++ Source/HarmonyPatches.cs
@@ -547,71 +547,70 @@
             }
         }

-        static readonly FieldInfo wornApparelScoresFI = typeof(JobGiver_OptimizeApparel).GetField("wornApparelScores", BindingFlags.Instance | BindingFlags.NonPublic);
+        static readonly FieldInfo wornApparelScoresFI = typeof(JobGiver_OptimizeApparel).GetField("wornApparelScores", BindingFlags.Static | BindingFlags.NonPublic);
         static void Postfix(Pawn pawn, JobGiver_OptimizeApparel __instance, ref bool __state, ref Job __result)
-        {
-            if (!__state)
-            {
-                return;
-            }
-
+        {
+                if (!__state)
+                {
+                    return;
+                }
+
 #if BETTER_OUTFIT
             Log.Warning("Begin JobGiver_OptimizeApparel.Postfix(Pawn: " + pawn.Name.ToStringShort + "     Job: " + ((__result == null) ? "<null>" : __result.ToString()) + ")");
 #endif
-            if (!DoDressersHaveApparel() || pawn.apparel?.LockedApparel?.Count > 0)
-            {
-                return;
-            }
-
-            Thing thing = null;
-            float baseApparelScore = 0f;
-            if (__result != null && __result.targetA.Thing is Apparel)
-            {
-                thing = __result.targetA.Thing;
-                baseApparelScore = JobGiver_OptimizeApparel.ApparelScoreGain_NewTmp(pawn, thing as Apparel, wornApparelScoresFI.GetValue(__instance) as List<float>);
-                if (thing == null)
-                {
-                    baseApparelScore = 0f;
-                }
-                else
-                {
+                if (!DoDressersHaveApparel() || pawn.apparel?.LockedApparel?.Count > 0)
+                {
+                    return;
+                }
+
+                float baseApparelScore = 0f;
+                Apparel apparel = __result?.targetA.Thing as Apparel;
+                if (apparel != null)
+                {
+                    baseApparelScore = JobGiver_OptimizeApparel.ApparelScoreGain_NewTmp(pawn, apparel, wornApparelScoresFI.GetValue(__instance) as List<float>);
+                    if (apparel == null)
+                    {
+                        baseApparelScore = 0f;
+                    }
+                    else
+                    {
 #if BETTER_OUTFIT
                     Log.Message("    Game Found Better Apparel: " + ((thing == null) ? "<null>" : thing.Label) + "    Score: " + baseApparelScore);
 #endif
-                }
-            }
-
-            Apparel a = null;
-            Building_Dresser containingDresser = null;
-
+                    }
+                }
+
+                Apparel a = null;
+                Building_Dresser containingDresser = null;
+
 #if BETTER_OUTFIT
             Log.Message("    Loop Through Dressers:");
 #endif
-            foreach (Building_Dresser dresser in WorldComp.DressersToUse)
-            {
-                if (!dresser.UseDresserToDressFrom)
-                    continue;
+                foreach (Building_Dresser dresser in WorldComp.DressersToUse)
+                {
+                    if (!dresser.UseDresserToDressFrom)
+                        continue;
 #if TRACE && BETTER_OUTFIT
                 Log.Message("        Dresser: " + dresser.Label);
 #endif
-                float score = baseApparelScore;
-                if (dresser.FindBetterApparel(ref score, ref a, pawn, pawn.outfits.CurrentOutfit))
-                {
-                    thing = a;
-                    baseApparelScore = score;
-                    containingDresser = dresser;
+                    float score = baseApparelScore;
+                    if (dresser.FindBetterApparel(ref score, ref a, pawn, pawn.outfits.CurrentOutfit))
+                    {
+                        apparel = a;
+                        baseApparelScore = score;
+                        containingDresser = dresser;
 #if BETTER_OUTFIT
                     Log.Message("    Dresser Found Better Apparel: " + ((a == null) ? "<null>" : a.Label) + "    Score: " + baseApparelScore);
 #endif
-                }
-            }
+                    }
+                }
 #if BETTER_OUTFIT
             Log.Message("    Best Apparel: " + ((a == null) ? "<null>" : a.Label) + "    Score: " + baseApparelScore);
 #endif
-            if (a != null && containingDresser != null)
-            {
-                __result = new Job(containingDresser.wearApparelFromStorageJobDef, containingDresser, a);
-            }
+                if (a != null && containingDresser != null)
+                {
+                    __result = new Job(containingDresser.wearApparelFromStorageJobDef, containingDresser, apparel);
+                }
 #if BETTER_OUTFIT
             Log.Warning("End JobGiver_OptimizeApparel.Postfix");
 #endif


Fix possible array indexing exception in inventory server

--- OpenSim/Grid/InventoryServer/InventoryManager.cs
+++ OpenSim/Grid/InventoryServer/InventoryManager.cs
@@ -182,11 +182,10 @@
                 byte[] result = new byte[] { };

                 string[] parms = path.Split(new char[] { '/' }, StringSplitOptions.RemoveEmptyEntries);
-                if (parms.Length >= 1)
+                if (parms.Length > 1)
                 {
                     if (string.Compare(parms[1], "library", true) == 0)
                     {
-
                         MemoryStream ms = new MemoryStream();
                         saveInventoryToStream(_inventory, ms);

@@ -195,7 +194,7 @@
                     }
                     else if (string.Compare(parms[1], "user", true) == 0)
                     {
-                        if (parms.Length >= 2)
+                        if (parms.Length > 2)
                         {
                             result = GetUserInventory(new LLUUID(parms[2]));
                         }
@@ -204,6 +203,5 @@
                 return result;
             }
         }
-
     }
 }


Fix a crossing bug.

Fix a crossing bug.

--- OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -2756,8 +2756,8 @@
                         uint RegionCrossX = Scene.RegionInfo.RegionLocX * Constants.RegionSize;
                         uint RegionCrossY = Scene.RegionInfo.RegionLocY * Constants.RegionSize;

-                        if (pos2.X < 0f) RegionCrossX--;
-                        if (pos2.Y < 0f) RegionCrossY--;
+                        if (pos2.X < 0f) RegionCrossX -= Constants.RegionSize;
+                        if (pos2.Y < 0f) RegionCrossY -= Constants.RegionSize;
                         if (pos2.X > Scene.RegionInfo.RegionSizeX) RegionCrossX += Constants.RegionSize;
                         if (pos2.Y > Scene.RegionInfo.RegionSizeY) RegionCrossY += Constants.RegionSize;
                         GridRegion neighborRegion = null;


Call the bake module each time we see a new attachment to see if the attachment needs textures

--- OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -4583,6 +4583,10 @@

                 m_attachments.Add(gobj);
             }
+
+            IBakedTextureModule bakedModule = m_scene.RequestModuleInterface<IBakedTextureModule>();
+            if (bakedModule != null)
+                bakedModule.UpdateMeshAvatar(m_uuid);
         }

         /// <summary>


Fix exception when debug output path is specified in a check-only run

--- StoryCompiler/Program.cs
+++ StoryCompiler/Program.cs
@@ -70,7 +70,7 @@
                     return 3;
                 }

-                if (args.DebugLogOutputPath != null)
+                if (args.DebugLogOutputPath != null && !args.CheckOnly)
                 {
                     DebugDump(args.OutputPath, args.DebugLogOutputPath);
                 }


Registering GodModeBlock

Registering GodModeBlock

--- src/Nuterra/Maritaria/CheatBlocks/CheatBlockMod.cs
+++ src/Nuterra/Maritaria/CheatBlocks/CheatBlockMod.cs
@@ -12,6 +12,7 @@
 		public override void Load()
 		{
 			base.Load();
+			BlockLoader.Register(new GodModeBlock());
 		}

 	}


base32: Add guid test

base32: Add guid test

--- tests/rm.ExtensionsTest/Base32ExtensionTest.cs
+++ tests/rm.ExtensionsTest/Base32ExtensionTest.cs
@@ -82,6 +82,20 @@
 			Assert.AreEqual(s, base32.Base32Decode().ToUtf8String());
 		}

+		[Test]
+		[TestCase("8843EB1845D94528A4E862E277A26629", "H11YP625V52JH978CBH7F8K654")]
+		public void Base32Encode_Hex_01(string guid, string base32)
+		{
+			Assert.AreEqual(base32, guid.Base16Decode().Base32Encode());
+		}
+
+		[Test]
+		[TestCase("H11YP625V52JH978CBH7F8K654", "8843EB1845D94528A4E862E277A26629")]
+		public void Base32Decode_Hex_01(string base32, string guid)
+		{
+			Assert.AreEqual(guid, base32.Base32Decode().Base16Encode());
+		}
+
 		[Explicit]
 		[Test]
 		[Category("slow")]
@@ -116,5 +130,22 @@
 			sw.Stop();
 			Console.WriteLine(sw.ElapsedMilliseconds);
 		}
+
+		[Explicit]
+		[Test]
+		[Category("slow")]
+		public void Perf_Base32Encode_Guid()
+		{
+			var guidString = "8843eb18-45d9-4528-a4e8-62e277a26629";
+			var guid = Guid.Parse(guidString);
+			var sw = Stopwatch.StartNew();
+			for (int i = 0; i < iterations; i++)
+			{
+				var bytes = guid.ToByteArrayMatchingStringRepresentation();
+				var base32 = bytes.Base32Encode();
+			}
+			sw.Stop();
+			Console.WriteLine(sw.ElapsedMilliseconds);
+		}
 	}
 }


blow drying.

blow drying.

--- hybrasyl/Objects/User.cs
+++ hybrasyl/Objects/User.cs
@@ -2264,6 +2264,7 @@
                 foreach (var intent in intents)
                 {
                     var possibleTargets = new List<VisibleObject>();
+                    Rectangle rect = new Rectangle(0, 0, 0 ,0);

                     switch (intent.Direction)
                     {
@@ -2274,41 +2275,25 @@
                                 case Direction.North:
                                 {
                                     //facing north, attack north
-                                    possibleTargets.AddRange(
-                                        Map.EntityTree.GetObjects(new Rectangle(this.X, this.Y - intent.Radius, 1, intent.Radius))
-                                            .Where(
-                                                obj =>
-                                                    obj is Creature && obj != this && obj.GetType() != typeof(Merchant)));
+                                   rect = new Rectangle(this.X, this.Y - intent.Radius, 1, intent.Radius);
                                 }
                                     break;
                                 case Direction.South:
                                 {
                                     //facing south, attack south
-                                    possibleTargets.AddRange(
-                                        Map.EntityTree.GetObjects(new Rectangle(this.X, this.Y, 1, 1 + intent.Radius))
-                                            .Where(
-                                                obj =>
-                                                    obj is Creature && obj != this && obj.GetType() != typeof(Merchant)));
+                                    rect =new Rectangle(this.X, this.Y, 1, 1 + intent.Radius);
                                 }
                                     break;
                                 case Direction.East:
                                 {
                                     //facing east, attack east
-                                    possibleTargets.AddRange(
-                                        Map.EntityTree.GetObjects(new Rectangle(this.X, this.Y, 1 + intent.Radius, 1))
-                                            .Where(
-                                                obj =>
-                                                    obj is Creature && obj != this && obj.GetType() != typeof(Merchant)));
+                                    rect = new Rectangle(this.X, this.Y, 1 + intent.Radius, 1);
                                 }
                                     break;
                                 case Direction.West:
                                 {
                                     //facing west, attack west
-                                    possibleTargets.AddRange(
-                                        Map.EntityTree.GetObjects(new Rectangle(this.X - intent.Radius, this.Y, intent.Radius, 1))
-                                            .Where(
-                                                obj =>
-                                                    obj is Creature && obj != this && obj.GetType() != typeof(Merchant)));
+                                    rect = new Rectangle(this.X - intent.Radius, this.Y, intent.Radius, 1);
                                 }
                                     break;
                             }
@@ -2321,41 +2306,25 @@
                                 case Direction.North:
                                 {
                                     //facing north, attack south
-                                    possibleTargets.AddRange(
-                                        Map.EntityTree.GetObjects(new Rectangle(this.X, this.Y, 1, 1 + intent.Radius))
-                                            .Where(
-                                                obj =>
-                                                    obj is Creature && obj != this && obj.GetType() != typeof(Merchant)));
+                                    rect =new Rectangle(this.X, this.Y, 1, 1 + intent.Radius);
                                 }
                                     break;
                                 case Direction.South:
                                 {
                                     //facing south, attack north
-                                    possibleTargets.AddRange(
-                                        Map.EntityTree.GetObjects(new Rectangle(this.X, this.Y - intent.Radius, 1, intent.Radius))
-                                            .Where(
-                                                obj =>
-                                                    obj is Creature && obj != this && obj.GetType() != typeof(Merchant)));
+                                    rect = new Rectangle(this.X, this.Y - intent.Radius, 1, intent.Radius);
                                 }
                                     break;
                                 case Direction.East:
                                 {
                                     //facing east, attack west
-                                    possibleTargets.AddRange(
-                                        Map.EntityTree.GetObjects(new Rectangle(this.X - intent.Radius, this.Y, intent.Radius, 1))
-                                            .Where(
-                                                obj =>
-                                                    obj is Creature && obj != this && obj.GetType() != typeof(Merchant)));
+                                    rect = new Rectangle(this.X - intent.Radius, this.Y, intent.Radius, 1);
                                 }
                                     break;
                                 case Direction.West:
                                 {
                                     //facing west, attack east
-                                    possibleTargets.AddRange(
-                                        Map.EntityTree.GetObjects(new Rectangle(this.X, this.Y, 1 + intent.Radius, 1))
-                                            .Where(
-                                                obj =>
-                                                    obj is Creature && obj != this && obj.GetType() != typeof(Merchant)));
+                                    rect = new Rectangle(this.X, this.Y, 1 + intent.Radius, 1);
                                 }
                                     break;
                             }
@@ -2368,41 +2337,25 @@
                                 case Direction.North:
                                 {
                                     //facing north, attack west
-                                    possibleTargets.AddRange(
-                                        Map.EntityTree.GetObjects(new Rectangle(this.X - intent.Radius, this.Y, intent.Radius, 1))
-                                            .Where(
-                                                obj =>
-                                                    obj is Creature && obj != this && obj.GetType() != typeof(Merchant)));
+                                    rect = new Rectangle(this.X - intent.Radius, this.Y, intent.Radius, 1);
                                 }
                                     break;
                                 case Direction.South:
                                 {
                                     //facing south, attack east
-                                    possibleTargets.AddRange(
-                                        Map.EntityTree.GetObjects(new Rectangle(this.X, this.Y, 1 + intent.Radius, 1))
-                                            .Where(
-                                                obj =>
-                                                    obj is Creature && obj != this && obj.GetType() != typeof(Merchant)));
+                                    rect = new Rectangle(this.X, this.Y, 1 + intent.Radius, 1);
                                 }
                                     break;
                                 case Direction.East:
                                 {
                                     //facing east, attack north
-                                    possibleTargets.AddRange(
-                                        Map.EntityTree.GetObjects(new Rectangle(this.X, this.Y, 1, 1 + intent.Radius))
-                                            .Where(
-                                                obj =>
-                                                    obj is Creature && obj != this && obj.GetType() != typeof(Merchant)));
+                                    rect = new Rectangle(this.X, this.Y, 1, 1 + intent.Radius);
                                 }
                                     break;
                                 case Direction.West:
                                 {
                                     //facing west, attack south
-                                    possibleTargets.AddRange(
-                                        Map.EntityTree.GetObjects(new Rectangle(this.X, this.Y - intent.Radius, 1, intent.Radius))
-                                            .Where(
-                                                obj =>
-                                                    obj is Creature && obj != this && obj.GetType() != typeof(Merchant)));
+                                    rect = new Rectangle(this.X, this.Y - intent.Radius, 1, intent.Radius);
                                 }
                                     break;
                             }
@@ -2415,41 +2368,25 @@
                                 case Direction.North:
                                 {
                                     //facing north, attack east
-                                    possibleTargets.AddRange(
-                                        Map.EntityTree.GetObjects(new Rectangle(this.X, this.Y, 1 + intent.Radius, 1))
-                                            .Where(
-                                                obj =>
-                                                    obj is Creature && obj != this && obj.GetType() != typeof(Merchant)));
+                                   rect = new Rectangle(this.X, this.Y, 1 + intent.Radius, 1);
                                 }
                                     break;
                                 case Direction.South:
                                 {
                                     //facing south, attack west
-                                    possibleTargets.AddRange(
-                                        Map.EntityTree.GetObjects(new Rectangle(this.X - intent.Radius, this.Y, intent.Radius, 1))
-                                            .Where(
-                                                obj =>
-                                                    obj is Creature && obj != this && obj.GetType() != typeof(Merchant)));
+                                    rect = new Rectangle(this.X - intent.Radius, this.Y, intent.Radius, 1);
                                 }
                                     break;
                                 case Direction.East:
                                 {
                                     //facing east, attack south
-                                    possibleTargets.AddRange(
-                                        Map.EntityTree.GetObjects(new Rectangle(this.X, this.Y - intent.Radius, 1, intent.Radius))
-                                            .Where(
-                                                obj =>
-                                                    obj is Creature && obj != this && obj.GetType() != typeof(Merchant)));
+                                    rect = new Rectangle(this.X, this.Y - intent.Radius, 1, intent.Radius);
                                 }
                                     break;
                                 case Direction.West:
                                 {
                                     //facing west, attack north
-                                    possibleTargets.AddRange(
-                                        Map.EntityTree.GetObjects(new Rectangle(this.X, this.Y, 1, 1 + intent.Radius))
-                                            .Where(
-                                                obj =>
-                                                    obj is Creature && obj != this && obj.GetType() != typeof(Merchant)));
+                                    rect = new Rectangle(this.X, this.Y, 1, 1 + intent.Radius);
                                 }
                                     break;
                             }
@@ -2458,23 +2395,14 @@
                         case IntentDirection.Nearby:
                         {
                             //attack radius
-                            possibleTargets.AddRange(
-                                Map.EntityTree.GetObjects(new Rectangle(this.X - intent.Radius, this.Y,
-                                        (this.X + intent.Radius) - (this.X - intent.Radius),
-                                        (this.Y + intent.Radius) - (this.Y - intent.Radius)))
-                                    .Where(obj => obj is Creature && obj != this && obj.GetType() != typeof(Merchant)));
-                            possibleTargets.AddRange(
-                                Map.EntityTree.GetObjects(new Rectangle(this.X, this.Y - intent.Radius,
-                                        (this.X + intent.Radius) - (this.X - intent.Radius),
-                                        (this.Y + intent.Radius) - (this.Y - intent.Radius)))
-                                    .Where(obj => obj is Creature && obj != this && obj.GetType() != typeof(Merchant)));
+                            rect = new Rectangle(this.X - intent.Radius, this.Y - intent.Radius, intent.Radius * 2, intent.Radius * 2);
                         }
                             break;
                     }

-                    var actualTargets = intent.MaxTargets > 0
-                        ? possibleTargets.Take(intent.MaxTargets).OfType<Creature>().ToList()
-                        : possibleTargets.OfType<Creature>().ToList();
+                    if(!rect.IsEmpty) possibleTargets.AddRange(Map.EntityTree.GetObjects(rect).Where(obj => obj is Creature && obj != this && obj.GetType() != typeof(Merchant)));;
+
+                    var actualTargets = intent.MaxTargets > 0 ? possibleTargets.Take(intent.MaxTargets).OfType<Creature>().ToList() : possibleTargets.OfType<Creature>().ToList();

                     foreach (var target in actualTargets)
                     {


Copy/paste error

Copy/paste error

Duh. This is why we must test use complete tests not just tests for a
list of UUIDs returned, etc. My test that caught this was to use the
resulting IDs in llGetObjectDetails calls.  (Which of course failed for
user inventory IDs.) Fixed.

--- OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -4611,7 +4611,7 @@
             return itemIds;
         }

-        public IEnumerable<UUID> CollectVisibleAttachmentItemIds()
+        public IEnumerable<UUID> CollectVisibleAttachmentIds()
         {
             List<UUID> itemIds = new List<UUID>();
             lock (m_attachments)
@@ -4619,7 +4619,7 @@
                 foreach (SceneObjectGroup grp in m_attachments)
                 {
                     if (!grp.IsAttachedHUD)
-                        itemIds.Add(grp.GetFromItemID());
+                        itemIds.Add(grp.UUID);
                 }
             }


SLight change

SLight change

--- src/NadekoBot/Modules/Searches/Commands/Translator.cs
+++ src/NadekoBot/Modules/Searches/Commands/Translator.cs
@@ -56,7 +56,7 @@
                                                 .ConfigureAwait(false);
                             if (autoDelete)
                                 try { await umsg.DeleteAsync().ConfigureAwait(false); } catch { }
-                            await umsg.Channel.SendMessageAsync($"{umsg.Author.Mention} `:` "+text.Replace("<@ ", "<@").Replace("<@! ", "<@!")).ConfigureAwait(false);
+                            await umsg.Channel.SendConfirmAsync($"{umsg.Author.Mention} `:` "+text.Replace("<@ ", "<@").Replace("<@! ", "<@!")).ConfigureAwait(false);
                         }
                         catch { }

@@ -75,8 +75,7 @@
                 {
                     await umsg.Channel.TriggerTypingAsync().ConfigureAwait(false);
                     var translation = await TranslateInternal(umsg, langs, text);
-                    await channel.SendConfirmAsync(translation).ConfigureAwait(false);
-
+                    await channel.SendConfirmAsync("Translation " + langs, translation).ConfigureAwait(false);
                 }
                 catch
                 {


minor: change some logging levels

minor: change some logging levels

--- OpenSim/Server/Handlers/Grid/GridInfoHandlers.cs
+++ OpenSim/Server/Handlers/Grid/GridInfoHandlers.cs
@@ -102,11 +102,10 @@
             }
             catch (Exception)
             {
-                _log.Debug("[GRID INFO SERVICE]: Cannot get grid info from config source, using minimal defaults");
+                _log.Warn("[GRID INFO SERVICE]: Cannot get grid info from config source, using minimal defaults");
             }

             _log.DebugFormat("[GRID INFO SERVICE]: Grid info service initialized with {0} keys", _info.Count);
-
         }

         private void IssueWarning()
@@ -125,7 +124,7 @@
             XmlRpcResponse response = new XmlRpcResponse();
             Hashtable responseData = new Hashtable();

-            _log.Info("[GRID INFO SERVICE]: Request for grid info");
+            _log.Debug("[GRID INFO SERVICE]: Request for grid info");

             foreach (string k in _info.Keys)
             {


Added unit tests to handle default values

--- src/Nancy.Tests/Unit/DynamicDictionaryValueFixture.cs
+++ src/Nancy.Tests/Unit/DynamicDictionaryValueFixture.cs
@@ -384,5 +384,167 @@
             String actual = value;
             Assert.Null(actual);
         }
+
+        [Fact]
+        public void Given_null_when_calling_default_should_return_supplied_default_value_of_integer()
+        {
+            const int expected = 123;
+            dynamic value = new DynamicDictionaryValue(null);
+            int actual = value.Default(expected);
+            Assert.Equal(expected, actual);
+        }
+
+        [Fact]
+        public void Given_null_when_calling_default_should_return_supplied_default_value_of_string()
+        {
+            const string expected = "default value";
+            dynamic value = new DynamicDictionaryValue(null);
+            string actual = value.Default(expected);
+            Assert.Equal(expected, actual);
+        }
+
+        [Fact]
+        public void Given_null_when_calling_default_should_return_supplied_default_value_of_decimal()
+        {
+            const decimal expected = 88.43m;
+            dynamic value = new DynamicDictionaryValue(null);
+            decimal actual = value.Default(expected);
+            Assert.Equal(expected, actual);
+        }
+
+        [Fact]
+        public void Given_null_when_calling_default_should_return_supplied_default_value_of_double()
+        {
+            const double expected = 44.23d;
+            dynamic value = new DynamicDictionaryValue(null);
+            double actual = value.Default(expected);
+            Assert.Equal(expected, actual);
+        }
+
+        [Fact]
+        public void Given_null_when_calling_default_should_return_supplied_default_value_of_short()
+        {
+            const short expected = (short)4;
+            dynamic value = new DynamicDictionaryValue(null);
+            short actual = value.Default(expected);
+            Assert.Equal(expected, actual);
+        }
+
+        [Fact]
+        public void Given_null_when_calling_default_should_return_supplied_default_value_of_float()
+        {
+            const float expected = 9.343f;
+            dynamic value = new DynamicDictionaryValue(null);
+            float actual = value.Default(expected);
+            Assert.Equal(expected, actual);
+        }
+
+        [Fact]
+        public void Given_null_when_calling_default_should_return_supplied_default_value_of_long()
+        {
+            const long expected = 1000333000222000333L;
+            dynamic value = new DynamicDictionaryValue(null);
+            long actual = value.Default(expected);
+            Assert.Equal(expected, actual);
+        }
+
+        [Fact]
+        public void Given_null_when_calling_default_should_return_supplied_default_value_of_boolean()
+        {
+            const bool expected = true;
+            dynamic value = new DynamicDictionaryValue(null);
+            bool actual = value.Default(expected);
+            Assert.Equal(expected, actual);
+        }
+
+        [Fact]
+        public void Given_null_when_calling_default_should_return_supplied_default_value_of_datetime()
+        {
+            DateTime expected = DateTime.Parse("10 Dec, 2012");
+            dynamic value = new DynamicDictionaryValue(null);
+            DateTime actual = value.Default(expected);
+            Assert.Equal(expected, actual);
+        }
+
+        [Fact]
+        public void Given_null_when_calling_default_should_return_default_value_of_integer()
+        {
+            const int expected = 0;
+            dynamic value = new DynamicDictionaryValue(null);
+            int actual = value.Default<int>();
+            Assert.Equal(expected, actual);
+        }
+
+        [Fact]
+        public void Given_null_when_calling_default_should_return_default_value_of_string()
+        {
+            const string expected = null;
+            dynamic value = new DynamicDictionaryValue(null);
+            string actual = value.Default<string>();
+            Assert.Equal(expected, actual);
+        }
+
+        [Fact]
+        public void Given_null_when_calling_default_should_return_default_value_of_decimal()
+        {
+            const decimal expected = 0m;
+            dynamic value = new DynamicDictionaryValue(null);
+            decimal actual = value.Default<decimal>();
+            Assert.Equal(expected, actual);
+        }
+
+        [Fact]
+        public void Given_null_when_calling_default_should_return_default_value_of_double()
+        {
+            const double expected = 0d;
+            dynamic value = new DynamicDictionaryValue(null);
+            double actual = value.Default<double>();
+            Assert.Equal(expected, actual);
+        }
+
+        [Fact]
+        public void Given_null_when_calling_default_should_return_default_value_of_short()
+        {
+            const short expected = (short)0;
+            dynamic value = new DynamicDictionaryValue(null);
+            short actual = value.Default<short>();
+            Assert.Equal(expected, actual);
+        }
+
+        [Fact]
+        public void Given_null_when_calling_default_should_return_default_value_of_float()
+        {
+            const float expected = 0f;
+            dynamic value = new DynamicDictionaryValue(null);
+            float actual = value.Default<float>();
+            Assert.Equal(expected, actual);
+        }
+
+        [Fact]
+        public void Given_null_when_calling_default_should_return_default_value_of_long()
+        {
+            const long expected = 0L;
+            dynamic value = new DynamicDictionaryValue(null);
+            long actual = value.Default<long>();
+            Assert.Equal(expected, actual);
+        }
+
+        [Fact]
+        public void Given_null_when_calling_default_should_return_default_value_of_boolean()
+        {
+            const bool expected = false;
+            dynamic value = new DynamicDictionaryValue(null);
+            bool actual = value.Default<bool>();
+            Assert.Equal(expected, actual);
+        }
+
+        [Fact]
+        public void Given_null_when_calling_default_should_return_default_value_of_datetime()
+        {
+            DateTime expected = DateTime.MinValue;
+            dynamic value = new DynamicDictionaryValue(null);
+            DateTime actual = value.Default<DateTime>();
+            Assert.Equal(expected, actual);
+        }
     }
 }


Implement snapshot records for last_success and last_failure on SnapshotLifecyclePolicyMetadata. (#4162)

Implement snapshot records for last_success and last_failure on SnapshotLifecyclePolicyMetadata.

Do not map TimeString property, instead prefer to use the Time property and convert from epoch milliseconds.

--- src/Nest/XPack/Slm/SnapshotLifecyclePolicyMetadata.cs
+++ src/Nest/XPack/Slm/SnapshotLifecyclePolicyMetadata.cs
@@ -52,6 +52,28 @@
 		/// </summary>
 		[DataMember(Name = "in_progress")]
 		public LifecycleSnapshotInProgress InProgress { get; internal set; }
+
+		/// <summary>
+		///	 Information about the last time the policy successfully initiated a snapshot.
+		/// </summary>
+		[DataMember(Name = "last_success")]
+		public SnapshotLifecycleInvocationRecord LastSuccess { get; set; }
+
+		/// <summary>
+		///	 Information about the last time the policy failed to initiate a snapshot
+		/// </summary>
+		[DataMember(Name = "last_failure")]
+		public SnapshotLifecycleInvocationRecord LastFailure { get; set; }
+	}
+
+	public class SnapshotLifecycleInvocationRecord
+	{
+		[DataMember(Name = "snapshot_name")]
+		public string SnapshotName { get; set; }
+
+		[JsonFormatter(typeof(DateTimeOffsetEpochMillisecondsFormatter))]
+		[DataMember(Name = "time")]
+		public DateTimeOffset Time { get; set; }
 	}

 	/// <summary>


添加资源文案

添加资源文案

--- src/NetDimension.NanUI/Resources/Messages.Designer.cs
+++ src/NetDimension.NanUI/Resources/Messages.Designer.cs
@@ -47,8 +47,8 @@
         }

         /// <summary>
-        ///   重写当前线程的 CurrentUICulture 属性
-        ///   重写当前线程的 CurrentUICulture 属性。
+        ///   重写当前线程的 CurrentUICulture 属性，对
+        ///   使用此强类型资源类的所有资源查找执行重写。
         /// </summary>
         [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
         internal static global::System.Globalization.CultureInfo Culture {
@@ -79,6 +79,15 @@
         }

         /// <summary>
+        ///   查找类似 正在加载 的本地化字符串。
+        /// </summary>
+        internal static string Browser_Loading {
+            get {
+                return ResourceManager.GetString("Browser.Loading", resourceCulture);
+            }
+        }
+
+        /// <summary>
         ///   查找类似 关闭 DevTools(&C) 的本地化字符串。
         /// </summary>
         internal static string ContextMenu_CloseDevTools {


Fixed bootstraping.

Fixed bootstraping.

--- src/Projects/MyCouch.Rich/RichClientBootstraper.cs
+++ src/Projects/MyCouch.Rich/RichClientBootstraper.cs
@@ -16,7 +16,7 @@

         public RichClientBootstraper()
         {
-            ConfigureEntitiesResolver();
+            ConfigureEntityReflectorResolver();
             ConfigureViewsResolver();
             ConfigureEntitiesResolver();
         }


Improved response handling.

Improved response handling.

--- Piccolo/HttpHandler.cs
+++ Piccolo/HttpHandler.cs
@@ -40,6 +40,8 @@
 		{
 			var responseMessage = HandleRequest(new RequestContextWrapper(context));

+			context.Response.StatusCode = (int)responseMessage.StatusCode;
+			context.Response.StatusDescription = responseMessage.ReasonPhrase;
 			if (responseMessage.Content != null)
 				context.Response.Write(responseMessage.Content.ReadAsStringAsync().Result);
 		}


Updated Microservices page with new design

--- src/Red-Folder.com/Views/Microservice/Index.cshtml
+++ src/Red-Folder.com/Views/Microservice/Index.cshtml
@@ -3,149 +3,149 @@
 @{
     ViewBag.Title = "Microservices";
     Layout = "~/Views/Shared/_Layout.cshtml";
-    ViewBag.BodyCssClass = "new-css";
+    ViewBag.BodyCssClass = "new2-css";
+    ViewBag.DropContainerFluid = true;
 }
-

+

     "microservices is a software architecture style in which complex applications are composed of small, independent processes communicating with each other using language-agnostic APIs.

     These services are small, highly decoupled and focus on doing a small task, facilitating a modular approach to system-building."

     Wikipedia

-

-

-

-

-

-                    I've really become intrigued by Microservice architecture.  So much of it feels like a natural progression of many wonderful development practices, techniques and tools – a natural evolution.
-

-

-                    Microservices are quite a hot topic currently - moving to fine grained, small, distributed services from “monolith”.  I’d expect it to be an important topic for the next 3-5 years.
-

-

-                    I wanted to spend some time exploring the pros and cons of the architecture.  I’ve started to blog about this and will be providing sample code via my Github account and a management tools via this website.
-

+

+

+

+            I've really become intrigued by Microservice architecture.  So much of it feels like a natural progression of many wonderful development practices, techniques and tools – a natural evolution.
+

+

+            Microservices are quite a hot topic currently - moving to fine grained, small, distributed services from “monolith”.  I’d expect it to be an important topic for the next 3-5 years.
+

+

+            I wanted to spend some time exploring the pros and cons of the architecture.  I’ve started to blog about this and will be providing sample code via my Github account and a management tools via this website.
+

+

+

+
+
+

+

+

+
Dependancy Graph

+

+

+
+

+

+

+                @{ await Html.RenderPartialAsync("_MicroServiceDependanyGraph"); }
+
+                @section Scripts
+            {
+
+
+                    <environment names="Development">
+
+
+
+                    </environment>
+                    <environment names="Production,Staging">
+
+
+                    </environment>
+                }
+
+                @section Styles
+            {
+                    <environment names="Development">
+
+                        <link rel="stylesheet" href="/css/dependancyGraph/dependancy.graph.css">
+
+                    </environment>
+                    <environment names="Production,Staging">
+
+                        <link rel="stylesheet" href="/css/dependancyGraph/production/DependancyGraph-44f0c67616.css">
+
+                    </environment>
+                }

-
-

-

-
Dependancy Graph

+

+
Microservice Articles

+

+
+

+

+        @foreach (var blog in Model.BlogsForCurrentPage)
+        {
+            @(await Html.PartialAsync("_BlogTile", blog))
+        }

-

-

-

-            @{ await Html.RenderPartialAsync("_MicroServiceDependanyGraph"); }

-            @section Scripts
-            {
-
+

+
Microservice Source Code

+

-                <environment names="Development">
-
-
-
-                </environment>
-                <environment names="Production,Staging">
-
-
-                </environment>
-            }
+

+

+

+
+

+
Common Library

+

+                        Common Library code for the Microservices
+

+

+
+

+

+
+

-            @section Styles
-            {
-                <environment names="Development">
-
-                    <link rel="stylesheet" href="/css/dependancyGraph/dependancy.graph.css">
-
-                </environment>
-                <environment names="Production,Staging">
-
-                    <link rel="stylesheet" href="/css/dependancyGraph/production/DependancyGraph-44f0c67616.css">
-
-                </environment>
-            }
+

+
+

+
Base WebAPI

+

+                        Base code for Microservice WebAPI
+

+

+
+

+

+
+

+
+

+
+

+
Logger

+

+                        Logger Microservice - provides services via WebAPI
+

+

+
+

+

+
+

+
+

+
+

+
Projects

+

+                        Projects Microservice - provides details for my GitHub projects
+

+

+
+

+

+

-

-
-

-

-
Microservice Articles

-

-

-
-

-    @foreach (var blog in Model.BlogsForCurrentPage)
-    {
-        @(await Html.PartialAsync("_BlogTile", blog))
-    }
-

-
-

-

-
Microservice Source Code

-

-

-
-

-

-
-

-
Common Library

-

-                    Common Library code for the Microservices
-

-

-
-

-

-
-

-
-

-
-

-
Base WebAPI

-

-                    Base code for Microservice WebAPI
-

-

-
-

-

-
-

-
-

-
-

-
Logger

-

-                    Logger Microservice - provides services via WebAPI
-

-

-
-

-

-
-

-
-

-
-

-
Projects

-

-                    Projects Microservice - provides details for my GitHub projects
-

-

-
-

-

-
-

-

+


Fix issue with duplicate issues after login and first synchronization of the budgets

--- src/Savvy/Views/Shell/States/LoggedInShellState.cs
+++ src/Savvy/Views/Shell/States/LoggedInShellState.cs
@@ -49,10 +49,14 @@

                 IList<Budget> budgets = await api.GetBudgetsAsync();

-                if (budgets.Count == 0)
+                if (budgets.Any())
+                {
+                    this.AddActions(budgets);
+                }
+                else
+                {
                     await this.RefreshAsync();
-
-                this.AddActions(budgets);
+                }
             }
         }

@@ -67,7 +71,7 @@
             this.ViewModel.SecondaryActions.Add(this._logoutItem);

             this._budgetItems = budgets
-                .Select(f => new NavigationItemViewModel(() => this.OpenBudget(f)) { Label = f.BudgetName, Symbol = Symbol.OpenLocal })
+                .Select(f => new NavigationItemViewModel(() => this.OpenBudget(f)) { Label = f.BudgetName, Symbol = Symbol.Folder })
                 .ToList();

             this.ViewModel.Actions.AddRange(this._budgetItems);


Removed remnant code.

Removed remnant code.

--- PixelJSON/PixelJSON.cs
+++ PixelJSON/PixelJSON.cs
@@ -5,7 +5,7 @@
 using System.Linq;

 // My JSON Parser
-//
+//
 // 2015 Pixelbyte Studios
 /*
  * Based on MiniJSON.cs by Calvin Rien | https://gist.github.com/darktable/1411710
@@ -139,7 +139,7 @@

         TextReader _reader;

-        //The root JsonValue
+        //The root JsonValue
         public Dictionary<string, object> table;
         public object[] array;

@@ -280,7 +280,7 @@

         /// <summary>
         /// Gets the specific indexed item in the array as a string
-        /// Note:
+        /// Note:
         /// 1) Assumes the deserialized data is stored in the array field
         /// 2)  there are no Objects in the array if there are, well this wont work
         /// </summary>
@@ -302,8 +302,6 @@
                 else return Tokenize(PeekChar());
             }
         }
-
-        private PixelJSON() { }

         public static PixelJSON LoadString(string data)
         {


341: increase lock timeout

341: increase lock timeout

--- src/SharpConnect.MySql/0_Public/MySqlDataReader.cs
+++ src/SharpConnect.MySql/0_Public/MySqlDataReader.cs
@@ -1056,11 +1056,7 @@
                             int zeroCount = 0;
                             while (_tableResultIsNotComplete)
                             {
-                                if (zeroCount > 2)
-                                {
-                                    System.Threading.Thread.Sleep(1);
-                                    zeroCount = 0;
-                                }
+
                                 int subTableCount = 0;
                                 lock (_subTables)
                                 {
@@ -1069,8 +1065,13 @@
                                 //
                                 if (subTableCount == 0)
                                 {
+                                    if (zeroCount > 2)
+                                    {
+                                        System.Threading.Thread.Sleep(1);
+                                        zeroCount = 0;
+                                    }
                                     zeroCount++;
-                                    System.Threading.Monitor.Wait(_tableResultCompleteLock, 30);
+                                    System.Threading.Monitor.Wait(_tableResultCompleteLock, 250);
                                 }
                                 else
                                 {


ConfigureAwait(false)

ConfigureAwait(false)

--- src/PubSubTransactionPoC/TopicService/TopicService.cs
+++ src/PubSubTransactionPoC/TopicService/TopicService.cs
@@ -91,20 +91,20 @@
                 // enq 1 message
                 while (inputQueue.Count > 0)
                 {
-                    var msg = await inputQueue.TryDequeueAsync(tx);
+                    var msg = await inputQueue.TryDequeueAsync(tx).ConfigureAwait(false);
                     if (!msg.HasValue) return;
-                    IAsyncEnumerable<KeyValuePair<string, bool>> asyncEnumerable = await lst.CreateEnumerableAsync(tx);
+                    IAsyncEnumerable<KeyValuePair<string, bool>> asyncEnumerable = await lst.CreateEnumerableAsync(tx).ConfigureAwait(false);
                     using (IAsyncEnumerator<KeyValuePair<string, bool>> asyncEnumerator = asyncEnumerable.GetAsyncEnumerator())
                     {
-                        while (await asyncEnumerator.MoveNextAsync(CancellationToken.None))
+                        while (await asyncEnumerator.MoveNextAsync(CancellationToken.None).ConfigureAwait(false))
                         {
                             var queue = await this.StateManager.GetOrAddAsync<IReliableQueue<PubSubMessage>>(asyncEnumerator.Current.Key);
-                            await queue.EnqueueAsync(tx, msg.Value);
+                            await queue.EnqueueAsync(tx, msg.Value).ConfigureAwait(false);
                         }
+                        ServiceEventSource.Current.ServiceMessage(this.Context, $"ENQUEUE: {msg.Value.Message} into {asyncEnumerator.Current.Key}");
                     }
-                    ServiceEventSource.Current.ServiceMessage(this.Context, $"ENQUEUE: {msg.Value.Message}");
                 }
-                await tx.CommitAsync();
+                await tx.CommitAsync().ConfigureAwait(false);

             }
         }
@@ -123,7 +123,7 @@
             {
                 if (!await lst.ContainsKeyAsync(tx, queueName).ConfigureAwait(false))
                 {
-                    await lst.AddAsync(tx, queueName, true);
+                    await lst.AddAsync(tx, queueName, true).ConfigureAwait(false);
                 }
                 await tx.CommitAsync().ConfigureAwait(false);
             }


removed unneeded view

removed unneeded view

--- Views/Scheduler/CreateEvent.cshtml
+++ Views/Scheduler/CreateEvent.cshtml
@@ -1,5 +0,0 @@
-@{
-    ViewData["Title"] = "Created Event Page";
-}
-
-It's a redirect or something


Update TokenScanner.cs

Update TokenScanner.cs

--- PapyrusScriptEditorVSIX/Language/TokenScanner.cs
+++ PapyrusScriptEditorVSIX/Language/TokenScanner.cs
@@ -1,4 +1,4 @@
-using Microsoft.VisualStudio.Text;
+using Microsoft.VisualStudio.Text;
 using Papyrus.Common;
 using Papyrus.Language.Components;
 using Papyrus.Utilities;
@@ -14,29 +14,11 @@
     public abstract class TokenScannerModule {
         private TokenScannerModule next = null;

-        public abstract bool Scan(SnapshotSpan sourceSnapshotSpan, int offset, ref TokenScannerState state, out Token token);
-        public bool ScanLine(ITextSnapshotLine sourceSnapshotLine, int offset, ref TokenScannerState state, out Token token) {
-            return Scan(new SnapshotSpan(sourceSnapshotLine.Start, sourceSnapshotLine.End), offset, ref state, out token);
+        protected abstract bool Scan(SnapshotSpan sourceSnapshotSpan, ref TokenScannerState state, out Token token);
+        public bool Scan(SnapshotSpan sourceSnapshotSpan, ref TokenScannerState state, out Token token) {
+            return Scan(sourceSnapshotSpan, ref state, out token) ||
+                (next != null && next.Scan(sourceSnapshotSpan, ref state, out token));
         }
-
-        /*
-        public bool Scan(SnapshotSpan sourceSnapshotSpan, int offset, ref TokenScannerState state, ICollection<Token> tokens) {
-            Token token;
-            if (Scan(sourceSnapshotSpan, offset, ref state, out token)) {
-                tokens.Add(token);
-                return true;
-            }
-            return next != null && next.Scan(sourceSnapshotSpan, offset, ref state, out token);
-        }
-        public bool ScanLine(ITextSnapshotLine sourceSnapshotSpan, int offset, ref TokenScannerState state, ICollection<Token> tokens) {
-            Token token;
-            if (ScanLine(sourceSnapshotSpan, offset, ref state, out token)) {
-                tokens.Add(token);
-                return true;
-            }
-            return next != null && next.ScanLine(sourceSnapshotSpan, offset, ref state, out token);
-        }
-        */

         private void Add(TokenScannerModule module) {
             if (module != null) {
@@ -58,12 +40,6 @@
         }
     }

-    public enum TokenScannerResult {
-        EndSource,
-        EndLine,
-        ExtendedLine,
-    }
-
     public enum TokenScannerState {
         Text,
         BlockComment,
@@ -74,40 +50,40 @@
     public class TokenScanner {
         private TokenScannerModule tokenScannerModule;
         private TokenScannerState state;
-        private int offset;

         public TokenScanner(TokenScannerModule tokenScannerModule) {
             this.tokenScannerModule = tokenScannerModule;
             this.state = TokenScannerState.Text;
-            this.offset = 0;
         }

         public void ForceState(TokenScannerState state) {
             this.state = state;
         }

-        public void ScanSnapshotLine(ITextSnapshotLine snapshotLine, IList<Token> tokens) {
-            offset = 0;
+        public bool ScanLine(ITextSnapshotLine textLine, TokenSnapshotLine tokenLine) {
             Token token;
-            while (tokenScannerModule.ScanLine(snapshotLine, offset, ref state, out token)) {
-                tokens.Add(token);
-                offset += token.Span.Length;
+            SnapshotSpan span = textLine.ToSpan();
+            bool eol = false;
+            while (!eol) {
+                span = span.IgnoreWhile();
+                eol = tokenScannerModule.Scan(span, offset, ref state, out token);
+                tokenLine.AddToken(token);
+                span = span.Subspan(token.Span.Length);
             }
+            return !tokenLine.IsEmpty;
         }
-
-        public IList<IList<Token>> ScanSnapshot(ITextSnapshot snapshot) {
-            state = TokenScannerState.Text;
-            var result = new List<IList<Token>>();
-            foreach (ITextSnapshotLine line in snapshot.Lines) {
-                var tokens = new List<Token>();
-                ScanSnapshotLine(line, tokens);
-
-                if (tokens.Count > 0) {
-                    result.Add(tokens);
+        public bool ScanSource(ITextSnapshot textSource, TokenSnapshot tokenSource) {
+            bool success = true;
+            foreach (var lineIn in textSource.Lines) {
+                TokenSnapshotLine tokenLine = new TokenSnapshotLine();
+                if (ScanLine(lineIn, tokenLine)) {
+                    tokenSource.AddLine(tokenLine);
+                }
+                else {
+                    success = false;
                 }
             }
-
-            return result;
+            return success;
         }
     }
 }


Crop mode should always be "crop"

Crop mode should always be "crop"

"pad" doesn't actually crop the image, so information about the focal point is not included in the URL.

--- src/Skybrud.ImagePicker/Models/ImagePickerImage.cs
+++ src/Skybrud.ImagePicker/Models/ImagePickerImage.cs
@@ -31,7 +31,7 @@
             Width = content.Value<int>(Constants.Conventions.Media.Width);
             Height = content.Value<int>(Constants.Conventions.Media.Height);
             Url = content.Url;
-            CropUrl = content.GetCropUrl(Width, Height, preferFocalPoint: true, imageCropMode: ImageCropMode.Pad);
+            CropUrl = content.GetCropUrl(Width, Height, preferFocalPoint: true, imageCropMode: ImageCropMode.Crop);
             AlternativeText = content.Value<string>("altText") ?? string.Empty;
         }


Поправлено в соответствии с первым комитом из #95

В поиске группы добавлены поля и сортировка

--- VkNet/Categories/GroupsCategory.cs
+++ VkNet/Categories/GroupsCategory.cs
@@ -177,11 +177,11 @@
         /// Страница документации ВКонтакте <see href="http://vk.com/dev/groups.search"/>.
         /// </remarks>
         [Pure]
-        public ReadOnlyCollection<Group> Search([NotNull] string query, out int totalCount, int? offset = null, int? count = null)
+        public ReadOnlyCollection<Group> Search([NotNull] string query, out int totalCount, int? offset = null, int? count = null, GroupsFields fields = null, int sort = 0)
         {
             VkErrors.ThrowIfNullOrEmpty(() => query);

-            var parameters = new VkParameters { { "q", query }, { "offset", offset }, { "count", count } };
+            var parameters = new VkParameters { { "q", query }, { "offset", offset }, { "count", count }, { "fields", fields }, { "sort", sort } };

             VkResponseArray response = _vk.Call("groups.search", parameters);

@@ -348,4 +348,4 @@
             return EditManager(groupId, userId, role, null, null, null, null);
         }
     }
-}+}


Remove setters from DocumentModel

Remove setters from DocumentModel

--- src/SourceBrowser.Generator/Model/DocumentModel.cs
+++ src/SourceBrowser.Generator/Model/DocumentModel.cs
@@ -9,17 +9,17 @@
 {
     public class DocumentModel : IProjectItem
     {
-        public IProjectItem Parent { get; set; }
+        public IProjectItem Parent { get; }

-        public ICollection<IProjectItem> Children { get; set; }
+        public ICollection<IProjectItem> Children { get; }

-        public ICollection<Token> Tokens { get; set; }
+        public ICollection<Token> Tokens { get;  }

-        public string Name { get; set; }
+        public string Name { get; }

         public string RelativePath { get; }

-        public int NumberOfLines { get; set; }
+        public int NumberOfLines { get; }

         public DocumentModel(IProjectItem parent, string name, int numberOfLines)
         {


Message: добавить поле is_cropped

Message: добавить поле is_cropped

#882

--- VkNet/Model/Attachments/Message.cs
+++ VkNet/Model/Attachments/Message.cs
@@ -72,10 +72,10 @@
 				Photo100 = response["photo_100"],
 				Photo200 = response["photo_200"],
 				InRead = response["in_read"],
+				IsCropped = response["is_cropped"],
 				OutRead = response["out_read"],
 				Out = response["out"],
 				UpdateTime = response["update_time"],
-
 				Keyboard = response["keyboard"],
 				ConversationMessageId = response["conversation_message_id"],
 				Ref = response["ref"],
@@ -307,6 +307,12 @@
 		/// </summary>
 		public MessageKeyboard Keyboard { get; set; }

+		/// <summary>
+		/// Является ли сообщение обрезаным.
+		/// </summary>
+		[JsonProperty("is_cropped")]
+		public bool? IsCropped { get; set; }
+
 	#endregion

 	#region недокументированные


Nested Classes In PokemonData

Nested Classes In PokemonData


When copying full text, replace \n with \r\n so that notepad works.

Fixes issue #3.

--- src/StructuredLogger/Serialization/StringWriter.cs
+++ src/StructuredLogger/Serialization/StringWriter.cs
@@ -16,7 +16,13 @@
         private static void WriteNode(object rootNode, StringBuilder sb, int indent = 0)
         {
             Indent(sb, indent);
-            sb.AppendLine(rootNode.ToString());
+            var text = rootNode.ToString();
+
+            // when we injest strings we normalize on \n to save space.
+            // when the strings leave our app via clipboard, bring \r\n back so that notepad works
+            text = text.Replace("\n", "\r\n");
+
+            sb.AppendLine(text);

             var treeNode = rootNode as TreeNode;
             if (treeNode != null && treeNode.HasChildren)


Correct the virtual overload of Stream.CopyTo (#1806)

--- src/System.Private.CoreLib/src/System/IO/Stream.cs
+++ src/System.Private.CoreLib/src/System/IO/Stream.cs
@@ -158,7 +158,7 @@
         // Reads the bytes from the current stream and writes the bytes to
         // the destination stream until all bytes are read, starting at
         // the current position.
-        public virtual void CopyTo(Stream destination)
+        public void CopyTo(Stream destination)
         {
             int bufferSize = DefaultCopyBufferSize;

@@ -184,7 +184,7 @@
             CopyTo(destination, bufferSize);
         }

-        public void CopyTo(Stream destination, int bufferSize)
+        public virtual void CopyTo(Stream destination, int bufferSize)
         {
             ValidateCopyToArguments(destination, bufferSize);


Fix change from Guid? to Guid

Fix change from Guid? to Guid

--- src/Tools/BuildValidator/LocalReferenceResolver.cs
+++ src/Tools/BuildValidator/LocalReferenceResolver.cs
@@ -87,8 +87,8 @@
                         continue;
                     }

-                    _logger.LogTrace($"Caching [{mvid.Value}, {file.FullName}]");
-                    _cache[mvid.Value] = file.FullName;
+                    _logger.LogTrace($"Caching [{mvid}, {file.FullName}]");
+                    _cache[mvid] = file.FullName;
                 }
             }


Updating template query builder to use new APIs

--- src/Umbraco.Web/Editors/TemplateQueryController.cs
+++ src/Umbraco.Web/Editors/TemplateQueryController.cs
@@ -1,13 +1,13 @@
-using System.Collections.Generic;
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
 using System.Linq;
 using System.Text;
+using Umbraco.Core.Models.PublishedContent;
+using Umbraco.Core.Services;
+using Umbraco.Web.Models.TemplateQuery;
 using Umbraco.Web.Mvc;
 using Umbraco.Web.WebApi;
-using System;
-using System.Diagnostics;
-using Umbraco.Core.Models.PublishedContent;
-using Umbraco.Web.Models.TemplateQuery;
-using Umbraco.Core.Services;

 namespace Umbraco.Web.Editors
 {
@@ -66,7 +66,7 @@
             var sb = new StringBuilder();
             var indention = Environment.NewLine + "\t\t\t\t\t\t";

-            sb.Append("Model.Content.Site()");
+            sb.Append("Model.Root()");

             var timer = new Stopwatch();

@@ -103,7 +103,7 @@
                     {
                         // we did not find the path
                         sb.Clear();
-                        sb.AppendFormat("Umbraco.TypedContent({0})", model.Source.Id);
+                        sb.AppendFormat("Umbraco.Content({0})", model.Source.Id);
                         pointerNode = targetNode;
                     }
                 }
@@ -195,10 +195,16 @@

                     timer.Stop();

-                    var direction = model.Sort.Direction == "ascending" ? string.Empty : " desc";
-
-                    sb.Append(indention);
-                    sb.AppendFormat(".OrderBy(\"{0}{1}\")", model.Sort.Property.Alias, direction);
+                    sb.Append(indention);
+
+                    if (model.Sort.Direction == "ascending")
+                    {
+                        sb.AppendFormat(".OrderBy(x => x.{0})", model.Sort.Property.Alias);
+                    }
+                    else
+                    {
+                        sb.AppendFormat(".OrderByDescending(x => x.{0})", model.Sort.Property.Alias);
+                    }
                 }

                 if (model.Take > 0)
@@ -293,7 +299,7 @@
         public IEnumerable<ContentTypeModel> GetContentTypes()
         {
             var contentTypes = Services.ContentTypeService.GetAll()
-                .Select(x => new ContentTypeModel { Alias = x.Alias, Name = Services.TextService.Localize("template/contentOfType", tokens: new string[] { x.Name } ) })
+                .Select(x => new ContentTypeModel { Alias = x.Alias, Name = Services.TextService.Localize("template/contentOfType", tokens: new string[] { x.Name }) })
                 .OrderBy(x => x.Name).ToList();

             contentTypes.Insert(0, new ContentTypeModel { Alias = string.Empty, Name = Services.TextService.Localize("template/allContent") });


Add collection fixture to exception tests

--- src/Tests/ClientConcepts/Exceptions/ExceptionTests.cs
+++ src/Tests/ClientConcepts/Exceptions/ExceptionTests.cs
@@ -3,13 +3,17 @@
 using Nest;
 using System;
 using Tests.Framework;
+using Tests.Framework.Integration;
 using Tests.Framework.MockData;
 using Xunit;

 namespace Tests.ClientConcepts.Exceptions
 {
+	[Collection(IntegrationContext.Indexing)]
 	public class ExceptionTests
 	{
+		public ExceptionTests(IndexingCluster cluster, EndpointUsage usage) { }
+
 		[I]
 		public void ServerTestWhenThrowExceptionsEnabled()
 		{


New experiments was configured

New experiments was configured

--- src/Utils/WaveletCodesListDecodingAnalyzer/Program.cs
+++ src/Utils/WaveletCodesListDecodingAnalyzer/Program.cs
@@ -678,21 +678,19 @@
             try
             {
                 var field = GaloisField.Create(3);
-                FindWaveletTransformsForStackBasedMultilevelEncoding(
+                FindWaveletTransformsForRecursiveLinearMultilevelEncoding(
                     Process.GetCurrentProcess().ConstrainProcessorUsage(2, 0.7),
                     new BiorthogonalSourceFiltersCalculator(new GcdBasedBuilder(new RecursiveGcdFinder())),
                     field,
+                    16,
+                    14,
                     8,
-                    7,
-                    5,
-                    3,
-                    2 /*,
-                    new[]
-                    {
-                        new FiltersBankVectors((null, null), (field.CreateElementsVector(1, 2, 1, 2, 0, 1, 0, 0), null)),
-                        new FiltersBankVectors((null, null), (field.CreateElementsVector(1, 2, 1, 2), null)),
-                        new FiltersBankVectors((null, null), (field.CreateElementsVector(1, 2), null))
-                    }*/
+                    4,
+                    6/*,
+                    new FiltersBankVectors(
+                        (null, null),
+                        (field.CreateElementsVector(1, 2, 1, 2, 0, 1, 0, 0, 1, 2, 1, 2, 0, 1, 0, 0), null)
+                    )*/
                 );
             }
             catch (Exception exception)


GH-322 Use default languages then creating default edu. program profile for edu. program

--- R7.University.EduPrograms/EditEduProgram.ascx.cs
+++ R7.University.EduPrograms/EditEduProgram.ascx.cs
@@ -204,6 +204,7 @@
                         ProfileTitle = string.Empty,
                         EduProgramID = item.EduProgramID,
                         EduLevelId = item.EduLevelID,
+                        Languages = UniversityConfig.Instance.EduProgramProfiles.DefaultLanguages,
                         // unpublish profile
                         EndDate = item.CreatedOnDate.Date
                     };


Fix bug not able to install packages to JS Metro project. Work items: 1986

--HG--
branch : 1.7

--- src/VisualStudio/ProjectSystems/JsProjectSystem.cs
+++ src/VisualStudio/ProjectSystems/JsProjectSystem.cs
@@ -23,7 +23,8 @@

         public override void AddFile(string path, Stream stream)
         {
-            Project.GetProjectItems(path, createIfNotExists: true);
+            // ensure the parent folder is created before adding file to the project
+            Project.GetProjectItems(Path.GetDirectoryName(path), createIfNotExists: true);
             base.AddFile(path, stream);
         }


don't throw notimplementedexception on real code

--- Prequel/SqlTypeInfo.cs
+++ Prequel/SqlTypeInfo.cs
@@ -50,7 +50,8 @@
                 return new AssignmentResult(warnings.Count == 0, warnings);
             }

-            throw new NotImplementedException();
+            // more checks go here
+            return AssignmentResult.OK;
         }

         private bool IsWideString(SqlDataTypeOption typeOption)


fix typo in api fields query

fix typo in api fields query

--- src/YouTrackSharp/Issues/IssuesService.Attachments.cs
+++ src/YouTrackSharp/Issues/IssuesService.Attachments.cs
@@ -34,7 +34,7 @@
             }
             if (!string.IsNullOrEmpty(group))
             {
-                var response = await client.GroupsGetAsync("id, name", 0, -1);
+                var response = await client.GroupsGetAsync("id,name", 0, -1);
                 var userGroup = response.First(g => g.Name == group);
                 attachment.Visibility = group == "All Users"
                     ? new UnlimitedVisibility()


Document minor bug

Document minor bug

--- R7.University.Employees/Queries/EmployeeQuery.cs
+++ R7.University.Employees/Queries/EmployeeQuery.cs
@@ -61,6 +61,7 @@
                         .Select (d => d.DivisionID).ToList ();
             }

+            // FIXME: Don't count position weight in not published divisions
             if (sortType == EmployeeListSortType.ByMaxWeightInDivision) {
                 return ModelContext.Query<OccupiedPositionInfo> ()
                     .Include2 (op => op.Position)


WIP shapes graph parser

WIP shapes graph parser

--- RDFSharp/Model/Validation/RDFValidationHelper.cs
+++ RDFSharp/Model/Validation/RDFValidationHelper.cs
@@ -148,26 +148,67 @@
         internal static RDFShapesGraph FromRDFGraph(RDFGraph graph) {
             if (graph != null) {
                 RDFShapesGraph result = new RDFShapesGraph(new RDFResource(graph.Context.ToString()));
-
-                //Detect node shapes
-                foreach (RDFTriple nodeShapeTriple in graph.SelectTriplesByObject(RDFVocabulary.SHACL.NODE_SHAPE)
-                                                           .SelectTriplesByPredicate(RDFVocabulary.RDF.TYPE))
-                    result.AddShape(new RDFNodeShape((RDFResource)nodeShapeTriple.Subject));
-
-                //Detect property shapes
-                foreach (RDFTriple propertyShapeTriple in graph.SelectTriplesByObject(RDFVocabulary.SHACL.PROPERTY_SHAPE)
-                                                               .SelectTriplesByPredicate(RDFVocabulary.RDF.TYPE))
-                    result.AddShape(new RDFPropertyShape((RDFResource)propertyShapeTriple.Subject));
-
-                //Fetch shapes data
-                foreach (RDFShape shape in result) {
-                    //TODO
-
-                }
+                RDFGraph typesGraph = graph.SelectTriplesByPredicate(RDFVocabulary.RDF.TYPE);
+                RDFGraph pathGraph = graph.SelectTriplesByPredicate(RDFVocabulary.SHACL.PATH);
+
+                #region Typed Shape
+
+                //NodeShape
+                foreach (RDFTriple shapeTriple in typesGraph.SelectTriplesByObject(RDFVocabulary.SHACL.NODE_SHAPE))
+                    result.AddShape(new RDFNodeShape((RDFResource)shapeTriple.Subject));
+
+                //PropertyShape
+                foreach (RDFTriple shapeTriple in typesGraph.SelectTriplesByObject(RDFVocabulary.SHACL.PROPERTY_SHAPE))
+                    DetectShapeTypeByPath(result, (RDFResource)shapeTriple.Subject, pathGraph, false);
+
+                #endregion
+
+                #region Target Shape
+
+                //TargetClass
+                foreach (RDFTriple shapeTriple in graph.SelectTriplesByPredicate(RDFVocabulary.SHACL.TARGET_CLASS))
+                    DetectShapeTypeByPath(result, (RDFResource)shapeTriple.Subject, pathGraph, true);
+
+                //TargetNode
+                foreach (RDFTriple shapeTriple in graph.SelectTriplesByPredicate(RDFVocabulary.SHACL.TARGET_NODE))
+                    DetectShapeTypeByPath(result, (RDFResource)shapeTriple.Subject, pathGraph, true);
+
+                //TargetSubjectsOf
+                foreach (RDFTriple shapeTriple in graph.SelectTriplesByPredicate(RDFVocabulary.SHACL.TARGET_SUBJECTS_OF))
+                    DetectShapeTypeByPath(result, (RDFResource)shapeTriple.Subject, pathGraph, true);
+
+                //TargetObjectsOf
+                foreach (RDFTriple shapeTriple in graph.SelectTriplesByPredicate(RDFVocabulary.SHACL.TARGET_OBJECTS_OF))
+                    DetectShapeTypeByPath(result, (RDFResource)shapeTriple.Subject, pathGraph, true);
+
+                #endregion

                 return result;
             }
             return null;
+        }
+        private static void DetectShapeTypeByPath(RDFShapesGraph result,
+                                                          RDFResource shape,
+                                                          RDFGraph pathGraph,
+                                                          bool allowNodeShapeFallback) {
+
+            //Search for sh:path property
+            RDFGraph propertyShapeGraph = pathGraph.SelectTriplesBySubject(shape);
+
+            //sh:path property defined
+            if (propertyShapeGraph.TriplesCount > 0)
+                if (propertyShapeGraph.First().Object is RDFResource)
+                    result.AddShape(new RDFPropertyShape(shape, (RDFResource)propertyShapeGraph.First().Object));
+                else
+                    throw new RDFModelException(String.Format("Cannot create RDFPropertyShape with identifier '{0}' because 'sh:path' property links to a literal", shape));
+
+            //sh:path property not defined
+            else
+                if (allowNodeShapeFallback)
+                    result.AddShape(new RDFNodeShape(shape));
+                else
+                    throw new RDFModelException(String.Format("Cannot create RDFPropertyShape with identifier '{0}' because 'sh:path' property is not defined", shape));
+
         }
         #endregion


add more extension for logging

add more extension for logging

--- src/WeihanLi.Common/Logging/LogHelperExtensions.cs
+++ src/WeihanLi.Common/Logging/LogHelperExtensions.cs
@@ -1,5 +1,6 @@
 using System;
 using System.Collections.Generic;
+using WeihanLi.Common.Helpers;

 namespace WeihanLi.Common.Logging
 {
@@ -143,6 +144,18 @@
             return loggingBuilder;
         }

+        public static ILogHelperLoggingBuilder WithProvider<TLogProvider>(this ILogHelperLoggingBuilder loggingBuilder) where TLogProvider : ILogHelperProvider, new()
+        {
+            loggingBuilder.AddProvider(new TLogProvider());
+            return loggingBuilder;
+        }
+
+        public static ILogHelperLoggingBuilder WithProvider<TLogProvider>(this ILogHelperLoggingBuilder loggingBuilder, params object[] ctorParams) where TLogProvider : ILogHelperProvider
+        {
+            loggingBuilder.AddProvider(ActivatorHelper.CreateInstance<TLogProvider>(ctorParams));
+            return loggingBuilder;
+        }
+
         public static ILogHelperLoggingBuilder WithEnricher<TEnricher>(this ILogHelperLoggingBuilder loggingBuilder,
             TEnricher enricher) where TEnricher : ILogHelperLoggingEnricher
         {
@@ -153,6 +166,12 @@
         public static ILogHelperLoggingBuilder WithEnricher<TEnricher>(this ILogHelperLoggingBuilder loggingBuilder) where TEnricher : ILogHelperLoggingEnricher, new()
         {
             loggingBuilder.AddEnricher(new TEnricher());
+            return loggingBuilder;
+        }
+
+        public static ILogHelperLoggingBuilder WithEnricher<TEnricher>(this ILogHelperLoggingBuilder loggingBuilder, params object[] ctorParams) where TEnricher : ILogHelperLoggingEnricher
+        {
+            loggingBuilder.AddEnricher(ActivatorHelper.CreateInstance<TEnricher>(ctorParams));
             return loggingBuilder;
         }


Change default ease value

Change default ease value

--- AnimatorComponent/AnimatorSettings.cs
+++ AnimatorComponent/AnimatorSettings.cs
@@ -227,7 +227,7 @@

         [SerializeField]
         // todo rename to animationSpeedTo360.
-        private float maxAnimationSpeed = 0.1f;
+        private float maxAnimationSpeed = 0.05f;

         [SerializeField]
         private string pathDataAssetDefaultName = "Path";


Added the usings necessary for the template.

--- Weave/Compiler/GenerateCodePass.cs
+++ Weave/Compiler/GenerateCodePass.cs
@@ -54,7 +54,7 @@

                 this.writer.Write("namespace ");
                 this.writer.Write(@namespace);
-                this.writer.Write("\r\n{\r\n");
+                this.writer.Write("\r\n{\r\nusing System.IO;\r\n");

                 foreach (var @using in settings["using"])
                 {


Bugfix for #330

Bugfix for #330

Empty lines were falsely removed. (I guess the author initially wanted to remove the whitespace around the QR code. I will add a flag to suppress whitespace in another commit.)

--- QRCoder/ASCIIQRCode.cs
+++ QRCoder/ASCIIQRCode.cs
@@ -68,7 +68,6 @@
             var sideLength = QrCodeData.ModuleMatrix.Count * verticalNumberOfRepeats;
             for (var y = 0; y < sideLength; y++)
             {
-                bool emptyLine = true;
                 var lineBuilder = new StringBuilder();

                 for (var x = 0; x < QrCodeData.ModuleMatrix.Count; x++)
@@ -79,16 +78,8 @@
                     {
                         lineBuilder.Append(module ? darkColorString : whiteSpaceString);
                     }
-                    if (module)
-                    {
-                        emptyLine = false;
-                    }
                 }
-                if (!emptyLine)
-                {
-                    qrCode.Add(lineBuilder.ToString());
-                }
-
+                qrCode.Add(lineBuilder.ToString());
             }
             return qrCode.ToArray();
         }


Throw an error if a save isn't loaded.

Throw an error if a save isn't loaded.

--- Assets/Scripts/MapGen/DFConnection.cs
+++ Assets/Scripts/MapGen/DFConnection.cs
@@ -522,7 +522,13 @@
         {
             dfWorldInfoCall.TryExecute(null, out netWorldInfo);
             if (netWorldInfo == null)
+            {
+                ModalPanel.Instance.Choice(
+                  "You appear not to have a loaded save in Dwarf Fortress!\n\n" +
+                  "Armok Vision cannot run without a save loaded.", QuitGame, "Quit");
                 Debug.Log("World not loaded.");
+                QuitGame();
+            }
             else
             {
                 Debug.Log("World Mode: " + netWorldInfo.mode);


Fix auto updater with paths that contain spaces

--- AudioSharp.GUI.Wpf/MainWindow.xaml.cs
+++ AudioSharp.GUI.Wpf/MainWindow.xaml.cs
@@ -669,7 +669,7 @@
                     try
                     {
                         ProcessStartInfo psi = new ProcessStartInfo(updateHelper.InstallerFilePath);
-                        psi.Arguments = $"/S /UPDATELOCATION={updateHelper.GetApplicationDirectory()}";
+                        psi.Arguments = $"\"/S /UPDATELOCATION={updateHelper.GetApplicationDirectory()}\"";
                         updateHelper.Dispose();
                         Process.Start(psi);
                         Application.Current.Shutdown();


--- Sandra.UI/AppTemplate/JsonErrorInfoExtensions.cs
+++ Sandra.UI/AppTemplate/JsonErrorInfoExtensions.cs
@@ -46,7 +46,13 @@
         {
             GC.KeepAlive(localizer); // Only to disable the warning that variable is unused.
             if (errorMessage == null || errorMessage.Length == 0) return errorMessage;
-            return char.ToUpper(errorMessage[0], CultureInfo.CurrentUICulture) + errorMessage.Substring(1);
+            char firstCharacter = errorMessage[0];
+            char firstCharacterToUpper = char.ToUpper(firstCharacter, CultureInfo.CurrentUICulture);
+
+            // Only allocate a new string if there's an actual change.
+            return firstCharacter != firstCharacterToUpper
+                ? firstCharacterToUpper + errorMessage.Substring(1)
+                : errorMessage;
         }

         /// <summary>


Don't throw passing null to GetDefaultView.

--- Avalonia/Data/CollectionViewSource.cs
+++ Avalonia/Data/CollectionViewSource.cs
@@ -17,9 +17,9 @@

         public static ICollectionView GetDefaultView(object source)
         {
-            ICollectionView result;
+            ICollectionView result = null;

-            if (!defaultViews.TryGetValue(source, out result))
+            if (source != null && !defaultViews.TryGetValue(source, out result))
             {
                 IList list = source as IList;
                 IEnumerable enumerable = source as IEnumerable;


For some reason the comments broke the page, sooo I noted the links to be replaced with class="SCOTT" instead. @srkirkland

--- Badges/Views/Student/Portfolio.cshtml
+++ Badges/Views/Student/Portfolio.cshtml
@@ -8,8 +8,7 @@

-
-                @Html.Action("ViewProfileImage", "Profile")
+                @Html.Action("ViewProfileImage", "Profile")
                 @ViewBag.Name

Experiences

@@ -36,7 +35,7 @@
     {

-
+

@@ -50,8 +49,7 @@

@Html.ActionLink(experience.Name, "ViewExperience", "Student", new { id = experience.Id}, null)

@experience.Description

-
-                        View full details »
+                        View full details »


HOUSEKEEPING ONLY: PGDocument Benchmarks -Fix typos. See #23

--- Biggy.Tasks/PGDocuments/Benchmarks.cs
+++ Biggy.Tasks/PGDocuments/Benchmarks.cs
@@ -16,7 +16,7 @@
       Console.WriteLine("POSTGRES - LOAD A BUNCH OF DOCUMENTS INTO A TABLE");
       Console.WriteLine("===========================================================");

-      Console.WriteLine("Connecting to SQL Document Store...");
+      Console.WriteLine("Connecting to Postgres Document Store...");

       // Start clean and fresh . . .
       if (Benchmarks.TableExists("clientdocuments")) {
@@ -67,7 +67,7 @@
       sw.Start();
       _clientDocuments.Reload();
       sw.Stop();
-      Console.WriteLine("\t Loaded {0} documents from SQL Server in {1} ms", inserted, sw.ElapsedMilliseconds);
+      Console.WriteLine("\t Loaded {0} documents from Postgres in {1} ms", inserted, sw.ElapsedMilliseconds);

       sw.Reset();
       Console.WriteLine("Querying Middle 100 Documents");


... and again

... and again

--- src/app/ExtraLINQ/Extensions/IEnumerable/Random.cs
+++ src/app/ExtraLINQ/Extensions/IEnumerable/Random.cs
@@ -122,7 +122,7 @@
             TSource[] sourceArray = source.ToArray();

             bool randomElementsIsOutOfRange = randomElementsCount < 0
-                                              || randomElementsCount > sourceArray.Length;
+                || randomElementsCount > sourceArray.Length;

             if (randomElementsIsOutOfRange)
             {


UAResources.LoadUADefinedTypes must be public #616

- changed source code

--- SemanticData/UAModelDesignExport/XML/Resource.cs
+++ SemanticData/UAModelDesignExport/XML/Resource.cs
@@ -22,7 +22,7 @@
     /// Loads the OPC UA defined types.
     /// </summary>
     /// <returns>An instance of <see cref="ModelDesign"/> representing  UA defined types</returns>
-    internal static ModelDesign LoadUADefinedTypes()
+    public static ModelDesign LoadUADefinedTypes()
     {
       try
       {


media-input, fixed mediacontroller

media-input, fixed mediacontroller

--- Sensus.Android.Shared/UI/AndroidVideoRenderer.cs
+++ Sensus.Android.Shared/UI/AndroidVideoRenderer.cs
@@ -5,29 +5,77 @@
 using Sensus;
 using RelativeLayout = Android.Widget.RelativeLayout;
 using Uri = Android.Net.Uri;
+using View = Xamarin.Forms.View;
 using Android.Media;
-using Java.Interop;
+using Android.Views;
 using System;

 [assembly: ExportRenderer(typeof(VideoPlayer), typeof(AndroidVideoRenderer))]

 namespace Sensus.Android.UI
 {
-	public class AndroidVideoRenderer : ViewRenderer<VideoPlayer, RelativeLayout>, MediaPlayer.IOnPreparedListener, MediaPlayer.IOnCompletionListener, MediaPlayer.IOnSeekCompleteListener
+	public class AndroidVideoRenderer : ViewRenderer<VideoPlayer, RelativeLayout>
 	{
 		private PrivateVideoView _videoView;
 		private VideoPlayer _videoPlayer;
 		private MediaController _mediaController;
 		private View _parent;

-		private class PrivateVideoView : VideoView
+		private class PrivateVideoView : VideoView, MediaPlayer.IOnPreparedListener, MediaPlayer.IOnCompletionListener, MediaPlayer.IOnSeekCompleteListener, ViewTreeObserver.IOnScrollChangedListener
 		{
 			private readonly VideoPlayer _videoPlayer;
 			private MediaPlayer _mediaPlayer;
+			private MediaController _mediaController;

 			public PrivateVideoView(global::Android.Content.Context context, VideoPlayer videoPlayer) : base(context)
 			{
 				_videoPlayer = videoPlayer;
+
+				SetOnPreparedListener(this);
+				SetOnCompletionListener(this);
+				ViewTreeObserver.AddOnScrollChangedListener(this);
+			}
+
+			public override void SetMediaController(MediaController controller)
+			{
+				_mediaController = controller;
+
+				base.SetMediaController(controller);
+			}
+
+			public void OnPrepared(MediaPlayer mp)
+			{
+				mp.SetOnSeekCompleteListener(this);
+
+				SetMediaPlayer(mp);
+			}
+
+			public void OnSeekComplete(MediaPlayer mp)
+			{
+				_videoPlayer.OnVideoSeek(new VideoEventArgs(VideoPlayer.SEEK, TimeSpan.FromMilliseconds(mp.CurrentPosition)));
+			}
+
+			public void OnCompletion(MediaPlayer mp)
+			{
+				_videoPlayer.OnVideoEnd(new VideoEventArgs(VideoPlayer.END, TimeSpan.FromMilliseconds(mp.CurrentPosition)));
+			}
+
+			public override bool OnTouchEvent(MotionEvent e)
+			{
+				if (_mediaController != null && e.Action == MotionEventActions.Up)
+				{
+					_mediaController.Show();
+				}
+
+				return true;
+			}
+
+			public void OnScrollChanged()
+			{
+				if (_mediaController != null)
+				{
+					_mediaController.Hide();
+				}
 			}

 			public override void Start()
@@ -54,42 +102,26 @@
 			public void SetMediaPlayer(MediaPlayer mediaPlayer)
 			{
 				_mediaPlayer = mediaPlayer;
+
+				LayoutParameters.Height = LayoutParams.MatchParent;
+
+				if (_videoPlayer.Parent is View parent && parent.Parent is ContentView == false)
+				{
+					double ratio = mediaPlayer.VideoWidth / parent.Width;
+
+					if (ratio > 1)
+					{
+						ratio = 1 / ratio;
+					}
+
+					parent.HeightRequest = ratio * mediaPlayer.VideoHeight;
+				}
 			}
 		}

 		public AndroidVideoRenderer(global::Android.Content.Context context) : base(context)
 		{

-		}
-
-		public void OnPrepared(MediaPlayer mp)
-		{
-			mp.SetOnSeekCompleteListener(this);
-			_videoView.SetMediaPlayer(mp);
-
-			_videoView.LayoutParameters.Height = LayoutParams.MatchParent;
-
-			if (_parent.Parent is ContentView == false)
-			{
-				double ratio = mp.VideoWidth / _parent.Width;
-
-				if (ratio > 1)
-				{
-					ratio = 1 / ratio;
-				}
-
-				_parent.HeightRequest = ratio * mp.VideoHeight;
-			}
-		}
-
-		public void OnSeekComplete(MediaPlayer mp)
-		{
-			_videoPlayer.OnVideoSeek(new VideoEventArgs(VideoPlayer.SEEK, TimeSpan.FromMilliseconds(mp.CurrentPosition)));
-		}
-
-		public void OnCompletion(MediaPlayer mp)
-		{
-			_videoPlayer.OnVideoEnd(new VideoEventArgs(VideoPlayer.END, TimeSpan.FromMilliseconds(mp.CurrentPosition)));
 		}

 		protected override void OnElementChanged(ElementChangedEventArgs<VideoPlayer> e)
@@ -106,19 +138,14 @@
 					RelativeLayout layout = new RelativeLayout(Context);
 					RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(LayoutParams.MatchParent, 1);

+					_mediaController = new MediaController(Context);
 					_videoView = new PrivateVideoView(Context, _videoPlayer);
-					_mediaController = new MediaController(Context);
-
-					_videoView.SetOnPreparedListener(this);
-					_videoView.SetOnCompletionListener(this);

 					layout.AddView(_videoView);
 					layoutParams.AddRule(LayoutRules.CenterInParent);

 					_videoView.LayoutParameters = layoutParams;

-					_mediaController.SetMediaPlayer(_videoView);
-					_mediaController.SetPrevNextListeners(null, null);
 					_videoView.SetMediaController(_mediaController);

 					SetNativeControl(layout);


Version 0.7.4

Version 0.7.4

--- Sharpmake.Application/Properties/AssemblyInfo.cs
+++ Sharpmake.Application/Properties/AssemblyInfo.cs
@@ -44,4 +44,4 @@
 // 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("0.7.3.*")]
+[assembly: AssemblyVersion("0.7.4.0")]


Added error handling customtasks

Added error handling customtasks

--- Sherpa.Library/CustomTasks/CustomTasksManager.cs
+++ Sherpa.Library/CustomTasks/CustomTasksManager.cs
@@ -38,8 +38,12 @@
                 Tasks.TryGetValue(taskConfig.FullName, out taskTypeInfo);
                 if (taskTypeInfo != null)
                 {
-                    var instance = (ITask)Activator.CreateInstance(taskTypeInfo.AsType());
-                    instance.ExecuteOn(rootWeb,context);
+                    var instance = (ITask) Activator.CreateInstance(taskTypeInfo.AsType());
+                    instance.ExecuteOn(rootWeb, context);
+                }
+                else
+                {
+                    Log.ErrorFormat("Could not find loaded task with name {0}", taskConfig.FullName);
                 }
             }
             foreach (var web in rootWeb.Webs)


Someone commented out important methods

Someone commented out important methods

--- Sherpa.Library/SiteHierarchy/SiteSetupManager.cs
+++ Sherpa.Library/SiteHierarchy/SiteSetupManager.cs
@@ -36,9 +36,9 @@
         public void SetupSites()
         {
             Log.Debug("Starting SetupSites - setting up site collection");
-            //FeatureManager.ActivateSiteCollectionFeatures(ClientContext, ConfigurationSiteCollection.SiteFeatures);
-            //EnsureAndConfigureWebAndActivateFeatures(ClientContext, null, ConfigurationSiteCollection.RootWeb);
             SetUpCustomPermissionLevels(ClientContext, ConfigurationSiteCollection.PermissionLevels);
+            FeatureManager.ActivateSiteCollectionFeatures(ClientContext, ConfigurationSiteCollection.SiteFeatures);
+            EnsureAndConfigureWebAndActivateFeatures(ClientContext, null, ConfigurationSiteCollection.RootWeb);
         }

         public void SetUpCustomPermissionLevels(ClientContext context, List<ShPermissionLevel> permissionLevels)


Refs #1250 - geef 'false' op IsSuperGav.

--- Solution/Chiro.Gap.Workers/AutorisatieManager.cs
+++ Solution/Chiro.Gap.Workers/AutorisatieManager.cs
@@ -50,7 +50,11 @@
         /// </returns>
         public bool IsSuperGav()
         {
-            throw new NotImplementedException(Domain.NIEUWEBACKEND.Info);
+            // In het GAP zijn er (op dit moment althans) geen super-GAV's.
+            // GapUpdate (de service) is super-GAV, maar die heeft zijn eigen
+            // IAutorisatieManger.
+
+            return false;
         }

         /// <summary>


ApplyDeletableEntityRules method is no longer used. Now DeletableEntityRepository does it's job.

--- Source/Data/SpeedHero.Data/SpeedHeroDbContext.cs
+++ Source/Data/SpeedHero.Data/SpeedHeroDbContext.cs
@@ -30,7 +30,6 @@
         public override int SaveChanges()
         {
             this.ApplyAuditInfoRules();
-            this.ApplyDeletableEntityRules();
             return base.SaveChanges();
         }

@@ -59,6 +58,7 @@
             }
         }

+        // Don't use this method with DeletableEntityRepository
         private void ApplyDeletableEntityRules()
         {
             // Approach via @julielerman: http://bit.ly/123661P
@@ -69,7 +69,7 @@
             {
                 var entity = (IDeletableEntity)entry.Entity;

-                // this is so that you don't actually delete anything from the db, but you have to check for the IsDeleted flag every time to get actual data
+                // You don't actually delete anything from the db, but you have to check for the IsDeleted flag every time to get actual data
                 entity.DeletedOn = DateTime.Now;
                 entity.IsDeleted = true;
                 entry.State = EntityState.Modified;


phpdoc: @phpstan-* allowed

phpdoc: @phpstan-* allowed

--- Source/Devsense.PHP.Parser/Syntax/PHPDocBlock.cs
+++ Source/Devsense.PHP.Parser/Syntax/PHPDocBlock.cs
@@ -1440,6 +1440,7 @@
         {
             public const string Name1 = "@param";
             public const string Name2 = "@psalm-param";
+            public const string Name3 = "@phpstan-param";

             public ParamTag(string tagName, string/*!*/line)
                 : base(tagName, line, true)
@@ -1480,6 +1481,7 @@
         {
             public const string Name1 = "@return";
             public const string Name2 = "@psalm-return";
+            public const string Name3 = "@phpstan-return";

             public ReturnTag(string tagName, string/*!*/line)
                 : base(tagName, line, false)
@@ -2188,6 +2190,7 @@
         {
             public const string Name1 = "@template";
             public const string Name2 = "@psalm-template";
+            public const string Name3 = "@phpstan-template";

             /// <summary>
             /// The template identifier.


Update disable portable mode code

Update disable portable mode code

- add message to inform user
- create uninstaller entry
- set delete indication

--- Wox.Core/Configuration/Portable.cs
+++ Wox.Core/Configuration/Portable.cs
@@ -1,49 +1,46 @@
 using Microsoft.Win32;
 using Squirrel;
 using System;
+using System.IO;
+using System.Reflection;
+using System.Windows;
 using Wox.Infrastructure;
+using Wox.Infrastructure.UserSettings;
 using Wox.Plugin.SharedCommands;

 namespace Wox.Core.Configuration
 {
     public class Portable : IPortable
     {
-        private string applicationName;
-        private string exeName;
-        private string rootAppDirectory;
         private UpdateManager portabilityUpdater;
-        private string roamingDataPath;
-        private string portableDataPath;
-
-        public Portable()
-        {
-            //NEED TO DYNAMICALLY GET WOX'S LOCATION OTHERWISE SHORTCUTS WONT WORK
-            applicationName = Constant.Wox;
-            exeName = applicationName + ".exe";
-            rootAppDirectory = Constant.RootDirectory;
-            portabilityUpdater = new UpdateManager(string.Empty, applicationName, rootAppDirectory);
-
-             roamingDataPath = Constant.RoamingDataPath;
-            portableDataPath = Constant.PortableDataPath;
-        }

         public void DisablePortableMode()
         {
+            portabilityUpdater = new UpdateManager(string.Empty, Constant.Wox, Constant.RootDirectory);
+
             try
             {
-                MoveUserDataFolder(portableDataPath, roamingDataPath);
+                MoveUserDataFolder(DataLocation.PortableDataPath, DataLocation.RoamingDataPath);
                 CreateShortcuts();
-                CreateUninstallerEntry(); //DOES NOT CREATE THE UNINSTALLER ICON!!!!!!
+                CreateUninstallerEntry();
+                IndicateDeletion(DataLocation.PortableDataPath);

-                // always dispose UpdateManager???????????
+                MessageBox.Show("Wox needs to restart to finish disabling portable mode, " +
+                    "after the restart your portable data profile will be deleted and roaming data profile kept");
+
+                portabilityUpdater.Dispose();
                 // CHANGE TO PRIVATE/INTERNAL METHODS
+
+                UpdateManager.RestartApp();
             }
             catch (Exception e)
             {
                 //log and update error message to output above locations where shortcuts may not have been removed
 #if DEBUG
+                portabilityUpdater.Dispose();
                 throw;
 #else
+                portabilityUpdater.Dispose();
                 throw;// PRODUCTION LOGGING AND CONTINUE

 #endif
@@ -113,6 +110,7 @@

         public void CreateShortcuts()
         {
+            var exeName = Constant.Wox + ".exe";
             portabilityUpdater.CreateShortcutsForExecutable(exeName, ShortcutLocation.StartMenu, false);
             portabilityUpdater.CreateShortcutsForExecutable(exeName, ShortcutLocation.Desktop, false);
             portabilityUpdater.CreateShortcutsForExecutable(exeName, ShortcutLocation.Startup, false);


changed label.

changed label.

--- Source/JeroenPot.WebSite/Views/Home/Index.cshtml
+++ Source/JeroenPot.WebSite/Views/Home/Index.cshtml
@@ -3,7 +3,7 @@
 }

-
Changed!

+
Hello world!


changed StorageFolder.Exists to assume if the windows.Storage object != null, it exists (avoids System.IO checks that return invalid state).

--- XPlat.Storage.UWP/StorageFolder.cs
+++ XPlat.Storage.UWP/StorageFolder.cs
@@ -62,7 +62,8 @@
         public string Path => this.Originator.Path;

         /// <inheritdoc />
-        public bool Exists => this.Originator != null && Directory.Exists(this.Originator.Path);
+        public bool Exists => this.Originator != null;//impossible to create Windows.StorageItem that doesn't exist?
+

         /// <inheritdoc />
         public FileAttributes Attributes => (FileAttributes)(int)this.Originator.Attributes;
@@ -229,10 +230,12 @@

             if (createIfNotExists && storageFile == null)
             {
-                return await this.CreateFileAsync(name, CreationCollisionOption.OpenIfExists);
-            }
-
-            return new StorageFile(storageFile);
+                return await this.CreateFileAsync(name, CreationCollisionOption.OpenIfExists).ConfigureAwait(false);
+            }
+            else
+            {
+                return new StorageFile(storageFile);
+            }
         }

         /// <inheritdoc />


Develop

Develop

--- ZWave/Devices/Fibaro/DoorSensor.cs
+++ ZWave/Devices/Fibaro/DoorSensor.cs
@@ -18,7 +18,7 @@
         {
             node.GetCommandClass<Basic>().Changed += Basic_Changed;
             node.GetCommandClass<SensorBinary>().Changed += SensorBinary_Changed;
-            node.GetCommandClass<Alarm>().Changed += Alarm_Changed;
+            node.GetCommandClass<SensorAlarm>().Changed += SensorAlarm_Changed;
         }

         public async Task<bool> IsDoorOpen()
@@ -73,7 +73,7 @@
         }

-        private void Alarm_Changed(object sender, ReportEventArgs<AlarmReport> e)
+        private void SensorAlarm_Changed(object sender, ReportEventArgs<SensorAlarmReport> e)
         {
             if (e.Report.Type == AlarmType.General)
             {