fix Index Sync when columns change type / nullability

--- Signum.Engine/Engine/SchemaSynchronizer.cs
+++ Signum.Engine/Engine/SchemaSynchronizer.cs
@@ -70,6 +70,14 @@
                 return model.GetOrThrow(name).Name;
             };

+            Func<DiffTable, DiffIndex, Index, bool> columnsChanged = (dif, dix, mix) =>
+            {
+                if (dix.Columns.Count != mix.Columns.Length)
+                    return true;
+
+                return !dix.Columns.All(a => dif.Colums[a].ColumnEquals(mix.Columns.SingleEx(c => c.Name == a)));
+            };
+
             //use database without replacements to just remove indexes
             SqlPreCommand dropIndices =
                 Synchronizer.SynchronizeScript(model, database,
@@ -83,8 +91,8 @@

                     var changes = Synchronizer.SynchronizeScript(modelIxs, dif.Indices,
                         null,
-                        (i, dix) => dix.IsControlledIndex || dix.Columns.Any(removedColums.Contains) ? SqlBuilder.DropIndex(dif.Name, dix) : null,
-                        (i, mix, dix) => (mix as UniqueIndex).TryCC(u => u.ViewName) != dix.ViewName ? SqlBuilder.DropIndex(dif.Name, dix) : null,
+                        (i, dix) => dix.IsControlledIndex || dix.Columns.Any(removedColums.Contains)  ? SqlBuilder.DropIndex(dif.Name, dix) : null,
+                        (i, mix, dix) => (mix as UniqueIndex).TryCC(u => u.ViewName) != dix.ViewName || columnsChanged(dif, dix, mix) ? SqlBuilder.DropIndex(dif.Name, dix) : null,
                         Spacing.Simple);

                     return changes;
@@ -178,7 +186,7 @@
                     var controlledIndexes = Synchronizer.SynchronizeScript(modelIxs, dif.Indices,
                         (i, mix) => mix is UniqueIndex || SafeConsole.Ask(ref createMissingFreeIndexes, "Create missing non-unique index too?") ? SqlBuilder.CreateIndex(mix) : null,
                         null,
-                        (i, mix, dix) => (mix as UniqueIndex).TryCC(u => u.ViewName) != dix.ViewName ? SqlBuilder.CreateIndex(mix) :
+                        (i, mix, dix) => (mix as UniqueIndex).TryCC(u => u.ViewName) != dix.ViewName || columnsChanged(dif, dix, mix) ? SqlBuilder.CreateIndex(mix) :
                             mix.IndexName != dix.IndexName ? SqlBuilder.RenameIndex(tab, dix.IndexName, mix.IndexName) : null,
                         Spacing.Simple);


ALPHA-96 | adds missed config

ALPHA-96 | adds missed config

--- Assets/DeltaDNA/Helpers/ImageMessageStore.cs
+++ Assets/DeltaDNA/Helpers/ImageMessageStore.cs
@@ -28,7 +28,7 @@
     internal class ImageMessageStore {

         private readonly string cache = Application.temporaryCachePath + "/deltadna/image_messages/";
-
+
         private readonly MonoBehaviour parent;

         internal ImageMessageStore(MonoBehaviour parent) {
@@ -94,7 +94,8 @@
             var downloaded = 0;
             string error = null;
             var downloading = 0;
-            var maxConcurrent = 5;
+            var userMaxConcurrent = DDNA.Instance.Settings.MaxConcurrentImageCacheFetches;
+            var maxConcurrent = userMaxConcurrent > 0 ? userMaxConcurrent : 5;
             foreach (var url in urls) {
                 var name = GetName(url);
                 if (IsFull()){


Not VAT on income

Not VAT on income

--- DataAccess/Month.cs
+++ DataAccess/Month.cs
@@ -55,7 +55,7 @@
         public virtual int? VisitorsMember { get; set; }
         [Display(Name = "Schools Visitors", Description = "How many school visitors came to your site this month?")]
         public virtual int? VisitorsSchool { get; set; }
-        [Display(Name = "Admission Income", Description = "What was the income from visitor admissions this month?")]
+        [Display(Name = "Admission Income", Description = "What was the income from visitor admissions this month? Excluding VAT")]
         public virtual int? IncomeAdmissions { get; set; }

         [Display(Name = "Not with Family", Description = "What percentage of visitors were not with a family?")]
@@ -97,7 +97,7 @@
         [Display(Name = "Do you have a shop?", Description = "Was there a shop or retail outlet open on your site this month?")]
         public virtual bool? IsRetail { get; set; }

-        [Display(Name = "Retail Income", Description = "How much was your retail income this month?")]
+        [Display(Name = "Retail Income", Description = "How much was your retail income this month? Excluding VAT")]
         public virtual int? IncomeRetail { get; set; }
         [Display(Name = "Shop behind pay barrier?", Description = "Do visitors have to pay to get to the shop?")]
         public virtual bool PayToShop { get; set; }
@@ -121,7 +121,7 @@
         [Display(Name = "Refreshments Available?", Description = "Did you provide refreshments for visitors this month?")]
         public virtual bool? IsRefreshment { get; set; }

-        [Display(Name = "Refreshments Income", Description = "What was your income from refreshments sales this month?")]
+        [Display(Name = "Refreshments Income", Description = "What was your income from refreshments sales this month? Excluding VAT")]
         public virtual int? IncomeRefreshment { get; set; }
         [Display(Name = "Behind Pay Barrier?", Description = "Do visitors have to pay to enter before they can get refreshments?")]
         public virtual bool PayToRefreshment { get; set; }
@@ -172,7 +172,7 @@
         [Display(Name = "Donation Opportunity?", Description = "Do you provide visitors with opportunites to make donations?")]
         public virtual bool? IsDonationOpportunity { get; set; }

-        [Display(Name = "Donation Income", Description = "What was your income from donations for this month?")]
+        [Display(Name = "Donation Income", Description = "What was your income from donations for this month? Excluding VAT")]
         public virtual int? IncomeDonation { get; set; }
         [Display(Name = "Behind Pay Barrier?", Description = "Do visitors have to pay to enter before they can make a donation?")]
         public virtual bool PayToDonate { get; set; }


Revert "fix compilation"

Revert "fix compilation"

This reverts commit 0c1ef4438a65d51bbaed2e62912d6e2617f682f8.

--- Signum.Engine/Engine/SchemaSynchronizer.cs
+++ Signum.Engine/Engine/SchemaSynchronizer.cs
@@ -684,8 +684,6 @@
                 UserTypeName = UserTypeName,
             };
         }
-
-        public object ForeingKey { get; set; }
     }

     public class DiffForeignKey


Add more corner cases

Add more corner cases

--- Assets/MapGen/Meshing/VoxelGrid/VoxelGrid.cs
+++ Assets/MapGen/Meshing/VoxelGrid/VoxelGrid.cs
@@ -474,18 +474,31 @@
                 switch (edges)
                 {
                     case Directions.East:
-                        switch (walls)
-                        {
-                            case Directions.NorthWest:
-                                AddCorner(wallPolygons, west, north, center, corner);
-                                break;
-                            case Directions.North | Directions.West:
-                                AddStraight(wallPolygons, south, north);
-                                break;
-
-                            default:
-                                AddStraight(floorPolygons, south, north);
-                                break;
+                        {
+                            Vector3 eastPoint = corner == CornerType.Diamond ? nudge(west, west, east) : east;
+                            Vector3 southPoint = corner == CornerType.Diamond ? nudge(north, north, south) : south;
+                            Vector3 northPoint = corner == CornerType.Diamond ? nudge(west, south, north) : north;
+                            switch (walls)
+                            {
+                                case Directions.NorthWest:
+                                    AddCorner(wallPolygons, west, north, center, corner);
+                                    AddCorner(floorPolygons, northPoint, west, center, corner);
+                                    AddStraight(floorPolygons, south, northPoint);
+                                    break;
+                                case Directions.SouthWest:
+                                    AddCorner(wallPolygons, south, west, center, corner);
+                                    AddCorner(floorPolygons, west, southPoint, center, corner);
+                                    AddStraight(floorPolygons, southPoint, north);
+                                    break;
+                                case Directions.West:
+                                case Directions.North | Directions.West:
+                                    AddStraight(wallPolygons, south, north);
+                                    break;
+
+                                default:
+                                    AddStraight(floorPolygons, south, north);
+                                    break;
+                            }
                         }
                         break;
                     case Directions.South:
@@ -545,6 +558,13 @@
                                     AddStraight(wallPolygons, south, north);
                                     AddStraight(floorPolygons, north, southPoint);
                                     AddCorner(floorPolygons, southPoint, east, center, corner);
+                                    break;
+                                case Directions.NorthEast | Directions.SouthWest:
+                                    AddCorner(wallPolygons, north, east, center, corner);
+                                    AddCorner(floorPolygons, south, eastPoint, center, corner);
+                                    AddCorner(wallPolygons, south, west, center, corner);
+                                    AddCorner(floorPolygons, west, southPoint, center, corner);
+                                    AddCorner(floorPolygons, southPoint, eastPoint, center, corner);
                                     break;
                                 case Directions.North | Directions.West:
                                     AddCorner(wallPolygons, south, east, center, corner);


Dynamic command lookup.

Dynamic command lookup.

--- DataBoss/Program.cs
+++ DataBoss/Program.cs
@@ -4,15 +4,27 @@
 using System.Data.SqlClient;
 using System.IO;
 using System.Linq;
+using System.Net;
+using System.Reflection;
 using DataBoss.Schema;

 namespace DataBoss
 {
-    public class Program
+	[AttributeUsage(AttributeTargets.Method)]
+	class DataBossCommandAttribute : Attribute
+	{
+		public DataBossCommandAttribute(string name) {
+			this.Name = name;
+		}
+
+		public readonly string Name;
+	}
+
+	public class Program
 	{
 		static string ProgramName => Path.GetFileName(typeof(Program).Assembly.Location);

-	    readonly SqlConnection db;
+		readonly SqlConnection db;

 		static string ReadResource(string path) {
 			using(var reader = new StreamReader(typeof(Program).Assembly.GetManifestResourceStream(path)))
@@ -31,8 +43,8 @@

 			try {
 				var cc = DataBossConfiguration.ParseCommandConfig(args);
-
-                Action<Program, DataBossConfiguration> command;
+
+				Action<Program, DataBossConfiguration> command;
 				if(!TryGetCommand(cc.Key, out command)) {
 					Console.WriteLine(GetUsageString());
 					return -1;
@@ -53,17 +65,21 @@
 		}

 		static bool TryGetCommand(string name, out Action<Program, DataBossConfiguration> command) {
-			var commands = new Dictionary<string, Action<Program, DataBossConfiguration>> {
-				{ "init", (p, c) => p.Initialize(c) },
-				{ "status", (p, c) => p.Status(c) },
-				{ "update", (p, c) => p.Update(c) },
-			};
-
-			return commands.TryGetValue(name, out command);
-		}
-
-		private static void WriteError(Exception e)
-		{
+			var target = typeof(Program)
+				.GetMethods(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic)
+				.Select(method => new {
+					method,
+					command = method.SingleOrDefault<DataBossCommandAttribute>()
+				})
+				.FirstOrDefault(x => x.command != null && x.command.Name == name);
+			if(target == null)
+				command = null;
+			else
+				command = (Action<Program, DataBossConfiguration>)Delegate.CreateDelegate(typeof(Action<Program, DataBossConfiguration>), target.method);
+			return command != null;
+		}
+
+		static void WriteError(Exception e) {
 			var oldColor = Console.ForegroundColor;
 			Console.ForegroundColor = ConsoleColor.Red;
 			Console.Error.WriteLine(e.Message);
@@ -73,11 +89,12 @@
 		static string GetUsageString() {
 			return ReadResource("Usage")
 				.Replace("{{ProgramName}}", ProgramName)
-				.Replace("{{Version}}", typeof(Program).Assembly.GetName().Version.ToString());
-		}
-
+				.Replace("{{Version}}", typeof(Program).Assembly.GetName().Version.ToString());
+		}
+
+		[DataBossCommand("init")]
 		public void Initialize(DataBossConfiguration config) {
-			EnsureDatabse(config.GetConnectionString());
+			EnsureDataBase(config.GetConnectionString());
 			var scripter = new DataBossScripter();
 			using(var cmd = new SqlCommand(scripter.CreateMissing(typeof(DataBossHistory)), db))
 			{
@@ -88,7 +105,7 @@
 			}
 		}

-		static void EnsureDatabse(string connectionString) {
+		static void EnsureDataBase(string connectionString) {
 			var qs = new SqlConnectionStringBuilder(connectionString);
 			var dbName = qs.InitialCatalog;
 			qs.Remove("Initial Catalog");
@@ -104,6 +121,7 @@
 			}
 		}

+		[DataBossCommand("status")]
 		void Status(DataBossConfiguration config) {
 			Open();
 			var pending = GetPendingMigrations(config);
@@ -114,6 +132,7 @@
 			}
 		}

+		[DataBossCommand("update")]
 		void Update(DataBossConfiguration config) {
 			Open();
 			var pending = GetPendingMigrations(config);


コマンドインジェクション防止のため引用符をエスケープするように修正。

コマンドインジェクション防止のため引用符をエスケープするように修正。

--- ProcessEx.cs
+++ ProcessEx.cs
@@ -119,10 +119,14 @@
         }

         private static string QuoteArgument(string s) {
-            if (s.Contains(" "))
-                return "\"" + s + "\"";
+            if (s.Contains(" ") || s.Contains("\""))
+                return "\"" + EscapeQuotes(s) + "\"";
             else
                 return s;
         }
+
+        private static string EscapeQuotes(string s) {
+            return s.Replace("\"", "\"\"");
+        }
     }
 }


fix SchemaSynchronizer with History Tables (NullabilityChanges)

--- Signum.Engine/Engine/SchemaSynchronizer.cs
+++ Signum.Engine/Engine/SchemaSynchronizer.cs
@@ -242,11 +242,12 @@
                         {
                             var rename = !object.Equals(dif.Name, tab.Name) ? SqlBuilder.RenameOrMove(dif, tab) : null;

-                            var alterColumnToNotNullableHistory = tab.Columns.OuterJoinDictionaryCC(dif.Columns, (cn, tabCol, difCol) =>
-                            tabCol != null && difCol != null && !tabCol.Nullable.ToBool() && difCol.Nullable).Any(a => a.Value);
-
-                            var disableSystemVersioning = (dif.TemporalType != SysTableTemporalType.None &&
-                            (tab.SystemVersioned == null || !object.Equals(replacements.Apply(Replacements.KeyTables, dif.TemporalTableName.ToString()), tab.SystemVersioned.TableName.ToString()) || alterColumnToNotNullableHistory) ?
+                            bool alterColumnToNotNullableHistory = false;
+
+                            var disableSystemVersioning = (dif.TemporalType != SysTableTemporalType.None &&
+                            (tab.SystemVersioned == null ||
+                            !object.Equals(replacements.Apply(Replacements.KeyTables, dif.TemporalTableName.ToString()), tab.SystemVersioned.TableName.ToString()) ||
+                            (alterColumnToNotNullableHistory = NullabilityChanges(tab, dif) && SafeConsole.Ask($"Table {tab.Name} has nullability changes. Disable and re-enable System Versioning?"))) ?
                                 SqlBuilder.AlterTableDisableSystemVersioning(tab.Name).Do(a => a.GoAfter = true) : null);

                             var dropPeriod = (dif.Period != null &&
@@ -296,7 +297,9 @@
                                 (SqlPreCommandSimple)SqlBuilder.AlterTableAddPeriod(tab) : null);

                             var addSystemVersioning = (tab.SystemVersioned != null &&
-                                (dif.Period == null || !object.Equals(replacements.Apply(Replacements.KeyTables, dif.TemporalTableName.ToString()), tab.SystemVersioned.TableName.ToString()) || alterColumnToNotNullableHistory) ?
+                                (dif.Period == null ||
+                                !object.Equals(replacements.Apply(Replacements.KeyTables, dif.TemporalTableName.ToString()), tab.SystemVersioned.TableName.ToString()) ||
+                                alterColumnToNotNullableHistory) ?
                                 SqlBuilder.AlterTableEnableSystemVersioning(tab).Do(a => a.GoBefore = true) : null);

@@ -422,6 +425,13 @@
             }
         }

+        private static bool NullabilityChanges(ITable tab, DiffTable dif)
+        {
+            return tab.Columns.OuterJoinDictionaryCC(dif.Columns, (cn, tabCol, difCol) =>
+                   tabCol != null && difCol != null && !tabCol.Nullable.ToBool() && difCol.Nullable)
+                   .Any(a => a.Value);
+        }
+
         private static SqlPreCommand UpdateCompatible(Replacements replacements, ITable tab, DiffTable dif, IColumn tabCol, DiffColumn difCol)
         {
             if (!(difCol.Nullable && !tabCol.Nullable.ToBool()))
@@ -430,7 +440,7 @@
             var defaultValue = GetDefaultValue(tab, tabCol, replacements, forNewColumn: false);

             if (defaultValue == "force")
-                return null;
+                return SqlBuilder.AlterTableAlterColumn(tab, tabCol, difCol.DefaultConstraint?.Name);

             bool goBefore = difCol.Name != tabCol.Name;


ADD: door con cambio de bounds

ADD: door con cambio de bounds

--- Assets/Scripts/Controllers/DoorController.cs
+++ Assets/Scripts/Controllers/DoorController.cs
@@ -21,6 +21,11 @@
     public float TimeOffSet = 0.0f;
     public float TargetXPosition = 0.0f;
     public float TargetYPosition = 0.0f;
+    [Space(10)]
+    public float LeftLimit = 0.0f;
+    public float RightLimit = 0.0f;
+    public float BottomLimit = 0.0f;
+    public float TopLimit = 0.0f;

     private bool _transition = false;
     private GameObject _spawedPathBloquer;
@@ -71,7 +76,7 @@
                     PlayerTargetVector = new Vector3(PlayerTargetPositon, player.transform.position.y, player.transform.position.z);

                     cameraScript.MoveCamera(CameraTargetVector, PlayerTargetVector, TransitionSpeed);
-                    cameraScript.ActivateLimits(CameraTargetPosition, CameraTargetPosition, transform.parent.position.y, transform.parent.position.y);
+                    cameraScript.ActivateLimits(CameraTargetPosition + LeftLimit, CameraTargetPosition + RightLimit, transform.parent.position.y + BottomLimit, transform.parent.position.y + TopLimit);
                 } else if (this.TransitionDirection == TransitionDirection.Down) {
                     CameraTargetPosition = transform.parent.position.y - 2.0f;
                     PlayerTargetPositon = player.transform.position.y - 0.522f;
@@ -80,7 +85,7 @@
                     PlayerTargetVector = new Vector3(player.transform.position.x, PlayerTargetPositon, player.transform.position.z);

                     cameraScript.MoveCamera(CameraTargetVector, PlayerTargetVector, TransitionSpeed);
-                    cameraScript.ActivateLimits(transform.parent.position.x, transform.parent.position.x, CameraTargetPosition, CameraTargetPosition);
+                    cameraScript.ActivateLimits(transform.parent.position.x + LeftLimit, transform.parent.position.x + RightLimit, CameraTargetPosition + BottomLimit, CameraTargetPosition + TopLimit);
                 } else if (this.TransitionDirection == TransitionDirection.Left) {
                     CameraTargetPosition = transform.parent.position.x - 2.22f;
                     PlayerTargetPositon = player.transform.position.x - 0.45f;
@@ -89,7 +94,7 @@
                     PlayerTargetVector = new Vector3(PlayerTargetPositon, player.transform.position.y, player.transform.position.z);

                     cameraScript.MoveCamera(CameraTargetVector, PlayerTargetVector, TransitionSpeed);
-                    cameraScript.ActivateLimits(CameraTargetPosition, CameraTargetPosition, transform.parent.position.y, transform.parent.position.y);
+                    cameraScript.ActivateLimits(CameraTargetPosition + LeftLimit, CameraTargetPosition + RightLimit, transform.parent.position.y + BottomLimit, transform.parent.position.y + RightLimit);
                 }
             } else {
                 if (!_isTransitioningOut) {


Fixed CommandLineArea focus

Fixed CommandLineArea focus

Fixed CommandLineArea focus
Removed redunant check for KeyUp

--- Debugger/Console.cs
+++ Debugger/Console.cs
@@ -29,6 +29,7 @@
         private GUIArea headerArea;
         private GUIArea consoleArea;
         private GUIArea commandLineArea;
+        private bool focusCommandLineArea = false;

         private float headerHeightCompact = 0.5f;
         private float headerHeightExpanded = 8.0f;
@@ -85,7 +86,11 @@
         void KeyboardCallback()
         {
             Event e = Event.current;
-            if (e.type == EventType.KeyUp && e.keyCode == KeyCode.Return)
+            if (e.type != EventType.KeyUp)
+            {
+                return;
+            }
+            if (e.keyCode == KeyCode.Return)
             {
                 if (e.shift)
                 {
@@ -94,7 +99,7 @@
                 e.Use();
                 RunCommandLine();
             }
-            if (e.type == EventType.KeyUp && e.keyCode == KeyCode.UpArrow && e.shift)
+            if (e.keyCode == KeyCode.UpArrow && !e.shift)
             {
                 if (currentCommandHistoryIndex == 0)
                 {
@@ -103,7 +108,7 @@
                 }
                 currentCommandHistoryIndex--;
             }
-            if (e.type == EventType.KeyUp && e.keyCode == KeyCode.DownArrow && e.shift)
+            if (e.keyCode == KeyCode.DownArrow && !e.shift)
             {
                 if (currentCommandHistoryIndex == commandHistory.Count - 1)
                 {
@@ -519,7 +524,12 @@

             commandLineArea.End();
-            GUI.FocusControl("ModToolsConsoleCommandLine");
+
+            if (focusCommandLineArea)
+            {
+                GUI.FocusControl("ModToolsConsoleCommandLine");
+                focusCommandLineArea = false;
+            }
         }

         void RunCommandLine()
@@ -558,6 +568,7 @@
                 }
             }
             commandLine = "";
+            focusCommandLineArea = true;
         }

         void DrawWindow()


updating odata route name to "odata"

updating odata route name to "odata"

--- main/Sample/Northwind.Web/App_Start/ODataConfig.cs
+++ main/Sample/Northwind.Web/App_Start/ODataConfig.cs
@@ -30,7 +30,7 @@
             builder.EntitySet<Supplier>(typeof(Supplier).Name);

             var model = builder.GetEdmModel();
-            config.Routes.MapODataRoute("ODataRoute", "odata", model);
+            config.Routes.MapODataRoute("odata", "odata", model);

             config.EnableQuerySupport();
         }


Made the edit buttons all get bigger when the point size is bigger. Made the help text wrap.

--- SlicerConfiguration/SliceSettingsWidget.cs
+++ SlicerConfiguration/SliceSettingsWidget.cs
@@ -271,7 +271,7 @@

         public SliceSettingsWidget(SliceSettingsWidgetUiState uiState)
         {
-            int minSettingNameWidth = 190;
+            int minSettingNameWidth = (int)(190 * TextWidget.GlobalPointSizeScaleRatio + .5);
             buttonFactory.FixedHeight = 20;
             buttonFactory.fontSize = 10;
             buttonFactory.normalFillColor = RGBA_Bytes.White;
@@ -582,31 +582,65 @@
             return groupTabs;
         }

+        public class WrappedTextWidget : GuiWidget
+        {
+            String unwrappedText;
+            TextWidget textWidget;
+            double pointSize;
+            public WrappedTextWidget(string text, double x = 0, double y = 0,
+                double pointSize = 12, Justification justification = Justification.Left,
+                RGBA_Bytes textColor = new RGBA_Bytes(), bool ellipsisIfClipped = true, bool underline = false, RGBA_Bytes backgroundColor = new RGBA_Bytes())
+            {
+                this.pointSize = pointSize;
+                textWidget = new TextWidget(text, x, y, pointSize, justification, textColor, ellipsisIfClipped, underline, backgroundColor);
+                textWidget.AutoExpandBoundsToText = true;
+                textWidget.HAnchor = HAnchor.ParentLeft;
+                textWidget.VAnchor = VAnchor.ParentCenter;
+                unwrappedText = text;
+                HAnchor = HAnchor.Max_FitToChildren_ParentWidth;
+                VAnchor = VAnchor.Max_FitToChildren_ParentHeight;
+                AdjustTextWrap();
+                AddChild(textWidget);
+            }
+
+            public override void OnBoundsChanged(EventArgs e)
+            {
+                AdjustTextWrap();
+                base.OnBoundsChanged(e);
+            }
+
+            private void AdjustTextWrap()
+            {
+                if (textWidget != null)
+                {
+                    if (Width > 0)
+                    {
+                        EnglishTextWrapping wrapper = new EnglishTextWrapping(pointSize);
+                        string wrappedMessage = wrapper.InsertCRs(unwrappedText, Width);
+                        textWidget.Text = wrappedMessage;
+                    }
+                }
+            }
+        }
+
         private void AddInHelpText(FlowLayoutWidget topToBottomSettings, OrganizerSettingsData settingInfo)
         {
             FlowLayoutWidget allText = new FlowLayoutWidget(FlowDirection.TopToBottom);
-            double textRegionWidth = 380;
+            allText.HAnchor = HAnchor.Max_FitToChildren_ParentWidth;
+            double textRegionWidth = 380 * TextWidget.GlobalPointSizeScaleRatio;
             allText.Margin = new BorderDouble(3);
             allText.Padding = new BorderDouble(5);
             allText.BackgroundColor = ActiveTheme.Instance.TransparentDarkOverlay;

             double helpPointSize = 10;
-
-            EnglishTextWrapping wrapper = new EnglishTextWrapping(helpPointSize);
-            string[] wrappedText = wrapper.WrapText(settingInfo.HelpText, textRegionWidth - allText.Padding.Width);
-            foreach (string line in wrappedText)
-            {
-                GuiWidget helpWidget = new TextWidget(line, pointSize: helpPointSize, textColor: RGBA_Bytes.White);
-                helpWidget.Margin = new BorderDouble(5, 0, 0, 0);
-                helpWidget.HAnchor = HAnchor.ParentLeft;
-                allText.AddChild(helpWidget);
-            }
+
+            GuiWidget helpWidget = new WrappedTextWidget(settingInfo.HelpText, pointSize: helpPointSize, textColor: RGBA_Bytes.White);
+            helpWidget.Margin = new BorderDouble(5, 0, 0, 0);
+            //helpWidget.HAnchor = HAnchor.ParentLeft;
+            allText.AddChild(helpWidget);

             allText.MinimumSize = new Vector2(textRegionWidth, allText.MinimumSize.y);
-            if (wrappedText.Length > 0)
-            {
-                topToBottomSettings.AddChild(allText);
-            }
+            topToBottomSettings.AddChild(allText);
         }

         private TabControl CreateExtraSettingsSideTabsAndPages(int minSettingNameWidth, TabControl categoryTabs, out int count)
@@ -711,14 +745,14 @@

             if (ActiveSliceSettings.Instance.Contains(settingData.SlicerConfigName))
             {
-                int intEditWidth = 60;
-                int doubleEditWidth = 60;
+                int intEditWidth = (int)(60 * TextWidget.GlobalPointSizeScaleRatio + .5);
+                int doubleEditWidth = (int)(60 * TextWidget.GlobalPointSizeScaleRatio + .5);
                 if (settingData.QuickMenuSettings.Count > 0)
                 {
-                    doubleEditWidth = 35;
-                }
-                int vectorXYEditWidth = 60;
-                int multiLineEditHeight = 60;
+                    doubleEditWidth = (int)(35 * TextWidget.GlobalPointSizeScaleRatio + .5);
+                }
+                int vectorXYEditWidth = (int)(60 * TextWidget.GlobalPointSizeScaleRatio + .5);
+                int multiLineEditHeight = (int)(60 * TextWidget.GlobalPointSizeScaleRatio + .5);

                 string sliceSettingValue = ActiveSliceSettings.Instance.GetActiveValue(settingData.SlicerConfigName);
                 leftToRightLayout.Margin = new BorderDouble(0, 2);


Created BST class with contructor and add method

--- BST/BinarySearchTree/BinarySearchTree/BST.cs
+++ BST/BinarySearchTree/BinarySearchTree/BST.cs
@@ -1,10 +1,45 @@
 using System;
 using System.Collections.Generic;
+using System.Runtime.InteropServices;
 using System.Text;

 namespace BinarySearchTree
 {
     class BST
     {
+        public Node Root;
+
+        public BST(int data)
+        {
+            Root = new Node(data);
+        }
+
+        public void Add(int data)
+        {
+            Node curr = Root;
+            Node newNode = new Node(data);
+            while (true)
+            {
+                Node ParentNode = curr;
+                if (data < curr.Data)
+                {
+                    curr = curr.Left;
+                    if (curr == null)
+                    {
+                        ParentNode.Left = newNode;
+                        break;
+                    }
+                }
+                else
+                {
+                    curr = curr.Right;
+                    if (curr == null)
+                    {
+                        ParentNode.Right = newNode;
+                        break;
+                    }
+                }
+            }
+        }
     }
 }


Fix: If SMTP port is 25, SSL shouldn't be used

--- BTCPayServer/Services/Mails/EmailSettings.cs
+++ BTCPayServer/Services/Mails/EmailSettings.cs
@@ -75,7 +75,10 @@
                     client.ServerCertificateValidationCallback = (s, c, h, e) => true;
 #pragma warning restore CA5359 // Do Not Disable Certificate Validation
                 }
-                await client.ConnectAsync(Server, Port.Value, MailKit.Security.SecureSocketOptions.Auto, connectCancel.Token);
+                var sslOptions = MailKit.Security.SecureSocketOptions.Auto;
+                if (Port is int p && p == 25) // Workaround for https://github.com/jstedfast/MailKit/pull/1398
+                    sslOptions = MailKit.Security.SecureSocketOptions.None;
+                await client.ConnectAsync(Server, Port.Value, sslOptions, connectCancel.Token);
                 if ((client.Capabilities & SmtpCapabilities.Authentication) != 0)
                     await client.AuthenticateAsync(Login ?? string.Empty, Password ?? string.Empty, connectCancel.Token);
             }


Update ENFRecord with full ENF Spec

Update ENFRecord with full ENF Spec

--- EOLib.IO/Pub/ENFRecord.cs
+++ EOLib.IO/Pub/ENFRecord.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
 using System.IO;
 using System.Linq;
 using System.Reflection;
@@ -19,20 +19,33 @@

         public int Graphic { get; set; }

+        public byte UnkA { get; set; }
+
         public short Boss { get; set; }
         public short Child { get; set; }
         public NPCType Type { get; set; }

+        public short UnkB { get; set; }
+
         public short VendorID { get; set; }

         public int HP { get; set; }
-        public ushort Exp { get; set; }
+
         public short MinDam { get; set; }
         public short MaxDam { get; set; }

         public short Accuracy { get; set; }
         public short Evade { get; set; }
         public short Armor { get; set; }
+
+        public byte UnkC { get; set; }
+        public short UnkD { get; set; }
+        public short UnkE { get; set; }
+        public short UnkF { get; set; }
+        public short UnkG { get; set; }
+        public byte UnkH { get; set; }
+
+        public int Exp { get; set; }

         public TValue Get<TValue>(PubRecordProperty type)
         {
@@ -63,22 +76,30 @@

                 mem.Write(numberEncoderService.EncodeNumber(Graphic, 2), 0, 2);

-                mem.Seek(4 + Name.Length, SeekOrigin.Begin);
+                mem.WriteByte(numberEncoderService.EncodeNumber(UnkA, 1)[0]);
+
                 mem.Write(numberEncoderService.EncodeNumber(Boss, 2), 0, 2);
                 mem.Write(numberEncoderService.EncodeNumber(Child, 2), 0, 2);
                 mem.Write(numberEncoderService.EncodeNumber((short)Type, 2), 0, 2);
                 mem.Write(numberEncoderService.EncodeNumber(VendorID, 2), 0, 2);
                 mem.Write(numberEncoderService.EncodeNumber(HP, 3), 0, 3);

-                mem.Seek(17 + Name.Length, SeekOrigin.Begin);
+                mem.Write(numberEncoderService.EncodeNumber(UnkB, 2), 0, 2);
+
                 mem.Write(numberEncoderService.EncodeNumber(MinDam, 2), 0, 2);
                 mem.Write(numberEncoderService.EncodeNumber(MaxDam, 2), 0, 2);
                 mem.Write(numberEncoderService.EncodeNumber(Accuracy, 2), 0, 2);
                 mem.Write(numberEncoderService.EncodeNumber(Evade, 2), 0, 2);
                 mem.Write(numberEncoderService.EncodeNumber(Armor, 2), 0, 2);

-                mem.Seek(37 + Name.Length, SeekOrigin.Begin);
-                mem.Write(numberEncoderService.EncodeNumber(Exp, 2), 0, 2);
+                mem.WriteByte(numberEncoderService.EncodeNumber(UnkC, 1)[0]);
+                mem.Write(numberEncoderService.EncodeNumber(UnkD, 2), 0, 2);
+                mem.Write(numberEncoderService.EncodeNumber(UnkE, 2), 0, 2);
+                mem.Write(numberEncoderService.EncodeNumber(UnkF, 2), 0, 2);
+                mem.Write(numberEncoderService.EncodeNumber(UnkG, 2), 0, 2);
+                mem.WriteByte(numberEncoderService.EncodeNumber(UnkH, 1)[0]);
+
+                mem.Write(numberEncoderService.EncodeNumber(Exp, 3), 0, 3);
             }

             return ret;
@@ -89,13 +110,24 @@
             if (recordBytes.Length != DATA_SIZE)
                 throw new ArgumentOutOfRangeException(nameof(recordBytes), "Data is not properly sized for correct deserialization");

+            Console.Write(this.Name + " [");
+            for (int i = 0; i < recordBytes.Length; i++)
+            {
+                Console.Write(recordBytes[i] + "[pos:" + i + "], ");
+            }
+            Console.Write("]\n");
+
             Graphic = numberEncoderService.DecodeNumber(recordBytes[0], recordBytes[1]);
+
+            UnkA = (byte)numberEncoderService.DecodeNumber(recordBytes[2]);

             Boss = (short)numberEncoderService.DecodeNumber(recordBytes[3], recordBytes[4]);
             Child = (short)numberEncoderService.DecodeNumber(recordBytes[5], recordBytes[6]);
             Type = (NPCType)numberEncoderService.DecodeNumber(recordBytes[7], recordBytes[8]);
             VendorID = (short)numberEncoderService.DecodeNumber(recordBytes[9], recordBytes[10]);
             HP = numberEncoderService.DecodeNumber(recordBytes[11], recordBytes[12], recordBytes[13]);
+
+            UnkB = (short)numberEncoderService.DecodeNumber(recordBytes[14], recordBytes[15]);

             MinDam = (short)numberEncoderService.DecodeNumber(recordBytes[16], recordBytes[17]);
             MaxDam = (short)numberEncoderService.DecodeNumber(recordBytes[18], recordBytes[19]);
@@ -104,7 +136,14 @@
             Evade = (short)numberEncoderService.DecodeNumber(recordBytes[22], recordBytes[23]);
             Armor = (short)numberEncoderService.DecodeNumber(recordBytes[24], recordBytes[25]);

-            Exp = (ushort)numberEncoderService.DecodeNumber(recordBytes[36], recordBytes[37]);
+            UnkC = (byte)numberEncoderService.DecodeNumber(recordBytes[26]);
+            UnkD = (short)numberEncoderService.DecodeNumber(recordBytes[27], recordBytes[28]);
+            UnkE = (short)numberEncoderService.DecodeNumber(recordBytes[29], recordBytes[30]);
+            UnkF = (short)numberEncoderService.DecodeNumber(recordBytes[31], recordBytes[32]);
+            UnkG = (short)numberEncoderService.DecodeNumber(recordBytes[33], recordBytes[34]);
+            UnkH = (byte)numberEncoderService.DecodeNumber(recordBytes[35]);
+
+            Exp = numberEncoderService.DecodeNumber(recordBytes[36], recordBytes[37], recordBytes[38]);
         }
     }
 }


