Accomodate changes made to child tables

Accomodate changes made to child tables

--- Cascara/Src/SymbolTable.cs
+++ Cascara/Src/SymbolTable.cs
@@ -35,6 +35,8 @@
     ///
     internal sealed class SymbolTable : IEnumerable<KeyValuePair<string, SymbolTableEntry>>
     {
+        private const string ArrayNotationPattern = @"\[(\d+)\]$";
+
         private Dictionary<string, SymbolTableEntry> entries;

         ///
@@ -92,7 +94,7 @@
         /// Adds the provided <see cref="SymbolTableEntry"/> to the table and
         /// associates it with the provided name.
         ///
-        /// <param name="name">
+        /// <param name="symbol">
         /// The name to be given to the table entry.
         /// </param>
         /// <param name="e">
@@ -101,16 +103,14 @@
         /// <returns>
         /// False if the given name already exists in the table.
         /// </returns>
-        public bool AddEntry(string name, SymbolTableEntry e)
-        {
-            string symbol = CreateSymbol(name);
+        public bool AddEntry(string symbol, SymbolTableEntry e)
+        {
             if (entries.ContainsKey(symbol))
             {
                 return false;
             }

             entries.Add(symbol, e);
-
             return true;
         }

@@ -145,9 +145,10 @@
         public SymbolTableEntry GetEntry(string name)
         {
             string[] splitname = name.Split('.');
+            int childIndex = GetArrayIndex(splitname[0]);

             // Traverse up the tree until we find the first part of the name.
-            SymbolTableEntry top = SearchUp(this, CreateSymbol(splitname[0]));
+            SymbolTableEntry top = SearchUp(this, StripArrayNotation(splitname[0]));
             if (top == null)
             {
                 return null;
@@ -156,17 +157,18 @@
             // Traverse down from the top until we find the entry whose name
             // matches the last part of the provided name
             SymbolTableEntry result = top;
-            SymbolTable tabl = result.Child;
+            SymbolTable tabl = (childIndex != -1) ? result.Children[childIndex] : result.FirstChild;
             string sym;

             for (int i = 1; i < splitname.Length; i++)
             {
-                sym = CreateSymbol(splitname[i]);
+                sym = splitname[i];
+                childIndex = GetArrayIndex(sym);
                 if (tabl == null || !tabl.entries.TryGetValue(sym, out result))
                 {
                     return null;
                 }
-                tabl = result.Child;
+                tabl = (childIndex != -1) ? result.Children[childIndex] : result.FirstChild;
             }

             return result;
@@ -214,12 +216,14 @@
                 throw new KeyNotFoundException(msg);
             }

-            if (!e.HasChild)
-            {
-                return new Dictionary<string, SymbolTableEntry>();
-            }
-
-            return GetChildren(e.Child);
+            Dictionary<string, SymbolTableEntry> children = new Dictionary<string, SymbolTableEntry>();
+            foreach (SymbolTable childTable in e.Children)
+            {
+                Dictionary<string, SymbolTableEntry> childEntries = GetChildren(childTable);
+                children = children.Concat(childEntries).ToDictionary(x => x.Key, y => y.Value);
+            }
+
+            return children;
         }

         ///
@@ -253,12 +257,14 @@
                 throw new KeyNotFoundException(msg);
             }

-            if (!e.HasChild)
-            {
-                return new Dictionary<string, SymbolTableEntry>();
-            }
-
-            return GetDescendants(e.Child);
+            Dictionary<string, SymbolTableEntry> descendants = new Dictionary<string, SymbolTableEntry>();
+            foreach (SymbolTable childTable in e.Children)
+            {
+                Dictionary<string, SymbolTableEntry> childEntries = GetDescendants(childTable);
+                descendants = descendants.Concat(childEntries).ToDictionary(x => x.Key, y => y.Value);
+            }
+
+            return descendants;
         }

         ///
@@ -375,49 +381,86 @@
         /// </returns>
         public bool IsArray(string name)
         {
-            name = StripArrayNotation(name);
-            string elem1 = name + "[1]";
-
-            return ContainsEntry(elem1);
-        }
-
-        ///
-        /// Gets the number of elements in the array
-        /// referred to by the given name.
-        ///
-        /// <param name="name">
-        /// The name of the array to get the element count for.
-        /// </param>
-        /// <returns>
-        /// The number of elements in the array.
-        /// If the given name does not exist or does not refer
-        /// to an array, 0 is returned.
-        /// </returns>
-        public int GetElemCount(string name)
-        {
-            if (!IsArray(name))
-            {
-                return 0;
-            }
-
-            name = StripArrayNotation(name);
-            int count = 0;
-            do
-            {
-                string elemName = name + string.Format("[{0}]", count);
-                if (!ContainsEntry(elemName))
-                {
-                    break;
-                }
-                count++;
-            } while (true);
-
-            return count;
-        }
-
+            string sym = StripArrayNotation(name);
+
+            SymbolTableEntry e = GetEntry(sym);
+            return e != null && e.TypeInfo.IsArray;
+        }
+
+        /////
+        ///// Gets the number of elements in the array
+        ///// referred to by the given name.
+        /////
+        ///// <param name="name">
+        ///// The name of the array to get the element count for.
+        ///// </param>
+        ///// <returns>
+        ///// The number of elements in the array.
+        ///// If the given name does not exist or does not refer
+        ///// to an array, 0 is returned.
+        ///// </returns>
+        //public int GetElemCount(string name)
+        //{
+        //    if (!IsArray(name))
+        //    {
+        //        return 0;
+        //    }
+
+        //    name = StripArrayNotation(name);
+        //    int count = 0;
+        //    do
+        //    {
+        //        string elemName = name + string.Format("[{0}]", count);
+        //        if (!ContainsEntry(elemName))
+        //        {
+        //            break;
+        //        }
+        //        count++;
+        //    } while (true);
+
+        //    return count;
+        //}
+
+        ///
+        /// Removes the array element brackets from a given symbol name.
+        ///
+        /// <param name="s">
+        /// The symbol to trim.
+        /// </param>
+        /// <returns>
+        /// The symbol name with array brackets removed from the
+        /// most immediate symbol name (i.e. last in a dot-separated list).
+        /// </returns>
         private string StripArrayNotation(string s)
         {
-            return Regex.Replace(s, @"\[\d+\]$", "");
+            return Regex.Replace(s, ArrayNotationPattern, "");
+        }
+
+        ///
+        /// Gets the index of the array referred to by the given symbol
+        /// name. If the symbol does not refer to an array element,
+        /// -1 is returned.
+        ///
+        /// <param name="s">
+        /// The symbol to get the array index of.
+        /// </param>
+        /// <returns>
+        /// The index of the array referred to by the symbol.
+        /// -1 if the symbol does not refer to an array element.
+        /// </returns>
+        /// <exception cref="FormatException">
+        /// Thrown if the array index is not valid unsigned integer.
+        /// </exception>
+        private int GetArrayIndex(string s)
+        {
+            Match m = Regex.Match(s, ArrayNotationPattern);
+            string idxStr = m.Groups[1].Value;
+            if (string.IsNullOrEmpty(idxStr))
+            {
+                return -1;
+            }
+
+            return (int) uint.Parse(idxStr);
         }

         public IEnumerator<KeyValuePair<string, SymbolTableEntry>> GetEnumerator()
@@ -436,27 +479,27 @@
                 GetFullyQualifiedName(), entries.Count, HasParent);
         }

-        ///
-        /// Creates a unique symbol for the given identifier by appending
-        /// an array index to the end (if not already present).
-        ///
-        /// <param name="name">
-        /// The identifier to turn into a symbol.
-        /// </param>
-        /// <returns>
-        /// The newly-created symbol.
-        /// </returns>
-        private static string CreateSymbol(string name)
-        {
-            const string ArrayNotationPattern = @"^.*\[\d+\]$";
-
-            if (!Regex.IsMatch(name, ArrayNotationPattern))
-            {
-                name = name + "[0]";
-            }
-
-            return name;
-        }
+        /////
+        ///// Creates a unique symbol for the given identifier by appending
+        ///// an array index to the end (if not already present).
+        /////
+        ///// <param name="name">
+        ///// The identifier to turn into a symbol.
+        ///// </param>
+        ///// <returns>
+        ///// The newly-created symbol.
+        ///// </returns>
+        //private static string CreateSymbol(string name)
+        //{
+        //    const string ArrayNotationPattern = @"^.*\[\d+\]$";
+
+        //    if (!Regex.IsMatch(name, ArrayNotationPattern))
+        //    {
+        //        name = name + "[0]";
+        //    }
+
+        //    return name;
+        //}

         ///
         /// Searches the parent tables for the given symbol.
@@ -505,15 +548,24 @@
                 keys.Add(name);

                 SymbolTableEntry entry = kvp.Value;
-                if (entry.HasChild)
+                foreach (SymbolTable childTable in entry.Children)
                 {
-                    keys.AddRange(GetAllKeys(entry.Child));
+                    keys.AddRange(GetAllKeys(childTable));
                 }
             }

             return keys;
         }

