Instagram: Added caching/serialization methods to the InstagramUser class

--- Skybrud.Social/Skybrud.Social/Instagram/Objects/InstagramUser.cs
+++ Skybrud.Social/Skybrud.Social/Instagram/Objects/InstagramUser.cs
@@ -1,4 +1,5 @@
 using System;
+using System.IO;
 using System.Xml.Linq;
 using Skybrud.Social.Json;

@@ -7,6 +8,11 @@
     public class InstagramUser {

         #region Properties
+
+        /// <summary>
+        /// Gets the internal JsonObject the object was created from.
+        /// </summary>
+        public JsonObject JsonObject { get; private set; }

         public long Id { get; private set; }
         public string Username { get; private set; }
@@ -27,6 +33,24 @@

         #region Member methods

+        /// <summary>
+        /// Gets a JSON string representing the object.
+        /// </summary>
+        public string ToJson() {
+            return JsonObject == null ? null : JsonObject.ToJson();
+        }
+
+        /// <summary>
+        /// Save the object to a JSON file at the specified <var>path</var>.
+        /// </summary>
+        /// <param name="path">The path to save the file.</param>
+        public void SaveJson(string path) {
+            File.WriteAllText(path, ToJson());
+        }
+
+        /// <summary>
+        /// Gets an XML string representing the object.
+        /// </summary>
         public XElement ToXElement() {
             return new XElement(
                 "User",
@@ -43,6 +67,30 @@

         #region Static methods

+        /// <summary>
+        /// Load a user from the JSON file at the specified <var>path</var>.
+        /// </summary>
+        /// <param name="path">The path to the file.</param>
+        public static InstagramUser LoadJson(string path) {
+            return ParseJson(File.ReadAllText(path));
+        }
+
+        /// <summary>
+        /// Gets a user from the specified JSON string.
+        /// </summary>
+        /// <param name="json">The JSON string representation of the object.</param>
+        public static InstagramUser ParseJson(string json) {
+            return Parse(JsonConverter.ParseObject(json));
+        }
+
+        /// <summary>
+        /// Gets a user from the specified <var>XElement</var>.
+        /// </summary>
+        /// <param name="xUser">The instance of <var>XElement</var> to parse.</param>
+        [Obsolete(
+            "This method will must likely be removed in the future since the server responses " +
+            "are retrieved as JSON rather than XML."
+        )]
         public static InstagramUser Parse(XElement xUser) {
             string website = SocialUtils.GetElementValueOrDefault<string>(xUser, "Website");
             string bio = SocialUtils.GetElementValueOrDefault<string>(xUser, "Bio");
@@ -56,12 +104,17 @@
             };
         }

-        internal static InstagramUser Parse(JsonObject obj) {
+        /// <summary>
+        /// Gets a user from the specified <var>JsonObject</var>.
+        /// </summary>
+        /// <param name="obj">The instance of <var>JsonObject</var> to parse.</param>
+        public static InstagramUser Parse(JsonObject obj) {
             string fullname = obj.GetString("full_name");
             string picture = obj.GetString("profile_picture");
             string website = obj.GetString("website");
             string bio = obj.GetString("bio");
             return new InstagramUser {
+                JsonObject = obj,
                 Id = obj.GetLong("id"),
                 Username = obj.GetString("username"),
                 FullName = String.IsNullOrEmpty(fullname) ? null : fullname,
@@ -71,6 +124,10 @@
             };
         }

+        /// <summary>
+        /// Gets an array of multiple users from the specified <var>JsonArray</var>.
+        /// </summary>
+        /// <param name="array">The instance of <var>JsonArray</var> to parse.</param>
         public static InstagramUser[] ParseMultiple(JsonArray array) {
             return array == null ? new InstagramUser[0] : array.ParseMultiple(Parse);
         }


Remove self parameter from MonoModRule.Flag / Data methods

--- MonoMod/InlineRT/MonoModRule.cs
+++ MonoMod/InlineRT/MonoModRule.cs
@@ -86,15 +86,15 @@

         public static class Flag {

-            public static bool Get(MonoModder self, string k) => MonoModder.Data[k] as bool? ?? false;
-            public static void Set(MonoModder self, string k, bool v) => MonoModder.Data[k] = v;
+            public static bool Get(string k) => MonoModder.Data[k] as bool? ?? false;
+            public static void Set(string k, bool v) => MonoModder.Data[k] = v;

         }

         public static class Data {

-            public static object Get(MonoModder self, string k) => MonoModder.Data[k];
-            public static void Set(MonoModder self, string k, object v) => MonoModder.Data[k] = v;
+            public static object Get(string k) => MonoModder.Data[k];
+            public static void Set(string k, object v) => MonoModder.Data[k] = v;

         }


ModuleContainer review

ModuleContainer review

--- NancyHostLib/ModuleContainer.cs
+++ NancyHostLib/ModuleContainer.cs
@@ -90,16 +90,17 @@
             if (loadedAssemblies.Count == 0)
             {
                 // register assembly resolution for our loaded modules
+                AppDomain.CurrentDomain.AssemblyResolve -= CurrentDomain_AssemblyResolve;
                 AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve;
             }

             // load current assemblies code to register their types and avoid duplicity
             foreach (var a in AppDomain.CurrentDomain.GetAssemblies ())
             {
-                if (!a.GlobalAssemblyCache && !a.IsDynamic && !loadedAssemblies.ContainsKey (a.FullName))
+                if (!a.IsDynamic && !loadedAssemblies.ContainsKey (a.FullName))
                 {
                     loadedAssemblies[a.FullName] = a;
-                    if (!blackListedAssemblies.Contains (ParseAssemblyName (a.FullName)))
+                    if (!a.GlobalAssemblyCache && !blackListedAssemblies.Contains (ParseAssemblyName (a.FullName)))
                         validAssemblies.Add (a);
                 }
             }
@@ -279,20 +280,21 @@
             Assembly a;
             if (!loadedAssemblies.TryGetValue (args.Name, out a))
             {
+                var aName = new AssemblyName (args.Name);
                 if (!args.RequestingAssembly.IsDynamic && !args.RequestingAssembly.GlobalAssemblyCache)
                 {
-                    var path = Path.Combine (Path.GetDirectoryName (args.RequestingAssembly.Location), ParseAssemblyName(args.Name));
+                    var path = Path.Combine (Path.GetDirectoryName (args.RequestingAssembly.Location), aName.Name);
                     if (File.Exists (path + ".dll"))
                         LoadAssembly (new FileInfo (path + ".dll"), null);
                     else if (File.Exists (path + ".exe"))
                         LoadAssembly (new FileInfo (path + ".exe"), null);
                     loadedAssemblies.TryGetValue (args.Name, out a);
                 }
-                if (a == null)
-                {
-                    throw new InvalidOperationException (
-                        String.Format ("Assembly not available in plugin/modules path; assembly name '{0}'.", args.Name));
-                }
+                //if (a == null)
+                //{
+                //    throw new InvalidOperationException (
+                //        String.Format ("Assembly not available in plugin/modules path; assembly name '{0}'.", args.Name));
+                //}
             }
             return a;
         }


Namespace adjustment.

Namespace adjustment.

--- tungsten.core/Wpf/WpfRadioButton.cs
+++ tungsten.core/Wpf/WpfRadioButton.cs
@@ -1,4 +1,6 @@
-namespace tungsten.core.Wpf.Base
+using tungsten.core.Wpf.Base;
+
+namespace tungsten.core.Wpf
 {
     public class WpfRadioButton : WpfRadioButtonBase<System.Windows.Controls.RadioButton>, IRegisteredElement
     {


LoadAllLazy gone

LoadAllLazy gone

--- Signum.Engine/Schema/Schema.cs
+++ Signum.Engine/Schema/Schema.cs
@@ -498,21 +498,6 @@
         {
             ((Lazy<T>)obj).ResetPublicationOnly();
         }
-
-        public static void LoadAllLazy()
-        {
-            foreach (var lazy in registeredLazyList)
-            {
-                giLoadLazy.GetInvoker(lazy.GetType().GetGenericArguments().Single())(lazy);
-            }
-        }
-
-        static GenericInvoker<Action<object>> giLoadLazy = new GenericInvoker<Action<object>>(obj => LoadLazy<int>(obj));
-
-        static void LoadLazy<T>(object obj)
-        {
-            ((Lazy<T>)obj).Load();
-        }
     }

     internal interface IEntityEvents


iOS fix.

iOS fix.

--- Sensus.Shared/Probes/PollingProbe.cs
+++ Sensus.Shared/Probes/PollingProbe.cs
@@ -348,7 +348,7 @@
                 // on ios we do significant-change polling, which can override scheduled polls. don't check for polling delays if the scheduled polls are overridden.
                 if (_significantChangePoll && _significantChangePollOverridesScheduledPolls)
                 {
-                    return resultEvents;
+                    return result;
                 }
 #endif


Improved n-th child selectors

Improved n-th child selectors

--- AngleSharp/Parser/Css/CssSelectorConstructor.cs
+++ AngleSharp/Parser/Css/CssSelectorConstructor.cs
@@ -13,7 +13,7 @@
     /// Class for construction for CSS selectors as specified in
     /// http://www.w3.org/html/wg/drafts/html/master/selectors.html.
     /// </summary>
-    [DebuggerStepThrough]
+    //[DebuggerStepThrough]
     sealed class CssSelectorConstructor
     {
         #region Constants
@@ -889,22 +889,25 @@
         {
 			public Boolean Match(IElement element)
             {
-                var parent = element.Parent;
+                var parent = element.ParentElement;

                 if (parent == null)
                     return false;
-
-                var n = 1;
-
-                for (var i = 0; i < parent.ChildNodes.Length; i++)
-                {
-                    if (parent.ChildNodes[i] == element)
-                        return step == 0 ? n == offset : (n - offset) % step == 0;
-                    else if (parent.ChildNodes[i] is IElement)
-                        n++;
-                }
-
-                return true;
+                else if (step == 0)
+                    return parent.ChildElementCount >= offset && offset > 0 && parent.Children[offset - 1] == element;
+
+                var n = Math.Sign(step);
+
+                for (var i = 0; i < parent.ChildElementCount; i++)
+                {
+                    if (parent.Children[i] == element)
+                    {
+                        var diff = i + 1 - offset;
+                        return diff == 0 || (Math.Sign(diff) == n && diff % step == 0);
+                    }
+                }
+
+                return false;
             }

             public String Text
@@ -924,18 +927,21 @@

                 if (parent == null)
                     return false;
-
-                var n = 1;
-
-                for (var i = parent.ChildNodes.Length - 1; i >= 0; i--)
-                {
-                    if (parent.ChildNodes[i] == element)
-                        return step == 0 ? n == offset : (n - offset) % step == 0;
-                    else if (parent.ChildNodes[i] is IElement)
-                        n++;
-                }
-
-                return true;
+                else if (step == 0)
+                    return parent.ChildElementCount >= offset && offset > 0 && parent.Children[parent.ChildElementCount - offset] == element;
+
+                var n = Math.Sign(step);
+
+                for (var i = parent.ChildElementCount - 1; i >= 0; i--)
+                {
+                    if (parent.Children[i] == element)
+                    {
+                        var diff = i + 1 - offset;
+                        return diff == 0 || (Math.Sign(diff) == n && diff % step == 0);
+                    }
+                }
+
+                return false;
             }

             public String Text
@@ -976,12 +982,10 @@
                 if (parent == null)
                     return false;

-                for (var i = 0; i <= parent.ChildNodes.Length; i++)
-                {
-                    if (parent.ChildNodes[i] == element)
-                        return true;
-                    else if (parent.ChildNodes[i] is IElement)
-                        return false;
+                for (var i = 0; i < parent.ChildNodes.Length; i++)
+                {
+                    if (parent.ChildNodes[i].NodeType == NodeType.Element)
+                        return parent.ChildNodes[i] == element;
                 }

                 return false;
@@ -1015,17 +1019,15 @@

 			public Boolean Match(IElement element)
             {
-                var parent = element.ParentElement;
+                var parent = element.Parent;

                 if (parent == null)
                     return false;

                 for (var i = parent.ChildNodes.Length - 1; i >= 0; i--)
                 {
-                    if (parent.ChildNodes[i] == element)
-                        return true;
-                    else if (parent.ChildNodes[i] is IElement)
-                        return false;
+                    if (parent.ChildNodes[i].NodeType == NodeType.Element)
+                        return parent.ChildNodes[i] == element;
                 }

                 return false;


Change jQuery CDN to Google for consistency with the rest of the network

--- App/StackExchange.DataExplorer/AssetPackager.cs
+++ App/StackExchange.DataExplorer/AssetPackager.cs
@@ -93,7 +93,7 @@
                         }
                     },
                     {
-                        "jquery", new AssetCollection("http://ajax.microsoft.com/ajax/jquery/jquery-1.7.1.min.js")
+                        "jquery", new AssetCollection("//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js")
                         {
                             "/Scripts/jquery-1.7.1.js"
                         }


Fixed LoadNextLevelFadeIn() in GameSceneManager.cs

--- Assets/Scripts/SceneManager/GameSceneManager.cs
+++ Assets/Scripts/SceneManager/GameSceneManager.cs
@@ -118,7 +118,7 @@

     public IEnumerator LoadNextLevelFadeIn()
     {
-        yield return StartCoroutine(LoadLevelFadeIn(+1, true));
+        yield return StartCoroutine(LoadLevelFadeIn(SceneManager.GetActiveScene().buildIndex + 1, true));
     }

     public void SetCanvasEnabled(bool enabled)


prevent a crash if the new property DerivationStrategies is notset at invoice level

--- BTCPayServer/Services/Invoices/InvoiceEntity.cs
+++ BTCPayServer/Services/Invoices/InvoiceEntity.cs
@@ -172,16 +172,18 @@
         public DerivationStrategyBase GetDerivationStrategy(BTCPayNetwork network)
         {
 #pragma warning disable CS0618
-            JObject strategies = JObject.Parse(DerivationStrategies);
-#pragma warning restore CS0618
-            foreach (var strat in strategies.Properties())
-            {
-                if (strat.Name == network.CryptoCode)
-                {
-                    return BTCPayServer.DerivationStrategy.Parse(strat.Value.Value<string>(), network).DerivationStrategyBase;
+            if (!string.IsNullOrEmpty(DerivationStrategies))
+            {
+                JObject strategies = JObject.Parse(DerivationStrategies);
+#pragma warning restore CS0618
+                foreach (var strat in strategies.Properties())
+                {
+                    if (strat.Name == network.CryptoCode)
+                    {
+                        return BTCPayServer.DerivationStrategy.Parse(strat.Value.Value<string>(), network).DerivationStrategyBase;
+                    }
                 }
             }
-
 #pragma warning disable CS0618
             if (network.IsBTC && !string.IsNullOrEmpty(DerivationStrategy))
             {


WIP, trying to fix reflection test (Updated by TFS to TFS Connector, server: http://1x:8080/, id 6418. )

git-tfs-id: [https://tfs.caes.ucdavis.edu:8088/tfs/DefaultCollection]$/CRP/Trunk/CRP;C1066

--- CRP.Tests/Repositories/CouponRepositoryTests.cs
+++ CRP.Tests/Repositories/CouponRepositoryTests.cs
@@ -1605,7 +1605,7 @@
             }));
             expectedFields.Add(new NameAndType("DiscountAmount", "System.Decimal", new List<string>
             {
-                "[UCDArch.Core.NHibernateValidator.Extensions.RangeDoubleAttribute(Min = 0.01, Message = \"must be more than $0.00\", Max = 922337203685477)]"
+                "[UCDArch.Core.NHibernateValidator.Extensions.RangeDoubleAttribute(Min = 0.01, Max = 922337203685477, Message = \"must be more than $0.00\")]"
             }));
             expectedFields.Add(new NameAndType("DiscountAmountCostPerItem", "System.Boolean", new List<string>
             {


Update Configuration.cs

Update Configuration.cs

--- Source/Common/Configuration.cs
+++ Source/Common/Configuration.cs
@@ -24,19 +24,19 @@

 		/// <summary>
 		/// If <c>true</c> - data providers will try to use standard ADO.NET interfaces instead of provider-specific functionality when possible. This option could be usefull if you need to intercept
-		/// database calls using tools like <see cref="https://github.com/MiniProfiler/dotnet">MiniProfiler</see>.
+		/// database calls using tools such as <see cref="https://github.com/MiniProfiler/dotnet">MiniProfiler</see>.
 		/// Default value: <c>false</c>.
 		/// </summary>
 		public static bool AvoidSpecificDataProviderAPI;

 		/// <summary>
-		/// LINQ queries settings.
+		/// LINQ query settings.
 		/// </summary>
 		[PublicAPI]
 		public static class Linq
 		{
 			/// <summary>
-			/// Controls when group data for LINQ queries, that end with GroupBy will be loaded:
+			/// Controls how group data for LINQ queries ended with GroupBy will be loaded:
 			/// - if <c>true</c> - group data will be loaded together with main query, resulting in 1 + N queries, where N - number of groups;
 			/// - if <c>false</c> - group data will be loaded when you call enumerator for specific group <see cref="System.Linq.IGrouping{TKey, TElement}"/>.
 			/// Default value: <c>false</c>.


Remove customer phone number. It must be unique and real, which makes it difficult to test.

--- ShopifySharp.Tests/Customer_Tests.cs
+++ ShopifySharp.Tests/Customer_Tests.cs
@@ -63,7 +63,6 @@
             Assert.Equal(Fixture.FirstName, customer.FirstName);
             Assert.Equal(Fixture.LastName, customer.LastName);
             Assert.Equal(Fixture.Note, customer.Note);
-            Assert.Equal(Fixture.Phone, customer.Phone);
             Assert.NotNull(customer.Addresses);
             Assert.NotNull(customer.DefaultAddress);
         }
@@ -207,8 +206,6 @@
         public string LastName => "Doe";

         public string Note => "Test note about this customer.";
-
-        public string Phone => "+1 613-556-1212";

         public async Task InitializeAsync()
         {
@@ -259,7 +256,6 @@
                         Default = true,
                     }
                 },
-                Phone = Phone,
                 VerifiedEmail = true,
                 Note = Note,
                 State = "enabled"


SetImplementations fix

SetImplementations fix

--- Signum.Web/Facades/EntitySettings.cs
+++ Signum.Web/Facades/EntitySettings.cs
@@ -242,7 +242,8 @@
                 return OverrideImplementations[route];

             if (route.PropertyRouteType == PropertyRouteType.MListItems || route.PropertyRouteType == PropertyRouteType.LiteEntity)
-                return FindImplementations(route.Parent);
+                return SchemaSettings.ToImplementations(route.Parent, route.Type.CleanType(), route.Parent.FieldInfo.GetCustomAttributes(true).Cast<Attribute>().ToArray());
+

             return SchemaSettings.ToImplementations(route, route.Type.CleanType(), route.FieldInfo.GetCustomAttributes(true).Cast<Attribute>().ToArray());
         }


Increace alpha cuttoff value enough so that we can see the significant figure in the md table (#178)

--- Source/Tests/Material_Alpha.cs
+++ Source/Tests/Material_Alpha.cs
@@ -23,7 +23,7 @@
             {
                 new Property(Propertyname.AlphaMode_Mask, glTFLoader.Schema.Material.AlphaModeEnum.MASK, group:1),
                 new Property(Propertyname.AlphaMode_Blend, glTFLoader.Schema.Material.AlphaModeEnum.BLEND, group:1),
-                new Property(Propertyname.AlphaCutoff, 0.01f),
+                new Property(Propertyname.AlphaCutoff, 0.2f),
                 new Property(Propertyname.DoubleSided, true),
                 new Property(Propertyname.BaseColorFactor, new Vector4(1.0f, 1.0f, 1.0f, 0.6f), Propertyname.AlphaMode_Mask)
             };


Rework Cancel Order method to use new order types

--- Common/Securities/SecurityTransactionManager.cs
+++ Common/Securities/SecurityTransactionManager.cs
@@ -256,18 +256,17 @@
                 }

                 var order = Orders[orderId];
-                if (order.Status != OrderStatus.Submitted)
+                if (order.Status != OrderStatus.Submitted && order.Type != OrderType.Market)
                 {
                     Log.Error("Security.TransactionManager.RemoveOutstandingOrder(): Order already filled");
                     return;
                 }

-                var orderToRemove = new Order("", order.SecurityType,  0, OrderType.Market, new DateTime())
-                {
-                    Id = orderId,
-                    Status = OrderStatus.Canceled
-                };
-                OrderQueue.Enqueue(orderToRemove);
+                //Update the status of the order
+                order.Status = OrderStatus.Canceled;
+
+                //Send back to queue to be reprocessed with new status
+                OrderQueue.Enqueue(order);
             }
             catch (Exception err)
             {


Updated Settings to rev 131

Updated Settings to rev 131

--- SourceFiles/Common/Settings.cs
+++ SourceFiles/Common/Settings.cs
@@ -185,6 +185,11 @@
         public const float MaxRotationSquared = (MaxRotation * MaxRotation);

         /// <summary>
+        /// Maximum number of sub-steps per contact in continuous physics simulation.
+        /// </summary>
+        public const int MaxSubSteps = 8;
+
+        /// <summary>
         /// Friction mixing law. Feel free to customize this.
         /// </summary>
         /// <param name="friction1">The friction1.</param>


Tone down the level of newer C#

Tone down the level of newer C#

--- StackExchange.Adzerk/Client.cs
+++ StackExchange.Adzerk/Client.cs
@@ -317,7 +317,8 @@

                 foreach (var flightId in flightIds)
                 {
-                    resultResponse.Flights.TryGetValue(flightId.ToString(), out EntityInstantReport entityInstantReport);
+                    EntityInstantReport entityInstantReport = null;
+                    resultResponse.Flights.TryGetValue(flightId.ToString(), out entityInstantReport);
                     result[flightId] = entityInstantReport;
                 }


Don't call .Contains on a null string

Don't call .Contains on a null string

--- SteamAuth/SteamGuardAccount.cs
+++ SteamAuth/SteamGuardAccount.cs
@@ -139,9 +139,9 @@
             Regex confKeyRegex = new Regex("data-key=\"(\\d+)\"");
             Regex confDescRegex = new Regex("
((Confirm|Trade with|Sell -) .+)
");

-            if (!(confIDRegex.IsMatch(response) && confKeyRegex.IsMatch(response) && confDescRegex.IsMatch(response)))
-            {
-                if (response == null || !response.Contains("
Nothing to confirm
"))
+            if (response == null || !(confIDRegex.IsMatch(response) && confKeyRegex.IsMatch(response) && confDescRegex.IsMatch(response)))
+            {
+                if (!response.Contains("
Nothing to confirm
"))
                 {
                     throw new WGTokenInvalidException();
                 }


Style: Use ? operator

Style: Use ? operator

--- Snowflake/Emulator/EmulatorBridge.cs
+++ Snowflake/Emulator/EmulatorBridge.cs
@@ -50,15 +50,7 @@
             foreach (var configurationValue in configProfile.ConfigurationValues)
             {
                 Type configurationvalueType = configurationValue.Value.GetType();
-                string stringValue;
-                if (configurationvalueType == typeof(bool))
-                {
-                    stringValue = configTemplate.BooleanMapping.FromBool(configurationValue.Value);
-                }
-                else
-                {
-                    stringValue = configurationValue.Value.ToString();
-                }
+                string stringValue = configurationvalueType == typeof(bool) ? configTemplate.BooleanMapping.FromBool(configurationValue.Value) : configurationValue.Value.ToString();
                 template.Replace($"{{{configurationValue.Key}}}", stringValue);
             }
             return template.ToString();


fixes some bugs with the shuttleconsole (#4517)

* fixes some bugs with the shuttleconsole

* Update Content.Server/Shuttles/ShuttleConsoleSystem.cs

Co-authored-by: ShadowCommander <8ccf96afea104efd74f7b4cb01740b5b59c49159@users.noreply.github.com>

Co-authored-by: Paul <c3374997ad598fb25d09e9f8e2f6a0906f3d4a58@googlemail.com>
Co-authored-by: ShadowCommander <8ccf96afea104efd74f7b4cb01740b5b59c49159@users.noreply.github.com>

--- Content.Server/Shuttles/ShuttleConsoleSystem.cs
+++ Content.Server/Shuttles/ShuttleConsoleSystem.cs
@@ -9,6 +9,7 @@
 using Content.Shared.Tag;
 using Robust.Shared.GameObjects;
 using Robust.Shared.Localization;
+using Robust.Shared.Utility;

 namespace Content.Server.Shuttles
 {
@@ -89,7 +90,7 @@
             {
                 RemovePilot(pilotComponent);

-                if (console != component)
+                if (console == component)
                 {
                     return;
                 }
@@ -160,7 +161,7 @@

         public void ClearPilots(ShuttleConsoleComponent component)
         {
-            foreach (var pilot in component.SubscribedPilots)
+            while (component.SubscribedPilots.TryGetValue(0, out var pilot))
             {
                 RemovePilot(pilot);
             }


Add checks for rewardName & description. Add dev log

--- OverTool/List/ListAchivement.cs
+++ OverTool/List/ListAchivement.cs
@@ -38,6 +38,8 @@

         public void Parse(Dictionary<ushort, List<ulong>> track, Dictionary<ulong, Record> map, CASCHandler handler, bool quiet, OverToolFlags flags)
         {
+            bool ex = System.Diagnostics.Debugger.IsAttached || flags.Expert;
+
             Console.Out.WriteLine("Listing Achievements");
             foreach (ulong key in track[0x68])
             {
@@ -72,10 +74,22 @@
                     string rewardName = reward.Item1;
                     STUD rewardStud = reward.Item2;
                     IInventorySTUDInstance rewardInstance = reward.Item3;
+
+                    if (ex) {
+                        Console.Out.WriteLine("{0} ({1:X16})", achievementName, GUID.LongKey(key));
+                    } else {
+                        Console.Out.WriteLine(achievementName);
+                    }

-                    Console.Out.WriteLine(achievementName);
-                    Console.Out.WriteLine("\t{0} ({1} {2})", rewardName, rewardInstance.Header.rarity, rewardStud.Instances[0].Name);
-                    Console.Out.WriteLine("\t{0}", achievementDescription);
+                    if (rewardName != null) {
+                        Console.Out.WriteLine("\tReward: {0} ({1} {2})", rewardName, rewardInstance.Header.rarity, rewardStud.Instances[0].Name);
+                    }
+
+                    if (achievementDescription != null) {
+                        Console.Out.WriteLine("\tDescription: {0}", achievementDescription);
+                    }
+
+
                 }
             }
         }


sealing main class

sealing main class

--- Synology/SynologyConnection.cs
+++ Synology/SynologyConnection.cs
@@ -13,7 +13,7 @@

 namespace Synology
 {
-    public class SynologyConnection : IDisposable
+    public sealed class SynologyConnection : IDisposable
     {
         private readonly HttpClient _client;
         public readonly Logger Logger = LogManager.GetCurrentClassLogger();


add util method

add util method

--- TCC.Core/Utilities/TccUtils.cs
+++ TCC.Core/Utilities/TccUtils.cs
@@ -121,5 +121,9 @@
             return WindowManager.ViewModels.Class.CurrentManager as C;
         }

+        public static Race RaceFromTemplateId(int templateId)
+        {
+            return (Race) ((templateId - 10000) / 100);
+        }
     }
 }


Make hitobjects a bit more visual

Make hitobjects a bit more visual

--- osu.Desktop.VisualTests/Tests/TestCaseScrollingHitObjects.cs
+++ osu.Desktop.VisualTests/Tests/TestCaseScrollingHitObjects.cs
@@ -118,6 +118,7 @@
         protected override void Update()
         {
             base.Update();
+
             topTime.Text = Time.Current.ToString("#,#");
             bottomTime.Text = (Time.Current + timeRangeBindable.Value).ToString("#,#");
         }
@@ -152,6 +153,7 @@

         private class TestDrawableHitObject : DrawableHitObject
         {
+            private readonly Box background;
             private const float height = 14;

             public TestDrawableHitObject(HitObject hitObject)
@@ -165,7 +167,7 @@

                 Children = new Drawable[]
                 {
-                    new Box
+                    background = new Box
                     {
                         RelativeSizeAxes = Axes.X,
                         Height = height,
@@ -187,6 +189,19 @@
                     }
                 };
             }
+
+            protected override void LoadComplete()
+            {
+                base.LoadComplete();
+                FadeInFromZero(250, EasingTypes.OutQuint);
+            }
+
+            protected override void Update()
+            {
+                base.Update();
+                if (Time.Current >= HitObject.StartTime)
+                    background.Colour = Color4.Red;
+            }
         }
     }
 }


Update osu!taiko TestSceneInputDrum with InputDrum changes for touch controls

--- osu.Game.Rulesets.Taiko.Tests/Skinning/TestSceneInputDrum.cs
+++ osu.Game.Rulesets.Taiko.Tests/Skinning/TestSceneInputDrum.cs
@@ -31,7 +31,7 @@
                     Anchor = Anchor.Centre,
                     Origin = Anchor.Centre,
                     Size = new Vector2(200),
-                    Child = new InputDrum(playfield.HitObjectContainer)
+                    Child = new InputDrum()
                 }
             });
         }


create list marker based on its level

create list marker based on its level

--- osu.Game/Graphics/Containers/Markdown/OsuMarkdownListItem.cs
+++ osu.Game/Graphics/Containers/Markdown/OsuMarkdownListItem.cs
@@ -43,7 +43,7 @@
         private void load()
         {
             var marker = parentTextComponent.CreateSpriteText();
-            marker.Text = "●";
+            marker.Text = createTextMarker();
             marker.Font = OsuFont.GetFont(size: marker.Font.Size / 2);
             marker.Origin = Anchor.Centre;
             marker.X = -default_left_padding / 2;
@@ -51,5 +51,20 @@

             AddInternal(marker);
         }
+
+        private string createTextMarker()
+        {
+            switch (level)
+            {
+                case 1:
+                    return "●";
+
+                case 2:
+                    return "○";
+
+                default:
+                    return "■";
+            }
+        }
     }
 }


Start NotificationReceiver on device boot up

--- DrHandy.Droid/Receivers/NotificationReceiver.cs
+++ DrHandy.Droid/Receivers/NotificationReceiver.cs
@@ -18,6 +18,7 @@

 namespace DrHandy.Droid.Receivers {
     [BroadcastReceiver]
+    [IntentFilter(new[] { Intent.ActionBootCompleted })]
     public class NotificationReceiver : BroadcastReceiver {

         public override void OnReceive(Context context, Intent intent) {


RemovePlaylistCommand is now a ReactiveCommand

--- Espera/Espera.View/ViewModels/ShellViewModel.cs
+++ Espera/Espera.View/ViewModels/ShellViewModel.cs
@@ -145,6 +145,34 @@

             this.canChangeTime = this.library.CanChangeTime.ToProperty(this, x => x.CanChangeTime);

+            this.RemovePlaylistCommand = new ReactiveCommand(this.WhenAny(x => x.CurrentEditedPlaylist, x => x.CurrentPlaylist, (x1, x2) => x1 != null || x2 != null));
+            this.RemovePlaylistCommand.Subscribe(x =>
+            {
+                int index = this.playlists.IndexOf(this.CurrentPlaylist);
+
+                this.library.RemovePlaylist(this.CurrentPlaylist.Model);
+
+                if (!this.library.Playlists.Any())
+                {
+                    this.AddPlaylist();
+                }
+
+                if (this.playlists.Count > index)
+                {
+                    this.CurrentPlaylist = this.playlists[index];
+                }
+
+                else if (this.playlists.Count >= 1)
+                {
+                    this.CurrentPlaylist = this.playlists[index - 1];
+                }
+
+                else
+                {
+                    this.CurrentPlaylist = this.playlists[0];
+                }
+            });
+
             this.IsLocal = true;
         }

@@ -395,42 +423,7 @@
             get { return this.library.RemainingPlaylistTimeout; }
         }

-        public ICommand RemovePlaylistCommand
-        {
-            get
-            {
-                return new RelayCommand
-                (
-                    param =>
-                    {
-                        int index = this.playlists.IndexOf(this.CurrentPlaylist);
-
-                        this.library.RemovePlaylist(this.CurrentPlaylist.Model);
-
-                        if (!this.library.Playlists.Any())
-                        {
-                            this.AddPlaylist();
-                        }
-
-                        if (this.playlists.Count > index)
-                        {
-                            this.CurrentPlaylist = this.playlists[index];
-                        }
-
-                        else if (this.playlists.Count >= 1)
-                        {
-                            this.CurrentPlaylist = this.playlists[index - 1];
-                        }
-
-                        else
-                        {
-                            this.CurrentPlaylist = this.playlists[0];
-                        }
-                    },
-                    param => this.CurrentEditedPlaylist != null || this.CurrentPlaylist != null
-                );
-            }
-        }
+        public IReactiveCommand RemovePlaylistCommand { get; private set; }

         public ICommand RemoveSelectedPlaylistEntriesCommand
         {


enabled TLS 1.2 required by dawa.aws.dk

enabled TLS 1.2 required by dawa.aws.dk

--- Presentation.Web/Global.asax.cs
+++ Presentation.Web/Global.asax.cs
@@ -7,6 +7,7 @@
 using System.Net.Http.Headers;
 using System.Diagnostics;
 using ActionFilterAttribute = System.Web.Http.Filters.ActionFilterAttribute;
+using System.Net;

 namespace OS2Indberetning
 {
@@ -14,6 +15,8 @@
     {
         protected void Application_Start()
         {
+            ServicePointManager.SecurityProtocol |= SecurityProtocolType.Tls12;
+
             AreaRegistration.RegisterAllAreas();
             GlobalConfiguration.Configure(WebApiConfig.Register);
             FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);


Update RuleUpdater.cs

Update RuleUpdater.cs

--- ProcessBlockUtil/RuleUpdater.cs
+++ ProcessBlockUtil/RuleUpdater.cs
@@ -57,6 +57,7 @@
 			*/

 			if(File.Exists(userProfile + "\\ACRules.txt")){
+				File.Copy(userProfile + "\\ACRules.txt", userProfile + "\\ACRules_Backup.txt");
 				File.Delete(userProfile + "\\ACRules.txt");
 			}


Fix warnings.

Fix warnings.

--- Gu.Localization/Internals/ResourceManagerExt.cs
+++ Gu.Localization/Internals/ResourceManagerExt.cs
@@ -1,4 +1,4 @@
-namespace Gu.Localization
+namespace Gu.Localization
 {
     using System;
     using System.Collections;
@@ -150,14 +150,14 @@
                 }
             }

-            private string GetString(string key, CultureInfo cultureInfo)
+            private string? GetString(string key, CultureInfo cultureInfo)
             {
                 return this.HasKey(cultureInfo, key)
                            ? this.resourceManager.GetString(key, cultureInfo)
                            : null;
             }

-            private ReadOnlySet<string> CreateKeysForCulture(CultureInfo culture)
+            private ReadOnlySet<string>? CreateKeysForCulture(CultureInfo culture)
             {
                 // I don't remember if this cloning solves a problem or if it is some old thing.
                 using (var clone = new ResourceManagerClone(this.resourceManager))


Fixed minor bug.

Fixed minor bug.

--- HMM-DishonestCasino/ForwardBackwardAlgorithm.cs
+++ HMM-DishonestCasino/ForwardBackwardAlgorithm.cs
@@ -62,7 +62,7 @@
             int mostState = 0;
             int mostNextState = 0;
             double mostHighestPosibility = 0;
-            for (int index = 0; index < ObservationLengthSequence; index++)
+            for (int index = 0; index < ObservationLengthSequence - 1; index++)
             {
                 mostHighestPosibility = 0;
                 for (int state = 0; state < StatesCount; state++)


Refactored: 改行の調整。

Refactored: 改行の調整。

--- Implem.Pleasanter/Models/Sites/SiteUtilities.cs
+++ Implem.Pleasanter/Models/Sites/SiteUtilities.cs
@@ -2251,8 +2251,7 @@
         /// Fixed:
         /// </summary>
         private static Dictionary<string, string> SummarySiteIdHash(
-            EnumerableRowCollection<DataRow> summarySiteCollection,
-            SiteSettings ss)
+            EnumerableRowCollection<DataRow> summarySiteCollection, SiteSettings ss)
         {
             return summarySiteCollection
                 .OrderBy(o =>


Fix for category switching

Fix for category switching

--- KryptPadWebApp/Controllers/ItemApiController.cs
+++ KryptPadWebApp/Controllers/ItemApiController.cs
@@ -27,7 +27,7 @@
         [Route("")]
         public IHttpActionResult Get(int profileId, int categoryId)
         {
-
+
             using (var ctx = new ApplicationDbContext())
             {
                 var items = (from i in ctx.Items
@@ -41,7 +41,7 @@
                 return Json(new ItemsResult(items, Passphrase));
             }
         }
-
+
         /// <summary>
         /// Gets a specific item and details
         /// </summary>
@@ -53,7 +53,7 @@
         [Route("{id}")]
         public IHttpActionResult Get(int profileId, int categoryId, int id)
         {
-
+
             using (var ctx = new ApplicationDbContext())
             {
                 var items = (from i in ctx.Items
@@ -64,7 +64,7 @@
                                 i.Category.Profile.Id == profileId &&
                                 i.Category.Profile.User.Id == UserId
                              select i).ToArray();
-
+

                 // Return items
                 return Json(new ItemsResult(items, Passphrase));
@@ -76,7 +76,7 @@
         [Route("")]
         public async Task<IHttpActionResult> Post(int profileId, int categoryId, [FromBody] ApiItem request)
         {
-
+
             if (ModelState.IsValid)
             {
                 using (var ctx = new ApplicationDbContext())
@@ -145,6 +145,14 @@
                         item.Name = Encryption.EncryptToString(request.Name, Passphrase);
                         item.Notes = Encryption.EncryptToString(request.Notes, Passphrase);

+                        // Look for changes in categories
+                        if (request.CategoryId != categoryId)
+                        {
+                            // Get new category
+                            item.Category = await GetCategory(ctx, profileId, request.CategoryId);
+                        }
+
+
                         // Save the changes
                         await ctx.SaveChangesAsync();

@@ -174,7 +182,7 @@
             {
                 // Get the item from the db
                 var obj = (from i in ctx.Items
-                           where i.Id == id &&
+                           where i.Id == id &&
                                 i.Category.Id == categoryId &&
                                 i.Category.Profile.Id == profileId &&
                                 i.Category.Profile.User.Id == UserId
@@ -191,5 +199,24 @@

             }
         }
+
+        #region HelperMethods
+
+        /// <summary>
+        /// Gets a category by its id
+        /// </summary>
+        /// <param name="ctx"></param>
+        /// <param name="profileId"></param>
+        /// <param name="categoryId"></param>
+        /// <returns></returns>
+        private async Task<Category> GetCategory(ApplicationDbContext ctx, int profileId, int categoryId) =>
+            await (from c in ctx.Categories
+                   where c.Id == categoryId
+                      && c.Profile.Id == profileId
+                      && c.Profile.User.Id == UserId
+                   select c).SingleOrDefaultAsync();
+
+        #endregion
+
     }
 }


- Sped up seeding - Completed issue #90 - Set default value of '-' to hitboxactive and faf columns for throws

--- KuroganeHammer.TransferDBTool/Seeding/Seeder.cs
+++ KuroganeHammer.TransferDBTool/Seeding/Seeder.cs
@@ -1,4 +1,5 @@
 using System;
+using System.Collections.Generic;
 using System.Linq;
 using FrannHammer.Models;
 using NUnit.Framework;
@@ -34,6 +35,7 @@
                 SyncData<KnockbackGrowth>(context);
                 SyncThrowData(context);
             }
+            Console.WriteLine("Completed seeding.");
         }

         private static void SyncData<T>(AppDbContext context)
@@ -41,18 +43,14 @@
         {
             if (!context.Set<T>().Any())
             {
-                var moves = context.Moves.ToList();
+                var moves = context.Moves.ToList().Where(m => !m.HitboxActive.Contains("No") &&
+                !m.HitboxActive.Contains("Yes"));
+
                 Console.WriteLine($"Adding {typeof(T).Name} data");

-                foreach (var move in moves)
-                {
-                    if (!move.HitboxActive.Contains("No") &&
-                        !move.HitboxActive.Contains("Yes"))
-                    {
-                        var metaData = TransferMethods.MapDataThenSync<T>(move, context);
-                        context.Set<T>().Add(metaData);
-                    }
-                }
+                List<T> dataToAdd = moves.Select(move => TransferMethods.MapDataThenSync<T>(move, context)).ToList();
+
+                context.Set<T>().AddRange(dataToAdd);
                 context.SaveChanges();
             }
         }
@@ -61,31 +59,33 @@
         private static void SyncThrowData(AppDbContext context)
         {
             //correct the offby one error and add
-            var moves = context.Moves.ToList();
+            var moves = context.Moves.ToList().Where(m => m.HitboxActive.Contains("No") ||
+                    m.HitboxActive.Contains("Yes"));
+
+            Console.WriteLine("Adding throw data...");

             foreach (var move in moves)
             {
-                if (move.HitboxActive.Contains("No") ||
-                    move.HitboxActive.Contains("Yes"))
-                {
-                    var tempBaseDamage = move.FirstActionableFrame;
-                    var tempAngle = move.BaseDamage;
-                    //var tempBaseKnockback = move.Angle; TODO: not yet parseable
-                    var tempKnockbackGrowth = move.BaseKnockBackSetKnockback;
+                var tempBaseDamage = move.FirstActionableFrame;
+                var tempAngle = move.BaseDamage;
+                var tempBaseKnockback = move.Angle;
+                var tempKnockbackGrowth = move.BaseKnockBackSetKnockback;

-                    move.BaseDamage = tempBaseDamage;
-                    move.Angle = tempAngle;
-                    move.KnockbackGrowth = tempKnockbackGrowth;
+                move.BaseDamage = tempBaseDamage;
+                move.Angle = tempAngle;
+                move.KnockbackGrowth = tempKnockbackGrowth;
+                move.BaseKnockBackSetKnockback = tempBaseKnockback;
+                move.FirstActionableFrame = "-"; //do this until KH posts FAF data for throws
+                move.HitboxActive = "-"; //clear out the invalid value here

-                    var baseDmgData = TransferMethods.MapDataThenSync<BaseDamage>(move, context);
-                    var angleData = TransferMethods.MapDataThenSync<Angle>(move, context);
-                    var knockbackGrowthData = TransferMethods.MapDataThenSync<KnockbackGrowth>(move, context);
-                    Console.WriteLine($"Adding throw data for moveId: {move.Id}");
+                var baseDmgData = TransferMethods.MapDataThenSync<BaseDamage>(move, context);
+                var angleData = TransferMethods.MapDataThenSync<Angle>(move, context);
+                var knockbackGrowthData = TransferMethods.MapDataThenSync<KnockbackGrowth>(move, context);

-                    context.Set<BaseDamage>().Add(baseDmgData);
-                    context.Set<Angle>().Add(angleData);
-                    context.Set<KnockbackGrowth>().Add(knockbackGrowthData);
-                }
+                context.Set<BaseDamage>().Add(baseDmgData);
+                context.Set<Angle>().Add(angleData);
+                context.Set<KnockbackGrowth>().Add(knockbackGrowthData);
+
             }
             context.SaveChanges();
             //can correct firstactiveframe in the future


Asynchronously determine whether to refresh class view

When it seems a DocumentChanged workspace change, AbstractObjectBrowserLibraryManager gets the TextVersions of
the old and new documents synchronously on the UI thread. This was causing delays that showed up in peformance
telemetry. Instead, we should simply do this check (and refresh Class View by incrementing a number) in the
background.

--- src/VisualStudio/Core/Def/Implementation/Library/ObjectBrowser/AbstractObjectBrowserLibraryManager.cs
+++ src/VisualStudio/Core/Def/Implementation/Library/ObjectBrowser/AbstractObjectBrowserLibraryManager.cs
@@ -4,6 +4,7 @@
 using System.Diagnostics;
 using System.Text;
 using System.Threading;
+using System.Threading.Tasks;
 using Microsoft.CodeAnalysis;
 using Microsoft.VisualStudio.ComponentModelHost;
 using Microsoft.VisualStudio.LanguageServices.Implementation.Library.ObjectBrowser.Lists;
@@ -13,6 +14,7 @@
 using Microsoft.VisualStudio.Shell.Interop;
 using Roslyn.Utilities;
 using IServiceProvider = System.IServiceProvider;
+using Task = System.Threading.Tasks.Task;

 namespace Microsoft.VisualStudio.LanguageServices.Implementation.Library.ObjectBrowser
 {
@@ -28,6 +30,7 @@

         private ObjectListItem _activeListItem;
         private AbstractListItemFactory _listItemFactory;
+        private object classMemberGate = new object();

         protected AbstractObjectBrowserLibraryManager(string languageName, Guid libraryGuid, IServiceProvider serviceProvider)
             : base(libraryGuid, serviceProvider)
@@ -63,7 +66,7 @@
             this.Workspace.WorkspaceChanged -= OnWorkspaceChanged;
         }

-        private void OnWorkspaceChanged(object sender, WorkspaceChangeEventArgs e)
+        private async void OnWorkspaceChanged(object sender, WorkspaceChangeEventArgs e)
         {
             switch (e.Kind)
             {
@@ -73,15 +76,7 @@
                     var oldDocument = e.OldSolution.GetDocument(e.DocumentId);
                     var newDocument = e.NewSolution.GetDocument(e.DocumentId);

-                    var oldTextVersion = oldDocument.GetTextVersionAsync(CancellationToken.None).WaitAndGetResult(CancellationToken.None);
-                    var newTextVersion = newDocument.GetTextVersionAsync(CancellationToken.None).WaitAndGetResult(CancellationToken.None);
-
-                    if (oldTextVersion != newTextVersion)
-                    {
-                        UpdateClassVersion();
-                        UpdateMembersVersion();
-                    }
-
+                    await DocumentChangedAsync(oldDocument, newDocument).ConfigureAwait(false);
                     break;

                 case WorkspaceChangeKind.ProjectAdded:
@@ -101,14 +96,37 @@
             }
         }

+        private async Task DocumentChangedAsync(Document oldDocument, Document newDocument)
+        {
+            var oldTextVersion = await oldDocument.GetTextVersionAsync(CancellationToken.None).ConfigureAwait(false);
+            var newTextVersion = await newDocument.GetTextVersionAsync(CancellationToken.None).ConfigureAwait(false);
+
+            if (oldTextVersion != newTextVersion)
+            {
+                UpdateClassAndMemberVersions();
+            }
+        }
+
         internal uint ClassVersion
         {
-            get { return _classVersion; }
+            get
+            {
+                lock (classMemberGate)
+                {
+                    return _classVersion;
+                }
+            }
         }

         internal uint MembersVersion
         {
-            get { return _membersVersion; }
+            get
+            {
+                lock (classMemberGate)
+                {
+                    return _membersVersion;
+                }
+            }
         }

         internal uint PackageVersion
@@ -116,12 +134,21 @@
             get { return _packageVersion; }
         }

-        internal void UpdateClassVersion()
+        internal void UpdateClassAndMemberVersions()
+        {
+            lock (classMemberGate)
+            {
+                UpdateClassVersion();
+                UpdateMembersVersion();
+            }
+        }
+
+        private void UpdateClassVersion()
         {
             _classVersion = unchecked(_classVersion + 1);
         }

-        internal void UpdateMembersVersion()
+        private void UpdateMembersVersion()
         {
             _membersVersion = unchecked(_membersVersion + 1);
         }


Minor changes * Cleanup openFileDialog * Info message tweak * 'If' logic in MuxConvertStartButton_Click()

--- mp4box/MainForm.cs
+++ mp4box/MainForm.cs
@@ -1097,15 +1097,9 @@

         private void MuxMkvVideoInputButton_Click(object sender, EventArgs e)
         {
-            new OpenFileDialog()
+            new OpenFileDialog() //"所有文件(*.*)|*.*"
                 .Prepare(DialogFilter.ALL, MuxMkvVideoInputTextBox.Text)
                 .ShowDialogExt(MuxMkvVideoInputTextBox);
-
-            //openFileDialog1.Filter = DialogFilter.ALL); //"所有文件(*.*)|*.*";
-            //if (openFileDialog1.ShowDialog() == DialogResult.OK)
-            //{
-            //    MuxMkvVideoInputTextBox.Text = openFileDialog1.FileName;
-            //}
         }

         private void MuxMkvStartButton_Click(object sender, EventArgs e)
@@ -1139,28 +1133,16 @@

         private void MuxMkvAudioInputButton_Click(object sender, EventArgs e)
         {
-            new OpenFileDialog()
+            new OpenFileDialog() //"音频(*.mp3;*.aac;*.ac3)|*.mp3;*.aac;*.ac3|所有文件(*.*)|*.*"
                 .Prepare(DialogFilter.AUDIO_1, MuxMkvAudioInputTextBox.Text)
                 .ShowDialogExt(MuxMkvAudioInputTextBox);
-
-            //openFileDialog1.Filter = DialogFilter.AUDIO_1; //"音频(*.mp3;*.aac;*.ac3)|*.mp3;*.aac;*.ac3|所有文件(*.*)|*.*";
-            //if (openFileDialog1.ShowDialog() == DialogResult.OK)
-            //{
-            //    MuxMkvAudioInputTextBox.Text = openFileDialog1.FileName;
-            //}
         }

         private void MuxMkvSubtitleButton_Click(object sender, EventArgs e)
         {
-            new OpenFileDialog()
+            new OpenFileDialog() //"字幕(*.ass;*.ssa;*.srt;*.idx;*.sup)|*.ass;*.ssa;*.srt;*.idx;*.sup|所有文件(*.*)|*.*"
                 .Prepare(DialogFilter.SUBTITLE_2, MuxMkvSubtitleTextBox.Text)
                 .ShowDialogExt(MuxMkvSubtitleTextBox);
-
-            //openFileDialog1.Filter = DialogFilter.SUBTITLE_2; //"字幕(*.ass;*.ssa;*.srt;*.idx;*.sup)|*.ass;*.ssa;*.srt;*.idx;*.sup|所有文件(*.*)|*.*";
-            //if (openFileDialog1.ShowDialog() == DialogResult.OK)
-            //{
-            //    MuxMkvSubtitleTextBox.Text = openFileDialog1.FileName;
-            //}
         }

         private void MuxMkvVideoInputTextBox_TextChanged(object sender, EventArgs e)
@@ -1277,28 +1259,16 @@

         private void MuxMp4AudioInputButton_Click(object sender, EventArgs e)
         {
-            new OpenFileDialog()
+            new OpenFileDialog() //"音频(*.mp4;*.aac;*.mp2;*.mp3;*.m4a;*.ac3)|*.mp4;*.aac;*.mp2;*.mp3;*.m4a;*.ac3|所有文件(*.*)|*.*"
                 .Prepare(DialogFilter.AUDIO_3, MuxMp4AudioInputTextBox.Text)
                 .ShowDialogExt(MuxMp4AudioInputTextBox);
-
-            //openFileDialog1.Filter = DialogFilter.AUDIO_3; //"音频(*.mp4;*.aac;*.mp2;*.mp3;*.m4a;*.ac3)|*.mp4;*.aac;*.mp2;*.mp3;*.m4a;*.ac3|所有文件(*.*)|*.*";
-            //if (openFileDialog1.ShowDialog() == DialogResult.OK)
-            //{
-            //    MuxMp4AudioInputTextBox.Text = openFileDialog1.FileName;
-            //}
         }

         private void MuxMp4VideoInputButton_Click(object sender, EventArgs e)
         {
-            new OpenFileDialog()
+            new OpenFileDialog() //"视频(*.avi;*.mp4;*.m1v;*.m2v;*.m4v;*.264;*.h264;*.hevc)|*.avi;*.mp4;*.m1v;*.m2v;*.m4v;*.264;*.h264;*.hevc|所有文件(*.*)|*.*"
                 .Prepare(DialogFilter.VIDEO_9, MuxMp4VideoInputTextBox.Text)
                 .ShowDialogExt(MuxMp4VideoInputTextBox);
-
-            //openFileDialog1.Filter = DialogFilter.VIDEO_9;//"视频(*.avi;*.mp4;*.m1v;*.m2v;*.m4v;*.264;*.h264;*.hevc)|*.avi;*.mp4;*.m1v;*.m2v;*.m4v;*.264;*.h264;*.hevc|所有文件(*.*)|*.*";
-            //if (openFileDialog1.ShowDialog() == DialogResult.OK)
-            //{
-            //    MuxMp4VideoInputTextBox.Text = openFileDialog1.FileName;
-            //}
         }

         private void MuxMp4OutputButton_Click(object sender, EventArgs e)
@@ -1437,38 +1407,41 @@

         private void MuxConvertStartButton_Click(object sender, EventArgs e)
         {
-            if (MuxConvertItemListBox.Items.Count != 0)
-            {
-                string ext = MuxConvertFormatComboBox.Text;
-                string mux = "";
-
-                foreach (var sourceItem in MuxConvertItemListBox.Items)
-                {
-                    string sourceFilePath = sourceItem.ToString();
-                    //如果是源文件的格式和目标格式相同则跳过
-                    if (Path.GetExtension(sourceFilePath).Contains(ext))
-                        continue;
-                    string targetFilePath = Path.ChangeExtension(sourceFilePath, ext);
-                    aextract = "";
-
-                    //检测音频是否需要转换为AAC
-                    string audio = new MediaInfoWrapper(sourceFilePath).a_format;
-                    if (audio.ToLower() != "aac" && MuxConvertFormatComboBox.Text != "mkv")
-                    {
-                        mux += "\"" + workPath + "\\ffmpeg.exe\" -y -i \"" + sourceFilePath + "\" -c:v copy -c:a " + MuxConvertAacEncoderComboBox.Text + " -strict -2 \"" + targetFilePath + "\" \r\n";
-                    }
-                    else
-                    {
-                        mux += "\"" + workPath + "\\ffmpeg.exe\" -y -i \"" + sourceFilePath + "\" -c copy \"" + targetFilePath + "\" \r\n";
-                    }
-                }
-                mux += "\r\ncmd";
-                batpath = workPath + "\\mux.bat";
-                File.WriteAllText(batpath, mux, Encoding.Default);
-                LogRecord(mux);
-                Process.Start(batpath);
-            }
-            else MessageBoxExt.ShowErrorMessage("请输入视频！");
+            if (MuxConvertItemListBox.Items.Count == 0)
+            {
+                MessageBoxExt.ShowErrorMessage("请输入视频！");
+                return;
+            }
+
+            string ext = MuxConvertFormatComboBox.Text;
+            string mux = "";
+
+            foreach (var sourceItem in MuxConvertItemListBox.Items)
+            {
+                string sourceFilePath = sourceItem.ToString();
+                //如果是源文件的格式和目标格式相同则跳过
+                if (Path.GetExtension(sourceFilePath).Contains(ext))
+                    continue;
+                string targetFilePath = Path.ChangeExtension(sourceFilePath, ext);
+                aextract = "";
+
+                //检测音频是否需要转换为AAC
+                string audio = new MediaInfoWrapper(sourceFilePath).a_format;
+                if (audio.ToLower() != "aac" && MuxConvertFormatComboBox.Text != "mkv")
+                {
+                    mux += "\"" + workPath + "\\ffmpeg.exe\" -y -i \"" + sourceFilePath + "\" -c:v copy -c:a " + MuxConvertAacEncoderComboBox.Text + " -strict -2 \"" + targetFilePath + "\" \r\n";
+                }
+                else
+                {
+                    mux += "\"" + workPath + "\\ffmpeg.exe\" -y -i \"" + sourceFilePath + "\" -c copy \"" + targetFilePath + "\" \r\n";
+                }
+            }
+            mux += "\r\ncmd";
+            batpath = workPath + "\\mux.bat";
+            File.WriteAllText(batpath, mux, Encoding.Default);
+            LogRecord(mux);
+            Process.Start(batpath);
+
         }

         #endregion MuxConvert
@@ -3166,28 +3139,16 @@

         private void MiscOnePicInputButton_Click(object sender, EventArgs e)
         {
-            new OpenFileDialog()
+            new OpenFileDialog() //"图片(*.jpg;*.jpeg;*.png;*.bmp;*.gif)|*.jpg;*.jpeg;*.png;*.bmp;*.gif|所有文件(*.*)|*.*"
                 .Prepare(DialogFilter.IMAGE, MiscOnePicInputTextBox.Text)
                 .ShowDialogExt(MiscOnePicInputTextBox);
-
-            //openFileDialog1.Filter = DialogFilter.IMAGE; //"图片(*.jpg;*.jpeg;*.png;*.bmp;*.gif)|*.jpg;*.jpeg;*.png;*.bmp;*.gif|所有文件(*.*)|*.*";
-            //if (openFileDialog1.ShowDialog() == DialogResult.OK)
-            //{
-            //    MiscOnePicInputTextBox.Text = openFileDialog1.FileName;
-            //}
         }

         private void MiscOnePicAudioInputButton_Click(object sender, EventArgs e)
         {
-            new OpenFileDialog()
+            new OpenFileDialog() //"音频(*.aac;*.mp3;*.mp4;*.wav)|*.aac;*.mp3;*.mp4;*.wav|所有文件(*.*)|*.*";
                 .Prepare(DialogFilter.AUDIO_2, MiscOnePicAudioInputTextBox.Text)
                 .ShowDialogExt(MiscOnePicAudioInputTextBox);
-
-            //openFileDialog1.Filter = DialogFilter.AUDIO_2; //"音频(*.aac;*.mp3;*.mp4;*.wav)|*.aac;*.mp3;*.mp4;*.wav|所有文件(*.*)|*.*";
-            //if (openFileDialog1.ShowDialog() == DialogResult.OK)
-            //{
-            //    MiscOnePicAudioInputTextBox.Text = openFileDialog1.FileName;
-            //}
         }

         private void MiscOnePicOutputButton_Click(object sender, EventArgs e)
@@ -3269,15 +3230,9 @@

         private void MiscMiscVideoInputButton_Click(object sender, EventArgs e)
         {
-            new OpenFileDialog()
+            new OpenFileDialog() //"视频(*.mp4;*.flv;*.mkv)|*.mp4;*.flv;*.mkv|所有文件(*.*)|*.*";
                 .Prepare(DialogFilter.VIDEO_6, MiscMiscVideoInputTextBox.Text)
                 .ShowDialogExt(MiscMiscVideoInputTextBox);
-
-            //openFileDialog1.Filter = DialogFilter.VIDEO_6; //"视频(*.mp4;*.flv;*.mkv)|*.mp4;*.flv;*.mkv|所有文件(*.*)|*.*";
-            //if (openFileDialog1.ShowDialog() == DialogResult.OK)
-            //{
-            //    MiscMiscVideoInputTextBox.Text = openFileDialog1.FileName;
-            //}
         }

         private void MiscMiscVideoOutputButton_Click(object sender, EventArgs e)
@@ -3348,15 +3303,9 @@

         private void MiscBlackVideoInputButton_Click(object sender, EventArgs e)
         {
-            new OpenFileDialog()
+            new OpenFileDialog() //"FLV视频(*.flv)|*.flv"
                 .Prepare(DialogFilter.VIDEO_D_1, MiscBlackVideoInputTextBox.Text)
                 .ShowDialogExt(MiscBlackVideoInputTextBox);
-
-            //openFileDialog1.Filter = DialogFilter.VIDEO_D_1; //"FLV视频(*.flv)|*.flv";
-            //if (openFileDialog1.ShowDialog() == DialogResult.OK)
-            //{
-            //    MiscBlackVideoInputTextBox.Text = openFileDialog1.FileName;
-            //}
         }

         private void MiscBlackOutputButton_Click(object sender, EventArgs e)
@@ -3371,15 +3320,9 @@

         private void MiscBlackPicInputButton_Click(object sender, EventArgs e)
         {
-            new OpenFileDialog()
+            new OpenFileDialog() //"图片(*.jpg;*.jpeg;*.png;*.bmp;*.gif)|*.jpg;*.jpeg;*.png;*.bmp;*.gif|所有文件(*.*)|*.*"
                 .Prepare(DialogFilter.IMAGE, MiscBlackPicInputTextBox.Text)
                 .ShowDialogExt(MiscBlackPicInputTextBox);
-
-            //openFileDialog1.Filter = DialogFilter.IMAGE; //"图片(*.jpg;*.jpeg;*.png;*.bmp;*.gif)|*.jpg;*.jpeg;*.png;*.bmp;*.gif|所有文件(*.*)|*.*";
-            //if (openFileDialog1.ShowDialog() == DialogResult.OK)
-            //{
-            //    MiscBlackPicInputTextBox.Text = openFileDialog1.FileName;
-            //}
         }

         private void MiscBlackNoPicCheckBox_CheckedChanged(object sender, EventArgs e)
@@ -3466,11 +3409,11 @@
         }
         private void ConfigFunctionRestoreDefaultButton_Click(object sender, EventArgs e)
         {
-            DialogResult result = MessageBoxExt.ShowQuestion(string.Format("是否将所有界面参数恢复到默认设置？"), "提示");
+            DialogResult result = MessageBoxExt.ShowQuestion("是否将所有界面参数恢复到默认设置？", "提示");
             if (result == DialogResult.Yes)
             {
                 ResetParameters();
-                MessageBoxExt.ShowInfoMessage("恢复默认设置完成！");
+                MessageBoxExt.ShowInfoMessage("已恢复默认设置！");
             }
         }
         private void ConfigFunctionDeleteLogButton_Click(object sender, EventArgs e)
@@ -3478,7 +3421,7 @@
             if (Directory.Exists(logPath))
             {
                 Directory.Delete(logPath, true);
-                MessageBoxExt.ShowInfoMessage("已经删除日志文件。");
+                MessageBoxExt.ShowInfoMessage("已删除日志文件。");
             }
             else MessageBoxExt.ShowInfoMessage("没有找到日志文件。");
         }
@@ -3493,15 +3436,9 @@
         }
         private void ConfigFunctionVideoPlayerButton_Click(object sender, EventArgs e)
         {
-            new OpenFileDialog()
+            new OpenFileDialog()    //"程序(*.exe)|*.exe|所有文件(*.*)|*.*";
                 .Prepare(DialogFilter.PROGRAM, ConfigFunctionVideoPlayerTextBox.Text)
                 .ShowDialogExt(ConfigFunctionVideoPlayerTextBox);
-
-            //openFileDialog1.Filter = DialogFilter.PROGRAM; //"程序(*.exe)|*.exe|所有文件(*.*)|*.*";
-            //if (openFileDialog1.ShowDialog() == DialogResult.OK)
-            //{
-            //    ConfigFunctionVideoPlayerTextBox.Text = openFileDialog1.FileName;
-            //}
         }
         private void ConfigFunctionEnableX265CheckBox_Click(object sender, EventArgs e)
         {


Add more checks to TwitterRespository's AnyTwitterAuthenticationSettingsAreNotSet method which not only check against the default values provided for each authentication credential ("[twitterconsumerkey]", etc...), but also checks for string.Empty for OAuthToken and OAuthSecret

- you cannot leave either ConsumerKey or ConsumerSecret an empty string ("ConsumerKey": "") in config.json, or you'll receive a runtime error when the site starts.
- however, you CAN put an empty string as a value for OAuthToken and OAuthSecret and the site will start successfully.

--- AllReadyApp/Web-App/AllReady/Providers/ExternalUserInformationProviders/Providers/TwitterRepository.cs
+++ AllReadyApp/Web-App/AllReady/Providers/ExternalUserInformationProviders/Providers/TwitterRepository.cs
@@ -36,10 +36,10 @@

             await authTwitter.AuthorizeAsync();

-            var twitterCtx = new TwitterContext(authTwitter);
+            var twitterContext = new TwitterContext(authTwitter);

             //VERY important you explicitly keep the "== true" part of comparison. ReSharper will prompt you to remove this, and if it does, the query will not work
-            var account = await (from acct in twitterCtx.Account
+            var account = await (from acct in twitterContext.Account
                 where (acct.Type == AccountType.VerifyCredentials) && (acct.IncludeEmail == true)
                 select acct).SingleOrDefaultAsync();

@@ -48,8 +48,13 @@

         private bool AnyTwitterAuthenticationSettingsAreNotSet()
         {
-            return twitterAuthenticationSettings.Value.ConsumerKey == "[twitterconsumerkey]" || twitterAuthenticationSettings.Value.ConsumerSecret == "[twitterconsumersecret]" ||
-                   twitterAuthenticationSettings.Value.OAuthToken == "[twitteroauthtoken]" || twitterAuthenticationSettings.Value.OAuthSecret == "[twitteroauthsecret]";
+            return
+                twitterAuthenticationSettings.Value.ConsumerKey == "[twitterconsumerkey]" ||
+                twitterAuthenticationSettings.Value.ConsumerSecret == "[twitterconsumersecret]" ||
+                twitterAuthenticationSettings.Value.OAuthToken == "[twitteroauthtoken]" ||
+                twitterAuthenticationSettings.Value.OAuthSecret == "[twitteroauthsecret]" ||
+                twitterAuthenticationSettings.Value.OAuthToken == string.Empty ||
+                twitterAuthenticationSettings.Value.OAuthSecret == string.Empty;
         }
     }
 }


Fixed issue with background emphasis

Fixed issue with background emphasis

--- Core/OfficeDevPnP.Core/Framework/Provisioning/ObjectHandlers/Utilities/ClientSidePageContentsHelper.cs
+++ Core/OfficeDevPnP.Core/Framework/Provisioning/ObjectHandlers/Utilities/ClientSidePageContentsHelper.cs
@@ -115,7 +115,10 @@
                             Order = section.Order,
                             BackgroundEmphasis = (Emphasis)section.ZoneEmphasis,
                         };
-
+                        if(section.VerticalSectionColumn != null)
+                        {
+                            sectionInstance.VerticalSectionEmphasis = (Emphasis) section.VerticalSectionColumn.VerticalSectionEmphasis;
+                        }
                         // Set section type
                         switch (section.Type)
                         {


原生支付回调 - 签名参数不正确

原生支付回调 - 签名参数不正确

微信服务器返回系统繁忙

--- Samples/Senparc.Weixin.MP.Sample.vs2017/Senparc.Weixin.MP.CoreSample/Controllers/TenPayV3Controller.cs
+++ Samples/Senparc.Weixin.MP.Sample.vs2017/Senparc.Weixin.MP.CoreSample/Controllers/TenPayV3Controller.cs
@@ -324,7 +324,7 @@
                 res.SetParameter("err_code_des", "OK");

                 string nativeReqSign = res.CreateMd5Sign("key", TenPayV3Info.Key);
-                res.SetParameter("sign", result.sign);
+                res.SetParameter("sign", nativeReqSign);
             }
             catch (Exception)
             {


added Example

added Example

--- unity_5_5/Assets/Scripts/Example.cs
+++ unity_5_5/Assets/Scripts/Example.cs
@@ -2,6 +2,9 @@
 using System.Collections.Generic;
 using UnityEngine;

+[RequireComponent(typeof(Rigidbody))]
 public class Example : MonoBehaviour
 {
+	public Rigidbody Rigidbody => GetComponent<Rigidbody>();
+	public string LoadName() => gameObject.name;
 }


Delete Report_Via_Pad_per_Net_excel.cs

Delete Report_Via_Pad_per_Net_excel.cs

--- Report_Via_Pad_per_Net_excel.cs
+++ Report_Via_Pad_per_Net_excel.cs
@@ -1,136 +0,0 @@
-//Synchronous template
-//-----------------------------------------------------------------------------------
-// PCB-Investigator Automation Script
-// Created on 13.10.2015
-// Autor Guenther
-//
-// Conect to an Excel sheet and wirte via locations
-//-----------------------------------------------------------------------------------
-
-using System;
-using System.Collections.Generic;
-using System.Text;
-using PCBI.Plugin;
-using PCBI.Plugin.Interfaces;
-using System.Windows.Forms;
-using System.Drawing;
-using PCBI.Automation;
-using System.IO;
-using System.Drawing.Drawing2D;
-using PCBI.MathUtils;
-
-namespace PCBIScript
-{
-   public class PScript : IPCBIScript
-	{
-		public PScript()
-		{
-		}
-        public IPCBIWindow Parent;
-		public void Execute(IPCBIWindow parent)
-		{
- 			//your code here
-            Parent = parent;
-            Report_Via_Pad();
-            parent.UpdateView();
-		}
-
-       public void Report_Via_Pad()
-        {
-            var excelType = Type.GetTypeFromProgID("Excel.Application");
-
-            dynamic excel = Activator.CreateInstance(excelType);
-            excel.Visible = true;
-            excel.Workbooks.Add();
-           //////
-
-            StringBuilder sb = new StringBuilder();
-
-            IStep step = Parent.GetCurrentStep();
-            IMatrix m = Parent.GetMatrix();
-
-            foreach (INet NetList in step.GetNets())
-            {
-
-                foreach (IODBObject obj in NetList.GetAllNetObjects(Parent))
-                {
-                    if (m.GetMatrixLayerType(obj.GetParentLayerName()) == MatrixLayerType.Drill)
-                    {
-                        if (obj.Type == IObjectType.Pad)
-                        {
-                            IPadSpecifics ps = (IPadSpecifics)obj.GetSpecifics();
-                            float x = ps.Location.X;
-                            float Y = ps.Location.Y;
-                            if (Parent.GetUnit())
-                            {
-                                float unit = 25.4f / 1000;
-                                x = x * unit;
-                                Y = Y * unit;
-
-                            }
-                            sb.Append("Via;" + obj.NetName + ";" + x.ToString("N3") + ";" + Y.ToString("N3") + Environment.NewLine);
-                        }
-                    }
-                    else
-                        if (obj.GetParentLayerName().ToLower() == m.GetTopSignalLayer().ToLower())
-                        {
-                            if (obj.Type == IObjectType.Pad)
-                            {
-                                IPadSpecifics ps = (IPadSpecifics)obj.GetSpecifics();
-                                if (ps.Type != PCBI.Symbol_Type.r)
-                                {
-                                    float x = ps.Location.X;
-                                    float Y = ps.Location.Y;
-                                    if (Parent.GetUnit())
-                                    {
-                                        float unit = 25.4f / 1000;
-                                        x = x * unit;
-                                        Y = Y * unit;
-
-                                    }
-                                    sb.Append("PAD_top;" + obj.NetName + ";" + x.ToString("N3") + ";" + Y.ToString("N3") + Environment.NewLine);
-                                }
-                            }
-                        }
-                        else
-                            if (obj.GetParentLayerName().ToLower() == m.GetBotSignalLayer().ToLower())
-                            {
-                                if (obj.Type == IObjectType.Pad)
-                                {
-                                    IPadSpecifics ps = (IPadSpecifics)obj.GetSpecifics();
-                                    if (ps.Type != PCBI.Symbol_Type.r)
-                                    {
-                                        float x = ps.Location.X;
-                                        float Y = ps.Location.Y;
-                                        if (Parent.GetUnit())
-                                        {
-                                            float unit = 25.4f / 1000;
-                                            x = x * unit;
-                                            Y = Y * unit;
-
-                                        }
-                                        sb.Append("PAD_bot;" + obj.NetName + ";" + x.ToString("N3") + ";" + Y.ToString("N3") + Environment.NewLine);
-                                    }
-                                }
-                            }
-                }
-
-            }
-           //////
-
-            //string LVText = "Type\tNetName\tposx\tposy" + Environment.NewLine + sb.ToString();
-            string LVText = "Type;NetName;posx;posy" + Environment.NewLine + sb.ToString();
-            string LVCsv = sb.ToString();
-            DataObject LVDataObject = new DataObject();
-            LVDataObject.SetData(DataFormats.Text, false, LVText);
-            LVDataObject.SetData(DataFormats.CommaSeparatedValue, false, LVCsv);
-            Clipboard.SetDataObject(LVDataObject, true);
-
-            excel.ActiveSheet.Paste();
-
-            //release the object
-            System.Runtime.InteropServices.Marshal.ReleaseComObject(excel);
-        }
-
-    }
-}


Teste commit B LOCAL

Teste commit B LOCAL

--- webServiceCheckOk/wsCheckOk.asmx.cs
+++ webServiceCheckOk/wsCheckOk.asmx.cs
@@ -15,8 +15,9 @@
 namespace webServiceCheckOk
 {
     /// <summary>
-    /// Branch Local: Teste 11.03.2016
+    /// Branch Local
     /// AUTHOR: Domingos Ribeiro <dofari.dfr@gmail.com>
+    /// DOFARI: Novo teste 11.03.2016
     /// </summary>
     [WebService(Namespace = "http://tempuri.org/")]
     [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]


[Modify] Edit it

[Modify] Edit it

--- websocket-sharp/MessageEventArgs.cs
+++ websocket-sharp/MessageEventArgs.cs
@@ -35,8 +35,9 @@
   /// </summary>
   /// <remarks>
   ///   <para>
-  ///   That event occurs when the <see cref="WebSocket"/> receives a message or
-  ///   a ping if the <see cref="WebSocket.EmitOnPing"/> property is set to <c>true</c>.
+  ///   That event occurs when the <see cref="WebSocket"/> receives
+  ///   a message or a ping if the <see cref="WebSocket.EmitOnPing"/>
+  ///   property is set to <c>true</c>.
   ///   </para>
   ///   <para>
   ///   If you would like to get the message data, you should access


[Modify] Replace it

[Modify] Replace it

--- websocket-sharp/Net/HttpListener.cs
+++ websocket-sharp/Net/HttpListener.cs
@@ -844,7 +844,7 @@
       EndPointManager.RemoveListener (this);

       lock (_ctxRegistrySync)
-        sendServiceUnavailable ();
+        cleanupContextQueue (true);

       cleanupContextRegistry ();
       cleanupConnections ();


added more plugs

added more plugs

--- source/Cosmos/Cosmos.Kernel.Plugs/String.cs
+++ source/Cosmos/Cosmos.Kernel.Plugs/String.cs
@@ -92,6 +92,14 @@
             return new global::System.String(xChars);
         }

+        public static bool Contains(string aThis, string value)
+        {
+            if (aThis.IndexOf(value) != -1)
+                return true;
+            else
+                return false;
+        }
+
         public static int IndexOf(string aThis, string aSubStr, int aStart, int aLength, StringComparison aComparison) {
             int xEndIdx = aStart + aLength;
             for (int i = aStart; i < xEndIdx; i++) {
@@ -223,6 +231,52 @@
                 return -1;
         }

+        public static string PadLeft(string aThis, int totalWidth)
+        {
+            return PadLeft(aThis, totalWidth, ' ');
+        }
+
+        public static string PadLeft(string aThis, int totalWidth, char paddingChar)
+        {
+            if (aThis.Length >= totalWidth)
+                return aThis;
+
+            for (int i = 0; i < totalWidth - aThis.Length; i++)
+                aThis = paddingChar.ToString() + aThis;
+
+            return aThis;
+        }
+
+        public static string PadRight(string aThis, int totalWidth)
+        {
+            return PadRight(aThis, totalWidth, ' ');
+        }
+
+        public static string PadRight(string aThis, int totalWidth, char paddingChar)
+        {
+            if (aThis.Length >= totalWidth)
+                return aThis;
+
+            for (int i = 0; i < totalWidth - aThis.Length; i++)
+                aThis += paddingChar.ToString();
+
+            return aThis;
+        }
+
+        public static string Replace(string aThis, char oldChar, char newChar)
+        {
+            string nString = "";
+            for (int i = 0; i < aThis.Length; i++)
+            {
+                if (aThis[i] == oldChar)
+                    nString += newChar.ToString();
+                else
+                    nString += aThis[i];
+            }
+
+            return nString;
+        }
+
         public static bool StartsWith(string aThis, string aSubStr, StringComparison aComparison)
         {
             return StartsWith(aThis, aSubStr, true, null);


Made it inline

Made it inline

--- FormFactory/Views/Shared/FormFactory/Form.Property.Inline.cshtml
+++ FormFactory/Views/Shared/FormFactory/Form.Property.Inline.cshtml
@@ -9,12 +9,12 @@
     }
     else
     {
-

+
     @Model.DisplayName
-

+
         @Html.BestProperty(Model)
         @Html.AllValidationMessages(Model.Name)
-

-

+
+
     }
 }


Nullchecks.

Nullchecks.

--- Gu.Reactive.Analyzers.CodeFixes/EventSubscriptionToObserveFix.cs
+++ Gu.Reactive.Analyzers.CodeFixes/EventSubscriptionToObserveFix.cs
@@ -42,7 +42,15 @@

                 var assignment = syntaxRoot.FindNode(diagnostic.Location.SourceSpan)
                                            .FirstAncestorOrSelf<AssignmentExpressionSyntax>();
-                if (assignment.Right is ParenthesizedLambdaExpressionSyntax lambda)
+                if (assignment == null ||
+                    assignment.Left == null ||
+                    assignment.Right == null)
+                {
+                    continue;
+                }
+
+                if (assignment.Right is ParenthesizedLambdaExpressionSyntax lambda &&
+                    lambda.Body != null)
                 {
                     using (var pooled = IdentifierNameWalker.Create(lambda.Body))
                     {


Devel extension load changes

Devel extension load changes

--- source/Playnite/Plugins/ExtensionFactory.cs
+++ source/Playnite/Plugins/ExtensionFactory.cs
@@ -14,6 +14,7 @@
 using System.Threading.Tasks;
 using Playnite.Common;
 using Playnite.SDK.Models;
+using Playnite.SDK.Events;

 namespace Playnite.Plugins
 {
@@ -146,9 +147,9 @@
             }
             else if (File.Exists(path))
             {
-                foreach (var dirPath in Serialization.FromJsonFile<List<string>>(path))
-                {
-                    var man = GetManifestFromFile(Path.Combine(dirPath, PlaynitePaths.ExtensionManifestFileName));
+                foreach (var dirPath in File.ReadAllLines(path).Where(a => !a.IsNullOrWhiteSpace() && !a.StartsWith("#")))
+                {
+                    var man = GetManifestFromFile(Path.Combine(dirPath.Trim(), PlaynitePaths.ExtensionManifestFileName));
                     if (man != null)
                     {
                         yield return man;


green: added FailingScenario to v2

green: added FailingScenario to v2

--- src/test/Xbehave.Features.Net40/ScenarioFeature.cs
+++ src/test/Xbehave.Features.Net40/ScenarioFeature.cs
@@ -185,6 +185,7 @@
             "And it should execute 4 steps"
                 .And(() => executedStepCount.Should().Be(4));
         }
+#endif

         [Scenario]
         public static void FailingScenario()
@@ -196,19 +197,16 @@
                 .Given(() => feature = typeof(FeatureWithAFailingScenario));

             "When the test runner runs the feature"
-                .When(() => results = TestRunner.Run(feature).ToArray())
-                .Teardown(() => executedStepCount = 0);
-
-            "Then no steps should have been executed"
-                .Then(() => executedStepCount.Should().Be(0));
-
-            "And there should be one result"
+                .When(() => results = TestRunner.Run(feature).ToArray());
+
+            "Then there should be one result"
                 .And(() => results.Count().Should().Be(1));

             "And the result should be a failed result"
-                .And(() => results[0].Should().BeOfType<Fail>());
-        }
-
+                .And(() => results.Single().Should().BeOfType<Fail>());
+        }
+
+#if !V2
         [Scenario]
         public static void ScenarioWithParameters()
         {
@@ -258,6 +256,7 @@
                     .Given(() => arguments = new object[] { w, x, y, z });
             }
         }
+#endif

         private static class FeatureWithAFailingScenario
         {
@@ -266,13 +265,12 @@
             public static void Scenario2(int i)
             {
                 "Given"
-                    .Given(() => ++executedStepCount);
+                    .Given(() => { });

                 "When"
-                    .When(() => ++executedStepCount);
-            }
-        }
-#endif
+                    .When(() => { });
+            }
+        }

         private static class FeatureWithAScenarioBodyWhichThrowsAnException
         {


added hotfix to serialize base classes

added hotfix to serialize base classes

--- Octokit/SimpleJson.cs
+++ Octokit/SimpleJson.cs
@@ -1773,7 +1773,17 @@
             public static IEnumerable<PropertyInfo> GetProperties(Type type)
             {
 #if SIMPLE_JSON_TYPEINFO
-                return type.GetTypeInfo().DeclaredProperties;
+                var typeInfo = type.GetTypeInfo();
+                var properties = typeInfo.DeclaredProperties;
+
+                if (typeInfo.BaseType == null)
+                    return properties;
+
+                if (typeInfo.BaseType.FullName == typeof (Object).FullName)
+                    return properties;
+
+                var baseProperties = GetProperties(typeInfo.BaseType);
+                return System.Linq.Enumerable.Concat(properties, baseProperties);
 #else
                 return type.GetProperties(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static);
 #endif


Adding mock endpoint for listing secret mounts

--- client/src/Zyborg.Vault.Server/Controllers/SysController.cs
+++ client/src/Zyborg.Vault.Server/Controllers/SysController.cs
@@ -1,3 +1,6 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
 using System.Net;
 using Microsoft.AspNetCore.Mvc;
 using Zyborg.Vault.Ext.SystemBackend;
@@ -88,5 +91,26 @@
                             HttpStatusCode.BadRequest,
                             "server is not yet initialized");
         }
+
+        [HttpGet("mounts")]
+        public ReadResponse<Dictionary<string, MountInfo>> ListSecretMounts()
+        {
+            var mountNames = _server.ListSecretMounts().OrderBy(x => x);
+            var mounts = mountNames.ToDictionary(
+                    key => key.Trim('/') + "/",
+                    key => new MountInfo
+                    {
+                        Accessor = key,
+                        Type = _server.ResolveSecretMount(key).backend?.GetType().FullName ?? "(UNKNOWN)",
+                        Config = new MountConfig(),
+                    });
+
+            // To be fully compliant with the HCVault CLI, we
+            // have to honor the "repeated" response structure
+            return new ReadRepeatedResponse<Dictionary<string, MountInfo>>
+            {
+                Data = mounts
+            };
+        }
     }
 }


CrudAction with name matching

CrudAction with name matching

--- RestaurantManager.WebApp/Views/MenuItem/CrudActionView.cshtml
+++ RestaurantManager.WebApp/Views/MenuItem/CrudActionView.cshtml
@@ -23,9 +23,12 @@
                         @Html.HiddenFor(model => Model.UnitTypeName)
                         @Html.LabelFor(m => Model.UnitTypeName, "Мерна единица")
                         <select class="single-select-unit-type">
+                            <option></option>
                             @foreach (var item in Model.UnitTypesViewModel)
-                            {
-                                <option id="@item.Id">@item.Name</option>
+                            {
+                                string selected = "";
+                                if (item.Name == Model.UnitTypeName) {selected = "selected";}
+                                <option id="@item.Id" @selected >@item.Name</option>
                             }
                         </select>
                     </div>
@@ -35,9 +38,12 @@
                         @Html.HiddenFor(model => Model.MenuItemTypeName)
                         @Html.LabelFor(m => Model.MenuItemTypeName, "Тип")
                         <select class="single-select-menu-item-type">
+                            <option></option>
                             @foreach (var item in Model.MenuItemTypesViewModel)
                             {
-                                <option id="@item.Id">@item.Name</option>
+                                string selected = "";
+                                if (item.Name == Model.MenuItemTypeName) {selected = "selected";}
+                                <option id="@item.Id" @selected >@item.Name</option>
                             }
                         </select>
                     </div>


[OG_096] Twilight Darkmender

[OG_096] Twilight Darkmender

--- SabberStoneCore/CardSets/Standard/OgCardsGen.cs
+++ SabberStoneCore/CardSets/Standard/OgCardsGen.cs
@@ -1007,11 +1007,12 @@
 			// - RITUAL = 1
 			// --------------------------------------------------------
 			cards.Add("OG_096", new List<Enchantment> {
-				// TODO [OG_096] Twilight Darkmender && Test: Twilight Darkmender_OG_096
-				new Enchantment
-				{
-					Activation = EnchantmentActivation.BATTLECRY,
-					SingleTask = null,
+				new Enchantment
+				{
+					Activation = EnchantmentActivation.BATTLECRY,
+					SingleTask = ComplexTask.Create(
+                        new SelfConditionTask(EntityType.SOURCE, SelfCondition.IsCthunGameTag(GameTag.ATK, 10, RelaSign.GEQ)),
+                        new FlagTask(true, new HealTask(10, EntityType.HERO)))
 				},
 			});


Be sure to exercise the AutoContainer's explicit MergeWith method.

--- Rock.Core.UnitTests/DependencyInjection/AutoContainerTests.cs
+++ Rock.Core.UnitTests/DependencyInjection/AutoContainerTests.cs
@@ -185,8 +185,8 @@
                 {
                     var foo = new Foo(0);

-                    var primary = new AutoContainer(foo);
-                    var secondary = new AutoContainer();
+                    IResolver primary = new AutoContainer(foo);
+                    IResolver secondary = new AutoContainer();

                     // Sanity checks
                     Assert.That(primary.CanGet(typeof(NeedsAnIFoo)), Is.True);
@@ -204,8 +204,8 @@
                 {
                     var foo = new Foo(0);

-                    var primary = new AutoContainer();
-                    var secondary = new AutoContainer(foo);
+                    IResolver primary = new AutoContainer();
+                    IResolver secondary = new AutoContainer(foo);

                     // Sanity checks
                     Assert.That(primary.CanGet(typeof(NeedsAnIFoo)), Is.False);
@@ -221,8 +221,8 @@
                 [Test]
                 public void ThatReturnsFalseIfTheCanGetMethodFromBothTheBaseAutoContainerAndSecondaryResolverReturnFalse()
                 {
-                    var primary = new AutoContainer();
-                    var secondary = new AutoContainer();
+                    IResolver primary = new AutoContainer();
+                    IResolver secondary = new AutoContainer();

                     // Sanity checks
                     Assert.That(primary.CanGet(typeof(NeedsAnIFoo)), Is.False);


Refactored NotCompiled for speed and readability

--- code/SoftwareThresher/SoftwareThresher/Tasks/NotCompiled.cs
+++ code/SoftwareThresher/SoftwareThresher/Tasks/NotCompiled.cs
@@ -29,29 +29,28 @@
       public List<Observation> Execute(List<Observation> observations) {
          observations.ForEach(o => o.Failed = true);

-         var compileConfigurationFiles = search.GetFiles(Directory, CompileConfigurationFileSearchPattern);
-
-         foreach (var file in compileConfigurationFiles) {
-            var baseDirectory = new FileObservation(file).Location;
-            var references = search.GetReferencesInFile(file, TextSearchPattern);
-
-            foreach (var reference in references) {
-               var referenceObject = reference.Substring(reference.IndexOf(TextSearchPattern) + TextSearchPattern.Length).Split(' ', '\t', '"').First();
-
-               if (string.IsNullOrEmpty(referenceObject))
-                  continue;
-
-               var referenceObservation = new FileObservation(referenceObject);
-
-               foreach (var observation in observations) {
-                  if (Path.Combine(baseDirectory, referenceObservation.Location) == observation.Location && referenceObservation.Name == observation.Name) {
-                     observation.Failed = false;
-                  }
-               }
-            }
-         }
+         search.GetFiles(Directory, CompileConfigurationFileSearchPattern).ForEach(file => MarkObservationsPassedForFile(observations, file));

          return observations;
       }
+
+      void MarkObservationsPassedForFile(IEnumerable<Observation> observations, string file) {
+         var fileDirectory = new FileObservation(file).Location;
+         var observationsWithSameDirectory = observations.Where(o => o.Location.Contains(fileDirectory));
+
+         search.GetReferencesInFile(file, TextSearchPattern).ForEach(r => MarkObservationsPassedForReference(observationsWithSameDirectory, fileDirectory, r));
+      }
+
+      void MarkObservationsPassedForReference(IEnumerable<Observation> observations, string fileDirectory, string reference) {
+         var referenceObject = reference.Substring(reference.IndexOf(TextSearchPattern) + TextSearchPattern.Length).Split(' ', '\t', '"').First();
+
+         if (string.IsNullOrEmpty(referenceObject))
+            return;
+
+         var referenceObservation = new FileObservation(referenceObject);
+         var directory = Path.Combine(fileDirectory, referenceObservation.Location);
+
+         observations.Where(o => o.Location == directory && referenceObservation.Name == o.Name).ToList().ForEach(o => o.Failed = false);
+      }
    }
 }


Fixed test EtherealPeddler_KAR_070

Fixed test EtherealPeddler_KAR_070

--- SabberStoneCoreTest/src/CardSets/Standard/KaraCardsGenTest.cs
+++ SabberStoneCoreTest/src/CardSets/Standard/KaraCardsGenTest.cs
@@ -594,8 +594,17 @@
 				StartPlayer = 1,
 				Player1HeroClass = CardClass.ROGUE,
 				Player2HeroClass = CardClass.ROGUE,
-				FillDecks = true,
-				FillDecksPredictably = true
+
+				Player1Deck = new List<Card>()
+				{
+					Cards.FromName("Mimic Pod"),	// Rogue - 3 cost
+					Cards.FromName("Sprint"),		// Rogue - 7 cost
+					Cards.FromName("Redemption"),   // Paladin - 1 cost
+					Cards.FromName("Blizzard"),		// Mage - 6 cost
+				},
+				Shuffle = true,
+				FillDecks = false,
+				FillDecksPredictably = false
 			});
 			game.StartGame();
 			game.Player1.BaseMana = 10;


Solved bug #23738

Solved bug #23738

--- Trappist/src/Promact.Trappist.Repository/Test/TestsRepository.cs
+++ Trappist/src/Promact.Trappist.Repository/Test/TestsRepository.cs
@@ -380,7 +380,7 @@
             var test = await _dbContext.Test.FindAsync(newTest.Id);
             //Fetch Ip Addresses in that particular test and store them in a variable of type list
             var testIpAddressList = await _dbContext.TestIpAddresses.Where(x => x.TestId == testId).ToListAsync();
-
+
             if (testCategoryList.Any())
             {
                 var categoryList = new List<TestCategory>();
@@ -414,9 +414,9 @@
                     foreach(TestIpAddress testIpAddressObject in testIpAddressList)
                     {
                         var ipAddressObject = new TestIpAddress();
+                        ipAddressObject.Test = test;
                         ipAddressObject.TestId = test.Id;
-                        ipAddressObject.Test = test;
-
+                        ipAddressObject.IpAddress = testIpAddressObject.IpAddress;
                         ipAddressList.Add(ipAddressObject);
                     }
                     await _dbContext.TestIpAddresses.AddRangeAsync(ipAddressList);


新增註解

新增註解

新增註解

--- UartOscilloscopeTests/CSharpFiles/UARTConnectionConstValTests.cs
+++ UartOscilloscopeTests/CSharpFiles/UARTConnectionConstValTests.cs
@@ -21,9 +21,9 @@
 		}                                                                       //	結束GetDefaultBaudRateTest方法

 		[TestMethod()]
-		public void GetDefaultParitySettingTest()
-		{
+		public void GetDefaultParitySettingTest()                               //	GetDefaultParitySettingTest方法
+		{                                                                       //	進入GetDefaultParitySettingTest方法
 			Assert.Fail();
-		}
+		}                                                                       //	結束GetDefaultParitySettingTest方法
 	}                                                                           //	結束UARTConnectionConstValTests類別
 }                                                                               //	結束命名空間


niftyer tree smash

niftyer tree smash

--- Unity/ludum-dare-32-PixelStuff/Assets/Scripts/Tree/weaponTree.cs
+++ Unity/ludum-dare-32-PixelStuff/Assets/Scripts/Tree/weaponTree.cs
@@ -30,6 +30,7 @@
 	private float throwCurrentTime = 0.0f;

+	public float xPickUp;
 	public float yPickUp;
 	public enum Etat{
 		isOnTheFloor,
@@ -91,12 +92,14 @@
 				sharpBox.transform.localPosition.z);

 			if (this.GetComponent<SpriteRenderer>().sprite != finalSprite) {
-				this.transform.position = new Vector3(this.transform.position.x - (m_lastHalfWidth-TabState[CurrentState].rect.width/2)/100 ,
+				xPickUp = this.transform.position.x - (m_lastHalfWidth-TabState[CurrentState].rect.width/2)/100;
+				this.transform.position = new Vector3(xPickUp,
 			    	                                  this.transform.position.y,
 			        	                              this.transform.position.z);
 				m_lastHalfWidth = TabState[CurrentState].rect.width/2;
 			} else {
-				this.transform.position = new Vector3(this.transform.position.x - (m_lastHalfWidth-finalSprite.rect.width/2)/100 ,
+				xPickUp = this.transform.position.x - (m_lastHalfWidth-finalSprite.rect.width/2)/100;
+				this.transform.position = new Vector3(xPickUp,
 				                                      this.transform.position.y,
 				                                      this.transform.position.z);
 				m_lastHalfWidth = finalSprite.rect.width/2;
@@ -119,7 +122,7 @@
 		if (currentEtat == Etat.isSmashing) {
 				if (setAngleTo(onTheGroundAngle -smashAngle,secondeSmash)){
 					this.transform.localEulerAngles = new Vector3(0,0,onTheGroundAngle) ;
-				this.transform.position = new Vector3(this.transform.position.x,yPickUp,this.transform.position.z);
+				this.transform.position = new Vector3(xPickUp,yPickUp,this.transform.position.z);
 					smashHitTheGround();

 				}
@@ -152,7 +155,7 @@

 	private bool setAngleTo(float angle,float seconde){
-		this.transform.RotateAround (new Vector3(GameObject.FindGameObjectWithTag ("Player").transform.position.x,this.transform.position.y,this.transform.position.z), new Vector3 (0, 0, 1), (angle/seconde) * Time.deltaTime);
+		this.transform.RotateAround (new Vector3(this.transform.position.x - TabState[CurrentState].rect.width/200 ,this.transform.position.y,this.transform.position.z), new Vector3 (0, 0, 1), (angle/seconde) * Time.deltaTime);
 		currentTimeAnim -= Time.deltaTime;
 		return currentTimeAnim < 0.0f ;
 	}
@@ -240,6 +243,7 @@
 	public void pick(){
 		this.GetComponent<FollowingGroundSpeed>().enabled = false;
 		GameObject.FindGameObjectWithTag ("GripTree").GetComponent<BoxCollider2D> ().enabled = false;
+		xPickUp = this.transform.position.x;
 		this.transform.position = new Vector3(this.transform.position.x,yPickUp,this.transform.position.z);
 		currentEtat = Etat.idle;
 		m_lastHalfWidth = TabState[CurrentState].rect.width/2;


Remove redundant add damage methods

Remove redundant add damage methods

--- UnityProject/Assets/Scripts/Tilemaps/Behaviours/TilemapDamage.cs
+++ UnityProject/Assets/Scripts/Tilemaps/Behaviours/TilemapDamage.cs
@@ -200,19 +200,6 @@
 		}

 		return basicTile.AddDamage(dmgAmt, data, cellPos, attackType, tileChangeManager);
-
-	}
-
-	private float AddWallDamage(float dmgAmt, MetaDataNode data, Vector3Int cellPos, Vector2 worldPos, AttackType attackType)
-	{
-		data.Damage += GetReducedDamage(cellPos, dmgAmt, attackType);
-		BasicTile tile = null;
-		if (data.Damage >= GetMaxDamage(cellPos))
-		{
-			tile =  tileChangeManager.RemoveTile(cellPos, LayerType.Walls) as BasicTile;
-		}
-
-		return CalculateAbsorbDamaged(cellPos, attackType,data,tile);
 	}

 	private float AddWindowDamage(float damage, MetaDataNode data, Vector3Int cellPos, Vector3 hitPos, AttackType attackType, bool spawnPieces = true)
@@ -240,19 +227,6 @@
 		}

 		return CalculateAbsorbDamaged(cellPos, attackType,data,tile);
-	}
-
-	private float AddTableDamage(float dmgAmt, MetaDataNode data, Vector3Int cellPos, Vector2 worldPos, AttackType attackType)
-	{
-		data.Damage += GetReducedDamage(cellPos, dmgAmt, attackType);
-		BasicTile tile = null;
-		if (data.Damage >= GetMaxDamage(cellPos))
-		{
-			//watch out! must not accidentally destroy other objects like player!
-			tile = tileChangeManager.RemoveTile(cellPos, LayerType.Objects) as BasicTile;
-		}
-
-		return CalculateAbsorbDamaged(cellPos, attackType,data, tile);
 	}

 	private float AddFloorDamage(float dmgAmt, MetaDataNode data, Vector3Int cellPos, Vector2 worldPos, AttackType attackType)


more on fix test

more on fix test

--- Signum.Engine/Linq/ExpressionVisitor/DbExpressionNominator.cs
+++ Signum.Engine/Linq/ExpressionVisitor/DbExpressionNominator.cs
@@ -595,8 +595,10 @@
             if (innerProjection || !Has(exprDate) || !Has(exprTime))
                 return null;

-            var castDate = new SqlCastExpression(typeof(DateTime), exprDate, new AbstractDbType(SqlDbType.DateTime, NpgsqlDbType.Timestamp)); //Just in case is a Date
-            var castTime = new SqlCastExpression(typeof(TimeSpan), exprTime, new AbstractDbType(SqlDbType.Time, NpgsqlDbType.Time)); //Just in case is a Date
+            //Sql Server DateTime + DateTim
+            //Postgres TimeSpan + Time
+            var castDate = new SqlCastExpression(typeof(DateTime), exprDate, new AbstractDbType(SqlDbType.DateTime, NpgsqlDbType.Timestamp));
+            var castTime = new SqlCastExpression(typeof(TimeSpan), exprTime, new AbstractDbType(SqlDbType.DateTime, NpgsqlDbType.Time));

             var result = add ? Expression.Add(castDate, castTime) :
                 Expression.Subtract(castDate, castTime);