make BatchedConsumer commit the next fetch offset instead of last offset

--- src/Kafka.Basic/BatchedConsumer.cs
+++ src/Kafka.Basic/BatchedConsumer.cs
@@ -111,7 +111,7 @@

                                 var map = messages
                                     .GroupBy(m => m.Partition)
-                                    .ToDictionary(kvp => kvp.Key, kvp => kvp.Max(m => m.Offset));
+                                    .ToDictionary(kvp => kvp.Key, kvp => kvp.Max(m => m.Offset + 1));

                                 foreach (var kvp in map)
                                     _instance?.Commit(_topic, kvp.Key, kvp.Value);


Add hint text to text box

Add hint text to text box

--- src/Myra/Graphics2D/UI/TextBox.cs
+++ src/Myra/Graphics2D/UI/TextBox.cs
@@ -35,6 +35,7 @@
 		private Point _internalScrolling = Point.Zero;
 		private bool _suppressRedoStackReset = false;
 		private string _text;
+		private string _hintText;
 		private bool _passwordField;
 		private bool _isTouchDown;

@@ -67,9 +68,33 @@
 			set
 			{
 				SetText(value, false);
-			}
-		}
-
+				DisableHintText();
+			}
+		}
+
+		[Category("Appearance")]
+		[DefaultValue(null)]
+		public string HintText
+		{
+			get
+			{
+				return _hintText;
+			}
+			set
+			{
+				_hintText = value;
+
+				if (_text == null)
+				{
+					EnableHintText();
+				}
+			}
+		}
+
+		[Browsable(false)]
+		[XmlIgnore]
+		public bool HintTextEnabled { get; set; }
+
 		[Category("Behavior")]
 		[DefaultValue(false)]
 		public bool Multiline
@@ -927,12 +952,41 @@
 			if (string.IsNullOrEmpty(_text))
 			{
 				_formattedText.Text = _text;
-				return;
-			}
-
+				EnableHintText();
+				return;
+			}
+
+			DisableHintText();
 			_formattedText.Text = PasswordField ? new string('*', _text.Length) : _text;
 		}

+		private void DisableHintText()
+		{
+			if (_hintText == null)
+			{
+				return;
+			}
+
+			_formattedText.Text = _text;
+			HintTextEnabled = false;
+		}
+
+		private void EnableHintText()
+		{
+			if (ShouldEnableHintText())
+			{
+				_formattedText.Text = _hintText;
+				HintTextEnabled = true;
+			}
+		}
+
+		private bool ShouldEnableHintText()
+		{
+			return _hintText != null &&
+			       string.IsNullOrEmpty(_text)
+			       && !IsKeyboardFocused;
+		}
+
 		private void UpdateScrolling()
 		{
 			var p = GetRenderPositionByIndex(CursorPosition);
@@ -1177,6 +1231,15 @@

 			_lastBlinkStamp = DateTime.Now;
 			_cursorOn = true;
+
+			DisableHintText();
+		}
+
+		public override void OnLostKeyboardFocus()
+		{
+			base.OnLostKeyboardFocus();
+
+			EnableHintText();
 		}

 		private Point GetRenderPositionByIndex(int index)
@@ -1288,7 +1351,12 @@
 			RenderSelection(context);

 			var textColor = TextColor;
-			if (!Enabled && DisabledTextColor != null)
+			var opacity = context.Opacity;
+
+			if (HintTextEnabled)
+			{
+				opacity *= 0.5f;
+			} else if (!Enabled && DisabledTextColor != null)
 			{
 				textColor = DisabledTextColor.Value;
 			}
@@ -1303,7 +1371,7 @@
 			var p = new Point(centeredBounds.Location.X - _internalScrolling.X,
 				centeredBounds.Location.Y - _internalScrolling.Y);