+        ///
+        /// Returns the first level of descendants of a given <see cref="SymbolTable"/>.
+        ///
+        /// <param name="tabl">
+        /// The <see cref="SymbolTable"/> to get the children of.
+        /// </param>
+        /// <returns>
+        /// A map of symbol names to symbol table entries for the first level descendants.
+        /// </returns>
         private static Dictionary<string, SymbolTableEntry> GetChildren(SymbolTable tabl)
         {
             Dictionary<string, SymbolTableEntry> children = new Dictionary<string, SymbolTableEntry>();
@@ -527,6 +579,15 @@
             return children;
         }

+        ///
+        /// Returns all descendants of a given <see cref="SymbolTable"/>.
+        ///
+        /// <param name="tabl">
+        /// The <see cref="SymbolTable"/> to get the descendants of.
+        /// </param>
+        /// <returns>
+        /// A map of all symbol names to symbol table entries for the given <see cref="SymbolTable"/>.
+        /// </returns>
         private static Dictionary<string, SymbolTableEntry> GetDescendants(SymbolTable tabl)
         {
             Dictionary<string, SymbolTableEntry> descendants = new Dictionary<string, SymbolTableEntry>();
@@ -536,9 +597,9 @@
                 SymbolTableEntry entry = kvp.Value;
                 descendants[name] = entry;

-                if (entry.HasChild)
+                foreach (SymbolTable childTable in entry.Children)
                 {
-                    Dictionary<string, SymbolTableEntry> childEntries = GetDescendants(entry.Child);
+                    Dictionary<string, SymbolTableEntry> childEntries = GetDescendants(childTable);
                     descendants = descendants.Concat(childEntries).ToDictionary(x => x.Key, y => y.Value);
                 }
             }


AnimationView.SetState: Optionally set trigger.

--- AnimationView.cs
+++ AnimationView.cs
@@ -23,24 +23,31 @@
 		// Unity expects not to animate the camera or the root itself.  Instead animate the child of the root.  The root might not move.
 		// Test case:  2016-02-13 Animate camera position.  Play.  Camera does not move.  Generate root motion curves.  Apply root motion curves.  Still camera does not move.  Assign animator to parent of camera.  Animate child.  Then camera moves.
 		//
