LightUtils: +SetHueGradient

LightUtils: +SetHueGradient

--- projects/RagingBool.Carcosa.Core_cs/Stage/Scenes/LightUtils.cs
+++ projects/RagingBool.Carcosa.Core_cs/Stage/Scenes/LightUtils.cs
@@ -16,14 +16,28 @@
 // For more information check https://github.com/RagingBool/RagingBool.Carcosa
 // ]]]]

-using RagingBool.Carcosa.Core.Stage.Controller;
 using RagingBool.Carcosa.Core.Stage.Lights;
 using System;
+using System.Collections.Generic;

 namespace RagingBool.Carcosa.Core.Stage.Scenes
 {
     internal static class LightUtils
     {
+        public static void SetHueGradient(IList<IRgbLight> lights, double midHue, double hueOpening, double saturation, double intensity)
+        {
+            var maxOpening = 0.5;
+            var deltaHue = hueOpening / 2 * maxOpening;
+            var hue1 = midHue - deltaHue;
+            var hue2 = midHue + deltaHue;
+
+            var hueStep = (hue2 - hue1) / (lights.Count - 1);
+            for (int i = 0; i < lights.Count; i++)
+            {
+                LightUtils.SetRgbLightToHsi(lights[i], hue1 + hueStep * i, saturation, intensity);
+            }
+        }
+
         public static void SetRgbLightToHsi(IRgbLight rgbLight, double hue, double saturation, double intensity)
         {
             // Based on a post by Brian Neltner: http://blog.saikoled.com/post/43693602826/why-every-led-light-should-be-using-hsi


Fix cref attribute in XML comment

Fix cref attribute in XML comment

--- src/Abp.Zero.NHibernate/Zero/NHibernate/EntityMappings/AbpTenantMap.cs
+++ src/Abp.Zero.NHibernate/Zero/NHibernate/EntityMappings/AbpTenantMap.cs
@@ -5,7 +5,7 @@
 namespace Abp.Zero.NHibernate.EntityMappings
 {
     /// <summary>
-    /// Base class to map classes derived from <see cref="AbpTenant{TTenant,TUser}"/>
+    /// Base class to map classes derived from <see cref="AbpTenant{TUser}"/>
     /// </summary>
     /// <typeparam name="TTenant">Tenant type</typeparam>
     /// <typeparam name="TUser">User type</typeparam>


can now change profile picture with same name

Signed-off-by: Dejack <d1a607c7d3ff9429a3eb9ece9505bef7ef3d48f2@gmail.com>

--- JabberBCIT/JabberBCIT/Controllers/ManageController.cs
+++ JabberBCIT/JabberBCIT/Controllers/ManageController.cs
@@ -140,7 +140,7 @@
                 edit.ProfilePicture = UploadImage(file);
             }
             // see if there is another person with the same name
-            if (database.Users.Where(u => u.UserName == edit.UserName).ToList().Any())
+            if (database.Users.Where(u => u.UserName == edit.UserName).ToList().Any() && !(user.UserName == edit.UserName))
             {
                 return RedirectToAction("Edit", "Manage", new { Message = ManageMessageId.UsernameError });
             }


cleaning test console

cleaning test console


Improve GetTypesWithBotAttribute method

Improve GetTypesWithBotAttribute method

--- project/OsEngine/Robots/BotFactory.cs
+++ project/OsEngine/Robots/BotFactory.cs
@@ -27,8 +27,7 @@
 {
     public class BotFactory
     {
-        private static readonly Dictionary<string, Type> BotsWithAttribute
-            = GetTypesWithBotAttribute(Assembly.GetAssembly(typeof(BotPanel)));
+        private static readonly Dictionary<string, Type> BotsWithAttribute = GetTypesWithBotAttribute();

         /// <summary>
         /// list robots name /
@@ -267,7 +266,9 @@
             return bot;
         }

-        static Dictionary<string, Type> GetTypesWithBotAttribute(Assembly assembly) {
+        static Dictionary<string, Type> GetTypesWithBotAttribute()
+        {
+            Assembly assembly = Assembly.GetAssembly(typeof(BotPanel));
             Dictionary<string, Type> bots = new Dictionary<string, Type>();
             foreach(Type type in assembly.GetTypes())
             {
@@ -282,7 +283,6 @@
         }

         // Scripts
-
         public static List<string> GetScriptsNamesStrategy()
         {
             if (Directory.Exists(@"Custom") == false)


Optimized BubbleSort

Optimized BubbleSort

--- JamLib/Algorithms/Sorting/ExchangeSorts/BubbleSort.cs
+++ JamLib/Algorithms/Sorting/ExchangeSorts/BubbleSort.cs
@@ -8,14 +8,14 @@
         public static void Sort<T>(IList<T> data) { Sort(data, Comparer<T>.Default); }
         public static void Sort<T>(IList<T> data, IComparer<T> comparer)
         {
-            // NOTE: Run this atleast once, could use a do while instead
+            int length = data.Count;
             bool swapped = true;
             while (swapped)
             {
                 // Reset Swap Status
                 swapped = false;

-                for (int i = 1; i < data.Count; i++)
+                for (int i = 1; i < length; i++)
                 {
                     // if this pair is out of order, swap them and remember something changed
                     if (comparer.Compare(data[i - 1], data[i]) > 0)
@@ -24,6 +24,9 @@
                         swapped = true;
                     }
                 }
+
+                // NOTE: Optimization, since each pass trough the array the last element is always in it's final place. We no longer need to check it.
+                length--;
             }
         }


#1277 fixed bad drop PK statement

#1277 fixed bad drop PK statement


con-2567-build issue

con-2567-build issue

--- src/CommitmentsV2/SFA.DAS.CommitmentsV2/Models/ChangeOfPartyRequest.cs
+++ src/CommitmentsV2/SFA.DAS.CommitmentsV2/Models/ChangeOfPartyRequest.cs
@@ -56,9 +56,9 @@
             OriginatingParty = originatingParty;
             AccountLegalEntityId = changeOfPartyType == ChangeOfPartyRequestType.ChangeEmployer ? newPartyId : default(long?);
             ProviderId = changeOfPartyType == ChangeOfPartyRequestType.ChangeProvider ? newPartyId : default(long?);
-            Price = price.GetValueOrDefault();
-            StartDate = startDate.GetValueOrDefault();
-            EndDate = endDate.GetValueOrDefault();
+            Price = price;
+            StartDate = startDate;
+            EndDate = endDate;
             Status = ChangeOfPartyRequestStatus.Pending;
             CreatedOn = now;
             LastUpdatedOn = now;


[MaemoDevice] Ignore the .sounds directory on Maemo devices

The .sounds directory should only contain default sounds and should
never be wiped. Also it is not a good default for the SDCards because
hidden folders on the SDCards are not indexed by the Tracker. Fixes
bgo#614226 and bgo#611043.

--- src/Dap/Banshee.Dap.MassStorage/Banshee.Dap.MassStorage/MaemoDevice.cs
+++ src/Dap/Banshee.Dap.MassStorage/Banshee.Dap.MassStorage/MaemoDevice.cs
@@ -78,7 +78,6 @@
         };

         private static string [] audio_folders = new string [] {
-            ".sounds/",
             ".videos/",
             "Music/"
         };


EnC for nullables editing tests with lambdas (#37598)

--- src/EditorFeatures/CSharpTest/EditAndContinue/StatementEditingTests.cs
+++ src/EditorFeatures/CSharpTest/EditAndContinue/StatementEditingTests.cs
@@ -2759,6 +2759,42 @@

             edits.VerifySemanticDiagnostics(
                 Diagnostic(RudeEditKind.ChangingLambdaReturnType, "a", CSharpFeaturesResources.lambda));
+        }
+
+        [Fact]
+        public void Lambdas_Update_Signature_Nullable()
+        {
+            var src1 = @"
+using System;
+
+class C
+{
+    void G1(Func<string, string> f) {}
+    void G2(Func<string?, string?> f) {}
+
+    void F()
+    {
+        G1(a => a);
+    }
+}
+";
+            var src2 = @"
+using System;
+
+class C
+{
+    void G1(Func<string, string> f) {}
+    void G2(Func<string?, string?> f) {}
+
+    void F()
+    {
+        G2(a => a);
+    }
+}
+";
+            var edits = GetTopEdits(src1, src2);
+
+            edits.VerifySemanticDiagnostics();
         }

         [Fact]


bug fix

bug fix

git-svn-id: abb32f7e14c1eda4e61b14f419d528aa928c8505@32 c8b2a3fe-9b5b-6a51-a37e-dc31b0e308fa

--- Main.cs
+++ Main.cs
@@ -414,7 +414,8 @@
             FileStream tmpstream = new FileStream(To+".tmp", FileMode.Create);
             CopyStream(rsp.GetResponseStream(), tmpstream);
             // only after we successfully downloaded a file, overwrite the existing one
-            File.Delete(To);
+            if(File.Exists(To))
+                File.Delete(To);
             File.Move(To + ".tmp", To);
         }

@@ -424,7 +425,7 @@
             while (true)
             {
                 int len = i.Read(buf, 0, buf.Length);
-                if (len <= 0) return;
+                if (len <= 0) break;
                 o.Write(buf, 0, len);
             }
             i.Close();
@@ -617,7 +618,8 @@
                 }
                 catch (Exception e)
                 {
-                    WriteEvent("Failed to download " + d.From, e);
+                    LogEvent("Failed to download " + d.From + " to " + d.To + "\n" + e.Message);
+                    WriteEvent("Failed to download " + d.From +" to "+d.To, e);
                     // but just keep going
                 }
             }


Issue #80

Issue #80

Change Sql Server Decimal Capacity from 19 to 38. 38 is the maximum decimal capacity from Sql Server 2000 http://msdn.microsoft.com/en-us/library/aa258832(v=sql.80).aspx

--- src/FluentMigrator.Runner/Generators/SqlServer/SqlServer2000TypeMap.cs
+++ src/FluentMigrator.Runner/Generators/SqlServer/SqlServer2000TypeMap.cs
@@ -7,46 +7,46 @@
     using FluentMigrator.Runner.Generators.Base;

     internal class SqlServer2000TypeMap : TypeMapBase
-	{
-		public const int AnsiStringCapacity = 8000;
-		public const int AnsiTextCapacity = 2147483647;
-		public const int UnicodeStringCapacity = 4000;
-		public const int UnicodeTextCapacity = 1073741823;
-		public const int ImageCapacity = 2147483647;
-		public const int DecimalCapacity = 19;
+    {
+        public const int AnsiStringCapacity = 8000;
+        public const int AnsiTextCapacity = 2147483647;
+        public const int UnicodeStringCapacity = 4000;
+        public const int UnicodeTextCapacity = 1073741823;
+        public const int ImageCapacity = 2147483647;
+        public const int DecimalCapacity = 38;

-		protected override void SetupTypeMaps()
-		{
-			SetTypeMap(DbType.AnsiStringFixedLength, "CHAR(255)");
-			SetTypeMap(DbType.AnsiStringFixedLength, "CHAR($size)", AnsiStringCapacity);
-			SetTypeMap(DbType.AnsiString, "VARCHAR(255)");
-			SetTypeMap(DbType.AnsiString, "VARCHAR($size)", AnsiStringCapacity);
-			SetTypeMap(DbType.AnsiString, "TEXT", AnsiTextCapacity);
-			SetTypeMap(DbType.Binary, "VARBINARY(8000)");
-			SetTypeMap(DbType.Binary, "VARBINARY($size)", AnsiStringCapacity);
-			SetTypeMap(DbType.Binary, "VARBINARY(MAX)", int.MaxValue);
-			SetTypeMap(DbType.Binary, "IMAGE", ImageCapacity);
-			SetTypeMap(DbType.Boolean, "BIT");
-			SetTypeMap(DbType.Byte, "TINYINT");
-			SetTypeMap(DbType.Currency, "MONEY");
-			SetTypeMap(DbType.Date, "DATETIME");
-			SetTypeMap(DbType.DateTime, "DATETIME");
-			SetTypeMap(DbType.Decimal, "DECIMAL(19,5)");
-			SetTypeMap(DbType.Decimal, "DECIMAL($size,$precision)", DecimalCapacity);
-			SetTypeMap(DbType.Double, "DOUBLE PRECISION");
-			SetTypeMap(DbType.Guid, "UNIQUEIDENTIFIER");
-			SetTypeMap(DbType.Int16, "SMALLINT");
-			SetTypeMap(DbType.Int32, "INT");
-			SetTypeMap(DbType.Int64, "BIGINT");
-			SetTypeMap(DbType.Single, "REAL");
-			SetTypeMap(DbType.StringFixedLength, "NCHAR(255)");
-			SetTypeMap(DbType.StringFixedLength, "NCHAR($size)", UnicodeStringCapacity);
-			SetTypeMap(DbType.String, "NVARCHAR(255)");
-			SetTypeMap(DbType.String, "NVARCHAR($size)", UnicodeStringCapacity);
-			SetTypeMap(DbType.String, "NVARCHAR(MAX)", int.MaxValue);
-			SetTypeMap(DbType.String, "NTEXT", UnicodeTextCapacity);
-			SetTypeMap(DbType.Time, "DATETIME");
-			SetTypeMap(DbType.Xml, "XML");
-		}
-	}
+        protected override void SetupTypeMaps()
+        {
+            SetTypeMap(DbType.AnsiStringFixedLength, "CHAR(255)");
+            SetTypeMap(DbType.AnsiStringFixedLength, "CHAR($size)", AnsiStringCapacity);
+            SetTypeMap(DbType.AnsiString, "VARCHAR(255)");
+            SetTypeMap(DbType.AnsiString, "VARCHAR($size)", AnsiStringCapacity);
+            SetTypeMap(DbType.AnsiString, "TEXT", AnsiTextCapacity);
+            SetTypeMap(DbType.Binary, "VARBINARY(8000)");
+            SetTypeMap(DbType.Binary, "VARBINARY($size)", AnsiStringCapacity);
+            SetTypeMap(DbType.Binary, "VARBINARY(MAX)", int.MaxValue);
+            SetTypeMap(DbType.Binary, "IMAGE", ImageCapacity);
+            SetTypeMap(DbType.Boolean, "BIT");
+            SetTypeMap(DbType.Byte, "TINYINT");
+            SetTypeMap(DbType.Currency, "MONEY");
+            SetTypeMap(DbType.Date, "DATETIME");
+            SetTypeMap(DbType.DateTime, "DATETIME");
+            SetTypeMap(DbType.Decimal, "DECIMAL(19,5)");
+            SetTypeMap(DbType.Decimal, "DECIMAL($size,$precision)", DecimalCapacity);
+            SetTypeMap(DbType.Double, "DOUBLE PRECISION");
+            SetTypeMap(DbType.Guid, "UNIQUEIDENTIFIER");
+            SetTypeMap(DbType.Int16, "SMALLINT");
+            SetTypeMap(DbType.Int32, "INT");
+            SetTypeMap(DbType.Int64, "BIGINT");
+            SetTypeMap(DbType.Single, "REAL");
+            SetTypeMap(DbType.StringFixedLength, "NCHAR(255)");
+            SetTypeMap(DbType.StringFixedLength, "NCHAR($size)", UnicodeStringCapacity);
+            SetTypeMap(DbType.String, "NVARCHAR(255)");
+            SetTypeMap(DbType.String, "NVARCHAR($size)", UnicodeStringCapacity);
+            SetTypeMap(DbType.String, "NVARCHAR(MAX)", int.MaxValue);
+            SetTypeMap(DbType.String, "NTEXT", UnicodeTextCapacity);
+            SetTypeMap(DbType.Time, "DATETIME");
+            SetTypeMap(DbType.Xml, "XML");
+        }
+    }
 }


Make Register member virtual

Make Register member virtual

--- src/PPWCode.Vernacular.NHibernate.I/Utilities/AuditLogEventListener.cs
+++ src/PPWCode.Vernacular.NHibernate.I/Utilities/AuditLogEventListener.cs
@@ -63,17 +63,20 @@

         public bool UseUtc => m_UseUtc;

-        public void Register(Configuration cfg)
-        {
-            cfg.EventListeners.PostUpdateEventListeners = new IPostUpdateEventListener[] { this }
-                                                          .Concat(cfg.EventListeners.PostUpdateEventListeners)
-                                                          .ToArray();
-            cfg.EventListeners.PostInsertEventListeners = new IPostInsertEventListener[] { this }
-                                                          .Concat(cfg.EventListeners.PostInsertEventListeners)
-                                                          .ToArray();
-            cfg.EventListeners.PostDeleteEventListeners = new IPostDeleteEventListener[] { this }
-                                                          .Concat(cfg.EventListeners.PostDeleteEventListeners)
-                                                          .ToArray();
+        public virtual void Register(Configuration cfg)
+        {
+            cfg.EventListeners.PostUpdateEventListeners =
+                new IPostUpdateEventListener[] { this }
+                    .Concat(cfg.EventListeners.PostUpdateEventListeners)
+                    .ToArray();
+            cfg.EventListeners.PostInsertEventListeners =
+                new IPostInsertEventListener[] { this }
+                    .Concat(cfg.EventListeners.PostInsertEventListeners)
+                    .ToArray();
+            cfg.EventListeners.PostDeleteEventListeners =
+                new IPostDeleteEventListener[] { this }
+                    .Concat(cfg.EventListeners.PostDeleteEventListeners)
+                    .ToArray();
         }

         public async Task OnPostInsertAsync(PostInsertEvent @event, CancellationToken cancellationToken)


1465: Menu

1465: Menu

--- src/PixelFarm/LayoutFarm.YourBasicCustomWidgets/4.1_Composites/Menu.cs
+++ src/PixelFarm/LayoutFarm.YourBasicCustomWidgets/4.1_Composites/Menu.cs
@@ -24,23 +24,17 @@
         {
         }

-        protected override bool HasReadyRenderElement
-        {
-            get { return this._primElement != null; }
-        }
-        public override RenderElement CurrentPrimaryRenderElement
-        {
-            get { return this._primElement; }
-        }
+        protected override bool HasReadyRenderElement => _primElement != null;
+        public override RenderElement CurrentPrimaryRenderElement => _primElement;
         public Color BackColor
         {
-            get { return this._backColor; }
-            set
-            {
-                this._backColor = value;
+            get => _backColor;
+            set
+            {
+                _backColor = value;
                 if (HasReadyRenderElement)
                 {
-                    this._primElement.BackColor = value;
+                    _primElement.BackColor = value;
                 }
             }
         }
@@ -56,11 +50,11 @@
                 //------------------------------------------------
                 //create visual layer

-                if (this._landPart != null)
+                if (_landPart != null)
                 {
                     renderE.AddChild(this._landPart);
                 }
-                if (this._floatPart != null)
+                if (_floatPart != null)
                 {
                 }

@@ -72,18 +66,14 @@
         //----------------------------------------------------
         protected override void OnMouseDown(UIMouseEventArgs e)
         {
-            if (this.MouseDown != null)
-            {
-                this.MouseDown(this, e);
-            }
+
+            MouseDown?.Invoke(this, e);
             base.OnMouseDown(e);
         }
         protected override void OnMouseUp(UIMouseEventArgs e)
         {
-            if (this.MouseUp != null)
-            {
-                MouseUp(this, e);
-            }
+
+            MouseUp?.Invoke(this, e);
             base.OnMouseUp(e);
         }

@@ -93,15 +83,15 @@
         //----------------------------------------------------
         public AbstractRectUI LandPart
         {
-            get { return this._landPart; }
-            set
-            {
-                this._landPart = value;
+            get => _landPart;
+            set
+            {
+                _landPart = value;
                 if (value != null)
                 {
                     //if new value not null
                     //check existing land part
-                    if (this._landPart != null)
+                    if (_landPart != null)
                     {
                         //remove existing landpart
                     }
@@ -114,7 +104,7 @@
                 }
                 else
                 {
-                    if (this._landPart != null)
+                    if (_landPart != null)
                     {
                         //remove existing landpart

@@ -124,10 +114,10 @@
         }
         public MenuBox FloatPart
         {
-            get { return this._floatPart; }
-            set
-            {
-                this._floatPart = value;
+            get => _floatPart;
+            set
+            {
+                _floatPart = value;
                 if (value != null)
                 {
                     //attach float part
@@ -135,16 +125,13 @@
             }
         }
         //----------------------------------------------------
-        public bool IsOpened
-        {
-            get { return this._thisMenuOpened; }
-        }
+        public bool IsOpened => _thisMenuOpened;
         public void Open()
         {
             if (_thisMenuOpened) return;
-            this._thisMenuOpened = true;
+            _thisMenuOpened = true;
             //-----------------------------------
-            if (this._primElement == null) return;
+            if (_primElement == null) return;
             if (_floatPart == null) return;
             switch (_floatPartStyle)
             {
@@ -157,7 +144,7 @@
                         {
                             Point globalLocation = _primElement.GetGlobalLocation();
                             _floatPart.SetLocation(globalLocation.X, globalLocation.Y + _primElement.Height);
-                            this._floatPartRenderElement = this._floatPart.GetPrimaryRenderElement(_primElement.Root) as CustomRenderBox;
+                            _floatPartRenderElement = _floatPart.GetPrimaryRenderElement(_primElement.Root) as CustomRenderBox;
                             topRenderBox.AddChild(_floatPartRenderElement);
                             //temp here

@@ -173,9 +160,11 @@
         public void Close()
         {
             if (!_thisMenuOpened) return;
-            this._thisMenuOpened = false;
-            if (this._primElement == null) return;
+            _thisMenuOpened = false;
+            //
+            if (_primElement == null) return;
             if (_floatPart == null) return;
+            //
             switch (_floatPartStyle)
             {
                 default:


Fix  typings errors in EndpointAdapter.cs

--- src/Samples/WcfForHipsters.WebServer/WcfForHipsters/EndpointAdapter.cs
+++ src/Samples/WcfForHipsters.WebServer/WcfForHipsters/EndpointAdapter.cs
@@ -42,7 +42,7 @@
             }
             catch (Exception ex)
             {
-                throw new FaultException("Pocess call fault see inner exception.", id, ex);
+                throw new FaultException("Process call fault see inner exception.", id, ex);
             }
         }

@@ -61,7 +61,7 @@
             }
             else
             {
-                throw new InvalidOperationException($"Mehod {method} not found.");
+                throw new InvalidOperationException($"Method {method} not found.");
             }
         }


Increase the min supported version of the Zip spec

Zips created by ZipArchive right now say that they will support any version of the ZIP format. However, they will actually only support versions 2.0 and up. This would mean that zips created by the core version of ziparchive will be improperly unzipped by unzippers from versions 0.0 to 2.0 (1989 to 1993).

This commit fixes a regression from the full framework that sets the min to 2.0. The windows zip utility also sets the version to 2.0.

--- src/System.IO.Compression/src/System/IO/Compression/ZipArchiveEntry.cs
+++ src/System.IO.Compression/src/System/IO/Compression/ZipArchiveEntry.cs
@@ -24,7 +24,7 @@
         private readonly Boolean _originallyInArchive;
         private readonly Int32 _diskNumberStart;
         private readonly ZipVersionMadeByPlatform _versionMadeByPlatform;
-        private readonly byte _versionMadeBySpecification;
+        private ZipVersionNeededValues _versionMadeBySpecification;
         private ZipVersionNeededValues _versionToExtract;
         private BitFlagValues _generalPurposeBitFlag;
         private CompressionMethodValues _storedCompressionMethod;
@@ -67,7 +67,7 @@

             _diskNumberStart = cd.DiskNumberStart;
             _versionMadeByPlatform = (ZipVersionMadeByPlatform)cd.VersionMadeByCompatibility;
-            _versionMadeBySpecification = cd.VersionMadeBySpecification;
+            _versionMadeBySpecification = (ZipVersionNeededValues)cd.VersionMadeBySpecification;
             _versionToExtract = (ZipVersionNeededValues)cd.VersionNeededToExtract;
             _generalPurposeBitFlag = (BitFlagValues)cd.GeneralPurposeBitFlag;
             CompressionMethod = (CompressionMethodValues)cd.CompressionMethod;
@@ -114,7 +114,7 @@

             _diskNumberStart = 0;
             _versionMadeByPlatform = CurrentZipPlatform;
-            _versionMadeBySpecification = 0;
+            _versionMadeBySpecification = ZipVersionNeededValues.Default;
             _versionToExtract = ZipVersionNeededValues.Default; //this must happen before following two assignment
             _generalPurposeBitFlag = 0;
             CompressionMethod = CompressionMethodValues.Deflate;
@@ -568,7 +568,7 @@
             }

             writer.Write(ZipCentralDirectoryFileHeader.SignatureConstant);      // Central directory file header signature  (4 bytes)
-            writer.Write(_versionMadeBySpecification);                          // Version made by Specification (version)  (1 byte)
+            writer.Write((byte)_versionMadeBySpecification);                    // Version made by Specification (version)  (1 byte)
             writer.Write((byte)CurrentZipPlatform);                             // Version made by Compatibility (type)     (1 byte)
             writer.Write((UInt16)_versionToExtract);                            // Minimum version needed to extract        (2 bytes)
             writer.Write((UInt16)_generalPurposeBitFlag);                       // General Purpose bit flag                 (2 bytes)
@@ -1084,6 +1084,10 @@
             {
                 _versionToExtract = value;
             }
+            if (_versionMadeBySpecification < value)
+            {
+                _versionMadeBySpecification = value;
+            }
         }

         private void ThrowIfInvalidArchive()


It is not safe to instantiate scriptable objects in attribute constructors in 2018.3

Fixes #990

--- src/UnityExtension/Assets/Editor/GitHub.Unity/ScriptObjectSingleton.cs
+++ src/UnityExtension/Assets/Editor/GitHub.Unity/ScriptObjectSingleton.cs
@@ -10,20 +10,34 @@
     sealed class LocationAttribute : Attribute
     {
         public enum Location { PreferencesFolder, ProjectFolder, LibraryFolder, UserFolder }
-        public string filepath { get; set; }
+
+        private string relativePath;
+        private Location location;
+
+        private string filePath;
+        public string FilePath {
+            get {
+                if (filePath != null) return filePath;
+
+                if (relativePath[0] == '/')
+                    relativePath = relativePath.Substring(1);
+
+                if (location == Location.PreferencesFolder)
+                    filePath = InternalEditorUtility.unityPreferencesFolder + "/" + relativePath;
+                else if (location == Location.UserFolder)
+                    filePath = EntryPoint.ApplicationManager.Environment.UserCachePath.Combine(relativePath).ToString(SlashMode.Forward);
+                else if (location == Location.LibraryFolder)
+                    filePath = EntryPoint.ApplicationManager.Environment.UnityProjectPath.Combine("Library", "gfu", relativePath);
+
+                return filePath;
+            }
+        }
+
         public LocationAttribute(string relativePath, Location location)
         {
             Guard.ArgumentNotNullOrWhiteSpace(relativePath, "relativePath");
-
-            if (relativePath[0] == '/')
-                relativePath = relativePath.Substring(1);
-
-            if (location == Location.PreferencesFolder)
-                filepath = InternalEditorUtility.unityPreferencesFolder + "/" + relativePath;
-            else if (location == Location.UserFolder)
-                filepath = EntryPoint.ApplicationManager.Environment.UserCachePath.Combine(relativePath).ToString(SlashMode.Forward);
-            else if (location == Location.LibraryFolder)
-                filepath = EntryPoint.ApplicationManager.Environment.UnityProjectPath.Combine("Library", "gfu", relativePath);
+            this.relativePath = relativePath;
+            this.location = location;
         }
     }

@@ -99,7 +113,7 @@

             if (attr == null)
                 return null;
-            return attr.filepath.ToNPath();
+            return attr.FilePath.ToNPath();
         }
     }
 }


Remove redundant event listener action

Remove redundant event listener action

--- MatterControlLib/Library/Widgets/InventoryTreeView.cs
+++ MatterControlLib/Library/Widgets/InventoryTreeView.cs
@@ -158,23 +158,12 @@
 					InventoryTreeView.CreatePrinterProfilesTree(printersNode, theme);
 					this.Invalidate();
 				}
-
-				if (settingsName == SettingsKey.printer_name)
-				{
-					InventoryTreeView.CreatePrinterProfilesTree(printersNode, theme);
-					this.Invalidate();
-				}
-			}
+			}
+
 			PrinterSettings.AnyPrinterSettingChanged += AnyPrinterSettingChanged;
 			this.Closed -= AnyPrinterSettingChanged;

-			//// Rebuild the droplist any time the ActivePrinter changes
-			//ApplicationController.Instance.ActivePrinterChanged.RegisterEvent((s, e) =>
-			//{
-			//	this.Rebuild();
-			//}, ref unregisterEvents);
-
-			// Rebuild the droplist any time the Profiles list changes
+			// Rebuild the treeview anytime the Profiles list changes
 			ProfileManager.ProfilesListChanged.RegisterEvent((s, e) =>
 			{
 				InventoryTreeView.CreatePrinterProfilesTree(printersNode, theme);


Delete App.g.cs

Delete App.g.cs

--- MediaManagerWPF/MediaManager/obj/x86/Release/App.g.cs
+++ MediaManagerWPF/MediaManager/obj/x86/Release/App.g.cs
@@ -1,84 +0,0 @@
-#pragma checksum "..\..\..\App.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "32773AE4CD1664335A530C3BDDC5CA4B"
-//------------------------------------------------------------------------------
-// <auto-generated>
-//     This code was generated by a tool.
-//     Runtime Version:4.0.30319.42000
-//
-//     Changes to this file may cause incorrect behavior and will be lost if
-//     the code is regenerated.
-// </auto-generated>
-//------------------------------------------------------------------------------
-
-using MediaManager.ViewModel;
-using System;
-using System.Diagnostics;
-using System.Windows;
-using System.Windows.Automation;
-using System.Windows.Controls;
-using System.Windows.Controls.Primitives;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Forms.Integration;
-using System.Windows.Ink;
-using System.Windows.Input;
-using System.Windows.Markup;
-using System.Windows.Media;
-using System.Windows.Media.Animation;
-using System.Windows.Media.Effects;
-using System.Windows.Media.Imaging;
-using System.Windows.Media.Media3D;
-using System.Windows.Media.TextFormatting;
-using System.Windows.Navigation;
-using System.Windows.Shapes;
-using System.Windows.Shell;
-
-
-namespace MediaManager {
-
-
-    /// <summary>
-    /// App
-    /// </summary>
-    public partial class App : System.Windows.Application {
-
-        private bool _contentLoaded;
-
-        /// <summary>
-        /// InitializeComponent
-        /// </summary>
-        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
-        [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
-        public void InitializeComponent() {
-            if (_contentLoaded) {
-                return;
-            }
-            _contentLoaded = true;
-
-            #line 4 "..\..\..\App.xaml"
-            this.StartupUri = new System.Uri("View/MainWindow.xaml", System.UriKind.Relative);
-
-            #line default
-            #line hidden
-            System.Uri resourceLocater = new System.Uri("/MediaManager;component/app.xaml", System.UriKind.Relative);
-
-            #line 1 "..\..\..\App.xaml"
-            System.Windows.Application.LoadComponent(this, resourceLocater);
-
-            #line default
-            #line hidden
-        }
-
-        /// <summary>
-        /// Application Entry Point.
-        /// </summary>
-        [System.STAThreadAttribute()]
-        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
-        [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
-        public static void Main() {
-            MediaManager.App app = new MediaManager.App();
-            app.InitializeComponent();
-            app.Run();
-        }
-    }
-}
-


Fix EndToEnd Tests for portable build and publish

--- test/Microsoft.DotNet.Tools.Tests.Utilities/TestBase.cs
+++ test/Microsoft.DotNet.Tools.Tests.Utilities/TestBase.cs
@@ -107,10 +107,19 @@
             string expectedOutput)
         {
             var executablePath = Path.Combine(outputDir, executableName);
+            var args = new List<string>();
+
+            if (IsPortable(executablePath))
+            {
+                args.Add(ArgumentEscaper.EscapeSingleArg(executablePath));
+
+                var muxer = new Muxer();
+                executablePath = muxer.MuxerPath;
+            }

             var executableCommand = new TestCommand(executablePath);

-            var result = executableCommand.ExecuteWithCapturedOutput("");
+            var result = executableCommand.ExecuteWithCapturedOutput(string.Join(" ", args));

             result.Should().HaveStdOut(expectedOutput);
             result.Should().NotHaveStdErr();
@@ -141,5 +150,15 @@

             return executablePath;
         }
+
+        private bool IsPortable(string executablePath)
+        {
+            var executableDir = Path.GetDirectoryName(executablePath);
+
+            var runtimeConfig = Directory.EnumerateFiles(executableDir)
+                .FirstOrDefault(x => x.EndsWith("runtimeconfig.json"));
+
+            return runtimeConfig != null;
+        }
     }
 }


Fixed and error reply when a waifu item doesn't exist

--- NadekoBot.Core/Modules/Gambling/WaifuClaimCommands.cs
+++ NadekoBot.Core/Modules/Gambling/WaifuClaimCommands.cs
@@ -312,7 +312,7 @@
                 var item = allItems.FirstOrDefault(x => x.Name.ToLowerInvariant() == itemName.ToLowerInvariant());
                 if (item is null)
                 {
-                    await ReplyErrorLocalizedAsync("item_not_exist");
+                    await ReplyErrorLocalizedAsync("waifu_gift_not_exist");
                     return;
                 }
                 var sucess = await _service.GiftWaifuAsync(ctx.User, waifu, item);


Updates to find the OSVR directory via OSVR_SERVER_ROOT. Removes dependency on hardcoded paths. Goal is to work with combined Runtime/SDK installer.

--- OSVR-Unity/Assets/OSVRUnity/Editor/OsvrEditorUtils.cs
+++ OSVR-Unity/Assets/OSVRUnity/Editor/OsvrEditorUtils.cs
@@ -28,13 +28,13 @@

 public class OsvrEditorUtils : EditorWindow
 {
-    private const string OSVR_RUNTIME_DIR = "C:\\Program Files\\OSVR\\Runtime\\bin"; //default Runtime install path
-    private const string OSVR_SDK_DIR = "C:\\Program Files\\OSVR\\SDK\\bin"; //default SDK install path
-    private const string OSVR_CONFIG_RUNTIME_DIR = "C:\\Program Files\\OSVR\\Runtime\\config"; //Runtime OSVR Configurator Path
-    private const string OSVR_CONFIG_SDK_DIR = "C:\\Program Files\\OSVR\\SDK\\config"; //SDK OSVR Configurator Path
+    private const string OSVR_SERVER_ROOT = "OSVR_SERVER_ROOT";
+    private const string OSVR_SERVER_ROOT_DEFAULT = "C:\\Program Files (x86)\\OSVR\\Runtime\\bin\\x64"; //Runtime OSVR Configurator Path
+    private const string OSVR_CONFIG_RUNTIME_DIR = "C:\\Program Files (x86)\\OSVR\\Runtime\\config"; //Runtime OSVR Configurator Path
+    private const string OSVR_CONFIG_SDK_DIR = "C:\\Program Files (x86)\\OSVR\\SDK\\config"; //SDK OSVR Configurator Path
     private const string OSVR_SERVER_FILENAME = "osvr_server.exe"; //default server filename
     private const string OSVR_SERVER_PROCESS = "osvr_server"; //default server filename
-    private const string OSVR_SERVER_CONFIG = "\"C:\\Program Files\\OSVR\\Runtime\\bin\\osvr_server_config.json\""; //default server config
+    private const string OSVR_SERVER_CONFIG = "\"C:\\Program Files (x86)\\OSVR\\Runtime\\bin\\x64\\osvr_server_config.json\""; //default server config
     private const string OSVR_CONFIG_FILENAME = "OSVR-Config.exe"; //default server config
     private const string OSVR_UNITY_VER_X86 = "\\Plugins\\x86\\osvrUnity-ver.txt";
     private const string OSVR_UNITY_VER_X86_64 = "\\Plugins\\x86_64\\osvrUnity-ver.txt";
@@ -76,8 +76,9 @@
     private const string PP_OSVR_CONFIG_KEY = "osvr_config_dir"; //EditorPrefs key

     private bool isServerRunning = false; //is an osvr_server.exe process running?
-
-    public string OsvrServerDirectory = OSVR_RUNTIME_DIR; //current server directory
+    private bool usingDefaultServer = false; //is an osvr_server.exe process running?
+
+    public string OsvrServerDirectory = ""; //current server directory
     public string OsvrServerFilename = OSVR_SERVER_FILENAME; //current filename of server
     public string OsvrServerArguments = OSVR_SERVER_CONFIG; //current command-line args
     public string TrackerViewFilename = OSVR_TRACKERVIEW_FILENAME; //current command-line args
@@ -91,22 +92,39 @@
     [MenuItem("OSVR/OSVR Utilities")]
     public static void ShowWindow()
     {
+        EditorPrefs.DeleteKey(PP_OSVR_DIR_KEY);
         OsvrEditorUtils osvrUtilsWindow = EditorWindow.GetWindow<OsvrEditorUtils>();
         osvrUtilsWindow.Load();
         GUIContent titleContent = new GUIContent("OSVR");
         osvrUtilsWindow.titleContent = titleContent;

-        //set the OSVR server directory
-        if (osvrUtilsWindow.OsvrServerDirectory == "" && Directory.Exists(OSVR_RUNTIME_DIR))
-        {
-            osvrUtilsWindow.OsvrServerDirectory = OSVR_RUNTIME_DIR;
-            osvrUtilsWindow.SavePath(OSVR_RUNTIME_DIR);
-        }
-        else if (osvrUtilsWindow.OsvrServerDirectory == "" && Directory.Exists(OSVR_SDK_DIR))
-        {
-            osvrUtilsWindow.OsvrServerDirectory = OSVR_SDK_DIR;
-            osvrUtilsWindow.SavePath(OSVR_SDK_DIR);
-        }
+        //check if the server directory path has been set
+        string serverPath = osvrUtilsWindow.GetPath(PP_OSVR_ARGS_KEY);
+        if(Directory.Exists(serverPath) && File.Exists(serverPath + "\\" + OSVR_SERVER_FILENAME))
+        {
+            //a server exists at the saved path
+            //check if it is the official SDK path
+            if(serverPath.CompareTo(osvrUtilsWindow.GetDefaultPath()) == 0)
+            {
+                osvrUtilsWindow.usingDefaultServer = true;
+                Debug.Log("[OSVR-Unity] OSVR SDK default.");
+
+            }
+            else
+            {
+                osvrUtilsWindow.usingDefaultServer = false;
+                Debug.Log("[OSVR-Unity] Warning, saved server path in OSVR Editor Window is not the OSVR SDK default. This may or may not be intended.");
+            }
+        }
+        else
+        {
+            Debug.Log("No server, Reverting to default");
+            osvrUtilsWindow.OsvrServerDirectory = osvrUtilsWindow.GetDefaultPath();
+            osvrUtilsWindow.SavePath(osvrUtilsWindow.OsvrServerDirectory);
+        }
+
+
+
     }

@@ -356,7 +374,8 @@
     //Load server properties from EditorPrefs
     private void Load()
     {
-        OsvrServerDirectory = EditorPrefs.GetString(PP_OSVR_DIR_KEY, OSVR_RUNTIME_DIR);
+        OsvrServerDirectory = EditorPrefs.GetString(PP_OSVR_DIR_KEY, GetDefaultPath());
+        Debug.Log("LOaded OsvrServerDirectory " + OsvrServerDirectory);
         OsvrServerFilename = EditorPrefs.GetString(PP_OSVR_EXE_KEY, OSVR_SERVER_FILENAME);
         OsvrServerArguments = EditorPrefs.GetString(PP_OSVR_ARGS_KEY, OSVR_SERVER_CONFIG);
     }
@@ -373,6 +392,32 @@
     private void SavePath(string p)
     {
         EditorPrefs.SetString(PP_OSVR_DIR_KEY, p);
+    }
+    private string GetDefaultPath()
+    {
+        //get the OSVR server directory
+        string defaultPath = Environment.GetEnvironmentVariable(OSVR_SERVER_ROOT);
+        if (defaultPath != null)
+        {
+            if (Directory.Exists(defaultPath))
+            {
+                Debug.Log("[OSVR-Unity] USing default. " + defaultPath);
+                return defaultPath;
+            }
+            else
+            {
+                Debug.Log("[OSVR-Unity] OSVR Server directory not found.");
+            }
+        }
+        else
+        {
+            Debug.Log("[OSVR-Unity] OSVR_SERVER_ROOT environment variable not found.");
+        }
+        return OSVR_SERVER_ROOT_DEFAULT;
+    }
+    private string GetPath(string p)
+    {
+        return EditorPrefs.GetString(PP_OSVR_DIR_KEY);
     }

     //Launch osvr_reset_yaw.exe


Parent window for CLR dialogs invoked from installer custom actions are now retried if title is ProductName + " Setup"

--- PART/Source/Core/Installers/Utilities/Installation.cs
+++ PART/Source/Core/Installers/Utilities/Installation.cs
@@ -314,7 +314,13 @@

         public static WindowHandleWrapper InstallerWindowWrapper(this Microsoft.Deployment.WindowsInstaller.Session session)
         {
-            return new WindowHandleWrapper(session.GetPropertyValue("ProductName"));
+            var title = session.GetPropertyValue("ProductName");
+            var ret = new WindowHandleWrapper(title + " Setup");
+            if (ret.Handle == IntPtr.Zero)
+            {
+                ret = new WindowHandleWrapper(title);
+            }
+            return ret;
         }

         public static bool IsInDeferredMode(this Microsoft.Deployment.WindowsInstaller.Session session)
@@ -370,5 +376,5 @@
         }
     }

-
+
 }


[PARSER] Exposed `_IsInt` method publicly.

--- ParserTyped.cs
+++ ParserTyped.cs
@@ -67,7 +67,7 @@
         /// </summary>
         /// <param name="candidate">The string to check.</param>
         /// <returns>Wheter the string is an integer or not</returns>
-        private static bool _IsInt(string candidate)
+        public static bool _IsInt(string candidate)
         {
             foreach (char c in candidate)
             {


GetPrimitiveMesh was creating temporary game objects. Cleaned up

--- PopGeometry.cs
+++ PopGeometry.cs
@@ -1290,7 +1290,10 @@

 		public static Mesh	GetPrimitiveMesh(PrimitiveType type)
 		{
-			return GameObject.CreatePrimitive( type ).GetComponent<MeshFilter>().sharedMesh;
+			var go = GameObject.CreatePrimitive(type);
+			var m = go.GetComponent<MeshFilter>().sharedMesh;
+			GameObject.DestroyImmediate(go);
+			return m;
 		}


Handle long lists more gracefully.

Handle long lists more gracefully.

--- PrettyPrint.cs
+++ PrettyPrint.cs
@@ -45,9 +45,9 @@
   }

   private static int _depth = 0;
-  private static void OpenInline(StringBuilder output) { output.Append("{ "); _depth++; }
-  private static void CloseInline(StringBuilder output) { output.Append(" }"); _depth--; }
-  private static void NextItem(StringBuilder output) { output.Append(", "); }
+  private static void OpenInline(StringBuilder output, int listLength) { output.Append(listLength < 10 ? "{ " : "{\n\t"); _depth++; }
+  private static void CloseInline(StringBuilder output, int listLength) { output.Append(listLength < 10 ? " }" : "\n}"); _depth--; }
+  private static void NextItem(StringBuilder output, int listLength) { output.Append(listLength < 10 ? ", " : ",\n\t"); }

   private static void Open(StringBuilder output) { output.Append("{"); _depth++; }
   private static void Close(StringBuilder output) { output.Append("}"); _depth--; }
@@ -82,13 +82,13 @@
         output.Append(n);
       } else if(result is Array) {
         Array a = (Array) result;
-        OpenInline(output);
-        int top = a.GetUpperBound(0);
-        for(int i = a.GetLowerBound(0); i <= top; i++) {
+        int top = a.GetUpperBound(0), bottom = a.GetLowerBound(0);
+        OpenInline(output, top - bottom);
+        for(int i = bottom; i <= top; i++) {
           InternalPP(output, a.GetValue(i));
-          if(i != top) NextItem(output);
+          if(i != top) NextItem(output, top - bottom);
         }
-        CloseInline(output);
+        CloseInline(output, top - bottom);
       } else if(result is bool) {
         output.Append(((bool) result) ? "true" : "false");
       } else if(result is string) {
@@ -102,17 +102,21 @@
           InternalPP(output, entry.Key);
           output.Append(": ");
           InternalPP(output, entry.Value);
-          if(count != top) NextItem(output);
+          if(count != top) NextItem(output, 0);
         }
         Close(output);
       } else if(result is IEnumerable) {
         int i = 0;
-        OpenInline(output);
+        ArrayList tmp = new ArrayList();
         foreach(object item in (IEnumerable)result) {
-          if(i++ != 0) NextItem(output);
+          tmp.Add(item);
+        }
+        OpenInline(output, tmp.Count);
+        foreach(object item in tmp) {
+          if(i++ != 0) NextItem(output, tmp.Count);
           InternalPP(output, item);
         }
-        CloseInline(output);
+        CloseInline(output, tmp.Count);
       } else if(result is char) {
         EscapeChar(output, (char)result);
       } else if(result is Type || result.GetType().Name == "MonoType") {


Add external timestamp to general settings

--- QTMSettings.cs
+++ QTMSettings.cs
@@ -43,6 +43,9 @@

         [XmlElement("External_Time_Base")]
         public SettingsExternalTimeBase ExternalTimebase;
+
+        [XmlElement("External_Timestamp")]
+        public SettingsExternalTimestamp ExternalTimestamp;

         [XmlElement("Processing_Actions")]
         public SettingProcessingActions ProcessingActions;
@@ -527,6 +530,17 @@
         public float NonPeriodicTimeout;
     }

+    /// Settings regarding external time stamp
+    public struct SettingsExternalTimestamp
+    {
+        [XmlElement("Enabled")]
+        public bool Enabled;
+        [XmlElement("Type")]
+        public TimestampType Type;
+        [XmlElement("Frequency")]
+        public int Frequency;
+    }
+
     /// Struct for 6dof point information
     public struct Settings6DOFPoint
     {
@@ -955,5 +969,14 @@
         [XmlEnum("1x1")]
         AspectRatio_1x1,
     }
-
+    /// Signal Edge
+    public enum TimestampType
+    {
+        [XmlEnum("SMPTE")]
+        SMPTE = 0,
+        [XmlEnum("IRIG")]
+        IRIG,
+        [XmlEnum("CameraTime")]
+        CameraTime,
+    }
 }


