Método asíncrono de verificación

Método asíncrono de verificación

--- CoreComponents/Core/Security/Password/PasswordStorage.cs
+++ CoreComponents/Core/Security/Password/PasswordStorage.cs
@@ -23,9 +23,11 @@
 this program. If not, see <http://www.gnu.org/licenses/>.
 */

+using System.Collections.Generic;
 using System.IO;
 using System.Security;
 using System.Security.Cryptography;
+using System.Threading.Tasks;

 namespace TheXDS.MCART.Security.Password
 {
@@ -49,28 +51,25 @@
         */

         #region Constantes
-        const short SALT_BYTES = 24;
-        const short HASH_BYTES = 18;
-        const int PBKDF2_ITERATIONS = 64000;
+        private const short SaltBytes = 24;
+        private const short HashBytes = 18;
+        private const int Pbkdf2Iterations = 64000;
         #endregion

-        static byte[] PBKDF2(SecureString password, byte[] salt, int iterations, int outputBytes)
+        private static byte[] Pbkdf2(SecureString password, byte[] salt, int iterations, int outputBytes)
         {
             using (password)
             using (var pbkdf2 = new Rfc2898DeriveBytes(password.ReadBytes(), salt, iterations))
-            {
                 return pbkdf2.GetBytes(outputBytes);
-            }
         }
-        static bool CheckEquals(byte[] a, byte[] b)
+        private static bool CheckEquals(IReadOnlyList<byte> a, IReadOnlyList<byte> b)
         {
 #if SaferPasswords
             // Este método realiza una comprobación lenta intencionalmente.
-            uint diff = (uint)a.Length ^ (uint)b.Length;
-            for (int i = 0; i < a.Length && i < b.Length; i++)
-            {
+            var diff = (uint)a.Count ^ (uint)b.Count;
+            for (var i = 0; i < a.Count && i < b.Count; i++)
                 diff |= (uint)(a[i] ^ b[i]);
-            }
+
             return diff == 0;
 #else
             return System.Linq.Enumerable.SequenceEqual(a, b);
@@ -84,17 +83,16 @@
         /// <returns></returns>
         public static byte[] CreateHash(SecureString password)
         {
-            byte[] salt = new byte[SALT_BYTES];
-            using (RNGCryptoServiceProvider csprng = new RNGCryptoServiceProvider())
-            {
+            var salt = new byte[SaltBytes];
+            using (var csprng = new RNGCryptoServiceProvider())
                 csprng.GetBytes(salt);
-            }
-            byte[] hash = PBKDF2(password, salt, PBKDF2_ITERATIONS, HASH_BYTES);
+
+            var hash = Pbkdf2(password, salt, Pbkdf2Iterations, HashBytes);

             using (var ms = new MemoryStream())
             using (var bw = new BinaryWriter(ms))
             {
-                bw.Write(PBKDF2_ITERATIONS);
+                bw.Write(Pbkdf2Iterations);
                 bw.Write((short)salt.Length);
                 bw.Write(salt);
                 bw.Write((short)hash.Length);
@@ -102,26 +100,8 @@
                 return ms.ToArray();
             }
         }
-
-#if PreferExceptions
         /// <summary>
-        /// Verifica la contraseña.
-        /// </summary>
-        /// <param name="password">
-        /// Contraseña a verificar.
-        /// </param>
-        /// <param name="goodHash">
-        /// Hash+Salt contra el cual comparar.
-        /// </param>
-        /// <returns>
-        /// <see langword="true"/> si la contraseña es válida,
-        /// <see langword="false"/> en caso contrario.
-        /// </returns>
-        public static bool? VerifyPassword(SecureString password, byte[] goodHash)
-        {
-#else
-        /// <summary>
-        /// Verifica la contraseña.
+        /// Verifica una contraseña.
         /// </summary>
         /// <param name="password">
         /// Contraseña a verificar.
@@ -139,21 +119,39 @@
         {
             try
             {
-#endif
                 using (var ms = new MemoryStream(goodHash))
                 using (var br = new BinaryReader(ms))
                 {
-                    int iterations = br.ReadInt32();
-                    byte[] salt = br.ReadBytes(br.ReadInt16());
-                    byte[] hash = br.ReadBytes(br.ReadInt16());
+                    var iterations = br.ReadInt32();
+                    var salt = br.ReadBytes(br.ReadInt16());
+                    var hash = br.ReadBytes(br.ReadInt16());

-                    byte[] testHash = PBKDF2(password, salt, iterations, hash.Length);
+                    var testHash = Pbkdf2(password, salt, iterations, hash.Length);
                     return CheckEquals(hash, testHash);
                 }
 #if !PreferExceptions
             }
             catch { return null; }
+#else
+            }
+            catch { throw; }
 #endif
         }
+        /// <summary>
+        /// Verifica una contraseña de forma asíncrona.
+        /// </summary>
+        /// <param name="password">
+        /// Contraseña a verificar.
+        /// </param>
+        /// <param name="goodHash">
+        /// Hash+Salt contra el cual comparar.
+        /// </param>
+        /// <returns>
+        /// <see langword="true"/> si la contraseña es válida,
+        /// <see langword="false"/> en caso contrario, o
+        /// <see langword="null"/> si hay un problema al verificar la
+        /// contraseña, como ser, debido a tampering.
+        /// </returns>
+        public static async Task<bool?> VerifyPasswordAsync(SecureString password, byte[] goodHash) => await Task.Run(()=>VerifyPassword(password, goodHash));
     }
 }


Don't block when rosparam executable is about to exit.

--- RosParamClient/Program.cs
+++ RosParamClient/Program.cs
@@ -88,7 +88,6 @@
             RemappingHelper.GetRemappings(ref args, out remappings);
             ROS.Init(args, "");
             new Program(args).result();
-            Console.ReadLine();
         }
     }
 }


cleanup

cleanup

--- EFCore/EFCoreSamples/UsingDependencyInjection/Program.cs
+++ EFCore/EFCoreSamples/UsingDependencyInjection/Program.cs
@@ -1,7 +1,6 @@
 using Microsoft.EntityFrameworkCore;
 using Microsoft.Extensions.DependencyInjection;
 using Microsoft.Extensions.Logging;
-using System;
 using System.Threading.Tasks;

 namespace UsingDependencyInjection


Update IgnoreHiddenColumnsDataTable.cs

Update IgnoreHiddenColumnsDataTable.cs

--- Examples/CSharp/Articles/IgnoreHiddenColumnsDataTable.cs
+++ Examples/CSharp/Articles/IgnoreHiddenColumnsDataTable.cs
@@ -8,6 +8,7 @@
     {
         static void Main()
         {
+            //ExStart:1
             string dataDir = Aspose.Cells.Examples.Utils.GetDataDir(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
             string inputPath = dataDir + "Sample.xlsx";

@@ -22,6 +23,7 @@
             int totalColumns = worksheet.Cells.MaxColumn + 1;

             DataTable dt = worksheet.Cells.ExportDataTable(0, 0, totalRows, totalColumns, opts);
+            //ExEnd:1
         }
     }
 }


resources update

resources update

--- TCC.Core/R.cs
+++ TCC.Core/R.cs
@@ -434,29 +434,6 @@
 		public static Double MapHeight => ((Double)App.Current.FindResource("MapHeight"));
 	}

-	// ResourceDictionaries/Styles.xaml
-	public static class Styles
-	{
-		public static Style NotificationTitle => ((Style)App.Current.FindResource("NotificationTitle"));
-		public static Style NotificationBody => ((Style)App.Current.FindResource("NotificationBody"));
-		public static Style NotificationVersion => ((Style)App.Current.FindResource("NotificationVersion"));
-		public static Style NotificationTimestamp => ((Style)App.Current.FindResource("NotificationTimestamp"));
-		public static Style NotificationRectangle => ((Style)App.Current.FindResource("NotificationRectangle"));
-		public static Style BaseWindowStyle => ((Style)App.Current.FindResource("BaseWindowStyle"));
-		public static Style DefaultBorderStyle => ((Style)App.Current.FindResource("DefaultBorderStyle"));
-		public static Style RevampBorderStyle => ((Style)App.Current.FindResource("RevampBorderStyle"));
-		public static Style BoundaryBorderStyle => ((Style)App.Current.FindResource("BoundaryBorderStyle"));
-		public static Style DefaultTextStyle => ((Style)App.Current.FindResource("DefaultTextStyle"));
-		public static Style SettingsButton => ((Style)App.Current.FindResource("SettingsButton"));
-		public static Style ScrollThumbs => ((Style)App.Current.FindResource("ScrollThumbs"));
-		public static Style ReversedScrollBar => ((Style)App.Current.FindResource("ReversedScrollBar"));
-		public static Style ScrollViewerWithReversedVerticalScrollBar => ((Style)App.Current.FindResource("ScrollViewerWithReversedVerticalScrollBar"));
-		public static Style ChatTabControlStyle => ((Style)App.Current.FindResource("ChatTabControlStyle"));
-		public static Style GlowHoverGrid => ((Style)App.Current.FindResource("GlowHoverGrid"));
-		public static Style GlowHoverGridLeft => ((Style)App.Current.FindResource("GlowHoverGridLeft"));
-		public static Style ClassWindowSkillBorder => ((Style)App.Current.FindResource("ClassWindowSkillBorder"));
-	}
-
 	// ResourceDictionaries/SVG.xaml
 	public static class SVG
 	{
@@ -490,6 +467,29 @@
 		public static Geometry SvgBuffIcon => ((Geometry)App.Current.FindResource("SvgBuffIcon"));
 	}