Fix EntityManager deserialization bug

Fix EntityManager deserialization bug

--- Entities/EntityManager.cs
+++ Entities/EntityManager.cs
@@ -186,7 +186,7 @@

             EntityDeserializer entityDeserializer = new EntityDeserializer(singletonEntity, restoredEntities, converter, addingToEntityManager: true);
             foreach (var deserializedEntity in entityDeserializer) {
-                int entityId = ((IEntity)deserializedEntity).UniqueId;
+                int entityId = ((IEntity)deserializedEntity.Entity).UniqueId;

                 // are we restoring the singleton entity?
                 if (entityId == singletonEntity.UniqueId) {


Regenerate proxy file, using latest znproxy

--- sample/Zn.Sample.Client/Proxy.cs
+++ sample/Zn.Sample.Client/Proxy.cs
@@ -174,10 +174,12 @@

             /// <summary />
             [JsonConverter( typeof( Zinc.Json.DateConverter ) )]
+            [XmlElement( DataType = "date" )]
             public DateTime InDate { get; set; }

             /// <summary />
             [JsonConverter( typeof( Zinc.Json.TimeConverter ) )]
+            [XmlElement( DataType = "time" )]
             public DateTime InTime { get; set; }

             /// <summary />
@@ -200,10 +202,12 @@

             /// <summary />
             [JsonConverter( typeof( Zinc.Json.DateConverter ) )]
+            [XmlElement( DataType = "date" )]
             public DateTime OutDate { get; set; }

             /// <summary />
             [JsonConverter( typeof( Zinc.Json.TimeConverter ) )]
+            [XmlElement( DataType = "time" )]
             public DateTime OutTime { get; set; }

             /// <summary />


Ensure that a users email address is trimmed.

--- Source/Core/Repositories/UserRepository.cs
+++ Source/Core/Repositories/UserRepository.cs
@@ -29,10 +29,11 @@
         public UserRepository(MongoDatabase database, IValidator<User> validator = null, ICacheClient cacheClient = null, IMessagePublisher messagePublisher = null) : base(database, validator, cacheClient, messagePublisher) { }

         public User GetByEmailAddress(string emailAddress) {
-            if (String.IsNullOrEmpty(emailAddress))
+            if (String.IsNullOrWhiteSpace(emailAddress))
                 return null;

-            return FindOne<User>(new MongoOptions().WithQuery(Query.EQ(FieldNames.EmailAddress, emailAddress.ToLowerInvariant())).WithCacheKey(emailAddress));
+            emailAddress = emailAddress.ToLowerInvariant().Trim();
+            return FindOne<User>(new MongoOptions().WithQuery(Query.EQ(FieldNames.EmailAddress, emailAddress)).WithCacheKey(emailAddress));
         }

         public User GetByPasswordResetToken(string token) {
@@ -109,15 +110,15 @@
         #endregion

         protected override void BeforeAdd(ICollection<User> documents) {
-            foreach (var user in documents.Where(user => !String.IsNullOrEmpty(user.EmailAddress)))
-                user.EmailAddress = user.EmailAddress.ToLowerInvariant();
+            foreach (var user in documents.Where(user => !String.IsNullOrWhiteSpace(user.EmailAddress)))
+                user.EmailAddress = user.EmailAddress.ToLowerInvariant().Trim();

             base.BeforeAdd(documents);
         }

         protected override void BeforeSave(ICollection<User> originalDocuments, ICollection<User> documents) {
-            foreach (var user in documents.Where(user => !String.IsNullOrEmpty(user.EmailAddress)))
-                user.EmailAddress = user.EmailAddress.ToLowerInvariant();
+            foreach (var user in documents.Where(user => !String.IsNullOrWhiteSpace(user.EmailAddress)))
+                user.EmailAddress = user.EmailAddress.ToLowerInvariant().Trim();

             base.BeforeSave(originalDocuments, documents);
         }
@@ -138,7 +139,7 @@
             if (!EnableCache || Cache == null)
                 return;

-            InvalidateCache(user.EmailAddress.ToLowerInvariant());
+            InvalidateCache(user.EmailAddress.ToLowerInvariant().Trim());

             foreach (var organizationId in user.OrganizationIds)
                 InvalidateCache(String.Concat("org:", organizationId));


TypeDecl.VisitMe() is abstract

TypeDecl.VisitMe() is abstract

--- Source/Devsense.PHP.Parser/Ast/TypeDecl.cs
+++ Source/Devsense.PHP.Parser/Ast/TypeDecl.cs
@@ -195,15 +195,6 @@
         #endregion

         /// <summary>
-        /// Call the right Visit* method on the given Visitor object.
-        /// </summary>
-        /// <param name="visitor">Visitor to be called.</param>
-        public override void VisitMe(TreeVisitor visitor)
-        {
-            visitor.VisitTypeDecl(this);
-        }
-
-        /// <summary>
         /// <see cref="PHPDocBlock"/> instance or <c>null</c> reference.
         /// </summary>
         public PHPDocBlock PHPDoc


[PageCreator] Màj des méthodes à celles de Dynamite 2013 (signatures de méthodes différentes, etc.)

--- Source/GSoft.Dynamite/Setup/PageCreator.cs
+++ Source/GSoft.Dynamite/Setup/PageCreator.cs
@@ -1,6 +1,9 @@
 using System;
+using System.Collections.Generic;
 using System.Diagnostics.CodeAnalysis;
 using System.Linq;
+using GSoft.Dynamite.Extensions;
+using GSoft.Dynamite.Logging;
 using GSoft.Dynamite.Repositories;
 using GSoft.Dynamite.Security;
 using Microsoft.Office.DocumentManagement;
@@ -8,66 +11,123 @@
 using Microsoft.SharePoint.Publishing;

 namespace GSoft.Dynamite.Setup
-{
+{
     /// <summary>
     /// Adds pages to the Pages library
     /// </summary>
     public class PageCreator
     {
-        private FolderRepository _folderRepository;
+        private readonly FolderRepository folderRepository;
+        private readonly ILogger logger;

         /// <summary>
         /// PageCreator constructor
         /// </summary>
         /// <param name="folderRepository">Folder repository</param>
-        public PageCreator(FolderRepository folderRepository)
+        /// <param name="logger">the current logger</param>
+        public PageCreator(FolderRepository folderRepository, ILogger logger)
         {
-            this._folderRepository = folderRepository;
+            this.folderRepository = folderRepository;
+            this.logger = logger;
+        }
+
+        /// <summary>
+        /// Create publishing page in Pages Library
+        /// </summary>
+        /// <param name="web">the current web</param>
+        /// <param name="folderId">the current folder id</param>
+        /// <param name="contentTypeId">the current content type id</param>
+        /// <param name="pageLayoutName">the page layout name</param>
+        /// <param name="pageTitle">the page title</param>
+        /// <param name="pageName">the page name</param>
+        /// <returns>the created publishing page</returns>
+        public PublishingPage Create(SPWeb web, int folderId, SPContentTypeId contentTypeId, string pageLayoutName, string pageTitle, string pageName)
+        {
+            var publishingSite = new PublishingSite(web.Site);
+            var pageLayout = this.GetPageLayout(publishingSite, pageLayoutName, false);
+            var page = new PageInfo()
+            {
+                Name = pageName,
+                ContentTypeId = contentTypeId,
+                PageLayout = pageLayout,
+                Values = new List<IFieldValueInfo>()
+                {
+                    new FieldValueInfo()
+                    {
+                        FieldName = BuiltInFields.Title.InternalName,
+                        Value = pageTitle
+                    }
+                }
+            };
+
+            return this.Create(web, folderId, page);
         }

         /// <summary>
         /// Creates a page in the Pages library
         /// </summary>
-        /// <param name="currentWeb">The current web</param>
+        /// <param name="web">the current web</param>
+        /// <param name="pageInfo">the pageInfo of the page</param>
+        /// <returns>The newly created publishing page</returns>
+        public PublishingPage Create(SPWeb web, PageInfo pageInfo)
+        {
+            return this.Create(web, int.MinValue, pageInfo);
+        }
+
+        /// <summary>
+        /// Creates a page in the Pages library
+        /// </summary>
+        /// <param name="web">The current web</param>
         /// <param name="folderId">The folder in which to add the item</param>
-        /// <param name="contentTypeId">Id of Content Type to create</param>
-        /// <param name="pageLayoutName">Name (filename) of Page Layout to apply</param>
-        /// <param name="pageTitle">The human-readable title of the page</param>
-        /// <param name="pageName">The url/name of the page relative to its parent folder</param>
+        /// <param name="pageInfo">The pageInfo of the page</param>
         /// <returns>The newly created publishing page</returns>
-        public PublishingPage Create(SPWeb currentWeb, int folderId, SPContentTypeId contentTypeId, string pageLayoutName, string pageTitle, string pageName)
+        public PublishingPage Create(SPWeb web, int folderId, PageInfo pageInfo)
         {
             PublishingPage newPage = null;
+            bool userHavePermissions = false;

-            var folder = this._folderRepository.GetFolderByIdForWeb(currentWeb, folderId);
+            // get the root folder if no folder is specified
+            var folder = folderId == int.MinValue ? web.GetPagesLibrary().RootFolder : this.folderRepository.GetFolderByIdForWeb(web, folderId);

-            if (folder.Item.DoesUserHavePermissions(SPBasePermissions.AddListItems))
+            // if spfolder is root folder, check permissions at library level
+            if (folder.Item == null)
             {
-                using (new Unsafe(currentWeb))
+                userHavePermissions = folder.DocumentLibrary.DoesUserHavePermissions(SPBasePermissions.AddListItems);
+            }
+            else
+            {
+                userHavePermissions = folder.Item.DoesUserHavePermissions(SPBasePermissions.AddListItems);
+            }
+
+            if (userHavePermissions)
+            {
+                using (new Unsafe(web))
                 {
-                    SPContentType pubPageBaseContentType = currentWeb.AvailableContentTypes[ContentTypeId.ArticlePage];
+                    var requestedContentType = web.AvailableContentTypes[pageInfo.ContentTypeId];

-                    var requestedContentType = currentWeb.AvailableContentTypes[contentTypeId];
-                    if (null != requestedContentType && requestedContentType.Id.IsChildOf(pubPageBaseContentType.Id))
+                    if (requestedContentType != null)
                     {
-                        var publishingSite = new PublishingSite(currentWeb.Site);
-                        PageLayoutCollection pageLayoutsForCT = publishingSite.GetPageLayouts(requestedContentType, false);
+                        if (pageInfo.PageLayout != null)
+                        {
+                            var publishingWeb = PublishingWeb.GetPublishingWeb(web);

-                        var requestedPageLayout = pageLayoutsForCT.Cast<PageLayout>().FirstOrDefault(layout => layout.Name == pageLayoutName);
-
-                        if (requestedPageLayout != null)
-                        {
-                            PublishingWeb publishingWeb = PublishingWeb.GetPublishingWeb(currentWeb);
-
-                            if (!pageName.EndsWith(".aspx", StringComparison.OrdinalIgnoreCase))
+                            if (!pageInfo.Name.EndsWith(".aspx", StringComparison.OrdinalIgnoreCase))
                             {
-                                pageName += ".aspx";
+                                pageInfo.Name += ".aspx";
                             }

-                            newPage = publishingWeb.GetPublishingPages().Add(folder.ServerRelativeUrl + "/" + pageName, requestedPageLayout);
-                            newPage.ListItem[BuiltInFields.Title.InternalName] = pageTitle;
+                            newPage = publishingWeb.GetPublishingPages().Add(folder.ServerRelativeUrl + "/" + pageInfo.Name, pageInfo.PageLayout);
                             newPage.ListItem[BuiltInFields.ContentType.InternalName] = requestedContentType.Name;
                             newPage.ListItem[BuiltInFields.ContentTypeId.InternalName] = requestedContentType.Id;
+
+                            if (pageInfo.Values != null)
+                            {
+                                foreach (var field in pageInfo.Values)
+                                {
+                                    newPage.ListItem[field.FieldName] = field.Value;
+                                }
+                            }
+
                             newPage.ListItem.Update();
                         }
                     }
@@ -75,6 +135,18 @@
             }

             return newPage;
+        }
+
+        /// <summary>
+        /// Get the page layout
+        /// </summary>
+        /// <param name="publishingSite">the current publishing site</param>
+        /// <param name="pageLayoutName">the page layout name</param>
+        /// <param name="excludeObsolete">exclude obsolete page layout</param>
+        /// <returns>the page layout</returns>
+        public PageLayout GetPageLayout(PublishingSite publishingSite, string pageLayoutName, bool excludeObsolete)
+        {
+            return publishingSite.GetPageLayouts(excludeObsolete).Cast<PageLayout>().FirstOrDefault(pageLayout => pageLayout.Name == pageLayoutName);
         }

         /// <summary>
@@ -90,7 +162,7 @@

             if (folder.Item != null)
             {
-                MetadataDefaults metadata = new MetadataDefaults(folder.Item.ParentList);
+                var metadata = new MetadataDefaults(folder.Item.ParentList);

                 while (string.IsNullOrEmpty(contentTypeId) && folder != null)
                 {
@@ -101,17 +173,5 @@

             return contentTypeId;
         }
-
-        /// <summary>
-        /// Get the page layout
-        /// </summary>
-        /// <param name="publishingSite">the current publishing site</param>
-        /// <param name="pageLayoutName">the page layout name</param>
-        /// <param name="excludeObsolete">exclude obsolete page layout</param>
-        /// <returns>the page layout</returns>
-        public PageLayout GetPageLayout(PublishingSite publishingSite, string pageLayoutName, bool excludeObsolete)
-        {
-            return publishingSite.GetPageLayouts(excludeObsolete).FirstOrDefault(pageLayout => pageLayout.Name == pageLayoutName);
-        }
     }
-}
+}


Repaied tests

Repaied tests


Add icon for needs measure

Add icon for needs measure

--- Battery-Commander.Web/Views/ABCP/List.cshtml
+++ Battery-Commander.Web/Views/ABCP/List.cshtml
@@ -21,6 +21,14 @@
                         Failure
                     }

+
+                    @if (model.RequiresTape && !model.Measurements.Any())
+                    {
+
+                            Requires Measurement
+
+                    }
+
                 @Html.ActionLink("Details", "Details", new { model.Id })

         }


skip ryujit test on ubuntu

skip ryujit test on ubuntu

--- test/E2E/E2ETest.cs
+++ test/E2E/E2ETest.cs
@@ -55,6 +55,11 @@
         {
             // Skip this test on mac
             if(SkipForOS(OSPlatform.OSX, "https://github.com/dotnet/cli/issues/246"))
+            {
+                return;
+            }
+
+            if(SkipForOS(OSPlatform.Linux, "https://github.com/dotnet/cli/issues/527"))
             {
                 return;
             }


added more to scoreboard class

added more to scoreboard class

scoreboard class now keeps track of UI elements for the name and the
associated borders

--- SpaceAceWPF/SpaceAceWPF/MainWindow.xaml.cs
+++ SpaceAceWPF/SpaceAceWPF/MainWindow.xaml.cs
@@ -103,6 +103,30 @@
             InitializeComponent();
             App.timer.Elapsed += main_timerElapsed;

+
+            scoreboard.nameChars.Add(hs_name0);
+            scoreboard.nameChars.Add(hs_name1);
+            scoreboard.nameChars.Add(hs_name2);
+            scoreboard.nameChars.Add(hs_name3);
+            scoreboard.nameChars.Add(hs_name4);
+            scoreboard.nameChars.Add(hs_name5);
+            scoreboard.nameChars.Add(hs_name6);
+            scoreboard.nameChars.Add(hs_name7);
+            scoreboard.nameChars.Add(hs_name8);
+            scoreboard.nameChars.Add(hs_name9);
+
+            scoreboard.borders.Add(hs_border0);
+            scoreboard.borders.Add(hs_border1);
+            scoreboard.borders.Add(hs_border2);
+            scoreboard.borders.Add(hs_border3);
+            scoreboard.borders.Add(hs_border4);
+            scoreboard.borders.Add(hs_border5);
+            scoreboard.borders.Add(hs_border6);
+            scoreboard.borders.Add(hs_border7);
+            scoreboard.borders.Add(hs_border8);
+            scoreboard.borders.Add(hs_border9);
+
+
             diff = _diff;
             p1_in = P1;
             p2_in = P2;
@@ -1026,16 +1050,13 @@
         private int hs_curLetter = 0;
         private void enterHighScore(bool player1)
         {
-            TextBlock[] nameChars = { hs_name0, hs_name1, hs_name2, hs_name3, hs_name4, hs_name5, hs_name6, hs_name7, hs_name8, hs_name9 };
-            Border[] borders = { hs_border0, hs_border1, hs_border2, hs_border3, hs_border4, hs_border5, hs_border6, hs_border7, hs_border8, hs_border9 };
-
             this.hs_header.Visibility = System.Windows.Visibility.Visible;
             this.hs_leftShip.Visibility = System.Windows.Visibility.Visible;
             this.hs_rightShip.Visibility = System.Windows.Visibility.Visible;
-            foreach (TextBlock nameChar in nameChars) {
+            foreach (TextBlock nameChar in scoreboard.nameChars) {
                 nameChar.Visibility = System.Windows.Visibility.Visible;
             }
-            foreach (Border border in borders)
+            foreach (Border border in scoreboard.borders)
             {
                 border.Visibility = System.Windows.Visibility.Visible;
             }
@@ -1121,17 +1142,14 @@
                     scoreboard.addHighScore(highScoreName.Trim(), score);
                     highScoreInput = InputType.none;

-                    TextBlock[] nameChars = { hs_name0, hs_name1, hs_name2, hs_name3, hs_name4, hs_name5, hs_name6, hs_name7, hs_name8, hs_name9 };
-                    Border[] borders = { hs_border0, hs_border1, hs_border2, hs_border3, hs_border4, hs_border5, hs_border6, hs_border7, hs_border8, hs_border9 };
-
                     this.hs_header.Visibility = System.Windows.Visibility.Collapsed;
                     this.hs_leftShip.Visibility = System.Windows.Visibility.Collapsed;
                     this.hs_rightShip.Visibility = System.Windows.Visibility.Collapsed;
-                    foreach (TextBlock nameChar in nameChars)
+                    foreach (TextBlock nameChar in scoreboard.nameChars)
                     {
                         nameChar.Visibility = System.Windows.Visibility.Collapsed;
                     }
-                    foreach (Border border in borders)
+                    foreach (Border border in scoreboard.borders)
                     {
                         border.Visibility = System.Windows.Visibility.Collapsed;
                     }
@@ -1146,15 +1164,12 @@

         private void hs_updateFont(int hs_nextLetter)
         {
-            TextBlock[] nameChars = { hs_name0, hs_name1, hs_name2, hs_name3, hs_name4, hs_name5, hs_name6, hs_name7, hs_name8, hs_name9 };
-            Border[] borders = { hs_border0, hs_border1, hs_border2, hs_border3, hs_border4, hs_border5, hs_border6, hs_border7, hs_border8, hs_border9 };
-
-            nameChars[hs_curLetter].Text = hs_letters[hs_curLetter].ToString();
-            nameChars[hs_curLetter].Foreground = Brushes.White;
-            borders[hs_curLetter].BorderBrush = Brushes.White;
+            scoreboard.nameChars[hs_curLetter].Text = hs_letters[hs_curLetter].ToString();
+            scoreboard.nameChars[hs_curLetter].Foreground = Brushes.White;
+            scoreboard.borders[hs_curLetter].BorderBrush = Brushes.White;

-            nameChars[hs_nextLetter].Foreground = Brushes.Yellow;
-            borders[hs_nextLetter].BorderBrush = Brushes.Yellow;
+            scoreboard.nameChars[hs_nextLetter].Foreground = Brushes.Yellow;
+            scoreboard.borders[hs_nextLetter].BorderBrush = Brushes.Yellow;

             hs_curLetter = hs_nextLetter;
         }
@@ -1165,6 +1180,8 @@
             public long[] scores;
             private int highScoreIndex;
             private string path;
+            public List<TextBlock> nameChars;
+            public List<Border> borders;

             public Scoreboard()
             {
@@ -1174,6 +1191,8 @@
                 path = String.Format("{0}..\\..\\Assets\\scores.txt", System.AppDomain.CurrentDomain.BaseDirectory);

                 readInScoreboard();
+                nameChars = new List<TextBlock>();
+                borders = new List<Border>();
             }

             private void readInScoreboard()


feat(MultiHash): faster equality checks

feat(MultiHash): faster equality checks

--- src/MultiHash.cs
+++ src/MultiHash.cs
@@ -101,8 +101,7 @@
             if (digest == null)
                 throw new ArgumentNullException("digest");

-            HashingAlgorithm a;
-            if (!HashingAlgorithm.Names.TryGetValue(algorithmName, out a))
+            if (!HashingAlgorithm.Names.TryGetValue(algorithmName, out HashingAlgorithm a))
                 throw new ArgumentException(string.Format("The IPFS hashing algorithm '{0}' is unknown.", algorithmName));
             Algorithm = a;

@@ -347,13 +346,14 @@
             var that = obj as MultiHash;
             return (that == null)
                 ? false
-                : this.ToString() == that.ToString();
+                : this.Equals(that);
         }

         /// <inheritdoc />
         public bool Equals(MultiHash that)
         {
-            return this.ToString() == that.ToString();
+            return this.Algorithm.Code == that.Algorithm.Code
+                && this.Digest.SequenceEqual(that.Digest);
         }

         /// <summary>
@@ -362,8 +362,8 @@
         public static bool operator ==(MultiHash a, MultiHash b)
         {
             if (object.ReferenceEquals(a, b)) return true;
-            if (object.ReferenceEquals(a, null)) return false;
-            if (object.ReferenceEquals(b, null)) return false;
+            if (a is null) return false;
+            if (b is null) return false;

             return a.Equals(b);
         }
@@ -373,11 +373,7 @@
         /// </summary>
         public static bool operator !=(MultiHash a, MultiHash b)
         {
-            if (object.ReferenceEquals(a, b)) return false;
-            if (object.ReferenceEquals(a, null)) return true;
-            if (object.ReferenceEquals(b, null)) return true;
-
-            return !a.Equals(b);
+            return !(a == b);
         }

         /// <summary>


Fixed Bug: "[Bias]" now is converted to "Bias", "ID" with no name now get "Object" as name

--- SpirvSpecToJson/SpirvSpecToJson/Program.cs
+++ SpirvSpecToJson/SpirvSpecToJson/Program.cs
@@ -179,7 +179,8 @@
                             // Type: ID
                             else if (text.Contains("<id>") && !text.Contains(",") && !text.Contains("Optional"))
                             {
-                                operand["Name"] = text.GetName();
+                                // Empty name => to "Object"
+                                operand["Name"] = text.GetName() == "" ? "Object" : text.GetName();
                                 operand["Type"] = "ID";
                                 operands.Add(operand);
                             }
@@ -209,7 +210,7 @@
                             else if (text.Contains("Optional"))
                             {
                                 var a = text.GetLinkedNameAndType();
-                                operand["Name"] = a[0];
+                                operand["Name"] = a[0] == "[Bias]" ? "Bias" : a[0];
                                 operand["Type"] = "ID?";
                                 operands.Add(operand);
                             }


Fix first time startup bug where render style is not set.

--- SqlServerQueryTreeViewer/ViewerSettings.cs
+++ SqlServerQueryTreeViewer/ViewerSettings.cs
@@ -317,6 +317,11 @@
         [OnDeserialized]
         private void PostDeserialize(StreamingContext context)
         {
+            SetDefaultValues();
+        }
+
+        private void SetDefaultValues()
+        {
             if (_operatorColors == null)
             {
                 _operatorColors = new List<OperatorColor>();
@@ -346,7 +351,9 @@
             if (File.Exists(_xmlFileName) == false ||
                 _userSettingsOverwriteDecline == true)
             {
-                return new ViewerSettings();
+                ViewerSettings settings = new ViewerSettings();
+                settings.SetDefaultValues();
+                return settings;
             }

             try
@@ -379,7 +386,9 @@
                     Application.Exit();
                 }

-                return new ViewerSettings();
+                ViewerSettings settings = new ViewerSettings();
+                settings.SetDefaultValues();
+                return settings;
             }
         }


Update to v1.0.2.0

Update to v1.0.2.0

--- Src/RestLibrary/Properties/AssemblyInfo.cs
+++ Src/RestLibrary/Properties/AssemblyInfo.cs
@@ -26,5 +26,5 @@
 // You can specify all the values or you can default the Build and Revision Numbers
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.1.*")]
-[assembly: AssemblyFileVersion("1.0.1.0")]
+[assembly: AssemblyVersion("1.0.2.*")]
+[assembly: AssemblyFileVersion("1.0.2.0")]


Revert "Break it on purpose, to test travis."

This reverts commit c7f4ee2485b89794d42cde00812b60b1b6337ef6.

--- FbxSharpTests/NodeTest.cs
+++ FbxSharpTests/NodeTest.cs
@@ -26,7 +26,7 @@
             Assert.AreEqual(root, scene.GetNode(0));

             Assert.AreEqual(0, root.GetSrcObjectCount());
-            Assert.AreEqual(, root.GetDstObjectCount());
+            Assert.AreEqual(1, root.GetDstObjectCount());
             Assert.AreEqual(scene, root.GetDstObject(0));

             Assert.AreEqual(0, node2.GetSrcObjectCount());


Catch exceptions

Catch exceptions

--- FetchForumData/Program.cs
+++ FetchForumData/Program.cs
@@ -31,7 +31,15 @@

             foreach (var user in users)
             {
-                user.CalculateScores();
+                Console.WriteLine($"Processing {user.Name}");
+                try
+                {
+                    user.CalculateScores();
+                }
+                catch (Exception e)
+                {
+                    Console.WriteLine("Error: " + e);
+                }
             }

             File.WriteAllText(Path.Combine(appDataFolder, "data.json"), JsonConvert.SerializeObject(users, Formatting.Indented));


Added a timeout parameter in SmokeTest

Added a timeout parameter in SmokeTest

--- Stormancer.Monitoring.SmokeTest/Program.cs
+++ Stormancer.Monitoring.SmokeTest/Program.cs
@@ -23,6 +23,10 @@
             var tasks = new List<Task>();
             foreach (var config in fullConfig)
             {
+                if(config.Key == "timeout")
+                {
+                    continue;
+                }
                 Action<string,float> signalResult = (string id, float result) => {
                     Console.WriteLine($"output;{DateTime.UtcNow};{config.Key}.{id};{result}");
                 };
@@ -30,7 +34,7 @@

             }

-            Task.WhenAll(tasks).Wait(29000);
+            Task.WhenAll(tasks).Wait(TimeSpan.FromSeconds(fullConfig["timeout"].ToObject<float?>() ?? 29));

         }


Fixes #102 be setting the visibility of "secondSeparator" to Collapsed by default

--- Fluent/Controls/Ribbon.cs
+++ Fluent/Controls/Ribbon.cs
@@ -72,7 +72,7 @@

         #region ContextMenu

-        private static Dictionary<int, System.Windows.Controls.ContextMenu> contextMenus = new Dictionary<int, System.Windows.Controls.ContextMenu>();
+        private static readonly Dictionary<int, System.Windows.Controls.ContextMenu> contextMenus = new Dictionary<int, System.Windows.Controls.ContextMenu>();

         /// <summary>
         /// Context menu for ribbon in current thread
@@ -278,7 +278,7 @@

             // Hide customize quick access menu item
             customizeQuickAccessToolbarMenuItem.Visibility = Visibility.Collapsed;
-            secondSeparator.Visibility = Visibility.Visible;
+            secondSeparator.Visibility = Visibility.Collapsed;

             // Set minimize the ribbon menu item state
             minimizeTheRibbonMenuItem.IsChecked = ribbon.IsMinimized;


recent

recent

--- Console/FindKP.cs
+++ Console/FindKP.cs
@@ -20,7 +20,7 @@
         static Dictionary<string, int> Eg6 = new Dictionary<string, int>();
         static Dictionary<string, int> Micg6 = new Dictionary<string, int>();

-        static readonly string WinnersFile = "obvious ex two colorable singles half indep no bipartite no pendant XX " + MinVertices + " -- " + MaxVertices + " " + (MaxDegree < int.MaxValue ? "max degree " + MaxDegree + "_" : "") + "winners";
+        static readonly string WinnersFile = "obvious ex half indep no pendant bipartite (allow stretch) ZZZZ " + MinVertices + " -- " + MaxVertices + " " + (MaxDegree < int.MaxValue ? "max degree " + MaxDegree + "_" : "") + "winners";
         public static void Go()
         {
             using (var swbest = new StreamWriter(WinnersFile + ".best.txt"))
@@ -42,11 +42,11 @@
                     var skipCount = 0;
                     foreach (var g in graphIO.EnumerateGraph6File(null, EnumerateEdgeSubsets))
                     {
-                        if (MaxDegree < int.MaxValue && g.MaxDegree > MaxDegree)
-                        {
-                            ReportSkip("D", ref skipCount, ref lastSkip);
-                            continue;
-                        }
+                        //if (MaxDegree < int.MaxValue && g.MaxDegree > MaxDegree)
+                        //{
+                        //    ReportSkip("D", ref skipCount, ref lastSkip);
+                        //    continue;
+                        //}

                         //if (g.IsCliqueNumberAtLeast(3))
                         //{
@@ -60,23 +60,23 @@
                             continue;
                         }

-                        if (!g.IsTwoColorable(g.EdgeWeightsWithMultiplicity, 1))
-                        {
-                            ReportSkip("B", ref skipCount, ref lastSkip);
-                            continue;
-                        }
-
-                        if (g.HasMonochromaticOddHoleOrCliqueCycle(g.EdgeWeightsWithMultiplicity, 1))
-                        {
-                            ReportSkip("Z", ref skipCount, ref lastSkip);
-                            continue;
-                        }
-
-                        if (!AllCyclesHaveFullIndependentset(g))
-                        {
-                            ReportSkip("H", ref skipCount, ref lastSkip);
-                            continue;
-                        }
+                        //if (!g.IsTwoColorable(g.EdgeWeightsWithMultiplicity, 1))
+                        //{
+                        //    ReportSkip("B", ref skipCount, ref lastSkip);
+                        //    continue;
+                        //}
+
+                        //if (g.HasMonochromaticOddHoleOrCliqueCycle(g.EdgeWeightsWithMultiplicity, 1))
+                        //{
+                        //    ReportSkip("Z", ref skipCount, ref lastSkip);
+                        //    continue;
+                        //}
+
+                        //if (!AllCyclesHaveFullIndependentset(g))
+                        //{
+                        //    ReportSkip("H", ref skipCount, ref lastSkip);
+                        //    continue;
+                        //}

                         if (!AllHamiltonHaversHaveFullIndependentset(g))
                         {
@@ -115,10 +115,10 @@

                         if (badOrientation != null)
                         {
-                            var c1 = g.SubgraphOfEdgeColor(g.EdgeWeightsWithMultiplicity, 1);
-                            var twos = badSubgraph.Where(v => g.DegreeInSubgraphUnsorted(v, badSubgraph) == 2 && c1.DegreeInSubgraphUnsorted(v, badSubgraph) == 2).ToList();
-                            if (!c1.IsIndependent(twos))
-                                continue;
+                            //var c1 = g.SubgraphOfEdgeColor(g.EdgeWeightsWithMultiplicity, 1);
+                            //var twos = badSubgraph.Where(v => g.DegreeInSubgraphUnsorted(v, badSubgraph) == 2 && c1.DegreeInSubgraphUnsorted(v, badSubgraph) == 2).ToList();
+                            //if (!c1.IsIndependent(twos))
+                            //    continue;

                             var w = new List<int>();
                             int k = 0;


A particles manager is needed, of course

--- Core/Game/Game.cs
+++ Core/Game/Game.cs
@@ -9,12 +9,12 @@

 public class Game : MonoBehaviour
 {
-    // ~
+    // ^
     // Important default data.
     public static float defaultOrthographicSize = 0;

-    // ~
+    // ^
     // Tag.Player
     private static Transform _player;
     public static Transform player
@@ -32,7 +32,19 @@
     }

-    // ~
+    // ^
+    private static Main _main;
+    public static Main main
+    {
+        get
+        {
+            if (_main == null) _main = GameObject.FindObjectOfType<Main>();
+            return _main;
+        }
+    }
+
+
+    // ^
     private static Camera2D _camera2d;
     public static Camera2D camera2D
     {
@@ -44,7 +56,7 @@
     }

-    // ~
+    // ^
     private static Whitescreen _whitescreen;
     public static Whitescreen whitescreen
     {
@@ -56,7 +68,7 @@
     }

-    // ~
+    // ^
     private static Sounds _sounds;
     public static Sounds sounds
     {
@@ -68,7 +80,7 @@
     }

-    // ~
+    // ^
     private static Palette _palette;
     public static Palette palette
     {
@@ -80,7 +92,7 @@
     }

-    // ~
+    // ^
     private static Statistics _statistics;
     public static Statistics statistics
     {
@@ -92,7 +104,7 @@
     }

-    // ~
+    // ^
     private static Timeflux _timeflux;
     public static Timeflux timeflux
     {
@@ -102,4 +114,16 @@
             return _timeflux;
         }
     }
+
+
+    // ^
+    private static Particles _particles;
+    public static Particles particles
+    {
+        get
+        {
+            if (_particles == null) _particles = GameObject.FindObjectOfType<Particles>();
+            return _particles;
+        }
+    }
 }


disabled details parsing

disabled details parsing

--- TCC.UI/Parsing/Messages/S_GET_USER_LIST.cs
+++ TCC.UI/Parsing/Messages/S_GET_USER_LIST.cs
@@ -126,19 +126,19 @@
                 c.guildId = reader.ReadInt32();
                 c.name = reader.ReadTeraString();

-                c.details = new byte[c.detailsCount];
-                for (int j = 0; j < c.detailsCount; j++)
-                {
-                    c.details[j] = reader.ReadByte();
-                }
-
-                c.details2 = new byte[c.details2count];
-                for (int k = 0; k < c.details2count; k++)
-                {
-                    c.details2[k] = reader.ReadByte();
-                }
-
-                c.guild = reader.ReadTeraString();
+                //c.details = new byte[c.detailsCount];
+                //for (int j = 0; j < c.detailsCount; j++)
+                //{
+                //    c.details[j] = reader.ReadByte();
+                //}
+
+                //c.details2 = new byte[c.details2count];
+                //for (int k = 0; k < c.details2count; k++)
+                //{
+                //    c.details2[k] = reader.ReadByte();
+                //}
+
+                //c.guild = reader.ReadTeraString();

                 CharacterList.Add(new Character(c.name, (Class)c.charClass, (Laurel)c.laurel));
                 RawCharacters.Add(c);


Fix component tests

Fix component tests

--- test/Duracellko.PlanningPoker.Client.Test/Components/PlanningPokerDeskTest.cs
+++ test/Duracellko.PlanningPoker.Client.Test/Components/PlanningPokerDeskTest.cs
@@ -35,10 +35,10 @@
             Assert.AreEqual(1, renderer.Batches.Count);
             var frames = renderer.Batches[0].ReferenceFrames;
             Assert.IsNotNull(frames);
-            Assert.AreEqual(425, frames.Count);
+            Assert.AreEqual(426, frames.Count);

             // Team name and user name
-            AssertFrame.Element(frames[0], "div", 425);
+            AssertFrame.Element(frames[0], "div", 426);
             AssertFrame.Attribute(frames[1], "class", "pokerDeskPanel");
             AssertFrame.Element(frames[400], "div", 11);
             AssertFrame.Attribute(frames[401], "class", "team-title");
@@ -52,9 +52,9 @@
             AssertFrame.Text(frames[410], PlanningPokerData.ScrumMasterName);

             // Button to start estimation
-            AssertFrame.Element(frames[411], "div", 14);
+            AssertFrame.Element(frames[411], "div", 15);
             AssertFrame.Attribute(frames[412], "class", "actionsBar");
-            AssertFrame.Element(frames[413], "p", 12);
+            AssertFrame.Element(frames[413], "p", 13);
             AssertFrame.Element(frames[414], "button", 5);
             AssertFrame.Attribute(frames[415], "type", "button");
             AssertFrame.Attribute(frames[416], "onclick");
@@ -85,10 +85,10 @@
             Assert.AreEqual(1, renderer.Batches.Count);
             var frames = renderer.Batches[0].ReferenceFrames;
             Assert.IsNotNull(frames);
-            Assert.AreEqual(488, frames.Count);
+            Assert.AreEqual(489, frames.Count);

             // Team name and user name
-            AssertFrame.Element(frames[0], "div", 488);
+            AssertFrame.Element(frames[0], "div", 489);
             AssertFrame.Attribute(frames[1], "class", "pokerDeskPanel");
             AssertFrame.Element(frames[400], "div", 11);
             AssertFrame.Attribute(frames[401], "class", "team-title");
@@ -121,11 +121,11 @@
             AssertAvailableEstimation(frames, 463, "?");

             // Members, who estimated already
-            AssertFrame.Element(frames[476], "div", 12);
-            AssertFrame.Attribute(frames[477], "class", "estimationResult");
-            AssertFrame.Markup(frames[478], $"
Selected estimates
");
-            AssertFrame.Element(frames[479], "ul", 9);
-            AssertSelectedEstimation(frames, 480, PlanningPokerData.ScrumMasterName, string.Empty);
+            AssertFrame.Element(frames[477], "div", 12);
+            AssertFrame.Attribute(frames[478], "class", "estimationResult");
+            AssertFrame.Markup(frames[479], $"
Selected estimates
");
+            AssertFrame.Element(frames[480], "ul", 9);
+            AssertSelectedEstimation(frames, 481, PlanningPokerData.ScrumMasterName, string.Empty);
         }

         [TestMethod]


fix(UI TESTS): Fixed groups admin ui tests

--- test/StockportWebappTests_UI/StepDefinitions/GroupsArticleNotLoggedInSteps.cs
+++ test/StockportWebappTests_UI/StepDefinitions/GroupsArticleNotLoggedInSteps.cs
@@ -17,7 +17,7 @@
             switch (sectionName)
             {
                 case "Add to favourites":
-                    result = BrowserSession.FindId("add-favourite").Exists();
+                    result = BrowserSession.FindAllCss(".add-favourite").Any();
                     break;
                 case "Report this page as inappropriate":
                     result = BrowserSession.FindId("report-page").Exists();


Change constructor accessor.

Change constructor accessor.

--- Freesia/FilterCompiler.cs
+++ Freesia/FilterCompiler.cs
@@ -30,7 +30,11 @@
         }

         public static string UserFunctionNamespace { get; set; }
-
+
+        internal FilterCompiler()
+        {
+        }
+
         private ASTNode Tokenize(string text)
         {
             var tokenizer = new Tokenizer(text);


Source is Registration CyberSource in sloth

--- CRP.Mvc/Controllers/TransactionController.cs
+++ CRP.Mvc/Controllers/TransactionController.cs
@@ -14,6 +14,7 @@
 using CRP.Mvc.Resources;
 using CRP.Mvc.Services;
 using MvcContrib;
+using Newtonsoft.Json;
 using UCDArch.Web.ActionResults;
 using UCDArch.Web.Attributes;
 using UCDArch.Web.Helpers;
@@ -32,6 +33,11 @@
             _slothService = slothService;
         }

+        /// <summary>
+        /// Tested 20200527
+        /// </summary>
+        /// <param name="id"></param>
+        /// <returns></returns>
         public ActionResult Details(int id)
         {
             var transaction = Repository.OfType<Transaction>().GetNullableById(id);
@@ -791,9 +797,12 @@
                     feeCredit,
                     incomeCredit,
                 },
-                Source                 = "Registration",
+                Source                 = "Registration CyberSource",
                 SourceType             = "CyberSource",
+                ProcessorTrackingNumber = paymentLog.GatewayTransactionId,
             };
+
+            //var getIt = JsonConvert.SerializeObject(request); //Debug it so can test in swagger

             var response = await _slothService.CreateTransaction(request);


dump picking  canvas

dump picking  canvas

--- CSharpGL/Scene/Algorithms/Picking/Picking.cs
+++ CSharpGL/Scene/Algorithms/Picking/Picking.cs
@@ -66,6 +66,18 @@

                 var arg = new PickingEventArgs(this.Scene, x, y, geometryTypes);
                 this.RenderForPicking(this.Scene.RootNode, arg);
+
+                bool dump = false;
+                if (dump)
+                {
+                    var final = new Bitmap(width, height);
+                    var data = final.LockBits(new Rectangle(0, 0, width, height), System.Drawing.Imaging.ImageLockMode.ReadWrite, System.Drawing.Imaging.PixelFormat.Format32bppArgb);
+                    //glGetTexImage((uint)texture.Target, 0, GL_BGRA, GL_UNSIGNED_BYTE, data.Scan0);
+                    GL.Instance.ReadPixels(0, 0, width, height, GL.GL_BGRA, GL.GL_UNSIGNED_BYTE, data.Scan0);
+                    final.UnlockBits(data);
+                    final.RotateFlip(RotateFlipType.Rotate180FlipX);
+                    final.Save(string.Format("picking.dump.png"));
+                }

                 uint stageVertexId = ColorCodedPicking.ReadStageVertexId(x, y);


Revert

Revert

--- src/MiningCore/Api/ApiServer.cs
+++ src/MiningCore/Api/ApiServer.cs
@@ -241,7 +241,7 @@
                 var multiplier = hashRate / maxHashrate;

                 foreach (var stat in response.Stats)
-                    stat.PoolHashRate = (float) Math.Ceiling(stat.PoolHashRate * multiplier);
+                    stat.PoolHashRate = stat.PoolHashRate * multiplier;

                 response.HashrateUnit = FormatUtil.HashRateUnits[i].Trim();
             }


`GetCallInfo` helper method is now redundant

The information previously returned is already available in the
`LambdaExpressionPart` structures returned by `Split`.

--- src/Moq/ExpressionExtensions.cs
+++ src/Moq/ExpressionExtensions.cs
@@ -353,59 +353,5 @@
 		{
 			return new ExpressionStringBuilder().Append(expression).ToString();
 		}
-
-		/// <summary>
-		/// Extracts, into a common form, information from a <see cref="LambdaExpression" />
-		/// around either a <see cref="MethodCallExpression" /> (for a normal method call)
-		/// or a <see cref="InvocationExpression" /> (for a delegate invocation).
-		/// </summary>
-		internal static CallInfo GetCallInfo(this LambdaExpression expression, Mock mock)
-		{
-			Guard.NotNull(expression, nameof(expression));
-
-			if (mock.IsDelegateMock)
-			{
-				// We're a mock for a delegate, so this call can only
-				// possibly be the result of invoking the delegate.
-				var invocation = (InvocationExpression)expression.Body;
-
-				// But the expression we have is for a call on the delegate, not our
-				// delegate interface proxy, so we need to map instead to the
-				// method on that interface, which is the property we've just tested for.
-				_ = ProxyFactory.Instance.GetDelegateProxyInterface(mock.TargetType, out var delegateInterfaceMethod);
-				return new CallInfo(invocation.Expression, delegateInterfaceMethod, invocation.Arguments);
-			}
-
-			if (expression.Body is MethodCallExpression methodCall)
-			{
-				return new CallInfo(methodCall.Object, methodCall.Method, methodCall.Arguments);
-			}
-
-			throw new ArgumentException(string.Format(
-				CultureInfo.CurrentCulture,
-				Resources.SetupNotMethod,
-				expression.ToStringFixed()));
-		}
-	}
-
-	internal readonly struct CallInfo
-	{
-		private readonly Expression expression;
-		private readonly MethodInfo method;
-		private readonly IReadOnlyList<Expression> arguments;
-
-		public CallInfo(Expression expression, MethodInfo method, IReadOnlyList<Expression> arguments)
-		{
-			this.expression = expression;
-			this.method = method;
-			this.arguments = arguments;
-		}
-
-		public void Deconstruct(out Expression expression, out MethodInfo method, out IReadOnlyList<Expression> arguments)
-		{
-			expression = this.expression;
-			method = this.method;
-			arguments = this.arguments;
-		}
 	}
 }


Fix tests

Fix tests

--- Uploadcare.Tests/Clients/FileClientTest.cs
+++ Uploadcare.Tests/Clients/FileClientTest.cs
@@ -192,14 +192,28 @@
         public async Task client_detect_faces()
         {
             var client = new UploadcareClient("e8e49b932d98e53748a3", "899a21a3aee6a7800859");
+            var file = new FileInfo("2.jpg");
+
+            var uploader = new FileUploader(client);
+            var uploadedFileInfo = await uploader.Upload(file, false);
+
+            var faces = await client.FaceDetection.DetectFaces(uploadedFileInfo.Uuid);
+
+            Assert.NotEmpty(faces);
+        }
+
+        [Fact]
+        public async Task client_detect_no_faces()
+        {
+            var client = new UploadcareClient("e8e49b932d98e53748a3", "899a21a3aee6a7800859");
             var file = new FileInfo("0.jpg");

-            var uploader = new UrlUploader(client);
-            var uploadedFileInfo = await uploader.Upload("https://picsb.meshok.net/pics2/213351457.jpg", false);
+            var uploader = new FileUploader(client);
+            var uploadedFileInfo = await uploader.Upload(file, false);

             var faces = await client.FaceDetection.DetectFaces(uploadedFileInfo.Uuid);

-            Assert.NotEmpty(faces);
+            Assert.Empty(faces);
         }
     }
 }