-		public static void SetState(GameObject animatorOwner, string state, bool isRestart = false)
+		// isTrigger:  If true, then set trigger.  Otherwise play animation.
+		public static void SetState(GameObject animatorOwner, string state, bool isRestart = false, bool isTrigger = false)
 		{
 			Animator animator = animatorOwner.GetComponent<Animator>();
 			if (null != animator && animator.isInitialized)
 			{
-				if (isVerbose)
+				if (isTrigger)
 				{
-					Debug.Log("AnimationView.SetState: "
-						+ SceneNodeView.GetPath(animatorOwner)
-						+ ": " + state + " at " + Time.time);
+					animator.SetTrigger(state);
 				}
-				if (isRestart)
+				else if (isRestart)
 				{
 					animator.Play(state, -1, 0f);
 				}
 				else
 				{
 					animator.Play(state);
+				}
+				bool isChange = !states.ContainsKey(animatorOwner)
+					|| states[animatorOwner] != state;
+				if (isVerbose && (isRestart || isChange))
+				{
+					Debug.Log("AnimationView.SetState: "
+						+ SceneNodeView.GetPath(animatorOwner)
+						+ ": " + state + " at " + Time.time);
 				}
 				states[animatorOwner] = state;
 				startTimes[state] = Time.time;


iPhoneで動作させると、画面がステータスバーに重なってしまう問題を解消しました。

--- InstantEverClip/InstantEverClip/InstantEverClip/App.cs
+++ InstantEverClip/InstantEverClip/InstantEverClip/App.cs
@@ -37,6 +37,7 @@
             {
                 HorizontalOptions = LayoutOptions.FillAndExpand
             };
+            Padding = new Thickness(0, Device.OnPlatform(20, 0, 0), 0, 0);

             StackLayout layout1 = new StackLayout
             {


Modified Unquote method

Modified Unquote method

--- websocket-sharp/Ext.cs
+++ websocket-sharp/Ext.cs
@@ -540,15 +540,9 @@
         return null;

       var val = nameAndValue.Substring (i + 1).Trim ();
-      var len = val.Length;
-      if (len > 0 && val[0] == '"' && unquote) {
-        var end = val.LastIndexOf ('"');
-        return end == 0
-               ? len > 1 ? val.Substring (1) : String.Empty
-               : end > 1 ? val.Substring (1, end - 1) : String.Empty;
-      }
-
-      return val;
+      return unquote && val.Length > 1
+             ? val.Unquote ()
+             : val;
     }

     internal static TcpListenerWebSocketContext GetWebSocketContext (
@@ -893,10 +887,13 @@
     {
       var start = value.IndexOf ('"');
       var end = value.LastIndexOf ('"');
-      if (start < end)
-        value = value.Substring (start + 1, end - start - 1).Replace ("\\\"", "\"");
-
-      return value.Trim ();
+      var len = end - start - 1;
+
+      return len < 0
+             ? value
+             : len == 0
+               ? String.Empty
+               : value.Substring (start + 1, len).Replace ("\\\"", "\"");
     }

     internal static void WriteBytes (this Stream stream, byte[] data)


[Modify] Polish it

[Modify] Polish it

--- websocket-sharp/Ext.cs
+++ websocket-sharp/Ext.cs
@@ -1004,12 +1004,13 @@

     internal static byte[] ToByteArray (this Stream stream)
     {
-      using (var output = new MemoryStream ()) {
-        stream.Position = 0;
-        stream.CopyTo (output, 1024);
-        output.Close ();
-
-        return output.ToArray ();
+      stream.Position = 0;
+
+      using (var buff = new MemoryStream ()) {
+        stream.CopyTo (buff, 1024);
+        buff.Close ();
+
+        return buff.ToArray ();
       }
     }


Make TopicClient single instance

Make TopicClient single instance


Fixes Issue 95. (Reverted r383)

Fixes Issue 95. (Reverted r383)

--- ImageListView.cs
+++ ImageListView.cs
@@ -1053,7 +1053,7 @@
             if (ScrollOrientation == ScrollOrientation.VerticalScroll)
             {
                 int newYOffset = mViewOffset.Y - (e.Delta / SystemInformation.MouseWheelScrollDelta)
-                    * vScrollBar.SmallChange * SystemInformation.MouseWheelScrollLines;
+                    * vScrollBar.SmallChange;
                 if (newYOffset > vScrollBar.Maximum - vScrollBar.LargeChange + 1)
                     newYOffset = vScrollBar.Maximum - vScrollBar.LargeChange + 1;
                 if (newYOffset < 0)
@@ -1066,7 +1066,7 @@
             else
             {
                 int newXOffset = mViewOffset.X - (e.Delta / SystemInformation.MouseWheelScrollDelta)
-                    * hScrollBar.SmallChange * SystemInformation.MouseWheelScrollLines;
+                    * hScrollBar.SmallChange;
                 if (newXOffset > hScrollBar.Maximum - hScrollBar.LargeChange + 1)
                     newXOffset = hScrollBar.Maximum - hScrollBar.LargeChange + 1;
                 if (newXOffset < 0)


Add ColumnMapping documentation (closes #16)

--- Ndapi/ColumnMapping.cs
+++ Ndapi/ColumnMapping.cs
@@ -3,29 +3,46 @@

 namespace Ndapi
 {
+    /// <summary>
+    /// Represents a column mapping for lists of values.
+    /// </summary>
     public class ColumnMapping : NdapiObject
     {
-        public ColumnMapping(FormModule module, string name)
+        /// <summary>
+        /// Creates a column mapping.
+        /// </summary>
+        /// <param name="lov">List of values.</param>
+        /// <param name="name">Column name.</param>
+        public ColumnMapping(LOV lov, string name)
         {
-            Create(name, ObjectType.ColumnMapping, module);
+            Create(name, ObjectType.ColumnMapping, lov);
         }

         internal ColumnMapping(ObjectSafeHandle handle) : base(handle)
         {
         }

+        /// <summary>
+        /// Gets or sets the display width.
+        /// </summary>
         public int DisplayWidth
         {
             get { return GetNumberProperty(NdapiConstants.D2FP_DISP_WID); }
             set { SetNumberProperty(NdapiConstants.D2FP_DISP_WID, value); }
         }

+        /// <summary>
+        /// Gets or sets the return item.
+        /// </summary>
         public string ReturnItem
         {
             get { return GetStringProperty(NdapiConstants.D2FP_RTRN_ITM); }
             set { SetStringProperty(NdapiConstants.D2FP_RTRN_ITM, value); }
         }

+        /// <summary>
+        /// Gets or sets the column title.
+        /// </summary>
         public string Title
         {
             get { return GetStringProperty(NdapiConstants.D2FP_TITLE); }


Added additional structure.

Added additional structure.

--- NtApiDotNet/NtToken.cs
+++ NtApiDotNet/NtToken.cs
@@ -447,6 +447,13 @@
         public IntPtr Sid;
     }

+    [StructLayout(LayoutKind.Sequential)]
+    public struct TokenBnoIsolationInformation
+    {
+        public UnicodeStringOut IsolationPrefix;
+        public bool   IsolationEnabled;
+    }
+
     public static partial class NtSystemCalls
     {
         [DllImport("ntdll.dll", CharSet = CharSet.Unicode)]


Fixed #13

Fixed #13

--- src/MaterialForms/Wpf/Fields/Defaults/ActionElement.cs
+++ src/MaterialForms/Wpf/Fields/Defaults/ActionElement.cs
@@ -94,11 +94,7 @@
                 var frameworkElement = fwContext.GetOwningElement();
                 if (frameworkElement != null && frameworkElement.CheckAccess())
                 {
-                    var dialogHost = GetVisualAncestry(frameworkElement).OfType<DialogHost>().FirstOrDefault();
-                    if (dialogHost != null)
-                    {
-                        dialogHost.IsOpen = false;
-                    }
+                    DialogHost.CloseDialogCommand.Execute(arg, frameworkElement);
                 }
             }


Add small optimisation to message writing

svn path=/trunk/bitsharp/; revision=125961

--- src/MonoTorrent/MonoTorrent.Client/Messages/Message.cs
+++ src/MonoTorrent/MonoTorrent.Client/Messages/Message.cs
@@ -159,12 +159,18 @@

         static public int Write(byte[] buffer, int offset, short value)
         {
-            return Write(buffer, offset, BitConverter.GetBytes(IPAddress.HostToNetworkOrder(value)));
+            offset += Write(buffer, offset, (byte)(value >> 8));
+            offset += Write(buffer, offset, (byte)value);
+            return 2;
         }

         static public int Write(byte[] buffer, int offset, int value)
         {
-            return Write(buffer, offset, BitConverter.GetBytes(IPAddress.HostToNetworkOrder(value)));
+            offset += Write(buffer, offset, (byte)(value >> 24));
+            offset += Write(buffer, offset, (byte)(value >> 16));
+            offset += Write(buffer, offset, (byte)(value >> 8));
+            offset += Write(buffer, offset, (byte)(value));
+            return 4;
         }

         static public int Write(byte[] buffer, int offset, uint value)
@@ -174,7 +180,9 @@

         static public int Write(byte[] buffer, int offset, long value)
         {
-            return Write(buffer, offset, BitConverter.GetBytes(IPAddress.HostToNetworkOrder(value)));
+            offset += Write(buffer, offset, (int)(value >> 32));
+            offset += Write(buffer, offset, (int)value);
+            return 8;
         }

         static public int Write(byte[] buffer, int offset, ulong value)


Grid sorting arrows

Grid sorting arrows

- Fixed, grid sorting arrow is always invisible or could be visible then
sorting is disabled.

--- src/Mvc.Grid.Content/Views/Shared/MvcGrid/_Grid.cshtml
+++ src/Mvc.Grid.Content/Views/Shared/MvcGrid/_Grid.cshtml
@@ -20,7 +20,7 @@
                         data-sort-order="@column.SortOrder"
                         data-sort-query="@column.GetSortingQuery()">
                         @column.Title
-                        @if (column.SortOrder == null)
+                        @if (column.IsSortable == true && column.SortOrder != null)
                         {

                         }


#676 Mainnet not configured to reverse resolve "nick.eth" address

Changing tests to use alex.vandesande.eth

--- src/Nethereum.ENS.IntegrationTests/ENS/ENSLocalTest.cs
+++ src/Nethereum.ENS.IntegrationTests/ENS/ENSLocalTest.cs
@@ -144,8 +144,8 @@
         {
             var web3 = new Web3.Web3("https://mainnet.infura.io/v3/7238211010344719ad14a89db874158c");
             var ensService = new ENSService(web3);
-            var name = await ensService.ReverseResolveAsync("0xb8c2C29ee19D8307cb7255e1Cd9CbDE883A267d5");
-            var expectedName = "nick.eth";
+            var name = await ensService.ReverseResolveAsync("0xd1220a0cf47c7b9be7a2e6ba89f429762e7b9adb");
+            var expectedName = "alex.vandesande.eth";
             Assert.Equal(expectedName, name);
         }

@@ -278,4 +278,4 @@

         }
     }
-}+}


Adding an link to the quoted message that points to the original message. I think that's quite useful

--- DotNetNukeUrlBuilder.cs
+++ DotNetNukeUrlBuilder.cs
@@ -54,7 +54,7 @@
     /// </returns>
     public override string BuildUrl(string sUrl)
     {
-      StringBuilder newUrl = null;
+      StringBuilder newUrl = new StringBuilder();

       PortalSettings curPortalSettings = PortalController.GetCurrentPortalSettings();

@@ -70,8 +70,8 @@
         return string.Format("{0}?tabid={1}&{2}", sScriptName, curTab.TabID, sUrl);
       }

-      try
-      {
+     // try
+      //{
         string oldUrl = Globals.NavigateURL(curTab.TabID);

         if (oldUrl.Contains("Default.aspx"))
@@ -114,10 +114,22 @@
               {
                 useKey = "m";

+                  string topicName;
+
+                  try
+                  {
+                      topicName = this.GetTopicNameFromMessage(Convert.ToInt32(parser["m"]));
+                  }
+                  catch (Exception)
+                  {
+
+                      topicName = parser["g"];
+                  }
+
                 newUrl.AppendFormat(
                   "g/{2}/m/{0}/{1}",
-                  parser["m"],
-                  this.GetTopicNameFromMessage(Convert.ToInt32(parser["m"])),
+                  parser["m"],
+                  topicName,
                   parser["g"]);
               }
             }
@@ -198,13 +210,13 @@

         // just make sure & is & ...
        // sNewURL = sNewURL.Replace("&", "&").Replace("&", "&");
-      }
+     /* }
       catch (Exception)
       {
         string sScriptName = HttpContext.Current.Request.ServerVariables["SCRIPT_NAME"];

         return string.Format("{0}?tabid={1}&{2}", sScriptName, curTab.TabID, sUrl);
-      }
+      }*/

       return newUrl.ToString();
     }


Add endpoint for market types with active orders.

--- ESISharp/Path/Market.cs
+++ ESISharp/Path/Market.cs
@@ -114,6 +114,32 @@
             var Path = $"/markets/groups/{GroupID.ToString()}/";
             return new EsiRequest(EasyObject, Path, EsiWebMethod.Get);
         }
+
+        /// <summary>
+        /// Get type IDs with active orders in a Region (First Page)
+        /// </summary>
+        /// <param name="RegionID"></param>
+        /// <returns></returns>
+        public EsiRequest GetMarketTypes(int RegionID)
+        {
+            return GetMarketTypes(RegionID, 1);
+        }
+
+        /// <summary>
+        /// Get type IDs with active orders in a Region
+        /// </summary>
+        /// <param name="RegionID">(Int32 Region ID)</param>
+        /// <param name="Page">(Int32) Page number</param>
+        /// <returns></returns>
+        public EsiRequest GetMarketTypes(int RegionID, int Page)
+        {
+            var Path = $"/markets/{RegionID.ToString()}/types/";
+            var Data = new
+            {
+                page = Page
+            };
+            return new EsiRequest(EasyObject, Path, EsiWebMethod.Get, Data);
+        }
     }

     /// <summary>Public and Authenticated Market paths</summary>


* Fixed typo in Give command. Now you again can give the items with specified metadata to yourself.

--- Chraft/Commands/CmdGive.cs
+++ Chraft/Commands/CmdGive.cs
@@ -29,7 +29,7 @@
             if (tokens[0].Contains(':'))
             {
                 itemName = tokens[0].Split(':')[0].Trim();
-                short.TryParse(tokens[0].Split(':')[0].Trim(), out metaData);
+                short.TryParse(tokens[0].Split(':')[1].Trim(), out metaData);
                 item = client.Owner.Server.Items[itemName];
                 item.Durability = metaData;
             }


small cleanup to logs

small cleanup to logs

--- NadekoBot.Core/Modules/Administration/Services/LogCommandService.cs
+++ NadekoBot.Core/Modules/Administration/Services/LogCommandService.cs
@@ -48,25 +48,27 @@

             _timerReference = new Timer(async (state) =>
             {
-                try
-                {
-                    var keys = PresenceUpdates.Keys.ToList();
-
-                    await Task.WhenAll(keys.Select(key =>
-                    {
-                        if (PresenceUpdates.TryRemove(key, out var msgs))
+                var keys = PresenceUpdates.Keys.ToList();
+
+                await Task.WhenAll(keys.Select(key =>
+                {
+                    if (!((SocketGuild)key.Guild).CurrentUser.GetPermissions(key).SendMessages)
+                        return Task.CompletedTask;
+                    if (PresenceUpdates.TryRemove(key, out var msgs))
+                    {
+                        var title = GetText(key.Guild, "presence_updates");
+                        var desc = string.Join(Environment.NewLine, msgs);
+                        try
                         {
-                            var title = GetText(key.Guild, "presence_updates");
-                            var desc = string.Join(Environment.NewLine, msgs);
                             return key.SendConfirmAsync(title, desc.TrimTo(2048));
                         }
-                        return Task.CompletedTask;
-                    })).ConfigureAwait(false);
-                }
-                catch (Exception ex)
-                {
-                    _log.Warn(ex);
-                }
+                        catch (Exception ex)
+                        {
+                            _log.Warn(ex);
+                        }
+                    }
+                    return Task.CompletedTask;
+                })).ConfigureAwait(false);
             }, null, TimeSpan.FromSeconds(15), TimeSpan.FromSeconds(15));

             //_client.MessageReceived += _client_MessageReceived;


fix ArticleValidator typo

fix ArticleValidator typo

--- Client.Entities/Article.cs
+++ Client.Entities/Article.cs
@@ -80,7 +80,7 @@
         #region Validation
         protected override IValidator GetValidator()
         {
-            return new BlogValidator();
+            return new ArticleValidator();
         }
         #endregion
     }


