added TestIntersect

added TestIntersect

--- BuildingCoder/BuildingCoder/Properties/AssemblyInfo.cs
+++ BuildingCoder/BuildingCoder/Properties/AssemblyInfo.cs
@@ -236,6 +236,7 @@
 // 2018-05-23 2019.0.141.0 implemented CmdExteriorWalls for https://forums.autodesk.com/t5/revit-api-forum/how-do-i-get-all-the-outermost-walls-in-the-model/m-p/7998948
 // 2018-05-24 2019.0.141.1 added GetFamilyInstancesSatisfyingFilterRule from https://forums.autodesk.com/t5/revit-api-forum/how-to-filter-element-which-satisfy-filter-rule/m-p/8020317
 // 2018-05-24 2019.0.142.0 added CmdFlowMismatch from https://forums.autodesk.com/t5/revit-api-forum/application-level-macro-flow-mismatch/m-p/8032555
+// 2018-06-21 2019.0.142.1 added TestIntersect from https://forums.autodesk.com/t5/revit-api-forum/surprising-results-from-face-intersect-face-method/m-p/8079881
 //
 [assembly: AssemblyVersion( "2019.0.142.0" )]
 [assembly: AssemblyFileVersion( "2019.0.142.0" )]


IBufferSource: update comment

IBufferSource: update comment

--- CSharpGL/Scene/SceneNodes/RenderUnits/IBufferSource.cs
+++ CSharpGL/Scene/SceneNodes/RenderUnits/IBufferSource.cs
@@ -2,21 +2,20 @@
 namespace CSharpGL
 {
     /// <summary>
-    /// Data for CPU(model) -> Data for GPU(opengl buffer)
-    /// <para>从模型的数据格式转换为<see cref="GLBuffer"/></para>，
-    /// <see cref="GLBuffer"/>则可用于控制GPU的渲染操作。
+    /// Provides <see cref="VertexBuffer"/>s and <see cref="IDrawCommand"/>s for GPU memory from data in CPU memory.
     /// </summary>
     public interface IBufferSource
     {
         /// <summary>
-        /// Gets vertex buffer of some vertex attribute specified with <paramref name="bufferName"/>.
-        /// <para>The vertex buffer is sliced into blocks of same size(except the last one when the remainder is not 0.) I recommend 1024*1024*4 as block size, which is the block size in OVITO.</para>
+        /// Gets vertex buffers of the vertex attribute specified with <paramref name="bufferName"/>.
+        /// <para>The vertex buffer is sliced into blocks of same size(except the last one when the remainder is not 0.) I recommend 1024*1024*4(bytes) as block size, which is the block size in OVITO.</para>
         /// </summary>
-        /// <param name="bufferName">CPU代码指定的buffer名字，用以区分各个用途的buffer。</param>
+        /// <param name="bufferName">user defined buffer name used to specify vertex attribute.</param>
         /// <returns></returns>
         IEnumerable<VertexBuffer> GetVertexAttributeBuffer(string bufferName);

         /// <summary>
+        /// Gets the <see cref="IDrawCommand"/> used to draw with vertex attribute buffers.
         /// </summary>
         /// <returns></returns>
         IEnumerable<IDrawCommand> GetDrawCommand();


Changed assembly title & product

Changed assembly title & product

--- ChessOk.ModelFramework.Core/Properties/AssemblyInfo.cs
+++ ChessOk.ModelFramework.Core/Properties/AssemblyInfo.cs
@@ -2,16 +2,16 @@
 using System.Runtime.CompilerServices;
 using System.Runtime.InteropServices;

-[assembly: AssemblyTitle("ChessOk.ModelFramework.Core")]
+[assembly: AssemblyTitle("ModelFramework.Core")]
 [assembly: AssemblyDescription("Core components for ModelFramework: application bus, validation context, sync and async commands")]
 [assembly: AssemblyCompany("Convekta Ltd.")]
-[assembly: AssemblyProduct("ChessOk.ModelFramework.Core")]
+[assembly: AssemblyProduct("ModelFramework.Core")]
 [assembly: AssemblyCopyright("Copyright © Convekta Ltd. 2011, 2012")]

 [assembly: ComVisible(false)]

 [assembly: Guid("0f9cc450-a3ba-4cb0-aa39-6967669c710d")]
 [assembly: AssemblyVersion("3.0.0.*")]
-[assembly: AssemblyInformationalVersion("3.0.0-alpha2")]
+[assembly: AssemblyInformationalVersion("3.0.0-alpha3")]

 [assembly: InternalsVisibleTo("ChessOk.ModelFramework.Core.Tests")]


Excel v0.4

Excel v0.4

--- Com.Ericmas001.Office.Excel/Properties/AssemblyInfo.cs
+++ Com.Ericmas001.Office.Excel/Properties/AssemblyInfo.cs
@@ -32,5 +32,5 @@
 // You can specify all the values or you can default the Build and Revision Numbers
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("0.3.0.0")]
-[assembly: AssemblyFileVersion("0.3.0.0")]
+[assembly: AssemblyVersion("0.4.0.0")]
+[assembly: AssemblyFileVersion("0.4.0.0")]


Updated ByteWriterStream, added code needed for single thread (re)writing, async write is not supported

--- CustomBlocks/Serialization/Private/ByteWriterStream.cs
+++ CustomBlocks/Serialization/Private/ByteWriterStream.cs
@@ -33,94 +33,147 @@
 	/// <summary>
 	/// Service class for use with serialization herlpers.
 	/// Used to overwrite data INSIDE already created byte array at specified offset.
-	/// Implements only minimal functional, needed for current serialization helpers to work.
 	/// </summary>
 	public sealed class ByteWriterStream : Stream
 	{
-		public int AffectedRange { get { throw new NotSupportedException("AffectedRange: SORRY, BUT NO!"); } }
+		private readonly byte[] source;
+		private readonly int lowerBound;
+		private int upperBound;
+
+		private volatile bool isDisposed;
+		private int pos;

 		public ByteWriterStream(byte[] source, int offset = 0)
 		{
-			//TODO:
+			if(source == null)
+				throw new ArgumentException("source array cannot be null", "source");
+			this.source = source;
+			//some checks and calculations
+			if(offset < 0)
+				throw new ArgumentException("offset < 0", "offset");
+			lowerBound = upperBound = pos = offset;
+			isDisposed = false;
 		}

-		public override bool CanRead { get { throw new NotSupportedException("CanRead: SORRY, BUT NO!"); } }
-		public override bool CanSeek { get { throw new NotSupportedException("CanSeek: SORRY, BUT NO!"); } }
-		public override bool CanTimeout { get { throw new NotSupportedException("CanTimeout: SORRY, BUT NO!"); } }
-		public override bool CanWrite { get { throw new NotSupportedException("CanWrite: SORRY, BUT NO!"); } }
-		public override long Length { get { throw new NotSupportedException("Length: SORRY, BUT NO!"); } }
+		public override bool CanRead { get { return false; } }
+
+		public override bool CanSeek { get { return !isDisposed; } }
+
+		public override bool CanWrite { get { return !isDisposed; } }
+
+		public override long Length
+		{
+			get
+			{
+				if(isDisposed)
+					throw new ObjectDisposedException("ByteWriterStream", "ByteWriterStream is disposed!");
+				return upperBound - lowerBound;
+			}
+		}

 		public override long Position
 		{
-			get { throw new NotSupportedException("Position get: SORRY, BUT NO!"); }
-			set { throw new NotSupportedException("Position set: SORRY, BUT NO!"); }
-		}
-
-		public override int ReadTimeout
-		{
-			get { throw new NotSupportedException("ReadTimeout get: SORRY, BUT NO!"); }
-			set { throw new NotSupportedException("ReadTimeout set: SORRY, BUT NO!"); }
-		}
-
-		public override int WriteTimeout
-		{
-			get { throw new NotSupportedException("WriteTimeout get: SORRY, BUT NO!"); }
-			set { throw new NotSupportedException("WriteTimeout set: SORRY, BUT NO!"); }
+			get
+			{
+				if(isDisposed)
+					throw new ObjectDisposedException("ByteWriterStream", "ByteWriterStream is disposed!");
+				return pos - lowerBound;
+			}
+			set
+			{
+				if(isDisposed)
+					throw new ObjectDisposedException("ByteWriterStream", "ByteWriterStream is disposed!");
+				pos = unchecked((int)(value + lowerBound));
+			}
 		}

 		public override IAsyncResult BeginRead(byte[] buffer, int offset, int count, AsyncCallback callback, object state)
-		{ throw new NotSupportedException("BeginRead: SORRY, BUT NO!"); }
+		{ throw new NotSupportedException("BeginRead"); }

 		public override IAsyncResult BeginWrite(byte[] buffer, int offset, int count, AsyncCallback callback, object state)
-		{ throw new NotSupportedException("BeginWrite: SORRY, BUT NO!"); }
-
-		public override void Close()
-		{ throw new NotSupportedException("Close: SORRY, BUT NO!"); }
+		{ throw new NotSupportedException("BeginWrite"); }

 		public override Task CopyToAsync(Stream destination, int bufferSize, CancellationToken cancellationToken)
-		{ throw new NotSupportedException("CopyToAsync: SORRY, BUT NO!"); }
-
-		[Obsolete("CreateWaitHandle will throw NotSupportedException")]
-		protected override WaitHandle CreateWaitHandle()
-		{ throw new NotSupportedException("CreateWaitHandle: SORRY, BUT NO!"); }
+		{ throw new NotSupportedException("CopyToAsync"); }

 		protected override void Dispose(bool disposing)
-		{ throw new NotSupportedException("Dispose: SORRY, BUT NO!"); }
+		{ isDisposed = true; }

 		public override int EndRead(IAsyncResult asyncResult)
-		{ throw new NotSupportedException("EndRead: SORRY, BUT NO!"); }
+		{ throw new NotSupportedException("EndRead"); }

 		public override void EndWrite(IAsyncResult asyncResult)
-		{ throw new NotSupportedException("EndWrite: SORRY, BUT NO!"); }
+		{ throw new NotSupportedException("EndWrite"); }

-		public override void Flush()
-		{ throw new NotSupportedException("Flush: SORRY, BUT NO!"); }
-
-		public override Task FlushAsync(CancellationToken cancellationToken)
-		{ throw new NotSupportedException("FlushAsync: SORRY, BUT NO!"); }
+		public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
+		{ throw new NotSupportedException("ReadAsync"); }

 		public override int Read(byte[] buffer, int offset, int count)
-		{ throw new NotSupportedException("Read: SORRY, BUT NO!"); }
-
-		public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
-		{ throw new NotSupportedException("ReadAsync: SORRY, BUT NO!"); }
+		{ throw new NotSupportedException("Read"); }

 		public override int ReadByte()
-		{ throw new NotSupportedException("ReadAsync: SORRY, BUT NO!"); }
+		{ throw new NotSupportedException("ReadByte"); }

 		public override long Seek(long offset, SeekOrigin origin)
-		{ throw new NotSupportedException("Seek: SORRY, BUT NO!"); }
+		{
+			if(isDisposed)
+				throw new ObjectDisposedException("ByteWriterStream", "ByteWriterStream is disposed!");
+			switch(origin)
+			{
+			case SeekOrigin.Begin:
+				pos = unchecked((int)(lowerBound + offset));
+				break;
+			case SeekOrigin.Current:
+				pos += unchecked((int)offset);
+				break;
+			default:
+				pos = unchecked((int)(upperBound + offset));
+				break;
+			}
+			return Position;
+		}
+
+		public override void Flush() {/* NOOP */}

 		public override void SetLength(long value)
-		{ throw new NotSupportedException("SetLength: SORRY, BUT NO!"); }
+		{
+			if(isDisposed)
+				throw new ObjectDisposedException("ByteWriterStream", "ByteWriterStream is disposed!");
+			if(value < 0)
+				throw new IOException("requested length < 0");
+			upperBound = unchecked((int)(lowerBound + value));
+		}
+
+		public override Task WriteAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
+		{ throw new NotSupportedException("WriteAsync"); }

 		public override void Write(byte[] buffer, int offset, int count)
-		{ throw new NotSupportedException("Write: SORRY, BUT NO!"); }
-
-		public override Task WriteAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
-		{ throw new NotSupportedException("WriteAsync: SORRY, BUT NO!"); }
+		{
+			if(isDisposed)
+				throw new ObjectDisposedException("ByteWriterStream", "ByteWriterStream is disposed!");
+			if(offset < 0)
+				throw new ArgumentOutOfRangeException("offset", "offset < 0");
+			if(count < 0)
+				throw new ArgumentOutOfRangeException("count", "count < 0");
+			if(buffer == null)
+				throw new ArgumentNullException("buffer", "buffer is null");
+			if(offset + count > buffer.Length)
+				throw new ArgumentException("offset+count > buffer.Length");
+			if(count == 0)
+				return;
+			Buffer.BlockCopy(buffer, offset, source, pos, count);
+			pos += count;
+			if(pos > upperBound)
+				upperBound = pos;
+		}

 		public override void WriteByte(byte value)
-		{ throw new NotSupportedException("WriteByte: SORRY, BUT NO!"); }
+		{
+			if(isDisposed)
+				throw new ObjectDisposedException("ByteWriterStream", "ByteWriterStream is disposed!");
+			source[pos++] = value;
+			if(pos > upperBound)
+				upperBound = pos;
+		}
 	}
 }