* Added DeleteMin

* Added DeleteMin

--- Utils/DataStructures/Heap/FibonacciHeap.cs
+++ Utils/DataStructures/Heap/FibonacciHeap.cs
@@ -1,6 +1,7 @@
 using System;
 using System.Collections.Generic;
 using System.Diagnostics;
+using System.Linq;
 using System.Runtime.CompilerServices;
 using Utils.DataStructures.Internal;
 using Utils.DataStructures.Nodes;
@@ -154,7 +155,48 @@
             if (Count == 0)
                 return;

-            Delete(MinNode);
+            var min = MinNode;
+
+
+            // Cut the minimum from roots (preserves children)
+            MinNode.CutFromFamily();
+            Count--;
+            MinNode = null;
+
+
+            // Make min's children into roots
+            if (min.FirstChild != null)
+            {
+                HeapNode children = (HeapNode)min.FirstChild;
+                min.FirstChild = null;
+
+                if (children != null)
+                {
+                    children.Parent = null;
+                    Consolidate(children);
+                }
+            }
+
+            if (Count == 0)
+                return;
+
+
+            // Find the new minimum
+            // Consolidation does not neccessarily keep the roots
+            // interlinked correctly -- we need to go through the array
+            var roots = _roots.Where(r => r != null);
+            FirstRoot = roots.First();
+            HeapNode lastRoot = null;
+
+            MinNode = roots.Aggregate((first, second) =>
+            {
+                lastRoot = second;
+                first.RightSibling = second;
+                int comp = Comparer.Compare(first.Key, second.Key);
+                return comp <= 0 ? first : second;
+            });
+
+            lastRoot.RightSibling = FirstRoot;
         }

         public override void Delete(NodeItem<TKey, TValue> node)