fixed test

fixed test

--- test/dexih.transforms.tests/TransformValidationTests.cs
+++ test/dexih.transforms.tests/TransformValidationTests.cs
@@ -85,7 +85,7 @@
             var function = Functions
                 .GetFunction(typeof(ValidationFunctions).FullName, nameof(ValidationFunctions.MaxLength), Helpers.BuiltInAssembly)
                 .GetTransformFunction(typeof(string));
-            function.InvalidAction = TransformFunction.EInvalidAction.Clean;
+            function.InvalidAction = EInvalidAction.Clean;
             var parameters = new Parameters
             {
                 Inputs = new List<Parameter>
@@ -147,7 +147,7 @@
             var function = Functions
                 .GetFunction(typeof(ValidationFunctions).FullName, nameof(ValidationFunctions.MaxValue), Helpers.BuiltInAssembly)
                 .GetTransformFunction(typeof(int));
-            function.InvalidAction = TransformFunction.EInvalidAction.RejectClean;
+            function.InvalidAction = EInvalidAction.RejectClean;
             var parameters = new Parameters
             {
                 Inputs = new List<Parameter>


Remove .php reference from C# dial-3 example

--- twiml/voice/dial/dial-3/dial-3.5.x.cs
+++ twiml/voice/dial/dial-3/dial-3.5.x.cs
@@ -6,7 +6,7 @@
     static void Main()
     {
         var response = new VoiceResponse();
-        response.Dial("415-123-4567", action: "/handleDialCallStatus.php",
+        response.Dial("415-123-4567", action: "/handleDialCallStatus",
             method: "GET");
         response.Say("I am unreachable");


exit clear cache

exit clear cache

--- features/fixtures/maze_runner/Assets/Scripts/Main.cs
+++ features/fixtures/maze_runner/Assets/Scripts/Main.cs
@@ -774,6 +774,9 @@

     private void ClearBugsnagCache()
     {
+#if UNITY_SWITCH
+        return;
+#endif
         var path = Application.persistentDataPath + "/Bugsnag";
         if(Directory.Exists(path))
         {


Debugging output

Debugging output

--- AddOns/AngelicVerifierNull/AngelicVerifierNull/Program.cs
+++ AddOns/AngelicVerifierNull/AngelicVerifierNull/Program.cs
@@ -892,7 +892,8 @@

             //inputProg.writeToFile("cquery" + corralIterationCount + ".bpl");

-            cba.ErrorTrace cexTrace = null;
+            cba.ErrorTrace cexTrace = null;
+            var corralStart = DateTime.Now;
             try
             {
                 Stats.count("count.check.refine");
@@ -901,7 +902,9 @@
                 Stats.stop("check.and.refine");
             }
             catch (Exception)
-            {
+            {
+                Console.WriteLine("Corral took: {0} seconds", (DateTime.Now - corralStart).TotalSeconds.ToString("F2"));
+
                 // dump corral state for next iteration
                 corralState = new cba.CorralState();
                 corralState.CallTree = cba.ConfigManager.progVerifyOptions.CallTree;
@@ -912,7 +915,8 @@
                     DumpProgWithAsserts(inputProg.getProgram(), inputProg.mainProcName,
                         "corralinp" + corralIterationCount + ".bpl");
                 throw;
-            }
+            }
+            Console.WriteLine("Corral took: {0} seconds", (DateTime.Now - corralStart).TotalSeconds.ToString("F2"));

             // dump corral state for next iteration
             corralState = new cba.CorralState();


don't need this anymore

don't need this anymore

--- App/StackExchange.DataExplorer/Views/Shared/Master.cshtml
+++ App/StackExchange.DataExplorer/Views/Shared/Master.cshtml
@@ -12,7 +12,7 @@
     @Html.Raw(AssetPackager.LinkCss("sitecss"))
     @RenderSection("additionalStyles", required: false)

-razor
+


announce room desc when desc has changed, not after 30s

--- Room.cs
+++ Room.cs
@@ -25,7 +25,7 @@
         public List<Tuple<string, Type>> Exits = new List<Tuple<string, Type>>();
         public List<string> ExitCanonicalNames = new List<string>();

-        private double timeToNextDescribeOnEntry = 0.0;
+        private string lastFullDescription = "";

         public enum Direction
         {
@@ -143,14 +143,15 @@
             if (!State.Ticking.Contains(this))
                 State.Ticking.Add(this);

-            if (timeToNextDescribeOnEntry <= 0.0)
+            var d = GetFullDescription();
+            if (d != lastFullDescription)
             {
-                State.o(GetFullDescription());
+                lastFullDescription = d;
+                State.o(d);
             }
             else if (!State.TravellingAll)
                 State.o("-> " + Name);

-            timeToNextDescribeOnEntry = 30;
             Unvisited = false;
         }

@@ -160,10 +161,7 @@
                 State.Ticking.Remove(this);
         }

-        public virtual void Tick()
-        {
-            timeToNextDescribeOnEntry -= State.DeltaTime;
-        }
+        public virtual void Tick() { }

         protected virtual void BuildParser()
         {


Spelling and a few minor changes

Spelling and a few minor changes

Mainly spelling, added a few more words on leaving and entering a BG

--- Root.cs
+++ Root.cs
@@ -597,7 +597,7 @@
         {
             try
             {
-                var title = FormatIt( "GameMaster {0} has sent u a message", args.Args[1]);
+                var title = FormatIt( "GameMaster {0} has sent you a message", args.Args[1]);
                 var message = (string)args.Args[0];

                 SendNotification(message, title);
@@ -625,7 +625,7 @@
         private static void OnNewProfile(BotEvents.Profile.NewProfileLoadedEventArgs args)
         {
             var title = FormatIt( "New Profile Loaded: {0}", args.NewProfile.Name);
-            var message = FormatIt( "Ur Honorbuddy instance has changed profile from {0} to {1}.", args.OldProfile.Name, args.NewProfile.Name);
+            var message = FormatIt( "Your Honorbuddy instance has changed profile from {0} to {1}.", args.OldProfile.Name, args.NewProfile.Name);
             SendNotification(message, title);
         }

@@ -642,21 +642,21 @@
         private static void OnMapChanged(BotEvents.Player.MapChangedEventArgs args)
         {
             var title = FormatIt( "Map Changed to {0}", args.NewMapName);
-            const string message = "Ur Honorbuddy instance has changed maps.";
+            const string message = "Your Honorbuddy instance has changed maps. From args.OldMapName to args.NewMapName";
             SendNotification(message, title);
         }

         private static void BGEntered(BattlegroundType type)
         {
             var title = FormatIt( "Battleground ({0}) Entered", type);
-            const string message = "Ur Honorbuddy instance has joined a battleground.";
+            const string message = "Your Honorbuddy instance has joined a battleground.on map args.NewMapName";
             SendNotification(message, title);
         }

         private static void BgLeft(EventArgs args)
         {
             const string title = "Battleground Left";
-            const string message = "Ur Honorbuddy instance has left a battleground.";
+            const string message = "Your Honorbuddy instance has left a battleground.";
             SendNotification(message, title);
         }

@@ -677,14 +677,14 @@
         private static void OnStop(EventArgs args)
         {
             const string title = "Honorbuddy Stopped";
-            const string message = "Ur Honorbuddy instance has stopped";
+            const string message = "Your Honorbuddy instance has stopped";
             SendNotification(message, title);
         }

         private static void OnStart(EventArgs args)
         {
             const string title = "Honorbuddy Started";
-            const string message = "Ur Honorbuddy instance has started";
+            const string message = "Your Honorbuddy instance has started";
             SendNotification(message, title);
         }

@@ -732,15 +732,15 @@
         {
             try
             {
-                return format == null ? "something went wrong." : string.Format(format, args).Replace("\n",Environment.NewLine);
+                return format == null ? "Something went wrong." : string.Format(format, args).Replace("\n",Environment.NewLine);
             }
             catch (Exception ex)
             {
                 Logger.FailLog("Exception Thrown: Inner => {0}   Message=> {1}",ex.InnerException,ex.Message);
-                return "something went wrong.";
+                return "Something went wrong.";
             }

         }
         #endregion
     }
-}+}


some tunning

some tunning

--- Assets/BitStrap/Plugins/Editor/FuzzyFinder/FuzzyFinder.cs
+++ Assets/BitStrap/Plugins/Editor/FuzzyFinder/FuzzyFinder.cs
@@ -7,7 +7,7 @@
 	private const int RecursionLimit = 8;

 	private const string Separators = " /\\_-";
-	private const int SequentialBonus = 20; // bonus for adjacent matches
+	private const int SequentialBonus = 30; // bonus for adjacent matches
 	private const int SeparatorBonus = 30; // bonus if match occurs after a separator
 	private const int CamelBonus = 30; // bonus if match is uppercase and prev is lower
 	private const int FirstLetterBonus = 15; // bonus if the first letter is matched


private -> protected

private -> protected

--- Assets/FancyScrollView/Sources/Runtime/FancyScrollView.cs
+++ Assets/FancyScrollView/Sources/Runtime/FancyScrollView.cs
@@ -6,10 +6,10 @@
 {
     public abstract class FancyScrollView<TItemData, TContext> : MonoBehaviour where TContext : class, new()
     {
-        [SerializeField, Range(float.Epsilon, 1f)] float cellSpacing = 0.2f;
-        [SerializeField, Range(0f, 1f)] float scrollOffset = 0.5f;
-        [SerializeField] bool loop = false;
-        [SerializeField] Transform cellContainer = default;
+        [SerializeField, Range(float.Epsilon, 1f)] protected float cellSpacing = 0.2f;
+        [SerializeField, Range(0f, 1f)] protected float scrollOffset = 0.5f;
+        [SerializeField] protected bool loop = false;
+        [SerializeField] protected Transform cellContainer = default;

         readonly IList<FancyScrollViewCell<TItemData, TContext>> pool =
             new List<FancyScrollViewCell<TItemData, TContext>>();


Added the ability to load nodes from a state machine - to be used with copying states

--- Assets/Scripts/Editor/NodeEditor/NodeEditorSaveHandler.cs
+++ Assets/Scripts/Editor/NodeEditor/NodeEditorSaveHandler.cs
@@ -45,6 +45,20 @@
                 }
             }
         }
+    }
+
+    public static List<BaseNode> LoadStateMachineNodes(StateMachine state)
+    {
+        string filePath = GetStateMachineEditorDataPath(state);
+        XmlSerializer serializer = new XmlSerializer(typeof(NodeDataContainer), GetNodeTypes());
+
+        NodeDataContainer data;
+        using (var stream = new FileStream(filePath, FileMode.Open))
+        {
+            data = (NodeDataContainer)serializer.Deserialize(stream);
+        }
+
+        return data.Nodes;
     }

     private static NodeInterface GetInterface(List<BaseNode> allNodes, int nodeID, int ifaceID)
@@ -142,6 +156,13 @@
         return dataPath;
     }

+    private static string GetStateMachineEditorDataPath(StateMachine machine)
+    {
+        string stateMachineName = machine.name;
+        CreateFolderIfNotExists(BossActionLoadHandler.DataFolder, stateMachineName);
+        return string.Format("{0}/{1}/StateMachineEditorData.xml", BossActionLoadHandler.DataFolder, stateMachineName);
+    }
+
     private static string GetStateMachineEditorDataPath(BaseEditor editor)
     {
         string stateMachineName = GetBossName(editor);


add failing test for ControlTemplate don't respect TargetType

--- tests/Avalonia.Markup.Xaml.UnitTests/Xaml/BasicTests.cs
+++ tests/Avalonia.Markup.Xaml.UnitTests/Xaml/BasicTests.cs
@@ -305,6 +305,23 @@
             Assert.NotNull(child);

             Assert.Equal("child", child.Name);
+        }
+
+        [Fact]
+        public void ControlTemplate_With_TargetType_Is_Operational()
+        {
+            var xaml = @"
+<ControlTemplate xmlns='https://github.com/avaloniaui'
+                 xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'
+                 TargetType='{x:Type ContentControl}'>
+    <ContentPresenter Content='{TemplateBinding Content}' />
+</ControlTemplate>
+";
+            var template = AvaloniaXamlLoader.Parse<ControlTemplate>(xaml);
+
+            Assert.Equal(typeof(ContentControl), template.TargetType);
+
+            Assert.IsType(typeof(ContentPresenter), template.Build(new ContentControl()).Control);
         }

         [Fact]


Add delivery ID to test webhook succes message

--- BTCPayServer/Controllers/StoresController.Integrations.cs
+++ BTCPayServer/Controllers/StoresController.Integrations.cs
@@ -126,7 +126,7 @@
             var result = await WebhookNotificationManager.TestWebhook(CurrentStore.Id, webhookId, viewModel.Type);

             if (result.Success) {
-                TempData[WellKnownTempData.SuccessMessage] = $"{viewModel.Type.ToString()} event delivered successfully!";
+                TempData[WellKnownTempData.SuccessMessage] = $"{viewModel.Type.ToString()} event delivered successfully! Delivery ID is {result.DeliveryId}";
             } else {
                 TempData[WellKnownTempData.ErrorMessage] = $"{viewModel.Type.ToString()} event could not be delivered. Error message received: {(result.ErrorMessage ?? "unknown")}";
             }


Fix VolumeLineRenderer world -> local transformation

--- ARGame/Assets/Scripts/Graphics/VolumeLineRenderer.cs
+++ ARGame/Assets/Scripts/Graphics/VolumeLineRenderer.cs
@@ -133,12 +133,7 @@
         {
             for (int i = 0; i < vertices.Count; i++)
             {
-                Vector3 worldPos = Quaternion.Inverse(transform.rotation) * (vertices[i] - transform.position);
-                vertices[i] = new Vector3(
-                    worldPos.x / transform.localScale.x,
-                    worldPos.y / transform.localScale.y,
-                    worldPos.z / transform.localScale.z
-                );
+                vertices[i] = transform.InverseTransformPoint(vertices[i]);
             }
         }


initalized markertable

initalized markertable

--- ARGame/Assets/Scripts/Projection2/PositionUpdater.cs
+++ ARGame/Assets/Scripts/Projection2/PositionUpdater.cs
@@ -22,13 +22,15 @@
 		/// register a new marker
 		/// </summary>
 		public void OnMarkerRegister(MarkerRegister reg){
-			markerTable.Add(reg.getMarker().id,reg.getMarker());
-			Debug.Log("register");
 			if(parent==null){
 				parent=reg.getMarker();
+				markerTable=new Dictionary<int, Marker>();
 			}else{
 				reg.getMarker().gameObject.transform.SetParent(parent.gameObject.transform);
 			}
+			markerTable.Add(reg.getMarker().id,reg.getMarker());
+			Debug.Log("register");
+
 		}
 		/// <summary>
 		/// gets marker with Identifier


improve the docs, explain how to use ArgumentsSource for single arugment, fixes #889

--- samples/BenchmarkDotNet.Samples/IntroArgumentsSource.cs
+++ samples/BenchmarkDotNet.Samples/IntroArgumentsSource.cs
@@ -1,5 +1,6 @@
 using System;
 using System.Collections.Generic;
+using System.Threading;
 using BenchmarkDotNet.Attributes;

 namespace BenchmarkDotNet.Samples
@@ -8,14 +9,24 @@
     {
         [Benchmark]
         [ArgumentsSource(nameof(Numbers))]
-        public double Pow(double x, double y) => Math.Pow(x, y);
+        public double ManyArguments(double x, double y) => Math.Pow(x, y);

-        public IEnumerable<object[]> Numbers()
+        public IEnumerable<object[]> Numbers() // for multiple arguments it's an IEnumerable of array of objects (object[])
         {
             yield return new object[] { 1.0, 1.0 };
             yield return new object[] { 2.0, 2.0 };
             yield return new object[] { 4.0, 4.0 };
             yield return new object[] { 10.0, 10.0 };
         }
+
+        [Benchmark]
+        [ArgumentsSource(nameof(TimeSpans))]
+        public void SingleArgument(TimeSpan time) => Thread.Sleep(time);
+
+        public IEnumerable<object> TimeSpans() // for single argument it's an IEnumerable of objects (object)
+        {
+            yield return TimeSpan.FromMilliseconds(10);
+            yield return TimeSpan.FromMilliseconds(100);
+        }
     }
 }


Layout "change register-sign up"

Layout "change register-sign up"

--- BikeMates/BikeMates.Web/Views/Shared/_LoginPartial.cshtml
+++ BikeMates/BikeMates.Web/Views/Shared/_LoginPartial.cshtml
@@ -16,7 +16,7 @@
 else
 {

-
@Html.ActionLink("Register", "Register", "Account", routeValues: null, htmlAttributes: new { id = "registerLink" })

-
@Html.ActionLink("Log in", "Login", "Account", routeValues: null, htmlAttributes: new { id = "loginLink" })

+
@Html.ActionLink("Sign up", "Register", "Account", routeValues: null, htmlAttributes: new { id = "registerLink" })

+
@Html.ActionLink("Sign in", "Login", "Account", routeValues: null, htmlAttributes: new { id = "loginLink" })

 }


Remove ReadWith/WriteWith methods

Remove ReadWith/WriteWith methods

--- Slice/Slice.cs
+++ Slice/Slice.cs
@@ -197,7 +197,6 @@
         {
             return new ReadonlySlice<T>(this);
         }
-

         /// <summary>
         /// Returns the slice contents as an array.
@@ -442,66 +441,5 @@
         {
             target(slice.array, slice.offset);
         }
-
-        /// <summary>
-        /// Read bytes to the slice using the provided reader function.
-        /// </summary>
-        /// <param name="readf">
-        ///     Reader function taking a byte array,
-        ///     offset from the beginning of the array and length to read to the array.
-        ///     Returns number of bytes read.
-        /// </param>
-        /// <returns>Number of bytes read</returns>
-        public static int ReadWith(this Slice<byte> slice, Func<byte[], int, int, int> readf)
-        {
-            if (readf == null) throw new ArgumentNullException("Slice method argument readf was null");
-            return readf(slice.array, slice.offset, slice.len);
-        }
-
-        /// <summary>
-        /// Write slice.Count bytes to the provided writer function.
-        /// </summary>
-        /// <param name="slice"></param>
-        /// <param name="writef">
-        ///     Writer function that takes a byte array,
-        ///     offset from the beginning of the array and
-        ///     number of bytes to write.
-        /// </param>
-        public static void WriteWith(this Slice<byte> slice, Action<byte[], int, int> writef)
-        {
-            if (writef == null) throw new ArgumentNullException("Slice method argument writef was null");
-            writef(slice.array, slice.offset, slice.len);
-        }
-
-        /// <summary>
-        /// Read bytes to the slice using the provided asynchronous reader function.
-        /// </summary>
-        /// <param name="readf">
-        ///     Reader function taking a byte array,
-        ///     offset from the beginning of the array and length to read to the array.
-        ///     Returns a task containing the number of bytes read.
-        /// </param>
-        /// <returns>Task with number of bytes read.</returns>
-        public static Task<int> ReadAsyncWith(this Slice<byte> slice, Func<byte[], int, int, Task<int>> readf)
-        {
-            if (readf == null) throw new ArgumentNullException("Slice method argument readf was null");
-            return readf(slice.array, slice.offset, slice.len);
-        }
-
-        /// <summary>
-        /// Write slice.Count bytes to the provided asynchronous writer function.
-        /// </summary>
-        /// <param name="writef">
-        ///     Writer function that takes a byte array,
-        ///     offset from the beginning of the array and
-        ///     number of bytes to write.
-        ///     Returns a task that is completed when the write operation finishes.
-        /// </param>
-        /// <returns>Task that completes when the write operation finishes.</returns>
-        public static Task WriteAsyncWith(this Slice<byte> slice, Func<byte[], int, int, Task> writef)
-        {
-            if (writef == null) throw new ArgumentNullException("Slice method argument writef was null");
-            return writef(slice.array, slice.offset, slice.len);
-        }
     }
 }