留下使用VAO和不使用VAO这两种进行渲染的方式。

留下使用VAO和不使用VAO这两种进行渲染的方式。

--- Demos/CSharpGL.Objects.Demos/DemoHexahedron1Element.cs
+++ Demos/CSharpGL.Objects.Demos/DemoHexahedron1Element.cs
@@ -188,15 +188,12 @@
             // create vao
             {
                 this.vao = new uint[1];
-
                 GL.GenVertexArrays(1, vao);
-
                 GL.BindVertexArray(vao[0]);

                 // prepare positions
                 {
                     uint in_PositionLocation = shaderProgram.GetAttributeLocation(strin_Position);
-
                     GL.BindBuffer(BufferTarget.ArrayBuffer, positionBuffer);
                     GL.VertexAttribPointer(in_PositionLocation, 3, GL.GL_FLOAT, false, 0, IntPtr.Zero);
                     GL.EnableVertexAttribArray(in_PositionLocation);
@@ -204,12 +201,10 @@
                 // prepare colors
                 {
                     uint in_ColorLocation = shaderProgram.GetAttributeLocation(strin_Color);
-
                     GL.BindBuffer(BufferTarget.ArrayBuffer, colorBuffer);
                     GL.VertexAttribPointer(in_ColorLocation, 3, GL.GL_FLOAT, false, 0, IntPtr.Zero);
                     GL.EnableVertexAttribArray(in_ColorLocation);
                 }
-
                 // prepare index
                 {
                     GL.BindBuffer(BufferTarget.ElementArrayBuffer, indexBuffer);
@@ -217,7 +212,6 @@

                 //  Unbind the vertex array, we've finished specifying data for it.
                 GL.BindVertexArray(0);
-
             }
         }

@@ -254,16 +248,15 @@
             GL.Enable(GL.GL_PRIMITIVE_RESTART);
             GL.PrimitiveRestartIndex(uint.MaxValue);

+            // the way with VAO:
             GL.BindVertexArray(vao[0]);
-
-            //int size = this.size;
-            //int count = size * size * size * 15;
-            //GL.DrawElements(PrimitiveModes.TriangleStrip, count, GL.GL_UNSIGNED_INT, IntPtr.Zero);
-
+            GL.DrawElements(DrawMode.TriangleStrip, this.count, GL.GL_UNSIGNED_INT, IntPtr.Zero);
+            GL.BindVertexArray(0);
+
+            // the way without vAO:
             //// prepare positions
             //{
             //    uint in_PositionLocation = shaderProgram.GetAttributeLocation(strin_Position);
-
             //    GL.BindBuffer(BufferTarget.ArrayBuffer, positionBuffer);
             //    GL.VertexAttribPointer(in_PositionLocation, 3, GL.GL_FLOAT, false, 0, IntPtr.Zero);
             //    GL.EnableVertexAttribArray(in_PositionLocation);
@@ -271,22 +264,15 @@
             //// prepare colors
             //{
             //    uint in_ColorLocation = shaderProgram.GetAttributeLocation(strin_Color);
-
             //    GL.BindBuffer(BufferTarget.ArrayBuffer, colorBuffer);
             //    GL.VertexAttribPointer(in_ColorLocation, 3, GL.GL_FLOAT, false, 0, IntPtr.Zero);
             //    GL.EnableVertexAttribArray(in_ColorLocation);
             //}
-
             //// prepare index
             //{
             //    GL.BindBuffer(BufferTarget.ElementArrayBuffer, indexBuffer);
             //}

-
-            GL.DrawElements(DrawMode.TriangleStrip, this.count, GL.GL_UNSIGNED_INT, IntPtr.Zero);
-
-            //GL.BindVertexArray(0);
-
             GL.Disable(GL.GL_PRIMITIVE_RESTART);
         }


NCBC-134: Failover on bootstrap node never recovers

--- Enyim.Caching/Memcached/Locators/VBucketNodeLocator.cs
+++ Enyim.Caching/Memcached/Locators/VBucketNodeLocator.cs
@@ -76,7 +76,7 @@
 		IMemcachedNode IMemcachedNodeLocator.Locate(string key)
 		{
 			var bucket = this.GetVBucket(key);
-
+			if (bucket.Master == -1) return null; //situation during a failover, before a rebalance
 			return this.nodes[bucket.Master];
 		}


Typo in the 'About' box

Typo in the 'About' box

--- Eve-O-Preview/View/Implementation/MainForm.Designer.cs
+++ Eve-O-Preview/View/Implementation/MainForm.Designer.cs
@@ -820,7 +820,7 @@
 			DocumentationLinkLabel.Padding = new System.Windows.Forms.Padding(12, 5, 12, 5);
 			DocumentationLinkLabel.Size = new System.Drawing.Size(336, 30);
 			DocumentationLinkLabel.TabIndex = 6;
-			DocumentationLinkLabel.Text = "For more information visit our forum thread:";
+			DocumentationLinkLabel.Text = "For more information visit the forum thread:";
 			//
 			// DescriptionLabel
 			//


small change for SEO purposes

small change for SEO purposes

--- ExpressEntryCalculator.Web/Views/Shared/_Layout.cshtml
+++ ExpressEntryCalculator.Web/Views/Shared/_Layout.cshtml
@@ -6,7 +6,7 @@
     <meta http-equiv="X-UA-Compatible" content="IE=edge" />
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
     <title>Express Entry Calculator @ViewData["Title"]</title>
-    <meta name="description" content="Program which calculates points for Canadian immigration system called
+    <meta name="description" content="Express Entry Calculator calculates points for Canadian immigration system called
           Express Entry based on Comprehensive Ranking System (CRS) Criteria." />
     <meta name="keywords" content="Immigration to Canada, Canada immigration system, Express Entry points, Express Entry calculator, Express Entry,
           Canada Express Entry, canadian Provincial Nominee Program, Provincial Nominee Program, Skilled worker in Canada, Express Entry profile, permanent residence in Canada, Canadian permanent residence, Comprehensive Ranking System" />


Changed collection change tracker to use generic type argument instead of reflection.

--- Expressions/Expressions/Execution/IExecutionContext.cs
+++ Expressions/Expressions/Execution/IExecutionContext.cs
@@ -11,7 +11,7 @@
     {
         void AddChangeListener(INotifiable node, INotifyPropertyChanged element, string propertyName);

-        void AddChangeListener(INotifiable node, INotifyCollectionChanged collection);
+        void AddChangeListener<T>(INotifiable node, INotifyCollectionChanged collection);

         void RemoveChangeListener(INotifiable node, INotifyPropertyChanged element, string propertyName);


Remove extra scaling options for now.

Remove extra scaling options for now.

--- Lyon/GameForm.cs
+++ Lyon/GameForm.cs
@@ -112,8 +112,6 @@
             scale1xMenuItem.Click += (sender, e) => { SetScale(1); };
             scale2xMenuItem.Click += (sender, e) => { SetScale(2); };
             scale3xMenuItem.Click += (sender, e) => { SetScale(3); };
-            scale4xToolStripMenuItem.Click += (sender, e) => { SetScale(4); };
-            scale5xToolStripMenuItem.Click += (sender, e) => { SetScale(5); };
             dumpRAMToolStripMenuItem.Click += (sender, e) => { DumpRam(); };
         }


Add CORS Header

Add CORS Header

--- app/XLParser.Web/Parse.cs
+++ app/XLParser.Web/Parse.cs
@@ -40,6 +40,9 @@
                 context.Response.Cache.SetExpires(DateTime.Now.AddMinutes(5));
                 context.Response.Cache.SetMaxAge(new TimeSpan(0, 0, 5));
             }
+
+            context.Response.AddHeader("Access-Control-Allow-Origin", "*");
+

             // Dynamically load a library version
             var xlParserVersion = context.Request.Params["version"] ?? LatestVersion;


--- Fluent.Ribbon/Automation/Peers/RibbonAutomationPeer.cs
+++ Fluent.Ribbon/Automation/Peers/RibbonAutomationPeer.cs
@@ -115,11 +115,13 @@

                 if (automationPeer != null)
                 {
-                    automationPeer.ResetChildrenCache();
+                    // Resetting the children cache might call a recursive loop...
+                    //automationPeer.ResetChildrenCache();

                     var ribbonTabs = automationPeer.GetChildren();
                     children.AddRange(ribbonTabs);
-                    ribbonTabs.ForEach(x => x.ResetChildrenCache());
+                    // Resetting the children cache might call a recursive loop...
+                    //ribbonTabs.ForEach(x => x.ResetChildrenCache());
                 }
             }


implemented IDisposable

implemented IDisposable

--- MPR121/MPR121.cs
+++ MPR121/MPR121.cs
@@ -8,7 +8,7 @@

 namespace Windows.IoT.Core.HWInterfaces.MPR121
 {
-    public class MPR121
+    public class MPR121:IDisposable
     {
         private const byte MPR121_I2CADDR_DEFAULT = 0x5A;
         private const int IRQ_HOOKUPPIN_DEFAULT = 5;
@@ -54,7 +54,7 @@

             //Establish I2C connection
             __connection = await I2cDevice.FromIdAsync(i2cMasterId, new I2cConnectionSettings(this.__i2cAddress));
-
+
             // soft reset
             I2cTransferResult result = __connection.WritePartial(new byte[] { Registers.MPR121_SOFTRESET, 0x63 });

@@ -217,6 +217,11 @@
         {
             if (PinReleased != null) { PinReleased(this, releasedEventArgs); }
         }
+
+        public void Dispose()
+        {
+            __connection.Dispose();
+        }
         #endregion "Events"

     }


bump minor

bump minor

--- facturapi-net/Properties/AssemblyInfo.cs
+++ facturapi-net/Properties/AssemblyInfo.cs
@@ -32,5 +32,5 @@
 // You can specify all the values or you can default the Build and Revision Numbers
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("0.1.4.*")]
-[assembly: AssemblyFileVersion("0.1.4.0")]
+[assembly: AssemblyVersion("0.2.1.*")]
+[assembly: AssemblyFileVersion("0.2.1.0")]


restrict messages size

restrict messages size

--- src/reyna.Facts/GivenAReynaService.cs
+++ src/reyna.Facts/GivenAReynaService.cs
@@ -22,6 +22,9 @@
             this.ReynaService.StoreService = this.StoreService.Object;
             this.ReynaService.ForwardService = this.ForwardService.Object;
             this.ReynaService.NetworkStateService = this.NetworkStateService.Object;
+
+            Registry.LocalMachine.DeleteSubKey(@"Software\Reyna\PeriodicBackoutCheck", false);
+            Registry.LocalMachine.DeleteSubKey(@"Software\Reyna", false);
         }

         private Mock<IRepository> VolatileStore { get; set; }


Fix for not saving first update of card

Fix for not saving first update of card

--- LunchMoneyModels/LunchCardViewModel.cs
+++ LunchMoneyModels/LunchCardViewModel.cs
@@ -44,12 +44,24 @@
             }
         }