-			_formattedText.Draw(context.Batch, TextAlign.Left, bounds, context.View, textColor, false, context.Opacity);
+			_formattedText.Draw(context.Batch, TextAlign.Left, bounds, context.View, textColor, false, opacity);

 			if (!IsKeyboardFocused)
 			{


Altered logic in Get to work with MySQL's faulty GetBytes

SVN: 488784591515bd4cdaa016be4ec9b172dc4e7caf@1462

--- src/NHibernate/Type/BinaryType.cs
+++ src/NHibernate/Type/BinaryType.cs
@@ -68,15 +68,15 @@
 				{
 					while( true )
 					{
-						long amountRead = rs.GetBytes( index, fieldOffset, buffer, 0, 2048 );
+						long amountRead = rs.GetBytes( index, fieldOffset, buffer, 0, buffer.Length );

-						if( amountRead == 0 )
+						fieldOffset += amountRead;
+						outputStream.Write( buffer, 0, ( int ) amountRead );
+
+						if( amountRead < buffer.Length )
 						{
 							break;
 						}
-
-						fieldOffset += amountRead;
-						outputStream.Write( buffer, 0, ( int ) amountRead );
 					}
 					outputStream.Close();
 				}


evaluated arguments are now used for nuget fallback download

--- src/Paket.Bootstrapper/Program.cs
+++ src/Paket.Bootstrapper/Program.cs
@@ -2,6 +2,7 @@
 using System.Diagnostics;
 using System.IO;
 using System.IO.Compression;
+using System.Linq;
 using System.Net;
 using System.Reflection;

@@ -28,11 +29,11 @@
         {
             var folder = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
             var target = Path.Combine(folder, "paket.exe");
-
+            var latestVersion = "";
+            var ignorePrerelease = true;
+
             try
-            {   var latestVersion = "";
-                var ignorePrerelease = true;
-
+            {
                 if (args.Length >= 1)
                 {
                     if (args[0] == "prerelease")
@@ -123,7 +124,7 @@
                 if (!File.Exists(target))
                 {
                     Console.WriteLine("Github download failed. Try downloading Paket directly from 'nuget.org'.");
-                    NugetAlternativeDownload(folder, target);
+                    NugetAlternativeDownload(folder, target, latestVersion, ignorePrerelease);
                 }
             }
             catch (Exception exn)
@@ -134,21 +135,41 @@
             }
         }

-        private static void NugetAlternativeDownload(string folder, string target)
+        private static void NugetAlternativeDownload(string folder, string target, string latestVersion, bool ignorePrereleases)
         {
             try
             {
                 using (WebClient client = new WebClient())
                 {
-                    var getLatestFromNugetUrl = "https://www.nuget.org/api/v2/package/Paket";
+                    const string getLatestFromNugetUrl = "https://www.nuget.org/api/v2/package/Paket";
+                    const string getVersionsFromNugetUrl = "https://www.nuget.org/api/v2/package-versions/Paket?includePrereleases=true";
+                    const string getSpecificFromNugetUrlTemplate = "https://www.nuget.org/api/v2/package/Paket/{0}";
+                    const string paketNupkgFile = "paket.latest.nupkg";
+                    const string paketNupkgFileTemplate = "paket.{0}.nupkg";
+
                     var paketDownloadUrl = getLatestFromNugetUrl;
-                    var paketNupkgFile = "paket.latest.nupkg";
-
-                    PrepareWebClient(client, paketDownloadUrl);
+                    var paketFile = paketNupkgFile;
+                    if (latestVersion == "" && !ignorePrereleases)
+                    {
+                        PrepareWebClient(client, getVersionsFromNugetUrl);
+                        var versions = client.DownloadString(getVersionsFromNugetUrl);
+                        latestVersion = versions.
+                                            Trim('[', ']').
+                                            Split(new[] {','}, StringSplitOptions.RemoveEmptyEntries).
+                                            Select(x => x.Trim('"')).
+                                            LastOrDefault(x => !String.IsNullOrWhiteSpace(x)) ?? String.Empty;
+                    }
+                    if (latestVersion != "")
+                    {
+                        paketDownloadUrl = String.Format(getSpecificFromNugetUrlTemplate, latestVersion);
+                        paketFile = String.Format(paketNupkgFileTemplate, latestVersion);
+                    }

                     var randomFullPath = Path.Combine(folder, Path.GetRandomFileName());
                     Directory.CreateDirectory(randomFullPath);
-                    var paketPackageFile = Path.Combine(randomFullPath, paketNupkgFile);
+                    var paketPackageFile = Path.Combine(randomFullPath, paketFile);
+                    Console.WriteLine("Starting download from {0}", paketDownloadUrl);
+                    PrepareWebClient(client, paketDownloadUrl);
                     client.DownloadFile(paketDownloadUrl, paketPackageFile);

                     ZipFile.ExtractToDirectory(paketPackageFile, randomFullPath);


Separate Action State in CCBAnimationManger internal classes

--- cocos2d/extentions/CCBReader/CCBAnimationManager.cs
+++ cocos2d/extentions/CCBReader/CCBAnimationManager.cs
@@ -515,7 +515,7 @@
                 if (_jsControlled)
                 {
                     string callbackName = string.Format("{0}:{1}", selectorTarget, selectorName);
-                    CCCallFunc callback = (CCCallFunc) _keyframeCallFuncs[callbackName].Copy();
+                    CCCallFunc callback = (CCCallFunc) _keyframeCallFuncs[callbackName];

                     if (callback != null)
                     {
@@ -598,7 +598,7 @@

                 gain = float.Parse(keyVal[3].GetStringValue());

-                actions.Add(CCBSoundEffect.ActionWithSoundFile(soundFile, pitch, pan, gain));
+				actions.Add(new CCBSoundEffect(soundFile, pitch, pan, gain));
             }

             if (actions.Count < 1) return null;
@@ -806,148 +806,170 @@

     public class CCBSetSpriteFrame : CCActionInstant
     {
-        private CCSpriteFrame _spriteFrame;
+		internal CCSpriteFrame SpriteFrame { get; set; }

         /** creates a Place action with a position */

-        public CCBSetSpriteFrame()
-        {
-        }
+//        public CCBSetSpriteFrame()
+//        {
+//        }

         public CCBSetSpriteFrame(CCSpriteFrame pSpriteFrame)
         {
-            InitWithSpriteFrame(pSpriteFrame);
-        }
-
-        protected virtual bool InitWithSpriteFrame(CCSpriteFrame pSpriteFrame)
-        {
-            _spriteFrame = pSpriteFrame;
-            return true;
-        }
-
-        public override void Update(float time)
-        {
-            ((CCSprite) m_pTarget).DisplayFrame = _spriteFrame;
-        }
-
-        public override object Copy(ICCCopyable pZone)
-        {
-            CCBSetSpriteFrame pRet;
-
-            if (pZone != null)
-            {
-                pRet = (CCBSetSpriteFrame) (pZone);
-            }
-            else
-            {
-                pRet = new CCBSetSpriteFrame();
-                pZone =  (pRet);
-            }
-
-            pRet.InitWithSpriteFrame(_spriteFrame);
-            base.Copy(pZone);
-            return pRet;
-        }
+
+			SpriteFrame = pSpriteFrame;
+        }
+
+		/// <summary>
+		/// Start the show operation on the given target.
+		/// </summary>
+		/// <param name="target"></param>
+		protected internal override CCActionState StartAction (CCNode target)
+		{
+			return new CCBSetSpriteFrameState (this, target);
+
+		}
+//        public override void Update(float time)
+//        {
+//			((CCSprite) m_pTarget).DisplayFrame = SpriteFrame;
+//        }
+//
+//        public override object Copy(ICCCopyable pZone)
+//        {
+//            CCBSetSpriteFrame pRet;
+//
+//            if (pZone != null)
+//            {
+//                pRet = (CCBSetSpriteFrame) (pZone);
+//            }
+//            else
+//            {
+//                pRet = new CCBSetSpriteFrame();
+//                pZone =  (pRet);
+//            }
+//
+//            pRet.InitWithSpriteFrame(S);
+//            base.Copy(pZone);
+//            return pRet;
+//        }

         public override CCFiniteTimeAction Reverse()
         {
-            return (CCFiniteTimeAction) this.Copy();
-        }
+            return this;
+        }
+
     }
+
+	internal class CCBSetSpriteFrameState : CCActionInstantState
+	{
+		private CCSpriteFrame SpriteFrame { get; set; }
+
+		public CCBSetSpriteFrameState (CCBSetSpriteFrame action, CCNode target)
+			: base(action, target)
+		{
+			SpriteFrame = action.SpriteFrame;
+		}
+
+		public override void Update(float time)
+		{
+			((CCSprite) Target).DisplayFrame = SpriteFrame;
+		}
+	}

     public class CCBSoundEffect : CCActionInstant
     {
-        public static CCBSoundEffect ActionWithSoundFile(string file, float pitch, float pan, float gain)
-        {
-            CCBSoundEffect pRet = new CCBSoundEffect();
-            pRet.InitWithSoundFile(file, pitch, pan, gain);
-            return pRet;
-        }
-
-        public bool InitWithSoundFile(string file, float pitch, float pan, float gain)
-        {
-            _soundFile = file;
-            _pitch = pitch;
-            _pan = pan;
-            _gain = gain;
-            return true;
-        }
-
-        // Overrides
-        public override void Update(float time)
-        {
-            CCSimpleAudioEngine.SharedEngine.PlayEffect(_soundFile);
-        }
-
-        public override object Copy(ICCCopyable pZone)
-        {
-            CCBSoundEffect pRet;
-
-            if (pZone != null)
-            {
-                pRet = (CCBSoundEffect)(pZone);
-            }
-            else
-            {
-                pRet = new CCBSoundEffect();
-                pZone = (pRet);
-            }
-
-            pRet.InitWithSoundFile(_soundFile, _pitch, _pan, _gain);
-            base.Copy(pZone);
-            return pRet;
-        }
+
+		public string SoundFile { get; private set; }
+		public float Pitch { get; private set; }
+		public float Pan { get; private set; }
+		public float Gain { get; private set; }
+
+		public CCBSoundEffect (string file, float pitch, float pan, float gain)
+        {
+            SoundFile = file;
+            Pitch = pitch;
+            Pan = pan;
+            Gain = gain;
+        }
+
+		/// <summary>
+		/// Start the CCBRotateTo operation on the given target.
+		/// </summary>
+		/// <param name="target"></param>
+		protected internal override CCActionState StartAction (CCNode target)
+		{
+			return new CCBSoundEffectState (this, target);
+
+		}
+
+		// Tempory work property to be taken out after we have separated out the state.
+		// This shoud be overridden in all classes that have been separated
+		public override bool HasState
+		{
+			get { return true; }
+		}

         public override CCFiniteTimeAction Reverse()
         {
-            return (CCFiniteTimeAction) this.Copy();
-        }
-
-        private string _soundFile;
-        private float _pitch, _pan, _gain;
+            return this;
+        }
+
+		private class CCBSoundEffectState : CCActionInstantState
+		{
+			protected string SoundFile { get; set; }
+			protected float Pitch { get; set; }
+			protected float Pan { get; set; }
+			protected float Gain { get; set; }
+
+			public CCBSoundEffectState (CCBSoundEffect action, CCNode target)
+				: base(action, target)
+			{
+				SoundFile = action.SoundFile;
+				Pitch = action.Pitch;
+				Pan = action.Pan;
+				Gain = action.Gain;
+			}
+
+			public override void Update(float time)
+			{
+				CCSimpleAudioEngine.SharedEngine.PlayEffect(SoundFile);
+			}
+
+		}
+
+
     }

     public class CCBRotateTo : CCActionInterval
     {
-        private float _diffAngle;
-        private float _dstAngle;
-        private float _startAngle;
-
+		internal float DstAngle { get; private set; }

         #region Constructors

-        public CCBRotateTo()
-        {
-        }
-
         public CCBRotateTo(float fDuration, float fAngle) : base(fDuration)
         {
-            InitCCBRotateTo(fAngle);
-        }
-
-        // Perform deep copy of CCBRotateTo
-        public CCBRotateTo(CCBRotateTo rotateTo) : base(rotateTo)
-        {
-            InitCCBRotateTo(rotateTo._dstAngle);
-        }
-
-        private void InitCCBRotateTo(float fAngle)
-        {
-            _dstAngle = fAngle;
+            DstAngle = fAngle;
         }

         #endregion Constructors

-
-        public override void Update(float time)
-        {
-            m_pTarget.Rotation = _startAngle + (_diffAngle * time);
-        }
-
-        public override object Copy(ICCCopyable pZone)
-        {
-            return new CCBRotateTo(this);
-        }
+		/// <summary>
+		/// Start the CCBRotateTo operation on the given target.
+		/// </summary>
+		/// <param name="target"></param>
+		protected internal override CCActionState StartAction (CCNode target)
+		{
+			return new CCBRotateToState (this, target);
+
+		}
+
+		// Tempory work property to be taken out after we have separated out the state.
+		// This shoud be overridden in all classes that have been separated
+		public override bool HasState
+		{
+			get { return true; }
+		}
+

         public override CCFiniteTimeAction Reverse()
         {
@@ -955,114 +977,121 @@
             return null;
         }

-        protected internal override void StartWithTarget(CCNode node)
-        {
-            base.StartWithTarget(node);
-            _startAngle = m_pTarget.Rotation;
-            _diffAngle = _dstAngle - _startAngle;
-        }
+		private class CCBRotateToState : CCActionIntervalState
+		{
+			private float DstAngle { get; set; }
+			private float diffAngle;
+			private float startAngle;
+
+			public CCBRotateToState (CCBRotateTo action, CCNode target)
+				: base(action, target)
+			{
+				DstAngle = action.DstAngle;
+				startAngle = Target.Rotation;
+				diffAngle = DstAngle - startAngle;
+			}
+
+			public override void Update(float time)
+			{
+				Target.Rotation = startAngle + (diffAngle * time);
+			}
+
+		}
+
     }
+

     public class CCBRotateXTo : CCActionInterval
     {
+
+		internal float DstAngle { get; set; }
+
         #region Constructors

-        public CCBRotateXTo()
-        {
-        }

         public CCBRotateXTo(float fDuration, float fAngle) : base(fDuration)
         {
-            InitCCBRotateXTo(fAngle);
-        }
-
-        // Perform deep copy of CCBRotateXTo
-        public CCBRotateXTo(CCBRotateXTo rotateXTo) : base(rotateXTo)
-        {
-            InitCCBRotateXTo(rotateXTo._dstAngle);
-        }
-
-        private void InitCCBRotateXTo(float fAngle)
-        {
-            _dstAngle = fAngle;
+			DstAngle = fAngle;
         }

         #endregion Constructors

-
-        // Overrides
-        protected internal override void StartWithTarget(CCNode target)
-        {
-            m_pOriginalTarget = target;
-            m_pTarget = target;
-            m_elapsed = 0.0f;
-            m_bFirstTick = true;
-            _startAngle = m_pTarget.RotationX;
-            _diffAngle = _dstAngle - _startAngle;
-        }
-
-        public override object Copy(ICCCopyable pZone)
-        {
-            return new CCBRotateXTo(this);
-        }
-
-        public override CCFiniteTimeAction Reverse()
-        {
-            Debug.Assert(false, "reverse() is not supported in CCBRotateXTo");
-            return null;
-        }
-
-        public override void Update(float time)
-        {
-            m_pTarget.RotationX = _startAngle + (_diffAngle * time);
-        }
-
-        private float _startAngle;
-        private float _dstAngle;
-        private float _diffAngle;
+		/// <summary>
+		/// Start the CCBRotateXTo operation on the given target.
+		/// </summary>
+		/// <param name="target"></param>
+		protected internal override CCActionState StartAction (CCNode target)
+		{
+			return new CCBRotateXToState (this, target);
+
+		}
+
+		// Tempory work property to be taken out after we have separated out the state.
+		// This shoud be overridden in all classes that have been separated
+		public override bool HasState
+		{
+			get { return true; }
+		}
+
+
+		public override CCFiniteTimeAction Reverse()
+		{
+			Debug.Assert(false, "reverse() is not supported in CCBRotateTo");
+			return null;
+		}
+
+		private class CCBRotateXToState : CCActionIntervalState
+		{
+			private float DstAngle { get; set; }
+			private float diffAngle;
+			private float startAngle;
+
+			public CCBRotateXToState (CCBRotateXTo action, CCNode target)
+				: base(action, target)
+			{
+				DstAngle = action.DstAngle;
+	            startAngle = Target.RotationX;
+				diffAngle = DstAngle - startAngle;
+			}
+
+			public override void Update(float time)
+			{
+				Target.RotationX = startAngle + (diffAngle * time);
+			}
+		}
+
     }

     public class CCBRotateYTo : CCActionInterval
     {
+
+		internal float DstAngle { get; set; }
+
         #region Constructors

-        public CCBRotateYTo()
-        {
-        }
-
         public CCBRotateYTo(float fDuration, float fAngle) : base(fDuration)
         {
-            InitCCBRotateYTo(fAngle);
-        }
-
-        public CCBRotateYTo(CCBRotateYTo rotateYTo) : base(rotateYTo)
-        {
-            InitCCBRotateYTo(rotateYTo._dstAngle);
-        }
-
-        private void InitCCBRotateYTo(float fAngle)
-        {
-            _dstAngle = fAngle;
+			DstAngle = fAngle;
         }

         #endregion Constructors

-
-        // Overrides
-        protected internal override void StartWithTarget(CCNode target)
-        {
-            m_pOriginalTarget = target;
-            m_pTarget = target;
-            m_elapsed = 0.0f;
-            m_bFirstTick = true;
-            _startAngle = m_pTarget.RotationY;
-            _diffAngle = _dstAngle - _startAngle;
-        }
-
-        public override object Copy(ICCCopyable pZone)
-        {
-            return new CCBRotateYTo(this);
-        }
+		/// <summary>
+		/// Start the CCBRotateYTo operation on the given target.
+		/// </summary>
+		/// <param name="target"></param>
+		protected internal override CCActionState StartAction (CCNode target)
+		{
+			return new CCBRotateYToState (this, target);
+
+		}
+
+		// Tempory work property to be taken out after we have separated out the state.
+		// This shoud be overridden in all classes that have been separated
+		public override bool HasState
+		{
+			get { return true; }
+		}

         public override CCFiniteTimeAction Reverse()
         {
@@ -1070,57 +1099,73 @@
             return null;
         }

-        public override void Update(float time)
-        {
-            m_pTarget.RotationY = _startAngle + (_diffAngle * time);
-        }
-
-        private float _startAngle;
-        private float _dstAngle;
-        private float _diffAngle;
+
+		private class CCBRotateYToState : CCActionIntervalState
+		{
+			private float DstAngle { get; set; }
+			private float diffAngle;
+			private float startAngle;
+
+			public CCBRotateYToState (CCBRotateYTo action, CCNode target)
+				: base(action, target)
+			{
+				DstAngle = action.DstAngle;
+				startAngle = Target.RotationY;
+				diffAngle = DstAngle - startAngle;
+			}
+
+			public override void Update(float time)
+			{
+				Target.RotationY = startAngle + (diffAngle * time);
+			}
+		}
+
     }

     class CCBEaseInstant : CCActionEase
     {
         #region Constructors

-        public CCBEaseInstant()
-        {
-        }
-
         public CCBEaseInstant(CCActionInterval pAction) : base(pAction)
         {
         }

-        // Perform deep copy of CCBEaseInstant
-        public CCBEaseInstant(CCBEaseInstant easeInstant) : base(easeInstant)
-        {
-        }
-
         #endregion Constructors

-
-        public override object Copy(ICCCopyable pZone)
-        {
-            return new CCBEaseInstant(this);
-        }
+		/// <summary>
+		/// Start the EaseInstant operation on the given target.
+		/// </summary>
+		/// <param name="target"></param>
+		protected internal override CCActionState StartAction (CCNode target)
+		{
+			return new CCBEaseInstantState (this, target);
+
+		}

         public override CCFiniteTimeAction Reverse()
         {
             return new CCBEaseInstant((CCActionInterval)InnerAction.Reverse());
         }

-        public override void Update(float time)
-        {
-            if (time < 0)
-            {
-                InnerAction.Update(0);
-            }
-            else
-            {
-                InnerAction.Update(1);
-            }
-        }
+		private class CCBEaseInstantState : CCActionEaseState
+		{
+
+			public CCBEaseInstantState (CCBEaseInstant action, CCNode target)
+				: base(action, target)
+			{	}
+
+			public override void Update(float time)
+			{
+				if (time < 0)
+				{
+					InnerActionState.Update(0);
+				}
+				else
+				{
+					InnerActionState.Update(1);
+				}
+			}
+		}
     }

 }


sdk: psr4 map generated for empty prefixes

--- src/Peachpie.NET.Sdk/BuildTask.cs
+++ src/Peachpie.NET.Sdk/BuildTask.cs
@@ -204,7 +204,8 @@
             {
                 foreach (var psr4map in Autoload_PSR4)
                 {
-                    args.Add(FormatArgFromItem(psr4map, "autoload", "Prefix", "Path"));
+                    //args.Add(FormatArgFromItem(psr4map, "autoload", "Prefix", "Path")); // Prefix can be empty!
+                    args.Add($"/autoload:psr-4,{psr4map.GetMetadata("Prefix")},{psr4map.GetMetadata("Path")}");
                 }
             }


sdk: remove duplicities from classmap

sdk: remove duplicities from classmap

--- src/Peachpie.NET.Sdk/BuildTask.cs
+++ src/Peachpie.NET.Sdk/BuildTask.cs
@@ -2,6 +2,7 @@
 using System.Collections.Generic;
 using System.Diagnostics;
 using System.IO;
+using System.Linq;
 using System.Text;
 using System.Threading;
 using Microsoft.Build.Framework;
@@ -209,7 +210,7 @@

             if (Autoload_ClassMap != null)
             {
-                foreach (var fname in Autoload_ClassMap)
+                foreach (var fname in Autoload_ClassMap.Distinct())
                 {
                     args.Add("/autoload:classmap," + fname);
                 }


Fix the case where we have 2 variables next to each other during normalization

--- src/SmugMugShared/RegExCreator.cs
+++ src/SmugMugShared/RegExCreator.cs
@@ -156,7 +156,17 @@
                 methodName = "!" + methodName;
             }

+            // we could have something like:
+            // /folder/user/smugmuguser/albumName!parent
+            //
+
             string methodNorm = prefix + endpoint + endpointParameter + methodName;
+            if (methodNorm.IndexOf("smugmuguser") > 0)
+            {
+                methodNorm = methodNorm.Replace("smugmuguser", "(*)");
+                paramCount++;
+            }
+

             return methodNorm;
         }


Changed Environment Variable to something more easily set.

--- src/SpecBind/Helpers/UriHelper.cs
+++ src/SpecBind/Helpers/UriHelper.cs
@@ -8,15 +8,15 @@
 	using System.Collections.Generic;
 	using System.Text.RegularExpressions;

-	using SpecBind.BrowserSupport;
-	using SpecBind.Pages;
+	using BrowserSupport;
+	using Pages;

 	/// <summary>
 	/// A helper to get to a page on the site.
 	/// </summary>
 	public static class UriHelper
 	{
-        private const string ENV_VAR_NAME_URL = "SpecBind.ApplicationStartUrl";
+        private const string EnvironmentSettingName = "APPLICATION_START_URL";

 		/// <summary>
 		/// Initializes the <see cref="UriHelper" /> class.
@@ -26,7 +26,7 @@
 			var configSection = SettingHelper.GetConfigurationSection();

 			Uri parsedUri;
-            var envValue = SettingHelper.GetEnvironmentVariable(ENV_VAR_NAME_URL);
+            var envValue = SettingHelper.GetEnvironmentVariable(EnvironmentSettingName);
             if (!string.IsNullOrEmpty(envValue) && Uri.TryCreate(configSection.Application.StartUrl, UriKind.Absolute, out parsedUri))
             {
                 BaseUri = parsedUri;


Added a FindAnywhere method that will search for a gameobject/transform anywhere in the scene by name, including any gameobject child.

--- ExtensionsStatic/GameObjectM.cs
+++ ExtensionsStatic/GameObjectM.cs
@@ -11,4 +11,19 @@
         }
         return gameObject.GetComponent<T>();
     }
+
+    public static GameObject FindAnywhere(string gameObjectName) {
+        Transform[] transforms = GameObject.FindObjectsOfType(typeof(Transform)) as Transform[];
+        foreach (var transform in transforms) {
+            if (transform.name.Equals(gameObjectName)) {
+                return transform.gameObject;
+            }
+            var child = transform.FindFirstChildByName(gameObjectName);
+            if (child != null) {
+                return child.gameObject;
+            }
+        }
+
+        return null;
+    }
 }