update install url

update install url

--- Emby.Theater/Program.cs
+++ Emby.Theater/Program.cs
@@ -115,7 +115,7 @@

             try
             {
-                var key = Environment.Is64BitProcess ? "3ee5e5bb-b7cc-4556-8861-a00a82977d6c" : "23daf363-3020-4059-b3ae-dc4ad39fed19";
+                var key = Environment.Is64BitOperatingSystem ? "3ee5e5bb-b7cc-4556-8861-a00a82977d6c" : "23daf363-3020-4059-b3ae-dc4ad39fed19";

                 using (RegistryKey ndpKey = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Default)
                     .OpenSubKey("SOFTWARE\\Classes\\Installer\\Dependencies\\{"+ key + "}"))


Result key will exclude id preventing re-run of same parameters

--- Optimization/Runner.cs
+++ Optimization/Runner.cs
@@ -37,7 +37,7 @@
                 if (!items.ContainsKey("endDate")) { items.Add("endDate", _config.EndDate); }
             }

-            string jsonKey = JsonConvert.SerializeObject(items);
+            string jsonKey = JsonConvert.SerializeObject(items.Where(i => i.Key != "Id"));

             if (results.ContainsKey(jsonKey))
             {


Replaced ServerRelative and SiteRelative parameters with SourceUrl.

Added support to copy from any site/site collection to any site/site collection

Re-worked all samples

Replaced .Load with EnsureProperties

--- Commands/Files/CopyFile.cs
+++ Commands/Files/CopyFile.cs
@@ -11,51 +11,71 @@

 namespace SharePointPnP.PowerShell.Commands.Files
 {
-    [Cmdlet(VerbsCommon.Copy, "PnPFile", SupportsShouldProcess = true)]
+    [Cmdlet(VerbsCommon.Copy, "PnPFile", SupportsShouldProcess = true, DefaultParameterSetName = "SOURCEURL")]
     [CmdletAlias("Copy-SPOFile")]
     [CmdletHelp("Copies a file or folder to a different location",
         Category = CmdletHelpCategory.Files)]
     [CmdletExample(
-        Remarks = "Copies a file named company.docx located in a document library called Documents in the projects sitecollection to the site collection otherproject. If a file named company.aspx already exists, it won't perform the copy.",
-        Code = @"PS:>Copy-PnPFile -ServerRelativeUrl /sites/project/Documents/company.docx -TargetUrl /sites/otherproject/Documents/company.docx",
+        Remarks = "Copies a file named company.docx located in a document library called Documents in the current site to the site collection otherproject. If a file named company.docx already exists, it won't perform the copy.",
+        Code = @"PS:>Copy-PnPFile -SourceUrl Documents/company.docx -TargetUrl /sites/otherproject/Documents/company.docx",
         SortOrder = 1)]
     [CmdletExample(
-        Remarks = "Copies a file named company.docx located in a document library called Documents in the current site to the Documents library in the site collection otherproject. If a file named company.aspx already exists, it won't perform the copy.",
-        Code = @"PS:>Copy-PnPFile -SiteRelativeUrl Documents/company.aspx -TargetUrl /sites/otherproject/Documents/company.docx",
+        Remarks = "Copies a file named company.docx located in a document library called Documents to a new document named company2.docx in the same library.",
+        Code = @"PS:>Copy-PnPFile -SourceUrl Documents/company.docx -TargetUrl Documents/company2.docx",
         SortOrder = 2)]
     [CmdletExample(
-        Remarks = "Copies a file named company.docx located in a document library called Documents in the projects sitecollection to the site collection otherproject. If a file named company.aspx already exists, it will still perform the copy and replace the original company.aspx file.",
-        Code = @"PS:>Copy-PnPFile -ServerRelativeUrl /sites/project/Documents/company.docx -TargetUrl /sites/otherproject/Documents/company.docx -OverwriteIfAlreadyExists",
+        Remarks = "Copies a file named company.docx located in a document library called Documents to a document library called Documents2 in the same site. ",
+        Code = @"PS:>Copy-PnPFile -SourceUrl Documents/company.docx -TargetUrl Documents2/company.docx",
         SortOrder = 3)]
     [CmdletExample(
-        Remarks = "Copies a folder named MyDocs in the document library called Documents located in the projects sitecollection to the site collection otherproject. If the MyDocs folder exist it will copy into it, if not it will be created.",
-        Code = @"PS:>Copy-PnPFile -ServerRelativeUrl /sites/project/Documents/MyDocs -TargetUrl /sites/otherproject/Documents -OverwriteIfAlreadyExists",
+        Remarks = "Copies a file named company.docx located in a document library called Documents to the document library named Document in a subsite named Subsite as a new document named company2.docx.",
+        Code = @"PS:>Copy-PnPFile -SourceUrl Documents/company.docx -TargetUrl Subsite/Documents/company2.docx",
         SortOrder = 4)]
     [CmdletExample(
-        Remarks = "Copies a folder named MyDocs in the document library called Documents located in the projects sitecollection to the root folder of the library named Documents in the site collection otherproject.",
-        Code = @"PS:>Copy-PnPFile -ServerRelativeUrl /sites/project/Documents/MyDocs -TargetUrl /sites/otherproject/Documents -SkipSourceFolderName -OverwriteIfAlreadyExists",
+        Remarks = "Copies a file named company.docx located in a document library called Documents to the document library named Document in a subsite named Subsite keeping the file name.",
+        Code = @"PS:>Copy-PnPFile -SourceUrl Documents/company.docx -TargetUrl Subsite/Documents",
         SortOrder = 5)]
     [CmdletExample(
+        Remarks = "Copies a file named company.docx located in a document library called Documents in the current site to the site collection otherproject. If a file named company.docx already exists, it will still perform the copy and replace the original company.docx file.",
+        Code = @"PS:>Copy-PnPFile -SourceUrl Documents/company.docx -TargetUrl /sites/otherproject/Documents/company.docx -OverwriteIfAlreadyExists",
+        SortOrder = 6)]
+    [CmdletExample(
+        Remarks = "Copies a folder named MyDocs in the document library called Documents located in the current site to the site collection otherproject. If the MyDocs folder exist it will copy into it, if not it will be created.",
+        Code = @"PS:>Copy-PnPFile -SourceUrl Documents/MyDocs -TargetUrl /sites/otherproject/Documents -OverwriteIfAlreadyExists",
+        SortOrder = 7)]
+    [CmdletExample(
+        Remarks = "Copies a folder named MyDocs in the document library called Documents located in the current site to the root folder of the library named Documents in the site collection otherproject.",
+        Code = @"PS:>Copy-PnPFile -SourceUrl Documents/MyDocs -TargetUrl /sites/otherproject/Documents -SkipSourceFolderName -OverwriteIfAlreadyExists",
+        SortOrder = 8)]
+    [CmdletExample(
         Remarks = "Copies a folder named MyDocs in the MyDocs folder of the library named Documents. If the MyDocs folder does not exists, it will be created.",
-        Code = @"PS:>Copy-PnPFile -ServerRelativeUrl /sites/project/Documents/MyDocs -TargetUrl /sites/otherproject/Documents/MyDocs -SkipSourceFolderName -OverwriteIfAlreadyExists",
-        SortOrder = 6)]
+        Code = @"PS:>Copy-PnPFile -SourceUrl Documents/MyDocs -TargetUrl /sites/otherproject/Documents/MyDocs -SkipSourceFolderName -OverwriteIfAlreadyExists",
+        SortOrder = 9)]
     [CmdletExample(
         Remarks = "Copies a folder named MyDocs in the root of the library named Documents. If the MyDocs folder exists in the target, a subfolder also named MyDocs is created.",
-        Code = @"PS:>Copy-PnPFile -ServerRelativeUrl /sites/project/Documents/MyDocs -TargetUrl /sites/otherproject/Documents/MyDocs -OverwriteIfAlreadyExists",
-        SortOrder = 7)]
+        Code = @"PS:>Copy-PnPFile -SourceUrl Documents/MyDocs -TargetUrl /sites/otherproject/Documents/MyDocs -OverwriteIfAlreadyExists",
+        SortOrder = 10)]
+    [CmdletExample(
+        Remarks = "Copies a file named company.docx in the library named Documents in SubSite1 to the library named Documents in SubSite2.",
+        Code = @"PS:>Copy-PnPFile -SourceUrl SubSite1/Documents/company.docx -TargetUrl SubSite2/Documents",
+        SortOrder = 10)]

     public class CopyFile : SPOWebCmdlet
     {
         private ProgressRecord _progressFolder = new ProgressRecord(0, "Activity", "Status") { Activity = "Copying folder" };
         private ProgressRecord _progressFile = new ProgressRecord(1, "Activity", "Status") { Activity = "Copying file" };
-
-        [Parameter(Mandatory = true, Position = 0, ValueFromPipeline = true, ParameterSetName = "SERVER", HelpMessage = "Server relative Url specifying the file to move. Must include the file name.")]
+        private ClientContext _sourceContext;
+        private ClientContext _targetContext;
+
+        [Parameter(Mandatory = true, Position = 0, ValueFromPipeline = true, ParameterSetName = "SERVER", HelpMessage = "Server relative Url specifying the file or folder to copy.")]
+        [Obsolete("Use SourceUrl instead.")]
         public string ServerRelativeUrl = string.Empty;

-        [Parameter(Mandatory = true, Position = 0, ValueFromPipeline = true, ParameterSetName = "SITE", HelpMessage = "Site relative Url specifying the file to move. Must include the file name.")]
-        public string SiteRelativeUrl = string.Empty;
-
-        [Parameter(Mandatory = true, Position = 1, HelpMessage = "Server relative Url where to copy the file to. Must include the file name.")]
+        [Parameter(Mandatory = true, Position = 0, ValueFromPipeline = true, ParameterSetName = "SOURCEURL", HelpMessage = "Site relative Url specifying the file or folder to copy.")]
+        [Alias("SiteRelativeUrl")]
+        public string SourceUrl = string.Empty;
+
+        [Parameter(Mandatory = true, Position = 1, HelpMessage = "Server relative Url where to copy the file or folder to.")]
         public string TargetUrl = string.Empty;

         [Parameter(Mandatory = false, HelpMessage = "If provided, if a file already exists at the TargetUrl, it will be overwritten. If ommitted, the copy operation will be canceled if the file already exists at the TargetUrl location.")]
@@ -69,45 +89,58 @@

         protected override void ExecuteCmdlet()
         {
-            if (ParameterSetName == "SITE")
-            {
-                var webUrl = SelectedWeb.EnsureProperty(w => w.ServerRelativeUrl);
-                ServerRelativeUrl = UrlUtility.Combine(webUrl, SiteRelativeUrl);
-            }
-
-            var file = SelectedWeb.GetFileByServerRelativeUrl(ServerRelativeUrl);
-            var folder = SelectedWeb.GetFolderByServerRelativeUrl(ServerRelativeUrl);
-            ClientContext.Load(file, f => f.Name, f => f.Exists);
-            ClientContext.ExecuteQueryRetry();
-            ClientContext.Load(folder, f => f.Name, f => f.Exists);
-            ClientContext.ExecuteQueryRetry();
+            var sourceServerRelativeUrl = SourceUrl ?? ServerRelativeUrl;
+            var webServerRelativeUrl = SelectedWeb.EnsureProperty(w => w.ServerRelativeUrl);
+            if (!string.IsNullOrEmpty(SourceUrl) && !SourceUrl.StartsWith(webServerRelativeUrl, StringComparison.InvariantCultureIgnoreCase))
+            {
+                sourceServerRelativeUrl = UrlUtility.Combine(webServerRelativeUrl, SourceUrl);
+            }
+            if (!TargetUrl.StartsWith("/"))
+            {
+                //site relative URL
+                TargetUrl = UrlUtility.Combine(webServerRelativeUrl, TargetUrl);
+            }
+
+            Uri currentContextUri = new Uri(ClientContext.Url);
+
+            Uri sourceUri = new Uri(currentContextUri, sourceServerRelativeUrl);
+            Uri sourceWebUri = Microsoft.SharePoint.Client.Web.WebUrlFromFolderUrlDirect(ClientContext, sourceUri);
+            Uri targetUri = new Uri(currentContextUri, TargetUrl);
+            Uri targetWebUri = Microsoft.SharePoint.Client.Web.WebUrlFromFolderUrlDirect(ClientContext, targetUri);
+
+            _sourceContext = ClientContext;
+            if (!currentContextUri.AbsoluteUri.Equals(sourceWebUri.AbsoluteUri, StringComparison.InvariantCultureIgnoreCase))
+            {
+                _sourceContext = ClientContext.Clone(sourceWebUri);
+            }
+
+            File file = _sourceContext.Web.GetFileByServerRelativeUrl(sourceServerRelativeUrl);
+            Folder folder = _sourceContext.Web.GetFolderByServerRelativeUrl(sourceServerRelativeUrl);
+            file.EnsureProperties(f => f.Name, f => f.Exists);
+            folder.EnsureProperties(f => f.Name, f => f.Exists);
             bool srcIsFolder = folder.Exists;
-
-            if (Force || ShouldContinue(string.Format(Resources.CopyFile0To1, ServerRelativeUrl, TargetUrl), Resources.Confirm))
-            {
-                var srcWeb = ClientContext.Web;
-                ClientContext.Load(srcWeb, s => s.Url);
-                ClientContext.ExecuteQueryRetry();
-
-                Uri uri = new Uri(ClientContext.Url);
-                Uri targetUri = new Uri(uri, TargetUrl);
-                var webUrl = Microsoft.SharePoint.Client.Web.WebUrlFromFolderUrlDirect(ClientContext, targetUri);
-                var targetContext = ClientContext.Clone(webUrl.AbsoluteUri);
-                var dstWeb = targetContext.Web;
-                targetContext.Load(dstWeb, s => s.Url);
-                targetContext.ExecuteQueryRetry();
+
+            if (Force || ShouldContinue(string.Format(Resources.CopyFile0To1, sourceServerRelativeUrl, TargetUrl), Resources.Confirm))
+            {
+                var srcWeb = _sourceContext.Web;
+                srcWeb.EnsureProperty(s => s.Url);
+
+                _targetContext = ClientContext.Clone(targetWebUri.AbsoluteUri);
+                var dstWeb = _targetContext.Web;
+                dstWeb.EnsureProperty(s => s.Url);
                 if (srcWeb.Url == dstWeb.Url)
                 {
                     try
                     {
                         // If src/dst are on the same Web, then try using CopyTo - backwards compability
                         file.CopyTo(TargetUrl, OverwriteIfAlreadyExists);
-                        ClientContext.ExecuteQueryRetry();
+                        _sourceContext.ExecuteQueryRetry();
                         return;
                     }
                     catch
                     {
-                        //swallow exception, in case target was a lib/folder
+                        SkipSourceFolderName = true; // target folder exist
+                        //swallow exception, in case target was a lib/folder which exists
                     }
                 }

@@ -117,18 +150,18 @@
                 bool targetFolderExists = false;
                 try
                 {
-                    targetFolder = targetContext.Web.GetFolderByServerRelativeUrl(TargetUrl);
-                    targetContext.Load(targetFolder, f => f.Name, f => f.Exists);
-                    targetContext.ExecuteQueryRetry();
+                    targetFolder = _targetContext.Web.GetFolderByServerRelativeUrl(TargetUrl);
+                    targetFolder.EnsureProperties(f => f.Name, f => f.Exists);
                     if (!targetFolder.Exists) throw new Exception("TargetUrl is an existing file, not folder");
                     targetFolderExists = true;
                 }
                 catch (Exception)
                 {
+                    targetFolder = null;
                     Expression<Func<List, object>> expressionRelativeUrl = l => l.RootFolder.ServerRelativeUrl;
-                    var query = targetContext.Web.Lists.IncludeWithDefaultProperties(expressionRelativeUrl);
-                    var lists = targetContext.LoadQuery(query);
-                    targetContext.ExecuteQueryRetry();
+                    var query = _targetContext.Web.Lists.IncludeWithDefaultProperties(expressionRelativeUrl);
+                    var lists = _targetContext.LoadQuery(query);
+                    _targetContext.ExecuteQueryRetry();
                     lists = lists.OrderByDescending(l => l.RootFolder.ServerRelativeUrl); // order descending in case more lists start with the same
                     foreach (List targetList in lists)
                     {
@@ -156,17 +189,13 @@

         private void CopyFolder(Folder sourceFolder, Folder targetFolder)
         {
-            ClientContext.Load(sourceFolder, folder => folder.Files, folder => folder.Folders, folder => folder.Files.Include(f => f.ServerRelativeUrl));
-            sourceFolder.EnsureProperty(f => f.ServerRelativeUrl);
-            ClientContext.ExecuteQueryRetry();
+            sourceFolder.EnsureProperties(f => f.ServerRelativeUrl, f => f.Files, f => f.Folders, folder => folder.Files.Include(f => f.ServerRelativeUrl));
             targetFolder.EnsureProperty(f => f.ServerRelativeUrl);
-            targetFolder.Context.ExecuteQueryRetry();

             _progressFolder.RecordType = ProgressRecordType.Processing;
             _progressFolder.StatusDescription = $"{sourceFolder.ServerRelativeUrl} to {targetFolder.ServerRelativeUrl}";
             _progressFolder.PercentComplete = 0;
             WriteProgress(_progressFolder);
-

             _progressFile.RecordType = ProgressRecordType.Processing;
             foreach (File file in sourceFolder.Files)
@@ -195,10 +224,10 @@
         private void UploadFile(File srcFile, Folder targetFolder, string filename = "")
         {
             var binaryStream = srcFile.OpenBinaryStream();
-            ClientContext.ExecuteQueryRetry();
+            _sourceContext.ExecuteQueryRetry();
             if (string.IsNullOrWhiteSpace(filename)) filename = srcFile.Name;
             targetFolder.UploadFile(filename, binaryStream.Value, OverwriteIfAlreadyExists);
-            targetFolder.Context.ExecuteQueryRetry();
+            _targetContext.ExecuteQueryRetry();
         }
     }
 }


Remove unused using

Remove unused using

--- src/Pickles/Pickles.Test/WhenParsingTestResultFiles.cs
+++ src/Pickles/Pickles.Test/WhenParsingTestResultFiles.cs
@@ -1,5 +1,4 @@
 using System;
-using System.IO.Abstractions;
 using System.IO.Abstractions.TestingHelpers;
 using System.Linq;
 using System.Reflection;


add some fun stuff

add some fun stuff

--- CompatBot/Commands/Misc.cs
+++ CompatBot/Commands/Misc.cs
@@ -5,11 +5,13 @@
 using System.Text.RegularExpressions;
 using System.Threading.Tasks;
 using CompatApiClient.Utils;
+using CompatBot.Database;
 using CompatBot.EventHandlers;
 using CompatBot.Utils;
 using DSharpPlus.CommandsNext;
 using DSharpPlus.CommandsNext.Attributes;
 using DSharpPlus.Entities;
+using Microsoft.EntityFrameworkCore;

 namespace CompatBot.Commands
 {
@@ -217,6 +219,43 @@
                 await ctx.RespondAsync(result).ConfigureAwait(false);
         }

+        [Command("random"), Aliases("rng"), Hidden]
+        [Description("Provides random stuff")]
+        public async Task RandomShit(CommandContext ctx, string stuff)
+        {
+            stuff = stuff?.ToLowerInvariant() ?? "";
+            switch (stuff)
+            {
+                    case "game":
+                    case "serial":
+                    case "productcode":
+                    case "product code":
+                    {
+                        using var db = new ThumbnailDb();
+                        var count = await db.Thumbnail.CountAsync().ConfigureAwait(false);
+                        if (count == 0)
+                        {
+                            await ctx.RespondAsync("Sorry, I have no information about a single game yet").ConfigureAwait(false);
+                            return;
+                        }
+
+                        var rng = new Random().Next(count);
+                        var productCode = await db.Thumbnail.Skip(rng).Take(1).FirstOrDefaultAsync().ConfigureAwait(false);
+                        if (productCode == null)
+                        {
+                            await ctx.RespondAsync("Sorry, there's something with my brains today. Try again or something").ConfigureAwait(false);
+                            return;
+                        }
+
+                        await ProductCodeLookup.LookupAndPostProductCodeEmbedAsync(ctx.Client, ctx.Message, new List<string> {productCode.ProductCode}).ConfigureAwait(false);
+                        break;
+                    }
+                    default:
+                        await Roll(ctx, comment: stuff).ConfigureAwait(false);
+                        break;
+            }
+        }
+
         [Command("8ball"), Cooldown(20, 60, CooldownBucketType.Channel)]
         [Description("Provides a ~~random~~ objectively best answer to your question")]
         public async Task EightBall(CommandContext ctx, [RemainingText, Description("A yes/no question")] string question)


even more answers

even more answers

--- CompatBot/Commands/Misc.cs
+++ CompatBot/Commands/Misc.cs
@@ -21,7 +21,7 @@
         private static readonly List<string> EightBallAnswers = new List<string>
         {
             // 16
-            "Ya fo sho", "Fo shizzle mah nizzle", "Yuuuup", "Da", "Affirmative",
+            "Ya fo sho", "Fo shizzle mah nizzle", "Yuuuup", "Da", "Affirmative", // 5
             "Sure", "Yeah, why not", "Most likely", "Sim", "Oui",
             "Heck yeah!", "Roger that", "Aye!", "Yes without a doubt m8!", "<:cell_ok_hand:324618647857397760>",
             "Don't be an idiot. YES.",
@@ -33,32 +33,35 @@
             "Bloody hell, answering that ain't so easy", "I'm pretty sure that's illegal!", "What do *you* think?", "Only on Wednesdays", "Look in the mirror, you know the answer already",

             // 11
-            "Nah mate", "Nope", "Njet", "Of course not", "Seriously no", // 5
+            "Nah mate", "Nope", "Njet", "Of course not", "Seriously no",
             "Noooooooooo", "Most likely not", "Não", "Non", "Hell no",
             "Absolutely not",
         };

         private static readonly List<string> RateAnswers = new List<string>
         {
-            // 30
+            // 40
             "Not so bad", "I likesss!", "Pretty good", "Guchi gud", "Amazing!",
             "Glorious!", "Very good", "Excellent...", "Magnificent", "Rate bot says he likes, so you like too",
             "If you reorganize the words it says \"pretty cool\"", "I approve", "<:morgana_sparkle:315899996274688001>　やるじゃねーか！", "Not half bad 👍", "Belissimo!",
             "Cool. Cool cool cool", "I am in awe", "Incredible!", "Radiates gloriousness", "Like a breath of fresh air",
             "Sunshine for my digital soul 🌞", "Fantastic like petrichor 🌦", "Joyous like a rainbow 🌈", "Unbelievably good", "Can't recommend enough",
             "Not perfect, but ok", "So good!", "A lucky find!", "💯 approved", "I don't see any downsides",
-
-            // 15
+            "Here's my seal of approval 💮", "As good as it gets", "A benchmark to persue", "Should make you warm and fuzzy inside", "Fabulous",
+            "Cool like a cup of good wine 🍷", "Magical ✨", "Wondrous like a unicorn 🦄", "Soothing sight for these tired eyes", "Lovely",
+
+            // 20
             "Ask MsLow", "Could be worse", "I need more time to think about it", "It's ok, nothing and no one is perfect", "🆗",
             "You already know, my boi", "Unexpected like a bouquet of sunflowers 🌻", "Hard to measure precisely...", "Requires more data to analyze", "Passable",
             "Quite unique 🤔", "Less like an orange, and more like an apple", "I don't know, man...", "It is so tiring to grade everything...", "...",
-
-            // 21
+            "Bland like porridge", "🤔", "Ok-ish?", "Not _bad_, but also not _good_", "Why would you want to _rate_ this?",
+
+            // 25
             "Bad", "Very bad", "Pretty bad", "Horrible", "Ugly",
             "Disgusting", "Literally the worst", "Not interesting", "Simply ugh", "I don't like it! You shouldn't either!",
             "Just like you, 💩", "Not approved", "Big Mistake", "The opposite of good", "Could be better",
             "🤮", "😐",  "So-so", "Not worth it", "Mediocre at best",
-            "Useless",
+            "Useless", "I think you misspelled `poop` there", "Nothing special", "😔", "Real shame",
         };

         private static readonly HashSet<string> Me = new HashSet<string>(StringComparer.InvariantCultureIgnoreCase)


idk why linux is failing

idk why linux is failing

--- CompatBot/Commands/Sudo.cs
+++ CompatBot/Commands/Sudo.cs
@@ -146,10 +146,12 @@

             await using var log = File.Open(logPath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
             await using var result = Config.MemoryStreamManager.GetStream();
-            await using var gzip = new GZipStream(result, CompressionMode.Compress, CompressionLevel.Default);
-            await log.CopyToAsync(gzip, Config.Cts.Token).ConfigureAwait(false);
-            await gzip.FlushAsync().ConfigureAwait(false);
-            gzip.Close();
+            await using (var gzip = new GZipStream(result, CompressionMode.Compress, CompressionLevel.Default))
+            {
+                await log.CopyToAsync(gzip, Config.Cts.Token).ConfigureAwait(false);
+                await gzip.FlushAsync(Config.Cts.Token).ConfigureAwait(false);
+                gzip.Close();
+            }
             if (result.Length <= ctx.GetAttachmentSizeLimit())
             {
                 result.Seek(0, SeekOrigin.Begin);
@@ -161,7 +163,7 @@
         catch (Exception e)
         {
             Config.Log.Warn(e, "Failed to upload current log");
-            await ctx.ReactWithAsync(Config.Reactions.Failure, "Failed to send the log", true).ConfigureAwait(false);
+            await ctx.ReactWithAsync(Config.Reactions.Failure, $"Failed to send the log\n{e}", true).ConfigureAwait(false);
         }
     }


Добавил явное задание спецификации "file://" при получении относительных путей

--- src/ScriptEngine.HostedScript/Library/Zip/ZipWriter.cs
+++ src/ScriptEngine.HostedScript/Library/Zip/ZipWriter.cs
@@ -119,17 +119,17 @@

         private string GetPathForParentFolder(string dirpath)
         {
-            DebugEcho(String.Format("GetPathForParentFolder dirpath is {0}.", dirpath));
+            DebugEcho(String.Format("GetPathForParentFolder dirpath is {0}", dirpath));
             var pathForParentFolder = "";
             if (Path.IsPathRooted(dirpath))
             {
                 DebugEcho("GetPathForParentFolder: is rooted");

                 var currDir = System.IO.Directory.GetCurrentDirectory();
-                DebugEcho(String.Format("GetPathForParentFolder currDir is {0}.", currDir));
+                DebugEcho(String.Format("GetPathForParentFolder currDir is {0}", currDir));

                 var path = GetRelativePath(dirpath, currDir);
-                DebugEcho(String.Format("GetPathForParentFolder GetRelativePath is {0}.", path));
+                DebugEcho(String.Format("GetPathForParentFolder GetRelativePath is {0}", path));
                 if (IsNotRelativePath(dirpath, path))
                 {
                     DebugEcho("GetPathForParentFolder IsNotRelativePath is true");
@@ -147,7 +147,7 @@
                 pathForParentFolder = System.IO.Path.Combine(dirpath, "..");
             }

-            DebugEcho(String.Format("GetPathForParentFolder pathForParentFolder is {0}.", pathForParentFolder));
+            DebugEcho(String.Format("GetPathForParentFolder pathForParentFolder is {0}", pathForParentFolder));
             return pathForParentFolder;
         }

@@ -265,11 +265,11 @@
             Uri pathUri = null;
             try
             {
-                pathUri = new Uri(filespec);
+                pathUri = new Uri("file://" + filespec);
             }
             catch (System.UriFormatException)
             {
-                DebugEcho(String.Format("GetRelativePath catch is {0}.", filespec));
+                DebugEcho(String.Format("GetRelativePath catch is {0}", filespec));
                 return filespec;
             }

@@ -278,15 +278,28 @@
             {
                 folder += Path.DirectorySeparatorChar;
             }
-            Uri folderUri = new Uri(folder);
+            Uri folderUri = new Uri("file://" + folder);
             var res = Uri.UnescapeDataString(folderUri.MakeRelativeUri(pathUri).ToString().Replace('/', Path.DirectorySeparatorChar));
-            DebugEcho(String.Format("GetRelativePath res is {0}.", res));
+            DebugEcho(String.Format("GetRelativePath res is {0}", res));
+
+            var removestr = "file:\\\\";
+            if (res.StartsWith(removestr))
+            {
+                DebugEcho(String.Format("GetRelativePath res without {1} is {0}", res, removestr));
+                res = res.Substring(removestr.Length);
+            }
+            removestr = "file://";
+            if (res.StartsWith(removestr))
+            {
+                DebugEcho(String.Format("GetRelativePath res without {1} is {0}", res, removestr));
+                res = res.Substring(removestr.Length);
+            }
             return res;
         }

         private void DebugEcho(string str)
         {
-            Console.WriteLine(String.Format("DEBUG ZIP: {0}.", str));
+            Console.WriteLine(String.Format("DEBUG ZIP: {0}", str));
         }

         private static bool GetRecursiveFlag(SelfAwareEnumValue<ZIPSubDirProcessingModeEnum> recurseSubdirectories)


Add option to set own computation function in test

--- osu.Game.Tests/Beatmaps/TestSceneBeatmapDifficultyCache.cs
+++ osu.Game.Tests/Beatmaps/TestSceneBeatmapDifficultyCache.cs
@@ -57,6 +57,12 @@
         public void TestStarDifficultyChangesOnModSettings()
         {
             OsuModDoubleTime dt = null;
+
+            AddStep("set computation function", () => difficultyCache.ComputeDifficulty = lookup =>
+            {
+                var modRateAdjust = (ModRateAdjust)lookup.OrderedMods.SingleOrDefault(mod => mod is ModRateAdjust);
+                return new StarDifficulty(BASE_STARS + modRateAdjust?.SpeedChange.Value ?? 0, 0);
+            });

             AddStep("change selected mod to DT", () => SelectedMods.Value = new[] { dt = new OsuModDoubleTime { SpeedChange = { Value = 1.5 } } });
             AddUntilStep($"star difficulty -> {BASE_STARS + 1.5}", () => starDifficultyBindable.Value?.Stars == BASE_STARS + 1.5);
@@ -133,13 +139,11 @@

         private class TestBeatmapDifficultyCache : BeatmapDifficultyCache
         {
+            public Func<DifficultyCacheLookup, StarDifficulty> ComputeDifficulty { get; set; }
+
             protected override Task<StarDifficulty> ComputeValueAsync(DifficultyCacheLookup lookup, CancellationToken token = default)
             {
-                var rateAdjust = lookup.OrderedMods.OfType<ModRateAdjust>().SingleOrDefault();
-                if (rateAdjust != null)
-                    return Task.FromResult(new StarDifficulty(BASE_STARS + rateAdjust.SpeedChange.Value, 0));
-
-                return Task.FromResult(new StarDifficulty(BASE_STARS, 0));
+                return Task.FromResult(ComputeDifficulty?.Invoke(lookup) ?? new StarDifficulty(BASE_STARS, 0));
             }
         }
     }


No privates allowed.

No privates allowed.

--- src/Serilog.Sinks.MongoDB/Sinks/MongoDB/MongoDBSink.cs
+++ src/Serilog.Sinks.MongoDB/Sinks/MongoDB/MongoDBSink.cs
@@ -70,7 +70,7 @@
             _mongoUrl = new MongoUrl(databaseUrl);
         }

-        private MongoCollection<BsonDocument> GetLogCollection()
+        MongoCollection<BsonDocument> GetLogCollection()
         {
             var mongoClient = new MongoClient(_mongoUrl);
             var server = mongoClient.GetServer();


Fix failing test

Fix failing test

--- osu.Game.Tests/Visual/Online/TestSceneCommentsContainer.cs
+++ osu.Game.Tests/Visual/Online/TestSceneCommentsContainer.cs
@@ -68,7 +68,7 @@
         public void TestMultipleLoads()
         {
             var comments = exampleComments;
-            int topLevelCommentCount = exampleComments.Comments.Count(comment => comment.IsTopLevel);
+            int topLevelCommentCount = exampleComments.Comments.Count;

             AddStep("hide container", () => commentsContainer.Hide());
             setUpCommentsResponse(comments);


Fix potential of toggle between load and LoadComplete

--- osu.Game/Graphics/Containers/OsuFocusedOverlayContainer.cs
+++ osu.Game/Graphics/Containers/OsuFocusedOverlayContainer.cs
@@ -42,6 +42,12 @@
         [BackgroundDependencyLoader(true)]
         private void load(AudioManager audio)
         {
+            samplePopIn = audio.Samples.Get(@"UI/overlay-pop-in");
+            samplePopOut = audio.Samples.Get(@"UI/overlay-pop-out");
+        }
+
+        protected override void LoadComplete()
+        {
             OverlayActivationMode.ValueChanged += mode =>
             {
                 if (mode.NewValue == OverlayActivation.Disabled)
@@ -51,8 +57,7 @@
             if (game != null)
                 OverlayActivationMode.BindTo(game.OverlayActivationMode);

-            samplePopIn = audio.Samples.Get(@"UI/overlay-pop-in");
-            samplePopOut = audio.Samples.Get(@"UI/overlay-pop-out");
+            base.LoadComplete();
         }

         /// <summary>


Add back support for closing focused overlays using back key

--- osu.Game/Graphics/Containers/OsuFocusedOverlayContainer.cs
+++ osu.Game/Graphics/Containers/OsuFocusedOverlayContainer.cs
@@ -8,12 +8,14 @@
 using osu.Framework.Input;
 using OpenTK;
 using osu.Framework.Configuration;
+using osu.Framework.Input.Bindings;
 using osu.Game.Audio;
+using osu.Game.Input.Bindings;
 using osu.Game.Overlays;

 namespace osu.Game.Graphics.Containers
 {
-    public class OsuFocusedOverlayContainer : FocusedOverlayContainer, IPreviewTrackOwner
+    public class OsuFocusedOverlayContainer : FocusedOverlayContainer, IPreviewTrackOwner, IKeyBindingHandler<GlobalAction>
     {
         private SampleChannel samplePopIn;
         private SampleChannel samplePopOut;
@@ -65,6 +67,19 @@
             return base.OnClick(state);
         }

+        public bool OnPressed(GlobalAction action)
+        {
+            if (action == GlobalAction.Back)
+            {
+                State = Visibility.Hidden;
+                return true;
+            }
+
+            return false;
+        }
+
+        public bool OnReleased(GlobalAction action) => false;
+
         private void onStateChanged(Visibility visibility)
         {
             switch (visibility)


Remove remaining `Room!=null` checks in `TestMultiplayerClient` where possible

--- osu.Game/Tests/Visual/Multiplayer/TestMultiplayerClient.cs
+++ osu.Game/Tests/Visual/Multiplayer/TestMultiplayerClient.cs
@@ -87,8 +87,6 @@
             switch (Room?.MatchState)
             {
                 case TeamVersusRoomState teamVersus:
-                    Debug.Assert(Room != null);
-
                     // simulate the server's automatic assignment of users to teams on join.
                     // the "best" team is the one with the least users on it.
                     int bestTeam = teamVersus.Teams
@@ -103,6 +101,7 @@
         public void RemoveUser(APIUser user)
         {
             Debug.Assert(Room != null);
+
             ((IMultiplayerClient)this).UserLeft(new MultiplayerRoomUser(user.Id));

             Schedule(() =>
@@ -114,25 +113,23 @@

         public void ChangeRoomState(MultiplayerRoomState newState)
         {
-            Debug.Assert(Room != null);
             ((IMultiplayerClient)this).RoomStateChanged(newState);
         }

         public void ChangeUserState(int userId, MultiplayerUserState newState)
         {
-            Debug.Assert(Room != null);
-
             ((IMultiplayerClient)this).UserStateChanged(userId, newState);
             updateRoomStateIfRequired();
         }

         private void updateRoomStateIfRequired()
         {
-            Debug.Assert(Room != null);
             Debug.Assert(APIRoom != null);

             Schedule(() =>
             {
+                Debug.Assert(Room != null);
+
                 switch (Room.State)
                 {
                     case MultiplayerRoomState.Open:
@@ -179,8 +176,6 @@

         public void ChangeUserBeatmapAvailability(int userId, BeatmapAvailability newBeatmapAvailability)
         {
-            Debug.Assert(Room != null);
-
             ((IMultiplayerClient)this).UserBeatmapAvailabilityChanged(userId, newBeatmapAvailability);
         }

@@ -290,7 +285,6 @@

         public void ChangeUserMods(int userId, IEnumerable<APIMod> newMods)
         {
-            Debug.Assert(Room != null);
             ((IMultiplayerClient)this).UserModsChanged(userId, newMods.ToList());
         }

@@ -338,7 +332,6 @@

         public override Task AbortGameplay()
         {
-            Debug.Assert(Room != null);
             Debug.Assert(LocalUser != null);

             ChangeUserState(LocalUser.UserID, MultiplayerUserState.Idle);


enhance password reset flow.

enhance password reset flow.

--- Signum.Engine.Extensions/Authorization/ResetPasswordRequestLogic.cs
+++ Signum.Engine.Extensions/Authorization/ResetPasswordRequestLogic.cs
@@ -77,9 +77,17 @@
                         if (error != null)
                             throw new ApplicationException(error);

+                        if (user.State == UserState.Disabled)
+                        {
+                            user.Execute(UserOperation.Enable);
+                        }
+
                         user.PasswordHash = Security.EncodePassword(password);
+                        user.LoginFailedCounter = 0;
                         using (AuthLogic.Disable())
+                        {
                             user.Execute(UserOperation.Save);
+                        }
                     }
                 }.Register();
         }
@@ -135,6 +143,7 @@

         public static ResetPasswordRequestEntity ResetPasswordRequest(UserEntity user)
         {
+            using (OperationLogic.AllowSave<UserEntity>())
             using (AuthLogic.Disable())
             {
                 //Remove old previous requests
@@ -144,7 +153,7 @@
                     .Set(e => e.Used, e => true)
                     .Execute();

-                return new ResetPasswordRequestEntity()
+                return new ResetPasswordRequestEntity
                 {
                     Code = MyRandom.Current.NextString(32),
                     User = user,


MetadataAdapters: Fixed the import adapter to use the parent acronym when using source prefix to name child devices.

--- Source/Libraries/Adapters/MetadataAdapters/MetadataImportAdapter.cs
+++ Source/Libraries/Adapters/MetadataAdapters/MetadataImportAdapter.cs
@@ -480,7 +480,7 @@
                         initSyncProgress(metadata.Tables.Cast<DataTable>().Sum(dataTable => (long)dataTable.Rows.Count) + 3);

                         // Prefix all children devices with the name of the parent since the same device names could appear in different connections (helps keep device names unique)
-                        string sourcePrefix = UseSourcePrefixNames ? Name + "!" : "";
+                        string sourcePrefix = UseSourcePrefixNames ? ParentDeviceAcronym + "!" : "";
                         Dictionary<string, int> deviceIDs = new Dictionary<string, int>(StringComparer.OrdinalIgnoreCase);
                         string deviceAcronym, signalTypeAcronym;
                         int deviceID;


Minor changes.

Minor changes.

--- Source/Main/NProxy.Core/Internal/Descriptors/ProxyDescriptorBase.cs
+++ Source/Main/NProxy.Core/Internal/Descriptors/ProxyDescriptorBase.cs
@@ -173,11 +173,11 @@
             if (descriptorVisitor == null)
                 throw new ArgumentNullException("descriptorVisitor");

+            // Visit parent type constructors.
+            descriptorVisitor.VisitConstructors(_parentType);
+
             // Visit additional interface types.
             descriptorVisitor.VisitInterfaces(_additionalInterfaceTypes);
-
-            // Visit parent type constructors.
-            descriptorVisitor.VisitConstructors(_parentType);
         }

         /// <inheritdoc/>


fixed some variable naming issues in tests

--- Maestro.Tests/Conventions/conventional_registration.cs
+++ Maestro.Tests/Conventions/conventional_registration.cs
@@ -13,49 +13,55 @@
 		public void should_use_provided_registrator()
 		{
 			var types = new[] { typeof(object) };
-			var registrator = new Convention();
+			var convention = new Convention();
 			var container = new Container();

-			container.Configure(x => x.Scan.Types(types).Using(registrator));
+			container.Configure(x => x.Scan.Types(types).Using(convention));

-			registrator.ProcessedTypes.Should().BeEquivalentTo(types);
+			convention.ProcessedTypes.Should().BeEquivalentTo(types);
 		}

 		[Fact]
 		public void should_filter_types_using_provided_lambda()
 		{
-			var registrator = new Convention();
+			var convention = new Convention();
 			var container = new Container();

-			container.Configure(x => x.Scan.Types(new[] { typeof(object), typeof(int) }).Where(t => t.IsClass).Using(registrator));
+			container.Configure(x => x.Scan
+			                          .Types(new[] {typeof (object), typeof (int)})
+			                          .Where(t => t.IsClass)
+			                          .Using(convention));

-			registrator.ProcessedTypes.Should().BeEquivalentTo(new[] { typeof(object) });
+			convention.ProcessedTypes.Should().BeEquivalentTo(new[] { typeof(object) });
 		}

 		[Fact]
 		public void should_filter_types_using_provided_filter()
 		{
-			var registrator = new Convention();
+			var convention = new Convention();
 			var container = new Container();

-			container.Configure(x => x.Scan.Types(new[] { typeof(object), typeof(int) }).Matching(new IsClassFilter()).Using(registrator));
+			container.Configure(x => x.Scan
+			                          .Types(new[] {typeof (object), typeof (int)})
+			                          .Matching(new IsClassFilter())
+			                          .Using(convention));

-			registrator.ProcessedTypes.Should().BeEquivalentTo(new[] { typeof(object) });
+			convention.ProcessedTypes.Should().BeEquivalentTo(new[] { typeof(object) });
 		}

 		[Fact]
 		public void type_should_match_all_filters_to_get_processed()
 		{
-			var registrator = new Convention();
+			var convention = new Convention();
 			var container = new Container();

 			container.Configure(x => x.Scan
-				.Types(new[] { typeof(object), typeof(int), typeof(string) })
-				.Where(t => t.IsClass)
-				.Where(t => t.Name.Contains("n"))
-				.Using(registrator));
+			                          .Types(new[] {typeof (object), typeof (int), typeof (string)})
+			                          .Where(t => t.IsClass)
+			                          .Where(t => t.Name.Contains("n"))
+			                          .Using(convention));

-			registrator.ProcessedTypes.Should().BeEquivalentTo(new[] { typeof(string) });
+			convention.ProcessedTypes.Should().BeEquivalentTo(new[] { typeof(string) });
 		}

 		private class Convention : IConvention


Update EffortConnection.cs

Update EffortConnection.cs

--- Main/Source/Effort.Shared/Provider/EffortConnection.cs
+++ Main/Source/Effort.Shared/Provider/EffortConnection.cs
@@ -90,7 +90,8 @@
                 }
             }
         }
-
+
+#if !EFOLD
         public void ClearTables()
         {
             ClearTables(null);
@@ -135,6 +136,7 @@
                 }
             }
         }
+#endif

         /// <summary>
         ///     Gets or sets the string used to open the connection.


Implement loading and saving miner config

--- MultiMiner.Engine/Configuration/EngineConfiguration.cs
+++ MultiMiner.Engine/Configuration/EngineConfiguration.cs
@@ -28,7 +28,6 @@
         {
             return Path.Combine(AppDataPath(), "DeviceConfigurations.xml");
         }
-

         public void SaveDeviceConfigurations()
         {
@@ -55,7 +54,22 @@
             SaveConfiguration(CoinConfigurations, CoinConfigurationsFileName());
         }

-        public static T LoadConfiguration<T>(string fileName)
+        private static string MinerConfigurationFileName()
+        {
+            return Path.Combine(AppDataPath(), "MinerConfiguration.xml");
+        }
+
+        public void LoadMinerConfiguration()
+        {
+            MinerConfiguration = LoadConfiguration<MinerConfiguration>(MinerConfigurationFileName());
+        }
+
+        public void SaveMinerConfiguration()
+        {
+            SaveConfiguration(MinerConfiguration, MinerConfigurationFileName());
+        }
+
+        public static T LoadConfiguration<T>(string fileName) where T: new()
         {
             if (File.Exists(fileName))
             {
@@ -64,7 +78,7 @@
                     return (T)serializer.Deserialize(reader);
             }

-            return default(T);
+            return new T();
         }

         private static void SaveConfiguration(object source, string fileName)