+	// ResourceDictionaries/Styles.xaml
+	public static class Styles
+	{
+		public static Style NotificationTitle => ((Style)App.Current.FindResource("NotificationTitle"));
+		public static Style NotificationBody => ((Style)App.Current.FindResource("NotificationBody"));
+		public static Style NotificationVersion => ((Style)App.Current.FindResource("NotificationVersion"));
+		public static Style NotificationTimestamp => ((Style)App.Current.FindResource("NotificationTimestamp"));
+		public static Style NotificationRectangle => ((Style)App.Current.FindResource("NotificationRectangle"));
+		public static Style BaseWindowStyle => ((Style)App.Current.FindResource("BaseWindowStyle"));
+		public static Style DefaultBorderStyle => ((Style)App.Current.FindResource("DefaultBorderStyle"));
+		public static Style RevampBorderStyle => ((Style)App.Current.FindResource("RevampBorderStyle"));
+		public static Style BoundaryBorderStyle => ((Style)App.Current.FindResource("BoundaryBorderStyle"));
+		public static Style DefaultTextStyle => ((Style)App.Current.FindResource("DefaultTextStyle"));
+		public static Style SettingsButton => ((Style)App.Current.FindResource("SettingsButton"));
+		public static Style ScrollThumbs => ((Style)App.Current.FindResource("ScrollThumbs"));
+		public static Style ReversedScrollBar => ((Style)App.Current.FindResource("ReversedScrollBar"));
+		public static Style ScrollViewerWithReversedVerticalScrollBar => ((Style)App.Current.FindResource("ScrollViewerWithReversedVerticalScrollBar"));
+		public static Style ChatTabControlStyle => ((Style)App.Current.FindResource("ChatTabControlStyle"));
+		public static Style GlowHoverGrid => ((Style)App.Current.FindResource("GlowHoverGrid"));
+		public static Style GlowHoverGridLeft => ((Style)App.Current.FindResource("GlowHoverGridLeft"));
+		public static Style ClassWindowSkillBorder => ((Style)App.Current.FindResource("ClassWindowSkillBorder"));
+	}
+
 	// ResourceDictionaries/TemplateSelectors.xaml
 	public static class TemplateSelectors
 	{
@@ -512,123 +512,123 @@
 	// pack://application:,,,/Nostrum;component/Resources/Converters.xaml
 	public static class Nostrum_Converters
 	{
+		public static EpochConverter EpochConverter => ((EpochConverter)App.Current.FindResource("EpochConverter"));
+		public static MillisecondsToStringConverter MillisecondsToString => ((MillisecondsToStringConverter)App.Current.FindResource("MillisecondsToString"));
+		public static RoundedClipConverter RoundedClipConverter => ((RoundedClipConverter)App.Current.FindResource("RoundedClipConverter"));
+		public static BooleanInverter BoolInverter => ((BooleanInverter)App.Current.FindResource("BoolInverter"));
+		public static DurationLabelConverter DurationToTimeFormat => ((DurationLabelConverter)App.Current.FindResource("DurationToTimeFormat"));
+		public static ListBoxItemIndexConverter ListBoxItemIndex => ((ListBoxItemIndexConverter)App.Current.FindResource("ListBoxItemIndex"));
+		public static EnumDescriptionConverter EnumDescriptionConverter => ((EnumDescriptionConverter)App.Current.FindResource("EnumDescriptionConverter"));
 		public static BoolToVisibility BoolToVisibility => ((BoolToVisibility)App.Current.FindResource("BoolToVisibility"));
+		public static MathMultiplicationConverter MathMultiplication => ((MathMultiplicationConverter)App.Current.FindResource("MathMultiplication"));
+		public static ValueToFactorConverter ValueToFactor => ((ValueToFactorConverter)App.Current.FindResource("ValueToFactor"));
 		public static NullToVisibleCollapsedConverter NullToVisibleCollapsed => ((NullToVisibleCollapsedConverter)App.Current.FindResource("NullToVisibleCollapsed"));
 		public static ColorToTransparent ColorToTransparent => ((ColorToTransparent)App.Current.FindResource("ColorToTransparent"));
-		public static EnumDescriptionConverter EnumDescriptionConverter => ((EnumDescriptionConverter)App.Current.FindResource("EnumDescriptionConverter"));
-		public static MathMultiplicationConverter MathMultiplication => ((MathMultiplicationConverter)App.Current.FindResource("MathMultiplication"));
-		public static RoundedClipConverter RoundedClipConverter => ((RoundedClipConverter)App.Current.FindResource("RoundedClipConverter"));
-		public static DurationLabelConverter DurationToTimeFormat => ((DurationLabelConverter)App.Current.FindResource("DurationToTimeFormat"));
 		public static FactorToAngleConverter FactorToAngle => ((FactorToAngleConverter)App.Current.FindResource("FactorToAngle"));
-		public static ListBoxItemIndexConverter ListBoxItemIndex => ((ListBoxItemIndexConverter)App.Current.FindResource("ListBoxItemIndex"));
-		public static BooleanInverter BoolInverter => ((BooleanInverter)App.Current.FindResource("BoolInverter"));
-		public static MillisecondsToStringConverter MillisecondsToString => ((MillisecondsToStringConverter)App.Current.FindResource("MillisecondsToString"));
-		public static EpochConverter EpochConverter => ((EpochConverter)App.Current.FindResource("EpochConverter"));
-		public static ValueToFactorConverter ValueToFactor => ((ValueToFactorConverter)App.Current.FindResource("ValueToFactor"));
 	}

 	// pack://application:,,,/Nostrum;component/Resources/MiscResources.xaml
 	public static class Nostrum_MiscResources
 	{
+		public static RotateTransform Rotate45 => ((RotateTransform)App.Current.FindResource("Rotate45"));
 		public static ScaleTransform DefaultScaleTransform => ((ScaleTransform)App.Current.FindResource("DefaultScaleTransform"));
 		public static SkewTransform Skew45 => ((SkewTransform)App.Current.FindResource("Skew45"));
+		public static RotateTransform Rotate45Inv => ((RotateTransform)App.Current.FindResource("Rotate45Inv"));
 		public static SkewTransform Skew45Inv => ((SkewTransform)App.Current.FindResource("Skew45Inv"));
+		public static QuadraticEase QuadraticEase => ((QuadraticEase)App.Current.FindResource("QuadraticEase"));
 		public static TranslateTransform DefaultTranslateTransform => ((TranslateTransform)App.Current.FindResource("DefaultTranslateTransform"));
-		public static RotateTransform Rotate45Inv => ((RotateTransform)App.Current.FindResource("Rotate45Inv"));
-		public static RotateTransform Rotate45 => ((RotateTransform)App.Current.FindResource("Rotate45"));
-		public static QuadraticEase QuadraticEase => ((QuadraticEase)App.Current.FindResource("QuadraticEase"));
 		public static RotateTransform DefaultRotateTransform => ((RotateTransform)App.Current.FindResource("DefaultRotateTransform"));
+	}
+
+	// pack://application:,,,/Nostrum;component/Resources/SVG.xaml
+	public static class Nostrum_SVG
+	{
+		public static StreamGeometry SvgAuto => ((StreamGeometry)App.Current.FindResource("SvgAuto"));
+		public static StreamGeometry SvgDiscord => ((StreamGeometry)App.Current.FindResource("SvgDiscord"));
+		public static StreamGeometry SvgShop => ((StreamGeometry)App.Current.FindResource("SvgShop"));
+		public static StreamGeometry SvgTwitch => ((StreamGeometry)App.Current.FindResource("SvgTwitch"));
+		public static StreamGeometry SvgConfirm => ((StreamGeometry)App.Current.FindResource("SvgConfirm"));
+		public static StreamGeometry SvgSearch => ((StreamGeometry)App.Current.FindResource("SvgSearch"));
+		public static StreamGeometry SvgCheckAll => ((StreamGeometry)App.Current.FindResource("SvgCheckAll"));
+		public static StreamGeometry SvgGitHub => ((StreamGeometry)App.Current.FindResource("SvgGitHub"));
+		public static StreamGeometry SvgMail => ((StreamGeometry)App.Current.FindResource("SvgMail"));
+		public static StreamGeometry SvgChatMessage => ((StreamGeometry)App.Current.FindResource("SvgChatMessage"));
+		public static StreamGeometry SvgEye => ((StreamGeometry)App.Current.FindResource("SvgEye"));
+		public static StreamGeometry SvgBlock => ((StreamGeometry)App.Current.FindResource("SvgBlock"));
+		public static StreamGeometry SvgGift => ((StreamGeometry)App.Current.FindResource("SvgGift"));
+		public static StreamGeometry SvgCollapseAll => ((StreamGeometry)App.Current.FindResource("SvgCollapseAll"));
+		public static StreamGeometry SvgMatching => ((StreamGeometry)App.Current.FindResource("SvgMatching"));
+		public static StreamGeometry SvgWarning => ((StreamGeometry)App.Current.FindResource("SvgWarning"));
+		public static StreamGeometry SvgFolder => ((StreamGeometry)App.Current.FindResource("SvgFolder"));
+		public static StreamGeometry SvgAdd => ((StreamGeometry)App.Current.FindResource("SvgAdd"));
+		public static StreamGeometry SvgDelegateLeader => ((StreamGeometry)App.Current.FindResource("SvgDelegateLeader"));
+		public static StreamGeometry SvgUnpin => ((StreamGeometry)App.Current.FindResource("SvgUnpin"));
+		public static StreamGeometry SvgAddUser => ((StreamGeometry)App.Current.FindResource("SvgAddUser"));
+		public static StreamGeometry SvgCrossedSwords => ((StreamGeometry)App.Current.FindResource("SvgCrossedSwords"));
+		public static StreamGeometry SvgRemoveCircle => ((StreamGeometry)App.Current.FindResource("SvgRemoveCircle"));
+		public static StreamGeometry SvgAddCircle => ((StreamGeometry)App.Current.FindResource("SvgAddCircle"));
+		public static StreamGeometry SvgStar => ((StreamGeometry)App.Current.FindResource("SvgStar"));
+		public static StreamGeometry SvgDrag => ((StreamGeometry)App.Current.FindResource("SvgDrag"));
+		public static StreamGeometry SvgPaypal => ((StreamGeometry)App.Current.FindResource("SvgPaypal"));
+		public static StreamGeometry SvgBasket => ((StreamGeometry)App.Current.FindResource("SvgBasket"));
+		public static StreamGeometry SvgCheckCircle => ((StreamGeometry)App.Current.FindResource("SvgCheckCircle"));
+		public static StreamGeometry SvgHide => ((StreamGeometry)App.Current.FindResource("SvgHide"));
+		public static StreamGeometry SvgShirt => ((StreamGeometry)App.Current.FindResource("SvgShirt"));
+		public static StreamGeometry SvgUser => ((StreamGeometry)App.Current.FindResource("SvgUser"));
+		public static StreamGeometry SvgSocial => ((StreamGeometry)App.Current.FindResource("SvgSocial"));
+		public static StreamGeometry SvgSettings => ((StreamGeometry)App.Current.FindResource("SvgSettings"));
+		public static StreamGeometry SvgReload => ((StreamGeometry)App.Current.FindResource("SvgReload"));
+		public static StreamGeometry SvgCopy => ((StreamGeometry)App.Current.FindResource("SvgCopy"));
+		public static StreamGeometry SvgBlurOn => ((StreamGeometry)App.Current.FindResource("SvgBlurOn"));
+		public static StreamGeometry SvgMoney => ((StreamGeometry)App.Current.FindResource("SvgMoney"));
+		public static StreamGeometry SvgInfo => ((StreamGeometry)App.Current.FindResource("SvgInfo"));
+		public static StreamGeometry SvgDisband => ((StreamGeometry)App.Current.FindResource("SvgDisband"));
+		public static StreamGeometry SvgUserAdd => ((StreamGeometry)App.Current.FindResource("SvgUserAdd"));
+		public static StreamGeometry SvgQuestLog => ((StreamGeometry)App.Current.FindResource("SvgQuestLog"));
+		public static StreamGeometry SvgAchievements => ((StreamGeometry)App.Current.FindResource("SvgAchievements"));
+		public static StreamGeometry SvgClose => ((StreamGeometry)App.Current.FindResource("SvgClose"));
+		public static StreamGeometry SvgTrophy => ((StreamGeometry)App.Current.FindResource("SvgTrophy"));
+		public static StreamGeometry SvgBlurOff => ((StreamGeometry)App.Current.FindResource("SvgBlurOff"));
+		public static StreamGeometry SvgAddUsers => ((StreamGeometry)App.Current.FindResource("SvgAddUsers"));
+		public static StreamGeometry SvgUpArrow => ((StreamGeometry)App.Current.FindResource("SvgUpArrow"));
+		public static StreamGeometry SvgAwaken => ((StreamGeometry)App.Current.FindResource("SvgAwaken"));
+		public static StreamGeometry SvgDotsVertical => ((StreamGeometry)App.Current.FindResource("SvgDotsVertical"));
+		public static StreamGeometry SvgPen => ((StreamGeometry)App.Current.FindResource("SvgPen"));
+		public static StreamGeometry SvgRemoveUser => ((StreamGeometry)App.Current.FindResource("SvgRemoveUser"));
+		public static StreamGeometry SvgMapMarker => ((StreamGeometry)App.Current.FindResource("SvgMapMarker"));
+		public static StreamGeometry SvgUsers => ((StreamGeometry)App.Current.FindResource("SvgUsers"));
+		public static StreamGeometry SvgHeart => ((StreamGeometry)App.Current.FindResource("SvgHeart"));
+		public static StreamGeometry SvgGuild => ((StreamGeometry)App.Current.FindResource("SvgGuild"));
+		public static StreamGeometry SvgMove => ((StreamGeometry)App.Current.FindResource("SvgMove"));
+		public static StreamGeometry SvgShare => ((StreamGeometry)App.Current.FindResource("SvgShare"));
+		public static StreamGeometry SvgPin => ((StreamGeometry)App.Current.FindResource("SvgPin"));
+		public static StreamGeometry SvgMenuRight => ((StreamGeometry)App.Current.FindResource("SvgMenuRight"));
+		public static StreamGeometry SvgExpandAll => ((StreamGeometry)App.Current.FindResource("SvgExpandAll"));
+		public static StreamGeometry SvgDownArrow => ((StreamGeometry)App.Current.FindResource("SvgDownArrow"));
+		public static StreamGeometry SvgOpenLink => ((StreamGeometry)App.Current.FindResource("SvgOpenLink"));
 	}

 	// pack://application:,,,/Nostrum;component/Resources/Styles.xaml
 	public static class Nostrum_Styles
 	{
-		public static ControlTemplate ComboBoxEditableTemplate => ((ControlTemplate)App.Current.FindResource("ComboBoxEditableTemplate"));
+		public static Style DefaultListItemStyle => ((Style)App.Current.FindResource("DefaultListItemStyle"));
+		public static ControlTemplate ComboBoxTemplate => ((ControlTemplate)App.Current.FindResource("ComboBoxTemplate"));
+		public static SolidColorBrush SelectionBorderBrush => ((SolidColorBrush)App.Current.FindResource("SelectionBorderBrush"));
+		public static DropShadowEffect BigDropShadow => ((DropShadowEffect)App.Current.FindResource("BigDropShadow"));
 		public static Style ButtonContentOpacityStyle => ((Style)App.Current.FindResource("ButtonContentOpacityStyle"));
+		public static DropShadowEffect DropShadow => ((DropShadowEffect)App.Current.FindResource("DropShadow"));
 		public static SolidColorBrush SelectionBackgroundLightBrush => ((SolidColorBrush)App.Current.FindResource("SelectionBackgroundLightBrush"));
+		public static Style NoHilightListItemStyle => ((Style)App.Current.FindResource("NoHilightListItemStyle"));
+		public static Style ComboBoxMainStyle => ((Style)App.Current.FindResource("ComboBoxMainStyle"));
+		public static SolidColorBrush SelectionBackgroundBrush => ((SolidColorBrush)App.Current.FindResource("SelectionBackgroundBrush"));
 		public static Style ComboBoxEditableTextBox => ((Style)App.Current.FindResource("ComboBoxEditableTextBox"));
 		public static Style NoHilightListItemStyleWithLines => ((Style)App.Current.FindResource("NoHilightListItemStyleWithLines"));
-		public static Style DefaultListItemStyle => ((Style)App.Current.FindResource("DefaultListItemStyle"));
+		public static ControlTemplate ComboBoxEditableTemplate => ((ControlTemplate)App.Current.FindResource("ComboBoxEditableTemplate"));
+		public static Style EmptyFocusVisual => ((Style)App.Current.FindResource("EmptyFocusVisual"));
 		public static ControlTemplate MenuItemControlTemplate1 => ((ControlTemplate)App.Current.FindResource("MenuItemControlTemplate1"));
 		public static Style ButtonMainStyle => ((Style)App.Current.FindResource("ButtonMainStyle"));
-		public static DropShadowEffect DropShadow => ((DropShadowEffect)App.Current.FindResource("DropShadow"));
-		public static SolidColorBrush SelectionBackgroundBrush => ((SolidColorBrush)App.Current.FindResource("SelectionBackgroundBrush"));
-		public static Style NoHilightListItemStyle => ((Style)App.Current.FindResource("NoHilightListItemStyle"));
-		public static DropShadowEffect BigDropShadow => ((DropShadowEffect)App.Current.FindResource("BigDropShadow"));
 		public static DropShadowEffect FadedDropShadow => ((DropShadowEffect)App.Current.FindResource("FadedDropShadow"));
-		public static ControlTemplate ComboBoxTemplate => ((ControlTemplate)App.Current.FindResource("ComboBoxTemplate"));
-		public static Style ComboBoxMainStyle => ((Style)App.Current.FindResource("ComboBoxMainStyle"));
-		public static SolidColorBrush SelectionBorderBrush => ((SolidColorBrush)App.Current.FindResource("SelectionBorderBrush"));
-		public static Style EmptyFocusVisual => ((Style)App.Current.FindResource("EmptyFocusVisual"));
 		public static Style ComboBoxToggleButton => ((Style)App.Current.FindResource("ComboBoxToggleButton"));
 	}

-	// pack://application:,,,/Nostrum;component/Resources/SVG.xaml
-	public static class Nostrum_SVG
-	{
-		public static StreamGeometry SvgCopy => ((StreamGeometry)App.Current.FindResource("SvgCopy"));
-		public static StreamGeometry SvgUpArrow => ((StreamGeometry)App.Current.FindResource("SvgUpArrow"));
-		public static StreamGeometry SvgAchievements => ((StreamGeometry)App.Current.FindResource("SvgAchievements"));
-		public static StreamGeometry SvgAwaken => ((StreamGeometry)App.Current.FindResource("SvgAwaken"));
-		public static StreamGeometry SvgGitHub => ((StreamGeometry)App.Current.FindResource("SvgGitHub"));
-		public static StreamGeometry SvgCheckAll => ((StreamGeometry)App.Current.FindResource("SvgCheckAll"));
-		public static StreamGeometry SvgPaypal => ((StreamGeometry)App.Current.FindResource("SvgPaypal"));
-		public static StreamGeometry SvgCollapseAll => ((StreamGeometry)App.Current.FindResource("SvgCollapseAll"));
-		public static StreamGeometry SvgBasket => ((StreamGeometry)App.Current.FindResource("SvgBasket"));
-		public static StreamGeometry SvgMove => ((StreamGeometry)App.Current.FindResource("SvgMove"));
-		public static StreamGeometry SvgEye => ((StreamGeometry)App.Current.FindResource("SvgEye"));
-		public static StreamGeometry SvgAdd => ((StreamGeometry)App.Current.FindResource("SvgAdd"));
-		public static StreamGeometry SvgConfirm => ((StreamGeometry)App.Current.FindResource("SvgConfirm"));
-		public static StreamGeometry SvgAddUser => ((StreamGeometry)App.Current.FindResource("SvgAddUser"));
-		public static StreamGeometry SvgShare => ((StreamGeometry)App.Current.FindResource("SvgShare"));
-		public static StreamGeometry SvgUser => ((StreamGeometry)App.Current.FindResource("SvgUser"));
-		public static StreamGeometry SvgShop => ((StreamGeometry)App.Current.FindResource("SvgShop"));
-		public static StreamGeometry SvgShirt => ((StreamGeometry)App.Current.FindResource("SvgShirt"));
-		public static StreamGeometry SvgReload => ((StreamGeometry)App.Current.FindResource("SvgReload"));
-		public static StreamGeometry SvgCheckCircle => ((StreamGeometry)App.Current.FindResource("SvgCheckCircle"));
-		public static StreamGeometry SvgMatching => ((StreamGeometry)App.Current.FindResource("SvgMatching"));
-		public static StreamGeometry SvgDiscord => ((StreamGeometry)App.Current.FindResource("SvgDiscord"));
-		public static StreamGeometry SvgDrag => ((StreamGeometry)App.Current.FindResource("SvgDrag"));
-		public static StreamGeometry SvgStar => ((StreamGeometry)App.Current.FindResource("SvgStar"));
-		public static StreamGeometry SvgFolder => ((StreamGeometry)App.Current.FindResource("SvgFolder"));
-		public static StreamGeometry SvgMapMarker => ((StreamGeometry)App.Current.FindResource("SvgMapMarker"));
-		public static StreamGeometry SvgChatMessage => ((StreamGeometry)App.Current.FindResource("SvgChatMessage"));
-		public static StreamGeometry SvgClose => ((StreamGeometry)App.Current.FindResource("SvgClose"));
-		public static StreamGeometry SvgHide => ((StreamGeometry)App.Current.FindResource("SvgHide"));
-		public static StreamGeometry SvgSocial => ((StreamGeometry)App.Current.FindResource("SvgSocial"));
-		public static StreamGeometry SvgBlurOff => ((StreamGeometry)App.Current.FindResource("SvgBlurOff"));
-		public static StreamGeometry SvgPen => ((StreamGeometry)App.Current.FindResource("SvgPen"));
-		public static StreamGeometry SvgUsers => ((StreamGeometry)App.Current.FindResource("SvgUsers"));
-		public static StreamGeometry SvgInfo => ((StreamGeometry)App.Current.FindResource("SvgInfo"));
-		public static StreamGeometry SvgGift => ((StreamGeometry)App.Current.FindResource("SvgGift"));
-		public static StreamGeometry SvgCrossedSwords => ((StreamGeometry)App.Current.FindResource("SvgCrossedSwords"));
-		public static StreamGeometry SvgWarning => ((StreamGeometry)App.Current.FindResource("SvgWarning"));
-		public static StreamGeometry SvgDownArrow => ((StreamGeometry)App.Current.FindResource("SvgDownArrow"));
-		public static StreamGeometry SvgQuestLog => ((StreamGeometry)App.Current.FindResource("SvgQuestLog"));
-		public static StreamGeometry SvgAddUsers => ((StreamGeometry)App.Current.FindResource("SvgAddUsers"));
-		public static StreamGeometry SvgRemoveUser => ((StreamGeometry)App.Current.FindResource("SvgRemoveUser"));
-		public static StreamGeometry SvgAuto => ((StreamGeometry)App.Current.FindResource("SvgAuto"));
-		public static StreamGeometry SvgBlurOn => ((StreamGeometry)App.Current.FindResource("SvgBlurOn"));
-		public static StreamGeometry SvgPin => ((StreamGeometry)App.Current.FindResource("SvgPin"));
-		public static StreamGeometry SvgSearch => ((StreamGeometry)App.Current.FindResource("SvgSearch"));
-		public static StreamGeometry SvgDotsVertical => ((StreamGeometry)App.Current.FindResource("SvgDotsVertical"));
-		public static StreamGeometry SvgHeart => ((StreamGeometry)App.Current.FindResource("SvgHeart"));
-		public static StreamGeometry SvgMenuRight => ((StreamGeometry)App.Current.FindResource("SvgMenuRight"));
-		public static StreamGeometry SvgRemoveCircle => ((StreamGeometry)App.Current.FindResource("SvgRemoveCircle"));
-		public static StreamGeometry SvgAddCircle => ((StreamGeometry)App.Current.FindResource("SvgAddCircle"));
-		public static StreamGeometry SvgUnpin => ((StreamGeometry)App.Current.FindResource("SvgUnpin"));
-		public static StreamGeometry SvgDisband => ((StreamGeometry)App.Current.FindResource("SvgDisband"));
-		public static StreamGeometry SvgMoney => ((StreamGeometry)App.Current.FindResource("SvgMoney"));
-		public static StreamGeometry SvgTwitch => ((StreamGeometry)App.Current.FindResource("SvgTwitch"));
-		public static StreamGeometry SvgExpandAll => ((StreamGeometry)App.Current.FindResource("SvgExpandAll"));
-		public static StreamGeometry SvgMail => ((StreamGeometry)App.Current.FindResource("SvgMail"));
-		public static StreamGeometry SvgGuild => ((StreamGeometry)App.Current.FindResource("SvgGuild"));
-		public static StreamGeometry SvgTrophy => ((StreamGeometry)App.Current.FindResource("SvgTrophy"));
-		public static StreamGeometry SvgSettings => ((StreamGeometry)App.Current.FindResource("SvgSettings"));
-		public static StreamGeometry SvgUserAdd => ((StreamGeometry)App.Current.FindResource("SvgUserAdd"));
-		public static StreamGeometry SvgOpenLink => ((StreamGeometry)App.Current.FindResource("SvgOpenLink"));
-		public static StreamGeometry SvgDelegateLeader => ((StreamGeometry)App.Current.FindResource("SvgDelegateLeader"));
-		public static StreamGeometry SvgBlock => ((StreamGeometry)App.Current.FindResource("SvgBlock"));
-	}
-
 }


