Bug fix

Bug fix

--- Source/HelixToolkit.Wpf.SharpDX/Controls/CameraController.cs
+++ Source/HelixToolkit.Wpf.SharpDX/Controls/CameraController.cs
@@ -2104,14 +2104,7 @@
         /// </param>
         public void OnCompositionTargetRendering(long ticks)
         {
-            var time = 100e-9 * (ticks - this.lastTick);
-
-            if (this.lastTick != 0)
-            {
-                this.OnTimeStep(time);
-            }
-
-            this.lastTick = ticks;
+            this.OnTimeStep(ticks);
         }

         /// <summary>
@@ -2256,12 +2249,28 @@
         /// <param name="time">
         /// The time.
         /// </param>
-        private void OnTimeStep(double time)
-        {
+        private void OnTimeStep(long ticks)
+        {
+            if (lastTick == 0)
+            {
+                lastTick = ticks;
+            }
+            var time = 100e-9 * (ticks - this.lastTick);
             // should be independent of time
             var factor = this.IsInertiaEnabled ? Math.Pow(this.InertiaFactor, time / 0.012) : 0;
             factor = this.Clamp(factor, 0.2, 1);
             bool needUpdate = false;
+            if (this.rotationSpeed.LengthSquared > 0.1)
+            {
+                this.rotateHandler.Rotate(
+                    this.rotationPosition, this.rotationPosition + (this.rotationSpeed * time), this.rotationPoint3D);
+                this.rotationSpeed *= factor;
+                needUpdate = true;
+            }
+            else
+            {
+                this.rotationSpeed = new Vector();
+            }
             if (this.isSpinning && this.spinningSpeed.LengthSquared > 0.1)
             {
                 this.rotateHandler.Rotate(
@@ -2277,17 +2286,7 @@
             {
                 this.spinningSpeed = new Vector();
             }
-            if (this.rotationSpeed.LengthSquared > 0.1)
-            {
-                this.rotateHandler.Rotate(
-                    this.rotationPosition, this.rotationPosition + (this.rotationSpeed * time), this.rotationPoint3D);
-                this.rotationSpeed *= factor;
-                needUpdate = true;
-            }
-            else
-            {
-                this.rotationSpeed = new Vector();
-            }
+
             if (this.panSpeed.LengthSquared > 0.0001)
             {
                 this.panHandler.Pan(this.panSpeed * time);
@@ -2320,7 +2319,12 @@
             { zoomSpeed = 0; }
             if (needUpdate)
             {
+                lastTick = ticks;
                 Viewport.InvalidateRender();
+            }
+            else
+            {
+                lastTick = 0;
             }
         }


Add nulalble annotations and extra validation.

--- GUtils.Net/DownloadClient.cs
+++ GUtils.Net/DownloadClient.cs
@@ -94,13 +94,13 @@
         /// <summary>
         /// The user agent to use when downloading the file
         /// </summary>
-        public String UserAgent { get; set; }
+        public String? UserAgent { get; set; }

         private readonly Int32 _bufferSize;
         private Int64 _receivedBytes;
         private Int64 _totalBytes;
-        private readonly String _url;
-        private readonly Uri _uri;
+        private readonly String? _url;
+        private readonly Uri? _uri;

         /// <summary>
         /// Creates a new <see cref="DownloadClient"/> that will obtain the file from <paramref
@@ -132,7 +132,7 @@
         /// <summary>
         /// Called when progress is made on the download
         /// </summary>
-        public event EventHandler<DownloadClientDownloadProgressChangedArgs> DownloadProgressChanged;
+        public event EventHandler<DownloadClientDownloadProgressChangedArgs>? DownloadProgressChanged;

         /// <summary>
         /// Indicates whether this <see cref="DownloadClient"/> is downloading
@@ -188,6 +188,9 @@
         /// <returns></returns>
         public async Task DownloadToStreamAsync ( Stream stream, Int32 timeout = 5000 )
         {
+            if ( stream is null )
+                throw new ArgumentNullException ( nameof ( stream ) );
+
             // Get the response for the contents of the file
             HttpWebResponse response = await this.GetResponseAsync( )
                                                  .ConfigureAwait( false );
@@ -250,7 +253,9 @@
         private async Task<HttpWebResponse> GetResponseAsync ( )
         {
             HttpWebRequest req = this._uri is null
+#pragma warning disable CA2234 // Pass system uri objects instead of strings (it's being done below)
                 ? WebRequest.CreateHttp ( this._url )
+#pragma warning restore CA2234 // Pass system uri objects instead of strings (it's being done below)
                 : WebRequest.CreateHttp ( this._uri );
             if ( this.UserAgent != null )
                 req.UserAgent = this.UserAgent;


Update Global.asax.cs

Update Global.asax.cs

--- src/Global.asax.cs
+++ src/Global.asax.cs
@@ -13,7 +13,7 @@
     {
         protected void Application_Start()
         {
-            throw new Exception("Testing CI");
+            THIS WON*T BUILD

             ViewEngines.Engines.Clear();
             ViewEngines.Engines.Add(new RazorViewEngine());


Adding a little parallelism to Gaussian clusters decision computation.

--- Sources/Accord.MachineLearning/Clustering/GaussianCluster.cs
+++ Sources/Accord.MachineLearning/Clustering/GaussianCluster.cs
@@ -27,6 +27,7 @@
     using System.Collections.ObjectModel;
     using Accord.Math;
     using Accord.Statistics.Distributions.Multivariate;
+    using System.Threading.Tasks;

     /// <summary>
     ///   Gaussian Mixture Model cluster.
@@ -287,8 +288,11 @@
         public int[] Nearest(double[][] points)
         {
             int[] labels = new int[points.Length];
-            for (int i = 0; i < points.Length; i++)
+
+            Parallel.For(0, points.Length, i =>
+            {
                 labels[i] = Nearest(points[i]);
+            });

             return labels;
         }


Removed useless array copy and variables.

--- Sources/RimWorldRealFoW/ThingComps/CompFieldOfViewWatcher.cs
+++ Sources/RimWorldRealFoW/ThingComps/CompFieldOfViewWatcher.cs
@@ -36,10 +36,12 @@

 		private float baseViewRange;

-		private bool[] viewMap;
+		private bool[] viewMap1;
+		private bool[] viewMap2;
+
 		private CellRect viewRect;
-		private bool[] newViewMap;
-		private CellRect newViewRect;
+
+		private bool viewMapSwitch = false;

 		private IntVec3[] viewPositions;

@@ -91,11 +93,10 @@
 			lastSightRange = 0;
 			lastIsPeeking = false;

-			viewMap = new bool[0];
+			viewMap1 = new bool[0];
+			viewMap2 = new bool[0];
+
 			viewRect = new CellRect(-1, -1, 0, 0);
-
-			newViewMap = new bool[0];
-			newViewRect = new CellRect(-1, -1, 0, 0);

 			viewPositions = new IntVec3[5];

@@ -147,7 +148,7 @@
 			updateFoV();
 		}

-		private bool doBenchmark = false;
+		private bool doBenchmark = true;
 		private bool benchmarkPerformed = false;

 		public override void CompTick() {
@@ -482,45 +483,38 @@
 			//	Log.Message("calculateFoV: " + thing.ThingID);
 			//}

-			// Local references (C# is slow to access fields...).
-			Map map = this.map;
 			int mapSizeX = map.Size.x;
 			int mapSizeZ = map.Size.z;

-			bool[] viewMap = this.viewMap;
-			bool[] newViewMap = this.newViewMap;
-			IntVec3[] viewPositions = this.viewPositions;
+			bool[] viewMap = viewMapSwitch ? this.viewMap1 : this.viewMap2;
+			bool[] newViewMap = viewMapSwitch ? this.viewMap2 : this.viewMap1;

 			EdificeGrid edificeGrid = map.edificeGrid;
 			CellIndices cellIndices = map.cellIndices;

 			IntVec3 position = thing.Position;
-			IntVec2 size = thing.def.size;
-			Rot4 rotation = thing.Rotation;
-
 			Faction faction = parent.Faction;

 			int peekMod = (peek ? 1 : 0);

 			// Calculate new view rect.
 			CellRect occupedRect = thing.OccupiedRect();
-			newViewRect.maxX = Math.Max(position.x + intRadius + peekMod, occupedRect.maxX);
-			newViewRect.minX = Math.Min(position.x - intRadius - peekMod, occupedRect.minX);
-			newViewRect.maxZ = Math.Max(position.z + intRadius + peekMod, occupedRect.maxZ);
-			newViewRect.minZ = Math.Min(position.z - intRadius - peekMod, occupedRect.minZ);
-
-			int newViewRectMinX = newViewRect.minX;
-			int newViewRectMaxX = newViewRect.maxX;
-			int newViewRectMinZ = newViewRect.minZ;
-			int newViewRectMaxZ = newViewRect.maxZ;
-
-			int newViewWidth = newViewRect.Width;
-			int newViewArea = newViewRect.Area;
+			int newViewRectMinX = Math.Min(position.x - intRadius - peekMod, occupedRect.minX);
+			int newViewRectMaxX = Math.Max(position.x + intRadius + peekMod, occupedRect.maxX);
+			int newViewRectMinZ = Math.Min(position.z - intRadius - peekMod, occupedRect.minZ);
+			int newViewRectMaxZ = Math.Max(position.z + intRadius + peekMod, occupedRect.maxZ);
+
+			int newViewWidth = newViewRectMaxX - newViewRectMinX + 1;
+			int newViewArea = newViewWidth * (newViewRectMaxZ - newViewRectMinZ + 1);

 			// Clear or reset the new view map.
 			if (newViewMap.Length < newViewArea) {
 				newViewMap = new bool[newViewArea];
-				this.newViewMap = newViewMap;
+				if (viewMapSwitch) {
+					this.viewMap2 = newViewMap;
+				} else {
+					this.viewMap1 = newViewMap;
+				}
 			} else {
 				for (int i = 0; i < newViewArea; i++) {
 					newViewMap[i] = false;
@@ -606,12 +600,8 @@
 				}
 			}

-			// Update the view area.
-			if (viewMap.Length < newViewArea) {
-				viewMap = new bool[newViewArea];
-				this.viewMap = viewMap;
-			}
-			Buffer.BlockCopy(newViewMap, 0, viewMap, 0, sizeof(byte) * newViewArea);
+			// Use te new view area.
+			viewMapSwitch = !viewMapSwitch;

 			// Update the view rect.
 			viewRect.maxX = newViewRectMaxX;
@@ -624,6 +614,7 @@
 			if (faction == null) {
 				faction = parent.Faction;
 			}
+			bool[] viewMap = viewMapSwitch ? this.viewMap1 : this.viewMap2;

 			if (viewRect.maxX >= 0 && viewRect.minX >= 0 && viewRect.maxZ >= 0 && viewRect.minZ >= 0 && viewMap.Length > 0) {
 				int mapX = map.Size.x;


Samples: make statusIcon a field This way it is not garbage-collected, but disposed when MainWindow is disposed.

--- Samples/MainWindow.cs
+++ Samples/MainWindow.cs
@@ -17,10 +17,12 @@
 		DataField<Sample> widgetCol = new DataField<Sample> ();
 		DataField<Image> iconCol = new DataField<Image> ();

+		StatusIcon statusIcon;
+
 		public MainWindow ()
 		{
 			try {
-				var statusIcon = Application.CreateStatusIcon ();
+				statusIcon = Application.CreateStatusIcon ();
 				statusIcon.Menu = new Menu ();
 				statusIcon.Menu.Items.Add (new MenuItem ("Test"));
 				statusIcon.Image = Image.FromResource (GetType (), "package.png");
@@ -110,6 +112,15 @@

 			samplesTree.SelectionChanged += HandleSamplesTreeSelectionChanged;
 		}
+
+		protected override void Dispose (bool disposing)
+		{
+			base.Dispose (disposing);
+
+			if (statusIcon != null) {
+				statusIcon.Dispose ();
+			}
+		}

 		void HandleSamplesTreeSelectionChanged (object sender, EventArgs e)
 		{


test robustness 11

test robustness 11

--- Spa2/NakedObjects.Spa.Selenium.Test/tests/ObjectViewTests.cs
+++ Spa2/NakedObjects.Spa.Selenium.Test/tests/ObjectViewTests.cs
@@ -18,6 +18,7 @@
         public virtual void ActionsAlreadyOpen() {
             GeminiUrl("object?o1=___1.Customer--555&as1=open");
             WaitForView(Pane.Single, PaneType.Object, "Twin Cycles, AW00000555");
+            wait.Until(d => br.FindElements(By.CssSelector(".submenu")).Count >= 1);
             OpenSubMenu("Orders");
             var actions = GetObjectActions(7);
             Assert.AreEqual("Review Sales Responsibility", actions[0].GetAttribute("value"));


ArrangementWords as *.txt

ArrangementWords as *.txt

--- Spines.Tools/Spines.Tools.AnalyzerBuilder/MainWindow.xaml.cs
+++ Spines.Tools/Spines.Tools.AnalyzerBuilder/MainWindow.xaml.cs
@@ -26,7 +26,6 @@
 using Microsoft.WindowsAPICodePack.Dialogs;
 using Spines.Mahjong.Analysis.Classification;
 using Spines.Mahjong.Analysis.Combinations;
-using Spines.Utility;

 namespace Spines.Tools.AnalyzerBuilder
 {
@@ -159,10 +158,8 @@
     {
       var arrangementFile = Path.Combine(workingDirectory, "ArrangementCombinations.txt");
       var words = CreateWords(arrangementFile);
-      var wordBytes = words.SelectMany(WordToBytes).ToArray();
-      var wordsFile = Path.Combine(workingDirectory, "ArrangementWords.dat");
-      //File.WriteAllLines(wordsFile, words.Select(w => string.Join(",", w.Word) + ":" + w.Value));
-      File.WriteAllBytes(wordsFile, wordBytes);
+      var wordsFile = Path.Combine(workingDirectory, "ArrangementWords.txt");
+      File.WriteAllLines(wordsFile, words.Select(w => string.Join(",", w.Word) + ":" + w.Value));
     }

     private IEnumerable<WordWithValue> CreateWords(string arrangementsFile)
@@ -217,11 +214,6 @@
           }
         }
       }
-    }
-
-    private static IEnumerable<byte> WordToBytes(WordWithValue word)
-    {
-      return word.Word.Select(c => (byte)c).Concat(unchecked((byte)word.Value).Yield());
     }

     private static IEnumerable<Arrangement> ParseArrangements(string line)


Just set toolbar title instead of the whole activitys title

--- Src/Morphous.Native.Droid/UI/Elements/TitlePartViewHolder.cs
+++ Src/Morphous.Native.Droid/UI/Elements/TitlePartViewHolder.cs
@@ -30,7 +30,7 @@

             if (toolbar != null && appCompatActivity != null)
             {
-                appCompatActivity.Title = Element.Title;
+                toolbar.Title = Element.Title;
                 appCompatActivity.SetSupportActionBar(toolbar);
                 return null;
             }


made class public

made class public

--- TCC.Core/Parsing/Messages/S_AVAILABLE_EVENT_MATCHING_LIST.cs
+++ TCC.Core/Parsing/Messages/S_AVAILABLE_EVENT_MATCHING_LIST.cs
@@ -9,7 +9,7 @@

 namespace TCC.Parsing.Messages
 {
-    class S_AVAILABLE_EVENT_MATCHING_LIST : ParsedMessage
+    public class S_AVAILABLE_EVENT_MATCHING_LIST : ParsedMessage
     {
         public int VanguardCredits { get; set; }
         public int WeeklyDone { get; set; }


Add unit test

Add unit test


Not necessary variable removed

Not necessary variable removed

--- Tulpep.InternetSimulator/Tulpep.InternetSimulator/Program.cs
+++ Tulpep.InternetSimulator/Tulpep.InternetSimulator/Program.cs
@@ -16,18 +16,18 @@
     {
         private static Options _options = new Options();
         private const string AUTO_IP_ADDRESS = "DHCP";
+        private static Dictionary<string, string> _nicsOriginalConfiguration = GetDnsConfiguration();
         static void Main(string[] args)
         {
             CommandLine.Parser.Default.ParseArguments(args, _options);

-            Dictionary<string, string> nicsConfiguration = GetDnsConfiguration();
-            ChangeInterfacesToLocalDns(nicsConfiguration);
+            ChangeInterfacesToLocalDns();

             StartDnsServer();
             Console.WriteLine("Press any key to stop server");
             Console.ReadLine();

-            ChangeInterfacesToOriginalDnsConfig(nicsConfiguration);
+            ChangeInterfacesToOriginalDnsConfig();
             Console.ReadLine();
         }

@@ -52,10 +52,10 @@
             return result;
         }

-        static void ChangeInterfacesToLocalDns(Dictionary<string, string> interfacesConfig)
+        static void ChangeInterfacesToLocalDns()
         {
             WriteInConsole("Configuring DNS servers in Network Intercaces as 127.0.0.1...");
-            foreach (var nic in interfacesConfig)
+            foreach (var nic in _nicsOriginalConfiguration)
             {
                 SetDns(nic.Key, "127.0.0.1");
             }
@@ -71,15 +71,14 @@
             process.StartInfo.RedirectStandardOutput = true;
             process.Start();
             process.WaitForExit();
-            var ifg = process.StandardOutput.ReadToEnd();
-            if (ifg.Contains("DHCP:")) return true;
+            if (process.StandardOutput.ReadToEnd().Contains("DHCP:")) return true;
             else return false;
         }

-        static void ChangeInterfacesToOriginalDnsConfig(Dictionary<string, string> interfacesConfig)
+        static void ChangeInterfacesToOriginalDnsConfig()
         {
             WriteInConsole("Restoring DNS servers in Network Interfaces to their original configuration...");
-            foreach (var nic in interfacesConfig)
+            foreach (var nic in _nicsOriginalConfiguration)
             {
                 SetDns(nic.Key, nic.Value);
             }


Update: remove index param

Update: remove index param

--- Unity/Demos/Assets/Scripts/DragonBones/unity/UnityFactory.cs
+++ Unity/Demos/Assets/Scripts/DragonBones/unity/UnityFactory.cs
@@ -767,7 +767,6 @@
 				if (slotDisplayDataSet != null)
 				{
 					DisplayData prevDispalyData = null;
-					int index = 0;
 					foreach (var displayData in slotDisplayDataSet.displays)
 					{
 						if (displayData.name == displayName)
@@ -775,7 +774,6 @@
 							prevDispalyData = displayData;
 							break;
 						}
-						++index;
 					}
 					if(prevDispalyData==null){
 						return;


Need different target for each snapshot so that it doesn't cache heap data

--- Gatos.Monitor/LeakMonitor.cs
+++ Gatos.Monitor/LeakMonitor.cs
@@ -27,16 +27,15 @@
         protected override void OnIntensiveSamplingStart()
         {
             var snapshots = new List<HeapSnapshot>();
-            using (var target = DataTarget.AttachToProcess(Process.GetCurrentProcess().Id, 1000, AttachFlag.Passive))
+            for (int i = 0; i < SnapshotCount; ++i)
             {
-                var runtime = target.ClrVersions[0].CreateRuntime();
+                GC.Collect();
+                GC.WaitForPendingFinalizers();
+                GC.Collect();

-                for (int i = 0; i < SnapshotCount; ++i)
+                using (var target = DataTarget.AttachToProcess(Process.GetCurrentProcess().Id, 1000, AttachFlag.Passive))
                 {
-                    GC.Collect();
-                    GC.WaitForPendingFinalizers();
-                    GC.Collect();
-
+                    var runtime = target.ClrVersions[0].CreateRuntime();
                     snapshots.Add(new HeapSnapshot(runtime.Heap, TopTypes));
                     Thread.Sleep(SnapshotInterval);
                 }


Update Identifier CSV fix for #17 to Record_Identifier

--- Gedcomx.Util/RecordHelper.cs
+++ Gedcomx.Util/RecordHelper.cs
@@ -207,8 +207,8 @@
 				if (sourceDescription.KnownResourceType == ResourceType.Record)
 				{
 					var identifyer = sourceDescription.Identifiers.Where(p => p.KnownType == IdentifierType.Persistent).FirstOrDefault();
-					_columnNames.Add("IDENTIFER");
-					_currentRecord["IDENTIFER"] = identifyer != null ? identifyer.Value : "";
+					_columnNames.Add("RECORD_IDENTIFER");
+					_currentRecord["RECORD_IDENTIFER"] = identifyer != null ? identifyer.Value : "";
 				}

                 base.VisitSourceDescription(sourceDescription);


More any constrains on one property working

--- DotNetRdfTests/DotNetRdfTests/RavenTests.cs
+++ DotNetRdfTests/DotNetRdfTests/RavenTests.cs
@@ -7,6 +7,7 @@
 using Raven.Client;
 using Raven.Client.Embedded;
 using Raven.Client.Indexes;
+using Raven.Database.Indexing;
 using Raven.Database.Server;
 using Raven.Tests.Helpers;
 using Xunit;
@@ -37,7 +38,7 @@
         {
             await StoreTestData();

-            using (IAsyncDocumentSession session = _documentStore.OpenAsyncSession())
+            using (var session = _documentStore.OpenAsyncSession())
             {
                 IQueryable<string> petrQuery =
                     session.Query<Parent>()
@@ -59,7 +60,7 @@
         {
             await StoreTestData();

-            using (IAsyncDocumentSession session = _documentStore.OpenAsyncSession())
+            using (var session = _documentStore.OpenAsyncSession())
             {
                 IQueryable<string> petrQuery =
                     session.Query<Parent>()
@@ -80,21 +81,22 @@
         [Fact]
         public async Task HasMarieAndTomasChildrenTest()
         {
+            IndexCreation.CreateIndexes(typeof(RavenTests).Assembly, _documentStore);
+
             await StoreTestData();

-            using (IAsyncDocumentSession session = _documentStore.OpenAsyncSession())
+            using (var session = _documentStore.OpenSession())
             {
-
-
                 RavenQueryStatistics statistics;
                 IQueryable<string> petrQuery =
-                    session.Query<Parent>()
+                    session.Query<Parent, AnalyzeChildrenNamesIndex>()
+                        .Customize(c => c.WaitForNonStaleResults())
                         .Statistics(out statistics)
                         .Where(parent => parent.Children.Any(child => child.Name == "Marie"))
                         .Where(parent => parent.Children.Any(child => child.Name == "Tomáš"))
                         .Select(parent => parent.Name);

-                IList<string> names = await petrQuery.ToListAsync();
+                IList<string> names = petrQuery.ToList();

                 RavenTestBase.WaitForUserToContinueTheTest(_documentStore);

@@ -102,6 +104,15 @@
                 Assert.Equal(names.Count, 1);
                 Assert.True(names.Contains("Petr"));
             }
+        }
+
+        public class AnalyzeChildrenNamesIndex : AbstractIndexCreationTask<Parent>
+        {
+            public AnalyzeChildrenNamesIndex()
+            {
+                Map = parents => from parent in parents select new {Children_Name = parent.Children.Select(c => c.Name)};
+                Index(x => x.Children.Select(c => c.Name), FieldIndexing.Analyzed);
+            }
         }

         private async Task StoreTestData()


fixed typo in Hub

fixed typo in Hub

--- x2/Hub.cs
+++ x2/Hub.cs
@@ -91,7 +91,7 @@

         internal bool Attach(Flow flow)
         {
-            if (name == null)
+            if (flow == null)
             {
                 throw new NullReferenceException();
             }
@@ -100,7 +100,7 @@

         internal bool Detach(Flow flow)
         {
-            if (name == null)
+            if (flow == null)
             {
                 throw new NullReferenceException();
             }


extract method refactoring

extract method refactoring

Former-commit-id: 88999bf0dfd2081179121a18c5455bb64a7dd1d1

--- Containers/MassTransit.WindsorIntegration/MassTransitFacility.cs
+++ Containers/MassTransit.WindsorIntegration/MassTransitFacility.cs
@@ -105,15 +105,20 @@
                                             Kernel.Resolve<IEndpointResolver>());

             IConfiguration threadConfig = busConfig.Children["dispatcher"];
+            ConfigureThreadingModel(threadConfig, bus);
+
+            Kernel.AddComponentInstance(id, typeof (IServiceBus), bus);
+
+            return bus;
+        }
+
+        private void ConfigureThreadingModel(IConfiguration threadConfig, ServiceBus bus)
+        {
             if (threadConfig != null)
             {
                 bus.MinThreadCount = GetConfigurationValue(threadConfig, "minThreads", 1);
                 bus.MaxThreadCount = GetConfigurationValue(threadConfig, "maxThreads", 10);
             }
-
-            Kernel.AddComponentInstance(id, typeof (IServiceBus), bus);
-
-            return bus;
         }

         private static T GetConfigurationValue<T>(IConfiguration config, string attributeName, T defaultValue)


PG-1162: Improved wording in comment

PG-1162: Improved wording in comment

--- Glyssen/Quote/QuoteParser.cs
+++ Glyssen/Quote/QuoteParser.cs
@@ -647,7 +647,7 @@
 		private ICharacterDeliveryInfo GetMatchingCharacter(Block newBlock, ICharacterDeliveryInfo subsequentImplicitCv)
 		{
 			ICharacterDeliveryInfo leadInCharacter = null;
-			// There will almost ever be only one entry with a matching character name. But if there are two, we
+			// There will almost always be only one entry with a matching character name. But if there are two, we
 			// want the one whose delivery matches, if any.
 			foreach (var character in m_cvInfo.GetCharacters(m_bookNum, newBlock.ChapterNumber, newBlock.LastVerseNum,
 				versification: m_versification).Where(cv => cv.Character == subsequentImplicitCv.Character))


Increase timeout for ProjectTests

Increase timeout for ProjectTests

--- GlyssenTests/ProjectTests.cs
+++ GlyssenTests/ProjectTests.cs
@@ -18,7 +18,7 @@

 namespace GlyssenTests
 {
-	[TestFixture, Timeout(30000)]
+	[TestFixture, Timeout(60000)]
 	class ProjectTests
 	{
 		private readonly HashSet<string> m_tempProjectFolders = new HashSet<string>();


Pass-through touch input from UI events

Pass-through touch input from UI events

--- osu.Framework/Input/PassThroughInputManager.cs
+++ osu.Framework/Input/PassThroughInputManager.cs
@@ -103,6 +103,18 @@
                         new MouseButtonInput(mouseUp.Button, false).Apply(CurrentState, this);
                     break;

+                case TouchMoveEvent touchMove:
+                    new TouchPositionInput(touchMove.ScreenSpaceTouch.Source, touchMove.ScreenSpaceTouchPosition).Apply(CurrentState, this);
+                    break;
+
+                case TouchDownEvent touchDown:
+                    new TouchActivityInput(touchDown.ScreenSpaceTouch.Source, true).Apply(CurrentState, this);
+                    break;
+
+                case TouchUpEvent touchUp:
+                    new TouchActivityInput(touchUp.ScreenSpaceTouch.Source, false).Apply(CurrentState, this);
+                    break;
+
                 case ScrollEvent scroll:
                     new MouseScrollRelativeInput { Delta = scroll.ScrollDelta, IsPrecise = scroll.IsPrecise }.Apply(CurrentState, this);
                     break;


Replace if/else statement

Replace if/else statement

--- osu.Game/Screens/Multi/Match/MatchSubScreen.cs
+++ osu.Game/Screens/Multi/Match/MatchSubScreen.cs
@@ -150,20 +150,12 @@
             {
                 const float fade_duration = 500;

-                if (tab.NewValue is SettingsMatchPage)
-                {
-                    header.ShowBeatmapPanel.Value = false;
-                    settings.Show();
-                    info.FadeOut(fade_duration, Easing.OutQuint);
-                    bottomRow.FadeOut(fade_duration, Easing.OutQuint);
-                }
-                else
-                {
-                    header.ShowBeatmapPanel.Value = true;
-                    settings.Hide();
-                    info.FadeIn(fade_duration, Easing.OutQuint);
-                    bottomRow.FadeIn(fade_duration, Easing.OutQuint);
-                }
+                var settingsDisplayed = tab.NewValue is SettingsMatchPage;
+
+                header.ShowBeatmapPanel.Value = !settingsDisplayed;
+                settings.State.Value = settingsDisplayed ? Visibility.Visible : Visibility.Hidden;
+                info.FadeTo(settingsDisplayed ? 0 : 1, fade_duration, Easing.OutQuint);
+                bottomRow.FadeTo(settingsDisplayed ? 0 : 1, fade_duration, Easing.OutQuint);
             }, true);

             chat.Exit += () =>


Add note about future behaviour

Add note about future behaviour

--- osu.Game/Screens/Play/HUD/HoldForMenuButton.cs
+++ osu.Game/Screens/Play/HUD/HoldForMenuButton.cs
@@ -251,7 +251,7 @@
                 switch (action)
                 {
                     case GlobalAction.Back:
-                    case GlobalAction.PauseGameplay:
+                    case GlobalAction.PauseGameplay: // in the future this behaviour will differ for replays etc.
                         if (!pendingAnimation)
                             BeginConfirm();
                         return true;


Reordered WebSocket headers acording to RFC example.

--- HCDU.API/Server/WebServer.cs
+++ HCDU.API/Server/WebServer.cs
@@ -80,9 +80,9 @@
             string serverKey = CreateWebSocketServerKey(clientKey);

             WriteLine(stream, "HTTP/1.1 101 Switching Protocols");
+            WriteHeader(stream, HttpHeader.Upgrade, HttpHeader.UpgradeWebsocket);
             WriteHeader(stream, HttpHeader.Connection, HttpHeader.ConnectionUpgrade);
             WriteHeader(stream, HttpHeader.SecWebSocketAccept, serverKey);
-            WriteHeader(stream, HttpHeader.Upgrade, HttpHeader.UpgradeWebsocket);
             WriteLine(stream, "");

             SendWebSocketMessage(stream, "Hello.");


[trunk] Added workaround to MakeFile CApplication builder on non-Windows targets

--- packages/C/dev/MakeFileBuilder/CApplication.cs
+++ packages/C/dev/MakeFileBuilder/CApplication.cs
@@ -77,10 +77,15 @@

                 recipeBuilder.AppendFormat(" {0} $(filter %{1},$^) ", commandLineBuilder.ToString(' '), compilerTool.ObjectFileSuffix);

-                C.IWinResourceCompilerTool winResourceCompilerTool = toolset.Tool(typeof(C.IWinResourceCompilerTool)) as C.IWinResourceCompilerTool;
-                if (null != winResourceCompilerTool)
+                // TODO: is there a better way of doing this? the toolset.Tool function will throw an exception
+                // if the required tool is not present
+                if (target.HasPlatform(Opus.Core.EPlatform.Windows))
                 {
-                    recipeBuilder.AppendFormat("$(filter %{0},$^) ", winResourceCompilerTool.CompiledResourceSuffix);
+                    C.IWinResourceCompilerTool winResourceCompilerTool = toolset.Tool(typeof(C.IWinResourceCompilerTool)) as C.IWinResourceCompilerTool;
+                    if (null != winResourceCompilerTool)
+                    {
+                        recipeBuilder.AppendFormat("$(filter %{0},$^) ", winResourceCompilerTool.CompiledResourceSuffix);
+                    }
                 }

                 // TODO: don't want to access the archiver tool here really, as creating


Making construction and update have same behavior

--- Gui/ResponsiveImageWidget.cs
+++ Gui/ResponsiveImageWidget.cs
@@ -37,8 +37,9 @@
 	{
 		private ImageBuffer checkerboard;
 		private ImageBuffer _image;
+        private bool maxWidthSetExplicitly;

-		public bool RenderCheckerboard { get; set; }
+        public bool RenderCheckerboard { get; set; }

 		public ResponsiveImageWidget(ImageBuffer initialImage)
 		{
@@ -62,15 +63,25 @@
 			}
 		}

-		private void ImageChanged(object s, EventArgs e)
+        public override void OnMaximumSizeChanged(EventArgs e)
+        {
+            if (MaximumSize.X != Image.Width * GuiWidget.DeviceScale)
+            {
+				maxWidthSetExplicitly = true;
+            }
+
+            base.OnMaximumSizeChanged(e);
+        }
+
+        private void ImageChanged(object s, EventArgs e)
 		{
 			// kill whatever resize process we are running
 			var newBounds = LocalBounds;
 			if (Image.Width > 0)
 			{
 				var scale = Math.Min(GuiWidget.DeviceScale, newBounds.Width / Image.Width);
-				MaximumSize = new Vector2(Image.Width * GuiWidget.DeviceScale,
-					Image.Height * GuiWidget.DeviceScale);
+                var maxX = maxWidthSetExplicitly ? MaximumSize.X : Image.Width * GuiWidget.DeviceScale;
+                MaximumSize = new Vector2(maxX, Image.Height * GuiWidget.DeviceScale);
 				newBounds.Top = newBounds.Bottom + Image.Height * scale;
 				base.LocalBounds = newBounds;
 			}


Workaround for positioning tabs

Workaround for positioning tabs

--- Gui/TabControl/TabControl.cs
+++ Gui/TabControl/TabControl.cs
@@ -196,7 +196,7 @@
 			AddTab(new TextTab(tabPageWidget, internalTabName));
 		}

-		public void AddTab(Tab newTab)
+		public void AddTab(Tab newTab, int tabPosition = -1)
 		{
 			TabPage tabPageWidget = newTab.TabPage;

@@ -214,7 +214,7 @@
 					break;
 			}

-			tabBar.AddChild(newTab);
+			tabBar.AddChild(newTab, tabPosition);

 			tabBar.TabPageContainer.AddChild(tabPageWidget);


GetDateTimeValue / SetDateTimeValue

GetDateTimeValue / SetDateTimeValue

--- Extensions/AttributeCollectionExtensions.cs
+++ Extensions/AttributeCollectionExtensions.cs
@@ -96,5 +96,28 @@
 		{
 			SetPicklistValue(properties, name, value);
 		}
+
+		public static DateTime GetDateTimeValue(this AttributeCollection properties, string name)
+		{
+			if (!properties.Contains(name))
+				return DateTime.MinValue;
+
+			object property = properties[name];
+			if (property != null)
+				return Convert.ToDateTime(property);
+			return DateTime.MinValue;
+		}
+
+		public static void SetDateTimeValue(this AttributeCollection properties, string name, DateTime value)
+		{
+			if (!properties.Contains(name))
+			{
+				properties.Add(name, value);
+			}
+			else
+			{
+				properties[name] = value;
+			}
+		}
 	}
 }


Fixes path to nugetPropsLocation

Fixes path to nugetPropsLocation

--- FlubuCore/Scripting/NugetPackageResolver.cs
+++ FlubuCore/Scripting/NugetPackageResolver.cs
@@ -51,7 +51,7 @@

             var csprojDir = Path.GetDirectoryName(csprojLocation);
             var csprojfileName = Path.GetFileName(csprojLocation);
-            var nugetPropsLocation = Path.Combine(csprojDir, "obj", csprojfileName + "nuget.g.props");
+            var nugetPropsLocation = Path.Combine(csprojDir, "obj", csprojfileName + ".nuget.g.props");
             bool nugetPropsFileExists = _file.Exists(nugetPropsLocation);
             bool mustRestoreNugetPackages = true;


DependencyProperty - Cache HashKey

DependencyProperty - Cache HashKey

Reuse the hash key in IsValidReadOnlyKey instead of creating it

--- Granular.Presentation/DependencyProperty.cs
+++ Granular.Presentation/DependencyProperty.cs
@@ -28,10 +28,14 @@
             public Type Owner { get; private set; }
             public string Name { get; private set; }

+            private int hashCode;
+
             public DependencyPropertyHashKey(Type owner, string name)
             {
                 this.Owner = owner;
                 this.Name = name;
+
+                this.hashCode = Owner.GetHashCode() ^ Name.GetHashCode();
             }

             public override bool Equals(object obj)
@@ -45,7 +49,7 @@

             public override int GetHashCode()
             {
-                return Owner.GetHashCode() ^ Name.GetHashCode();
+                return hashCode;
             }

             public override string ToString()
@@ -86,6 +90,7 @@
         public bool IsReadOnly { get; private set; }
         public bool Inherits { get; private set; }

+        private DependencyPropertyHashKey hashKey;
         private Dictionary<Type, PropertyMetadata> typeMetadata;
         private PropertyMetadata ownerMetadata;
         private bool isAttached;
@@ -100,10 +105,11 @@
         private static readonly ListDictionary<Type, DependencyProperty> typeRegisteredProperties = new ListDictionary<Type, DependencyProperty>();
         private static readonly CacheDictionary<Type, IEnumerable<DependencyProperty>> typeFlattenedPropertiesCache = new CacheDictionary<Type, IEnumerable<DependencyProperty>>(ResolveTypeFlattenedProperties);

-        private DependencyProperty(string name, Type propertyType, Type ownerType, PropertyMetadata metadata, ValidateValueCallback validateValueCallback, bool isAttached, bool isReadOnly)
-        {
-            this.Name = name;
-            this.OwnerType = ownerType;
+        private DependencyProperty(DependencyPropertyHashKey hashKey, Type propertyType, PropertyMetadata metadata, ValidateValueCallback validateValueCallback, bool isAttached, bool isReadOnly)
+        {
+            this.hashKey = hashKey;
+            this.Name = hashKey.Name;
+            this.OwnerType = hashKey.Owner;
             this.PropertyType = propertyType;
             this.ValidateValueCallback = validateValueCallback;
             this.IsReadOnly = isReadOnly;
@@ -113,14 +119,14 @@
             this.isAttached = isAttached;

             typeMetadata = new Dictionary<Type, PropertyMetadata>();
-            typeMetadata.Add(ownerType, ownerMetadata);
+            typeMetadata.Add(OwnerType, ownerMetadata);

             typeMetadataCache = new CacheDictionary<Type, PropertyMetadata>(ResolveTypeMetadata);
         }

         public override int GetHashCode()
         {
-            return OwnerType.GetHashCode() ^ Name.GetHashCode();
+            return hashKey.GetHashCode();
         }

         public override string ToString()
@@ -262,7 +268,7 @@
                 metadata.DefaultValue = ConvertDefaultValue(key, metadata.DefaultValue, propertyType);
             }

-            DependencyProperty property = new DependencyProperty(key.Name, propertyType, key.Owner, metadata, validateValueCallback, isAttached, isReadOnly);
+            DependencyProperty property = new DependencyProperty(key, propertyType, metadata, validateValueCallback, isAttached, isReadOnly);

             if (!property.IsValidValue(metadata.DefaultValue))
             {
@@ -303,7 +309,7 @@
         public static bool IsValidReadOnlyKey(DependencyPropertyKey key)
         {
             DependencyPropertyKey registeredKey;
-            return registeredReadOnlyPropertiesKey.TryGetValue(new DependencyPropertyHashKey(key.DependencyProperty.OwnerType, key.DependencyProperty.Name), out registeredKey) && registeredKey == key;
+            return registeredReadOnlyPropertiesKey.TryGetValue(key.DependencyProperty.hashKey, out registeredKey) && registeredKey == key;
         }

         private static bool IsValidType(object value, Type propertyType)


Remove writeline

Remove writeline

svn path=/trunk/banshee/; revision=3373

--- Hyena/Hyena/ConsoleCrayon.cs
+++ Hyena/Hyena/ConsoleCrayon.cs
@@ -171,8 +171,6 @@
                     break;
             }

-            Console.WriteLine (_xterm_colors);
-
             xterm_colors = _xterm_colors && isatty (1) && isatty (2);
         }


* Correction/refactoring: Tidying up a few less-than perfect code snippets

--- GraphBrowser/trunk/GraphBrowser/Settings.cs
+++ GraphBrowser/trunk/GraphBrowser/Settings.cs
@@ -75,7 +75,7 @@
             string versionString = path.Substring(path.IndexOf("MetaEdit+", 0) + 10);
             char[] splitChars = {'.', ' ', '\\'};
             string[] tokens = versionString.Split(splitChars);
-            return new MEVersion(versionString = tokens[0] + "." + tokens[1]);
+            return new MEVersion(tokens[0] + "." + tokens[1]);
         }

         /// <summary>
@@ -147,8 +147,7 @@

         private bool checkExe(MEVersion version, string programFilesPath, string pathAddendum, string exeAddendum)
         {
-            string filePath = this.ComposeProgramPath(version, programFilesPath, pathAddendum, exeAddendum);
-            return File.Exists(filePath);
+            return File.Exists(this.ComposeProgramPath(version, programFilesPath, pathAddendum, exeAddendum));
         }

        	private void CalculateValues()


[Modify] Do not throw

[Modify] Do not throw

--- websocket-sharp/Server/HttpServer.cs
+++ websocket-sharp/Server/HttpServer.cs
@@ -1013,29 +1013,22 @@
       }

       try {
-        var threw = false;
-
-        try {
-          _services.Stop (code, reason);
-        }
-        catch {
-          threw = true;
-
-          throw;
-        }
-        finally {
-          try {
-            stopReceiving (5000);
-          }
-          catch {
-            if (!threw)
-              throw;
-          }
-        }
-      }
-      finally {
-        _state = ServerState.Stop;
-      }
+        _services.Stop (code, reason);
+      }
+      catch (Exception ex) {
+        _log.Fatal (ex.Message);
+        _log.Debug (ex.ToString ());
+      }
+
+      try {
+        stopReceiving (5000);
+      }
+      catch (Exception ex) {
+        _log.Fatal (ex.Message);
+        _log.Debug (ex.ToString ());
+      }
+
+      _state = ServerState.Stop;
     }

     private void stopReceiving (int millisecondsTimeout)


Updated Assembly Version

Updated Assembly Version

--- Heyns.ZumoClient/Properties/AssemblyInfo.cs
+++ Heyns.ZumoClient/Properties/AssemblyInfo.cs
@@ -1,36 +1,36 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("Heyns.ZumoClient")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("Heyns.ZumoClient")]
-[assembly: AssemblyCopyright("Copyright ©  2012")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components.  If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("52907ebb-c1dc-4bc9-8e3a-078788b4134b")]
-
-// Version information for an assembly consists of the following four values:
-//
-//      Major Version
-//      Minor Version
-//      Build Number
-//      Revision
-//
-// 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("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("Heyns.ZumoClient")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("Heyns.ZumoClient")]
+[assembly: AssemblyCopyright("Copyright ©  2012")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components.  If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("52907ebb-c1dc-4bc9-8e3a-078788b4134b")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version
+//      Build Number
+//      Revision
+//
+// 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.0.0.1")]
+[assembly: AssemblyFileVersion("0.0.0.1")]


fix double jumping

fix double jumping

--- Iris/Classes/ClientPlayer.cs
+++ Iris/Classes/ClientPlayer.cs
@@ -361,6 +361,16 @@
             Vector2i below = posi + new Vector2i(0, 1);
             CollideTypes type = SoftDrop ? CollideTypes.Hard : CollideTypes.HardOrSoft;
             OnGround = dm.MapCollide(below.X, below.Y, type);
+
+            //also set jumps. if just walked off a cliff, take away first jump
+            if (OnGround)
+            {
+                JumpsLeft = MaxJumps;
+            }
+            else if (JumpsLeft == MaxJumps)
+            {
+                JumpsLeft = MaxJumps - 1;
+            }
         }

         private void SolveVert()


CssMultipleSelector 会进行缓存匹配。

CssMultipleSelector 会进行缓存匹配。

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

--- Ivony.Html/Selectors/CssMultipleSelector.cs
+++ Ivony.Html/Selectors/CssMultipleSelector.cs
@@ -29,7 +29,7 @@
     /// <returns>是否符合要求</returns>
     public bool IsEligible( IHtmlElement element )
     {
-      return _selectors.Any( s => s.IsEligible( element ) );
+      return _selectors.Any( s => s.IsEligibleBuffered( element ) );
     }


Added NamingScheme enum

Added NamingScheme enum

--- Jot/TrackingConfiguration.cs
+++ Jot/TrackingConfiguration.cs
@@ -35,15 +35,22 @@

         /// <summary>
         /// The identity of the target. This severs to identify which stored data belongs to which object. If not specified,
-        /// only the type name is used, which is fine for singletons.
+        /// only the type name is used, which is fine for singletons. (check out NamingScheme)
         /// </summary>
         public string Key { get; set; }

         /// <summary>
-        /// The identity of the target. This severs to identify which stored data belongs to which object. If not specified,
-        /// check out the Key definition. If specified the Key is used to indetification. In case Key is not defined, this parameter is ignored.
-        /// </summary>
-        public bool IncludeClassName { get; set; } = true;
+        /// The identity of the target. This severs to identify which stored data belongs to which object.
+        /// Defines format of store name.
+        /// </summary>
+        public enum NamingScheme
+        {
+            TypeNameAndKey, //predefined
+            KeyAndTypeName,
+            KeyOnly,
+            TypeNameOnly
+        }
+        public NamingScheme StoreNamingScheme { get; set; } = NamingScheme.TypeNameAndKey;

         /// <summary>
         /// A dictioanary containing the tracked properties.
@@ -211,13 +218,13 @@
         /// </summary>
         /// <param name="key"></param>
         /// <returns></returns>
-        public TrackingConfiguration IdentifyAs(string key, bool includeClassName = true)
+        public TrackingConfiguration IdentifyAs(string key, NamingScheme storeNamingScheme = NamingScheme.TypeNameAndKey)
         {
             if (TargetStore != null)
                 throw new InvalidOperationException("Can't set key after TargetStore has been set (which happens the first time Apply() or Persist() is called).");

             Key = key;
-            IncludeClassName = includeClassName;
+            StoreNamingScheme = storeNamingScheme;

             return this;
         }
@@ -386,7 +393,14 @@
         {
             object target = TargetReference.Target;
             //use the object type plus the key to identify the object store
-            string storeName = Key == null ? target.GetType().Name : IncludeClassName == true ? string.Format("{0}_{1}", target.GetType().Name, Key) : Key;
+            string storeName = target.GetType().Name;
+            switch (StoreNamingScheme)
+            {
+                case NamingScheme.TypeNameAndKey: storeName = string.Format("{0}_{1}", target.GetType().Name, Key); break;
+                case NamingScheme.KeyOnly: storeName = Key; break;
+                case NamingScheme.KeyAndTypeName: storeName = string.Format("{0}_{1}", Key, target.GetType().Name); break;
+                case NamingScheme.TypeNameOnly: storeName = target.GetType().Name; break;
+            }
             return StateTracker.StoreFactory.CreateStoreForObject(storeName);
         }


Fixed all remaining test issues when running from a folder containing a space character in its name.

--- src/Dotnet.Script.Tests/ScriptExecutionTests.cs
+++ src/Dotnet.Script.Tests/ScriptExecutionTests.cs
@@ -3,6 +3,7 @@
 using System.Text;
 using Dotnet.Script.DependencyModel.Environment;
 using Dotnet.Script.Shared.Tests;
+using Gapotchenko.FX.Diagnostics;
 using Xunit;
 using Xunit.Abstractions;

@@ -139,7 +140,7 @@
         [Fact]
         public void ShouldHandleIssue189()
         {
-            var result = ScriptTestRunner.Default.Execute(Path.Combine(TestPathUtils.GetPathToTestFixtureFolder("Issue189"), "SomeFolder", "Script.csx"));
+            var result = ScriptTestRunner.Default.Execute(CommandLine.Build(Path.Combine(TestPathUtils.GetPathToTestFixtureFolder("Issue189"), "SomeFolder", "Script.csx")));
             Assert.Contains("Newtonsoft.Json.JsonConvert", result.output);
         }


Port coreclr/2192 to System.Private.CoreLib. (#2025)


Bumping the version

Bumping the version

--- SharedAssemblyInfo.cs
+++ SharedAssemblyInfo.cs
@@ -4,7 +4,7 @@
 [assembly: AssemblyProduct("Nancy.Validation.DataAnnotations.Extensions.Tests")]
 [assembly: AssemblyCopyright("Copyright © 2015")]

-[assembly: AssemblyInformationalVersion("0.3.0")]
+[assembly: AssemblyInformationalVersion("0.4.0")]

-[assembly: AssemblyVersion("0.3.0")]
-[assembly: AssemblyFileVersion("0.3.0")]+[assembly: AssemblyVersion("0.4.0")]
+[assembly: AssemblyFileVersion("0.4.0")]


Removed redundant ProcessAsync functions in JsonRpcProcessor.

--- Json-Rpc/JsonRpcProcessor.cs
+++ Json-Rpc/JsonRpcProcessor.cs
@@ -13,67 +13,6 @@
 {
     public static class JsonRpcProcessor
     {
-        public static void AsyncProcess(string jsonRpc, Action<string> callback, object context = null)
-        {
-            AsyncProcess(Handler.DefaultSessionId(), jsonRpc, callback, context);
-        }
-
-        public static void AsyncProcess(string sessionId,string jsonRpc, Action<string> callback, object context = null)
-        {
-            Task.Factory.StartNew(() =>
-            {
-                //callback is stored to thread's local storage in order to get it directly from concrete JsonRpcService method implementation
-                //where callback is just returned from method
-                //Thread.SetData(Thread.GetNamedDataSlot(THREAD_CALLBACK_SLOT_NAME), callback);
-                var str = ProcessInternal(sessionId, jsonRpc, context);
-                callback.Invoke(str);
-            });
-        }
-
-        /// <summary>
-        /// The callback will be returned to the user, who needs to invoke it in concrete
-        /// service implementation. Call should be made directly from same thread as
-        /// service method is executed.
-        /// </summary>
-        /// <param name="sessionId">Handler session id</param>
-        /// <returns></returns>
-        public static Action<JsonResponse> GetAsyncProcessCallback(string sessionId = "")
-        {
-            Handler handler;
-            if ("" == sessionId)
-            {
-                handler = Handler.GetSessionHandler(Handler.DefaultSessionId());
-            }
-            else
-            {
-                handler = Handler.GetSessionHandler(sessionId);
-            }
-
-            return GetAsyncCallback();
-        }
-
-        private const string THREAD_CALLBACK_SLOT_NAME = "Callback";
-
-        /// <summary>
-        /// Method returns the actual callback set to this thread in Handle() method.
-        /// If callback is not set, then empty callback is returned.
-        /// </summary>
-        /// <returns></returns>
-        internal static Action<JsonResponse> GetAsyncCallback()
-        {
-            object o = Thread.GetData(Thread.GetNamedDataSlot(THREAD_CALLBACK_SLOT_NAME));
-            Action<JsonResponse> callback;
-            if (o is Action<JsonResponse>)
-            {
-                callback = o as Action<JsonResponse>;
-            }
-            else
-            {
-                callback = delegate(JsonResponse a) { };
-            }
-            return callback;
-        }
-
         public static void Process(JsonRpcStateAsync async, object context = null)
         {
             Process(Handler.DefaultSessionId(), async, context);


Fix Build

Fix Build

--- KugelmatikLibrary/Cluster.cs
+++ KugelmatikLibrary/Cluster.cs
@@ -222,7 +222,7 @@
         public Cluster(Kugelmatik kugelmatik, int x, int y, IPAddress address)
         {
             if (kugelmatik == null)
-                throw new ArgumentNullException(nameof(kugelmatik);
+                throw new ArgumentNullException(nameof(kugelmatik));
             if (x < 0 || x >= 16)
                 throw new ArgumentOutOfRangeException(nameof(x));
             if (y < 0 || y >= 16)


Removed Python support.

Removed Python support.

--- JexusManager/Features/Main/PhpDiagDialog.cs
+++ JexusManager/Features/Main/PhpDiagDialog.cs
@@ -108,8 +108,7 @@
                         if (foundPhpHandler.Count == 0)
                         {
                             Error($"No valid FastCGI handler is registered for this web site.");
-                            Error($" * To run PHP on IIS, please refer to https://docs.microsoft.com/en-us/iis/application-frameworks/scenario-build-a-php-website-on-iis/configuring-step-1-install-iis-and-php#13-download-and-install-php-manually for more details.");
-                            Error($" * To run Python on IIS, please refer to https://pypi.org/project/wfastcgi/ or use HttpPlatformHandler https://docs.microsoft.com/en-us/iis/extensions/httpplatformhandler/httpplatformhandler-configuration-reference.");
+                            Error($"To run PHP on IIS, please refer to https://docs.microsoft.com/en-us/iis/application-frameworks/scenario-build-a-php-website-on-iis/configuring-step-1-install-iis-and-php#13-download-and-install-php-manually for more details.");
                             return;
                         }

@@ -135,9 +134,8 @@
                         if (foundPhp.Count == 0)
                         {
                             Error($"No suitable FastCGI appilcation is registered on this server.");
-                            Error($" * To run PHP on IIS, please refer to https://docs.microsoft.com/en-us/iis/application-frameworks/scenario-build-a-php-website-on-iis/configuring-step-1-install-iis-and-php#13-download-and-install-php-manually for more details.");
-                            Error($" * To run Python on IIS, please refer to https://pypi.org/project/wfastcgi/ or use HttpPlatformHandler https://docs.microsoft.com/en-us/iis/extensions/httpplatformhandler/httpplatformhandler-configuration-reference.");
-                            return;
+                            Error($"To run PHP on IIS, please refer to https://docs.microsoft.com/en-us/iis/application-frameworks/scenario-build-a-php-website-on-iis/configuring-step-1-install-iis-and-php#13-download-and-install-php-manually for more details.");
+                           return;
                         }

                         Debug(Environment.NewLine);
@@ -191,10 +189,6 @@
                                 {
                                     Error($"* PHP {info.FileVersion} ({path}) is unknown or obsolete. Please refer to http://php.net/supported-versions.php for more details.");
                                 }
-                            }
-                            else if (path.TrimEnd('"').EndsWith("python.exe", StringComparison.OrdinalIgnoreCase))
-                            {
-                                // Python
                             }
                         }

@@ -285,10 +279,6 @@
                                 Debug(string.Empty);

                                 // TODO: verify other configuration in php.info.
-                            }
-                            else if (path.TrimEnd('"').EndsWith("python.exe", StringComparison.OrdinalIgnoreCase))
-                            {
-
                             }
                         }
                     }


Fixed Download cv

Fixed Download cv

--- JobSite/Views/ApplyJob/ViewCandidate.cshtml
+++ JobSite/Views/ApplyJob/ViewCandidate.cshtml
@@ -46,14 +46,15 @@

             @ViewBag.ApplyJob.Message

-        @if (ViewBag.CV != null)
+
CV:

+

+            @if (ViewBag.CV != null)
             {
-            @:
CV:

-            @:

-            string filenName = ViewBag.CV.FileName;
-            Html.ActionLink(filenName, "Download", new { fileId = ViewBag.CV.Id });
-        }
-

+                string filenName = ViewBag.CV.FileName;
+                @Html.ActionLink(filenName, "Download", new { fileId = ViewBag.CV.Id });
+            }
+

+


It should work

It should work

--- LeetCode/remote/count_of_smaller_numbers.cs
+++ LeetCode/remote/count_of_smaller_numbers.cs
@@ -30,7 +30,7 @@
         }

         Sort(nums, start, length / 2, counts);
-        Sort(nums, length / 2, length - length / 2, counts);
+        Sort(nums, start + length / 2, length - length / 2, counts);
         var sorted = new List<int>();
         var i = start;
         var j = start + length / 2;
@@ -39,7 +39,7 @@
             if (nums[i] > nums[j])
             {
                 sorted.Add(nums[i]);
-                counts[nums[i++]] += counts[nums[j]] + 1;
+                counts[nums[i++]] += start + length - j;
             }
             else
             {
@@ -63,5 +63,8 @@
     {
         var s = new Solution();
         Console.WriteLine(String.Join(", ", s.CountSmaller(new [] { 5, 2, 6, 1 })));
+        Console.WriteLine(String.Join(", ", s.CountSmaller(new [] { 2, 0, 1 })));
+        Console.WriteLine(String.Join(", ", s.CountSmaller(new [] { 1, 2, 7, 8, 5 })));
+        Console.WriteLine(String.Join(", ", s.CountSmaller(new [] { 26,78,27,100,33,67,90,23,66,5,38,7,35,23,52,22,83,51,98,69,81,32,78,28,94,13,2,97,3,76,99,51,9,21,84,66,65,36,100,41})));
     }
 }


refactoring double tokens

refactoring double tokens

--- MathParser/MathParser/Tokens/DoubleToken.cs
+++ MathParser/MathParser/Tokens/DoubleToken.cs
@@ -18,10 +18,7 @@
         {
             if (symbol != DecimalSeparator) return (symbol >= '0' && symbol <= '9');

-            if (!isDecimalSeparatorSet && countSelectedChars > 0)
-            {
-                return isDecimalSeparatorSet = true;
-            }
+            if (!isDecimalSeparatorSet && countSelectedChars > 0) return isDecimalSeparatorSet = true;

             return false;
         }
@@ -36,22 +33,19 @@
             StringBuilder sb = new StringBuilder();

             char symbol;
-            while (position < source.Length)
+            endPosition = position;
+            while (endPosition < source.Length)
             {
-                symbol = source[position];
-                if (!CheckSymbol(symbol,sb.Length)) break;
+                symbol = source[endPosition];
+                if (!CheckSymbol(symbol, sb.Length)) break;

                 sb.Append(symbol);
-                position += 1;
+                endPosition += 1;
             }

-            if (double.TryParse(sb.ToString(), NumberStyles.Float, CultureInfo.InvariantCulture, out this.value))
+            if (!double.TryParse(sb.ToString(), NumberStyles.Float, CultureInfo.InvariantCulture, out this.value))
             {
-                endPosition = position;
-            }
-            else
-            {
-                if (position == source.Length)
+                if (endPosition == source.Length)
                     throw new ArgumentException(string.Format("invalide double: '{0}'", sb.ToString()));

                 throw new ArgumentException(string.Format("unexpected symbol: '{0}'", source[position]));


Removed the long time hack.

Removed the long time hack.

--- Microsoft.Web.Administration/FileContext.cs
+++ Microsoft.Web.Administration/FileContext.cs
@@ -751,12 +751,6 @@
                 return true;
             }

-            if (section.SectionPath == "configProtectedData")
-            {
-                top.ConfigurationSections.Add(section);
-                return true;
-            }
-
             if (Parent != null)
             {
                 var parentContext = Parent.Add(section, location, top);


{fixed} Null ref when device has camera but no flash.

--- MonoAndroidFlashlight/FlashlightActivity.cs
+++ MonoAndroidFlashlight/FlashlightActivity.cs
@@ -62,7 +62,9 @@
         }
         public void SurfaceChanged(ISurfaceHolder holder, Android.Graphics.Format format, int width, int height) { }
         public void SurfaceCreated(ISurfaceHolder holder) {
-            _Camera.SetPreviewDisplay(holder);
+			if (_Camera != null) {
+				_Camera.SetPreviewDisplay (holder);
+			}
         }
         public void SurfaceDestroyed(ISurfaceHolder holder) { }


1.0.1.1

--- NBitcoin.Indexer/Properties/AssemblyInfo.cs
+++ NBitcoin.Indexer/Properties/AssemblyInfo.cs
@@ -33,6 +33,6 @@
 // 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: AssemblyInformationalVersion("1.0.1.0")]
-[assembly: AssemblyVersion("1.0.1.0")]
-[assembly: AssemblyFileVersion("1.0.1.0")]
+[assembly: AssemblyInformationalVersion("1.0.1.1")]
+[assembly: AssemblyVersion("1.0.1.1")]
+[assembly: AssemblyFileVersion("1.0.1.1")]


Prevent NRE in AttemptedValueHelper

Prevent NRE in AttemptedValueHelper

--- Noodles.Web/Helpers/AttemptedValueHelper.cs
+++ Noodles.Web/Helpers/AttemptedValueHelper.cs
@@ -6,9 +6,12 @@
     {
         public static string AttemptedValue<T>(this ViewDataDictionary<T> vd, string name)
         {
+            if (vd.ModelState == null) return null;
             if (vd.ModelState.ContainsKey(name))
             {
-                return vd.ModelState[name].Value.AttemptedValue;
+                var modelState = vd.ModelState[name];
+                if (modelState == null || modelState.Value == null) return null;
+                return modelState.Value.AttemptedValue;
             }
             return null;
         }


fixed commit f7ad583d85f61ab81a78eebc7d08aa65b5076797 regarding empty arguments: the second part of change was faulting "alert" console command

--- OpenSim/Framework/Console/CommandConsole.cs
+++ OpenSim/Framework/Console/CommandConsole.cs
@@ -414,8 +414,9 @@
                     {
                         found.Clear();
                         found.Add(opt);
-                    }
-                    else if (opt.StartsWith(s))
+                        break;
+                    }
+                    if (opt.StartsWith(s))
                     {
                         found.Add(opt);
                     }


* Applied tleiades patch #435 fixing HttpBaseServer ABEND (thanx!)

--- OpenSim/Framework/Servers/BaseHttpServer.cs
+++ OpenSim/Framework/Servers/BaseHttpServer.cs
@@ -197,9 +197,18 @@
             response.SendChunked = false;
             response.ContentLength64 = buffer.Length;
             response.ContentEncoding = Encoding.UTF8;
-
-            response.OutputStream.Write(buffer, 0, buffer.Length);
-            response.OutputStream.Close();
+            try
+            {
+                response.OutputStream.Write(buffer, 0, buffer.Length);
+            }
+            catch (Exception ex)
+            {
+                MainLog.Instance.Warn("HTTPD", "Error - " + ex.Message);
+            }
+            finally
+            {
+                response.OutputStream.Close();
+            }
         }

         public void Start()


Updated FileWriter for MultiEcuScan Graph output

--- PC/ACTCon/AC_Teensy_Connector/FileWriter.cs
+++ PC/ACTCon/AC_Teensy_Connector/FileWriter.cs
@@ -17,28 +17,54 @@
             file = new System.IO.StreamWriter(path);
             s = new Stopwatch();
             s.Start();
-            file.WriteLine("time;laptime;AccPed;BrkPed;Clth;nEng;vVeh;Gear;StAng");
+            file.WriteLine("\"time\"\t\"laptime\"\t\"AccPed\"\tBrkPed\"\t\"Clth\"\t\"nEng\"\t\"vVeh\"\t\"Gear\"\t\"StAng\"\t\"TAG\"");
+            file.WriteLine("\"msec\"\t\"msec\"\t\"%\"\t\"%\"\t\"%\"\t\"rpm\"\t\"kmh\"\t\" \"\t\"Deg\"\t\" \"");
+            file.Flush();
         }

         ~FileWriter()
         {
-            file.Close();
+            try
+            {
+                file.Flush();
+                file.Close();
+            }
+            catch (Exception e)
+            {
+            }
         }

         public void receiveData(ACDataInterpreter acd)
         {
             if (acd != null)
-            {
-                String line = s.ElapsedMilliseconds.ToString();
-                line += ";" + acd.getcurrlapTime();
-                line += ";" + (int)(acd.getped()*99);//99 takes 2 byte to save while 100 takes 3
-                line += ";" + (int)(acd.getbrk()*99);
-                line += ";" + (99-(int)(acd.getclth()*99));
-                line += ";" + (int)(acd.getrpm()/100);
-                line += ";" + (int)(acd.getKMH());//scales up to 360 to be drawable with the rpm
-                line += ";" + acd.getgear()*10;//scales up to 100 to be drawable with the Pedals
-                line += ";" + (int)(acd.getsteer()/10+50);//scales up to 90 while middle Position is 50
-                file.WriteLine(line);
+            {
+                if (false)
+                {
+                    String line = s.ElapsedMilliseconds.ToString();
+                    line += ";" + acd.getcurrlapTime();
+                    line += ";" + (int)(acd.getped() * 99);//99 takes 2 byte to save while 100 takes 3
+                    line += ";" + (int)(acd.getbrk() * 99);
+                    line += ";" + (99 - (int)(acd.getclth() * 99));
+                    line += ";" + (int)(acd.getrpm() / 100);
+                    line += ";" + (int)(acd.getKMH());//scales up to 360 to be drawable with the rpm
+                    line += ";" + acd.getgear() * 10;//scales up to 100 to be drawable with the Pedals
+                    line += ";" + (int)(acd.getsteer() / 10 + 50);//scales up to 90 while middle Position is 50
+                    file.WriteLine(line);
+                }
+                else
+                {
+                    String line = s.ElapsedMilliseconds.ToString();
+                    line += "\t" + acd.getcurrlapTime();
+                    line += "\t" + (int)(acd.getped() * 99);//99 takes 2 byte to save while 100 takes 3
+                    line += "\t" + (int)(acd.getbrk() * 99);
+                    line += "\t" + (99 - (int)(acd.getclth() * 99));
+                    line += "\t" + (int)(acd.getrpm());
+                    line += "\t" + (int)(acd.getKMH());
+                    line += "\t" + acd.getgear();
+                    line += "\t" + (int)(acd.getsteer());
+                    line += "\t" + "\" \"";
+                    file.WriteLine(line);
+                }
             }
         }
     }


Rename methods for adding bindings to SPARQL values

--- RDFSharp/Query/Mirella/Algebra/RDFValues.cs
+++ RDFSharp/Query/Mirella/Algebra/RDFValues.cs
@@ -74,9 +74,9 @@

         #region Methods
         /// <summary>
-        /// Adds the given binding values to the given variable
+        /// Adds the given column of bindings to the SPARQL values
         /// </summary>
-        public RDFValues AddBindings(RDFVariable variable, List<RDFPatternMember> bindings)
+        public RDFValues AddColumn(RDFVariable variable, List<RDFPatternMember> bindings)
         {
             if (variable != null)
             {


small change to sample

small change to sample

--- Sample/OgreTest/ViewModels/MainViewModel.cs
+++ Sample/OgreTest/ViewModels/MainViewModel.cs
@@ -77,8 +77,13 @@
         {
             RemoveValues();

-            var results = await geoDataSourceService.Geocoder.FindClosestCitiesAsync(coords.Latitude, coords.Longitude, 1);
-            var result = results.First();
+            IGeocoderResult result = null;
+
+            await Task.Run(async () =>
+            {
+                var results = await geoDataSourceService.Geocoder.FindClosestCitiesAsync(coords.Latitude, coords.Longitude, 1);
+                result = results.First();
+            });

             this.Distance = Convert.ToInt32(Math.Round(result.ApproxDistance.TotalKilometers, 0));
             this.LocationName = $"{result.City}, {result.StateProvince}, {result.Country}";
@@ -103,7 +108,6 @@
             this.LocationNameAbbreviated = "";
             this.DirectionInDegrees = 0;
             this.Direction = CardinalDirection.North;
-            this.ResolvedCityCoordinates = null;
             this.CurrentCoordinatesText = "";
             this.ResolvedCoordinatesText = "";
         }


Remove the namespace

Remove the namespace

--- dotnet/RPCClient/RPCClient.cs
+++ dotnet/RPCClient/RPCClient.cs
@@ -4,78 +4,61 @@
 using RabbitMQ.Client;
 using RabbitMQ.Client.Events;

-namespace RpcClient
+public class RpcClient
 {
-    public class RpcClient
+    private readonly IConnection connection;
+    private readonly IModel channel;
+    private readonly string replyQueueName;
+    private readonly EventingBasicConsumer consumer;
+    private readonly BlockingCollection<string> respQueue = new BlockingCollection<string>();
+    private readonly IBasicProperties props;
+
+    public RpcClient()
     {
-        private readonly IConnection connection;
-        private readonly IModel channel;
-        private readonly string replyQueueName;
-        private readonly EventingBasicConsumer consumer;
-        private readonly BlockingCollection<string> respQueue = new BlockingCollection<string>();
-        private readonly IBasicProperties props;
+        var factory = new ConnectionFactory() { HostName = "localhost" };

-        public RpcClient()
+        connection = factory.CreateConnection();
+        channel = connection.CreateModel();
+        replyQueueName = channel.QueueDeclare().QueueName;
+        consumer = new EventingBasicConsumer(channel);
+
+        props = channel.CreateBasicProperties();
+        var correlationId = Guid.NewGuid().ToString();
+        props.CorrelationId = correlationId;
+        props.ReplyTo = replyQueueName;
+
+        consumer.Received += (model, ea) =>
         {
-            var factory = new ConnectionFactory() { HostName = "localhost" };
+            var body = ea.Body;
+            var response = Encoding.UTF8.GetString(body);
+            if (ea.BasicProperties.CorrelationId == correlationId)
+            {
+                respQueue.Add(response);
+            }
+        };
+    }

-            connection = factory.CreateConnection();
-            channel = connection.CreateModel();
-            replyQueueName = channel.QueueDeclare().QueueName;
-            consumer = new EventingBasicConsumer(channel);
+    public string Call(string message)
+    {

-            props = channel.CreateBasicProperties();
-            var correlationId = Guid.NewGuid().ToString();
-            props.CorrelationId = correlationId;
-            props.ReplyTo = replyQueueName;
-
-            consumer.Received += (model, ea) =>
-            {
-                var body = ea.Body;
-                var response = Encoding.UTF8.GetString(body);
-                if (ea.BasicProperties.CorrelationId == correlationId)
-                {
-                    respQueue.Add(response);
-                }
-            };
-        }
-
-        public string Call(string message)
-        {
-
-            var messageBytes = Encoding.UTF8.GetBytes(message);
-            channel.BasicPublish(
-                exchange: "",
-                routingKey: "rpc_queue",
-                basicProperties: props,
-                body: messageBytes);
+        var messageBytes = Encoding.UTF8.GetBytes(message);
+        channel.BasicPublish(
+            exchange: "",
+            routingKey: "rpc_queue",
+            basicProperties: props,
+            body: messageBytes);

-            channel.BasicConsume(
-                consumer: consumer,
-                queue: replyQueueName,
-                autoAck: true);
+        channel.BasicConsume(
+            consumer: consumer,
+            queue: replyQueueName,
+            autoAck: true);

-            return respQueue.Take(); ;
-        }
-
-        public void Close()
-        {
-            connection.Close();
-        }
+        return respQueue.Take(); ;
     }

-    public class Rpc
+    public void Close()
     {
-        public static void Main()
-        {
-            var rpcClient = new RpcClient();
-
-            Console.WriteLine(" [x] Requesting fib(30)");
-            var response = rpcClient.Call("30");
-
-            Console.WriteLine(" [.] Got '{0}'", response);
-            rpcClient.Close();
-        }
+        connection.Close();
     }
 }


Minor edits

Minor edits

--- SampleWebApp/Views/Security/CodeView.cshtml
+++ SampleWebApp/Views/Security/CodeView.cshtml
@@ -94,12 +94,12 @@

Part 4: Building the connection string

     Building the connection string is simple as we just replace the UserID and Password in the connection string with the right ones
-    - see part 3 for how we decide on the right username and password.
+    - see part 5 for how we decide on the right username and password.
     The only complicated things were:

Handling the different format of the UserID for Azure, but that is a simple string formatting job.

-
Handling hosted SQL Server login names as they need a prefix. This is done in part 3, when the login name is loaded.

+
Handling hosted SQL Server login names as they need a prefix. This is done in part 5, when the login name is loaded.

     You can see the code for BuildSqlConnectionString method towards the end of the
@@ -110,7 +110,7 @@

Part 5: Selecting the right database user name and password to send to SQL Server

     This is the trickly part, but was greatly helped by ASP.NET Identity 2.
-    Below I have enumerated the various parts separately with links to code:
+    Below I have listed the various parts separately, with links to any relevant code:

@@ -145,7 +145,7 @@
         I chose to hold the database login name and its password unencrypted as a) the accounts database is hidden from the user and
         b) the claims are held in the encrypted identity cookie which has to be secure to protect the identity.

-        In real life you may add encryption to make this more secure, but I don't think my current scheme is insecure.
+        I don't think my current design is insecure, but for your application you may want to add encryption to make this more secure.


Removed limits from RevoluteTest to remove confusion.

--- Samples/FP3.0/Testbed/Tests/RevoluteTest.cs
+++ Samples/FP3.0/Testbed/Tests/RevoluteTest.cs
@@ -20,6 +20,7 @@
 * 3. This notice may not be removed or altered from any source distribution.
 */

+using System;
 using System.Collections.Generic;
 using FarseerPhysics.Collision.Shapes;
 using FarseerPhysics.Common;
@@ -56,10 +57,6 @@
                 _fixedJoint.MotorSpeed = 0.25f * Settings.Pi;
                 _fixedJoint.MaxMotorTorque = 5000.0f;
                 _fixedJoint.MotorEnabled = true;
-                _fixedJoint.LowerLimit = -0.25f * Settings.Pi;
-                _fixedJoint.UpperLimit = 0.5f * Settings.Pi;
-                _fixedJoint.LimitEnabled = false;
-
                 World.AddJoint(_fixedJoint);

                 // The small gear attached to the big one
@@ -72,9 +69,6 @@
                 _joint.MotorSpeed = 1.0f * Settings.Pi;
                 _joint.MaxMotorTorque = 5000.0f;
                 _joint.MotorEnabled = true;
-                _joint.LowerLimit = -0.25f * Settings.Pi;
-                _joint.UpperLimit = 0.5f * Settings.Pi;
-                _joint.LimitEnabled = false;
                 _joint.CollideConnected = false;

                 World.AddJoint(_joint);


Changed generic event data object to system object

--- EventSourcingCQRS/Common/EventSourcing/Interfaces/IModelEvent.cs
+++ EventSourcingCQRS/Common/EventSourcing/Interfaces/IModelEvent.cs
@@ -13,6 +13,12 @@

 		string EventName { get; }

-        IModelEventData<IdT> EventData { get; }
+        object EventData { get; }
+
+		/// <summary>
+		/// Will apply the change to the aggregate model
+		/// </summary>
+		/// <param name="model">Model.</param>
+		void ApplyEventData(IModelAggregate<IdT> model);
 	}
 }


Removed duplicate code and replaced it with steps which perform the same operation

--- GPConnect.Provider.AcceptanceTests/Steps/BookAppointmentSteps.cs
+++ GPConnect.Provider.AcceptanceTests/Steps/BookAppointmentSteps.cs
@@ -334,111 +334,6 @@
             HttpContext.StoredFhirResources.Add(appointmentName, bundle);
         }

-        // Aim to remove this
-        [Then(@"I create an appointment with slot reference ""(.*)"" for patient ""(.*)"" called ""(.*)"" from schedule ""(.*)""")]
-        public void GivenISearchForAnAppointmentOnTheProviderSystemAndBookAppointmentWithSlotReference(string slotReference, string patientName, string appointmentName, string getScheduleBundleKey)
-        {
-            Given($@"I perform a patient search for patient ""{patientName}"" and store the first returned resources against key ""AppointmentReadPatientResource""");
-            Patient patientResource = (Patient)HttpContext.StoredFhirResources["AppointmentReadPatientResource"];
-            Bundle getScheduleResponseBundle = (Bundle)HttpContext.StoredFhirResources[getScheduleBundleKey];
-
-            List<Slot> slotList = new List<Slot>();
-            Dictionary<string, Practitioner> practitionerDictionary = new Dictionary<string, Practitioner>();
-            Dictionary<string, Location> locationDictionary = new Dictionary<string, Location>();
-            Dictionary<string, Schedule> scheduleDictionary = new Dictionary<string, Schedule>();
-            List<Identifier> identifiers = new List<Identifier>();
-
-            // Group together resources
-            foreach (EntryComponent entry in getScheduleResponseBundle.Entry)
-            {
-                if (entry.Resource.ResourceType.Equals(ResourceType.Slot))
-                {
-                    slotList.Add((Slot)entry.Resource);
-                }
-                else if (entry.Resource.ResourceType.Equals(ResourceType.Practitioner))
-                {
-                    if (!practitionerDictionary.ContainsKey(entry.FullUrl))
-                    {
-                        practitionerDictionary.Add(entry.FullUrl, (Practitioner)entry.Resource);
-                    }
-                }
-                else if (entry.Resource.ResourceType.Equals(ResourceType.Location))
-                {
-                    if (!locationDictionary.ContainsKey(entry.FullUrl))
-                    {
-                        locationDictionary.Add(entry.FullUrl, (Location)entry.Resource);
-                    }
-                }
-                else if (entry.Resource.ResourceType.Equals(ResourceType.Schedule))
-                {
-                    if (!scheduleDictionary.ContainsKey(entry.FullUrl))
-                    {
-                        scheduleDictionary.Add(entry.FullUrl, (Schedule)entry.Resource);
-                    }
-                }
-            }
-
-            // Select first slot
-            Slot firstSlot = slotList[0];
-
-            string scheduleReference = firstSlot.Schedule.Reference;
-            Schedule schedule = null;
-            scheduleDictionary.TryGetValue(scheduleReference, out schedule);
-
-            string locationReferenceForSelectedSlot = schedule.Actor.Reference;
-
-            List<string> practitionerReferenceForSelectedSlot = new List<string>();
-            foreach (var practitionerReferenceExtension in schedule.Extension)
-            {
-                practitionerReferenceForSelectedSlot.Add(((ResourceReference)practitionerReferenceExtension.Value).Reference);
-            }
-
-            CodeableConcept reason = new CodeableConcept();
-            Coding coding = new Coding();
-            List<Extension> extensionList = new List<Extension>();
-            Extension extension = new Extension();
-            Identifier identifier = new Identifier();
-
-            AppointmentStatus status = new AppointmentStatus();
-            int priority = new int();
-
-            switch (appointmentName)
-            {
-                case "CustomAppointment1":
-                    //Define category
-                    extensionList.Add(buildAppointmentCategoryExtension(extension, "http://fhir.nhs.net/StructureDefinition/extension-gpconnect-appointment-booking-method-1", "ONL", "Online"));
-                    //Define Identifier
-                    identifier.System = "http://fhir.nhs.net/Id/gpconnect-appointment-identifier";
-                    identifier.Value = "898976578";
-                    identifiers.Add(identifier);
-                    //Define Status
-                    status = AppointmentStatus.Fulfilled;
-                    //Define Reason
-                    coding = buildReasonForAppointment("http://snomed.info/sct", "SBJ", "SBJ");
-                    reason.Coding.Add(coding);
-                    //Define Priority
-                    priority = 1;
-                    //Define participant
-                    break;
-            }
-
-                    // Create Appointment
-                Appointment appointment = buildAndReturnAppointment(patientResource, practitionerReferenceForSelectedSlot, locationReferenceForSelectedSlot, firstSlot, reason, extension, identifiers, status, priority);
-
-            // Now we have used the slot remove from it from the getScheduleBundle so it is not used to book other appointments same getSchedule is used
-            EntryComponent entryToRemove = null;
-            foreach (EntryComponent entry in getScheduleResponseBundle.Entry)
-            {
-                if (entry.Resource.ResourceType.Equals(ResourceType.Slot) && string.Equals(((Slot)entry.Resource).Id, firstSlot.Id))
-                {
-                    entryToRemove = entry;
-                    break;
-                }
-            }
-            getScheduleResponseBundle.Entry.Remove(entryToRemove);
-            HttpContext.StoredFhirResources.Add(appointmentName, (Appointment)appointment);
-        }
-
         [Then(@"I add an extra invalid extension to the appointment called ""(.*)"" and populate the value")]
         public void ThenIAddAnExtraInvalidExtensionToTheAppointmentCalledStringAndPopulateTheValue(string appointmentName)
         {
@@ -740,6 +635,13 @@
             HttpContext.StoredFhirResources.Add(appointmentName, (Appointment)appointment);
         }

+        [Given(@"I set the appointment Priority to ""(.*)"" on appointment stored against key ""([^""]*)""")]
+        public void GivenISetTheAppointmentPriorityToOnAppointmentStoredAgainstKey(int priority, string appointmentKey)
+        {
+            Appointment appointment = (Appointment)HttpContext.StoredFhirResources[appointmentKey];
+            appointment.Priority = priority;
+        }
+
         [When(@"I book the appointment called ""([^""]*)""")]
         public void WhenIBookTheAppointmentCalledString(string appointmentName)
         {
@@ -771,147 +673,29 @@
         }

         [When(@"I book an appointment for patient ""([^""]*)"" on the provider system using a slot from the getSchedule response bundle stored against key ""([^""]*)"" and store the appointment to ""([^""]*)""")]
-        public void IBookAnAppointmentForPatientOnTheProviderSystemUsingASlotFromTheGetScheduleResponseBundleStoredAgainstKeyAndStoreTheAppointmentTo(string patientName, string getScheduleBundleKey, string storeAppointmentKey = null)
-        {
-            IBookAnAppointmentForPatientOnTheProviderSystemUsingASlotFromTheGetScheduleResponseBundleStoredAgainstKeyAndStoreTheAppointmentToWithPriority(patientName, getScheduleBundleKey, storeAppointmentKey);
-        }
-
-        public void IBookAnAppointmentForPatientOnTheProviderSystemUsingASlotFromTheGetScheduleResponseBundleStoredAgainstKeyAndStoreTheAppointmentToWithPriority(string patientName, string getScheduleBundleKey, string storeAppointmentKey = null, int? priority = null)
-        {
-            Given($@"I perform a patient search for patient ""{patientName}"" and store the first returned resources against key ""AppointmentReadPatientResource""");
-            Patient patientResource = (Patient)HttpContext.StoredFhirResources["AppointmentReadPatientResource"];
-            Bundle getScheduleResponseBundle = (Bundle)HttpContext.StoredFhirResources[getScheduleBundleKey];
-
-            List<Slot> slotList = new List<Slot>();
-            Dictionary<string, Practitioner> practitionerDictionary = new Dictionary<string, Practitioner>();
-            Dictionary<string, Location> locationDictionary = new Dictionary<string, Location>();
-            Dictionary<string, Schedule> scheduleDictionary = new Dictionary<string, Schedule>();
-
-            // Group together resources
-            foreach (EntryComponent entry in getScheduleResponseBundle.Entry)
-            {
-                if (entry.Resource.ResourceType.Equals(ResourceType.Slot))
-                {
-                    slotList.Add((Slot)entry.Resource);
-                }
-                else if (entry.Resource.ResourceType.Equals(ResourceType.Practitioner))
-                {
-                    if (!practitionerDictionary.ContainsKey(entry.FullUrl))
-                    {
-                        practitionerDictionary.Add(entry.FullUrl, (Practitioner)entry.Resource);
-                    }
-                }
-                else if (entry.Resource.ResourceType.Equals(ResourceType.Location))
-                {
-                    if (!locationDictionary.ContainsKey(entry.FullUrl))
-                    {
-                        locationDictionary.Add(entry.FullUrl, (Location)entry.Resource);
-                    }
-                }
-                else if (entry.Resource.ResourceType.Equals(ResourceType.Schedule))
-                {
-                    if (!scheduleDictionary.ContainsKey(entry.FullUrl))
-                    {
-                        scheduleDictionary.Add(entry.FullUrl, (Schedule)entry.Resource);
-                    }
-                }
-            }
-
-            // Select first slot
-            Slot firstSlot = slotList[0];
-
-            string scheduleReference = firstSlot.Schedule.Reference;
-            Schedule schedule = null;
-            scheduleDictionary.TryGetValue(scheduleReference, out schedule);
-
-            string locationReferenceForSelectedSlot = schedule.Actor.Reference;
-
-            List<string> practitionerReferenceForSelectedSlot = new List<string>();
-            foreach (var practitionerReferenceExtension in schedule.Extension)
-            {
-                practitionerReferenceForSelectedSlot.Add(((ResourceReference)practitionerReferenceExtension.Value).Reference);
-            }
-
-            // Create Appointment
-            Appointment appointment = new Appointment();
-            appointment.Status = AppointmentStatus.Booked;
-
-            if (priority != null)
-            {
-                appointment.Priority = priority;
-            }
-
-            // Appointment Patient Resource
-            ParticipantComponent patient = new ParticipantComponent();
-            ResourceReference patientReference = new ResourceReference();
-            patientReference.Reference = "Patient/" + patientResource.Id;
-            patient.Actor = patientReference;
-            patient.Status = ParticipationStatus.Accepted;
-            appointment.Participant.Add(patient);
-
-            // Appointment Practitioner Resource
-            foreach (var practitionerSlotReference in practitionerReferenceForSelectedSlot)
-            {
-                ParticipantComponent practitioner = new ParticipantComponent();
-                ResourceReference practitionerReference = new ResourceReference();
-                practitionerReference.Reference = practitionerSlotReference;
-                practitioner.Actor = practitionerReference;
-                practitioner.Status = ParticipationStatus.Accepted;
-                appointment.Participant.Add(practitioner);
-            }
-
-            // Appointment Location Resource
-            ParticipantComponent location = new ParticipantComponent();
-            ResourceReference locationReference = new ResourceReference();
-            locationReference.Reference = locationReferenceForSelectedSlot;
-            location.Actor = locationReference;
-            location.Status = ParticipationStatus.Accepted;
-            appointment.Participant.Add(location);
-
-            // Appointment Slot Resource
-            ResourceReference slot = new ResourceReference();
-            slot.Reference = "Slot/" + firstSlot.Id;
-            appointment.Slot.Add(slot);
-            appointment.Start = firstSlot.Start;
-            appointment.End = firstSlot.End;
-
-            if (HttpContext.StoredDate.ContainsKey("slotStartDate")) HttpContext.StoredDate.Remove("slotStartDate");
-            HttpContext.StoredDate.Add("slotStartDate", firstSlot.StartElement.ToString());
-
-
-            // Now we have used the slot remove from it from the getScheduleBundle so it is not used to book other appointments same getSchedule is used
-            EntryComponent entryToRemove = null;
-            foreach (EntryComponent entry in getScheduleResponseBundle.Entry)
-            {
-                if (entry.Resource.ResourceType.Equals(ResourceType.Slot) && string.Equals(((Slot)entry.Resource).Id, firstSlot.Id))
-                {
-                    entryToRemove = entry;
-                    break;
-                }
-            }
-            getScheduleResponseBundle.Entry.Remove(entryToRemove);
-
-            //Book the appointment
+        public void IBookAnAppointmentForPatientOnTheProviderSystemUsingASlotFromTheGetScheduleResponseBundleStoredAgainstKeyAndStoreTheAppointmentTo(string patientName, string getScheduleBundleKey, string storeAppointmentKey)
+        {
+            IBookAnAppointmentForPatientOnTheProviderSystemUsingASlotFromTheGetScheduleResponseBundleStoredAgainstKeyAndStoreTheAppointmentToWithPriority(patientName, getScheduleBundleKey, storeAppointmentKey, 1);
+        }
+
+        public void IBookAnAppointmentForPatientOnTheProviderSystemUsingASlotFromTheGetScheduleResponseBundleStoredAgainstKeyAndStoreTheAppointmentToWithPriority(string patientName, string getScheduleBundleKey, string storeAppointmentKey, int priority)
+        {
+            Given($@"I perform a patient search for patient ""{patientName}"" and store the first returned resources against key ""StoredPatientKey""");
             Given($@"I am using the default server");
-            And($@"I set the default JWT");
-            And($@"I am performing the ""urn:nhs:names:services:gpconnect:fhir:rest:create:appointment"" interaction");
-            bookAppointment("urn:nhs:names:services:gpconnect:fhir:rest:create:appointment", "/Appointment", FhirSerializer.SerializeToJson(appointment));
-
-            // Convert the response to resource
+            And($@"I set the JWT requested record NHS number to the NHS number of patient stored against key ""StoredPatientKey""");
+		    And($@"I set the JWT requested scope to ""patient/*.write""");
+		    And($@"I am performing the ""urn:nhs:names:services:gpconnect:fhir:rest:create:appointment"" interaction");
+            Given($@"I create an appointment for patient ""StoredPatientKey"" called ""Appointment"" from schedule ""{getScheduleBundleKey}""");
+            Given($@"I set the appointment Priority to ""{priority}"" on appointment stored against key ""Appointment""");
+            When($@"I book the appointment called ""Appointment""");
             Then($@"the response status code should indicate created");
             Then($@"the response body should be FHIR JSON");
             And($@"the response should be an Appointment resource");
-
-            var createdAppointmentResource = FhirContext.FhirResponseResource;
-
-            if (storeAppointmentKey != null)
-            {
-                if (HttpContext.StoredFhirResources.ContainsKey(storeAppointmentKey))
-                {
-                    HttpContext.StoredFhirResources.Remove(storeAppointmentKey);
-                }
-                HttpContext.StoredFhirResources.Add(storeAppointmentKey, createdAppointmentResource);
-            }
+            if (HttpContext.StoredFhirResources.ContainsKey(storeAppointmentKey))
+            {
+                HttpContext.StoredFhirResources.Remove(storeAppointmentKey);
+            }
+            HttpContext.StoredFhirResources.Add(storeAppointmentKey, FhirContext.FhirResponseResource);
         }

         public void bookAppointment(string interactionID, string relativeUrl, String appointment)


Delete RegisterController.cs

Delete RegisterController.cs

--- IdentityDemo_EmailConfirmation/Controllers/RegisterController.cs
+++ IdentityDemo_EmailConfirmation/Controllers/RegisterController.cs
@@ -1,77 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Web;
-using System.Web.Mvc;
-using Microsoft.AspNet.Identity;
-
-namespace IdentityDemo.Controllers
-{
-    [AllowAnonymous]
-    public class RegisterController : Controller
-    {
-        // GET: Register
-        public ActionResult Index()
-        {
-            return View();
-        }
-
-        [HttpPost]
-        [ValidateAntiForgeryToken]
-        public ActionResult index(Models.Register model)
-        {
-            if(ModelState.IsValid)
-            {
-                var UserManager = new Identity.AppUserManagerContainer().Get();
-
-                //see if user already exists
-                var existingUser = UserManager.FindByName(model.Username);
-                if (existingUser != null)
-                {
-                    ViewBag.ErrorMessage =
-                        "A user with the given username already exists.";
-                }
-                else
-                {
-                    //create the user
-                    var User = new Identity.AppUser()
-                    {
-                        UserName = model.Username,
-                        FirstName = model.FirstName,
-                        LastName = model.LastName,
-                        Email = model.EmailAddress,
-                        AccountEnabled = true
-                    };
-
-                    var result = UserManager.Create(User, model.Password);
-
-                    if (result.Succeeded)
-                    {
-                        //TODO: redirect to success page
-                        return RedirectToAction("", "Login");
-                    }
-
-                    else
-                        ViewBag.ErrorMessage =
-                            "Failed to create an account an error occured.";
-
-                }
-            }
-            return View(model);
-        }
-
-        public ActionResult Success()
-        {
-            //TODO: success view
-            return View();
-        }
-
-        public ActionResult Validate(string UserId, string Token)
-        {
-            //TODO: validate users email address
-            return View();
-        }
-
-
-    }
-}


bug fix: fallback backtrack function is not worked.

--- Inscribe/ViewModels/PartBlocks/InputBlock/InputBlockViewModel.cs
+++ Inscribe/ViewModels/PartBlocks/InputBlock/InputBlockViewModel.cs
@@ -696,7 +696,9 @@
             if (origin == null)
                 origin = info;
             var parent = AccountStorage.Accounts.Where(i => i.AccountProperty.FallbackAccount == info.ScreenName).FirstOrDefault();
-            if (parent == null || parent == origin)
+            if (parent == null)
+                return info;
+            else if (parent == origin)
                 return origin;
             else
                 return FallbackBackTracking(parent, origin);
@@ -1219,7 +1221,7 @@

         #endregion

-        #region Posing control
+        #region Posting control

         public void AddUpdateWorker(TweetWorker w)
         {


dataRowFix (thanks to s.murauer)

dataRowFix (thanks to s.murauer)

--- LibNoDaveConnectionLibrary/DataTypes/Blocks/Step7V5/S7DataRow.cs
+++ LibNoDaveConnectionLibrary/DataTypes/Blocks/Step7V5/S7DataRow.cs
@@ -342,14 +342,17 @@
                     {
                         int retInt = 0;
                         retInt =(len * this.GetArrayLines()) / 8;
+
+                        if (this.GetArrayLines() < 4)
+                            retInt++;
+
                         if ((len * this.GetArrayLines()) % 8 != 0) retInt++;
                         if ((len * this.GetArrayLines()) % 2 != 0) retInt++;
                         return retInt;
                     }
                     else
                     {
-                        int retInt = 0;
-                        retInt =(len * GetArrayLines());
+                        int retInt = (len*GetArrayLines());
                         if (retInt % 2 !=0) retInt++;
                         return retInt;
                     }


add IsSpecialSeason param

add IsSpecialSeason param

--- MediaBrowser.Plugins.DefaultTheme/Details/DetailPageViewModel.cs
+++ MediaBrowser.Plugins.DefaultTheme/Details/DetailPageViewModel.cs
@@ -884,7 +884,8 @@
                                  ItemFields.DateCreated,
                                  ItemFields.Overview
                         },
-                SeriesId = item.Id
+                SeriesId = item.Id,
+                IsSpecialSeason = false
             };

             return _apiClient.GetSeasonsAsync(query);


修改LoginAction 每次创建新的GameSession bug

修改LoginAction 每次创建新的GameSession bug

--- Middleware/ZyGames.Framework.Game/Contract/Action/LoginAction.cs
+++ Middleware/ZyGames.Framework.Game/Contract/Action/LoginAction.cs
@@ -183,8 +183,8 @@
                 {
                     watch.Check("GetResponse");

-                    Current.SetExpired();
-                    Current = GameSession.CreateNew(Guid.NewGuid());
+                    //Current.SetExpired();
+                    //Current = GameSession.CreateNew(Guid.NewGuid());
                     Sid = Current.SessionId;//create new
                     PassportId = login.PassportID;
                     UserType = login.UserType;


Rename next_hop_mac to next_outside_hop_mac

--- examples/NAT.cs
+++ examples/NAT.cs
@@ -45,7 +45,7 @@
   private IPAddress my_address;
   private ushort next_port;
   private readonly object portLock = new object();
-  private readonly PhysicalAddress next_hop_mac;
+  private readonly PhysicalAddress next_outside_hop_mac;

   public NAT () {
     // FIXME raise an exception if this constructor was used, since currently only the other constructor initialises things properly.
@@ -54,7 +54,7 @@
   public NAT (IPAddress my_address, ushort next_port, PhysicalAddress next_hop_mac) {
     this.my_address = my_address;
     this.next_port = next_port;
-    this.next_hop_mac = next_hop_mac;
+    this.next_outside_hop_mac = next_hop_mac;
   }

   // We keep 2 dictionaries, one for queries related to packets crossing from the outside (O) to the inside (I), and
@@ -176,7 +176,7 @@
     ((IPv4Packet)p_ip).UpdateIPChecksum();
     p_tcp.UpdateTCPChecksum();
     // Update destination MAC address
-    p_eth.DestinationHwAddress = next_hop_mac;
+    p_eth.DestinationHwAddress = next_outside_hop_mac;
     return Port_Outside;
   }


DEV-11486 Simple sample uses auto on start as well

--- Acrolinx.Demo.Sidebar/SimpleSample.cs
+++ Acrolinx.Demo.Sidebar/SimpleSample.cs
@@ -22,7 +22,7 @@
     ///
     public partial class SimpleSample : Form
     {
-        public SimpleSample() : this( Format.HTML, "your_file_name.txt", "" +Environment.NewLine + "
 This is a header without dot
" + Environment.NewLine + "
This is an simple sample tesst
" + Environment.NewLine + "")
+        public SimpleSample() : this( Format.Auto, "your_file_name.htm", "" +Environment.NewLine + "
 This is a header without dot
" + Environment.NewLine + "
This is an simple sample tesst
" + Environment.NewLine + "")
         {

         }