typo fixed

typo fixed

--- V2RayW/Program.cs
+++ V2RayW/Program.cs
@@ -48,7 +48,7 @@
             }
         }
         public static MainForm mainForm;
-        const string v2rayVersion = "v2.13.2";
+        const string v2rayVersion = "v2.13.1";
         static BackgroundWorker v2rayCoreWorker = new BackgroundWorker();
         public static AutoResetEvent _resetEvent = new AutoResetEvent(false);
         public static bool finalAction = false;


Fixing errorneous logfile path

Fixing errorneous logfile path

--- src/NAppUpdate.Updater/AppStart.cs
+++ src/NAppUpdate.Updater/AppStart.cs
@@ -112,7 +112,7 @@
 				bool relaunchApp = dto.RelaunchApplication;

 				if (!string.IsNullOrEmpty(dto.AppPath))
-					logFile = Path.Combine(dto.AppPath, @"NauUpdate.log"); // now we can log to a more accessible location
+					logFile = Path.Combine(Path.GetDirectoryName(dto.AppPath), @"NauUpdate.log"); // now we can log to a more accessible location

 				if (dto.Tasks == null || dto.Tasks.Count == 0)
 					throw new Exception("Could not find the updates list (or it was empty).");
@@ -193,7 +193,13 @@
 			}
 			finally
 			{
-				if (_args.Log) _logger.Dump(logFile);
+				if (_args.Log)
+				{
+					// at this stage we can't make any assumptions on correctness of the path
+					FileSystem.CreateDirectoryStructure(logFile, true);
+					_logger.Dump(logFile);
+				}
+
 				if (_args.ShowConsole)
 				{
 					if (_args.Log)


Rename local variables to match other methods

--- src/NQuery/SyntaxTreeNavigation.cs
+++ src/NQuery/SyntaxTreeNavigation.cs
@@ -64,9 +64,9 @@
                 }
                 else
                 {
-                    var token = GetFirstToken(nodeOrToken.AsNode(), tokenPredicate, triviaPredicate);
-                    if (token != null)
-                        return token;
+                    var t = GetFirstToken(nodeOrToken.AsNode(), tokenPredicate, triviaPredicate);
+                    if (t != null)
+                        return t;
                 }
             }

@@ -116,9 +116,9 @@
                 }
                 else
                 {
-                    var token = GetLastToken(nodeOrToken.AsNode(), tokenPredicate, triviaPredicate);
-                    if (token != null)
-                        return token;
+                    var t = GetLastToken(nodeOrToken.AsNode(), tokenPredicate, triviaPredicate);
+                    if (t != null)
+                        return t;
                 }
             }


Fixed bug with SearchAsync()

Fixed bug with SearchAsync()

--- src/Torshify/SessionExtensions.cs
+++ src/Torshify/SessionExtensions.cs
@@ -76,7 +76,7 @@
                 albumOffset,
                 albumCount,
                 artistOffset,
-                artistOffset,
+                artistCount,
                 userData);
             search.Completed += (sender, args) => tcs.SetResult(search);
             return tcs.Task;


Fixed humidity getting set as temperature and also reduced it to 0 decimal places.

--- GadgeteerLogger.Core/Monitor.cs
+++ GadgeteerLogger.Core/Monitor.cs
@@ -46,7 +46,7 @@
         {
             Temperature = temperature.ToString("f2");
             Debug.Print("Temperature reader set temp as: " + Temperature);
-            Humidity = temperature.ToString("f2");
+            Humidity = relativeHumidity.ToString("f0");
             _hasTemperature = true;
         }


постраничный вывод

постраничный вывод

--- GameStore/Pages/Listing.aspx.cs
+++ GameStore/Pages/Listing.aspx.cs
@@ -12,9 +12,22 @@
     public partial class Listing : System.Web.UI.Page
     {
         private Repository repository = new Repository();
+        private int pageSize = 4;
+
+        protected int CurrentPage
+        {
+            get
+            {
+                int page;
+                return int.TryParse(Request.QueryString["page"],out page) ?page:1 ;
+            }
+        }
         protected IEnumerable<Game> GetGames()
         {
-            return repository.Games;
+            return repository.Games
+                .OrderBy(g => g.GameId)
+                .Skip((CurrentPage - 1) * pageSize)
+                .Take(pageSize);
         }
         protected void Page_Load(object sender, EventArgs e)
         {


Test to confirm #281; closes #281

Test to confirm #281; closes #281

--- src/UnitTests/Bug/ConditionBug.cs
+++ src/UnitTests/Bug/ConditionBug.cs
@@ -157,4 +157,46 @@
             }
         }
     }
+
+
+    namespace SourceValueConditionPropertyBug
+    {
+        using Should;
+        using Xunit;
+
+        public class Source
+        {
+            public int Value { get; set; }
+        }
+
+        public class Dest
+        {
+            public int? Value { get; set; }
+        }
+
+        public class ConditionTests : AutoMapperSpecBase
+        {
+            protected override void Establish_context()
+            {
+                Mapper.Initialize(cfg => cfg.CreateMap<Source, Dest>()
+                    .ForMember(d => d.Value, opt => opt.Condition(rc => rc.DestinationValue == null)));
+            }
+
+            [Fact]
+            public void Should_map_value_when_null()
+            {
+                var destination = new Dest();
+                Mapper.Map(new Source {Value = 5}, destination);
+                destination.Value.ShouldEqual(5);
+            }
+
+            [Fact]
+            public void Should_not_map_value_when_not_null()
+            {
+                var destination = new Dest { Value = 6};
+                Mapper.Map(new Source {Value = 5}, destination);
+                destination.Value.ShouldEqual(6);
+            }
+        }
+    }
 }


check if config entry already exists

check if config entry already exists

--- src/Utils/Configuration/Config.cs
+++ src/Utils/Configuration/Config.cs
@@ -12,6 +12,7 @@
         public object this[string key]
         {
             get { return GetConfigEntry(key).Value; }
+            set { Set(key, value); }
         }

         public Config()
@@ -21,12 +22,17 @@

         public void Set(ConfigEntry entry)
         {
+            entry.ThrowIfNull("entry");
+
+            if (_entries.Contains(entry))
+                throw new ArgumentException(string.Format("Entry with key {0} already exists", entry.Key));
+
             _entries.Add(entry);
         }

         public void Set(string key, object value)
         {
-            _entries.Add(new ConfigEntry(key, value));
+            Set(new ConfigEntry(key, value));
         }

         public T Get<T>(string key)


Fix for if repo has no remote branch

Fix for if repo has no remote branch

--- GitMonitor5/CommitRepository.cs
+++ GitMonitor5/CommitRepository.cs
@@ -590,47 +590,50 @@

                         string branch = repo.Info.IsBare ? branchName : $"origin/{branchName}";
                         gitrepo.Branch = branch;