+        #region IsolatedStorage methods
+
+        public void Update(LunchCard card)
+        {
+            IsolatedStorageSettings settings = IsolatedStorageSettings.ApplicationSettings;
+            settings[GetCardHash(card)] = card.getCopy();
+        }
+
         public void Add(LunchCard card)
         {
             IsolatedStorageSettings settings = IsolatedStorageSettings.ApplicationSettings;
             card.ServerUrl = Config.SERVER_URL;
             LunchCards.Add(card);
             settings.Add(GetCardHash(card), card.getCopy());
+            card.PropertyChanged += new PropertyChangedEventHandler(delegate(object sender, PropertyChangedEventArgs args)
+            {
+                Update((LunchCard) sender);
+            });
         }

         public void Del(LunchCard card)
@@ -58,6 +70,8 @@
             LunchCards.Remove(card);
             settings.Remove(GetCardHash(card));
         }
+
+        #endregion

         private string GetCardHash(LunchCard card)
         {


serialize faceset information in AlembicMaterial component

--- AlembicImporter/Assets/AlembicImporter/Scripts/AlembicMaterial.cs
+++ AlembicImporter/Assets/AlembicImporter/Scripts/AlembicMaterial.cs
@@ -17,6 +17,7 @@
         public List<int> faces;
     }

+    [Serializable]
     public class Facesets
     {
         public int[] faceCounts;
@@ -25,7 +26,8 @@

     bool dirty = false;
     List<Material> materials = new List<Material>();
-    Facesets facesetsCache = new Facesets { faceCounts = new int[0], faceIndices = new int[0] };
+    // Need to keep those around when scene is serialized
+    [HideInInspector] public Facesets facesetsCache = new Facesets { faceCounts = new int[0], faceIndices = new int[0] };

     void Start()
     {


Added a try catch on metrics event raise.

We cannot tolerate that some external project will throw exception
during metrics generating an halt in the system.

--- Jarvis.Framework.Shared/Support/SharedMetricsHelper.cs
+++ Jarvis.Framework.Shared/Support/SharedMetricsHelper.cs
@@ -2,13 +2,8 @@
 using Jarvis.Framework.Shared.Exceptions;
 using Jarvis.Framework.Shared.Messages;
 using Metrics;
-using Newtonsoft.Json;
 using System;
 using System.Collections.Generic;
-using System.Linq;
-using System.Security;
-using System.Text;
-using System.Threading.Tasks;

 namespace Jarvis.Framework.Shared.Support
 {
@@ -59,9 +54,11 @@
         /// </summary>
         public static event EventHandler<EventHappenedEventArgs> EventHappened;

+        public const String DomainExceptionEventName = "DomainException";
+
         private static void RaiseDomainExceptionEventHappened(ICommand command, DomainException exception)
         {
-            EventHappened?.Invoke(null, new EventHappenedEventArgs("DomainException", new Dictionary<String, String>()
+            RaiseEventHappened(new EventHappenedEventArgs(DomainExceptionEventName, new Dictionary<String, String>()
             {
                 ["CommandId"] = command.MessageId.ToString(),
                 ["UserId"] = command.GetContextData(MessagesConstants.UserId),
@@ -69,22 +66,44 @@
             }));
         }

+        public const String SecurityExceptionEventName = "SecurityException";
+
         private static void RaiseSecurityExceptionEventHappened(ICommand command)
         {
-            EventHappened?.Invoke(null, new EventHappenedEventArgs("SecurityException", new Dictionary<String, String>()
+            RaiseEventHappened(new EventHappenedEventArgs(SecurityExceptionEventName, new Dictionary<String, String>()
             {
                 ["CommandId"] = command.MessageId.ToString(),
                 ["UserId"] = command.GetContextData(MessagesConstants.UserId)
             }));
         }

+        public const String CommandExecutedEventName = "CommandExecuted";
+
         private static void RaiseCommandExecutedEventHappened(ICommand command)
         {
-            EventHappened?.Invoke(null, new EventHappenedEventArgs("CommandExecuted", new Dictionary<String, String>()
+            RaiseEventHappened(new EventHappenedEventArgs(CommandExecutedEventName, new Dictionary<String, String>()
             {
                 ["CommandType"] = command.GetType().Name,
                 ["UserId"] = command.GetContextData(MessagesConstants.UserId)
             }));
+        }
+
+        private static void RaiseEventHappened(EventHappenedEventArgs args)
+        {
+            try
+            {
+                EventHappened?.Invoke(null, args);
+            }
+            catch (OutOfMemoryException)
+            {
+                throw;
+            }
+#pragma warning disable RCS1075 // Avoid empty catch clause that catches System.Exception.
+            catch (Exception)
+#pragma warning restore RCS1075 // Avoid empty catch clause that catches System.Exception.
+            {
+                //External code throw error, simply ignore.
+            }
         }
     }


- try-catch on Directory.Delete

- try-catch on Directory.Delete

--- Judge/Judge.JudgeService/JudgeServiceImplementation.cs
+++ Judge/Judge.JudgeService/JudgeServiceImplementation.cs
@@ -102,7 +102,15 @@
         {
             if (Directory.Exists(_workingDirectory))
             {
-                Directory.Delete(_workingDirectory, true);
+                //TODO: remove directory with retry
+                try
+                {
+                    Directory.Delete(_workingDirectory, true);
+                }
+                catch
+                {
+                    // ignored
+                }
             }
         }


[*] language switch fix (for clean win 10 installations)

--- Langlay.App/Services/SimulatorLanguageSetterService.cs
+++ Langlay.App/Services/SimulatorLanguageSetterService.cs
@@ -92,6 +92,11 @@
                 CurrentLanguageSwitchSequence = Utils.ParseInt(Registry.GetValue(
                     ToggleKey,
                     "Hotkey", null));
+                if (CurrentLanguageSwitchSequence == null)
+                {
+                    // this is by default (on Win10 at least)
+                    CurrentLanguageSwitchSequence = WindowsSequenceCode.AltShift;
+                }
             }
             CurrentLayoutSwitchSequence = Utils.ParseInt(Registry.GetValue(
                 ToggleKey,


Code cleanup.

Code cleanup.

--- source/Cosmos.System2/FileSystem/FAT/FatStream.cs
+++ source/Cosmos.System2/FileSystem/FAT/FatStream.cs
@@ -31,12 +31,7 @@

         public FatStream(FatDirectoryEntry aEntry)
         {
-            if (aEntry == null)
-            {
-                throw new ArgumentNullException(nameof(aEntry));
-            }
-
-            mDirectoryEntry = aEntry;
+            mDirectoryEntry = aEntry ?? throw new ArgumentNullException(nameof(aEntry));
             mFS = aEntry.GetFileSystem();
             mFatTable = aEntry.GetFatTable();
             mSize = aEntry.mSize;
@@ -47,29 +42,11 @@
             }
         }

-        public override bool CanSeek
-        {
-            get
-            {
-                return true;
-            }
-        }
-
-        public override bool CanRead
-        {
-            get
-            {
-                return true;
-            }
-        }
-
-        public override bool CanWrite
-        {
-            get
-            {
-                return true;
-            }
-        }
+        public override bool CanSeek => true;
+
+        public override bool CanRead => true;
+
+        public override bool CanWrite => true;

         public sealed override long Length
         {
@@ -78,7 +55,7 @@
                 Global.mFileSystemDebugger.SendInternal("-- FatStream.get_Length --");
                 Global.mFileSystemDebugger.SendInternal("Length =");
                 Global.mFileSystemDebugger.SendInternal(mSize);
-                return (long)mSize;
+                return mSize;
             }
         }

@@ -89,7 +66,7 @@
                 Global.mFileSystemDebugger.SendInternal("-- FatStream.get_Position --");
                 Global.mFileSystemDebugger.SendInternal("Position =");
                 Global.mFileSystemDebugger.SendInternal(mPosition);
-                return (long)mPosition;
+                return mPosition;
             }
             set
             {


ConsoleLogger can print or hide associated exceptions.

--- source/Mechanical3.NET45/Loggers/ConsoleLogger.cs
+++ source/Mechanical3.NET45/Loggers/ConsoleLogger.cs
@@ -8,17 +8,15 @@
     /// </summary>
     public class ConsoleLogger : ILogger
     {
-        //// NOTE: here are all the combinations: https://scissortools.wordpress.com/2011/12/01/setting-text-color-in-the-console-output/
+        private readonly bool printExceptions;

-        private static void Write( LogEntry entry, ConsoleColor textColor, ConsoleColor backColor = ConsoleColor.Black )
+        /// <summary>
+        /// Initializes a new instance of the <see cref="ConsoleLogger"/> class.
+        /// </summary>
+        /// <param name="printExceptions"><c>true</c> to print associated exceptions; <c>false</c> to ignore them.</param>
+        public ConsoleLogger( bool printExceptions )
         {
-            var prevBackground = Console.BackgroundColor;
-            var prevForeground = Console.ForegroundColor;
-            Console.BackgroundColor = backColor;
-            Console.ForegroundColor = textColor;
-            Console.WriteLine($"{entry.Timestamp.ToLocalTime().ToString("s").Replace('T', ' ')} [{entry.Level.ToString()[0]}] {entry.Message}");
-            Console.BackgroundColor = prevBackground;
-            Console.ForegroundColor = prevForeground;
+            this.printExceptions = printExceptions;
         }

         /// <summary>
@@ -33,28 +31,47 @@
             switch( entry.Level )
             {
             case LogLevel.Debug:
-                Write(entry, textColor: ConsoleColor.Gray);
+                this.Write(entry, textColor: ConsoleColor.Gray);
                 break;

             case LogLevel.Information:
-                Write(entry, textColor: ConsoleColor.Cyan);
+                this.Write(entry, textColor: ConsoleColor.Cyan);
                 break;

             case LogLevel.Warning:
-                Write(entry, textColor: ConsoleColor.Yellow);
+                this.Write(entry, textColor: ConsoleColor.Yellow);
                 break;

             case LogLevel.Error:
-                Write(entry, textColor: ConsoleColor.Red);
+                this.Write(entry, textColor: ConsoleColor.Red);
                 break;

             case LogLevel.Fatal:
-                Write(entry, textColor: ConsoleColor.Black, backColor: ConsoleColor.Red);
+                this.Write(entry, textColor: ConsoleColor.Black, backColor: ConsoleColor.Red);
                 break;

             default:
                 throw new NotImplementedException().StoreFileLine();
             }
         }
+
+        private void Write( LogEntry entry, ConsoleColor textColor, ConsoleColor backColor = ConsoleColor.Black )
+        {
+            //// NOTE: here are all the combinations: https://scissortools.wordpress.com/2011/12/01/setting-text-color-in-the-console-output/
+
+            var prevBackground = Console.BackgroundColor;
+            var prevForeground = Console.ForegroundColor;
+            Console.BackgroundColor = backColor;
+            Console.ForegroundColor = textColor;
+
+            Console.WriteLine($"{entry.Timestamp.ToLocalTime().ToString("s").Replace('T', ' ')} [{entry.Level.ToString()[0]}] {entry.Message}");
+
+            if( this.printExceptions
+             && entry.Exception.NotNullReference() )
+                Console.WriteLine(SafeString.DebugPrint(entry.Exception));
+
+            Console.BackgroundColor = prevBackground;
+            Console.ForegroundColor = prevForeground;
+        }
     }
 }


Fix console background color.

Fix console background color.

--- source/Nuke.Core/OutputSinks/ConsoleOutputSink.cs
+++ source/Nuke.Core/OutputSinks/ConsoleOutputSink.cs
@@ -91,7 +91,10 @@
             var previousForeground = Console.ForegroundColor;
             var backgroundColor = Console.BackgroundColor;

-            var hasDarkBackground = backgroundColor == ConsoleColor.Black || backgroundColor.ToString().StartsWith("Dark");
+            // TODO: can we determine the actual console background color?
+            var hasDarkBackground = (int) backgroundColor == -1
+                                    || backgroundColor == ConsoleColor.Black
+                                    || backgroundColor.ToString().StartsWith("Dark");

             using (DelegateDisposable.CreateBracket(
                 () => Console.ForegroundColor = hasDarkBackground ? brightForeground : darkForeground,


Allow reading of arrays of primitives from variants

--- MessageReader.cs
+++ MessageReader.cs
@@ -417,13 +417,23 @@
 				return;
 			}

+			if (sig.Data.Length == 1) {
+				DType t = (DType)sig.Data[0];
+				GetValue (t, out val);
+				return;
+			}
+
+			if (sig.Data.Length == 2 && sig.Data[0] == (byte)DType.Array) {
+				DType elem_t = (DType)sig.Data[1];
+				Type elem_type = Signature.DTypeToType (elem_t);
+				Type array_type = elem_type.MakeArrayType ();
+				GetValue (array_type, out val);
+				return;
+			}
+
 			//TODO: more flexibilty needed here
-			if (sig.Data.Length > 1) {
-				throw new NotSupportedException ("Reading variants with more than one primitive value is not supported");
-			}
-
-			DType t = (DType)sig.Data[0];
-			GetValue (t, out val);
+
+			throw new NotSupportedException ("Reading variants with more than one primitive value or primitive array is not supported");
 		}

 		//not pretty or efficient but works


adds to Http1Deserialiser#Deserialise

adds to Http1Deserialiser#Deserialise

--- Net/Serialisation/Http1Deserialiser.cs
+++ Net/Serialisation/Http1Deserialiser.cs
@@ -328,6 +328,86 @@
                         );
                 }
             } while (String.IsNullOrEmpty(line));
+
+            // We've received our first non-empty line. This line should, then,
+            // contain the client's request line. To parse it, we hand it off to
+            // the ParseRequestLine function along with the HttpRequest we want to
+            // populate with values.
+            ParseRequestLine(base.Request, line);
+            // The next request line should contain headers. It would be highly
+            // unusual for a client to send a request with no headers, but it
+            // would be completely valid.
+            line = base.RequestStream.ReadAsciiLine();
+
+            // Regardless of whether there are headers to parse, we're going to
+            // need to
+            base.Request._headers = new HttpHeaderCollection();
+            // How we proceed depends on whether the line is empty or not. If it
+            // is empty, it means that the client has sent no headers, so we don't
+            // have anything more to parse.
+            if (String.IsNullOrEmpty(line))
+            {
+                // If we're here, there's nothing left to parse from the
+                // request. Set anything we would have parsed to its default
+                // value.
+                base.Request._post = new Empty();
+                base.Request._cookies = new Empty();
+
+                // Since there's nothing left to do, skip to the exit
+                // point of the method. This will perform any required finishing
+                // up (like making Headers read-only) and will return from the
+                // function.
+                goto deserialiseExit;
+            }
+
+            // HTTP headers can span multiple lines. While this is uncommon in the
+            // wild, it is still something we need to support. It's already
+            // by HttpHeader (in ParseMany), we just need to use a StringBuilder to
+            // read multiple lines in to one string.
+            StringBuilder hdrBdr = new StringBuilder();
+            // Headers are separated from the body by a blank line. This means we
+            // can read until we reach a blank line.
+            do
+            {
+                // We've already read a line from the stream and verified that it
+                // is not null or empty, so we can append it to the StringBuilder.
+                hdrBdr.AppendLine(line);
+                // We now need to read the next line from the stream.
+                line = base.RequestStream.ReadAsciiLine();
+            }
+            while (!String.IsNullOrEmpty(line));
+
+            // The method ParseMany will throw an exception if we received an
+            // invalid or malformed header, so we need to wrap this in a try-catch.
+            try
+            {
+                // ParseMany takes a TextReader as an argument, and we've got a
+                // source string. This means we just need to feed the string in to
+                // a StringReader, and the StringReader in to ParseMany.
+                using (var sr = new StringReader(hdrBdr.ToString()))
+                {
+                    base.Request.Headers.AddRange(HttpHeader.ParseMany(sr));
+                }
+            }
+            catch (ArgumentException aex)
+            {
+                // ParseMany threw an exception, which means that the client sent
+                // invalid headers. If we got to this stage, it means the client
+                // sent a valid request line. This means it would make sense to
+                // respond to the client rather than close the connection. For this
+                // reason, we throw an HttpRequestException instead of an
+                // HttpFatalException.
+                throw new HttpRequestException(
+                    "The client sent invalid or malformed HTTP headers.",
+                    aex
+                    );
+            }
+
+        deserialiseExit:
+            // The user shouldn't be able to modify the headers, since they
+            // were sent in a request and are concrete. To ensure that the
+            // user doesn't, we mark the HttpHeaderCollection read-only.
+            base.Request._headers.IsReadOnly = true;
         }

         /// <summary>


✨ Error during parsing command - improve reply with specific parameter.

--- PoGo.DiscordBot/Core/CommandHandler.cs
+++ PoGo.DiscordBot/Core/CommandHandler.cs
@@ -64,7 +64,17 @@
                         reply = "Hodně parametrů - nechybí ti tam uvozovky?";
                 }
                 else if (result.Error == CommandError.ParseFailed)