Simplified nuspec lookup rules for source packages - this way the default pack target of a csproj will also work

--- VVVV.NuGetAssemblyLoader/AssemblyLoader.cs
+++ VVVV.NuGetAssemblyLoader/AssemblyLoader.cs
@@ -125,7 +125,7 @@
                     {
                         _builder = new PackageBuilder(path, NullPropertyProvider.Instance, false);
                     }
-                    catch (Exception e) when (e is FileNotFoundException || e is DirectoryNotFoundException)
+                    catch (Exception e)
                     {
                         // Create a dummy
                         _builder = new PackageBuilder();
@@ -569,10 +569,9 @@
                     {
                         // VL.CoreLib/src/bin/$(Configuration)/$(TFM)/VL.CoreLib.nuspec
                         // VL.CoreLib/bin/$(Configuration)/$(TFM)/VL.CoreLib.nuspec
-                        var nuspecFiles = _fileSystem.GetDirectories(Path.Combine(dir, "src", "bin"))
-                            .Concat(_fileSystem.GetDirectories(Path.Combine(dir, "bin")))
-                            .SelectMany(d => _fileSystem.GetDirectories(d))
-                            .SelectMany(d => _fileSystem.GetFiles(d, $"{dir}{Constants.ManifestExtension}"))
+                        // VL.CoreLib/src/obj/$(Configuration)/VL.CoreLib.VERSION.nuspec
+                        // VL.CoreLib/obj/$(Configuration)/VL.CoreLib.VERSION.nuspec
+                        var nuspecFiles = _fileSystem.GetFiles(dir, $"{dir}*{Constants.ManifestExtension}", recursive: true)
                             .Select(f => new { File = f, Modified = File.GetLastWriteTime(_fileSystem.GetFullPath(f)) })
                             .OrderByDescending(f => f.Modified);
                         foreach (var nuspecFile in nuspecFiles)
@@ -585,7 +584,7 @@
                     if (!hasNuspec)
                     {
                         // VL.CoreLib/VL.CoreLib.nusepc
-                        foreach (var nuspecFile in _fileSystem.GetFiles(dir, $"{dir}{Constants.ManifestExtension}"))
+                        foreach (var nuspecFile in _fileSystem.GetFiles(dir, $"{dir}*{Constants.ManifestExtension}"))
                         {
                             hasNuspec = true;
                             yield return new SrcPackageWithNuspec(_fileSystem, dir, nuspecFile);


Do not crash on bad json, log instead

Do not crash on bad json, log instead

--- Winium/Winium.StoreApps.Driver/Listener.cs
+++ Winium/Winium.StoreApps.Driver/Listener.cs
@@ -161,14 +161,22 @@
             }

             var commandName = matched.Data.ToString();
-            var commandToExecute = new Command(commandName, acceptedRequest.MessageBody);
-            foreach (string variableName in matched.BoundVariables.Keys)
+            try
             {
-                commandToExecute.Parameters[variableName] = matched.BoundVariables[variableName];
+                var commandToExecute = new Command(commandName, acceptedRequest.MessageBody);
+                foreach (string variableName in matched.BoundVariables.Keys)
+                {
+                    commandToExecute.Parameters[variableName] = matched.BoundVariables[variableName];
+                }
+
+                var commandResponse = this.ProcessCommand(commandToExecute);
+                return HttpResponseHelper.ResponseString(commandResponse.HttpStatusCode, commandResponse.Content);
             }
-
-            var commandResponse = this.ProcessCommand(commandToExecute);
-            return HttpResponseHelper.ResponseString(commandResponse.HttpStatusCode, commandResponse.Content);
+            catch (Newtonsoft.Json.JsonReaderException exception)
+            {
+                Logger.Error("{0}\r\nRAW REQUEST BODY:\r\n{1}", exception.ToString(), acceptedRequest.MessageBody);
+                return HttpResponseHelper.ResponseString(HttpStatusCode.BadRequest, exception.ToString());
+            }
         }

         private CommandResponse ProcessCommand(Command command)


svn conversion exace

 svn conversion
exace

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


Added custom IKVM assembly resolver support to managed assembly parser.

--- binder/Parser.cs
+++ binder/Parser.cs
@@ -64,11 +64,44 @@

         public ParsedDelegate<IKVM.Reflection.Assembly> OnAssemblyParsed = delegate { };

+        public bool AllowMissingAssembly;
+
+        List<string> AssemblyResolveDirs;
+
         IKVM.Reflection.Universe Universe;

         public Parser()
         {
+            AssemblyResolveDirs = new List<string>();
             Universe = new IKVM.Reflection.Universe(IKVM.Reflection.UniverseOptions.MetadataOnly);
+            Universe.AssemblyResolve += AssemblyResolve;
+        }
+
+        public void AddAssemblyResolveDirectory(string dir)
+        {
+            AssemblyResolveDirs.Add(dir);
+        }
+
+        IKVM.Reflection.Assembly AssemblyResolve (object sender, IKVM.Reflection.ResolveEventArgs args)
+        {
+            var universe = ((IKVM.Reflection.Universe)sender);
+            var assemblyName = args.Name;
+
+            var assembly = universe.DefaultResolver(assemblyName, throwOnError: false);
+            if (assembly != null)
+                return assembly;
+
+            foreach (var dir in AssemblyResolveDirs)
+            {
+                var assemblyPath = Path.Combine(dir, assemblyName);
+
+                if (!File.Exists(assemblyPath))
+                    continue;
+
+                return universe.LoadFile(assemblyPath);
+            }
+
+            return AllowMissingAssembly ? universe.CreateMissingAssembly(assemblyName) : null;
         }

         public void ParseAssembly(ProjectInput input, ParserResult<IKVM.Reflection.Assembly> result)


Fix XmlRpcMethodCall.ParseCallXml

Fix XmlRpcMethodCall.ParseCallXml

--- XmlRpc/Methods/XmlRpcMethodCall-0Params.cs
+++ XmlRpc/Methods/XmlRpcMethodCall-0Params.cs
@@ -89,9 +89,17 @@
         {
             if (!xElement.Name.LocalName.Equals(XmlRpcElements.MethodCallElement)
              || !xElement.HasElements
-             || xElement.Elements().Count() != 1)
-                return false;
-
+             || xElement.Elements().Count() != 2)
+                return false;
+
+            XElement methodNameElement = xElement.Elements().First();
+
+            if (!methodNameElement.Name.LocalName.Equals(XmlRpcElements.MethodNameElement)
+             || methodNameElement.IsEmpty
+             || !methodNameElement.Value.Equals(MethodName))
+                return false;
+
+            methodNameElement.Remove();
             XElement paramsElement = xElement.Elements().First();

             if (!paramsElement.Name.LocalName.Equals(XmlRpcElements.ParamsElement))


Adding help for unknown

Adding help for unknown

--- Chauffeur/Deliverables/UnknownDeliverable.cs
+++ Chauffeur/Deliverables/UnknownDeliverable.cs
@@ -6,7 +6,7 @@
 namespace Chauffeur.Deliverables
 {
     [DeliverableName("unknown")]
-    public sealed class UnknownDeliverable : Deliverable
+    public sealed class UnknownDeliverable : Deliverable, IProvideDirections
     {
         public UnknownDeliverable(TextReader reader, TextWriter writer)
             : base(reader, writer)
@@ -18,5 +18,10 @@
             await Out.WriteLineFormattedAsync("Unknown command '{0}' entered, check `help` for available commands", string.Join(" ", new[] { command }.Concat(args)));
             return await base.Run(command, args);
         }
+
+        public async Task Directions()
+        {
+            await Out.WriteLineAsync("Seriously, you're asking for help on the unknown command? Good luck with that");
+        }
     }
 }


Maintain whitespaces of the code in the generated coverage report

--- Chutzpah/Coverage/CoverageOutputGenerator.cs
+++ Chutzpah/Coverage/CoverageOutputGenerator.cs
@@ -210,7 +210,7 @@

 .chutzpah-source div
 {
-  white-space:nowrap;
+  white-space:pre;
 }

 .chutzpah-source span


Removes extra Sound from slippery component (#8841)

--- Content.Shared/Slippery/SlipperyComponent.cs
+++ Content.Shared/Slippery/SlipperyComponent.cs
@@ -1,5 +1,3 @@
-using System.Linq;
-using Content.Shared.Sound;
 using Content.Shared.Sound;
 using Content.Shared.StepTrigger;
 using Robust.Shared.GameStates;


Incremented assembly version.

Incremented assembly version.

--- Daishi.SQLBuilder/Properties/AssemblyInfo.cs
+++ Daishi.SQLBuilder/Properties/AssemblyInfo.cs
@@ -39,5 +39,5 @@
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]

-[assembly: AssemblyVersion("1.1.0.1")]
-[assembly: AssemblyFileVersion("1.1.0.1")]+[assembly: AssemblyVersion("1.2.0.0")]
+[assembly: AssemblyFileVersion("1.2.0.0")]


Brstm: Slightly change method when determining seek table type

--- DspAdpcm/DspAdpcm.Lib/Adpcm/Formats/Brstm.cs
+++ DspAdpcm/DspAdpcm.Lib/Adpcm/Formats/Brstm.cs
@@ -66,7 +66,7 @@

         private int DataChunkOffset => RstmHeaderLength + HeadChunkLength + AdpcChunkLength;
         private int DataChunkLength => GetNextMultiple(0x20 + (InterleaveCount - (LastBlockSamples == 0 ? 0 : 1)) * InterleaveSize * NumChannels + LastBlockSize * NumChannels, 0x20);
-
+
         /// <summary>
         /// The size in bytes of the BRSTM file.
         /// </summary>
@@ -546,14 +546,15 @@
             int bytesPerEntry = 4 * structure.NumChannelsChunk1;
             int numAdpcEntriesShortened = (GetBytesForAdpcmSamples(structure.NumSamples) / structure.SamplesPerAdpcEntry) + 1;
             int numAdpcEntriesStandard = (structure.NumSamples / structure.SamplesPerAdpcEntry) + (fullLastAdpcEntry ? 0 : 1);
-
-            //Chunk pads to 0x20 bytes and has 8 header bytes, so check if the length's within that range.
-            if (Math.Abs(structure.AdpcChunkLength - bytesPerEntry * numAdpcEntriesStandard - 0x14) < 0x14)
+            int expectedLengthShortened = GetNextMultiple(8 + numAdpcEntriesShortened * bytesPerEntry, 0x20);
+            int expectedLengthStandard = GetNextMultiple(8 + numAdpcEntriesStandard * bytesPerEntry, 0x20);
+
+            if (structure.AdpcChunkLength == expectedLengthStandard)
             {
                 structure.AdpcTableLength = bytesPerEntry * numAdpcEntriesStandard;
                 structure.SeekTableType = SeekTableType.Standard;
             }
-            else if (Math.Abs(structure.AdpcChunkLength - bytesPerEntry * numAdpcEntriesShortened - 0x14) < 0x14)
+            else if (structure.AdpcChunkLength == expectedLengthShortened)
             {
                 structure.AdpcTableLength = bytesPerEntry * numAdpcEntriesShortened;
                 structure.SeekTableType = SeekTableType.Short;


Default timestamps in UTC

Default timestamps in UTC

--- Duplicati/Library/Main/Volumes/VolumeBase.cs
+++ Duplicati/Library/Main/Volumes/VolumeBase.cs
@@ -97,7 +97,7 @@
                     Prefix = m.Groups["prefix"].Value,
                     FileType = t,
                     Guid = m.Groups["guid"].Success ? m.Groups["guid"].Value : null,
-                    Time = m.Groups["time"].Success ? DateTime.ParseExact(m.Groups["time"].Value, "yyyyMMdd'T'HHmmssK", null, System.Globalization.DateTimeStyles.AssumeUniversal).ToUniversalTime() : new DateTime(0, DateTimeKind.Local),
+                    Time = m.Groups["time"].Success ? DateTime.ParseExact(m.Groups["time"].Value, "yyyyMMdd'T'HHmmssK", null, System.Globalization.DateTimeStyles.AssumeUniversal).ToUniversalTime() : new DateTime(0, DateTimeKind.Utc),
                     CompressionModule = m.Groups["compression"].Value,
                     EncryptionModule = m.Groups["encryption"].Success ? m.Groups["encryption"].Value : null,
                     File = file