-                        foreach (Commit com in repo.Branches[branch].Commits.Where(s => s.Committer.When >= startDate).OrderByDescending(s => s.Author.When))
-                        {
-                            if (!monitoredPath.IncludeMergeCommits)
-                            {
-                                // filter out merge commits
-                                if (com.Parents.Count() > 1)
+                        if (repo.Branches[branch] != null)
+                        {
+                            foreach (Commit com in repo.Branches[branch].Commits.Where(s => s.Committer.When >= startDate).OrderByDescending(s => s.Author.When))
+                            {
+                                if (!monitoredPath.IncludeMergeCommits)
+                                {
+                                    // filter out merge commits
+                                    if (com.Parents.Count() > 1)
+                                    {
+                                        continue;
+                                    }
+                                }
+
+                                string[] nameexclusions = monitoredPathConfig.DefaultUserNameExcludeFilter.Split(',');
+                                if (nameexclusions.Any(name => com.Author.Name.Contains(name)))
                                 {
                                     continue;
                                 }
-                            }
-
-                            string[] nameexclusions = monitoredPathConfig.DefaultUserNameExcludeFilter.Split(',');
-                            if (nameexclusions.Any(name => com.Author.Name.Contains(name)))
-                            {
-                                continue;
-                            }
-
-                            string url = string.IsNullOrWhiteSpace(gitrepo.CommitUrl) ? string.Empty : string.Format($"{gitrepo.CommitUrl}{com.Sha}");
-                            string repositoryUrl = string.Empty;
-                            if (repo.Network.Remotes?["origin"] != null)
-                            {
-                                repositoryUrl = repo.Network.Remotes["origin"].Url;
-                            }
-
-                            commits.Add(new GitCommit
-                            {
-                                Author = com.Author.Name,
-                                AuthorEmail = string.IsNullOrWhiteSpace(com.Author.Email) ? string.Empty : com.Author.Email,
-                                AuthorWhen = com.Author.When.UtcDateTime,
-                                Committer = com.Committer.Name,
-                                CommitterEmail = string.IsNullOrWhiteSpace(com.Committer.Email) ? string.Empty : com.Committer.Email,
-                                CommitterWhen = com.Committer.When.UtcDateTime,
-                                Sha = com.Sha,
-                                Message = com.Message,
-                                RepositoryFriendlyName = gitrepo.FriendlyName,
-                                RepositoryName = dir.Name,
-                                RepositoryUrl = repositoryUrl,
-                                CommitUrl = url,
-                                IsMerge = com.Parents.Count() > 1,
-                            });
-                            commitCount++;
+
+                                string url = string.IsNullOrWhiteSpace(gitrepo.CommitUrl) ? string.Empty : string.Format($"{gitrepo.CommitUrl}{com.Sha}");
+                                string repositoryUrl = string.Empty;
+                                if (repo.Network.Remotes?["origin"] != null)
+                                {
+                                    repositoryUrl = repo.Network.Remotes["origin"].Url;
+                                }
+
+                                commits.Add(new GitCommit
+                                {
+                                    Author = com.Author.Name,
+                                    AuthorEmail = string.IsNullOrWhiteSpace(com.Author.Email) ? string.Empty : com.Author.Email,
+                                    AuthorWhen = com.Author.When.UtcDateTime,
+                                    Committer = com.Committer.Name,
+                                    CommitterEmail = string.IsNullOrWhiteSpace(com.Committer.Email) ? string.Empty : com.Committer.Email,
+                                    CommitterWhen = com.Committer.When.UtcDateTime,
+                                    Sha = com.Sha,
+                                    Message = com.Message,
+                                    RepositoryFriendlyName = gitrepo.FriendlyName,
+                                    RepositoryName = dir.Name,
+                                    RepositoryUrl = repositoryUrl,
+                                    CommitUrl = url,
+                                    IsMerge = com.Parents.Count() > 1,
+                                });
+                                commitCount++;
+                            }
                         }

                         gitrepo.CommitCount = commitCount;


close pending changes after commit if working directory is clean

--- GitUI/UI/PendingChanges.xaml.cs
+++ GitUI/UI/PendingChanges.xaml.cs
@@ -579,8 +579,12 @@
                 ShowStatusMessage("Commit successfully. Commit Hash: " + id);
                 ClearUI();

+                tracker.Refresh();
+                if (tracker.ChangedFiles.Count() == 0)
+                {
+                    HistoryViewCommands.CloseCommitDetails.Execute("PendingChanges", this);
+                }
                 service.NoRefresh = false;
-
                 HistoryViewCommands.RefreshGraph.Execute(null, this);
             }
             catch (Exception ex)


Simplify.

Simplify.

--- Gu.Wpf.ValidationScope/Scope.cs
+++ Gu.Wpf.ValidationScope/Scope.cs
@@ -197,17 +197,16 @@
                 return;
             }

-            if (e.NewValue is InputTypeCollection newValue)
+            if (d is UIElement element &&
+                e.NewValue is InputTypeCollection newValue)
             {
                 if (newValue.Contains(d))
                 {
-                    var inputNode = GetNode(d) as InputNode;
-                    if (inputNode is null)
+                    if (!(GetNode(d) is InputNode))
                     {
 #pragma warning disable IDISP001, CA2000 // Dispose created. Disposed in SetNode
-                        inputNode = new InputNode((FrameworkElement)d);
+                        SetNode(d, new InputNode(element));
 #pragma warning restore IDISP001, CA2000 // Dispose created.
-                        SetNode(d, inputNode);
                     }
                 }
                 else
@@ -216,13 +215,8 @@
                     // a) Not expecting scope to change often.
                     // b) Not expecting many errors often.
                     // optimize if profiler points at it
-                    var errorNode = GetNode(d) as ErrorNode;
-                    if (errorNode is null)
-                    {
-                        return;
-                    }
-
-                    if (errorNode.ErrorCollection.RemoveAll(x => !IsScopeFor(d, x)) > 0)
+                    if (GetNode(d) is ErrorNode errorNode &&
+                        errorNode.ErrorCollection.RemoveAll(x => !IsScopeFor(d, x)) > 0)
                     {
                         if (errorNode.Errors.Count == 0)
                         {


Added some logging on the HqlBasedQuery.Count() method;
Fixed a bug: PrepareQueryForCount() were not working when an ORDER BY clause spanned multiple lines.

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

--- ActiveRecord/Castle.ActiveRecord/Framework/Queries/HqlBasedQuery.cs
+++ ActiveRecord/Castle.ActiveRecord/Framework/Queries/HqlBasedQuery.cs
@@ -111,16 +111,17 @@

 				return Convert.ToInt32(ActiveRecordMediator.ExecuteQuery(q));
 			}
-			catch (Exception)
+			catch (Exception ex)
 			{
-				// swallow the exception and return -1
+				// log the exception and return -1
+				Log.Debug("Error while obtaining count. Will return -1 as result.", ex);
 				return -1;
 			}
 		}

 		static readonly Regex
-			rxOrderBy = new Regex(@"\s+order\s+by\s+.*", RegexOptions.Compiled | RegexOptions.IgnoreCase),
-			rxNoSelect = new Regex(@"^\s*from\s+", RegexOptions.Compiled | RegexOptions.IgnoreCase);
+			rxOrderBy = new Regex(@"\s+order\s+by\s+.*", RegexOptions.Compiled | RegexOptions.Singleline | RegexOptions.IgnoreCase),
+			rxNoSelect = new Regex(@"^\s*from\s+", RegexOptions.Compiled | RegexOptions.Singleline | RegexOptions.IgnoreCase);
 		protected virtual String PrepareQueryForCount(String query)
 		{
 			query = rxOrderBy.Replace(query, String.Empty);
@@ -128,6 +129,8 @@
 				query = "select count(*) " + query;
 			else
 				query = "select count(*) from (" + query + ")";
+
+			Log.Debug("Query prepared for count: {0}", query);

 			return query;
 		}


Added support for get invoice and delete credit notes.

--- InvoiceCaptureLib/InvoiceCapture.cs
+++ InvoiceCaptureLib/InvoiceCapture.cs
@@ -9,10 +9,8 @@

 namespace InvoiceCaptureLib
 {
-
     public class InvoiceCapture
     {
-
         private String baseEndPoint = "https://api.invcapture.com/";
         private String ApiKey = "";

@@ -21,7 +19,6 @@
         private String invoicesEndPoint = "invoices";
         private String creditNoteEndPoint = "credit_notes";
         private String paymentsEndPoint = "payments";
-

         private bool checkURI(String value)
         {
@@ -45,18 +42,7 @@
             }
         }

-        public string ApiKey1
-        {
-            get
-            {
-                return ApiKey;
-            }
-
-            set
-            {
-                ApiKey = value;
-            }
-        }
+        public string ApiKey1 { get => ApiKey; set =>ApiKey = value; }

         public InvoiceCapture()
         {
@@ -73,7 +59,7 @@
                 baseEndPoint = "https://api.nxt.invcapture.com/";
                 InitiateSSLTrust();
             }
-
+
         }

         public static void InitiateSSLTrust()
@@ -131,7 +117,7 @@
                     {
                         response = reader.ReadToEnd();
                         InvoiceCaptureError error = JsonConvert.DeserializeObject<InvoiceCaptureError>(response);
-                        throw (new InvoiceCaptureException(error.Code+" "+error.Message));
+                        throw (new InvoiceCaptureException(error.Code+" "+error.Message));
                     }
                 }
             }
@@ -183,6 +169,12 @@
             return Newtonsoft.Json.JsonConvert.DeserializeObject<Invoice>(jsonString);
         }

+        public Invoice getInvoice(String id)
+        {
+          String jsonString = callAPI(invoicesEndPoint + "/" + id, "", "GET");
+          return Newtonsoft.Json.JsonConvert.DeserializeObject<Invoice>(jsonString);
+        }
+
         public Invoice cancelInvoice(String id)
         {
             String jsonString = callAPI(invoicesEndPoint + "/" + id + "/cancel", "", "PUT");
@@ -205,6 +197,12 @@
         {
             String jsonString = callAPI(paymentsEndPoint + "/" + id, "", "DELETE");
             return Newtonsoft.Json.JsonConvert.DeserializeObject<Payment>(jsonString);
+        }
+
+        public CreditNote deleteCreditNote(String id)
+        {
+            String jsonString = callAPI(creditNoteEndPoint + "/" + id, "", "DELETE");
+            return Newtonsoft.Json.JsonConvert.DeserializeObject<CreditNote>(jsonString);
         }

         public CreditNote createCreditNote(CreditNote c)
@@ -223,6 +221,6 @@
             String jsonString = Newtonsoft.Json.JsonConvert.SerializeObject(p, new JsonSerializerSettings { ContractResolver = new CamelCasePropertyNamesContractResolver() });
             jsonString = callAPI(paymentsEndPoint, jsonString, "POST");
             return Newtonsoft.Json.JsonConvert.DeserializeObject<Payment>(jsonString);
-        }
+        }
     }
 }


Partially closing a generic is not supported at the moment in the .NET Framework. F# may be able to do it, but when I was trying it out, I found it difficult to link the F# library into the C# program, so at the moment this is not providing practical value.

--- ATZ.Reflection.Tests/TypeExtensionsShould.cs
+++ ATZ.Reflection.Tests/TypeExtensionsShould.cs
@@ -90,15 +90,5 @@
         {
             Assert.AreEqual(2, typeof(IMultiParameterInterface<,>).GenericTypeParameterCount());
         }
-
-        [Test]
-        [Explicit("TODO: Partially closing a template might not be supported by C#")]
-        public void ReturnCorrectValueForTemplateParameterCountWithPartiallyClosedTemplate()
-        {
-            var openInterfaceType = typeof(IMultiParameterInterface<,>);
-            var partiallyClosedInterfaceType = openInterfaceType.MakeGenericType(typeof(BaseClass));
-
-            Assert.AreEqual(1, partiallyClosedInterfaceType.GenericTypeParameterCount());
-        }
     }
 }


Update for PR

Update for PR

--- Assets/MixedRealityToolkit.Tests/PlayModeTests/InteractableTests.cs
+++ Assets/MixedRealityToolkit.Tests/PlayModeTests/InteractableTests.cs
@@ -44,7 +44,7 @@
         private static readonly Quaternion DefaultRotationToggle = Quaternion.LookRotation(Vector3.forward);

         private static InputSimulationService inputSimulationService = null;
-        private const int MOVE_HAND_NUM_STEPS = 32;
+        private const int MoveHandNumSteps = 32;

         [SetUp]
         public override void Setup()
@@ -642,8 +642,6 @@
             Assert.IsTrue(firstRadialButton.IsToggled);
             Assert.IsFalse(secondRadialButton.IsToggled);
             Assert.IsFalse(thirdRadialButton.IsToggled);
-
-            yield return testHand.Show(Vector3.zero);

             var aBitBack = Vector3.forward * -0.2f;
             yield return testHand.MoveTo(secondRadialButton.transform.position);
@@ -919,7 +917,7 @@

             // Move the hand towards
             yield return PlayModeTestUtilities.ShowHand(Handedness.Right, inputSimulationService);
-            yield return PlayModeTestUtilities.MoveHandFromTo(p1, p2, MOVE_HAND_NUM_STEPS, ArticulatedHandPose.GestureId.Poke, Handedness.Right, inputSimulationService);
+            yield return PlayModeTestUtilities.MoveHandFromTo(p1, p2, MoveHandNumSteps , ArticulatedHandPose.GestureId.Poke, Handedness.Right, inputSimulationService);
         }

         private IEnumerator MoveHandAwayFromButton()
@@ -928,7 +926,7 @@
             Vector3 p3 = Vector3.zero;

             // Move the hand back