-                    reply = "Špatné parametry.";
+                {
+                    if (result is ParseResult parseResult && parseResult.ErrorParameter != null)
+                    {
+                        reply = string.IsNullOrEmpty(parseResult.ErrorParameter.Summary) ?
+                            $"Špatný parametr {parseResult.ErrorParameter.Name}." :
+                            $"Špatný parametr {parseResult.ErrorParameter.Name} - {parseResult.ErrorParameter.Summary}";
+                    }
+                    else
+                        reply = "Špatné parametry.";
+
+                }
                 else if (result is TeamPreconditionResult teamResult)
                     reply = teamResult.ErrorReason;
                 else if (result.Error == CommandError.UnmetPrecondition && result.ErrorReason == "Invalid context for command; accepted contexts: Guild.")


Remove unused interface

Remove unused interface


Fix a bug where a modify button is shown when an efkmodel is loaded

--- Dev/Editor/EffekseerCoreGUI/GUI/BindableComponent/PathForModel.cs
+++ Dev/Editor/EffekseerCoreGUI/GUI/BindableComponent/PathForModel.cs
@@ -106,21 +106,26 @@

 			if (filePath != string.Empty)
 			{
+				var ext = System.IO.Path.GetExtension(filePath).ToLower().Replace(".", "");
+
 				if (Manager.NativeManager.Button(Resources.GetString("Delete") + id2, buttonSizeX))
 				{
 					btn_delete_Click();
 				}

-				Manager.NativeManager.SameLine();
-
 				isHovered = isHovered || Manager.NativeManager.IsItemHovered();

-				if (Manager.NativeManager.Button(Resources.GetString("ResetMaginification") + id3, buttonSizeX * 2))
-				{
-					btn_reload_Click();
-				}
-
-				isHovered = isHovered || Manager.NativeManager.IsItemHovered();
+				if(ext != "efkmodel")
+				{
+					Manager.NativeManager.SameLine();
+
+					if (Manager.NativeManager.Button(Resources.GetString("ResetMaginification") + id3, buttonSizeX * 2))
+					{
+						btn_reload_Click();
+					}
+
+					isHovered = isHovered || Manager.NativeManager.IsItemHovered();
+				}
 			}

 			if (dd != null)


--- EFCore.BulkExtensions/SQLAdapters/PostgreSql/PostgreSqlAdapter.cs
+++ EFCore.BulkExtensions/SQLAdapters/PostgreSql/PostgreSqlAdapter.cs
@@ -280,33 +280,42 @@
         }
         finally
         {
-            if (doDropUniqueConstrain)
-            {
-                string dropUniqueConstrain = SqlQueryBuilderPostgreSql.DropUniqueConstrain(tableInfo);
-                if (isAsync)
-                {
-                    await context.Database.ExecuteSqlRawAsync(dropUniqueConstrain, cancellationToken).ConfigureAwait(false);
-                }
-                else
-                {
-                    context.Database.ExecuteSqlRaw(dropUniqueConstrain);
-                }
-            }
-
-            if (!tableInfo.BulkConfig.UseTempDB)
-            {
-                if (tableInfo.BulkConfig.CustomSourceTableName == null)
-                {
-                    var sqlDropTable = SqlQueryBuilderPostgreSql.DropTable(tableInfo.FullTempTableName);
+            try
+            {
+                if (doDropUniqueConstrain)
+                {
+                    string dropUniqueConstrain = SqlQueryBuilderPostgreSql.DropUniqueConstrain(tableInfo);
                     if (isAsync)
                     {
-                        await context.Database.ExecuteSqlRawAsync(sqlDropTable, cancellationToken).ConfigureAwait(false);
+                        await context.Database.ExecuteSqlRawAsync(dropUniqueConstrain, cancellationToken)
+                            .ConfigureAwait(false);
                     }
                     else
                     {
-                        context.Database.ExecuteSqlRaw(sqlDropTable);
-                    }
-                }
+                        context.Database.ExecuteSqlRaw(dropUniqueConstrain);
+                    }
+                }
+
+                if (!tableInfo.BulkConfig.UseTempDB)
+                {
+                    if (tableInfo.BulkConfig.CustomSourceTableName == null)
+                    {
+                        var sqlDropTable = SqlQueryBuilderPostgreSql.DropTable(tableInfo.FullTempTableName);
+                        if (isAsync)
+                        {
+                            await context.Database.ExecuteSqlRawAsync(sqlDropTable, cancellationToken)
+                                .ConfigureAwait(false);
+                        }
+                        else
+                        {
+                            context.Database.ExecuteSqlRaw(sqlDropTable);
+                        }
+                    }
+                }
+            }
+            catch (PostgresException ex) when (ex.SqlState == "25P02")
+            {
+                // ignore "current transaction is aborted" exception as it hides the real exception that caused it
             }
         }
     }


Update Setting.cs

Update Setting.cs

--- SharpConfig/Setting.cs
+++ SharpConfig/Setting.cs
@@ -187,10 +187,13 @@
                     i++;
                 }

-                // Read the last element.
-                values[i] = ConvertValue(
-                    mRawValue.Substring(elemIndex, mRawValue.Length - elemIndex - 1),
-                    elemType);
+                if (this.ArraySize > 0)
+                {
+                    // Read the last element.
+                    values[i] = ConvertValue(
+                        mRawValue.Substring(elemIndex, mRawValue.Length - elemIndex - 1),
+                        elemType);
+                }

                 return values;
             }
@@ -347,4 +350,4 @@

         #endregion
     }
-}+}


Seed data created.

Seed data created.

--- EntitySearch/EntitySearch.Demo.Models/Migrations/Configuration.cs
+++ EntitySearch/EntitySearch.Demo.Models/Migrations/Configuration.cs
@@ -18,14 +18,63 @@

             //  You can use the DbSet<T>.AddOrUpdate() helper extension method
             //  to avoid creating duplicate seed data. E.g.