Fixing an issue where pawns without a combat outfit would change their outfit when undrafted

--- Source/Main.cs
+++ Source/Main.cs
@@ -423,19 +423,13 @@
                 bool found = false;
                 if (pawn.Drafted)
                 {
-                    if (outfits.TryGetBattleOutfit(out outfitToWear))
-                    {
-                        outfits.LastCivilianOutfit = pawn.outfits.CurrentOutfit;
-                        found = true;
-                    }
+                    outfits.LastCivilianOutfit = pawn.outfits.CurrentOutfit;
+                    found = outfits.TryGetBattleOutfit(out outfitToWear);
                 }
                 else
                 {
-                    if (outfits.TryGetCivilianOutfit(out outfitToWear))
-                    {
-                        outfits.LastBattleOutfit = pawn.outfits.CurrentOutfit;
-                        found = true;
-                    }
+                    outfits.LastBattleOutfit = pawn.outfits.CurrentOutfit;
+                    found = outfits.TryGetCivilianOutfit(out outfitToWear);
                 }

                 if (found)


Refactored PdfExporter

Refactored PdfExporter

--- BookStore/BookStore.Client/Core/Converters/PdfExporter.cs
+++ BookStore/BookStore.Client/Core/Converters/PdfExporter.cs
@@ -2,6 +2,7 @@
 using iTextSharp.text;
 using iTextSharp.text.pdf;
 using System.Collections;