-            yield return PlayModeTestUtilities.MoveHandFromTo(p2, p3, MOVE_HAND_NUM_STEPS, ArticulatedHandPose.GestureId.Poke, Handedness.Right, inputSimulationService);
+            yield return PlayModeTestUtilities.MoveHandFromTo(p2, p3, MoveHandNumSteps , ArticulatedHandPose.GestureId.Poke, Handedness.Right, inputSimulationService);
             yield return PlayModeTestUtilities.HideHand(Handedness.Right, inputSimulationService);
         }


Final DPI fix

Final DPI fix

--- AimpBetterCoverDisplay.UI/MainWindow.xaml.cs
+++ AimpBetterCoverDisplay.UI/MainWindow.xaml.cs
@@ -36,6 +36,9 @@
             {
                 NativeWindow window = this.NativeWindow;
                 window.Placement = placement;
+
+                // adjust again after dpi settings have been applied
+                Dispatcher.InvokeAsync(() => window.Placement = placement);
             }
         }


refactor: some spaces and line endings due to pull request

--- Assets/NaughtyAttributes/Scripts/Editor/Utility/NaughtyEditorGUI.cs
+++ Assets/NaughtyAttributes/Scripts/Editor/Utility/NaughtyEditorGUI.cs
@@ -248,9 +248,9 @@
 				EditorGUILayout.ObjectField(label, (UnityEngine.Object)value, valueType, true);
 			}
 			else if (valueType.BaseType == typeof(Enum))
-            {
-                EditorGUILayout.EnumPopup(label, (Enum)value);
-            }
+			{
+				EditorGUILayout.EnumPopup(label, (Enum)value);
+			}
 			else
 			{
 				isDrawn = false;


Verify that GetOrFetchObject respects expiration. Fixes #87

--- Akavache.Tests/BlobCacheExtensionsFixture.cs
+++ Akavache.Tests/BlobCacheExtensionsFixture.cs
@@ -383,6 +383,49 @@
         }

         [Fact]
+        public void GetOrFetchShouldRespectExpiration()
+        {
+            (new TestScheduler()).With(sched =>
+            {
+                string path;
+                using (Utility.WithEmptyDirectory(out path))
+                {
+                    var fixture = CreateBlobCache(path);
+                    using (fixture)
+                    {
+                        var result = default(string);
+                        fixture.GetOrFetchObject("foo",
+                            () => Observable.Return("bar"),
+                            sched.Now + TimeSpan.FromMilliseconds(1000))
+                            .Subscribe(x => result = x);
+
+                        sched.AdvanceByMs(250);
+                        Assert.Equal("bar", result);
+
+                        fixture.GetOrFetchObject("foo",
+                            () => Observable.Return("baz"),
+                            sched.Now + TimeSpan.FromMilliseconds(1000))
+                            .Subscribe(x => result = x);
+
+                        sched.AdvanceByMs(250);
+                        Assert.Equal("bar", result);
+
+                        sched.AdvanceByMs(1000);
+                        fixture.GetOrFetchObject("foo",
+                            () => Observable.Return("baz"),
+                            sched.Now + TimeSpan.FromMilliseconds(1000))
+                            .Subscribe(x => result = x);
+
+                        sched.AdvanceByMs(250);
+                        Assert.Equal("baz", result);
+                    }
+
+                    fixture.Shutdown.Wait();
+                }
+            });
+        }
+
+        [Fact]
         public void KeysByTypeTest()
         {
             string path;
@@ -500,7 +543,7 @@
         protected override IBlobCache CreateBlobCache(string path)
         {
             BlobCache.ApplicationName = "TestRunner";
-            return new TestBlobCache();
+            return new TestBlobCache(RxApp.MainThreadScheduler);
         }
     }


Make sure we register stuff

Make sure we register stuff

--- Akavache/Portable/DependencyResolverMixin.cs
+++ Akavache/Portable/DependencyResolverMixin.cs
@@ -24,7 +24,9 @@
             var namespaces = new[] {
                 "Akavache",
                 "Akavache.Mac",
+                "Akavache.Deprecated",
                 "Akavache.Mobile",
+                "Akavache.Http",
                 "Akavache.Sqlite3",
             };


Changed API: removed 'overwrite' option from WebDavClient Move's method definition.

--- src/WebDav.Client/WebDavClient.cs
+++ src/WebDav.Client/WebDavClient.cs
@@ -466,9 +466,8 @@
         /// </summary>
         /// <param name="sourceUri">A string that represents the source <see cref="T:System.Uri"/>.</param>
         /// <param name="destUri">A string that represents the destination <see cref="T:System.Uri"/>.</param>
-        /// <param name="overwrite">A value indicating whether the server should overwrite a non-null destination.</param>
-        /// <returns>An instance of <see cref="WebDavResponse" /></returns>
-        public Task<WebDavResponse> Move(string sourceUri, string destUri, bool overwrite = true)
+        /// <returns>An instance of <see cref="WebDavResponse" /></returns>
+        public Task<WebDavResponse> Move(string sourceUri, string destUri)
         {
             return Move(CreateUri(sourceUri), CreateUri(destUri), new MoveParameters());
         }
@@ -478,9 +477,8 @@
         /// </summary>
         /// <param name="sourceUri">The source <see cref="T:System.Uri"/>.</param>
         /// <param name="destUri">The destination <see cref="T:System.Uri"/>.</param>
-        /// <param name="overwrite">A value indicating whether the server should overwrite a non-null destination.</param>
-        /// <returns>An instance of <see cref="WebDavResponse" /></returns>
-        public Task<WebDavResponse> Move(Uri sourceUri, Uri destUri, bool overwrite = true)
+        /// <returns>An instance of <see cref="WebDavResponse" /></returns>
+        public Task<WebDavResponse> Move(Uri sourceUri, Uri destUri)
         {
             return Move(sourceUri, destUri, new MoveParameters());
         }


Made Table<_*> an IEnumerable<_*>

Made Table<_*> an IEnumerable<_*>

--- ZedSharp/Table.cs
+++ ZedSharp/Table.cs
@@ -17,7 +17,7 @@
         }
     }

-    public class Table<A>
+    public class Table<A> : IEnumerable<Row<A>>
     {
         internal Table(Col<A> a) : this(a, new List<Row<A>>())
         {
@@ -31,9 +31,19 @@

         public Col<A> Column1 { get; private set; }
         private List<Row<A>> Rows { get; set; }
+
+        public IEnumerator<Row<A, B, C>> GetEnumerator()
+        {
+            return Rows.GetEnumerator();
+        }
+
+        System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
+        {
+            return GetEnumerator();
+        }
     }

-    public class Table<A, B>
+    public class Table<A, B> : IEnumerable<Row<A, B>>
     {
         internal Table(Col<A> a, Col<B> b) : this(a, b, new List<Row<A, B>>())
         {
@@ -49,9 +59,19 @@
         public Col<A> Column1 { get; private set; }
         public Col<B> Column2 { get; private set; }
         private List<Row<A, B>> Rows { get; set; }
+
+        public IEnumerator<Row<A, B, C>> GetEnumerator()
+        {
+            return Rows.GetEnumerator();
+        }
+
+        System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
+        {
+            return GetEnumerator();
+        }
     }

-    public class Table<A, B, C>
+    public class Table<A, B, C> : IEnumerable<Row<A, B, C>>
     {
         internal Table(Col<A> a, Col<B> b, Col<C> c) : this(a, b, c, new List<Row<A, B, C>>())
         {
@@ -69,6 +89,16 @@
         public Col<B> Column2 { get; private set; }
         public Col<C> Column3 { get; private set; }
         private List<Row<A, B, C>> Rows { get; set; }
+
+        public IEnumerator<Row<A, B, C>> GetEnumerator()
+        {
+            return Rows.GetEnumerator();
+        }
+
+        System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
+        {
+            return GetEnumerator();
+        }

         public Table<D> Select<D>(Col<D> col)
         {


Add the warrant security type.

Add the warrant security type.

--- Krs.Ats.IBNet/Enums/SecurityType.cs
+++ Krs.Ats.IBNet/Enums/SecurityType.cs
@@ -42,6 +42,10 @@
         /// </summary>
         [Description("BOND")] Bond,
         /// <summary>
+        /// Warrant
+        /// </summary>
+        [Description("WAR")] Warrant,
+        /// <summary>
         /// Undefined Security Type
         /// </summary>
         [Description("")] Undefined


[Libraries/libgraph] minor changes

[Libraries/libgraph] minor changes

--- Libraries/libgraph/DirectedGraph.cs
+++ Libraries/libgraph/DirectedGraph.cs
@@ -1,11 +1,27 @@
 using System;
+using System.Collections.Generic;

 namespace libgraph
 {
 	public class DirectedGraph
 	{
+		List<Vertex> Nodes = new List<Vertex>();
+
 		public DirectedGraph ()
 		{
+			Nodes.Add (new Vertex());
+		}
+
+		/*
+		public void AddVertex(Vertex Node)
+		{
+
+		}
+		*/
+
+		public Edge ConnectVertices (Vertex NodeFrom, Vertex NodeTo)
+		{
+			return new Edge (NodeFrom, NodeTo);
 		}
 	}
 }


Update R26

Update R26

--- ExchangeMAPI/Source/MS-OXCFOLD/TestSuite/S01_FolderRopOperations.cs
+++ ExchangeMAPI/Source/MS-OXCFOLD/TestSuite/S01_FolderRopOperations.cs
@@ -272,7 +272,7 @@
                 0x00,
                 openFolderResponse.HasRules,
                 26,
-                @"[In RopOpenFolder ROP Response Buffer] HasRules (1 byte): otherwise [If rules (4) are not associated with the folder], this field [HasRules] is set to zero (FALSE).");
+                @"[In RopOpenFolder ROP Response Buffer] HasRules (1 byte): otherwise [If rules are not associated with the folder], this field [HasRules] is set to zero (FALSE).");
             #endregion

             #region Step 7. The client calls RopDeleteFolder to softly delete [MSOXCFOLDSubfolder3] folder.


Test for element equality

Test for element equality

--- ExtraLINQ.Tests/Extensions/NameValueCollection/ToDictionaryTests.cs
+++ ExtraLINQ.Tests/Extensions/NameValueCollection/ToDictionaryTests.cs
@@ -2,6 +2,7 @@
 using System.Collections.Generic;
 using System.Collections.Specialized;
 using ExtraLinq;
+using FluentAssertions;
 using NUnit.Framework;

 namespace ExtraLINQ.Tests
@@ -16,5 +17,25 @@
             NameValueCollection collection = null;
             Dictionary<string, string> dictionary = collection.ToDictionary();
         }
+
+        [Test]
+        public void ReturnedDictionaryContainsExactlyTheElementsFromTheNameValueCollection()
+        {
+            var collection = new NameValueCollection
+            {
+                { "a", "1" },
+                { "b", "2" },
+                { "c", "3" }
+            };
+
+            Dictionary<string, string> dictionary = collection.ToDictionary();
+
+            dictionary.Should().Equal(new Dictionary<string, string>
+            {
+                { "a", "1" },
+                { "b", "2" },
+                { "c", "3" }
+            });
+        }
     }
 }


Improve JsonPointer constructor preformance

--- Manatee.Json/Pointer/JsonPointer.cs
+++ Manatee.Json/Pointer/JsonPointer.cs
@@ -34,9 +34,22 @@
 		/// </summary>
 		/// <param name="source">A collection of strings representing the segments of the pointer.</param>
 		public JsonPointer(IEnumerable<string> source)
-			: base(source.SkipWhile(s => s == "#"))
+			: base(source.FirstOrDefault() == "#" ? source.SkipWhile(s => s == "#") : source)
 		{
 			_usesHash = source.FirstOrDefault() == "#";
+		}
+
+		private JsonPointer(List<string> source, bool usesHash)
+			: base(source.FirstOrDefault() == "#" ? source.SkipWhile(s => s == "#") : source)
+		{
+			_usesHash = usesHash;
+		}
+
+		private JsonPointer(JsonPointer source, int capacity, bool usesHash)
+			: base(capacity)
+		{
+			AddRange(source.FirstOrDefault() == "#" ? source.SkipWhile(s => s == "#") : source);
+			_usesHash = usesHash;
 		}

 		/// <summary>