-            //
-            //    context.People.AddOrUpdate(
-            //      p => p.FullName,
-            //      new Person { FullName = "Andrew Peters" },
-            //      new Person { FullName = "Brice Lambson" },
-            //      new Person { FullName = "Rowan Miller" }
-            //    );
-            //
+
+            context.Warehouses.AddOrUpdate(x => x.WarehouseId, new Warehouse[]
+            {
+                new Warehouse { WarehouseId = 1, Name = "Boston Dist. Center", Address1 = "123 Main St.", Address2 = "", City = "Boston", State = "MA", Country = "USA", Code = "BSC01", Zip = "08081" },
+                new Warehouse { WarehouseId = 2, Name = "Boise Dist. Center", Address1 = "9487 Z St.", Address2 = "", City = "Boise", State = "ID", Country = "USA", Code = "BIC02", Zip = "09651" },
+                new Warehouse { WarehouseId = 3, Name = "Dallas Dist. Center", Address1 = "9200 Purple St.", Address2 = "", City = "Dallas", State = "TX", Country = "USA", Code = "DTC04", Zip = "63918" },
+                new Warehouse { WarehouseId = 4, Name = "Tokyo Dist. Center", Address1 = "85 Hokawa St.", Address2 = "", City = "Tokyo", State = "TK", Country = "Japan", Code = "TKJ05", Zip = "00948743-1" },
+            });
+
+            context.Products.AddOrUpdate(x => x.ProductId, new Product[]
+            {
+                new Product { ProductId = 1, Color = "green", Description = "Green ice", Manufacturer = "EARTH", ModelNumber = "AN0004K", Sku = "054837-049473" },
+                new Product { ProductId = 2, Color = "green", Description = "Green eggs", Manufacturer = "DR S.", ModelNumber = "GEGGS", Sku = "059858-94854" },
+                new Product { ProductId = 3, Color = "black", Description = "iPhone 6", Manufacturer = "Apple", ModelNumber = "IPHONE6B", Sku = "0685673-048474" },
+                new Product { ProductId = 4, Color = "white", Description = "iPhone 6", Manufacturer = "Apple", ModelNumber = "IPHONE6W", Sku = "0685673-048475" },
+                new Product { ProductId = 5, Color = "clear", Description = "Empty glass", Manufacturer = "Hananana", ModelNumber = "05985734/A", Sku = "645128-054863" },
+                new Product { ProductId = 6, Color = "red", Description = "The best thing in the world", Manufacturer = "Life", ModelNumber = "09876543211234567890", Sku = "01011-0000101" },
+                new Product { ProductId = 7, Color = "orange", Description = "Delicous Oranges", Manufacturer = "Con Agra", ModelNumber = "757363629", Sku = "958326" },
+                new Product { ProductId = 8, Color = "yellow", Description = "Highlighter pen 6 pack", Manufacturer = "Bic", ModelNumber = "474623525627348", Sku = "95874563-635214" },
+            });
+
+            context.Customers.AddOrUpdate(x => x.CustomerId, new Customer[]
+            {
+                new Customer { CustomerId = 1, FirstName = "James", LastName = "Hanagdue", Address1 = "99999 Smile St.", Address2 = "Appt 123456", City = "Dallas", State = "TX", Zip = "05483", Country = "USA", Phone = "8885550001" },
+                new Customer { CustomerId = 2, FirstName = "Lee", LastName = "Manjinyoo", Address1 = "1000 Happy St.", Address2 = "Appt 1", City = "Dallas", State = "TX", Zip = "05483", Country = "USA", Phone = "8885550002" },
+                new Customer { CustomerId = 3, FirstName = "Dominique", LastName = "Franciponiapolise", Address1 = "100 Whoa St.", Address2 = "Appt 99", City = "Dallas", State = "TX", Zip = "05483", Country = "USA", Phone = "8885550003" },
+            });
+
+            context.Inventories.AddOrUpdate(x => x.InventoryId, new Inventory[]
+            {
+                new Inventory { InventoryId = 1, ProductId = 1, Quantity = 9, WarehouseId = 1 },
+                new Inventory { InventoryId = 2, ProductId = 2, Quantity = 19, WarehouseId = 1 },
+                new Inventory { InventoryId = 3, ProductId = 3, Quantity = 29, WarehouseId = 2 },
+                new Inventory { InventoryId = 4, ProductId = 4, Quantity = 39, WarehouseId = 1 },
+                new Inventory { InventoryId = 5, ProductId = 5, Quantity = 49, WarehouseId = 1 },
+                new Inventory { InventoryId = 6, ProductId = 6, Quantity = 59, WarehouseId = 3 },
+                new Inventory { InventoryId = 7, ProductId = 7, Quantity = 69, WarehouseId = 1 },
+                new Inventory { InventoryId = 8, ProductId = 8, Quantity = 79, WarehouseId = 4 },
+                new Inventory { InventoryId = 9, ProductId = 1, Quantity = 89, WarehouseId = 1 },
+                new Inventory { InventoryId = 10, ProductId = 2, Quantity = 99, WarehouseId = 4 },
+                new Inventory { InventoryId = 11, ProductId = 3, Quantity = 1, WarehouseId = 3 },
+                new Inventory { InventoryId = 12, ProductId = 4, Quantity = 2, WarehouseId = 1 },
+            });
+
+            context.Orders.AddOrUpdate(x => x.OrderId, new Order[]
+            {
+                new Order { OrderId = 1, ProductId = 1, Quantity = 1, CustomerId = 1, OrderNumber = "ASDF-1234" },
+                new Order { OrderId = 2, ProductId = 2, Quantity = 2, CustomerId = 2, OrderNumber = "ASDF-9999" },
+                new Order { OrderId = 3, ProductId = 3, Quantity = 1, CustomerId = 3, OrderNumber = "ASDF-0000" },
+                new Order { OrderId = 4, ProductId = 4, Quantity = 55, CustomerId = 1, OrderNumber = "ASDF-2345" },
+                new Order { OrderId = 5, ProductId = 5, Quantity = 1, CustomerId = 2, OrderNumber = "ASDF-0974" },
+                new Order { OrderId = 6, ProductId = 6, Quantity = 2, CustomerId = 3, OrderNumber = "ASDF-8476" },
+                new Order { OrderId = 7, ProductId = 7, Quantity = 1, CustomerId = 1, OrderNumber = "A0000001001" },
+                new Order { OrderId = 8, ProductId = 8, Quantity = 100, CustomerId = 2, OrderNumber = "A0000001002" },
+                new Order { OrderId = 9, ProductId = 1, Quantity = 1, CustomerId = 1, OrderNumber = "A0000001003" },
+                new Order { OrderId = 10, ProductId = 2, Quantity = 10, CustomerId = 3, OrderNumber = "A0000001004" },
+            });
         }
     }
 }


change file name with guid

change file name with guid

--- Gimela.Toolkit.CommandLines.RenameMedia/RenameMediaCommandLine.cs
+++ Gimela.Toolkit.CommandLines.RenameMedia/RenameMediaCommandLine.cs
@@ -139,8 +139,6 @@
       }
       else
       {
-        Random random = new Random(DateTime.Now.Millisecond);
-
         Regex r = new Regex(WildcardCharacterHelper.TranslateWildcardToRegex(options.RegexPattern), RegexOptions.IgnoreCase);
         Match m = r.Match(file.Name);
         if (m.Success)
@@ -149,18 +147,18 @@
           if (string.IsNullOrWhiteSpace(options.Prefix))
           {
             newName = string.Format(CultureInfo.CurrentCulture,
-              "{0}_{1}{2}",
+              "{0}-{1}{2}",
               file.LastWriteTime.ToString(@"yyyyMMddHHmmss"),
-              random.Next(100000, 999999).ToString(),
+              Guid.NewGuid(),
               file.Extension.ToLowerInvariant());
           }
           else
           {
             newName = string.Format(CultureInfo.CurrentCulture,
-              "{0}_{1}_{2}{3}",
+              "{0}-{1}-{2}{3}",
               options.Prefix,
               file.LastWriteTime.ToString(@"yyyyMMddHHmmss"),
-              random.Next(100000, 999999).ToString(),
+              Guid.NewGuid(),
               file.Extension.ToLowerInvariant());
           }


主工程端Prefab预制件中的数据绑定。使用属性的方式来绑定数据和消息。

主工程端Prefab预制件中的数据绑定。使用属性的方式来绑定数据和消息。

--- HotfixModule/KnightHotfixModule/WindHotfix/GUI/TViewController.cs
+++ HotfixModule/KnightHotfixModule/WindHotfix/GUI/TViewController.cs
@@ -149,6 +149,13 @@
                         Delegate rDelegate = Delegate.CreateDelegate(typeof(Action<Object>), this, rMethodInfos[i]);
                         Action<Object> rActionDelegate = rDelegate as Action<Object>;
                         HotfixEventManager.Instance.Binding(rUnityObject.Object, rBindingEventAttr.EventType, rActionDelegate);
+                        this.mEventObjs.Add(new HotfixEventObject()
+                        {
+                            TargetObject = rUnityObject.Object,
+                            EventHandler = rActionDelegate,
+                            EventType = rBindingEventAttr.EventType,
+                            NeedUnbind = rBindingEventAttr.NeedUnbind
+                        });
                     }
                 }
             }


забытая проверка на null при объявлении переменной

--- Lens.SyntaxTree/SyntaxTree/ControlFlow/NameDeclarationNodeBase.cs
+++ Lens.SyntaxTree/SyntaxTree/ControlFlow/NameDeclarationNodeBase.cs
@@ -49,7 +49,7 @@
 			base.ProcessClosures(ctx);

 			var type = Value.GetExpressionType(ctx);
-			ctx.CheckTypedExpression(Value, type, true);
+			ctx.CheckTypedExpression(Value, type);

 			ctx.CurrentScope.DeclareName(Name, type, IsConstant);
 		}


Sections hashtable should be case insensitive

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

--- MonoRail/Castle.MonoRail.Views.Brail/BrailViewComponentContext.cs
+++ MonoRail/Castle.MonoRail.Views.Brail/BrailViewComponentContext.cs
@@ -139,7 +139,16 @@
 		public void RegisterSection(string name, ICallable section)
 		{
 			if (sections == null)
-				sections = new Hashtable();
+			{
+				sections = new Hashtable(
+#if DOTNET2
+				System.StringComparer.InvariantCultureIgnoreCase
+#else
+				CaseInsensitiveHashCodeProvider.Default,
+				CaseInsensitiveComparer.Default
+#endif
+);
+			}
 			sections[name] = section;
 		}
 	}


Use a workaround to make Mapping_from_the_default_file_path pass on .NET Core

See https://github.com/nunit/nunit3-vs-adapter/issues/356#issuecomment-700754225

--- Nerdle.AutoConfig.Tests.Integration/UsingDefaultConfigFilePath.cs
+++ Nerdle.AutoConfig.Tests.Integration/UsingDefaultConfigFilePath.cs
@@ -5,11 +5,28 @@
 {
     [TestFixture]
     public class UsingDefaultConfigFilePath
+#if NETCOREAPP
+        : System.IDisposable
     {
+        private readonly string _configFilePath;
+
+        // In order to workaround flaky interaction between the test runner and System.Configuration.ConfigurationManager
+        // See https://github.com/nunit/nunit3-vs-adapter/issues/356#issuecomment-700754225
+        public UsingDefaultConfigFilePath()
+        {
+            _configFilePath = System.Configuration.ConfigurationManager.OpenExeConfiguration(System.Configuration.ConfigurationUserLevel.None).FilePath;
+            System.IO.File.Copy($"{System.Reflection.Assembly.GetExecutingAssembly().Location}.config", _configFilePath, overwrite: true);
+        }
+
+        public void Dispose()
+        {
+            System.IO.File.Delete(_configFilePath);
+        }
+#else
+    {
+#endif
+
         [Test]
-#if NETCOREAPP
-        [Ignore("Buggy interaction between the test runner and System.Configuration.ConfigurationManager, see https://github.com/nunit/nunit3-vs-adapter/issues/356")]
-#endif
         public void Mapping_from_the_default_file_path()
         {
             var foo = AutoConfig.Map<IFoo>();


Add some more llGiveInventory() regression tests

--- OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiInventoryTests.cs
+++ OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiInventoryTests.cs
@@ -44,6 +44,7 @@
 using OpenSim.Region.ScriptEngine.Shared.Instance;
 using OpenSim.Services.Interfaces;
 using OpenSim.Tests.Common;
+using PermissionMask = OpenSim.Framework.PermissionMask;

 namespace OpenSim.Region.ScriptEngine.Shared.Tests
 {
@@ -236,53 +237,5 @@
             Assert.IsNotNull(receivedItem);
             Assert.AreEqual(0, receivedItem.CurrentPermissions & (uint)PermissionMask.Modify);
         }
-
-        [Test]
-        public void TestLlRemoteLoadScriptPin()
-        {
-            TestHelpers.InMethod();
-//                        TestHelpers.EnableLogging();
-
-            UUID user1Id = TestHelpers.ParseTail(0x1);
-            UUID user2Id = TestHelpers.ParseTail(0x2);
-
-            SceneObjectGroup sourceSo = SceneHelpers.AddSceneObject(m_scene, 1, user1Id, "sourceSo", 0x10);
-            m_scene.AddSceneObject(sourceSo);
-            LSL_Api api = new LSL_Api();
-            api.Initialize(m_engine, sourceSo.RootPart, null, null);
-            TaskInventoryHelpers.AddScript(m_scene, sourceSo.RootPart, "script", "Hello World");
-
-            SceneObjectGroup targetSo = SceneHelpers.AddSceneObject(m_scene, 1, user1Id, "targetSo", 0x20);
-            SceneObjectGroup otherOwnedTargetSo
-                = SceneHelpers.AddSceneObject(m_scene, 1, user2Id, "otherOwnedTargetSo", 0x30);
-
-            // Test that we cannot load a script when the target pin has never been set (i.e. it is zero)
-            api.llRemoteLoadScriptPin(targetSo.UUID.ToString(), "script", 0, 0, 0);
-            Assert.IsNull(targetSo.RootPart.Inventory.GetInventoryItem("script"));
-
-            // Test that we cannot load a script when the given pin does not match the target
-            targetSo.RootPart.ScriptAccessPin = 5;
-            api.llRemoteLoadScriptPin(targetSo.UUID.ToString(), "script", 3, 0, 0);
-            Assert.IsNull(targetSo.RootPart.Inventory.GetInventoryItem("script"));
-
-            // Test that we cannot load into a prim with a different owner
-            otherOwnedTargetSo.RootPart.ScriptAccessPin = 3;
-            api.llRemoteLoadScriptPin(otherOwnedTargetSo.UUID.ToString(), "script", 3, 0, 0);
-            Assert.IsNull(otherOwnedTargetSo.RootPart.Inventory.GetInventoryItem("script"));
-
-            // Test that we can load a script when given pin and dest pin match.
-            targetSo.RootPart.ScriptAccessPin = 3;
-            api.llRemoteLoadScriptPin(targetSo.UUID.ToString(), "script", 3, 0, 0);
-            TaskInventoryItem insertedItem = targetSo.RootPart.Inventory.GetInventoryItem("script");
-            Assert.IsNotNull(insertedItem);
-
-            // Test that we can no longer load if access pin is unset
-            targetSo.RootPart.Inventory.RemoveInventoryItem(insertedItem.ItemID);
-            Assert.IsNull(targetSo.RootPart.Inventory.GetInventoryItem("script"));
-
-            targetSo.RootPart.ScriptAccessPin = 0;
-            api.llRemoteLoadScriptPin(otherOwnedTargetSo.UUID.ToString(), "script", 3, 0, 0);
-            Assert.IsNull(otherOwnedTargetSo.RootPart.Inventory.GetInventoryItem("script"));
-        }
     }
 }


Handle exceptions + clean up

Handle exceptions + clean up


calculating mins in total hours

calculating mins in total hours


Cleanup using statements

Cleanup using statements

--- Samples/ProjectTracker/ProjectTracker.Ui.Blazor.Server/Startup.cs
+++ Samples/ProjectTracker/ProjectTracker.Ui.Blazor.Server/Startup.cs
@@ -1,16 +1,7 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading.Tasks;
-using Csla.Blazor;
 using Csla.Configuration;
 using Microsoft.AspNetCore.Authentication.Cookies;
 using Microsoft.AspNetCore.Builder;
-using Microsoft.AspNetCore.Components;
-using Microsoft.AspNetCore.Components.Authorization;
 using Microsoft.AspNetCore.Hosting;
-using Microsoft.AspNetCore.Http;
-using Microsoft.AspNetCore.HttpsPolicy;
 using Microsoft.Extensions.Configuration;
 using Microsoft.Extensions.DependencyInjection;
 using Microsoft.Extensions.Hosting;


Fix for scanning not active on custom scan page after camera permission has been granted on Android.

--- Source/ZXing.Net.Mobile.Forms.Android/ZXingScannerViewRenderer.cs
+++ Source/ZXing.Net.Mobile.Forms.Android/ZXingScannerViewRenderer.cs
@@ -65,9 +65,6 @@
                 if (formsView.IsScanning)
                     zxingSurface.StartScanning(formsView.RaiseScanResult, formsView.Options);

-                if (!formsView.IsAnalyzing)
-                    zxingSurface.PauseAnalysis ();
-
                 if (formsView.IsTorchOn)
                     zxingSurface.Torch (true);
             }


removed unused StorageContainer name constant

--- Spines.Hana.Blame/Spines.Hana.Blame/Services/StorageContainers.cs
+++ Spines.Hana.Blame/Spines.Hana.Blame/Services/StorageContainers.cs
@@ -7,6 +7,5 @@
   {
     public const string TenhouJson = "tenhoureplays";
     public const string TenhouXml = "tenhouxml";
-    public const string Binaries = "bin";
   }
 }