+using System.Data.Entity;
 using System.IO;
 using System.Linq;

@@ -9,6 +10,8 @@
 {
     public class PdfExporter : IPdfExporter
     {
+        private readonly string delimiter = "***************\n";
+
         public void ExportToPdf(IBookStoreContext context)
         {
             Document doc = new Document(PageSize.LETTER, 10, 10, 42, 35);
@@ -18,24 +21,28 @@
             doc.Open();

             Paragraph paragraph = new Paragraph();
-            //TODO refactor using lambda expressions syntax
-            var query = from book in context.Books
-                        from author in book.Authors
-                        select new
-                        {
-                            Title = book.Title,
-                            Authors = author.FullName,
-                            Language = book.Language,
-                            Pages = book.Pages,
-                            Genre = book.Genre
-                        } into x
-                        select x;
+
+            var query = context.Books.Include(x => x.Authors.Select(name => name.FullName))
+                .Select(book => new
+                {
+                    Title = book.Title,
+                    Authors = book.Authors.Select(a => a.FullName),
+                    Language = book.Language,
+                    Pages = book.Pages,
+                    Genre = book.Genre
+                });

             var queryToString = query.ToList();

-            foreach (var item in queryToString as IEnumerable)
+            foreach (var item in queryToString)
             {
-                paragraph.Add($"{item.ToString()}\n");
+                paragraph.Add(
+                    $"Title: {item.Title}\n" +
+                    $"Author(s): {string.Join(",", item.Authors)}\n" +
+                    $"Language: {item.Language}\n" +
+                    $"Genre: {item.Genre}\n" +
+                    $"Pages: {item.Pages}\n" +
+                    $"{this.delimiter}");
             }

             doc.Add(paragraph);


Change OnDrop event to expose a DragEvent instead of MouseEvent (already done for other events in change with fixes Element -> HTMLElement)

Included them in that other changeset by accident

--- Bridge.React/Attributes/DomElementWithEventsAttributes.cs
+++ Bridge.React/Attributes/DomElementWithEventsAttributes.cs
@@ -37,7 +37,7 @@
 		public Action<DragEvent<TCurrentTarget>> OnDragLeave { private get; set; }
 		public Action<DragEvent<TCurrentTarget>> OnDragOver { private get; set; }
 		public Action<DragEvent<TCurrentTarget>> OnDragStart { private get; set; }
-		public Action<MouseEvent<TCurrentTarget>> OnDrop { private get; set; }
+		public Action<DragEvent<TCurrentTarget>> OnDrop { private get; set; }
 		public Action<MouseEvent<TCurrentTarget>> OnMouseDown { private get; set; }
 		public Action<MouseEvent<TCurrentTarget>> OnMouseEnter { private get; set; }
 		public Action<MouseEvent<TCurrentTarget>> OnMouseLeave { private get; set; }


Cleaned up update notifications

Cleaned up update notifications

--- CarpoolPlanner.NotificationService/NotificationManager.cs
+++ CarpoolPlanner.NotificationService/NotificationManager.cs
@@ -331,33 +331,26 @@
                             context.SaveChanges();
                     }));
                 }