@@ -101,7 +114,7 @@
 		/// </summary>
 		public JsonPointer Clone()
 		{
-			return new JsonPointer(this){_usesHash = _usesHash};
+			return new JsonPointer(this, _usesHash);
 		}

 		/// <summary>
@@ -110,7 +123,7 @@
 		/// <param name="append">The segments to append.</param>
 		public JsonPointer CloneAndAppend(params string[] append)
 		{
-			var clone = new JsonPointer(this){_usesHash = _usesHash};
+			var clone = new JsonPointer(this, Count + append.Length, _usesHash);
 			clone.AddRange(append);

 			return clone;
@@ -128,12 +141,12 @@

 		internal JsonPointer CleanAndClone()
 		{
-			return new JsonPointer(this.WhereNotNull()) {_usesHash = _usesHash};
+			return new JsonPointer(this.WhereNotNull().ToList(), _usesHash);
 		}

 		internal JsonPointer WithHash()
 		{
-			return new JsonPointer(this) {_usesHash = true};
+			return new JsonPointer(this, true);
 		}

 		private static JsonValue? _EvaluateSegment(JsonValue current, string segment)
@@ -144,8 +157,8 @@
 				{
 					return (segment != "0" && segment.StartsWith("0")) ||
 					       (0 > index || index >= current.Array.Count)
-						       ? null
-						       : current.Array[index];
+								? null
+								: current.Array[index];
 				}

 				if (segment == "-")
@@ -157,8 +170,8 @@
 			}

 			return current.Type != JsonValueType.Object || !current.Object.TryGetValue(segment, out var value)
-				       ? null
-				       : value;
+						? null
+						: value;
 		}

 		private static string _Escape(string reference)


fixed bug that content-headers where not included in the header dictionary

--- AspNetActionFilter/HttpSignatureAttribute.cs
+++ AspNetActionFilter/HttpSignatureAttribute.cs
@@ -1,84 +1,89 @@
-using HttpSignatures;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Net.Http;
-using System.Text;
-using System.Threading.Tasks;
-using System.Web.Http.Filters;
-
-namespace AspNetActionFilter
-{
-    public static class WebApiRequestConverter
-    {
-        public static IRequest FromHttpRequest(HttpRequestMessage r)
-        {
-            var req = new Request()
-            {
-                Method = new HttpMethod(r.Method.ToString()),
-                Path = r.RequestUri.PathAndQuery
-            };
-
-            foreach (var h in r.Headers)
-            {
-                req.Headers.Add(h.Key.ToLowerInvariant(), h.Value.First());
-            }
-
-            return req;
-        }
-    }
-
-    public interface IKeyStoreService
-    {
-        IDictionary<string, string> GetKeyStore();
-    }
-
-    [AttributeUsage(AttributeTargets.Method)]
-    public class HttpSignatureAttribute : ActionFilterAttribute
-    {
-        private string[] headers;
-
-        public HttpSignatureAttribute(params string[] headers)
-        {
-            this.headers = headers;
-        }
-
-        public override void OnActionExecuting(System.Web.Http.Controllers.HttpActionContext context)
-        {
-            var keyService = (IKeyStoreService)context
-                          .ControllerContext.Configuration.DependencyResolver
-                          .GetService(typeof(IKeyStoreService));
-
-            var keys = keyService.GetKeyStore();
-
-            var request = context.Request;
-
-            if (request.Headers.Authorization != null && request.Headers.Authorization.Scheme == "Signature")
-            {
-                var signer = new HttpSigner(new AuthorizationParser(), new HttpSignatureStringExtractor());
-
-                var spec = new SignatureSpecification()
-                {
-                    Algorithm = "hmac-sha256",
-                    Headers = headers,
-                    //KeyId = "some-key" // TODO: make this dynamic..., seems like this can be omitted
-                };
-
-                var sigRequest = WebApiRequestConverter.FromHttpRequest(request);
-
-                var keyStore = new KeyStore(keys);
-
-                var signature = signer.Signature(sigRequest, spec, keyStore);
-
-                if (!signature.Valid)
-                {
-                    throw new Exception("signature invalid");
-                }
-            }
-            else
-            {
-                throw new Exception("missing authentication");
-            }
-        }
-    }
-}
+using HttpSignatures;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net.Http;
+using System.Text;
+using System.Threading.Tasks;
+using System.Web.Http.Filters;
+
+namespace AspNetActionFilter
+{
+    public static class WebApiRequestConverter
+    {
+        public static IRequest FromHttpRequest(HttpRequestMessage r)
+        {
+            var req = new Request()
+            {
+                Method = new HttpMethod(r.Method.ToString()),
+                Path = r.RequestUri.PathAndQuery
+            };
+
+            foreach (var h in r.Headers)
+            {
+                req.Headers.Add(h.Key.ToLowerInvariant(), h.Value.First());
+            }
+
+            foreach (var h in r.Content.Headers)
+            {
+                req.Headers.Add(h.Key.ToLowerInvariant(), h.Value.First());
+            }
+
+            return req;
+        }
+    }
+
+    public interface IKeyStoreService
+    {
+        IDictionary<string, string> GetKeyStore();
+    }
+
+    [AttributeUsage(AttributeTargets.Method)]
+    public class HttpSignatureAttribute : ActionFilterAttribute
+    {
+        private string[] headers;
+
+        public HttpSignatureAttribute(params string[] headers)
+        {
+            this.headers = headers;
+        }
+
+        public override void OnActionExecuting(System.Web.Http.Controllers.HttpActionContext context)
+        {
+            var keyService = (IKeyStoreService)context
+                          .ControllerContext.Configuration.DependencyResolver
+                          .GetService(typeof(IKeyStoreService));
+
+            var keys = keyService.GetKeyStore();
+
+            var request = context.Request;
+
+            if (request.Headers.Authorization != null && request.Headers.Authorization.Scheme == "Signature")
+            {
+                var signer = new HttpSigner(new AuthorizationParser(), new HttpSignatureStringExtractor());
+
+                var spec = new SignatureSpecification()
+                {
+                    Algorithm = "hmac-sha256",
+                    Headers = headers,
+                    //KeyId = "some-key" // TODO: make this dynamic..., seems like this can be omitted
+                };
+
+                var sigRequest = WebApiRequestConverter.FromHttpRequest(request);
+
+                var keyStore = new KeyStore(keys);
+
+                var signature = signer.Signature(sigRequest, spec, keyStore);
+
+                if (!signature.Valid)
+                {
+                    throw new Exception("signature invalid");
+                }
+            }
+            else
+            {
+                throw new Exception("missing authentication");
+            }
+        }
+    }
+}


try fix logical errors in boolean engine