Added another test for setting ExecutionContext to null.

--- Src/WorkoutWotch.UnitTests/ViewModels/ExerciseViewModelFixture.cs
+++ Src/WorkoutWotch.UnitTests/ViewModels/ExerciseViewModelFixture.cs
@@ -139,6 +139,24 @@
         }

         [Test]
+        public void progress_is_reset_to_zero_if_the_execution_context_changes_to_null()
+        {
+            var model = new Exercise(new LoggerServiceMock(MockBehavior.Loose), new SpeechServiceMock(), "Name", 1, 1, Enumerable.Empty<MatcherWithAction>());
+            var executionContext = new ExecutionContext();
+            var executionContextSubject = new Subject<ExecutionContext>();
+            var sut = new ExerciseViewModel(model, executionContextSubject);
+
+            executionContextSubject.OnNext(executionContext);
+            executionContext.SetCurrentExercise(model);
+
+            executionContext.AddProgress(TimeSpan.FromSeconds(3));
+            Assert.AreEqual(TimeSpan.FromSeconds(3), sut.Progress);
+
+            executionContextSubject.OnNext(null);
+            Assert.AreEqual(TimeSpan.Zero, sut.Progress);
+        }
+
+        [Test]
         public void is_active_is_false_if_there_is_no_execution_context()
         {
             var model = new Exercise(new LoggerServiceMock(MockBehavior.Loose), new SpeechServiceMock(), "Name", 1, 1, Enumerable.Empty<MatcherWithAction>());


This is just a test

This is just a test

--- 2017/HashCode/Program.cs
+++ 2017/HashCode/Program.cs
@@ -4,6 +4,7 @@
     {
         public static void Main(string[] args)
         {
+            // This is just a test
         }
     }
 }


Add check if SetSecurityInitializer called more than once

--- Algorithm/QCAlgorithm.cs
+++ Algorithm/QCAlgorithm.cs
@@ -606,14 +606,21 @@
         }

         /// <summary>
-        /// Sets the security initializer, used to initialize/configure securities after creation
+        /// Sets the security initializer, used to initialize/configure securities after creation.
+        /// The initializer will be applied to all universes and manually added securities.
         /// </summary>
         /// <param name="securityInitializer">The security initializer</param>
         public void SetSecurityInitializer(ISecurityInitializer securityInitializer)
         {
             if (_locked)
             {
-                throw new Exception("SetSecurityInitializer cannot be called after algorithm initialization.");
+                throw new Exception("SetSecurityInitializer() cannot be called after algorithm initialization. " +
+                                    "When you use the SetSecurityInitializer() method it will apply to all universes and manually added securities.");
+            }
+
+            if (_userSetSecurityInitializer)
+            {
+                Debug("Warning: SetSecurityInitializer() has already been called, existing security initializers in all universes will be overwritten.");
             }

             // this flag will prevent calls to SetBrokerageModel from overwriting this initializer
@@ -627,7 +634,8 @@
         }

         /// <summary>
-        /// Sets the security initializer function, used to initialize/configure securities after creation
+        /// Sets the security initializer function, used to initialize/configure securities after creation.
+        /// The initializer will be applied to all universes and manually added securities.
         /// </summary>
         /// <param name="securityInitializer">The security initializer function</param>
         [Obsolete("This method is deprecated. Please use this overload: SetSecurityInitializer(Action<Security> securityInitializer)")]
@@ -637,7 +645,8 @@
         }

         /// <summary>
-        /// Sets the security initializer function, used to initialize/configure securities after creation
+        /// Sets the security initializer function, used to initialize/configure securities after creation.
+        /// The initializer will be applied to all universes and manually added securities.
         /// </summary>
         /// <param name="securityInitializer">The security initializer function</param>
         public void SetSecurityInitializer(Action<Security> securityInitializer)


When adding node, get rotation point from rotationCurves

--- AnimationPathAnimator.cs
+++ AnimationPathAnimator.cs
@@ -221,7 +221,10 @@
             animatedObjectPath.PathChanged -= AnimatedObjectPathOnPathChanged;
         }

-        private void AnimatedObjectPathOnPathChanged(object sender, EventArgs eventArgs) {
+        private void AnimatedObjectPathOnPathChanged(
+            object sender,
+            EventArgs eventArgs) {
+
             UpdateEaseCurve();
             UpdateRotationCurves();

@@ -401,14 +404,6 @@

         [SuppressMessage("ReSharper", "UnusedMember.Local")]
         private void OnDrawGizmosSelected() {
-            //if (followedObject != null) return;
-
-            //Vector3 forwardPoint = GetForwardPoint();
-            //Vector3 size = new Vector3(
-            //    LookForwardGizmoSize,
-            //    LookForwardGizmoSize,
-            //    LookForwardGizmoSize);
-            //Gizmos.DrawWireCube(forwardPoint, size);
         }

         #endregion UNITY MESSAGES
@@ -672,24 +667,29 @@

         private void UpdateRotationCurvesWithRemovedKeys() {
             // AnimationPath node timestamps.
-            var animationCurvesTimestamps = animatedObjectPath.GetNodeTimestamps();
+            var pathTimestamps = animatedObjectPath.GetNodeTimestamps();
             // Get values from rotationCurves.
             var rotationCurvesTimestamps = rotationCurves.GetTimestamps();

             // For each timestamp in rotationCurves..
             for (var i = 0; i < rotationCurvesTimestamps.Length; i++) {
                 var keyExists = false;
-                for (var j = 0; j < animationCurvesTimestamps.Length; j++) {
+                // For each timestamp in animatedObjectPath..
+                for (var j = 0; j < pathTimestamps.Length; j++) {
+                    // If both timestamps are equal..
                     if (Math.Abs(rotationCurvesTimestamps[i]
-                        - animationCurvesTimestamps[j]) < 0.001f) {
+                        - pathTimestamps[j]) < 0.001f) {

                         keyExists = true;
+
                         break;
                     }
                 }

+                // Remove node from rotationCurves.
                 if (!keyExists) {
                     rotationCurves.RemovePoint(i);
+
                     break;
                 }
             }
@@ -726,7 +726,10 @@
                 }

                 if (!keyExists) {
-                    var defaultRotation = new Vector3(0, 0, 0);
+                    var addedKeyTimestamp =
+                        animatedObjectPath.GetNodeTimestamp(i);
+                    var defaultRotation =
+                        rotationCurves.GetVectorAtTime(addedKeyTimestamp);

                     rotationCurves.CreateNewPoint(
                         animationCurvesTimestamps[i],


started the refactor process

started the refactor process

--- Assets/Scripts/Dealer.cs
+++ Assets/Scripts/Dealer.cs
@@ -28,7 +28,7 @@
     };

     //this is the list used during evaluation to sort players from best hand to worst
-    private List<PokerPlayer> sortedPlayers = new List<PokerPlayer>();
+    //private List<PokerPlayer> sortedPlayers = new List<PokerPlayer>();

     //the board and the text are pretty much placeholders to give messages to the player via text
     public GameObject MessageBoard;
@@ -42,6 +42,7 @@

     //this is the number of players in the game currently
     //we can change this to add more or less players, max 5
+    //this won't be necessary when we make PokerPlayer abstract
     public int playerCount = 5;

     //this int tells us how many winners there are in a given hand
@@ -52,7 +53,7 @@
     //basically it's the pot amount divides by the number of winners
     private int potAmountToGiveWinner;

-    //this is our pool to check whether every person who was supposed to be paid DID get paid
+    //this is our bool to check whether every person who was supposed to be paid DID get paid
     //this is in place to end the while loop in the coroutine
     private bool winnersHaveBeenPaid;

@@ -202,7 +203,7 @@
         #region Players evaluate their hands based on the gamestate
         if (Input.GetKeyDown(KeyCode.Space))
         {
-            Services.SoundManager.GenerateSourceAndPlay(Services.SoundManager.callP1);
+            //Services.SoundManager.GenerateSourceAndPlay(Services.SoundManager.callP1);
             //Table.instance.DebugHandsAndChips();
         }

@@ -297,7 +298,7 @@
                         Debug.Log("player" + players[i].SeatPos + "is the " + players[i].PlayerState + " with (a) " + players[i].Hand.HandValues.PokerHand + " with a highCard of " + players[i].Hand.HandValues.HighCard + " and a handTotal of " + players[i].Hand.HandValues.Total);
                     }
                 }
-                sortedPlayers.Clear();
+                //sortedPlayers.Clear();
                 playersHaveBeenEvaluated = true;
                 StartCoroutine(WaitForWinnersToGetPaid());
                 readyToAwardPlayers = true;
@@ -563,6 +564,7 @@
             potRemaining -= winningPlayers[i].chipsWon;
         }
         Debug.Log("number of Winners is " + numberOfWinners);