Added summaries for fields that can be frozen.

--- Sandra.Chess/Variation.cs
+++ Sandra.Chess/Variation.cs
@@ -31,12 +31,18 @@
         /// </summary>
         public readonly Move Move;

+        /// <summary>
+        /// Gets the parent <see cref="MoveTree"/> in which this variation is embedded. This field is never equal to null.
+        /// </summary>
         public readonly MoveTree ParentTree;

+        /// <summary>
+        /// Gets the tree of moves after <see cref="Move"/> has been played.
+        /// </summary>
         public readonly MoveTree MoveTree;

         internal Variation(MoveTree parentTree, Move move)
-        {
+        {
             ParentTree = parentTree;
             Move = move;
             MoveTree = new MoveTree(this);
@@ -61,6 +67,9 @@
         /// </remarks>
         public readonly int PlyCount;

+        /// <summary>
+        /// Gets the optional parent <see cref="Variation"/> with previous move in which this <see cref="MoveTree"/> is embedded.
+        /// </summary>
         public readonly Variation ParentVariation;

         public Variation Main { get; private set; }


fixes a non-compileable assertion to the extent that it compiles


Added Google analictics to page

Added Google analictics to page

--- FormsGeneratorWebApplication/Views/Shared/_Layout.cshtml
+++ FormsGeneratorWebApplication/Views/Shared/_Layout.cshtml
@@ -4,11 +4,26 @@
     <meta charset="utf-8" />
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
     <title>@ViewBag.Title - Forms</title>
-        @Styles.Render("~/Content/css")
-
-    <script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
+    @Styles.Render("~/Content/css")
+
+    <script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
     <script type="text/javascript"> window.jQuery || document.write('<script>src="@Url.Content("~/Scripts/vender/jquery-1.10.2.js")" <\/script>')</script>
-
+    <!--
+
+
+    -->
+    <script>
+    (function (i, s, o, g, r, a, m) {
+        i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function () {
+            (i[r].q = i[r].q || []).push(arguments)
+        }, i[r].l = 1 * new Date(); a = s.createElement(o),
+        m = s.getElementsByTagName(o)[0]; a.async = 1; a.src = g; m.parentNode.insertBefore(a, m)
+    })(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
+
+    ga('create', 'UA-62590401-1', 'auto');
+    ga('send', 'pageview');
+
+    </script>
     @Scripts.Render("~/Scripts/vender/vender-bundle")
     @*@Scripts.Render("~/bundles/modernizr")*@
     @Scripts.Render("~/bundles/bootstrap")


* Adding ON_ERROR_INFO event.

* Adding ON_ERROR_INFO event.

--- Scripts/Utilities/Constants.cs
+++ Scripts/Utilities/Constants.cs
@@ -78,6 +78,10 @@
             /// AFter toggle the debug console on or off.
             /// </summary>
             ON_DEBUG_TOGGLE_FINISH,
+            /// <summary>
+            /// This is sent to provide additional info about a error that is ocurring.
+            /// </summary>
+            ON_ERROR_INFO,
             #endregion

             #region Avatar


added address as allowed scope

added address as allowed scope

--- source/Host/Config/Clients.cs
+++ source/Host/Config/Clients.cs
@@ -54,6 +54,7 @@
                         Constants.StandardScopes.OpenId,
                         Constants.StandardScopes.Profile,
                         Constants.StandardScopes.Email,
+                        Constants.StandardScopes.Address,
                         Constants.StandardScopes.OfflineAccess,
                         "idmgr",
                         "read",


Made polygon a struct

Made polygon a struct

--- Sharpex2D/Math/Polygon.cs
+++ Sharpex2D/Math/Polygon.cs
@@ -25,30 +25,28 @@
 {
     [Developer("ThuCommix", "developer@sharpex2d.de")]
     [TestState(TestState.Tested)]
-    public class Polygon : IGeometry
+    public struct Polygon : IGeometry
     {
-        private readonly List<Vector2> _edges;
-        private readonly List<Vector2> _originalPoints;
         private readonly List<Vector2> _points;

         /// <summary>
         ///     Initializes a new Polygon class.
         /// </summary>
-        public Polygon()
+        /// <param name="points">The Points.</param>
+        public Polygon(params Vector2[] points) : this()
         {
             _points = new List<Vector2>();
-            _edges = new List<Vector2>();
-            _originalPoints = new List<Vector2>();
+            _points.AddRange(points);
         }

         /// <summary>
         ///     Initializes a new Polygon class.
         /// </summary>
         /// <param name="points">The Points.</param>
-        public Polygon(params Vector2[] points)
-        {
-            _originalPoints.AddRange(points);
-            UpdateEdges();
+        public Polygon(IEnumerable<Vector2> points) : this()
+        {
+            _points = new List<Vector2>();
+            _points.AddRange(points);
         }

         /// <summary>
@@ -87,60 +85,6 @@
         }

         /// <summary>
-        ///     Gets the Edges.
-        /// </summary>
-        public List<Vector2> Edges
-        {
-            get { return _edges; }
-        }
-
-        /// <summary>
-        ///     Adds a Vector to the Polygon.
-        /// </summary>
-        /// <param name="point">The Vector.</param>
-        public void Add(Vector2 point)
-        {
-            _originalPoints.Add(point);
-            UpdateEdges();
-        }
-
-        /// <summary>
-        ///     Adds a array of Vector to the Polygon.
-        /// </summary>
-        /// <param name="points">The Vector.</param>
-        public void Add(params Vector2[] points)
-        {
-            _originalPoints.AddRange(points);
-            UpdateEdges();
-        }
-
-        /// <summary>
-        ///     Resets the Polygon.
-        /// </summary>
-        public void Reset()
-        {
-            _points.Clear();
-            _originalPoints.Clear();
-            _edges.Clear();
-        }
-
-        /// <summary>
-        ///     Updates the edges.
-        /// </summary>
-        private void UpdateEdges()
-        {
-            if (!IsValid) return;
-
-            _edges.Clear();
-            for (int i = 0; i < _points.Count; i++)
-            {
-                Vector2 p1 = _points[i];
-                Vector2 p2 = i + 1 >= _points.Count ? _points[0] : _points[i + 1];
-                _edges.Add(p2 - p1);
-            }
-        }
-
-        /// <summary>
         ///     Projects an axis.
         /// </summary>
         /// <param name="axis">The Axis.</param>


Reduced P/Invoke declaration line width.

--- Shortcut/NativeMethods.cs
+++ Shortcut/NativeMethods.cs
@@ -6,10 +6,16 @@
     internal static class NativeMethods
     {
         [DllImport("user32.dll", SetLastError = true)]
-        internal static extern bool RegisterHotKey(IntPtr windowHandle, int hotkeyId, uint modifier, uint key);
+        internal static extern bool RegisterHotKey(
+            IntPtr windowHandle,
+            int hotkeyId,
+            uint modifier,
+            uint key);

         [DllImport("user32.dll", SetLastError = true)]
-        internal static extern bool UnregisterHotKey(IntPtr windowHandle, int hotkeyId);
+        internal static extern bool UnregisterHotKey(
+            IntPtr windowHandle,
+            int hotkeyId);

         [DllImport("user32.dll")]
         internal static extern bool HideCaret(IntPtr controlHandle);


[Modify] Edit it

[Modify] Edit it

--- websocket-sharp/Logger.cs
+++ websocket-sharp/Logger.cs
@@ -67,7 +67,8 @@
     /// Initializes a new instance of the <see cref="Logger"/> class.
     /// </summary>
     /// <remarks>
-    /// This constructor initializes the current logging level with <see cref="LogLevel.Error"/>.
+    /// This constructor initializes the current logging level with
+    /// <see cref="LogLevel.Error"/>.
     /// </remarks>
     public Logger ()
       : this (LogLevel.Error, null, null)


Allow video paths without starting with http

--- LiveSplit/LiveSplit.View/View/SpeedrunComSubmitDialog.cs
+++ LiveSplit/LiveSplit.View/View/SpeedrunComSubmitDialog.cs
@@ -53,9 +53,12 @@

             if (!string.IsNullOrEmpty(txtVideo.Text))
             {
-                if (Uri.IsWellFormedUriString(txtVideo.Text, UriKind.Absolute))
+                var videoText = txtVideo.Text;
+                if (!videoText.StartsWith("http"))
+                    videoText = "http://" + videoText;
+                if (Uri.IsWellFormedUriString(videoText, UriKind.Absolute))
                 {
-                    videoUri = new Uri(txtVideo.Text);
+                    videoUri = new Uri(videoText);
                 }
                 else
                 {


added persistant stprage

added persistant stprage

--- MiningStationAutomation/MiningStationAutomationScript.cs
+++ MiningStationAutomation/MiningStationAutomationScript.cs
@@ -9,7 +9,6 @@

 namespace SpaceEngineersScripts.MiningStationAutomation
 {
-    //TODO: use persistant storage
     //TODO: output to debug
     class MiningStationAutomationScript
     {
@@ -52,6 +51,9 @@
             }

             station.Request();
+
+            Storage = station.State.GetStateDTO(station).ToString();
+            Echo(string.Format("Storage:\n{0}", Storage));
         }

         /// <summary>
@@ -59,6 +61,11 @@
         /// </summary>
         class InitState : State
         {
+            public StateDTO GetStateDTO(Context context)
+            {
+                return new StateDTO(this.GetType().ToString(), -1, -1);
+            }
+
             public void Handle(Context context)
             {
                 var drillStationBlocks = (context as DrillStation).DrillStationBlocks;
@@ -108,24 +115,39 @@
                     block.GetActionWithName("OnOff_On").Apply(block);
                 });

-                //move to the start position (pistons at 1m/s rotor at 4 rpm)
-                if (drillStationBlocks.ToPosition(drillStationBlocks.VerticalPistons, 0, 1, drillStationBlocks.HorizontalPiston, 0, 1, drillStationBlocks.Rotor, 0, 4))
-                {
-                    //when done proceed to the next state
-                    if (INIT_FLATTENING)
-                    {
-                        context.State = new FlatteningState(0);
-                    }
-                    else
-                    {
-                        context.State = new DeepeningState();
-                    }
-                }
+                //if the storage contains state info, load it.
+                var storage = (context as DrillStation).PersistantStorage;
+                if (storage.Contains("state="))
+                {
+                    context.State = new StateDTO(storage).BuildState();
+                }
+                else {
+                    //move to the start position (pistons at 1m/s rotor at 1 rpm)
+                    if (drillStationBlocks.ToPosition(drillStationBlocks.VerticalPistons, 0, 1, drillStationBlocks.HorizontalPiston, 0, 1, drillStationBlocks.Rotor, 0, 1))
+                    {
+                        //when done proceed to the next state
+                        if (INIT_FLATTENING)
+                        {
+                            context.State = new FlatteningState(0);
+                        }
+                        else
+                        {
+                            context.State = new DeepeningState();
+                        }
+                    }
+                }
+            }
+
+            public void LoadFromStateDTO(StateDTO stateDTO)
+            {
+                //nothing to do here
+                return;
             }

             public string Status(Context context)
             {
-                return "INIT";
+                //leave blank
+                return "";
             }
         }

@@ -135,7 +157,7 @@
         class FlatteningState : State
         {
             private int currentCircle = 0;
-            protected readonly float depth;
+            private float depth;

             /// <summary>
             /// initializes a new FlatteningState
@@ -144,6 +166,11 @@
             public FlatteningState(float targetDepth)
             {
                 this.depth = targetDepth;
+            }
+
+            public StateDTO GetStateDTO(Context context)
+            {
+                return new StateDTO(this.GetType().ToString(), currentCircle, depth);
             }

             public void Handle(Context context)
@@ -180,10 +207,17 @@
                 }
                 else
                 {
-                    //move to the start position (pistons at 1m/s rotor at 4 rpm)
-                    if (drillStationBlocks.ToPosition(drillStationBlocks.VerticalPistons, 0, 1, drillStationBlocks.HorizontalPiston, 0, 1, drillStationBlocks.Rotor, 0, 4))
-                    {
-                        context.State = new DeepeningState();
+                    //move to the start position (pistons at 1m/s rotor at 1 rpm)
+                    if (drillStationBlocks.ToPosition(drillStationBlocks.VerticalPistons, 0, 1, drillStationBlocks.HorizontalPiston, 0, 1, drillStationBlocks.Rotor, 0, 1))
+                    {
+                        if (depth != TARGET_DEPTH)
+                        {
+                            context.State = new DeepeningState();
+                        }
+                        else
+                        {
+                            context.State = new DoneState();
+                        }
                     }
                 }
             }
@@ -191,6 +225,12 @@
             public string Status(Context context)
             {
                 return string.Format("Flattening [{0}/{1}] ({2:0.##}m)", currentCircle + 1, DRILL_RADII.Count, BlockUtils.GetPistonsTotalPosition((context as DrillStation).DrillStationBlocks.VerticalPistons));
+            }
+
+            public void LoadFromStateDTO(StateDTO stateDTO)
+            {
+                this.currentCircle = stateDTO.Circle;
+                this.depth = stateDTO.Depth;
             }
         }

@@ -202,6 +242,17 @@
             private int currentCircle = 0;
             private bool depthReached = true;

+            public StateDTO GetStateDTO(Context context)
+            {
+                return new StateDTO(this.GetType().ToString(), currentCircle, BlockUtils.GetPistonsTotalPosition((context as DrillStation).DrillStationBlocks.VerticalPistons));
+            }
+
+            public void LoadFromStateDTO(StateDTO stateDTO)
+            {
+                currentCircle = stateDTO.Circle;
+                //TODO depth
+            }
+
             public void Handle(Context context)
             {
                 var drillStationBlocks = (context as DrillStation).DrillStationBlocks;
@@ -211,19 +262,10 @@
                 {
                     if (depthReached)
                     {
-                        //move to the start position (pistons at 1m/s rotor at 4 rpm)
-                        if (drillStationBlocks.ToPosition(drillStationBlocks.VerticalPistons, 0, 1, drillStationBlocks.HorizontalPiston, 0, 1, drillStationBlocks.Rotor, 0, 4))
+                        //move to the start position (pistons at 1m/s rotor at 1 rpm)
+                        if (drillStationBlocks.ToPosition(drillStationBlocks.VerticalPistons, 0, 1, drillStationBlocks.HorizontalPiston, DRILL_RADII[currentCircle], 1, drillStationBlocks.Rotor, 0, 1))
                         {
-                            //if start reached, move to drill radius
-                            if (BlockUtils.MovePistonsToPosition(drillStationBlocks.HorizontalPiston, DRILL_RADII[currentCircle], 1))
-                            {
-                                depthReached = false;
-                            }
-                            else
-                            {
-                                //if not at drill radius, break excecution
-                                return;
-                            }
+                            depthReached = false;
                         }
                         else
                         {
@@ -246,8 +288,8 @@
                     }
                 }
                 else {
-                    //move to the start position (pistons at 1m/s rotor at 4 rpm)
-                    if (drillStationBlocks.ToPosition(drillStationBlocks.VerticalPistons, 0, 1, drillStationBlocks.HorizontalPiston, 0, 1, drillStationBlocks.Rotor, 0, 4))
+                    //move to the start position (pistons at 1m/s rotor at 1 rpm)
+                    if (drillStationBlocks.ToPosition(drillStationBlocks.VerticalPistons, 0, 1, drillStationBlocks.HorizontalPiston, 0, 1, drillStationBlocks.Rotor, 0, 1))
                     {
                         //when done proceed to the next state
                         if (END_FLATTENING)
@@ -273,12 +315,17 @@
         /// </summary>
         class DoneState : State
         {
+            public StateDTO GetStateDTO(Context context)
+            {
+                return new StateDTO(this.GetType().ToString(), -1, -1);
+            }
+
             public void Handle(Context context)
             {
                 var drillStationBlocks = (context as DrillStation).DrillStationBlocks;

-                //move to the start position (pistons at 1m/s rotor at 4 rpm)
-                if (!drillStationBlocks.ToPosition(drillStationBlocks.VerticalPistons, 0, 1, drillStationBlocks.HorizontalPiston, 0, 1, drillStationBlocks.Rotor, 0, 4))
+                //move to the start position (pistons at 1m/s rotor at 1 rpm)
+                if (!drillStationBlocks.ToPosition(drillStationBlocks.VerticalPistons, 0, 1, drillStationBlocks.HorizontalPiston, 0, 1, drillStationBlocks.Rotor, 0, 1))
                     return;

                 //turn off all panels
@@ -346,6 +393,11 @@
                 }
             }

+            public void LoadFromStateDTO(StateDTO stateDTO)
+            {
+                return;
+            }
+
             public string Status(Context context)
             {
                 return "DONE";
@@ -357,8 +409,109 @@
         /// </summary>
         interface State
         {
+            /// <summary>
+            /// handle the context in order to move to the next state.
+            /// </summary>
+            /// <param name="context"></param>
             void Handle(Context context);
+
+            /// <summary>
+            /// retrieves a friendly status message
+            /// </summary>
+            /// <param name="context"></param>
             string Status(Context context);
+
+            /// <summary>
+            /// gets the stateDTO based on the current variables
+            /// </summary>
+            /// <param name="context"></param>
+            StateDTO GetStateDTO(Context context);
+
+            /// <summary>
+            /// sets the state to a point contained in the DTO
+            /// </summary>
+            /// <param name="stateDTO"></param>
+            void LoadFromStateDTO(StateDTO stateDTO);
+        }
+
+        class StateDTO
+        {
+            public string State { get; private set; }
+            public int Circle { get; private set; }
+            public float Depth { get; private set; }
+
+            public StateDTO(string state, int circle, float depth)
+            {
+                State = state;
+                Circle = circle;
+                Depth = depth;
+            }
+
+            /// <summary>
+            /// builds the DTO info from a string value
+            /// </summary>
+            /// <param name="persistantStorage"></param>
+            public StateDTO(string persistantStorage)
+            {
+                var keyValues = persistantStorage.Split(new string[] { "\n" }, StringSplitOptions.RemoveEmptyEntries);
+
+                foreach (var keyValue in keyValues)
+                {
+                    var key = keyValue.Split('=')[0];
+                    var value = keyValue.Split('=')[1];
+
+                    switch (key)
+                    {
+                        case "state":
+                            State = value;
+                            break;
+                        case "circle":
+                            Circle = int.Parse(value);
+                            break;
+                        case "depth":
+                            Depth = float.Parse(value);
+                            break;
+                    }
+                }
+            }
+
+            /// <summary>
+            /// formats the DTO to display as a string, also used in persistant storage
+            /// </summary>
+            /// <returns></returns>
+            public override string ToString()
+            {
+                return string.Format("state={0}\ncircle={1}\ndepth={2}", State, Circle, Depth);
+            }
+
+            /// <summary>
+            /// returns a build state from the DTO
+            /// </summary>
+            /// <returns></returns>
+            public State BuildState()
+            {
+                State targetState;
+
+                switch (State)
+                {
+                    case "FlatteningState":
+                        targetState = new FlatteningState(0);
+                        break;
+                    case "DeepeningState":
+                        targetState = new DeepeningState();
+                        break;
+                    case "DoneState":
+                        targetState = new DoneState();
+                        break;
+                    default:
+                        targetState = new InitState();
+                        break;
+                }
+
+                targetState.LoadFromStateDTO(this);
+
+                return targetState;
+            }
         }

         abstract class Context
@@ -387,61 +540,27 @@
         class DrillStation : Context
         {
             private DrillStationBlocks _drillStationBlocks;
+            public string _storage;

             // Constructor
             public DrillStation(IMyGridTerminalSystem GridTerminalSystem, string storage)
             {
-                //TODO: use persistant storage
-                /*if (storage.Contains("StateName"))
-                {
-                    //get the state from storage
-                    var entries = storage.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
-
-                    entries.ForEach(entry =>
-                    {
-                        if (entry.Contains("StateName"))
-                        {
-                            var stateName = entry.Split('=')[1];
-
-                            Echo(string.Format("Found State {0} persisted in Storage with key 'StateName', using to init", stateName));
-
-                            switch (stateName)
-                            {
-                                case "InitState":
-                                    this.State = new InitState();
-                                    break;
-                                case "InitFlatteningState":
-                                    this.State = new FlatteningState(0);
-                                    break;
-                                case "DeepeningState":
-                                    this.State = new DeepeningState();
-                                    break;
-                                case "EndFlatteningState":
-                                    this.State = new FlatteningState(TARGET_DEPTH);
-                                    break;
-                                case "DoneState":
-                                    this.State = new DoneState();
-                                    break;
-                                default:
-                                    Echo(string.Format("StateName {0} was not recognized as a State, using default InitState", stateName));
-                                    //init is the default state
-                                    this.State = new InitState();
-                                    break;
-                            }
-                        }
-                    });
-                }
-                else
-                {
-                    //init is the default state
-                    State = new InitState();
-                }*/
-
                 //init is the default state
                 State = new InitState();

+                //store the storage
+                this._storage = storage;
+
                 //build the station blocks
                 this._drillStationBlocks = new DrillStationBlocks(GridTerminalSystem);
+            }
+
+            public string PersistantStorage
+            {
+                get
+                {
+                    return _storage;
+                }
             }

             // Gets the DrillStationBlocks
@@ -537,19 +656,16 @@

             public bool ToPosition(List<IMyPistonBase> pistons1, float pistons1position, float speed1, List<IMyPistonBase> pistons2, float pistons2position, float speed2, IMyMotorAdvancedStator rotor, float rotorPosition, float rpm)
             {
-                //move the vPistons to 0 with speed of 1m/s
                 if (!BlockUtils.MovePistonsToPosition(pistons1, pistons1position, speed1))
                 {
                     return false;
                 }

-                //move the hPistons to 0 with speed of 1m/s
                 if (!BlockUtils.MovePistonsToPosition(pistons2, pistons2position, speed2))
                 {
                     return false;
                 }

-                //move the rotor to 0 degree on circles, with 4 RPM
                 if (!BlockUtils.MoveRotorToPosition(rotor, rotorPosition, rpm))
                 {
                     return false;


removed result field

removed result field

--- TreeWriter.cs
+++ TreeWriter.cs
@@ -23,22 +23,27 @@
 		private const string BODY = "body";
 		private const string PARAMETERS = "parameters";

-		private StringBuilder result;
 		private	string input;

 		public TreeWriter(string input)
 		{
-			result = new StringBuilder();
 			this.input = input;
-			CreateResult();
 		}

 		public void Write(string outputFilePath)
 		{
+			StringBuilder result = new StringBuilder();
+			Tree rootTree = CreateResult();
+			rootTree.AppendToBuilder(result);
+
 			File.WriteAllText(outputFilePath, result.ToString());
+
+#if DEBUG
+			Console.WriteLine(result);
+#endif
 		}

-		private void CreateResult()
+		private Tree CreateResult()
 		{
 			SyntaxTree tree = CSharpSyntaxTree.ParseText(input);
 			CompilationUnitSyntax root = tree.GetRoot() as CompilationUnitSyntax;
@@ -46,11 +51,7 @@
 			foreach (SyntaxNode node in root.Members) {
 				CreateTree(node, rootGitTree);
 			}
-			rootGitTree.AppendToBuilder(result);
-
-#if DEBUG
-			Console.WriteLine(result);
-#endif
+			return rootGitTree;
 		}

 		private void CreateTree(SyntaxNode node, Tree currentRoot)


added ws2/com8

added ws2/com8

--- winViz/MainWindow.xaml.cs
+++ winViz/MainWindow.xaml.cs
@@ -158,6 +158,7 @@
             InitializeComponent();

             MachineToLidarPort.Add("WS1", "com6");
+            MachineToLidarPort.Add("WS2", "com8");
             MachineToLidarPort.Add("MSI2", "com3");

             Width = Settings.Default.Width;


Add auto retry feature

Add auto retry feature

--- TwitterApi.cs
+++ TwitterApi.cs
@@ -13,6 +13,9 @@
 {
     internal static class TwitterApi
     {
+        private static bool AutoWaitForBlockList;
+        private static bool AutoWaitForMuteList;
+
         public static TwitterOAuth TwitterOAuth { get; internal set; }

         public static TwitterOAuth Login(IniSettings setting)
@@ -194,18 +197,21 @@
                     string response = reader.ReadToEnd();
                     Console.WriteLine(response);

-                    if (Regex.IsMatch(response, @"(?i)""code""\s*:\s*88"))
+                    if (!Regex.IsMatch(response, @"(?i)""code""\s*:\s*88")) return json.ToString();
+                    if (!AutoWaitForBlockList)
                     {
-                        Console.Write("Do you want retry get block list after 15min? (Y/N)");
+                        Console.Write("Do you want retry get block list after 15min? (Yes/No/Auto)");
                         string readLine = Console.ReadLine();
-                        if ((readLine != null) && readLine.ToUpper().Trim().Equals("N"))
+                        if ((readLine != null) && readLine.ToUpper().Trim().StartsWith("N"))
                             return json.ToString();
-
-                        Console.WriteLine("Wait for 15min... The job will be resumed at : " +
-                                          DateTime.Now.AddMinutes(15).ToString("hh:mm:ss"));
-                        Thread.Sleep(15 * 60 * 1000);
-                        return getMyBlockList(cursor);
+                        if ((readLine != null) && readLine.ToUpper().Trim().StartsWith("A"))
+                            AutoWaitForBlockList = true;
                     }
+
+                    Console.WriteLine("Wait for 15min... The job will be resumed at : " +
+                                      DateTime.Now.AddMinutes(15).ToString("hh:mm:ss"));
+                    Thread.Sleep(15 * 60 * 1000);
+                    return getMyBlockList(cursor);
                 }
             }

@@ -234,18 +240,21 @@
                     string response = reader.ReadToEnd();
                     Console.WriteLine(response);

-                    if (Regex.IsMatch(response, @"(?i)""code""\s*:\s*88"))
+                    if (!Regex.IsMatch(response, @"(?i)""code""\s*:\s*88")) return json.ToString();
+                    if (!AutoWaitForMuteList)
                     {
-                        Console.Write("Do you want retry get mute list after 15min? (Y/N)");
+                        Console.Write("Do you want retry get mute list after 15min? (Yes/No/Auto)");
                         string readLine = Console.ReadLine();
-                        if ((readLine != null) && readLine.ToUpper().Trim().Equals("N"))
+                        if ((readLine != null) && readLine.ToUpper().Trim().StartsWith("N"))
                             return json.ToString();
-
-                        Console.WriteLine("Wait for 15min... The job will be resumed at : " +
-                                          DateTime.Now.AddMinutes(15).ToString("hh:mm:ss"));
-                        Thread.Sleep(15 * 60 * 1000);
-                        return getMyBlockList(cursor);
+                        if ((readLine != null) && readLine.ToUpper().Trim().StartsWith("A"))
+                            AutoWaitForMuteList = true;
                     }
+
+                    Console.WriteLine("Wait for 15min... The job will be resumed at : " +
+                                      DateTime.Now.AddMinutes(15).ToString("hh:mm:ss"));
+                    Thread.Sleep(15 * 60 * 1000);
+                    return getMyBlockList(cursor);
                 }
             }


Fixed the previous patch, sorry minor error

git-svn-id: bab0c2de90ee11a20376049c2cdee62584491f34@3275 73e77b4c-caa6-f847-a29a-24ab75ae54b6

--- MonoRail/Castle.MonoRail.Framework/Helpers/AjaxHelper.cs
+++ MonoRail/Castle.MonoRail.Framework/Helpers/AjaxHelper.cs
@@ -319,7 +319,7 @@
 		/// <returns></returns>
 		public String LinkToFunction(String innerContent, String functionCodeOrName)
 		{
-			return LinkToFunction(innerContent, functionCodeOrName, null, null);
+			return LinkToFunction(innerContent, functionCodeOrName, new Hashtable());
 		}

 		/// <summary>
@@ -424,11 +424,11 @@
 		/// Usually, the result would be a partial prepared by the controller
 		/// </summary>
 		/// <param name="innerContent">Link content</param>
+		/// <param name="confirm">the confirm question</param>
 		/// <param name="url">Target url</param>
-		/// <param name="confirm">the confirm question</param>
 		/// <param name="options">the options for the Ajax invocation</param>
 		/// <returns>The handcrafted element</returns>
-		public String LinkToRemote(String innerContent, String url, String confirm, IDictionary options)
+		public String LinkToRemote(String innerContent, String confirm, String url, IDictionary options)
 		{
 			return LinkToFunction(innerContent, BuildRemoteFunction(url, options), confirm, null);
 		}


Fixed bug in MetadataLoader: Tracks wth empty AlbumAritsts / Performers lsits can now be loaded

--- MusicFileCop.Core/src/Private/Metadata/MetadataLoader.cs
+++ MusicFileCop.Core/src/Private/Metadata/MetadataLoader.cs
@@ -49,13 +49,13 @@
                 var tag = audioFile.GetTag(TagTypes.Id3v2);

                 var track = m_MetadataFactory.GetTrack(
-                    tag.AlbumArtists?.Aggregate((a,b) => $"{a}/{b}"),
+                    tag.AlbumArtists != null && tag.AlbumArtists.Any() ? tag.AlbumArtists.Aggregate((a, b) => $"{a}/{b}") : "",
                     tag.Album,
                     (int) tag.Year,
                     (int) tag.Disc,
                     (int) tag.Track,
                     tag.Title,
-                    tag.Performers.Aggregate((a, b) => $"{a}/{b}"));
+                    tag.Performers != null && tag.Performers.Any() ? tag.Performers.Aggregate((a, b) => $"{a}/{b}") : "");

                 m_FileMetadataMapper.AddMapping(track, file);
             }


Fixed weird reminder bug

Fixed weird reminder bug

--- NadekoBot.Core/Modules/Utility/Services/RemindService.cs
+++ NadekoBot.Core/Modules/Utility/Services/RemindService.cs
@@ -13,6 +13,7 @@
 using System.Collections.Generic;
 using System.Collections.Concurrent;
 using Discord.Net;
+using Microsoft.EntityFrameworkCore;

 namespace NadekoBot.Modules.Utility.Services
 {
@@ -103,8 +104,8 @@
             {
                 using (var uow = _db.UnitOfWork)
                 {
-                    uow.Reminders.Remove(r);
-                    await uow.CompleteAsync();
+                    uow._context.Database.ExecuteSqlCommand($"DELETE FROM Reminders WHERE Id={r.Id};");
+                    uow.Complete();
                 }
                 RemoveReminder(r.Id);
             }


The anti-triggered edit 3: This time it's China

--- NadekoBot/Modules/Translator/Helpers/GoogleTranslator.cs
+++ NadekoBot/Modules/Translator/Helpers/GoogleTranslator.cs
@@ -101,6 +101,7 @@
                     { "catalan", "ca"},
                     { "chinese-traditional", "zh-TW"},
                     { "chinese-simplified", "zh-CN"},
+                    { "chinese", "zh-CN"},
                     { "croatian", "hr"},
                     { "czech", "cs"},
                     { "danish", "da"},


Fix...

Fix...

--- OpenSim/Region/Framework/Scenes/Components/IComponent.cs
+++ OpenSim/Region/Framework/Scenes/Components/IComponent.cs
@@ -48,7 +48,7 @@
         /// </summary>
         /// <param name="obj">The object to get the value from</param>
         /// <returns></returns>
-        OSD GetState (UUID obj, bool copyComponent = false);
+        OSD GetState (UUID obj, bool copyComponent);

         /// <summary>
         /// A representation of the current state of the Component


License text

License text

--- PART/Source/Core/Engine.Tests/UpdateDatabasePartTests.cs
+++ PART/Source/Core/Engine.Tests/UpdateDatabasePartTests.cs
@@ -1,4 +1,50 @@
-using System;
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License
+ * Version 1.1 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS"basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The CPR Broker concept was initally developed by
+ * Gentofte Kommune / Municipality of Gentofte, Denmark.
+ * Contributor(s):
+ * Steen Deth
+ *
+ *
+ * The Initial Code for CPR Broker and related components is made in
+ * cooperation between Magenta, Gentofte Kommune and IT- og Telestyrelsen /
+ * Danish National IT and Telecom Agency
+ *
+ * Contributor(s):
+ * Beemen Beshara
+ * Niels Elgaard Larsen
+ * Leif Lodahl
+ * Steen Deth
+ *
+ * The code is currently governed by IT- og Telestyrelsen / Danish National
+ * IT and Telecom Agency
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+using System;
 using System.Collections.Generic;
 using System.Linq;
 using System.Text;
@@ -154,8 +200,8 @@
                     oio.SourceObjectsXml = Utilities.CreateFakePerson(true).SourceObjectsXml;
                     var newRet = CprBroker.Engine.Local.UpdateDatabase.MergePersonRegistration(pId, oio);
                     Assert.True(newRet);
-
-                    var dbPersons = dataContext.PersonRegistrations.Where(pr => pr.UUID == pId.UUID).OrderBy(p=>p.BrokerUpdateDate).ToArray();
+
+                    var dbPersons = dataContext.PersonRegistrations.Where(pr => pr.UUID == pId.UUID).OrderBy(p => p.BrokerUpdateDate).ToArray();
                     Assert.AreEqual(2, dbPersons.Length);

                     var tmpElement = System.Xml.Linq.XElement.Parse(oio.SourceObjectsXml);


Mark out scanner & camera acquisition on Mono, until we have that ability on Linux.

--- PalasoUIWindowsForms/ImageToolbox/ImageToolboxControl.cs
+++ PalasoUIWindowsForms/ImageToolbox/ImageToolboxControl.cs
@@ -34,8 +34,11 @@

 			AddControl("From File", ImageToolboxButtons.browse, "browse", getImageGroup, (x) => new GetImageFromFileSystemControl());
+#if !MONO
+
 			AddControl("From Scan", ImageToolboxButtons.scanner, "scanner", getImageGroup, (x) => new DeviceAcquire(ImageAcquisitionService.DeviceKind.Scanner));
 			AddControl("From Camera", ImageToolboxButtons.scanner, "camera", getImageGroup, (x) => new DeviceAcquire(ImageAcquisitionService.DeviceKind.Camera));
+#endif
 			AddControl("From Gallery", ImageToolboxButtons.searchFolder, "gallery", getImageGroup, (x) => new ArtOfReadingChooser(string.Empty));
 			AddControl("Crop",  ImageToolboxButtons.crop, "crop", editImageGroup, (x) => new ImageCropper());
 			AddControl("Credits", ImageToolboxButtons.credits, "credits", otherGroup, (x) => new ImageCreditsControl());


Don't fail when a nested proxy's type is specified in xml

--- Rock.Core/Serialization/XmlDeserializationProxyEngine.cs
+++ Rock.Core/Serialization/XmlDeserializationProxyEngine.cs
@@ -467,8 +467,15 @@

                         if (typeFromAttribute != null)
                         {
-                            serializer = new XmlSerializer(typeFromAttribute,
-                                new XmlRootAttribute(additionalElement.Name.LocalName));
+                            try
+                            {
+                                serializer = new XmlSerializer(typeFromAttribute,
+                                    new XmlRootAttribute(additionalElement.Name.LocalName));
+                            }
+                            catch (InvalidOperationException)
+                            {
+                                serializer = null;
+                            }
                         }
                     }


to-do's

to-do's

--- Source/HtmlRenderer.PdfSharp/Adapters/GraphicsAdapter.cs
+++ Source/HtmlRenderer.PdfSharp/Adapters/GraphicsAdapter.cs
@@ -75,12 +75,12 @@

         public override void SetClipReplace(RRect rect)
         {
-
+            // TODO:a handle clip (maybe api need to be changed)
         }

         public override void SetClipExclude(RRect rect)
         {
-
+            // TODO:a handle clip (maybe api need to be changed)
         }

         public override Object SetAntiAliasSmoothingMode()


very small redundancy fix

very small redundancy fix

--- SteamMaster/GameRank/GameRankCore/GRCalculateGameRank.cs
+++ SteamMaster/GameRank/GameRankCore/GRCalculateGameRank.cs
@@ -39,7 +39,6 @@
             {
                 Tags[entry.Key].GameRank = entry.Value;
             }
-            UpdateGameRanks();
         }

         #endregion


update annotation

update annotation

update annotation

--- UartOscilloscope/Form1.cs
+++ UartOscilloscope/Form1.cs
@@ -1135,8 +1135,8 @@
 		public static Queue<int> Data_Graphic_Queue_Y;                          //  宣告Y通道資料繪圖用整數型態佇列Data_Graphic_Queue_Y
 		public static Queue<int> Data_Graphic_Queue_Z;                          //  宣告Z通道資料繪圖用整數型態佇列Data_Graphic_Queue_Z
 	}                                                                           //  結束Oscilloscope_function_variable類別
-	public class ErrorCode_message                                             //  宣告ErrorCode_message類別
-	{                                                                           //  進入ErrorCode_message類別
+	public class ErrorCode_message												//	宣告ErrorCode_message類別
+	{																			//	進入ErrorCode_message類別
 		private struct Error_message_struct                                     //  宣告Error_message_struct結構
 		{
 			public string Error_Message;                                        //  宣告Error_Message(錯誤訊息)字串
@@ -1203,7 +1203,7 @@
 					break;
 			}                                                                   //  結束switch敘述
 		}                                                                       //  結束Error_Message_Show副程式
-	}                                                                           //  結束ErrorCode_message類別
+	}																			//	結束ErrorCode_message類別
 	//-----例外狀況處理-----
 	public class IOException : SystemException
 	{


Fixed external diff path.

Fixed external diff path.

--- Versionr/Commands/Diff.cs
+++ Versionr/Commands/Diff.cs
@@ -1,5 +1,6 @@
 using System;
 using System.Collections.Generic;
+using System.IO;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
@@ -137,7 +138,7 @@
                                     bool nonblocking = Workspace.Directives.NonBlockingDiff.HasValue && Workspace.Directives.NonBlockingDiff.Value;
                                     var t = Utilities.LimitedTaskDispatcher.Factory.StartNew(() =>
                                     {
-                                        var diffResult = Utilities.DiffTool.Diff(tmp, x.Name + "-base", Workspace.GetLocalCanonicalName(x.VersionControlRecord), x.Name, ws.Directives.ExternalDiff, nonblocking);
+                                        var diffResult = Utilities.DiffTool.Diff(tmp, x.Name + "-base", Path.Combine(Workspace.RootDirectory.FullName, Workspace.GetLocalCanonicalName(x.VersionControlRecord)), x.Name, ws.Directives.ExternalDiff, nonblocking);
                                         if (diffResult != null)
                                         {
                                             lock (diffProcesses)


Fix nth selectors with negative factor

Fix nth selectors with negative factor

--- XamlCSS/NthMatcherBase.cs
+++ XamlCSS/NthMatcherBase.cs
@@ -5,7 +5,7 @@
 {
     public abstract class NthMatcherBase : SelectorMatcher
     {
-        private static Regex nthRegex = new Regex(@"((?<factor>[0-9]+)?(?<n>n))?(?<distance>([\+\-]?[0-9]+))?");
+        private static Regex nthRegex = new Regex(@"((?<factor>[\-0-9]+)?(?<n>n))?(?<distance>([\+\-]?[0-9]+))?");

         protected int factor;
         protected int distance;
@@ -24,9 +24,21 @@
         {
             thisPosition = thisPosition - distance;

-            if (thisPosition < 0)
+            if (factor >= 0)
             {
-                return false;
+                if (thisPosition < 0)
+                {
+                    return false;
+                }
+            }
+            else
+            {
+                if (thisPosition > 0)
+                {
+                    return false;
+                }
+                thisPosition *= -1;
+                factor *= -1;
             }

             return (factor != 0 ? thisPosition % factor : thisPosition) == 0;
@@ -55,7 +67,15 @@
             {
                 var matchResult = nthRegex.Match(expression);

-                int.TryParse(matchResult.Groups["factor"]?.Value ?? "", out factor);
+                if (matchResult.Groups["factor"]?.Value == "-")
+                {
+                    factor = -1;
+                }
+                else
+                {
+                    int.TryParse(matchResult.Groups["factor"]?.Value ?? "", out factor);
+                }
+
                 int.TryParse(matchResult.Groups["distance"]?.Value ?? "", out distance);

                 if (factor == 0 &&


CA-109243: Offer to license a host when joining a pool that is licensed
with a per-socket licence (minor code refactoring).

Signed-off-by: Mihaela Stoica <be95049f8e30d921fc7e2579c00c48bd84c40606@citrix.com>

--- XenModel/PoolJoinRules.cs
+++ XenModel/PoolJoinRules.cs
@@ -391,13 +391,8 @@
                 return false;

             // Is using per socket generation licenses?
-            if (Helpers.ClearwaterOrGreater(slave) && Helpers.ClearwaterOrGreater(master) &&
-                slave.IsFreeLicense() && !master.IsFreeLicense())
-            {
-                if (allowLicenseUpgrade)
-                    return false;
-                return true;
-            }
+            if (Helpers.ClearwaterOrGreater(slave) && Helpers.ClearwaterOrGreater(master))
+                return slave.IsFreeLicense() && !master.IsFreeLicense() && !allowLicenseUpgrade;

             if (slave.IsFloodgateOrLater() && master.IsFloodgateOrLater() &&
                 Host.RestrictHAFloodgate(slave) && !Host.RestrictHAFloodgate(master))


fix serializing of enu,ms

fix serializing of enu,ms

--- Tests.Integration.Presentation.Web/Tools/AdviceHelper.cs
+++ Tests.Integration.Presentation.Web/Tools/AdviceHelper.cs
@@ -12,18 +12,23 @@
         {
             var cookie = optionalLogin ?? await HttpApi.GetCookieAsync(OrganizationRole.GlobalAdmin);

-            var recipients = advice.Reciepients.Select(x => new { Name = x.Name, RecpientType = x.RecpientType.ToString(), RecieverType = x.RecieverType.ToString() });
+            var recipients = advice.Reciepients.Select(x => new
+            {
+                Name = x.Name,
+                RecpientType = x.RecpientType.ToString(),
+                RecieverType = x.RecieverType.ToString()
+            }).ToList();

             var body = new
             {
                 RelationId = advice.RelationId,
-                Type = advice.Type,
+                Type = advice.Type.ToString(),
                 Scheduling = advice.Scheduling?.ToString(),
                 Subject = advice.Subject,
                 Body = advice.Body,
                 AlarmDate = advice.AlarmDate?.ToString(HttpApi.OdataDateTimeFormat),
                 Reciepients = recipients,
-                AdviceType = advice.AdviceType.ToString(),
+                AdviceType = advice.AdviceType.ToString("D"),
                 StopDate = advice.StopDate?.ToString(HttpApi.OdataDateTimeFormat)
             };


Added test for loading and storing three byte structs

--- Tests/Kernels/Cosmos.Compiler.Tests.TypeSystem/Kernel.cs
+++ Tests/Kernels/Cosmos.Compiler.Tests.TypeSystem/Kernel.cs
@@ -38,6 +38,13 @@
                 Assert.IsTrue(xEnumerable is IEnumerable, "isinst isn't working for interfaces on generic reference types!");
                 Assert.IsTrue(xEnumerable is IList<string>, "isinst isn't working for generic interfaces on generic reference types!");

+                ThreeBytes[] array = new ThreeBytes[1];
+                array[0] = new ThreeBytes(17, 254, 77);
+                Assert.AreEqual(array[0].A, 17, "Three byte struct in array first value read correctly");
+                Assert.AreEqual(array[0].B, 254, "Three byte struct in array second value read correctly");
+                var local = array[0];
+                Assert.AreEqual(local.C, 77, "Three byte struct third value read correctly");
+
                 TestController.Completed();
             }
             catch (Exception e)
@@ -52,4 +59,18 @@
             }
         }
     }
+
+    public struct ThreeBytes
+    {
+        public byte A;
+        public byte B;
+        public byte C;
+
+        public ThreeBytes(byte a, byte b, byte c)
+        {
+            A = a;
+            B = b;
+            C = c;
+        }
+    }
 }


Fix AppShell Setup

Fix AppShell Setup

--- samples/AppStudio.Uwp.Samples/AppShell.xaml.cs
+++ samples/AppStudio.Uwp.Samples/AppShell.xaml.cs
@@ -46,11 +46,11 @@
                 yield return new NavigationItem(Symbol.Home, this.GetResourceString("ShellMenuHome"), (ni) => NavigationService.NavigateToRoot()) { ClearSelection = true };
                 yield return NavigationItem.Separator;

-                yield return new NavigationItem(new Uri("ms-appx:///Assets/Icons/IconLayouts.png"), this.GetResourceString("ShellMenuLayoutControls"), GetControlsByCategory("LayoutControls"), this.GetCategoryBackground("LayoutControls"));
-                yield return new NavigationItem(new Uri("ms-appx:///Assets/Icons/IconFoundation.png"), this.GetResourceString("ShellMenuFoundationControls"), GetControlsByCategory("FoundationControls"), this.GetCategoryBackground("FoundationControls"));
-                yield return new NavigationItem(new Uri("ms-appx:///Assets/Icons/IconAppServices.png"), this.GetResourceString("ShellMenuAppServices"), GetControlsByCategory("AppServices"), this.GetCategoryBackground("AppServices"));
-                yield return new NavigationItem(new Uri("ms-appx:///Assets/Icons/IconUtilities.png"), this.GetResourceString("ShellMenuUtilities"), GetControlsByCategory("Utilities"), this.GetCategoryBackground("Utilities"));
-                yield return new NavigationItem(new Uri("ms-appx:///Assets/Icons/IconDataProviders.png"), this.GetResourceString("ShellMenuDataProviders"), GetControlsByCategory("DataProviders"), this.GetCategoryBackground("DataProviders"));
+                yield return new NavigationItem(new Uri("ms-appx:///Assets/Icons/IconLayouts.png"), this.GetResourceString("ShellMenuLayoutControls"), GetControlsByCategory("LayoutControls"), this.GetCategoryBackground("LayoutControls"), this.GetCategoryBackground("LayoutControls"));
+                yield return new NavigationItem(new Uri("ms-appx:///Assets/Icons/IconFoundation.png"), this.GetResourceString("ShellMenuFoundationControls"), GetControlsByCategory("FoundationControls"), this.GetCategoryBackground("FoundationControls"), this.GetCategoryBackground("FoundationControls"));
+                yield return new NavigationItem(new Uri("ms-appx:///Assets/Icons/IconAppServices.png"), this.GetResourceString("ShellMenuAppServices"), GetControlsByCategory("AppServices"), this.GetCategoryBackground("AppServices"), this.GetCategoryBackground("AppServices"));
+                yield return new NavigationItem(new Uri("ms-appx:///Assets/Icons/IconUtilities.png"), this.GetResourceString("ShellMenuUtilities"), GetControlsByCategory("Utilities"), this.GetCategoryBackground("Utilities"), this.GetCategoryBackground("Utilities"));
+                yield return new NavigationItem(new Uri("ms-appx:///Assets/Icons/IconDataProviders.png"), this.GetResourceString("ShellMenuDataProviders"), GetControlsByCategory("DataProviders"), this.GetCategoryBackground("DataProviders"), this.GetCategoryBackground("DataProviders"));

                 yield return NavigationItem.Separator;
                 yield return new NavigationItem(new Uri("ms-appx:///Assets/Icons/about.png"), "About", new About()) { ClearSelection = true };


Remove extra paranthese that probably came from outer space

--- sar-opal-base/Assets/scripts/GestureManager.cs
+++ sar-opal-base/Assets/scripts/GestureManager.cs
@@ -234,7 +234,7 @@
             {
                 // Send the highlight to the position of the dragged object so it
                 // shows up in the right place.
-                LightOn(1, this.mostRecentlyDraggedGO.transform.position));
+                LightOn(1, this.mostRecentlyDraggedGO.transform.position);

                 if (this.mostRecentlyDraggedGO.transform.position.x
                         < this.cameraRect.xMin


Remove usage of dynamic in command bus

Remove usage of dynamic in command bus

--- Source/EventFlow/CommandBus.cs
+++ Source/EventFlow/CommandBus.cs
@@ -138,9 +138,8 @@
                 command.SourceId,
                 async (a, c) =>
                     {
-                        var task = commandExecutionDetails.Invoker(commandHandler, a, command, c);
-                        await task.ConfigureAwait(false);
-                        return (TResult) ((dynamic) task).Result;
+                        var task = (Task<TResult>) commandExecutionDetails.Invoker(commandHandler, a, command, c);
+                        return await task.ConfigureAwait(false);
                     },
                 cancellationToken)
                 .ConfigureAwait(false);


More info can be found in vents_c now, stop crashing for now vr/vr_command_room.vpk in dota forced this

--- ValveResourceFormat/Resource/ResourceTypes/EntityLump.cs
+++ ValveResourceFormat/Resource/ResourceTypes/EntityLump.cs
@@ -36,11 +36,16 @@
                 {
                     var a = dataReader.ReadUInt32(); // always 1?
                     var valuesCount = dataReader.ReadUInt32();
-                    var c = dataReader.ReadUInt32(); // always 0?
+                    var c = dataReader.ReadUInt32(); // always 0? (Its been seen to be 1, footer count?)

                     var values = new List<Tuple<uint, uint, object>>();
                     while (dataStream.Position != dataStream.Length)
                     {
+                        if (values.Count == valuesCount)
+                        {
+                            Console.WriteLine("We hit our values target without reading every byte?!");
+                            break;
+                        }
                         var miscType = dataReader.ReadUInt32(); //Stuff before type, some pointer?
                         var type = dataReader.ReadUInt32();
                         switch (type)


Added support for enclosing strings in spaces

--- Source/Parser/CommandParser.cs
+++ Source/Parser/CommandParser.cs
@@ -2,6 +2,7 @@
 using System.Collections.Generic;
 using System.Linq;
 using System.Text;
+using System.Text.RegularExpressions;

 namespace Pyratron.Frameworks.Commands.Parser
 {
@@ -129,8 +130,11 @@
                 return;

             //Now we are ready to go
-            //Split the string into command
-            var inputArgs = input.Split(' ').ToList();
+            //Split the string into command, ignoring spaces between quotes
+            var inputArgs = Regex.Matches(input, @"[\""].+?[\""]|[^ ]+")
+                .Cast<Match>()
+                .Select(m => m.Value)
+                .ToList();

             //Search the commands for a matching comArgs
             var commands = Commands.Where(cmd => cmd.Aliases.Any(alias => alias.Equals(inputArgs[0])));


Refactored WWCP AuthenticationMode

Refactored WWCP AuthenticationMode

--- WWCP_Core/Entities/ChargingStation/AuthenticationMode.cs
+++ WWCP_Core/Entities/ChargingStation/AuthenticationMode.cs
@@ -39,7 +39,9 @@

     }

-    public class AuthenticationMode
+    public class AuthenticationMode : IEquatable<AuthenticationMode>,
+                                      IComparable<AuthenticationMode>,
+                                      IComparable
     {

         #region Properties
@@ -144,11 +146,118 @@
         }

+
+
+
+        #region IComparable<AuthenticationMode> Members
+
+        #region CompareTo(Object)
+
+        /// <summary>
+        /// Compares two instances of this object.
+        /// </summary>
+        /// <param name="Object">An object to compare with.</param>
+        public Int32 CompareTo(Object Object)
+        {
+
+            if (Object == null)
+                throw new ArgumentNullException("The given object must not be null!");
+
+            // Check if the given object is an authentication mode.
+            var AuthenticationMode = Object as AuthenticationMode;
+            if ((Object) AuthenticationMode == null)
+                throw new ArgumentException("The given object is not an authentication mode!");
+
+            return CompareTo(AuthenticationMode);
+
+        }
+
+        #endregion
+
+        #region CompareTo(AuthenticationMode)
+
+        /// <summary>
+        /// Compares two instances of this object.
+        /// </summary>
+        /// <param name="AuthenticationMode">An authentication mode to compare with.</param>
+        public Int32 CompareTo(AuthenticationMode AuthenticationMode)
+        {
+
+            if ((Object) AuthenticationMode == null)
+                throw new ArgumentNullException("The given authentication mode must not be null!");
+
+            return _Type.CompareTo(AuthenticationMode._Type);
+
+        }
+
+        #endregion
+
+        #endregion
+
+        #region IEquatable<AuthenticationMode> Members
+
+        #region Equals(Object)
+
+        /// <summary>
+        /// Compares two instances of this object.
+        /// </summary>
+        /// <param name="Object">An object to compare with.</param>
+        /// <returns>true|false</returns>
+        public override Boolean Equals(Object Object)
+        {
+
+            if (Object == null)
+                return false;
+
+            // Check if the given object is an authentication mode.
+            var AuthenticationMode = Object as AuthenticationMode;
+            if ((Object) AuthenticationMode == null)
+                return false;
+
+            return this.Equals(AuthenticationMode);
+
+        }
+
+        #endregion
+
+        #region Equals(AuthenticationMode)
+
+        /// <summary>
+        /// Compares two EVSEs for equality.
+        /// </summary>
+        /// <param name="AuthenticationMode">An authentication mode to compare with.</param>
+        /// <returns>True if both match; False otherwise.</returns>
+        public Boolean Equals(AuthenticationMode AuthenticationMode)
+        {
+
+            if ((Object) AuthenticationMode == null)
+                return false;
+
+            return _Type.Equals(AuthenticationMode._Type);
+
+        }
+
+        #endregion
+
+        #endregion
+
+        #region GetHashCode()
+
+        /// <summary>
+        /// Get the hashcode of this object.
+        /// </summary>
+        public override Int32 GetHashCode()
+        {
+            return _Type.GetHashCode();
+        }
+
+        #endregion
+
+
         public virtual JObject ToJSON()
         {
             return new JObject(new JProperty("Type", _Type));
         }
-

         public override String ToString()
         {


Rename

Rename

--- WalletWasabi.Fluent/ViewModels/NavBar/NavBarViewModel.cs
+++ WalletWasabi.Fluent/ViewModels/NavBar/NavBarViewModel.cs
@@ -49,7 +49,7 @@

 			this.WhenAnyValue(x => x.SelectedItem)
 				.OfType<NavBarItemViewModel>()
-				.Subscribe(NavigateToItem);
+				.Subscribe(NavigateItem);

 			Observable.FromEventPattern(Router.NavigationStack, nameof(Router.NavigationStack.CollectionChanged))
 				.ObserveOn(RxApp.MainThreadScheduler)
@@ -165,7 +165,7 @@
 			}
 		}

-		private void NavigateToItem(NavBarItemViewModel item)
+		private void NavigateItem(NavBarItemViewModel item)
 		{
 			if (!_isNavigating)
 			{


Check the content type of response

Check the content type of response

--- WalletWasabi/Extensions/HttpResponseMessageExtensions.cs
+++ WalletWasabi/Extensions/HttpResponseMessageExtensions.cs
@@ -90,7 +90,10 @@
 			string error = null;
 			try
 			{
-				error = await me.Content.ReadAsJsonAsync<string>().ConfigureAwait(false);
+				if (me.Content.Headers?.ContentType?.MediaType != "text/html")
+				{
+					error = await me.Content.ReadAsJsonAsync<string>().ConfigureAwait(false);
+				}
 			}
 			catch (Exception ex)
 			{


remove second winners action

remove second winners action

--- Web/Areas/Procurement/Controllers/FetchDataController.cs
+++ Web/Areas/Procurement/Controllers/FetchDataController.cs
@@ -177,14 +177,7 @@
             return Json(groupedwinners, JsonRequestBehavior.AllowGet);
         }

-        public JsonResult SecondWinners([DataSourceRequest]DataSourceRequest request)
-        {
-            var recentBids =
-                _bidService.FindBy(t => t.StatusID == 5).OrderByDescending(t => t.OpeningDate).Take(10).ToList();
-            var recentBidViewModels = BindBidViewModels(recentBids);
-            return Json(recentBidViewModels, JsonRequestBehavior.AllowGet);
-        }
-
+
         public JsonResult Woredaswithoutoffer([DataSourceRequest]DataSourceRequest request)
         {
             var recentBids =


[Shared] Fix max speed being unset.

[Shared] Fix max speed being unset.

--- XamarinApp/MyTrips/MyTrips/ViewModel/ProfileViewModel.cs
+++ XamarinApp/MyTrips/MyTrips/ViewModel/ProfileViewModel.cs
@@ -56,6 +56,7 @@
                     TotalTime = currentUser.TotalTime;
                     TotalTrips = currentUser.TotalTrips;
                     FuelUsed = currentUser.FuelConsumption;
+					MaxSpeed = currentUser.MaxSpeed;
 #if DEBUG
                     DrivingSkills = 86;
 #else
@@ -108,7 +109,7 @@

         public double DistanceConverted => (Settings.Current.MetricDistance ? (TotalDistance * 1.60934) : TotalDistance);

-        public string SpeedUnits => Settings.MetricUnits ? "km/h" : "mph";
+		public string SpeedUnits => Settings.MetricDistance ? "km/h" : "mph";

         public double MaxSpeedConverted => Settings.MetricDistance ? MaxSpeed : MaxSpeed * 0.621371;


Fix for PR

Fix for PR

--- Assets/MixedRealityToolkit/Utilities/CoreServices.cs
+++ Assets/MixedRealityToolkit/Utilities/CoreServices.cs
@@ -138,10 +138,9 @@
             else
             {
                 T service;
-                MixedRealityServiceRegistry.TryGetService<T>(out service);
-                if (service == null)
+                if (!MixedRealityServiceRegistry.TryGetService(out service))
                 {
-                    return service;
+                    return default(T);
                 }

                 serviceCache.Add(typeof(T), service as IMixedRealityService);


Fix cart table widths

Fix cart table widths

--- BTCPayServer/Views/AppsPublic/ViewPointOfSale.cshtml
+++ BTCPayServer/Views/AppsPublic/ViewPointOfSale.cshtml
@@ -40,11 +40,11 @@


expanded try block in FetchProfile

expanded try block in FetchProfile

--- StatsFetcher/ProfileFetcher.cs
+++ StatsFetcher/ProfileFetcher.cs
@@ -50,11 +50,11 @@

         private async Task FetchBasicProfile(PlayerProfile p)
         {
-            var url = $"https://www.hotslogs.com/API/Players/{(int)game.Region}/{p.BattleTag.Replace('#', '_')}?utm_source=HotsStats&utm_medium=api";
-            var str = await web.GetStringAsync(url);
-            if (string.IsNullOrWhiteSpace(str) || str == "null")
-                return;
             try {
+                var url = $"https://www.hotslogs.com/API/Players/{(int)game.Region}/{p.BattleTag.Replace('#', '_')}?utm_source=HotsStats&utm_medium=api";
+                var str = await web.GetStringAsync(url);
+                if (string.IsNullOrWhiteSpace(str) || str == "null")
+                    return;
                 dynamic json = JObject.Parse(str);
                 p.HotslogsId = json.PlayerID;
                 foreach (var r in json.LeaderboardRankings) {