-                lock (prevTripInstances)
-                {
-                    if (DateTime.Now > tripInstance.Date - FinalAdvanceNotificationTime)
-                    {
-                        if (statusChanged)
-                        {
-                            // Send a final notification update
-                            // TODO: send a special message that highlights the change, instead of just sending the whole thing again.
-                            // But make sure to mention if there are not enough drivers.
+                if (tripInstance.DriversPicked)
+                {
+                    if (statusChanged)
+                    {
+                        // Send a final notification update
+                        // TODO: send a special message that highlights the change, instead of just sending the whole thing again.
+                        // But make sure to mention if there are not enough drivers.
+                        SendFinalNotification(tripInstanceId, true);
+                    }
+                    else
+                    {
+                        // TEMP CODE for running NotificationService on my PC.
+                        // Check the DB to see if any data changed from the web app.
+                        TripInstance prevValue;
+                        if (prevTripInstances.TryGetValue(tripInstanceId, out prevValue) && HasCommuteDataChanged(tripInstance, prevValue))
+                        {
                             SendFinalNotification(tripInstanceId, true);
                         }
-                        else
-                        {
-                            // TEMP CODE for running NotificationService on my PC.
-                            // Check the DB to see if any data changed from the web app.
-                            if (tripInstance.DriversPicked)
-                            {
-                                TripInstance prevValue;
-                                if (prevTripInstances.TryGetValue(tripInstanceId, out prevValue) && HasCommuteDataChanged(tripInstance, prevValue))
-                                {
-                                    SendFinalNotification(tripInstanceId, true);
-                                }
-                            }
-                            // end temp code
-                        }
-                    }
-                    prevTripInstances[tripInstanceId] = tripInstance;
+                        // end temp code
+                    }
                 }
                 // Wait for tasks to finish before disposing the DB context.
                 await Task.WhenAll(tasks.ToArray()).ConfigureAwait(false);
@@ -463,12 +456,9 @@
                     sb.Clear();
                 }
                 context.SaveChanges();
-                if (!isUpdate)
-                {
-                    lock (prevTripInstances)
-                    {
-                        prevTripInstances[tripInstanceId] = tripInstance;
-                    }
+                lock (prevTripInstances)
+                {
+                    prevTripInstances[tripInstanceId] = tripInstance;
                 }
             }
         }