+        //added this in because of voiceActing, and not wanting two clips playing at the same time
         if(winningPlayers.Count == 2)
         {
             Debug.Log("DONT SAY A FUCKING WORD");


add plus score using game manager, also dead method too

--- Assets/Scripts/Player.cs
+++ Assets/Scripts/Player.cs
@@ -41,19 +41,20 @@

 	private void Dead(){
 		mainRigidbody2D.freezeRotation = false;
-		Debug.Log("Game Over");
+		GameManager.instance.gameOver ();
 	}

 	void OnCollisionEnter2D(Collision2D other)
 	{
-		if (other.transform.tag == "Obstacle") {
+		if (other.transform.tag == "Obstacle" && GameManager.instance.currentState == GameStates.INGAME) {
 			Dead ();
 		}
 	}

 	void OnTriggerEnter2D(Collider2D other){
-		if (other.tag == "Score") {
+		if (other.tag == "Score" && GameManager.instance.currentState == GameStates.INGAME) {
 			ObstacleSpawner.instance.spawnObstacle();
+			GameManager.instance.addScore();
 			Destroy(other.gameObject);
 		}
 	}


Changed the stats for Person.

Changed the stats for Person.

Added an enum representing age, made other vars public, removed the
thirst var.

--- Assets/scripts/Person.cs
+++ Assets/scripts/Person.cs
@@ -4,10 +4,16 @@

 public class Person : MonoBehaviour, TurnUpdatable
 {
-    int age;
-    float happiness;
-    float thirst;
-    float hunger;
+    public enum PAge
+    {
+        Youth,
+        Adult,
+        Elder
+    };
+
+    public PAge  Age;
+    public float Happiness;
+    public float Hunger;

 	// Use this for initialization


This has to be compatible.

This has to be compatible.

--- BTDBTest/ObjectDBTest.cs
+++ BTDBTest/ObjectDBTest.cs
@@ -2216,5 +2216,40 @@
                 tr.Commit();
             }
         }
+
+        public class UserKey
+        {
+            public ulong CompanyId { get; set; }
+            public string Email { get; set; }
+        }
+
+        public class ItemsDict
+        {
+            public IOrderedDictionary<UserKey, ulong> Items { get; set; }
+        }
+
+        private string data2 =
+            "QlREQkVYUDIIAAAAAAAAAAMAAAAAAAEKAAAACkl0ZW1zRGljdAMAAAAAAAIIAAAACFVzZXJLZXkEAAAAAAEBATAAAAABBkl0ZW1zDk9EQkRpY3Rpb25hcnkbB09iamVjdAkIVXNlcktleQlVbnNpZ25lZAAEAAAAAAECASMAAAACCkNvbXBhbnlJZAlVbnNpZ25lZAAGRW1haWwHU3RyaW5nAAMAAAAAAgEBAAAAAQIAAAAAAwEAAAABAgAAAAEBAwAAAAEBABYAAAACAH8CAQEQbmVrZG9AbmVrZGUubmV0AQAAAGU=";
+
+        [Fact]
+        public void NotMaterializingDict2()
+        {
+            using (var tr = _lowDb.StartWritingTransaction().Result)
+            {
+                KeyValueDBExportImporter.Import(tr, new MemoryStream(Convert.FromBase64String(data2)));
+                tr.Commit();
+            }
+
+            using (var tr = _db.StartTransaction())
+            {
+                var att = tr.Singleton<ItemsDict>().Items;
+                Assert.NotNull(att);
+                Assert.Equal(1, att.Count);
+                var key = new UserKey() { CompanyId = 1, Email = "nekdo@nekde.net" };
+                Assert.True(att.ContainsKey(key));
+                Assert.Equal(att[key], 101UL);
+                tr.Commit();
+            }
+        }
     }
 }


Add OnMessageReceived event

Add OnMessageReceived event

--- Bifrost/EncryptedLink.cs
+++ Bifrost/EncryptedLink.cs
@@ -25,6 +25,7 @@

 namespace Bifrost
 {
+    public delegate void MessageReceived(EncryptedLink link, Message msg);
     public delegate void DataReceived(EncryptedLink link, byte[] data);
     public delegate void LinkClosed(EncryptedLink link);

@@ -54,6 +55,8 @@

         public SHA256CryptoServiceProvider SHA = new SHA256CryptoServiceProvider();

+        // TODO: Go from "event X OnX" to "event OnX X"
+        public event MessageReceived OnMessageReceived;
         public event DataReceived OnDataReceived;
         public event LinkClosed OnLinkClosed;

@@ -200,6 +203,8 @@
                     Log.Trace("Null message, continuing");
                     continue;
                 }
+
+                OnMessageReceived?.Invoke(this, msg);

                 if (msg.Type == MessageType.Data)
                 {


chore: Fixed type in example

chore: Fixed type in example

--- examples/IBM.Watson.VisualRecognition.v4.Examples/ServiceExample.cs
+++ examples/IBM.Watson.VisualRecognition.v4.Examples/ServiceExample.cs
@@ -47,7 +47,7 @@
             ServiceExample example = new ServiceExample();

             example.Analyze();
-
+

             Console.WriteLine("Examples complete. Press any key to close the application.");
             Console.ReadKey();
@@ -78,8 +78,8 @@
                     imagesFile.Add(fileWithMetadata);

                     result = service.Analyze(
-                        collectionIds: "{collectionId}",
-                        features: "objects",
+                        collectionIds: new List<string>() { "{collectionId}" },
+                        features: new List<string>() { "objects" },
                         imagesFile: imagesFile);

                     Console.WriteLine(result.Response);


docs(Visual Recognition v4): Add training usage example

--- examples/IBM.Watson.VisualRecognition.v4.Examples/ServiceExample.cs
+++ examples/IBM.Watson.VisualRecognition.v4.Examples/ServiceExample.cs
@@ -312,6 +312,22 @@

             Console.WriteLine(result.Response);
         }
+
+        public void GetTrainingUsage()
+        {
+            IamAuthenticator authenticator = new IamAuthenticator(
+                apikey: "{apikey}"
+                );
+
+            VisualRecognitionService service = new VisualRecognitionService("2019-02-11", authenticator);
+
+            var result = service.GetTrainingUsage(
+                startTime: "2019-01-01",
+                endTime: "2019-01-31"
+                );
+
+            Console.WriteLine(result.Response);
+        }
         #endregion

         #region User Data


Removed multiple lines from article content.

--- CRR/Entities/FeedItem.cs
+++ CRR/Entities/FeedItem.cs
@@ -4,6 +4,7 @@
 using System.IO;
 using System.Linq;
 using System.ServiceModel.Syndication;
+using System.Text.RegularExpressions;
 using cFeed.LiteDb;
 using cFeed.Util;
 using CGui.Gui.Primitives;
@@ -296,10 +297,13 @@
       Collection<Uri> links = new Collection<Uri>();
       Collection<Uri> images = new Collection<Uri>();

-      var s = conv.ConvertHtml(doc.DocumentNode.OuterHtml, Links[0].Uri, out links, out images);
+      var resultString = conv.ConvertHtml(doc.DocumentNode.OuterHtml, Links[0].Uri, out links, out images);
+      //remove multiple lines from article content. It makes text more condensed.
+      var cleanedContent = Regex.Replace(resultString, @"^\s+$[\r\n]*", "\r\n", RegexOptions.Multiline);
+
       ExternalLinks = links;
       ImageLinks = images;
-      ArticleContent = s;
+      ArticleContent = cleanedContent;

       IsLoaded = true;
       Save();


Throw exception if more than one expression is passed to Evaluate

--- Calculator/Calculator.cs
+++ Calculator/Calculator.cs
@@ -21,6 +21,12 @@

             var tree = parser.compileUnit();

+            var exprCount = tree.expression().Count;
+            if (exprCount > 1)
+            {
+                throw new ArgumentException(String.Format("Too many expressions. Only one can be evaluated. {0} expressions were entered.", exprCount));
+            }
+
             var visitor = new IntegerMathVisitor();

             return visitor.Visit(tree);


The code that allowed us to parse compacted g1 lines also was slower. Now it is about the same speed as before and still parses correctly.