--- src/Sir.Store/IO/PostingsReader.cs
+++ src/Sir.Store/IO/PostingsReader.cs
@@ -30,35 +30,47 @@

                 while (cursor != null)
                 {
-                    var docIds = Read(cursor.PostingsOffsets, cursor.Score);
+                    var subResult = Read(cursor.PostingsOffsets, cursor.Score);
+
+                    this.Log($"term {cursor.Term} exists in {subResult.Count} documents");

                     if (cursor.And)
                     {
                         if (result == null)
                         {
-                            result = docIds;
+                            result = subResult;
                         }
                         else
                         {
-                            var section = new Dictionary<long, float>();
+                            var product = new Dictionary<long, float>();

                             foreach (var doc in result)
                             {
                                 float score;
-                                if (docIds.TryGetValue(doc.Key, out score))
+                                if (subResult.TryGetValue(doc.Key, out score))
                                 {
-                                    section.Add(doc.Key, doc.Value + score);
+                                    product.Add(doc.Key, doc.Value + score);
                                 }
                             }

-                            result = section;
+                            foreach (var doc in subResult)
+                            {
+                                float score;
+                                if (result.TryGetValue(doc.Key, out score))
+                                {
+                                    if (!product.ContainsKey(doc.Key))
+                                        product.Add(doc.Key, doc.Value + score);
+                                }
+                            }
+
+                            result = product;
                         }
                     }
                     else if (cursor.Not)
                     {
                         if (result != null)
                         {
-                            foreach (var id in docIds.Keys)
+                            foreach (var id in subResult.Keys)
                             {
                                 result.Remove(id);
                             }
@@ -68,17 +80,40 @@
                     {
                         if (result == null)
                         {
-                            result = docIds;
+                            result = subResult;
                         }
                         else
                         {
-                            foreach (var doc in docIds)
+                            var product = new Dictionary<long, float>();
+
+                            foreach (var doc in result)
                             {
-                                if (result.ContainsKey(doc.Key))
+                                float score;
+                                if (subResult.TryGetValue(doc.Key, out score))
                                 {
-                                    result[doc.Key] += doc.Value;
+                                    product.Add(doc.Key, doc.Value + score);
+                                }
+                                else
+                                {
+                                    product.Add(doc.Key, doc.Value);
                                 }
                             }
+
+                            foreach (var doc in subResult)
+                            {
+                                float score;
+                                if (result.TryGetValue(doc.Key, out score))
+                                {
+                                    if (!product.ContainsKey(doc.Key))
+                                        product.Add(doc.Key, doc.Value + score);
+                                }
+                                else
+                                {
+                                    product.Add(doc.Key, doc.Value);
+                                }
+                            }
+
+                            result = product;
                         }
                     }

@@ -96,9 +131,9 @@
             );

             var index = skip > 0 ? skip : 0;
-            var count = Math.Min(sortedByScore.Count, (take > 0 ? take : sortedByScore.Count));
+            var count = Math.Min(sortedByScore.Count, take > 0 ? take : sortedByScore.Count);

-            this.Log("reducing {0} into {1} docs took {2}", query, sortedByScore.Count, timer.Elapsed);
+            this.Log($"found total of {sortedByScore.Count} docs in {timer.Elapsed}. skip {skip} take {take} index {index} count {count}");

             return new ScoredResult { SortedDocuments = sortedByScore.GetRange(index, count), Total = sortedByScore.Count };
         }
@@ -107,7 +142,7 @@
         {
             var result = new Dictionary<long, float>();

-            foreach(var offset in offsets)
+            foreach (var offset in offsets)
             {
                 GetPostingsFromStream(offset, result, score);
             }
@@ -127,7 +162,12 @@

             Span<byte> listBuf = stackalloc byte[sizeof(long) * (int)numOfPostings];

-            _stream.Read(listBuf);
+            var read = _stream.Read(listBuf);
+
+            if (read < listBuf.Length)
+            {
+                throw new Exception("oh dear");
+            }

             foreach (var word in MemoryMarshal.Cast<byte, long>(listBuf))
             {


revision 2.0.7.1

revision 2.0.7.1

--- Mina.NET/Properties/AssemblyInfo.cs
+++ Mina.NET/Properties/AssemblyInfo.cs
@@ -34,5 +34,5 @@
 // 可以指定所有这些值，也可以使用“内部版本号”和“修订号”的默认值，
 // 方法是按如下所示使用“*”:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("2.0.7")]
-[assembly: AssemblyFileVersion("2.0.7")]
+[assembly: AssemblyVersion("2.0.7.1")]
+[assembly: AssemblyFileVersion("2.0.7.1")]


ConsoleEmitterSummary tests

ConsoleEmitterSummary tests

--- JsGoogleCompile.Tests/JSGoogleCompile/ConsoleEmitterSummaryTests.cs
+++ JsGoogleCompile.Tests/JSGoogleCompile/ConsoleEmitterSummaryTests.cs
@@ -17,5 +17,156 @@
         {
             (new ConsoleEmitter()).EmitSummary(null);
         }
+
+        [TestMethod]
+        public void EmitSummary_Logs_Expected_Messages_With_Valid_Results_That_Has_Empty_Errors_And_Warnings()
+        {
+            // Arrange
+            var loggerMock = new Mock<ILog>();
+            ConsoleEmitter.SetLogger(loggerMock.Object);
+            var expectedCompiledCode = "CompiledCode" + Guid.NewGuid();
+
+            var compilerResults = new CompilerResults
+            {
+                OutputFilePath = string.Empty,
+                Errors = new List<CompilerError>(),
+                Warnings = new List<CompilerError>(),
+                CompiledCode = expectedCompiledCode,
+            };
+            var emitter = new ConsoleEmitter();
+
+            // Act
+            emitter.EmitSummary(compilerResults);
+
+            // Assert
+            loggerMock.Verify(m => m.Info(It.Is<string>(s => s == "----------------------------")), Times.Exactly(2));
+            loggerMock.Verify(m => m.Info(It.Is<string>(s => s == "No Errors or Warnings Found!")), Times.Once);
+            loggerMock.Verify(m => m.Info(It.Is<string>(s => s == "Code Emitted:")), Times.Once);
+            loggerMock.Verify(m => m.Info(It.Is<string>(s => s == expectedCompiledCode)), Times.Once);
+        }
+
+        [TestMethod]
+        public void EmitSummary_Logs_Expected_Messages_With_Valid_Results_That_Has_Empty_Errors_And_Null_Warnings()
+        {
+            // Arrange
+            var loggerMock = new Mock<ILog>();
+            ConsoleEmitter.SetLogger(loggerMock.Object);
+            var expectedCompiledCode = "CompiledCode" + Guid.NewGuid();
+
+            var compilerResults = new CompilerResults
+            {
+                OutputFilePath = string.Empty,
+                Errors = new List<CompilerError>(),
+                Warnings = null,
+                CompiledCode = expectedCompiledCode,
+            };
+            var emitter = new ConsoleEmitter();
+
+            // Act
+            emitter.EmitSummary(compilerResults);
+
+            // Assert
+            loggerMock.Verify(m => m.Info(It.Is<string>(s => s == "----------------------------")), Times.Exactly(2));
+            loggerMock.Verify(m => m.Info(It.Is<string>(s => s == "No Errors or Warnings Found!")), Times.Once);
+            loggerMock.Verify(m => m.Info(It.Is<string>(s => s == "Code Emitted:")), Times.Once);
+            loggerMock.Verify(m => m.Info(It.Is<string>(s => s == expectedCompiledCode)), Times.Once);
+        }
+
+        [TestMethod]
+        public void EmitSummary_Logs_Expected_Messages_With_Valid_Results_That_Has_Null_Errors_And_Empty_Warnings()
+        {
+            // Arrange
+            var loggerMock = new Mock<ILog>();
+            ConsoleEmitter.SetLogger(loggerMock.Object);
+            var expectedCompiledCode = "CompiledCode" + Guid.NewGuid();
+
+            var compilerResults = new CompilerResults
+            {
+                OutputFilePath = string.Empty,
+                Errors = null,
+                Warnings = new List<CompilerError>(),
+                CompiledCode = expectedCompiledCode,
+            };
+            var emitter = new ConsoleEmitter();
+
+            // Act
+            emitter.EmitSummary(compilerResults);
+
+            // Assert
+            loggerMock.Verify(m => m.Info(It.Is<string>(s => s == "----------------------------")), Times.Exactly(2));
+            loggerMock.Verify(m => m.Info(It.Is<string>(s => s == "No Errors or Warnings Found!")), Times.Once);
+            loggerMock.Verify(m => m.Info(It.Is<string>(s => s == "Code Emitted:")), Times.Once);
+            loggerMock.Verify(m => m.Info(It.Is<string>(s => s == expectedCompiledCode)), Times.Once);
+        }
+
+        [TestMethod]
+        public void EmitSummary_Logs_Expected_Messages_With_Valid_Results_That_Has_A_Warning_But_No_Errors()
+        {
+            // Arrange
+            var loggerMock = new Mock<ILog>();
+            ConsoleEmitter.SetLogger(loggerMock.Object);
+            var expectedCompiledCode = "CompiledCode" + Guid.NewGuid();
+
+            var compilerResults = new CompilerResults
+            {
+                OutputFilePath = string.Empty,
+                Errors = null,
+                Warnings = new List<CompilerError>
+                               {
+                                    new CompilerError
+                                    {
+                                       Lineno = 0,
+                                       Type = string.Empty,
+                                       Error = string.Empty,
+                                       Line = string.Empty,
+                                    }
+                               },
+                CompiledCode = expectedCompiledCode,
+            };
+            var emitter = new ConsoleEmitter();
+
+            // Act
+            emitter.EmitSummary(compilerResults);
+
+            // Assert
+            loggerMock.Verify(m => m.Info(It.Is<string>(s => s == "----------------------------")), Times.Exactly(2));
+            loggerMock.Verify(m => m.Info(It.Is<string>(s => s == "Code Emitted:")), Times.Once);
+            loggerMock.Verify(m => m.Info(It.Is<string>(s => s == expectedCompiledCode)), Times.Once);
+            loggerMock.Verify(m => m.Info(It.Is<string>(s => s.Contains("1 Warnings"))), Times.Once);
+        }
+
+        [TestMethod]
+        public void EmitSummary_Logs_Expected_Messages_With_Valid_Results_That_Has_No_Warnings_And_One_Error()
+        {
+            // Arrange
+            var loggerMock = new Mock<ILog>();
+            ConsoleEmitter.SetLogger(loggerMock.Object);
+            var expectedCompiledCode = "CompiledCode" + Guid.NewGuid();
+
+            var compilerResults = new CompilerResults
+            {
+                OutputFilePath = string.Empty,
+                Warnings = null,
+                Errors = new List<CompilerError>
+                               {
+                                    new CompilerError
+                                    {
+                                       Lineno = 0,
+                                       Type = string.Empty,
+                                       Error = string.Empty,
+                                       Line = string.Empty,
+                                    }
+                               },
+                CompiledCode = expectedCompiledCode,
+            };
+            var emitter = new ConsoleEmitter();
+
+            // Act
+            emitter.EmitSummary(compilerResults);
+
+            // Assert
+            loggerMock.Verify(m => m.Info(It.Is<string>(s => s == "----------------------------")), Times.Once);
+            loggerMock.Verify(m => m.Info(It.Is<string>(s => s.Contains("1 Errors"))), Times.Once);
+        }
     }
 }


Fixed Merge Part2

Fixed Merge Part2

--- Assets/Scripts/TES/Materials/BaseMaterial.cs
+++ Assets/Scripts/TES/Materials/BaseMaterial.cs
@@ -9,20 +9,8 @@
     /// </summary>
     public abstract class BaseMaterial
     {
-<<<<<<< HEAD
-        public struct MatProxy
-        {
-            public MWMaterialProps Props;
-            public Material Material;
-        }
-
-        protected static Dictionary<Texture2D, Texture2D> m_NormalMapCache = new Dictionary<Texture2D, Texture2D>();
-        protected Dictionary<MWMaterialProps, Material> m_existingMaterials;
-        protected List<MatProxy> m_Materials = new List<MatProxy>();
-=======
         private static Dictionary<Texture2D, Texture2D> m_GeneratedNormalMaps = new Dictionary<Texture2D, Texture2D>();
         protected static Dictionary<MWMaterialProps, Material> m_existingMaterials = new Dictionary<MWMaterialProps, Material>();
->>>>>>> unstable
         protected TextureManager m_textureManager;
         protected bool m_GenerateNormalMap;
         protected Material m_Material = null;
@@ -130,18 +118,12 @@
         // https://gamedev.stackexchange.com/questions/106703/create-a-normal-map-using-a-script-unity
         public static Texture2D GenerateNormalMap(Texture2D source, float strength)
         {
-<<<<<<< HEAD
-            Texture2D normalTexture;
-
-            if (m_NormalMapCache.TryGetValue(source, out normalTexture))
-                return normalTexture;
-=======
             if (m_GeneratedNormalMaps.ContainsKey(source))
                 return m_GeneratedNormalMaps[source];
->>>>>>> unstable

             strength = Mathf.Clamp(strength, 0.0F, 100.0f);

+            Texture2D normalTexture;
             float xLeft;
             float xRight;
             float yUp;
@@ -167,8 +149,6 @@

             normalTexture.Apply();

-            m_NormalMapCache.Add(source, normalTexture);
-
             return normalTexture;
         }


Handling no matches on MeileProvider

Handling no matches on MeileProvider

--- Audiotica.Data/Mp3Providers/MeileProvider.cs
+++ Audiotica.Data/Mp3Providers/MeileProvider.cs
@@ -58,7 +58,9 @@
             var json = await resp.Content.ReadAsStringAsync();
             var parseResp = await json.DeserializeAsync<MeileDetailRoot>();

-            return parseResp.values.songs.FirstOrDefault().mp3;
+            var match = parseResp.values.songs.FirstOrDefault();
+
+            return match != null ? match.mp3 : null;
         }
     }
-}+}


fixing script properties to return default value

--- src/TSQLHelper/ScriptProperties.cs
+++ src/TSQLHelper/ScriptProperties.cs
@@ -8,13 +8,61 @@

 namespace TSQLHelper