Remove check on publishing feature being active via check of web property bag

--- Core/OfficeDevPnP.Core/Extensions/NavigationExtensions.cs
+++ Core/OfficeDevPnP.Core/Extensions/NavigationExtensions.cs
@@ -44,11 +44,6 @@
             //Read all the properties of the web
             web.Context.Load(web, w => w.AllProperties);
             web.Context.ExecuteQueryRetry();
-
-            if (!ArePublishingFeaturesActivated(web.AllProperties))
-            {
-                throw new ArgumentException("Structural navigation settings are only supported for publishing sites");
-            }

             // Determine if managed navigation is used...if so the other properties are not relevant
             string webNavigationSettings = web.AllProperties.GetPropertyAsString(WebNavigationSettings);


Legger til beskrivelse av nye props i ClientConfiguration

--- Digipost.Signature.Api.Client.Core/ClientConfiguration.cs
+++ Digipost.Signature.Api.Client.Core/ClientConfiguration.cs
@@ -2,6 +2,7 @@
 using System.Collections.Generic;
 using System.Security.Cryptography.X509Certificates;
 using Digipost.Api.Client.Shared.Certificate;
+using Digipost.Signature.Api.Client.Core.Exceptions;
 using Digipost.Signature.Api.Client.Core.Internal.Asice;

 namespace Digipost.Signature.Api.Client.Core