--- examples/GCodeVisualizer/GCodeFile.cs
+++ examples/GCodeVisualizer/GCodeFile.cs
@@ -263,20 +263,20 @@
                 if (lineToParse.StartsWith("G0") || lineToParse.StartsWith("G1"))
                 {
                     double newFeedRate = 0;
-                    if (GetFirstNumberAfter("F", lineToParse, ref newFeedRate))
+                    if (GetFirstNumberAfter('F', lineToParse, ref newFeedRate))
                     {
                         feedRate = newFeedRate;
                     }

                     Vector3 attemptedDestination = lastPrinterPosition;
-                    GetFirstNumberAfter("X", lineToParse, ref attemptedDestination.x);
-                    GetFirstNumberAfter("Y", lineToParse, ref attemptedDestination.y);
-                    GetFirstNumberAfter("Z", lineToParse, ref attemptedDestination.z);
+                    GetFirstNumberAfter('X', lineToParse, ref attemptedDestination.x);
+                    GetFirstNumberAfter('Y', lineToParse, ref attemptedDestination.y);
+                    GetFirstNumberAfter('Z', lineToParse, ref attemptedDestination.z);

                     Vector3 deltaPosition = attemptedDestination - lastPrinterPosition;

                     double ePosition = lastEPosition;
-                    GetFirstNumberAfter("E", lineToParse, ref ePosition);
+                    GetFirstNumberAfter('E', lineToParse, ref ePosition);

                     //if (newLine.extrusionType == PrinterMachineState.MovementTypes.Absolute)
                     {
@@ -294,7 +294,7 @@
                 else if (lineToParse.StartsWith("G92"))
                 {
                     double ePosition = 0;
-                    if (GetFirstNumberAfter("E", lineToParse, ref ePosition))
+                    if (GetFirstNumberAfter('E', lineToParse, ref ePosition))
                     {
                         lastEPosition = ePosition;
                     }
@@ -361,13 +361,14 @@
         }

         const string matchDouble = @"^-*[0-9]*\.?[0-9]*";
-        public static bool GetFirstNumberAfter(string stringToCheckAfter, string stringWithNumber, ref double readValue, int startIndex = 0)
+        private static readonly Regex matchDoubleRegex = new Regex(matchDouble, RegexOptions.Compiled);
+        public static bool GetFirstNumberAfter(char stringToCheckAfter, string stringWithNumber, ref double readValue, int startIndex = 0)
         {
             int stringPos = stringWithNumber.IndexOf(stringToCheckAfter, startIndex);
             if (stringPos != -1)
             {
-                string startingAfterCheckString = stringWithNumber.Substring(stringPos + stringToCheckAfter.Length).Trim();
-                string matchString = Regex.Match(startingAfterCheckString, matchDouble).Value;
+                string startingAfterCheckString = stringWithNumber.Substring(stringPos + 1).Trim();
+                string matchString = matchDoubleRegex.Match(startingAfterCheckString).Value;
                 return double.TryParse(matchString, out readValue);
             }

@@ -549,44 +550,38 @@

                 case "1":
                     // get the x y z to move to
-                    for (int argIndex = 1; argIndex < splitOnSpace.Length; argIndex++)
-                    {
-                        double value;
-
-                        if (splitOnSpace[argIndex].Length > 0 && double.TryParse(splitOnSpace[argIndex].Substring(1), NumberStyles.Number, null, out value))
+                    {
+                        double valueX = 0;
+                        if (GCodeFile.GetFirstNumberAfter('X', lineString, ref valueX))
                         {
-                            double valueX = 0;
-                            if (GCodeFile.GetFirstNumberAfter("X", lineString, ref valueX))
+                            processingMachineState.X = valueX;
+                        }
+                        double valueY = 0;
+                        if (GCodeFile.GetFirstNumberAfter('Y', lineString, ref valueY))
+                        {
+                            processingMachineState.Y = valueY;
+                        }
+                        double valueZ = 0;
+                        if (GCodeFile.GetFirstNumberAfter('Z', lineString, ref valueZ))
+                        {
+                            processingMachineState.Z = valueZ;
+                        }
+                        double valueE = 0;
+                        if (GCodeFile.GetFirstNumberAfter('E', lineString, ref valueE))
+                        {
+                            if (processingMachineState.movementType == PrinterMachineInstruction.MovementTypes.Absolute)
                             {
-                                processingMachineState.X = valueX;
+                                processingMachineState.EPosition = valueE + amountOfAccumulatedE;
                             }
-                            double valueY = 0;
-                            if (GCodeFile.GetFirstNumberAfter("Y", lineString, ref valueY))
+                            else
                             {
-                                processingMachineState.Y = valueY;
+                                processingMachineState.EPosition += valueE;
                             }
-                            double valueZ = 0;
-                            if (GCodeFile.GetFirstNumberAfter("Z", lineString, ref valueZ))
-                            {
-                                processingMachineState.Z = valueZ;
-                            }
-                            double valueE = 0;
-                            if (GCodeFile.GetFirstNumberAfter("E", lineString, ref valueE))
-                            {
-                                if (processingMachineState.movementType == PrinterMachineInstruction.MovementTypes.Absolute)
-                                {
-                                    processingMachineState.EPosition = value + amountOfAccumulatedE;
-                                }
-                                else
-                                {
-                                    processingMachineState.EPosition += value;
-                                }
-                            }
-                            double valueF = 0;
-                            if (GCodeFile.GetFirstNumberAfter("F", lineString, ref valueF))
-                            {
-                                processingMachineState.FeedRate = valueF;
-                            }
+                        }
+                        double valueF = 0;
+                        if (GCodeFile.GetFirstNumberAfter('F', lineString, ref valueF))
+                        {
+                            processingMachineState.FeedRate = valueF;
                         }
                     }

@@ -626,7 +621,7 @@
                 case "92":
                     // set current head position values (used to reset origin)
                     double ePosition = 0;
-                    if (GetFirstNumberAfter("E", lineString, ref ePosition))
+                    if (GetFirstNumberAfter('E', lineString, ref ePosition))
                     {
                         // remember how much e position we just gave up
                         amountOfAccumulatedE = (processingMachineState.EPosition - ePosition);
@@ -707,7 +702,7 @@
                 if (lineToParse.StartsWith("G0") || lineToParse.StartsWith("G1"))
                 {
                     double ePosition = lastEPosition;
-                    GetFirstNumberAfter("E", lineToParse, ref ePosition);
+                    GetFirstNumberAfter('E', lineToParse, ref ePosition);

                     if (instruction.movementType == PrinterMachineInstruction.MovementTypes.Absolute)
                     {
@@ -724,7 +719,7 @@
                 else if (lineToParse.StartsWith("G92"))
                 {
                     double ePosition = 0;
-                    if (GetFirstNumberAfter("E", lineToParse, ref ePosition))
+                    if (GetFirstNumberAfter('E', lineToParse, ref ePosition))
                     {
                         lastEPosition = ePosition;
                     }


* Command can take no args.

* Command can take no args.

--- Chraft/Client.Actions.cs
+++ Chraft/Client.Actions.cs
@@ -121,7 +121,11 @@
             if (e.EventCanceled) return;
             command = e.Command;
             //End Event
-			string baseCommand = command.Substring(0, command.IndexOf(" "));
+
+            int argsPos = command.IndexOf(" ");
+            string baseCommand = command;
+            if (argsPos != -1)
+                baseCommand = command.Substring(0, command.IndexOf(" "));
 			if (!CanUseCommand(baseCommand))
             {
                 SendMessage("You do not have permission to use that command");


新增 ISynchronizedDomModifier 接口，用于实现同步修改 DOM 结构。

git-svn-id: deaf5729afa9d9459d700df0b32929dbfb02527c@90930 2327b42d-5241-43d6-9e2a-de5ac946f064

--- Ivony.Html/IHtmlDomModifier.cs
+++ Ivony.Html/IHtmlDomModifier.cs
@@ -92,6 +92,15 @@
     /// 当 HTML DOM 结构发生改变时引发此事件
     /// </summary>
     event EventHandler<HtmlDomChangedEventArgs> HtmlDomChanged;
+  }
+
+
+  /// <summary>
+  /// 同步修改 DOM 结构的 DomModifier
+  /// </summary>
+  public interface ISynchronizedDomModifier : IHtmlDomModifier
+  {
+    object SyncRoot { get; }
   }


Cases of packetmap

Cases of packetmap

--- Chraft/Net/PacketType.cs
+++ Chraft/Net/PacketType.cs
@@ -46,7 +46,7 @@
         AttachEntity = 0x27,                //   <--
         EntityMetadata = 0x28,              //   <--
         EntityEffect = 0x29,                //   <->
-        RemoveEntityEffect = 0x2a,          //   <->
+        RemoveEntityEffect = 0x2A,          //   <->
         PreChunk = 0x32,                    //   <--
         MapChunk = 0x33,                    //   <--
         MultiBlockChange = 0x34,            //   <--


NuGet next version

NuGet next version

--- AsyncFirefoxDriver/Properties/AssemblyInfo.cs
+++ AsyncFirefoxDriver/Properties/AssemblyInfo.cs
@@ -32,5 +32,5 @@
 // Можно задать все значения или принять номер сборки и номер редакции по умолчанию.
 // используя "*", как показано ниже:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.3.9.0")]
-[assembly: AssemblyFileVersion("1.3.9.0")]
+[assembly: AssemblyVersion("1.3.10.0")]
+[assembly: AssemblyFileVersion("1.3.10.0")]


Do not check feerate in walletsend model

--- BTCPayServer/Controllers/WalletsController.cs
+++ BTCPayServer/Controllers/WalletsController.cs
@@ -641,17 +641,6 @@
                     vm.AddModelError(model => model.FeeSatoshiPerByte,
                             "The fee rate should be above 0", this);
                 }
-                if (fee > 5_000m)
-                {
-                    vm.AddModelError(model => model.FeeSatoshiPerByte,
-                            "The fee rate is absurdly high", this);
-                }
-                if (_dashboard.Get(network.CryptoCode).Status?.BitcoinStatus?.MinRelayTxFee?.SatoshiPerByte is decimal minFee)
-                {
-                    if (vm.FeeSatoshiPerByte < minFee)
-                        vm.AddModelError(model => model.FeeSatoshiPerByte,
-                            $"The fee rate is lower than the minimum relay fee ({vm.FeeSatoshiPerByte} < {minFee})", this);
-                }
             }

             if (!ModelState.IsValid)


Defend against null scenario module names

--- Client/ScenarioWorker.cs
+++ Client/ScenarioWorker.cs
@@ -63,6 +63,10 @@

         private bool IsScenarioModuleAllowed(string scenarioName)
         {
+            if (scenarioName == null)
+            {
+                return false;
+            }
             //Blacklist asteroid module from every game mode
             if (scenarioName == "ScenarioDiscoverableObjects")
             {


Adding links to other integrations per @pavlenex suggestion

--- BTCPayServer/Views/Stores/Integrations.cshtml
+++ BTCPayServer/Views/Stores/Integrations.cshtml
@@ -76,6 +76,19 @@
             }

         </form>
+
+

+            Other Integrations
+

+

+            Take a look at documentation for the list of other integrations we support and the directions on how to enable them:
+

+
WooCommerce

+
Drupal

+
Magento

+
PrestaShop

+

+


Fix disposed client bug

Fix disposed client bug

--- Beanstalkd.Client/Default/BeanstalkdClient.cs
+++ Beanstalkd.Client/Default/BeanstalkdClient.cs
@@ -50,7 +50,7 @@
             if (connectionTimeout.WaitOne(10000, false) && TcpClient != null && TcpClient.Connected)
             {
                 var recBuff = new byte[20];
-                TcpClient.Client.Send(new byte[] {65, 13, 10});
+                TcpClient.Client.Send(new byte[] { 65, 13, 10 });
                 TcpClient.Client.Receive(recBuff);

                 if (Encoding.ASCII.GetString(recBuff, 0, 17) != "UNKNOWN_COMMAND\r\n")
@@ -62,7 +62,7 @@
                 throw new BeanstalkdException(BeanstalkdExceptionCode.ConnectionError);
             }

-            _readState = new ReadState {ExpectType = ExpectType.Nothing};
+            _readState = new ReadState { ExpectType = ExpectType.Nothing };
             _queue = new Queue<Command>();
             _receiveBuff = new MemoryStream(8192);
             TcpClient.Client.BeginReceive(_byteBuff, 0, _byteBuff.Length, SocketFlags.None, OnReceive, TcpClient.Client);
@@ -70,7 +70,8 @@

         private void OnReceive(IAsyncResult ar)
         {
-            var socket = (Socket) ar.AsyncState;
+            var socket = (Socket)ar.AsyncState;
+            if (!socket.Connected) return;
             SocketError socketError;
             var size = socket.EndReceive(ar, out socketError);
             if (socketError != SocketError.Success)
@@ -253,7 +254,7 @@
         {
             get
             {
-                var command = new Command {RequestLine = "list-tube-used"};
+                var command = new Command { RequestLine = "list-tube-used" };
                 BeginCommand(command);
                 command.Wait();
                 var match = Regex.Match(command.ResponseLine, "^USING (.+)$");
@@ -265,7 +266,7 @@
         public string Use(string tube)
         {
             if (string.IsNullOrEmpty(tube)) throw new ArgumentNullException("tube");
-            var command = new Command {RequestLine = string.Format("use {0}", tube)};
+            var command = new Command { RequestLine = string.Format("use {0}", tube) };
             BeginCommand(command);
             command.Wait();

@@ -386,7 +387,7 @@

         public bool Delete(uint jobId)
         {
-            var command = new Command {RequestLine = string.Format("delete {0}", jobId)};
+            var command = new Command { RequestLine = string.Format("delete {0}", jobId) };
             BeginCommand(command);
             command.Wait();

@@ -395,7 +396,7 @@

         public bool Release(uint jobId, uint priority = 4294967295, uint delay = 0)
         {
-            var command = new Command {RequestLine = string.Format("release {0} {1} {2}", jobId, priority, delay)};
+            var command = new Command { RequestLine = string.Format("release {0} {1} {2}", jobId, priority, delay) };
             BeginCommand(command);
             command.Wait();

@@ -405,7 +406,7 @@

         public bool Bury(uint jobId, uint priority = 4294967295)
         {
-            var command = new Command {RequestLine = string.Format("bury {0} {1}", jobId, priority)};
+            var command = new Command { RequestLine = string.Format("bury {0} {1}", jobId, priority) };
             BeginCommand(command);
             command.Wait();

@@ -414,7 +415,7 @@

         public bool Touch(uint jobId)
         {
-            var command = new Command {RequestLine = string.Format("touch {0}", jobId)};
+            var command = new Command { RequestLine = string.Format("touch {0}", jobId) };
             BeginCommand(command);
             command.Wait();

@@ -424,7 +425,7 @@
         public uint Watch(string tube)
         {
             if (string.IsNullOrEmpty(tube)) throw new ArgumentNullException("tube");
-            var command = new Command {RequestLine = string.Format("watch {0}", tube)};
+            var command = new Command { RequestLine = string.Format("watch {0}", tube) };
             BeginCommand(command);
             command.Wait();

@@ -438,7 +439,7 @@
         public bool Ignore(string tube)
         {
             if (string.IsNullOrEmpty(tube)) throw new ArgumentNullException("tube");
-            var command = new Command {RequestLine = string.Format("ignore {0}", tube)};
+            var command = new Command { RequestLine = string.Format("ignore {0}", tube) };
             BeginCommand(command);
             command.Wait();

@@ -520,7 +521,7 @@

         public uint Kick(uint bound)
         {
-            var command = new Command {RequestLine = string.Format("kick {0}", bound)};
+            var command = new Command { RequestLine = string.Format("kick {0}", bound) };
             BeginCommand(command);
             command.Wait();

@@ -576,7 +577,7 @@

         public ServerStats Stats()
         {
-            var command = new Command {RequestLine = "stats", ExpectData = line => Regex.IsMatch(line, "^OK \\d+$")};
+            var command = new Command { RequestLine = "stats", ExpectData = line => Regex.IsMatch(line, "^OK \\d+$") };
             BeginCommand(command);
             command.Wait();

@@ -633,7 +634,7 @@
                         continue;
                     }

-                    var lineParts = line.Split(new[] {':'}, 2);
+                    var lineParts = line.Split(new[] { ':' }, 2);

                     if (lineParts.Length == 2)
                         yaml.Add(lineParts[0], lineParts[1].Trim());