-{
+{
+    public struct ScriptDetail
+    {
+        public string Name;
+        public TSqlTokenType Type;
+    }
+
     public class ScriptProperties
-    {
+    {
+
+        public ScriptDetail GetScriptDetail(string filename)
+        {
+            var txtRdr = new StreamReader(filename);
+            var parser = new TSql110Parser(true);
+
+            IList<ParseError> errors;
+            var sqlFragment = parser.Parse(txtRdr, out errors);
+
+            var inName = false;
+            var name = "";
+
+            var result = new ScriptDetail();
+
+            foreach (var a in sqlFragment.ScriptTokenStream)
+            {
+
+                switch (a.TokenType)
+                {
+                    case TSqlTokenType.Procedure:
+                        result.Type = a.TokenType;
+                        break;
+                    case TSqlTokenType.QuotedIdentifier:
+                    case TSqlTokenType.Identifier:
+                    case TSqlTokenType.Dot:
+                        inName = true;
+                        name += a.Text;
+
+
+                        break;
+
+                    case TSqlTokenType.WhiteSpace:
+                        if (inName)
+                        {
+                            result.Name = name;
+                            return result;
+                        }
+                        break;
+                }
+            }
+
+            return new ScriptDetail();
+        }

         public string GetProcNameFromSqlFile(string filename)
         {
-
             var txtRdr = new StreamReader(filename);
             var parser = new TSql110Parser(true);


Techdebt #6: unit-tests for ReadExpressions implemented.

--- LearningBasic.Test/Parsing/BasicScannerExpressionExtensionsTests.cs
+++ LearningBasic.Test/Parsing/BasicScannerExpressionExtensionsTests.cs
@@ -49,5 +49,33 @@

             Assert.IsFalse(condition);
         }
+
+        [TestMethod]
+        [ExpectedException(typeof(ParserException))]
+        public void ReadExpressions_WithEmptyString_ThrowsParserException()
+        {
+            var scanner = MakeScanner("");
+
+            var actual = scanner.ReadExpressions();
+        }
+
+        [TestMethod]
+        [ExpectedException(typeof(ParserException))]
+        public void ReadExpressions_WithoutComma_ThrowsParserException()
+        {
+            var scanner = MakeScanner("1 2");
+
+            var actual = scanner.ReadExpressions();
+        }
+
+        [TestMethod]
+        public void ReadExpressions_WithTwoExpressions_ReturnsListWithTwoElements()
+        {
+            var scanner = MakeScanner("1, 2");
+
+            var actual = scanner.ReadExpressions();
+
+            Assert.AreEqual(2, actual.Count);
+        }
     }
 }


Wallet send UI improvements (#2750)

Wallet send UI improvements (#2750)

* Remove autocompletion for output fields

* Use consistent wording for available balance

* Set min value and hide number spins for amount inputs

* Move add destination button to destination input field

* Fix fiat amount display for multiple destinations case

* Improve display of multiple destinations

* Fix formatting

--- BTCPayServer/Views/Wallets/WalletSend.cshtml
+++ BTCPayServer/Views/Wallets/WalletSend.cshtml
@@ -64,17 +64,20 @@
             @if (Model.Outputs.Count == 1)
             {

-
-                    <input asp-for="Outputs[0].DestinationAddress" class="form-control font-monospace" />
+

+
+                        <button type="submit" name="command" value="add-output" class="d-inline-block ms-2 btn text-secondary btn-link p-0 mb-2">Add another destination</button>
+

+                    <input asp-for="Outputs[0].DestinationAddress" class="form-control font-monospace" autofocus autocomplete="off" />

-                        <input asp-for="Outputs[0].Amount" type="number" step="any" min="0" asp-format="{0}" class="form-control output-amount" />
+                        <input asp-for="Outputs[0].Amount" type="number" step="any" min="0" asp-format="{0}" class="form-control output-amount hide-number-spin" />

                             =
-                            <input type="number" class="input-group-text fiat-value-edit-input py-0" min="0" step="any" style="max-width:100px" />
+                            <input type="number" class="input-group-text fiat-value-edit-input py-0 hide-number-spin" min="0" step="any" style="max-width:100px" />
                             @Model.Fiat

@@ -91,28 +94,29 @@
             }
             else
             {
-

-
Destinations

-

-

+

                     @for (var index = 0; index < Model.Outputs.Count; index++)
                     {
-

+

-                                        <input asp-for="Outputs[index].DestinationAddress" class="form-control" />
+                                        <input asp-for="Outputs[index].DestinationAddress" class="form-control" autocomplete="off" />

-                                            <input asp-for="Outputs[index].Amount" type="number" step="any" asp-format="{0}" class="form-control output-amount" />
-
+                                            <input asp-for="Outputs[index].Amount" type="number" min="0" step="any" asp-format="{0}" class="form-control output-amount hide-number-spin" />
+

+                                                =
+                                                <input type="number" class="input-group-text fiat-value-edit-input py-0 hide-number-spin" min="0" step="any" style="max-width:100px" />
+                                                @Model.Fiat
+

-                                            Your current balance is
+                                            Your available balance is
                                             <button type="button" class="crypto-balance-link btn btn-link p-0 align-baseline">@Model.CurrentBalance</button> @Model.CryptoCode.
                                             @if (Model.ImmatureBalance > 0)
                                             {
@@ -144,7 +148,7 @@
             }

-                <input asp-for="FeeSatoshiPerByte" type="number" step="any" class="form-control" style="max-width:14ch;" />
+                <input asp-for="FeeSatoshiPerByte" type="number" min="0" step="any" class="form-control" style="max-width:14ch;" />

                 @if (Model.RecommendedSatoshiPerByte.Any())
@@ -232,7 +236,6 @@

                 <button type="submit" id="SignTransaction" name="command" value="@(Model.NBXSeedAvailable ? "nbx-seed" : "sign")" class="btn btn-primary">Sign transaction</button>
-                <button type="submit" name="command" value="add-output" class="ms-2 btn btn-secondary">Add another destination</button>
                 <button type="button" id="bip21parse" class="ms-2 btn btn-secondary" title="Paste BIP21/Address"></button>
                 <button type="button" id="scanqrcode" class="ms-2 btn btn-secondary only-for-js" data-bs-toggle="modal" data-bs-target="#scanModal" title="Scan BIP21/Address with camera"></button>


Fixing broken Leave verb

Fixing broken Leave verb

--- src/Twilio.Twiml/TwilioResponse.cs
+++ src/Twilio.Twiml/TwilioResponse.cs
@@ -32,6 +32,7 @@
 			AllowedChildren.Add("Hangup");
 			AllowedChildren.Add("Pause");
             AllowedChildren.Add("Enqueue");
+            AllowedChildren.Add("Leave");
         }

         /// <summary>


Separated lower greek characters from capital greek characters in declaration in KeyboardInput

--- CSharpMath.Editor/Keyboards/KeyboardInput.cs
+++ CSharpMath.Editor/Keyboards/KeyboardInput.cs
@@ -14,14 +14,22 @@
     J = 'j', K = 'k', L = 'l', M = 'm', N = 'n', O = 'o', P = 'p', Q = 'q', R = 'r',
     S = 's', T = 't', U = 'u', V = 'v', W = 'w', X = 'x', Y = 'y', Z = 'z',

-    LowerA = 'a', LowerB = 'b', LowerC = 'c', LowerD = 'd', LowerE = 'e', LowerF = 'f', LowerG = 'g', LowerH = 'h', LowerI = 'i',
-    LowerJ = 'j', LowerK = 'k', LowerL = 'l', LowerM = 'm', LowerN = 'n', LowerO = 'o', LowerP = 'p', LowerQ = 'q', LowerR = 'r',
-    LowerS = 's', LowerT = 't', LowerU = 'u', LowerV = 'v', LowerW = 'w', LowerX = 'x', LowerY = 'y', LowerZ = 'z',
+    LowerA = 'a', LowerB = 'b', LowerC = 'c', LowerD = 'd', LowerE = 'e',
+    LowerF = 'f', LowerG = 'g', LowerH = 'h', LowerI = 'i', LowerJ = 'j',
+    LowerK = 'k', LowerL = 'l', LowerM = 'm', LowerN = 'n', LowerO = 'o',
+    LowerP = 'p', LowerQ = 'q', LowerR = 'r', LowerS = 's', LowerT = 't',
+    LowerU = 'u', LowerV = 'v', LowerW = 'w', LowerX = 'x', LowerY = 'y', LowerZ = 'z',

-    Α = 'Α', α = 'α', Β = 'Β', β = 'β', Γ = 'Γ', γ = 'γ', Δ = 'Δ', δ = 'δ', Ε = 'Ε', ε = 'ε', Ζ = 'Ζ', ζ = 'ζ',
-    Η = 'Η', η = 'η', Θ = 'Θ', θ = 'θ', Ι = 'Ι', ι = 'ι', Κ = 'Κ', κ = 'κ', Λ = 'Λ', λ = 'λ', Μ = 'Μ', μ = 'μ',
-    Ν = 'Ν', ν = 'ν', Ξ = 'Ξ', ξ = 'ξ', Ο = 'Ο', ο = 'ο', Π = 'Π', π = 'π', Ρ = 'Ρ', ρ = 'ρ', Σ = 'Σ', σ = 'σ',
-    ς = 'ς', Τ = 'Τ', τ = 'τ', Υ = 'Υ', υ = 'υ', Φ = 'Φ', φ = 'φ', Χ = 'Χ', χ = 'χ', Ω = 'Ω', ω = 'ω',
+    Alpha = 'Α', Beta = 'Β', Gamma = 'Γ', Delta = 'Δ', Epsilon = 'Ε', Zeta = 'Ζ',
+    Eta = 'Η', Theta = 'Θ', Iota = 'Ι', Kappa = 'Κ', Lambda = 'Λ', Mu = 'Μ', Nu = 'Ν',
+    Xi = 'Ξ', Omicron = 'Ο', Pi = 'Π', Rho = 'Ρ', Sigma = 'Σ', Tau = 'Τ', Upsilon = 'Υ',
+    Phi = 'Φ', Chi = 'Χ', Omega = 'Ω',
+
+    LowerAlpha = 'α', LowerBeta = 'β', LowerGamma = 'γ', LowerDelta = 'δ', LowerEpsilon = 'ε',
+    LowerZeta = 'ζ', LowerEta = 'η', LowerTheta = 'θ', LowerIota = 'ι', LowerKappa = 'κ',
+    LowerLambda = 'λ', LowerMu = 'μ', LowerNu = 'ν', LowerXi = 'ξ', LowerOmicron = 'ο',
+    LowerPi = 'π', LowerRho = 'ρ', LowerSigma = 'σ', LowerSigma2 = 'ς', LowerTau = 'τ',
+    LowerUpsilon = 'υ', LowerPhi = 'φ', LowerChi = 'χ', LowerOmega = 'ω',

   }


Modified configuration class

Modified configuration class

--- CenturyLinkCloudSDK/Runtime/Configuration.cs
+++ CenturyLinkCloudSDK/Runtime/Configuration.cs
@@ -9,23 +9,16 @@
 {
     public static class Configuration
     {
-        private static string baseUri = null;
+        private static string baseUri = Constants.ServiceUris.ApiBaseAddress;

         public static string BaseUri
         {
-            get
+            get
             {
-                if (string.IsNullOrEmpty(baseUri))
-                {
-                    return Constants.ServiceUris.ApiBaseAddress;
-                }
-                else
-                {
-                    return baseUri;
-                }
+                return baseUri;
             }

-            set
+            set
             {
                 baseUri = value;
             }


Updated version in AssemblyInfo

Updated version in AssemblyInfo

--- Cirqus.TypeScript/Properties/AssemblyInfo.cs
+++ Cirqus.TypeScript/Properties/AssemblyInfo.cs
@@ -32,4 +32,4 @@
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("0.1")]
 [assembly: AssemblyVersion("0.1")]
-[assembly: AssemblyFileVersion("0.1.7")]
+[assembly: AssemblyFileVersion("0.1.8")]


Cleanup a few style issues.

Cleanup a few style issues.

--- Mond.Tests/Binding/OperatorTests.cs
+++ Mond.Tests/Binding/OperatorTests.cs
@@ -107,7 +107,7 @@
         [Test]
         public void Nesting()
         {
-            var result = Script.Run( @"
+            var result = Script.Run(@"
                 fun divrem(x, y) {
                     fun (%%)(a, b) {
                         return {
@@ -120,38 +120,38 @@
                 }

                 return divrem(5, 2);
-            " );
+            ");

-            Assert.AreEqual( 2, (int)result["quotient"] );
-            Assert.AreEqual( 1, (int)result["remainder"] );
+            Assert.AreEqual(2, (int)result["quotient"]);
+            Assert.AreEqual(1, (int)result["remainder"]);

             // ensure the nested operator is not visible from the outer scopes
-            result = Script.Run( @"
+            result = Script.Run(@"
                 fun test() {
-                    fun (%%)( a, b ) {}
+                    fun (%%)(a, b) {}
                 }

                 return op_At == undefined ? global.op_At : op_At;
-            " );
+            ");

-            Assert.AreEqual( MondValue.Undefined, result );
+            Assert.AreEqual(MondValue.Undefined, result);
         }

         [Test]
         public void Decorated()
         {
-            var result = Script.Run( @"
+            var result = Script.Run(@"
                 fun double(fn) {
                     return fun(...args) -> fn(...args) * 2;
                 }

                 @double
-                fun (^^)( x ) -> x ** 2;
+                fun (^^)(x) -> x ** 2;

                 return ^^10;
-            " );
+            ");

-            Assert.AreEqual( 200, (int)result );
+            Assert.AreEqual(200, (int)result);
         }
     }
 }


Tiny fix

Tiny fix

--- Imaging/Palettes/FullPalette.cs
+++ Imaging/Palettes/FullPalette.cs
@@ -15,7 +15,7 @@

         public byte Size { get { return (byte)rgb_entries.Length; } }

-        public static IPalette Default
+        public static FullPalette DefaultColors
         {
             get
             {


version bump

version bump

--- NBitcoin/Properties/AssemblyInfo.cs
+++ NBitcoin/Properties/AssemblyInfo.cs
@@ -35,6 +35,6 @@
 // You can specify all the values or you can default the Build and Revision Numbers
 // by using the '*' as shown below:

-[assembly: AssemblyVersion("2.1.5.11")]
-[assembly: AssemblyFileVersion("2.1.5.11")]
-[assembly: AssemblyInformationalVersion("2.1.5.11")]
+[assembly: AssemblyVersion("2.1.5.12")]
+[assembly: AssemblyFileVersion("2.1.5.12")]
+[assembly: AssemblyInformationalVersion("2.1.5.12")]


Adapt to updated Rainbow APIs

Adapt to updated Rainbow APIs

--- src/Unicorn/UnicornDataProvider.cs
+++ src/Unicorn/UnicornDataProvider.cs
@@ -119,7 +119,7 @@

 			if (!_predicate.Includes(destinationItem).IsIncluded) // if the destination we are moving to is NOT included for serialization, we delete the existing item
 			{
-				var existingItem = _targetDataStore.GetByMetadata(oldSourceItem, oldSourceItem.DatabaseName);
+				var existingItem = _targetDataStore.GetByPathAndId(oldSourceItem.Path, oldSourceItem.Id, oldSourceItem.DatabaseName);

 				if (existingItem != null)
 				{
@@ -136,7 +136,7 @@

 				var sourceItem = GetSourceFromDefinition(itemDefinition); // re-get the item with cache disabled

-
+

 				// this allows us to filter out any excluded children by predicate when the data store moves children
 				var predicatedItem = new PredicateFilteredItemData(sourceItem, _predicate);
@@ -178,7 +178,7 @@

 			if (existingItem == null) return; // it was already gone or an item from a different data provider

-			if(_targetDataStore.Remove(existingItem))
+			if (_targetDataStore.Remove(existingItem))
 				_logger.DeletedItem(_targetDataStore.FriendlyName, existingItem);
 		}