@@ -86,8 +87,20 @@
             ((List<IDocumentBundleProcessor>) DocumentBundleProcessors).Add(documentBundleToDiskProcessor);
         }

+
+        /// <summary>
+        ///     If the client receives a 429 response code and has a header given by this variable, it is blocked by the
+        ///     DoS filter. When this happens, it is used together with <see cref="DosFilterBlockingPeriod"/> to give a
+        ///     <see cref="TooEagerPollingException"/> with a Next permitted poll time.
+        /// </summary>
+        public string DosFilterHeaderBlockingKey { get; set; } = "DoSFilter";
+
+        /// <summary>
+        ///     When the client receives a 429 response code, indicating there is a <see cref="TooEagerPollingException"/>,
+        ///     the current Organization number will be blocked for a defined time span. If blocked by the DoS-filter, the
+        ///     response message does not have a body or indicate next permitted poll time. The Next permitted poll
+        ///     time is added with a predefined time, given by this blocking period.
+        /// </summary>
         public TimeSpan DosFilterBlockingPeriod { get; set; } = TimeSpan.FromSeconds(30);
-
-        public string DosFilterHeaderBlockingKey { get; set; } = "DoSFilter";
     }
 }


touch sweeping to change ships ready

touch sweeping to change ships ready

--- Documents/Unity3D/Catcheep/Assets/Scripts/AlienManager.cs
+++ Documents/Unity3D/Catcheep/Assets/Scripts/AlienManager.cs
@@ -12,8 +12,10 @@
     public GameObject leftButton;
     public GameObject sheepHolder;

-    private GameObject spaceShip;
+    private GameObject spaceShipFroScript;
     private Vector2 edgeOfScreen;
+    private Vector2 oldPosition;
+    private Vector2 newPosition;
     private int currentSheepShowed;

     // Use this for initialization
@@ -28,22 +30,61 @@
     // Update is called once per frame
     void Update()
     {
+        if (Input.touchCount > 0 && Input.GetTouch(0).phase == TouchPhase.Began)
+        {
+            //when player presses, save that click position
+            oldPosition = Input.mousePosition;
+        }
+        if (Input.touchCount > 0 && Input.GetTouch(0).phase == TouchPhase.Ended)
+        {
+            //when player lets go, save that position
+            newPosition = Input.mousePosition;
+        }
+        //if both positions aren't null
+        if (oldPosition != new Vector2(0f, 0f) && newPosition != new Vector2(0f, 0f))
+        {
+            if (Vector2.Distance(oldPosition, newPosition) >= (edgeOfScreen.x * 0.2f) &&
+                Mathf.Abs(newPosition.y - oldPosition.y) < (edgeOfScreen.y * 0.07f))
+            {
+                if (oldPosition.x > newPosition.x)
+                {
+                    shipGoingRightButtonClicked();
+                }
+                else
+                {
+                    shipGoingRightButtonClicked();
+                }
+                oldPosition = new Vector2(0f, 0f);
+                newPosition = new Vector2(0f, 0f);
+            }
+        }
+
+        if (Input.touchCount == 0)
+        {
+            oldPosition = new Vector2(0f, 0f);
+            newPosition = new Vector2(0f, 0f);
+        }
+
+        if (Input.GetKeyDown(KeyCode.Escape))
+        {
+            startMenu();
+        }
     }

     IEnumerator alienSpawner()
     {
         deactivatingButtons();

-        spaceShip = Instantiate(alienShip, alienShip.transform.localPosition, alienShip.transform.rotation);
-        spaceShip.transform.SetParent(GameObject.Find("Canvas").transform, false);
+        spaceShipFroScript = Instantiate(alienShip, alienShip.transform.localPosition, alienShip.transform.rotation);
+        spaceShipFroScript.transform.SetParent(GameObject.Find("Canvas").transform, false);

         Vector3 destination = new Vector3(alienShip.transform.localPosition.x, -edgeOfScreen.y * 0.05f, 0f);
         do
         {
-            spaceShip.transform.localPosition =
-                Vector3.Lerp(spaceShip.transform.localPosition, destination, 2.5f * Time.deltaTime);
+            spaceShipFroScript.transform.localPosition =
+                Vector3.Lerp(spaceShipFroScript.transform.localPosition, destination, 2.5f * Time.deltaTime);
             yield return new WaitForSeconds(0.02f);
-        } while ((int) spaceShip.transform.localPosition.y > 0f);
+        } while ((int) spaceShipFroScript.transform.localPosition.y > 0f);
         activatingButtons();
     }
     IEnumerator shipLeaving()
@@ -53,12 +94,12 @@
         Vector3 destination = new Vector3(alienShip.transform.localPosition.x, edgeOfScreen.y, 0f);
         do
         {
-            spaceShip.transform.localPosition =
-                Vector3.Lerp(spaceShip.transform.localPosition, destination, 2.5f * Time.deltaTime);
+            spaceShipFroScript.transform.localPosition =
+                Vector3.Lerp(spaceShipFroScript.transform.localPosition, destination, 2.5f * Time.deltaTime);
             yield return new WaitForSeconds(0.02f);
-        } while (spaceShip.transform.localPosition.y < destination.y);
+        } while (spaceShipFroScript.transform.localPosition.y < destination.y);

-        Destroy(spaceShip.gameObject);
+        Destroy(spaceShipFroScript.gameObject);
         activatingButtons();
     }

@@ -69,18 +110,18 @@
     IEnumerator shipGoingRight()
     {
         deactivatingButtons();
-        //spaceShip.transform.localRotation = new Quaternion(spaceShip.transform.localRotation.x, spaceShip.transform.rotation.y, -5, spaceShip.transform.rotation.w);
+        //spaceShipFroScript.transform.localRotation = new Quaternion(spaceShipFroScript.transform.localRotation.x, spaceShipFroScript.transform.rotation.y, -5, spaceShipFroScript.transform.rotation.w);
         Vector3 destination = new Vector3(
             edgeOfScreen.x + alienShip.GetComponentInChildren<Image>().sprite.bounds.size.x,
-            spaceShip.transform.localPosition.y,
-            spaceShip.transform.localPosition.z);
+            spaceShipFroScript.transform.localPosition.y,
+            spaceShipFroScript.transform.localPosition.z);
         do
         {
-            spaceShip.transform.localPosition = new Vector3(spaceShip.transform.localPosition.x + 10,
-                spaceShip.transform.localPosition.y, spaceShip.transform.localPosition.z);
+            spaceShipFroScript.transform.localPosition = new Vector3(spaceShipFroScript.transform.localPosition.x + 10,
+                spaceShipFroScript.transform.localPosition.y, spaceShipFroScript.transform.localPosition.z);
             yield return new WaitForSeconds(0.01f);
-        } while ((int)spaceShip.transform.position.x < (int)destination.x * 1.3f);
-        Destroy(spaceShip.gameObject);
+        } while ((int)spaceShipFroScript.transform.position.x < (int)destination.x * 1.3f);
+        Destroy(spaceShipFroScript.gameObject);
         changingSheepPic(1);
         StartCoroutine(alienSpawner());
     }
@@ -92,18 +133,18 @@
     IEnumerator shipGoingLeft()
     {
         deactivatingButtons();
-        //spaceShip.transform.localRotation = new Quaternion(spaceShip.transform.localRotation.x, spaceShip.transform.rotation.y, -5, spaceShip.transform.rotation.w);
+        //spaceShipFroScript.transform.localRotation = new Quaternion(spaceShipFroScript.transform.localRotation.x, spaceShipFroScript.transform.rotation.y, -5, spaceShipFroScript.transform.rotation.w);
         Vector3 destination = new Vector3(
            -edgeOfScreen.x - alienShip.GetComponentInChildren<Image>().sprite.bounds.size.x,
-            spaceShip.transform.localPosition.y,
-            spaceShip.transform.localPosition.z);
+            spaceShipFroScript.transform.localPosition.y,
+            spaceShipFroScript.transform.localPosition.z);
         do
         {
-            spaceShip.transform.localPosition = new Vector3(spaceShip.transform.localPosition.x - 10,
-                spaceShip.transform.localPosition.y, spaceShip.transform.localPosition.z);
+            spaceShipFroScript.transform.localPosition = new Vector3(spaceShipFroScript.transform.localPosition.x - 10,
+                spaceShipFroScript.transform.localPosition.y, spaceShipFroScript.transform.localPosition.z);
             yield return new WaitForSeconds(0.01f);
-        } while ((int) spaceShip.transform.position.x > (int) destination.x * 0.3f);
-        Destroy(spaceShip.gameObject);
+        } while ((int) spaceShipFroScript.transform.position.x > (int) destination.x * 0.3f);
+        Destroy(spaceShipFroScript.gameObject);
         changingSheepPic(-1);
         StartCoroutine(alienSpawner());
     }


git-svn-id: 21cdf44b51306c1f0753fc51e774ecf5fc1851ba@1507 a61f9e97-bd4c-0410-8c65-85b29eaa70ff

--- Dorian/Examples/Gorgon.Graphics/Initialization/Program.cs
+++ Dorian/Examples/Gorgon.Graphics/Initialization/Program.cs
@@ -121,7 +121,7 @@
 			// Clear the swap chain.
 			_swap.Clear(_clearColor);

-			// Animate our clear color so we know what's going on.
+			// Animate our clear color so we have something to look at instead of a blank screen.
 			_clearColor = new GorgonColor(
 				_clearColor.Red + (GorgonTiming.Delta * _colorDirection * 0.0125f),
 				_clearColor.Green + (GorgonTiming.Delta * _colorDirection * 0.0125f),


-slot 12 search wasn't working

-slot 12 search wasn't working

--- SpellParser.cs
+++ SpellParser.cs
@@ -2663,9 +2663,10 @@
         /// <summary>
         /// Search all spell slots for a certain effect using a SPA match.
         /// </summary>
+        /// <param name="slot">0 to check or slots, or a value between 1 and 12.</param>
         public bool HasEffect(int spa, int slot)
         {
-            if (slot > 0 && slot < Slots.Length)
+            if (slot > 0 && slot <= Slots.Length)
                 return Slots[slot - 1].SPA == spa;

             for (int i = 0; i < Slots.Length; i++)
@@ -2686,7 +2687,7 @@
             if (Int32.TryParse(text, out spa))
                 return HasEffect(spa, slot);

-            if (slot > 0 && slot < Slots.Length)
+            if (slot > 0 && slot <= Slots.Length)
                 return Slots[slot - 1].Desc != null && Slots[slot - 1].Desc.IndexOf(text, StringComparison.InvariantCultureIgnoreCase) >= 0;

             for (int i = 0; i < Slots.Length; i++)
@@ -2702,7 +2703,7 @@
         /// <param name="slot">0 to check or slots, or a value between 1 and 12.</param>
         public bool HasEffect(Regex re, int slot)
         {
-            if (slot > 0 && slot < Slots.Length)
+            if (slot > 0 && slot <= Slots.Length)
                 return Slots[slot - 1].Desc != null && re.IsMatch(Slots[slot - 1].Desc);

             for (int i = 0; i < Slots.Length; i++)


More tests.

More tests.

--- Gu.Analyzers.Test/GU0014PreferParameterTests/HappyPath.cs
+++ Gu.Analyzers.Test/GU0014PreferParameterTests/HappyPath.cs
@@ -101,6 +101,48 @@
         }

         [Test]
+        public void IgnoreWhenSideEffect()
+        {
+            var testCode = @"
+namespace RoslynSandbox
+{
+    public class Foo
+    {
+        public Foo(string text)
+        {
+            this.Text = text.ToLower();
+            var temp = this.Text;
+        }
+
+        public string Text { get; }
+    }
+}";
+
+            AnalyzerAssert.Valid(Analyzer, testCode);
+        }
+
+        [Test]
+        public void IgnoreWhenAssignedWithAddition()
+        {
+            var testCode = @"
+namespace RoslynSandbox
+{
+    public class Foo
+    {
+        public Foo(int value)
+        {
+            this.Value = value + 1;
+            var temp = this.Value;
+        }
+
+        public int Value { get; }
+    }
+}";
+
+            AnalyzerAssert.Valid(Analyzer, testCode);
+        }
+
+        [Test]
         public void IgnoreMutableInLambda()
         {
             var testCode = @"
@@ -123,4 +165,4 @@
             AnalyzerAssert.Valid(Analyzer, testCode);
         }
     }
-}+}


-skip invalid spell description entries

-skip invalid spell description entries

--- SpellParser.cs
+++ SpellParser.cs
@@ -2023,6 +2023,9 @@
                     {
                         string line = text.ReadLine();
                         string[] fields = line.Split('^');
+                        if (fields.Length < 3)
+                            continue;
+
                         // 0 = id in type
                         // 1 = type
                         // 2 = description


Add a test that projects to a struct from an empty traversal (in search of a bug).

--- test/ExRam.Gremlinq.Core.Tests/QueryExecutionTest.cs
+++ test/ExRam.Gremlinq.Core.Tests/QueryExecutionTest.cs
@@ -2672,6 +2672,21 @@
         }

         [Fact]
+        public virtual async Task Project_to_type_from_empty_traversal()
+        {
+            await _g
+                .V()
+                .Limit(0)
+                .Project(_ => _
+                    .To<ProjectRecordStruct>()
+                    .By(x => x.In, __ => __.Identity())
+                    .By(x => x.Out, __ => __.Identity())
+                    .By(x => x.Count, __ => __.Identity())
+                    .By(x => x.Properties, __ => __.Identity()))
+                .Verify();
+        }
+
+        [Fact]
         public virtual async Task Project_to_type_with_select()
         {
             await _g


fix: Test failing

fix: Test failing

* LockedUntil was throwing NotImplementedException making the tests fail

--- test/Helsenorge.Messaging.Tests/Mocks/MockMessage.cs
+++ test/Helsenorge.Messaging.Tests/Mocks/MockMessage.cs
@@ -127,7 +127,7 @@

         public int DeliveryCount => 0;

-        public DateTime LockedUntil => throw new NotImplementedException();
+        public DateTime LockedUntil => DateTime.UtcNow.AddSeconds(60);

         public Stream GetBody()
         {


fixed lfg members player menu (in lfg message) showing only leader data


Add selectpicker to articles.

Add selectpicker to articles.