minor code cleanup

minor code cleanup

--- src/ShipStationAccess/DataService/IDataServiceQuery.cs
+++ src/ShipStationAccess/DataService/IDataServiceQuery.cs
@@ -1,5 +1,4 @@
 using System;
-using System.Collections;
 using System.Collections.Generic;
 using System.Linq;
 using System.Linq.Expressions;
@@ -7,7 +6,7 @@

 namespace ShipStationAccess.DataService
 {
-	public interface IDataServiceQuery< TElement > : IQueryable< TElement >, IEnumerable< TElement >, IQueryable, IEnumerable
+	public interface IDataServiceQuery< TElement > : IQueryable< TElement >
 	{
 		IDataServiceQuery< TElement > Expand< TTarget >( Expression< Func< TElement, TTarget > > navigationPropertyAccessor );


Cleaned up path code.

Cleaned up path code.

--- src/SourceBrowser.Site/Controllers/UploadController.cs
+++ src/SourceBrowser.Site/Controllers/UploadController.cs
@@ -31,8 +31,7 @@
             }

             string filePath = retriever.RetrieveProject();
-            var organizationPath = System.Web.Hosting.HostingEnvironment.MapPath("~/")  + "SB_Files\\" + retriever.UserName;
-            var repoPath = Path.Combine(organizationPath, retriever.RepoName);
+            var repoPath = Path.Combine(System.Web.Hosting.HostingEnvironment.MapPath("~/"), "SB_Files", retriever.UserName, retriever.RepoName);

             // Generate the source browser files for this solution
             var solutionPaths = GetSolutionPaths(filePath);


Test fixes

Test fixes

--- src/Tests/Eshopworld.Telemetry.Tests/BigBrotherTest.cs
+++ src/Tests/Eshopworld.Telemetry.Tests/BigBrotherTest.cs
@@ -281,7 +281,7 @@
                 bb.Publish(telemetry.ToExceptionEvent());
                 bb.Flush();

-                await Task.Delay(TimeSpan.FromSeconds(1));
+                await Task.Delay(TimeSpan.FromSeconds(2));
                 channel.Verify();
             }
         }


Added test to check that reference send changes correctly when base property is modified.

--- src/Tools/RPCGen.Tests/Services/DataObjectBaseClass.cs
+++ src/Tools/RPCGen.Tests/Services/DataObjectBaseClass.cs
@@ -38,6 +38,7 @@
             {
                 Data.BaseNumber = baseNumber;
                 Data.Number = number;
+                ReferenceManager.Publish(Data);
                 return Data;
             }
         }
@@ -55,5 +56,27 @@
             Assert.AreEqual(task.Result.Number, 1337);
             Assert.AreEqual(task.Result.BaseNumber, 8453);
         }
+
+        [Test]
+        public void TestDataObjectBaseRef()
+        {
+            var impl = new Service();
+            var proxy = Helper.GetProxy<IService>(impl);
+
+            var task = proxy.GetDataObject(8453, 1337);
+
+            var result = task.Result;
+            Assert.IsTrue(task.Wait(100));
+            Assert.AreEqual(1337, result.Number);
+            Assert.AreEqual(8453, result.BaseNumber);
+
+            Assert.IsTrue(ReferenceManager.Subscribe(result));
+
+            impl.Data.BaseNumber = 1;
+
+            ((RPCProxy)proxy).RPCManager.ReferenceManager.DispatchChanges();
+
+            Assert.AreEqual(1, result.BaseNumber);
+        }
     }
 }


added SO CC-BY-SA info and links

added SO CC-BY-SA info and links

--- src/Validation/Default/ResponseTypeEqualityComparer.cs
+++ src/Validation/Default/ResponseTypeEqualityComparer.cs
@@ -1,4 +1,4 @@
-// Copyright (c) Brock Allen & Dominick Baier. All rights reserved.
+// Copyright (c) Brock Allen & Dominick Baier. All rights reserved.
 // Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.

@@ -76,6 +76,8 @@
             Array.Sort(values);

             // Using Skeet's answer here: http://stackoverflow.com/a/7244729/208990
+            // Licensed under Creative Commons CC-BY-SA from SO: https://stackoverflow.com/legal/terms-of-service#licensing
+            // Creative Commons CC-BY-SA https://creativecommons.org/licenses/by-sa/4.0/
             var hash = 17;
             foreach (var element in values)
             {


Lock each list of memory persistence before using

In some cases, add/remove workflow at persistence store will throw an
exception. ("Collection was modified; enumeration operation may not execute.")

--- src/WorkflowCore/Services/MemoryPersistenceProvider.cs
+++ src/WorkflowCore/Services/MemoryPersistenceProvider.cs
@@ -22,66 +22,90 @@

         public async Task<string> CreateNewWorkflow(WorkflowInstance workflow)
         {
-            workflow.Id = Guid.NewGuid().ToString();
-            _instances.Add(workflow);
-            return workflow.Id;
+            lock (_instances)
+            {
+                workflow.Id = Guid.NewGuid().ToString();
+                _instances.Add(workflow);
+                return workflow.Id;
+            }
         }

         public async Task PersistWorkflow(WorkflowInstance workflow)
         {
-            var existing = _instances.First(x => x.Id == workflow.Id);
-            _instances.Remove(existing);
-            _instances.Add(workflow);
+            lock (_instances)
+            {
+                var existing = _instances.First(x => x.Id == workflow.Id);
+                _instances.Remove(existing);
+                _instances.Add(workflow);
+            }
         }

         public async Task<IEnumerable<string>> GetRunnableInstances()
         {
-            var now = DateTime.Now.ToUniversalTime().Ticks;
-            return _instances.Where(x => x.NextExecution.HasValue && x.NextExecution <= now).Select(x => x.Id);
+            lock (_instances)
+            {
+                var now = DateTime.Now.ToUniversalTime().Ticks;
+                return _instances.Where(x => x.NextExecution.HasValue && x.NextExecution <= now).Select(x => x.Id);
+            }
         }

         public async Task<WorkflowInstance> GetWorkflowInstance(string Id)
         {
-            return _instances.First(x => x.Id == Id);
+            lock (_instances)
+            {
+                return _instances.First(x => x.Id == Id);
+            }
         }

         public async Task<IEnumerable<WorkflowInstance>> GetWorkflowInstances(WorkflowStatus? status, string type, DateTime? createdFrom, DateTime? createdTo, int skip, int take)
         {
-            var result = _instances.AsQueryable();
+            lock (_instances)
+            {
+                var result = _instances.AsQueryable();

-            if (status.HasValue)
-                result = result.Where(x => x.Status == status.Value);
+                if (status.HasValue)
+                    result = result.Where(x => x.Status == status.Value);

-            if (!String.IsNullOrEmpty(type))
-                result = result.Where(x => x.WorkflowDefinitionId == type);
+                if (!String.IsNullOrEmpty(type))
+                    result = result.Where(x => x.WorkflowDefinitionId == type);

-            if (createdFrom.HasValue)
-                result = result.Where(x => x.CreateTime >= createdFrom.Value);
+                if (createdFrom.HasValue)
+                    result = result.Where(x => x.CreateTime >= createdFrom.Value);

-            if (createdTo.HasValue)
-                result = result.Where(x => x.CreateTime <= createdTo.Value);
+                if (createdTo.HasValue)
+                    result = result.Where(x => x.CreateTime <= createdTo.Value);

-            return result.Skip(skip).Take(take).ToList();
+                return result.Skip(skip).Take(take).ToList();
+            }
         }

         public async Task<string> CreateEventSubscription(EventSubscription subscription)
         {
-            subscription.Id = Guid.NewGuid().ToString();
-            _subscriptions.Add(subscription);
-            return subscription.Id;
+            lock (_subscriptions)
+            {
+                subscription.Id = Guid.NewGuid().ToString();
+                _subscriptions.Add(subscription);
+                return subscription.Id;
+            }
         }

         public async Task<IEnumerable<EventSubscription>> GetSubcriptions(string eventName, string eventKey, DateTime asOf)
         {
-            return _subscriptions
-                .Where(x => x.EventName == eventName && x.EventKey == eventKey && x.SubscribeAsOf <= asOf);
+            lock (_subscriptions)
+            {
+                return _subscriptions
+                    .Where(x => x.EventName == eventName && x.EventKey == eventKey && x.SubscribeAsOf <= asOf);
+            }
         }

         public async Task TerminateSubscription(string eventSubscriptionId)
         {
-            var sub = _subscriptions.Single(x => x.Id == eventSubscriptionId);
-            _subscriptions.Remove(sub);
+            lock (_subscriptions)
+            {
+                var sub = _subscriptions.Single(x => x.Id == eventSubscriptionId);
+                _subscriptions.Remove(sub);
+            }
         }

         public void EnsureStoreExists()
@@ -90,51 +114,72 @@

         public async Task<string> CreateEvent(Event newEvent)
         {
-            newEvent.Id = Guid.NewGuid().ToString();
-            _events.Add(newEvent);
-            return newEvent.Id;
+            lock (_events)
+            {
+                newEvent.Id = Guid.NewGuid().ToString();
+                _events.Add(newEvent);
+                return newEvent.Id;
+            }
         }

         public async Task MarkEventProcessed(string id)
         {
-            var evt = _events.FirstOrDefault(x => x.Id == id);
-            if (evt != null)
-                evt.IsProcessed = true;
+            lock (_events)
+            {
+                var evt = _events.FirstOrDefault(x => x.Id == id);
+                if (evt != null)
+                    evt.IsProcessed = true;
+            }
         }

         public async Task<IEnumerable<string>> GetRunnableEvents()
         {
-            return _events
-                .Where(x => !x.IsProcessed)
-                .Where(x => x.EventTime <= DateTime.Now.ToUniversalTime())
-                .Select(x => x.Id)
-                .ToList();
+            lock (_events)
+            {
+                return _events
+                    .Where(x => !x.IsProcessed)
+                    .Where(x => x.EventTime <= DateTime.Now.ToUniversalTime())
+                    .Select(x => x.Id)
+                    .ToList();
+            }
         }

         public async Task<Event> GetEvent(string id)
         {
-            return _events.FirstOrDefault(x => x.Id == id);
+            lock (_events)
+            {
+                return _events.FirstOrDefault(x => x.Id == id);
+            }
         }

         public async Task<IEnumerable<string>> GetEvents(string eventName, string eventKey, DateTime asOf)
         {
-            return _events
+            lock (_events)
+            {
+                return _events
                 .Where(x => x.EventName == eventName && x.EventKey == eventKey)
                 .Where(x => x.EventTime >= asOf)
                 .Select(x => x.Id)
                 .ToList();
+            }
         }

         public async Task MarkEventUnprocessed(string id)
         {
-            var evt = _events.FirstOrDefault(x => x.Id == id);
-            if (evt != null)
-                evt.IsProcessed = false;
+            lock (_events)
+            {
+                var evt = _events.FirstOrDefault(x => x.Id == id);
+                if (evt != null)
+                    evt.IsProcessed = false;
+            }
         }

         public async Task PersistErrors(IEnumerable<ExecutionError> errors)
         {
-            _errors.AddRange(errors);
+            lock (errors)
+            {
+                _errors.AddRange(errors);
+            }
         }
     }
 #pragma warning restore CS1998 // Async method lacks 'await' operators and will run synchronously


Report teh project name that we were unable to recover a symbol from.

--- src/Workspaces/Core/Portable/Remote/RemoteArguments.cs
+++ src/Workspaces/Core/Portable/Remote/RemoteArguments.cs
@@ -114,7 +114,7 @@
                 try
                 {
                     throw new InvalidOperationException(
-                        $"We should always be able to resolve a symbol back on the host side:\r\n{SymbolKeyData}\r\n{failureReason}");
+                        $"We should always be able to resolve a symbol back on the host side:\r\n{project.Name}\r\n{SymbolKeyData}\r\n{failureReason}");
                 }
                 catch (Exception ex) when (FatalError.ReportWithoutCrash(ex))
                 {


Only show one side of a docked pair of ports

--- Undockinator.cs
+++ Undockinator.cs
@@ -38,7 +38,8 @@
 		static float maxPartNameWidth = -1f;
 		static float maxShipNameWidth = -1f;
 		Part highlightPart = null;
-		public Vector2 scrollPosition;
+        Part highlightPartnerPart = null;
+        public Vector2 scrollPosition;
 		private bool showRename = false;
 		private UndockablePort renamePort;
 		private string renameName = null;
@@ -154,7 +155,19 @@
 						pm = (ModuleDockingNode)currentVessel.parts[i].Modules[j];
 						if (pm.state.StartsWith("Docked") || pm.state.StartsWith("PreAttached"))
 						{
-							portList.Add(new UndockablePort(currentVessel.parts[i].Modules[j]));
+                            Boolean uniquePort = true;
+                            for (int k = portList.Count - 1; k >= 0; --k)
+                            {
+                                if (portList[k].partnerPM == pm)
+                                {
+                                    uniquePort = false;
+                                }
+                            }
+
+                            if (uniquePort)
+                            {
+                                portList.Add(new UndockablePort(currentVessel.parts[i].Modules[j]));
+                            }
 						}
 					}
 				}
@@ -267,7 +280,12 @@
 					highlightPart.SetHighlightDefault();
 					highlightPart = null;
 				}
-			}
+                if (highlightPartnerPart != null && highlightPartnerPart.HighlightActive)
+                {
+                    highlightPartnerPart.SetHighlightDefault();
+                    highlightPartnerPart = null;
+                }
+            }
 		}

 		public void OnWindow(int windowID)
@@ -366,16 +384,29 @@
 						{
 							highlightPart.SetHighlightDefault();
 						}
-						highlightPart = portList[i].part;
-						if (!highlightPart.HighlightActive)
+                        if (highlightPartnerPart != null && highlightPartnerPart.HighlightActive)
+                        {
+                            highlightPartnerPart.SetHighlightDefault();
+                        }
+                        highlightPart = portList[i].part;
+                        highlightPartnerPart = portList[i].partner;
+
+                        if (!highlightPart.HighlightActive)
 						{
 							highlightPart.SetHighlight(true, false);
 							highlightPart.highlightType = Part.HighlightType.AlwaysOn;
 							highlightPart.SetHighlightColor(Color.yellow);
 							highlightPart.highlighter.OccluderOn();
 						}
-
-					}
+                        if (!highlightPartnerPart.HighlightActive)
+                        {
+                            highlightPartnerPart.SetHighlight(true, false);
+                            highlightPartnerPart.highlightType = Part.HighlightType.AlwaysOn;
+                            highlightPartnerPart.SetHighlightColor(Color.yellow);
+                            highlightPartnerPart.highlighter.OccluderOn();
+                        }
+
+                    }
 					//if ((i % 2 == 0) && (i > 0))
 					//{
 					//	GUILayout.Space(10);


Bugfix for help

Bugfix for help

--- Duplicati/CommandLine/Help.cs
+++ Duplicati/CommandLine/Help.cs
@@ -100,9 +100,7 @@
                         sorted.Add(arg.Name, arg);

                     foreach (Library.Interface.ICommandLineArgument arg in Program.SupportedCommands)
-
-                        sorted.Add(arg.Name, arg);
-
+                        sorted[arg.Name] = arg;

                     foreach (Library.Interface.ICommandLineArgument arg in sorted.Values)
                         lines.Add(PrintArgSimple(arg, arg.Name));


Match positions within 0.125ly

Match positions within 0.125ly

--- EDDiscovery/DB/SystemClass.cs
+++ EDDiscovery/DB/SystemClass.cs
@@ -951,8 +951,8 @@
             try
             {
                 // Indexed sets of systems
+                Dictionary<long, List<SystemClass>> systemsByVscId = new Dictionary<long, List<SystemClass>>();
                 Dictionary<string, List<SystemClass>> systemsByName = new Dictionary<string, List<SystemClass>>();
-                Dictionary<Tuple<double, double, double>, List<SystemClass>> systemsByPosition = new Dictionary<Tuple<double, double, double>, List<SystemClass>>();
                 Dictionary<long, SystemClass> systemsByEdsmId = new Dictionary<long, SystemClass>();

                 using (SQLiteConnectionED cn = new SQLiteConnectionED())
@@ -962,68 +962,61 @@
                     // than having to sift through all of the systems
                     // ourselves.
                     using (DbCommand cmd = cn.CreateCommand(
-                        "SELECT DISTINCT s.* " +
+                        "SELECT DISTINCT vsc.id AS vscid, s.* " +
                         "FROM VisitedSystems vsc " +
                         "LEFT JOIN Systems s " +
                         "ON s.Name = vsc.Name " +
                         "OR s.id_edsm = vsc.id_edsm_assigned " +
-                        "OR (s.X = vsc.X AND s.Y = vsc.Y AND s.Z = vsc.Z) " +
-                        "WHERE s.id IS NOT NULL"))
+                        "OR (s.X >= vsc.X - 0.125 AND s.X <= vsc.X + 0.125 AND s.Y >= vsc.Y - 0.125 AND s.Y <= vsc.Y + 0.125 AND s.Z >= vsc.Z - 0.125 AND s.Z <= vsc.Z + 0.125) " +
+                        "WHERE s.id IS NOT NULL " +
+                        "ORDER BY s.id ASC"))
                     {
                         using (DbDataReader reader = cmd.ExecuteReader())
                         {
+                            long lastid = -1;
+                            SystemClass sys = null;
+
                             while (reader.Read())
                             {
                                 string name = ((string)reader["name"]).ToUpper();
-                                double x = Double.NaN;
-                                double y = Double.NaN;
-                                double z = Double.NaN;
                                 long id_edsm = 0;
-                                SystemClass sys = null;
-
-                                // Get name match
-                                if (!systemsByName.ContainsKey(name))
+                                long id = (long)reader["id"];
+                                long vscid = (long)reader["vscid"];
+
+                                if (id != lastid)
                                 {
-                                    systemsByName[name] = new List<SystemClass>();
+                                    // Get name match
+                                    if (!systemsByName.ContainsKey(name))
+                                    {
+                                        systemsByName[name] = new List<SystemClass>();
+                                    }
+
+                                    sys = new SystemClass(reader);
+                                    systemsByName[name].Add(sys);
+
+                                    // Get EDSM ID match
+                                    if (reader["id_edsm"] != System.DBNull.Value)
+                                    {
+                                        id_edsm = (long)reader["id_edsm"];
+
+                                        if (sys == null)
+                                        {
+                                            sys = new SystemClass(reader);
+                                        }
+
+                                        systemsByEdsmId[id_edsm] = sys;
+                                    }
+
+                                    lastid = id;
                                 }

-                                sys = new SystemClass(reader);
-                                systemsByName[name].Add(sys);
-
-                                // Get EDSM ID match
-                                if (reader["id_edsm"] != System.DBNull.Value)
+                                // Get VSC ID match
+                                if (!systemsByVscId.ContainsKey(vscid))
                                 {
-                                    id_edsm = (long)reader["id_edsm"];
-
-                                    if (sys == null)
-                                    {
-                                        sys = new SystemClass(reader);
-                                    }
-
-                                    systemsByEdsmId[id_edsm] = sys;
+                                    systemsByVscId[vscid] = new List<SystemClass>();
                                 }

-                                // Get position match
-                                if (reader["x"] != System.DBNull.Value)
-                                {
-                                    x = (double)reader["x"];
-                                    y = (double)reader["y"];
-                                    z = (double)reader["z"];
-
-                                    Tuple<double, double, double> pos = new Tuple<double, double, double>(x, y, z);
-
-                                    if (!systemsByPosition.ContainsKey(pos))
-                                    {
-                                        systemsByPosition[pos] = new List<SystemClass>();
-                                    }
-
-                                    if (sys == null)
-                                    {
-                                        sys = new SystemClass(reader);
-                                    }
-
-                                    systemsByPosition[pos].Add(sys);
-                                }
+                                systemsByVscId[vscid].Add(sys);
                             }
                         }
                     }
@@ -1042,7 +1035,16 @@
                         List<SystemClass> namematches = null;
                         SystemClass edsmidmatch = null;
                         bool multimatch = false;
-                        Dictionary<long, SystemClass> matches = new Dictionary<long, SystemClass>();
+                        Dictionary<long, SystemClass> matches;
+
+                        if (systemsByVscId.ContainsKey(vsc.id))
+                        {
+                            matches = systemsByVscId[vsc.id].ToDictionary(s => s.id);
+                        }
+                        else
+                        {
+                            matches = new Dictionary<long, SystemClass>();
+                        }

                         if (vsc.id_edsm_assigned != null && vsc.id_edsm_assigned != 0)
                         {
@@ -1057,10 +1059,9 @@

                         if (vsc.HasTravelCoordinates)
                         {
-                            var pos = new Tuple<double, double, double>(vsc.X, vsc.Y, vsc.Z);
-                            if (systemsByPosition.ContainsKey(pos) && systemsByPosition[pos].Count >= 1)
-                            {
-                                posmatches = systemsByPosition[pos];
+                            posmatches = matches.Values.Where(s => s.x >= vsc.X - 0.125 && s.x <= vsc.X + 0.125 && s.y >= vsc.X - 0.125 && s.y <= vsc.Y + 0.125 && s.z >= vsc.Z - 0.125 && s.z <= vsc.Z + 0.125).ToList();
+                            if (posmatches.Count >= 1)
+                            {
                                 nameposmatches = posmatches.Where(s => s.SearchName == vsc_searchname).ToList();

                                 foreach (var sys in posmatches)
@@ -1086,13 +1087,13 @@
                         {
                             SystemClass sys = edsmidmatch;

-                            if (sys.SearchName == vsc_searchname && sys.x == vsc.X && sys.y == vsc.Y && sys.z == vsc.Z) // name and position matches
+                            if (sys.SearchName == vsc_searchname && sys.x >= vsc.X - 0.125 && sys.x <= vsc.X + 0.125 && sys.y >= vsc.Y - 0.125 && sys.y <= vsc.Y + 0.125 && sys.z >= vsc.Z - 0.125 && sys.z <= vsc.Z + 0.125) // name and position matches
                             {
                                 vsc.NameStatus = "Exact match";
                                 vsc.curSystem = sys;
                                 continue; // Continue to next system
                             }
-                            else if (sys.x == vsc.X && sys.y == vsc.Y && sys.z == vsc.Z) // position matches
+                            else if (sys.x >= vsc.X - 0.125 && sys.x <= vsc.X + 0.125 && sys.y >= vsc.Y - 0.125 && sys.y <= vsc.Y + 0.125 && sys.z >= vsc.Z - 0.125 && sys.z <= vsc.Z + 0.125) // position matches
                             {
                                 vsc.NameStatus = "Name differs";
                                 vsc.curSystem = sys;
@@ -1117,7 +1118,7 @@
                             }
                         }

-                        if (posmatches != null)
+                        if (nameposmatches != null)
                         {
                             if (nameposmatches.Count == 1)
                             {


Fix parameter error when EDSM returns an error

--- EDDiscovery/EDSM/EDSMClass.cs
+++ EDDiscovery/EDSM/EDSMClass.cs
@@ -481,13 +481,14 @@

             JObject msg = JObject.Parse(json);
             int msgnr = msg["msgnum"].Value<int>();
-            DateTime.TryParseExact(msg["startDateTime"].Value<string>(), "yyyy-MM-dd HH:mm:ss", CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal, out logstarttime);
-            DateTime.TryParseExact(msg["endDateTime"].Value<string>(), "yyyy-MM-dd HH:mm:ss", CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal, out logendtime);

             JArray logs = (JArray)msg["logs"];

             if (logs != null)
             {
+                DateTime.TryParseExact(msg["startDateTime"].Value<string>(), "yyyy-MM-dd HH:mm:ss", CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal, out logstarttime);
+                DateTime.TryParseExact(msg["endDateTime"].Value<string>(), "yyyy-MM-dd HH:mm:ss", CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal, out logendtime);
+
                 using (SQLiteConnectionSystem cn = new SQLiteConnectionSystem())
                 {
                     foreach (JObject jo in logs)


Make the "TravelMode" component optional.

 - this is required for training systems and the first time a player enters the game.

--- EDDiscovery/SystemPosition.cs
+++ EDDiscovery/SystemPosition.cs
@@ -56,7 +56,7 @@
                  * Also, please note that due to E:D bugs, these entries can be at the end of a line as well, not just on a line of their own.
                  * The RegExp below actually just finds the pattern somewhere in the line, so it caters for rubbish at the end too.
                  */
-                Regex pattern = new Regex(@"{(?<Hour>\d+):(?<Minute>\d+):(?<Second>\d+)} System:\d+\((?<SystemName>.*?)\) Body:(?<Body>\d+) Pos:\(.*?\) (?<TravelMode>\w+)");
+                Regex pattern = new Regex(@"{(?<Hour>\d+):(?<Minute>\d+):(?<Second>\d+)} System:\d+\((?<SystemName>.*?)\) Body:(?<Body>\d+) Pos:\(.*?\)( (?<TravelMode>\w+))?");

                 Match match = pattern.Match(line);

@@ -66,9 +66,6 @@

                 sp.Nr = int.Parse(match.Groups["Body"].Value);
                 sp.Name = match.Groups["SystemName"].Value;
-
-                // Debug
-                string travelMode = match.Groups["TravelMode"].Value;

                 if (hour >= lasttime.Hour)
                 {


Optimize /Api/Bots request

Optimize /Api/Bots request

--- ArchiSteamFarm/Statistics.cs
+++ ArchiSteamFarm/Statistics.cs
@@ -228,7 +228,7 @@

 		[ItemCanBeNull]
 		private async Task<ImmutableHashSet<ListedUser>> GetListedUsers() {
-			const string request = URL + "/Api/Bots";
+			const string request = URL + "/Api/Bots?matchEverything=1";

 			WebBrowser.ObjectResponse<ImmutableHashSet<ListedUser>> objectResponse = await Bot.ArchiWebHandler.WebBrowser.UrlGetToJsonObject<ImmutableHashSet<ListedUser>>(request).ConfigureAwait(false);


Tested and approved - auto sim stop/dt slowing

--- Assets/Scripts/Controller.cs
+++ Assets/Scripts/Controller.cs
@@ -40,7 +40,7 @@

 	//For slowing down the simulation, and ending it
 	//The time is in real time, using Time.deltaTime
-	float timeUntilCheck;
+	public float timeUntilCheck;
 	bool historyCheck;	//true on "frame" we should check

 	// Initialization
@@ -79,7 +79,7 @@

 	void Update () {
 		float scroll = Input.mouseScrollDelta.y*scrollFactor;
-		cam.orthographicSize = Mathf.Clamp(cam.orthographicSize-scroll,2.5f,1000f);
+		cam.fieldOfView = Mathf.Clamp(cam.fieldOfView+scroll,2.5f,1000f);

 		if(Input.GetKeyDown(KeyCode.Space)){
 			if(!upNodes){
@@ -102,8 +102,11 @@
 		}

 		if(simulating){
-			timeUntilCheck -= Time.deltaTime;
-			if(timeUntilCheck<=0) historyCheck = true;
+			if(upNodes)
+			{
+				timeUntilCheck -= Time.deltaTime;
+				if(timeUntilCheck<=0) historyCheck = true;
+			}

 			Node.forceScale=nodeFScale;
 			Edge.colorFactor = colorFactor;
@@ -234,12 +237,12 @@

 		//if(edges.Count>1000) Time.timeScale=.2f;
 		simulating=true;
+		timeUntilCheck = 8;
 		StartCoroutine(updateNodes());

 		yield return new WaitForSeconds(1);

 		if(!upNodes) upNodes=true;
-		timeUntilCheck = 1;

 		yield break;
 	}
@@ -482,7 +485,8 @@
 				//If its below a threshhold, slow down, and if simplified, un-simplify
 				//Reset timeuntil and history check
 				dif/=difCount+0f;
-				if(dif.magnitude<.1f)
+				Debug.Log(dif.magnitude);
+				if(dif.magnitude<.05f*dt)
 				{
 					if(dt<.01f)
 					{
@@ -490,14 +494,15 @@
 						timeUntilCheck = 10;
 					}else
 					{
-						dt*=.5f;
-						if(simplified)
+
+						if(simplify)
 						{
 							simplify = false;
 							StartCoroutine(Unsimplify());
 							timeUntilCheck = 8;
 						}else
 						{
+							dt*=.5f;
 							timeUntilCheck = 3;
 						}
 					}


remove unnecessary reference

remove unnecessary reference

--- Assets/Scripts/Initialize.cs
+++ Assets/Scripts/Initialize.cs
@@ -23,7 +23,6 @@
     private Font font;
     private AudioClip fingerPressedSound;
     private SessionManager sessionMgr;
-    private SelectionHandler selectionHandler;
     void Awake()
     {
         Debug.Log("Waking up...");


fixed nullptr for missing clip

fixed nullptr for missing clip

--- Assets/Scripts/SwitchArea.cs
+++ Assets/Scripts/SwitchArea.cs
@@ -20,8 +20,8 @@
 	IEnumerator Switching() {
 		if (wait) yield break;
 		wait = true;
-
-		AudioSource.PlayClipAtPoint(clip, transform.position, 1f);
+		if (clip)
+			AudioSource.PlayClipAtPoint(clip, transform.position, 1f);
 		UnityStandardAssets._2D.PlatformerCharacter2D.storePosition = player.transform.position;
 		var scene = SceneManager.GetSceneByName(level+" "+n);
 		SceneManager.LoadSceneAsync(level+" "+n);


LOG4NET-370 fix the RemoteSyslogAppender to properly handle log messages that contain newlines

This patch is based on the work of Jarrod Alexander. Please note that this patch also fixes
indentation issues and thus contains some portions of refactoring. Finally it is worth to note
that the patch primarily focuses on making the syslog messages RFC3164 (http://www.ietf.org/rfc/rfc3164.txt) compliant. The signifant parts of the RFC are:

4.1.3 MSG Part of a syslog Packet

   The MSG part will fill the remainder of the syslog packet. This will
   usually contain some additional information of the process that
   generated the message, and then the text of the message. There is no
   ending delimiter to this part. The MSG part of the syslog packet
   MUST contain visible (printing) characters. The code set
   traditionally and most often used has also been seven-bit ASCII in an
   eight-bit field like that used in the PRI and HEADER parts. In this
   code set, the only allowable characters are the ABNF VCHAR values
   (%d33-126) and spaces (SP value %d32). However, no indication of the
   code set used within the MSG is required, nor is it expected. Other
   code sets MAY be used as long as the characters used in the MSG are
   exclusively visible characters and spaces similar to those described
   above. The selection of a code set used in the MSG part SHOULD be
   made with thoughts of the intended receiver. A message containing
   characters in a code set that cannot be viewed or understood by a
   recipient will yield no information of value to an operator or
   administrator looking at it.

git-svn-id: 223c0ba935819ffdcafdc68147dc609b4e469b1e@1461433 13f79535-47bb-0310-9956-ffa450edef68

--- src/Appender/RemoteSyslogAppender.cs
+++ src/Appender/RemoteSyslogAppender.cs
@@ -24,7 +24,7 @@
 using log4net.Util;
 using log4net.Layout;

-namespace log4net.Appender
+namespace log4net.Appender
 {
 	/// <summary>
 	/// Logs events to a remote syslog daemon.
@@ -66,7 +66,7 @@
 	/// </remarks>
 	/// <author>Rob Lyon</author>
 	/// <author>Nicko Cadell</author>
-	public class RemoteSyslogAppender : UdpAppender
+	public class RemoteSyslogAppender : UdpAppender
 	{
 		/// <summary>
 		/// Syslog port 514
@@ -268,7 +268,7 @@
 		/// This instance of the <see cref="RemoteSyslogAppender" /> class is set up to write
 		/// to a remote syslog daemon.
 		/// </remarks>
-		public RemoteSyslogAppender()
+		public RemoteSyslogAppender()
 		{
 			// syslog udp defaults
 			this.RemotePort = DefaultSyslogPort;
@@ -279,7 +279,7 @@
 		#endregion Public Instance Constructors

 		#region Public Instance Properties
-
+
 		/// <summary>
 		/// Message identity
 		/// </summary>
@@ -310,7 +310,7 @@
 			get { return m_facility; }
 			set { m_facility = value; }
 		}
-
+
 		#endregion Public Instance Properties

 		/// <summary>
@@ -341,46 +341,68 @@
 		/// The format of the output will depend on the appender's layout.
 		/// </para>
 		/// </remarks>
-		protected override void Append(LoggingEvent loggingEvent)
-		{
-			try
-			{
-				System.IO.StringWriter writer = new System.IO.StringWriter(System.Globalization.CultureInfo.InvariantCulture);
-
-				// Priority
-				int priority = GeneratePriority(m_facility, GetSeverity(loggingEvent.Level));
-				writer.Write('<');
-				writer.Write(priority);
-				writer.Write('>');
-
-				// Identity
-				if (m_identity != null)
+		protected override void Append(LoggingEvent loggingEvent)
+		{
+			try
+			{
+				using (ReusableStringWriter writer = new ReusableStringWriter(System.Globalization.CultureInfo.InvariantCulture))
 				{
-					m_identity.Format(writer, loggingEvent);
+					// Priority
+					int priority = GeneratePriority(m_facility, GetSeverity(loggingEvent.Level));
+
+					// Identity
+					string identity;
+
+					if (m_identity != null)
+					{
+						identity = m_identity.Format(loggingEvent);
+					}
+					else
+					{
+						identity = loggingEvent.Domain;
+					}
+
+					// Message. The message goes after the tag/identity
+					string message = RenderLoggingEvent(loggingEvent);
+
+					// Split message by line to ensure that the syslog
+					// message is compliant to the RFC
+					// http://www.ietf.org/rfc/rfc3164.txt in section 4.1.3
+					string[] lines = message.Split(new char[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries);
+
+					Byte[] buffer;
+
+					foreach (string line in lines)
+					{
+						writer.Reset(c_renderBufferMaxCapacity, c_renderBufferSize);
+
+						// Write priority
+						writer.Write('<');
+						writer.Write(priority);
+						writer.Write('>');
+
+						// Write identity
+						writer.Write(identity);
+						writer.Write(": ");
+
+						// Write message line
+						writer.Write(line);
+
+						// Grab as a byte array
+						buffer = this.Encoding.GetBytes(writer.ToString());
+
+						this.Client.Send(buffer, buffer.Length, this.RemoteEndPoint);
+					}
 				}
-				else
-				{
-					writer.Write(loggingEvent.Domain);
-				}
-				writer.Write(": ");
-
-				// Message. The message goes after the tag/identity
-				RenderLoggingEvent(writer, loggingEvent);
-
-				// Grab as a byte array
-				string fullMessage = writer.ToString();
-				Byte [] buffer = this.Encoding.GetBytes(fullMessage.ToCharArray());
-
-				this.Client.Send(buffer, buffer.Length, this.RemoteEndPoint);
-			}
-			catch (Exception e)
+			}
+			catch (Exception e)
 			{
 				ErrorHandler.Error(
-					"Unable to send logging event to remote syslog " +
-					this.RemoteAddress.ToString() +
-					" on port " +
-					this.RemotePort + ".",
-					e,
+					"Unable to send logging event to remote syslog " +
+					this.RemoteAddress.ToString() +
+					" on port " +
+					this.RemotePort + ".",
+					e,
 					ErrorCode.WriteFailure);
 			}
 		}
@@ -425,30 +447,30 @@
 			// Fallback to sensible default values
 			//

-			if (level >= Level.Alert)
+			if (level >= Level.Alert)
 			{
 				return SyslogSeverity.Alert;
-			}
-			else if (level >= Level.Critical)
+			}
+			else if (level >= Level.Critical)
 			{
 				return SyslogSeverity.Critical;
-			}
-			else if (level >= Level.Error)
+			}
+			else if (level >= Level.Error)
 			{
 				return SyslogSeverity.Error;
-			}
-			else if (level >= Level.Warn)
+			}
+			else if (level >= Level.Warn)
 			{
 				return SyslogSeverity.Warning;
-			}
-			else if (level >= Level.Notice)
+			}
+			else if (level >= Level.Notice)
 			{
 				return SyslogSeverity.Notice;
-			}
-			else if (level >= Level.Info)
+			}
+			else if (level >= Level.Info)
 			{
 				return SyslogSeverity.Informational;
-			}
+			}
 			// Default setting
 			return SyslogSeverity.Debug;
 		}
@@ -504,6 +526,16 @@
 		/// Mapping from level object to syslog severity
 		/// </summary>
 		private LevelMapping m_levelMapping = new LevelMapping();
+
+		/// <summary>
+		/// Initial buffer size
+		/// </summary>
+		private const int c_renderBufferSize = 256;
+
+		/// <summary>
+		/// Maximum buffer size before it is recycled
+		/// </summary>
+		private const int c_renderBufferMaxCapacity = 1024;

 		#endregion Private Instances Fields


RestCallExecutor * ContentType handling adjusted to allow custom content types

--- src/biz.dfch.CS.Web.Utilities/Rest/RestCallExecutor.cs
+++ src/biz.dfch.CS.Web.Utilities/Rest/RestCallExecutor.cs
@@ -123,8 +123,14 @@
                     headers.Remove(AUTHORIZATION_HEADER_KEY);
                 }

+                var contentTypeAsString = _ContentType.GetStringValue();
+                if (null != headers && headers.ContainsKey(CONTENT_TYPE_HEADER_KEY))
+                {
+                    contentTypeAsString = headers[CONTENT_TYPE_HEADER_KEY];
+                    headers.Remove(CONTENT_TYPE_HEADER_KEY);
+                }
+
                 httpClient.DefaultRequestHeaders.Add(USER_AGENT_HEADER_KEY, ExtractUserAgentFromHeaders(headers));
-                httpClient.DefaultRequestHeaders.Add(CONTENT_TYPE_HEADER_KEY, _ContentType.GetStringValue());

                 if (null != headers)
                 {
@@ -145,12 +151,14 @@
                     case HttpMethod.Post:
                     {
                         HttpContent content = new StringContent(body);
+                        content.Headers.ContentType = MediaTypeHeaderValue.Parse(contentTypeAsString);
                         response = httpClient.PostAsync(uri, content).Result;
                     }
                         break;
                     case HttpMethod.Put:
                     {
                         HttpContent content = new StringContent(body);
+                        content.Headers.ContentType = MediaTypeHeaderValue.Parse(contentTypeAsString);
                         response = httpClient.PutAsync(uri, content).Result;
                     }
                         break;


Add button offsets constants

Add button offsets constants

--- Editor/AnimationPathEditor.cs
+++ Editor/AnimationPathEditor.cs
@@ -39,6 +39,17 @@
         private bool prevMoveAllKeyValue = false;

         #endregion Keyboard Keys
+        #region BUTTON OFFSETS
+
+        private const int smoothButtonH = 15;
+        private const int smoothButtonV = 0;
+        private const int linearButtonH = 34;
+        private const int linearButtonV = 0;
+        private const int addButtonH = 53;
+        private const int addButtonV = 0;
+        private const int removeButtonH = 72;
+        private const int removeButtonV = 0;
+        #endregion

         #region SERIALIZED PROPERTIES

@@ -440,8 +451,8 @@
                 // Draw button.
                 bool buttonPressed = DrawButton(
                     guiPoint,
-                    82,
-                    25,
+                    addButtonH,
+                    addButtonV,
                     15,
                     15,
                     buttonStyle);
@@ -475,8 +486,8 @@
                 // Draw button.
                 buttonPressed = DrawButton(
                     guiPoint,
-                    64,
-                    25,
+                    removeButtonH,
+                    removeButtonV,
                     15,
                     15,
                     buttonStyle);
@@ -548,8 +559,8 @@

                 // Create rectangle for the "+" button.
                 Rect rect = new Rect(
-                        guiPoint.x + 100,
-                        guiPoint.y + 25,
+                        guiPoint.x + smoothButtonH,
+                        guiPoint.y + smoothButtonV,
                         15,
                         15);

@@ -589,8 +600,8 @@

                 // Create rectangle for the button.
                 Rect rect = new Rect(
-                        guiPoint.x + 120,
-                        guiPoint.y + 25,
+                        guiPoint.x + linearButtonH,
+                        guiPoint.y + linearButtonV,
                         15,
                         15);


Avoid editor window updates when application is playing

--- Editor/BaseUpdateablePanel.cs
+++ Editor/BaseUpdateablePanel.cs
@@ -19,6 +19,9 @@

 		private void OnInspectorUpdate()
 		{
+			if (EditorApplication.isPlaying)
+				return;
+
 			// Fixed Update
 			_deltaBetweenUpdates += 0.1f;
 			if (_deltaBetweenUpdates >= UpdatePoint) {
@@ -102,4 +105,3 @@
 		#endregion
 	}
 }
-


Select always visible in reference picker

--- Editor/ReferenceTypePicker.cs
+++ Editor/ReferenceTypePicker.cs
@@ -190,7 +190,7 @@
         }
         GUILayout.EndVertical();

-        if (SelectedType != null)
+        GUI.enabled = SelectedType != null;
         {
             if (GUILayout.Button("Select"))
             {
@@ -198,6 +198,7 @@
                 Close();
             }
         }
+        GUI.enabled = true;
     }

     private void BuildInheritanceLine(StringBuilder builder, Type type)


The Library now doesn't throw an exception anymore, if the administrator is not activated and the next song in the playlist plays automatically

--- Espera/Espera.Core/Library.cs
+++ Espera/Espera.Core/Library.cs
@@ -235,17 +235,6 @@
         }

         /// <summary>
-        /// Continues the currently loaded song.
-        /// </summary>
-        public void ContinueSong()
-        {
-            if (this.AccessMode != AccessMode.Administrator)
-                throw new InvalidOperationException("The user is not in administrator mode.");
-
-            this.audioPlayer.Play();
-        }
-
-        /// <summary>
         /// Plays the song with the specified index in the playlist.
         /// </summary>
         /// <param name="playlistIndex">The index of the song in the playlist.</param>
@@ -254,10 +243,18 @@
             if (this.AccessMode != AccessMode.Administrator)
                 throw new InvalidOperationException("The user is not in administrator mode.");

-            this.CurrentSongPlaylistIndex = playlistIndex;
-            this.audioPlayer.Load(this.playlist[playlistIndex]);
+            this.InternPlaySong(playlistIndex);
+        }
+
+        /// <summary>
+        /// Continues the currently loaded song.
+        /// </summary>
+        public void ContinueSong()
+        {
+            if (this.AccessMode != AccessMode.Administrator)
+                throw new InvalidOperationException("The user is not in administrator mode.");
+
             this.audioPlayer.Play();
-            this.SongStarted.RaiseSafe(this, EventArgs.Empty);
         }

         /// <summary>
@@ -279,10 +276,7 @@
             if (this.AccessMode != AccessMode.Administrator)
                 throw new InvalidOperationException("The user is not in administrator mode.");

-            if (!this.CanPlayNextSong || !this.CurrentSongPlaylistIndex.HasValue)
-                throw new InvalidOperationException("The next song couldn't be played.");
-
-            this.PlaySong(this.CurrentSongPlaylistIndex.Value + 1);
+            this.InternPlayNextSong();
         }

         /// <summary>
@@ -360,13 +354,31 @@
             this.audioPlayer.Dispose();
         }

+        private void InternPlaySong(int playlistIndex)
+        {
+            playlistIndex.ThrowIfLessThan(0, () => playlistIndex);
+
+            this.CurrentSongPlaylistIndex = playlistIndex;
+            this.audioPlayer.Load(this.playlist[playlistIndex]);
+            this.audioPlayer.Play();
+            this.SongStarted.RaiseSafe(this, EventArgs.Empty);
+        }
+
+        private void InternPlayNextSong()
+        {
+            if (!this.CanPlayNextSong || !this.CurrentSongPlaylistIndex.HasValue)
+                throw new InvalidOperationException("The next song couldn't be played.");
+
+            this.InternPlaySong(this.CurrentSongPlaylistIndex.Value + 1);
+        }
+
         private void HandleSongFinish()
         {
             this.SongFinished.RaiseSafe(this, EventArgs.Empty);

             if (this.CanPlayNextSong)
             {
-                this.PlayNextSong();
+                this.InternPlayNextSong();
             }
         }
     }


Removed GetAttachedProperties extension methods

--- src/AttachedProperties/Extensions.cs
+++ src/AttachedProperties/Extensions.cs
@@ -23,35 +23,6 @@
     /// </summary>
     public static class Extensions
     {
-
-        #region Get Attached Properties
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <typeparam name="T"></typeparam>
-        /// <param name="self"></param>
-        /// <returns></returns>
-        public static IReadOnlyDictionary<AbstractAttachedProperty, object> GetAttachedProperties<T>(this T self)
-        {
-            var attachedProperties = self.GetAttachedProperties(AttachedPropertyContext.GlobalContext);
-            return attachedProperties;
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <typeparam name="T"></typeparam>
-        /// <param name="self"></param>
-        /// <param name="context"></param>
-        /// <returns></returns>
-        public static IReadOnlyDictionary<AbstractAttachedProperty, object> GetAttachedProperties<T>(this T self, AttachedPropertyContext context)
-        {
-            var attachedProperties = context.GetInstanceProperties(self);
-            return attachedProperties;
-        }
-
-        #endregion

         #region Get Attached Value


Nimsuggest updates

Nimsuggest updates

--- VSNimSuggest.cs
+++ VSNimSuggest.cs
@@ -11,12 +11,12 @@
 namespace NimStudio.NimStudio {

     public class NimSuggestProc {
-        public Process proc = null;
+        private Process proc = null;
         public List<string> conout = new List<string>();
-        //public List<string> sugs = new List<string>();
         public List<List<string>> sugs = new List<List<string>>();
-        public Thread thread = null;
-        public bool queryfinished = false;
+        //private Thread thread = null;
+        private bool queryfinished = false;
+        private string filepath_prev="";

         static NimSuggestProc() {
             // static constructor
@@ -26,6 +26,38 @@
             // instance constructor
         }

+
+        public void query(string filepath) {
+            conout.Clear();
+            sugs.Clear();
+            queryfinished = false;
+            proc.StandardInput.WriteLine(str);
+            int waitcount = 0;
+            while (!queryfinished) {
+                Thread.Sleep(50);
+                waitcount++;
+                if (waitcount > 100) {
+                    // 5 second wait cap
+                    queryfinished = true;
+                    break;
+                }
+            }
+            foreach (string qstr in conout) {
+                string[] qwords = qstr.Split(new char[] { '\t' });
+                //List<string> qwords = new List<string>(qstr.Split(new Char[] { '\t' }));
+                if (qwords.Length < 2) break;
+                if (qwords[1] == "skProc" || qwords[1] == "skVar") {
+                    //new List<string>(new string[]{"G","H","I"})
+                    qwords[2] = qwords[2].Replace("htmlarc.", "");
+                    qwords[7] = qwords[7].Replace(@"\x0D\x0A", "\n");
+                    qwords[7] = qwords[7].Trim(new char[] { '"' });
+                    if (qwords[7] != "")
+                        qwords[7] = "\n\n" + qwords[7];
+                    sugs.Add(new List<string>(new string[] { qwords[2], qwords[3] + qwords[7] }));
+                }
+            }
+        }
+
         public void conwrite(string str) {
             conout.Clear();
             sugs.Clear();
@@ -33,17 +65,20 @@
             proc.StandardInput.WriteLine(str);
             int waitcount=0;
             while (!queryfinished) {
+                if (proc == null || proc.HasExited) break;
                 Thread.Sleep(50);
                 waitcount++;
-                if (waitcount > 100) {
-                    // 5 second wait cap
-                    queryfinished=true;
+                if (waitcount > 100) // 5 second wait cap
                     break;
-                }
+            }
+            queryfinished = true;
+            if (proc == null || proc.HasExited) {
+                proc=null;
+                filepath_prev="";
+                return;
             }
             foreach (string qstr in conout) {
                 string[] qwords = qstr.Split(new char[] { '\t' });
-                //List<string> qwords = new List<string>(qstr.Split(new Char[] { '\t' }));
                 if (qwords.Length < 2) break;
                 if (qwords[1] == "skProc" || qwords[1] == "skVar") {
                     //new List<string>(new string[]{"G","H","I"})
@@ -73,15 +108,21 @@
             proc.StartInfo.UseShellExecute = false;

             proc.EnableRaisingEvents = true;
-            proc.OutputDataReceived += new DataReceivedEventHandler(DRHandler);
-            proc.ErrorDataReceived += new DataReceivedEventHandler(DRHandler);
+            proc.OutputDataReceived += new DataReceivedEventHandler(NSDRHandler);
+            proc.ErrorDataReceived += new DataReceivedEventHandler(NSDRHandler);
+            proc.Exited += new EventHandler(NSExitHandler);
             proc.Start();
             proc.BeginOutputReadLine();
             proc.StandardInput.WriteLine("");
             Thread.Sleep(300); // allow time for nimsuggest startup lines to be processed
         }

-        private void DRHandler(object sender, DataReceivedEventArgs e) {
+        private void NSExitHandler(object sender, EventArgs e) {
+            proc.Dispose();
+            proc = null;
+        }
+
+        private void NSDRHandler(object sender, DataReceivedEventArgs e) {
             string line = e.Data;
             if (line == "")
                 queryfinished=true;


Remove PMap.Empty, unused.

Remove PMap.Empty, unused.

--- Eutherion/Win/Storage/PMap.cs
+++ Eutherion/Win/Storage/PMap.cs
@@ -33,11 +33,6 @@
     {
         // Prevent repeated allocations of empty dictionaries.
         private static readonly Dictionary<string, PValue> emptyMap = new Dictionary<string, PValue>();
-
-        /// <summary>
-        /// Represents the empty <see cref="PMap"/>, which contains no key-value pairs.
-        /// </summary>
-        public static readonly PMap Empty = new PMap(null);

         private readonly Dictionary<string, PValue> map;


Removed Render Grid On Focused  Column CHange

--- ExpressCraft/grid/GridView.cs
+++ ExpressCraft/grid/GridView.cs
@@ -73,7 +73,7 @@
                 {
                     var prev = _focusedcolumn;
                     _focusedcolumn = value;
-                    RenderGrid();
+                    //RenderGrid();
                 }
             }
         }


Fix token length.

Fix token length.

--- Freesia/Internal/Tokenizer.cs
+++ Freesia/Internal/Tokenizer.cs
@@ -160,13 +160,13 @@
                                 break;
                             case '=':
                                 if (LexChars('i') == 'i')
-                                    yield return new CompilerToken { Type = TokenType.EqualsI, Position = start, Length = 2 };
+                                    yield return new CompilerToken { Type = TokenType.EqualsI, Position = start, Length = 3 };
                                 else
                                     yield return new CompilerToken { Type = TokenType.Equals, Position = start, Length = 2 };
                                 break;
                             case '@':
                                 if (LexChars('i') == 'i')
-                                    yield return new CompilerToken { Type = TokenType.ContainsI, Position = start, Length = 2 };
+                                    yield return new CompilerToken { Type = TokenType.ContainsI, Position = start, Length = 3 };
                                 else
                                     yield return new CompilerToken { Type = TokenType.Contains, Position = start, Length = 2 };
                                 break;


Purple background

Purple background

--- Game/GameWindows/GameStart.cs
+++ Game/GameWindows/GameStart.cs
@@ -9,13 +9,12 @@
 	/// </summary>
 	public class GameStart : Microsoft.Xna.Framework.Game
 	{
-		/// <summary>
-		/// The graphics.
-		/// </summary>
 		GraphicsDeviceManager graphics;
-
 		SpriteBatch spriteBatch;

+		/// <summary>
+		/// Initializes a new instance of the <see cref="GameStart"/> class.
+		/// </summary>
 		public GameStart()
 		{
 			graphics = new GraphicsDeviceManager(this);
@@ -77,7 +76,7 @@
 		/// <param name="gameTime">Provides a snapshot of timing values.</param>
 		protected override void Draw(GameTime gameTime)
 		{
-			GraphicsDevice.Clear(Color.CornflowerBlue);
+			GraphicsDevice.Clear(Color.Purple);

 			// TODO: Add your drawing code here


remove debug code

remove debug code

--- Grit.ACE/Actions/ActionBus.cs
+++ Grit.ACE/Actions/ActionBus.cs
@@ -101,7 +101,6 @@
                     var worker = workers.Take();
                     try
                     {
-                        Console.WriteLine(worker);
                         return Work(action);
                     }
                     finally


First Integration Test passes

First Integration Test passes

--- EqualsVerifier.Tests/Integration/BasicContract/HashCodeTest.cs
+++ EqualsVerifier.Tests/Integration/BasicContract/HashCodeTest.cs
@@ -7,20 +7,14 @@
     [TestFixture]
     public class HashCodeTest : IntegrationTestBase
     {
-        /*
         [Test]
         public void GivenEqualObjects_WhenHashCodesAreUnequal_ThenFail()
         {
             ExpectFailure(
-                () => {
-                    EqualsVerifier
-                        .ForType(typeof(RandomHashCode))
-                        .Verify();
-                },
+                () => EqualsVerifier.ForType<RandomHashCode>().Verify(),
                 "hashCode: hashCodes should be equal",
                 typeof(RandomHashCode).Name);
         }
-        */

         public class RandomHashCode : Point
         {


no 1px hot drag area to the left of main tab control


FIx audio bug.

FIx audio bug.

--- HiPMobile/HiPMobile.Droid/Activities/ExhibitDetailsActivity.cs
+++ HiPMobile/HiPMobile.Droid/Activities/ExhibitDetailsActivity.cs
@@ -336,6 +336,11 @@
                     isAudioPlaying = true;
                     UpdatePlayPauseButtonIcon();
                 }
+                else if (mediaPlayerService.GetTimeCurrent () > 0)
+                {
+                    startTime = mediaPlayerService.GetTimeCurrent();
+                    audioSeekbar.Progress = (int)startTime;
+                }
             }
         }


Petition search fix.

Petition search fix.

--- Infopulse.EDemocracy.Web/Controllers/API/PetitionController.cs
+++ Infopulse.EDemocracy.Web/Controllers/API/PetitionController.cs
@@ -65,11 +65,11 @@
 		/// <returns></returns>
 		[HttpGet]
 		[Route("api/petition")]
-		public OperationResult<IEnumerable<Petition>> GetAll(bool showPreliminaryPetitions = false)
-		{
-			var result = OperationExecuter.Execute(() =>
-			{
-				var petitions = this.petitionRepository.Get(showPreliminaryPetitions);
+		public OperationResult<IEnumerable<Petition>> GetAll(bool showInactivePetitions = false)
+		{
+			var result = OperationExecuter.Execute(() =>
+			{
+				var petitions = this.petitionRepository.Get(showInactivePetitions);

 				this.SetDictionariesValues(petitions);

@@ -115,6 +115,11 @@
 		[Route("api/petition/search")]
 		public OperationResult<IEnumerable<Petition>> Search([FromUri] PetitionSearchParameters searchParameters)
 		{
+			if (searchParameters == null)
+			{
+				return this.GetAll();
+			}
+
 			var result = OperationExecuter.Execute(() =>
 			{
 				var petitions = this.petitionRepository.Search(searchParameters).ToList();


Update DbContainer.cs

Update DbContainer.cs

--- Main/Source/Effort.Shared/Internal/DbManagement/DbContainer.cs
+++ Main/Source/Effort.Shared/Internal/DbManagement/DbContainer.cs
@@ -54,7 +54,7 @@
         private List<TableName> tableNames;
         private ITypeConverter converter;
         private DbContainerParameters parameters;
-        public bool? IsCaseSensitive;
+        public bool IsCaseSensitive;

         private ILogger logger;
         private ConcurrentDictionary<string, IStoredProcedure> transformCache;


Simplify

Simplify

--- MatterControlLib/PrinterControls/TerminalWindow/TerminalLog.cs
+++ MatterControlLib/PrinterControls/TerminalWindow/TerminalLog.cs
@@ -70,22 +70,19 @@

 		private void FromPrinter(object sender, string line)
 		{
-			var eventArgs = new StringEventArgs("<-" + line);
-			PrinterLines.Add(eventArgs.Data);
-			OnHasChanged(eventArgs);
+			PrinterLines.Add(line);
+			OnHasChanged(new StringEventArgs("<-" + line));
 		}

 		private void ToPrinter(object sender, string line)
 		{
 			PrinterLines.Add(line);
-
 			OnHasChanged(new StringEventArgs("->" + line));
 		}

 		public void WriteLine(string line)
 		{
 			PrinterLines.Add(line);
-
 			OnHasChanged(new StringEventArgs(line));
 		}

@@ -130,6 +127,7 @@
 			{
 				PrinterLines.Clear();
 			}
+
 			OnHasChanged(null);
 		}
 	}


Retry when attaching to micro services fail

--- MicroServicesStarter/ServiceManagement/Action/StartServices.cs
+++ MicroServicesStarter/ServiceManagement/Action/StartServices.cs
@@ -17,6 +17,8 @@

     public sealed class StartServices : IChainableAction<AdminSetupContext, AdminSetupContext>
     {
+        private const int ProcessDebugAttachRetries = 10;
+
         private string jsonFileWithStartingServices;

         private readonly string adminHost;
@@ -65,11 +67,33 @@

                         if (context.SetupType == SetupType.Debug)
                         {
-                            context.LogToUi(
-                                string.Format("Attaching to service {0}:{1}", workerData.ServiceName, workerData.Id));
+                            int tries = ProcessDebugAttachRetries;

-                            var serviceProcess = Process.GetProcessesByName("Services.Executioner").OrderByDescending(x => x.StartTime).First();
-                            context.Do(new AttachDebuggerToProcess(serviceProcess));
+                            while (true)
+                            {
+                                try
+                                {
+                                    var triesText = tries != ProcessDebugAttachRetries ? "(Try #" + (ProcessDebugAttachRetries - tries) + ")" : string.Empty;
+                                    context.LogToUi(
+                                        string.Format("Attaching to service {2}{0}:{1}", workerData.ServiceName, workerData.Id, triesText));
+
+                                    var serviceProcess = Process.GetProcessesByName("Services.Executioner").OrderByDescending(x => x.StartTime).First();
+                                    context.Do(new AttachDebuggerToProcess(serviceProcess));
+
+                                    break;
+                                }
+                                catch
+                                {
+                                    if (tries == 0)
+                                    {
+                                        throw;
+                                    }
+
+                                    tries--;
+
+                                    Thread.Sleep(1000);
+                                }
+                            }
                         }

                         successfulServices.Add(workerData.Id, true);


minor code cleanup

minor code cleanup

--- Mono.Debugging/Mono.Debugging.Evaluation/ObjectValueAdaptor.cs
+++ Mono.Debugging/Mono.Debugging.Evaluation/ObjectValueAdaptor.cs
@@ -592,14 +592,17 @@

 		public ObjectValue[] GetExpressionValuesAsync (EvaluationContext ctx, string[] expressions)
 		{
-			ObjectValue[] values = new ObjectValue[expressions.Length];
+			var values = new ObjectValue[expressions.Length];
+
 			for (int n = 0; n < values.Length; n++) {
 				string exp = expressions[n];
+
 				// This is a workaround to a bug in mono 2.0. That mono version fails to compile
 				// an anonymous method here
-				ExpData edata = new ExpData (ctx, exp, this);
+				var edata = new ExpData (ctx, exp, this);
 				values[n] = asyncEvaluationTracker.Run (exp, ObjectValueFlags.Literal, edata.Run);
 			}
+
 			return values;
 		}


Clicking Activates Item in Hand

Clicking Activates Item in Hand

--- Navier-Boats/Navier-Boats/Navier-Boats/Game/Entities/Player.cs
+++ Navier-Boats/Navier-Boats/Navier-Boats/Game/Entities/Player.cs
@@ -32,6 +32,7 @@
         #endregion

         private int previousMouseWheelValue = 0;
+        private bool clickLastFrame = false;

         public Player(Vector2 position)
             : base(100, 32)
@@ -107,6 +108,10 @@
                             Items.SelectedItemIndex -= 1;
                         }
                     }
+                    if (mouseState.LeftButton == ButtonState.Pressed && clickLastFrame == false && Items.SelectedItem != null && Items.SelectedItem.Amount > 0)
+                    {
+                        Items.SelectedItem.Item.OnAction(this);
+                    }
                     previousMouseWheelValue = mouseState.ScrollWheelValue;

                 }


constrained dummy config now work when creating constrained type indirectly

--- OBeautifulCode.AutoFakeItEasy/AutoFixtureBackedDummyFactory.cs
+++ OBeautifulCode.AutoFakeItEasy/AutoFixtureBackedDummyFactory.cs
@@ -12,7 +12,6 @@
     using System.Globalization;
     using System.Linq;
     using System.Reflection;
-    using System.Threading;

     using FakeItEasy;

@@ -26,15 +25,13 @@
     /// </summary>
     public class AutoFixtureBackedDummyFactory : IDummyFactory
     {
-        private static readonly Fixture Fixture = new Fixture();
+        private static readonly Fixture FixtureWithCreators = new Fixture();
+
+        private static readonly Fixture FixtureWithoutCreators = new Fixture();

         private static readonly object FixtureLock = new object();

         private static readonly ConcurrentDictionary<Type, object> RegisteredTypes = new ConcurrentDictionary<Type, object>();
-
-        private static readonly ConcurrentDictionary<Type, Func<object>> ConstrainedDummyCreatorFuncsByType = new ConcurrentDictionary<Type, Func<object>>();
-
-        private static readonly ThreadLocal<HashSet<Type>> ConstrainedDummyCreatorFuncsInUse = new ThreadLocal<HashSet<Type>>(() => new HashSet<Type>());

         private static readonly MethodInfo AutoFixtureCreateMethod =
             typeof(SpecimenFactory)
@@ -46,11 +43,13 @@
         /// </summary>
         public AutoFixtureBackedDummyFactory()
         {
-            ConfigureRecursionBehavior();
-
-            AddCustomizations();
-
-            RegisterCustomTypes();
+            ConfigureRecursionBehavior(FixtureWithCreators);
+            ConfigureRecursionBehavior(FixtureWithoutCreators);
+
+            AddCustomizations(FixtureWithCreators);
+            AddCustomizations(FixtureWithoutCreators);
+
+            RegisterCustomTypes(FixtureWithCreators);
         }

         /// <inheritdoc />
@@ -77,13 +76,7 @@
         /// </remarks>
         public static void AddDummyCreator<T>(Func<T> dummyCreatorFunc)
         {
-            lock (FixtureLock)
-            {
-                Fixture.Register(dummyCreatorFunc);
-            }
-
-            Type type = typeof(T);
-            RegisteredTypes.TryAdd(type, new object());
+            AddDummyCreator(FixtureWithCreators, dummyCreatorFunc);
         }

         /// <summary>
@@ -104,23 +97,15 @@
         /// <param name="comparer">An equality comparer to use when comparing constructed dummies against the dummies that can be returned.</param>
         public static void ConstrainDummyToBeOneOf<T>(IEnumerable<T> possibleDummies, IEqualityComparer<T> comparer = null)
         {
-            Type type = typeof(T);
-            Func<object> creatorFunc = () =>
-            {
-                try
-                {
-                    T result = comparer == null
-                        ? A.Dummy<T>().ThatIsIn(possibleDummies)
-                        : A.Dummy<T>().ThatIsIn(possibleDummies, comparer);
-                    return result;
-                }
-                finally
-                {
-                    ConstrainedDummyCreatorFuncsInUse.Value.Remove(type);
-                }
+            Func<T> creatorFunc = () =>
+            {
+                T result = comparer == null
+                    ? ((T)CreateType(FixtureWithoutCreators, typeof(T))).ThatIsIn(possibleDummies)
+                    : ((T)CreateType(FixtureWithoutCreators, typeof(T))).ThatIsIn(possibleDummies, comparer);
+                return result;
             };

-            ConstrainedDummyCreatorFuncsByType.AddOrUpdate(type, creatorFunc, (t, c) => creatorFunc);
+            AddDummyCreator(creatorFunc);
         }

         /// <summary>
@@ -141,23 +126,15 @@
         /// <param name="comparer">An equality comparer to use when comparing constructed dummies against the dummies to exclude.</param>
         public static void ConstrainDummyToExclude<T>(IEnumerable<T> possibleDummies, IEqualityComparer<T> comparer = null)
         {
-            Type type = typeof(T);
-            Func<object> creatorFunc = () =>
-            {
-                try
-                {
-                    T result = comparer == null
-                        ? A.Dummy<T>().ThatIsNotIn(possibleDummies)
-                        : A.Dummy<T>().ThatIsNotIn(possibleDummies, comparer);
-                    return result;
-                }
-                finally
-                {
-                    ConstrainedDummyCreatorFuncsInUse.Value.Remove(type);
-                }
+            Func<T> creatorFunc = () =>
+            {
+                T result = comparer == null
+                    ? ((T)CreateType(FixtureWithoutCreators, typeof(T))).ThatIsNotIn(possibleDummies)
+                    : ((T)CreateType(FixtureWithoutCreators, typeof(T))).ThatIsNotIn(possibleDummies, comparer);
+                return result;
             };

-            ConstrainedDummyCreatorFuncsByType.AddOrUpdate(type, creatorFunc, (t, c) => creatorFunc);
+            AddDummyCreator(creatorFunc);
         }

         /// <summary>
@@ -281,49 +258,60 @@
         /// <inheritdoc />
         public object Create(Type type)
         {
-            var result = CreateType(type);
+            var result = CreateType(FixtureWithCreators, type);
             return result;
         }

-        private static void ConfigureRecursionBehavior()
+        private static void ConfigureRecursionBehavior(Fixture fixture)
         {
             // It's not AutoFixture's job to detect recursion.  Infinite recursion will cause the process to blow-up;
             // it's typically a behavior that's easy to observe/detect.  By allowing recursion we enable a swath
             // of legitimate scenarios (e.g. a tree).
-            var throwingRecursionBehaviors = Fixture.Behaviors.OfType<ThrowingRecursionBehavior>().ToList();
+            var throwingRecursionBehaviors = fixture.Behaviors.OfType<ThrowingRecursionBehavior>().ToList();
             foreach (var throwingRecursionBehavior in throwingRecursionBehaviors)
             {
-                Fixture.Behaviors.Remove(throwingRecursionBehavior);
-            }
-        }
-
-        private static void AddCustomizations()
+                fixture.Behaviors.Remove(throwingRecursionBehavior);
+            }
+        }
+
+        private static void AddCustomizations(Fixture fixture)
         {
             // fix some of AutoFixture's poor defaults - see README.md
             // ReSharper disable RedundantNameQualifier

             // this will generate numbers in the range [-32768,32768]
-            Fixture.Customizations.Insert(0, new AutoFakeItEasy.RandomNumericSequenceGenerator(short.MinValue, short.MaxValue + 2));
-            Fixture.Customizations.Insert(0, new AutoFakeItEasy.RandomBoolSequenceGenerator());
-            Fixture.Customizations.Insert(0, new AutoFakeItEasy.RandomEnumSequenceGenerator());
+            fixture.Customizations.Insert(0, new AutoFakeItEasy.RandomNumericSequenceGenerator(short.MinValue, short.MaxValue + 2));
+            fixture.Customizations.Insert(0, new AutoFakeItEasy.RandomBoolSequenceGenerator());
+            fixture.Customizations.Insert(0, new AutoFakeItEasy.RandomEnumSequenceGenerator());

             // ReSharper restore RedundantNameQualifier
         }

-        private static void RegisterCustomTypes()
-        {
-            AddDummyCreator(() => new PositiveInteger(Math.Abs(A.Dummy<int>().ThatIsNot(0))));
-            AddDummyCreator(() => new NegativeInteger(-1 * Math.Abs(A.Dummy<int>().ThatIsNot(0))));
-            AddDummyCreator(() => new ZeroOrPositiveInteger(Math.Abs(Fixture.Create<int>())));
-            AddDummyCreator(() => new ZeroOrNegativeInteger(-1 * Math.Abs(Fixture.Create<int>())));
-
-            AddDummyCreator(() => new PositiveDouble(Math.Abs(A.Dummy<double>().ThatIsNot(0))));
-            AddDummyCreator(() => new NegativeDouble(-1d * Math.Abs(A.Dummy<double>().ThatIsNot(0))));
-            AddDummyCreator(() => new ZeroOrPositiveDouble(Math.Abs(Fixture.Create<double>())));
-            AddDummyCreator(() => new ZeroOrNegativeDouble(-1 * Math.Abs(Fixture.Create<double>())));
-
-            AddDummyCreator(PercentChangeAsDouble.CreateConstrainedValue);
-            AddDummyCreator(PercentChangeAsDecimal.CreateConstrainedValue);
+        private static void RegisterCustomTypes(Fixture fixture)
+        {
+            AddDummyCreator(fixture, () => new PositiveInteger(Math.Abs(A.Dummy<int>().ThatIsNot(0))));
+            AddDummyCreator(fixture, () => new NegativeInteger(-1 * Math.Abs(A.Dummy<int>().ThatIsNot(0))));
+            AddDummyCreator(fixture, () => new ZeroOrPositiveInteger(Math.Abs(A.Dummy<int>())));
+            AddDummyCreator(fixture, () => new ZeroOrNegativeInteger(-1 * Math.Abs(A.Dummy<int>())));
+
+            AddDummyCreator(fixture, () => new PositiveDouble(Math.Abs(A.Dummy<double>().ThatIsNot(0))));
+            AddDummyCreator(fixture, () => new NegativeDouble(-1d * Math.Abs(A.Dummy<double>().ThatIsNot(0))));
+            AddDummyCreator(fixture, () => new ZeroOrPositiveDouble(Math.Abs(A.Dummy<double>())));
+            AddDummyCreator(fixture, () => new ZeroOrNegativeDouble(-1 * Math.Abs(A.Dummy<double>())));
+
+            AddDummyCreator(fixture, PercentChangeAsDouble.CreateConstrainedValue);
+            AddDummyCreator(fixture, PercentChangeAsDecimal.CreateConstrainedValue);
+        }
+
+        private static void AddDummyCreator<T>(Fixture fixture, Func<T> dummyCreatorFunc)
+        {
+            lock (FixtureLock)
+            {
+                fixture.Register(dummyCreatorFunc);
+            }
+
+            Type type = typeof(T);
+            RegisteredTypes.TryAdd(type, new object());
         }

         private static bool CanCreateType(Type type)
@@ -346,31 +334,14 @@
             return true;
         }

-        private static object CreateType(Type type)
-        {
-            // trying to create a constrained dummy?  these dummies are NOT registered with AutoFixture
-            // otherwise it would result in infinite recursion and an OverflowException
-            if (ConstrainedDummyCreatorFuncsByType.ContainsKey(type))
-            {
-                // has the creator func already called on this thread?
-                // if so we don't want to call it again, rather we want to just drop down
-                // to AutoFixture and build an unconstrained dummy.  we can let the currently
-                // running creator func handle the retries needed to satisfy the constraint
-                if (!ConstrainedDummyCreatorFuncsInUse.Value.Contains(type))
-                {
-                    ConstrainedDummyCreatorFuncsInUse.Value.Add(type);
-                    var creatorFunc = ConstrainedDummyCreatorFuncsByType[type];
-                    var result = creatorFunc();
-                    return result;
-                }
-            }
-
+        private static object CreateType(Fixture fixture, Type type)
+        {
             // call the AutoFixture Create() method, lock because AutoFixture is not thread safe.
-            MethodInfo autoFixtureGenericCreateMethod = AutoFixtureCreateMethod.MakeGenericMethod(type);
+            var autoFixtureGenericCreateMethod = AutoFixtureCreateMethod.MakeGenericMethod(type);

             lock (FixtureLock)
             {
-                object result = autoFixtureGenericCreateMethod.Invoke(null, new object[] { Fixture });
+                object result = autoFixtureGenericCreateMethod.Invoke(null, new object[] { fixture });
                 return result;
             }
         }


Sometimes write might fail because of underlying disk issues (especially when you are downloading directly to crappy usb drive). Added naive retry.

--- src/AzureBlobExport/CopyFromAzure.cs
+++ src/AzureBlobExport/CopyFromAzure.cs
@@ -3,6 +3,7 @@
 using System.IO;
 using System.Linq;
 using System.Text;
+using System.Threading;
 using Microsoft.WindowsAzure.Storage;
 using Microsoft.WindowsAzure.Storage.Blob;
 using Microsoft.WindowsAzure.Storage.Table;
@@ -43,22 +44,38 @@
                 Console.WriteLine($"Downloading from {startIndex} to {(endIndex < siriTableEntities.Count ? endIndex : siriTableEntities.Count)}...");
                 foreach (var entity in batch)
                 {
-                    var vehicleBlob = GetBlobContainer().GetBlockBlobReference(entity.BlobReference);
-                    using (var memoryStream = new MemoryStream())
+                    try
                     {
-                        vehicleBlob.DownloadToStream(memoryStream);
-                        var stream = Encoding.UTF8.GetString(memoryStream.ToArray());
-                        var fileNameParsed = entity.BlobReference.Replace(' ', '_');
-                        fileNameParsed = fileNameParsed.Replace(':', '_');
-
-                        var path = Path.Combine(ConfigurationManager.AppSettings["SaveDirectory"], fileNameParsed + ".txt");
-                        var file = new FileInfo(path);
-
-                        File.WriteAllText(file.FullName, stream);
+                        WriteBlobToDisk(entity);
+                    }
+                    catch (Exception e)
+                    {
+                        Console.WriteLine($"ERROR (Entity: {entity.PartitionKey}|{entity.RowKey}): {e.Message}");
+                        Console.WriteLine("Waiting 5 secs for retry...");
+                        Thread.Sleep(TimeSpan.FromSeconds(5));
+                        WriteBlobToDisk(entity);
+                        Console.WriteLine("Successfully download.");
                     }
                 }

                 batchIndex++;
+            }
+        }
+
+        private void WriteBlobToDisk(SiriTableEntity entity)
+        {
+            var vehicleBlob = GetBlobContainer().GetBlockBlobReference(entity.BlobReference);
+            using (var memoryStream = new MemoryStream())
+            {
+                vehicleBlob.DownloadToStream(memoryStream);
+                var stream = Encoding.UTF8.GetString(memoryStream.ToArray());
+                var fileNameParsed = entity.BlobReference.Replace(' ', '_');
+                fileNameParsed = fileNameParsed.Replace(':', '_');
+
+                var path = Path.Combine(ConfigurationManager.AppSettings["SaveDirectory"], fileNameParsed + ".txt");
+                var file = new FileInfo(path);
+
+                File.WriteAllText(file.FullName, stream);
             }
         }


Change API :'/api/v1/analysis/result' to 'api/v3/analysis/result'

--- project/dexter-vs/Dexter/Common/Core/Client/DexterClient.cs
+++ project/dexter-vs/Dexter/Common/Core/Client/DexterClient.cs
@@ -14,7 +14,7 @@
     /// </summary>
     public class DexterClient : IDexterClient
     {
-        public static readonly string POST_ANALYSIS_RESULT_V3 = "/api/v1/analysis/result";
+        public static readonly string POST_ANALYSIS_RESULT_V3 = "/api/v3/analysis/result";
         public static readonly string POST_SNAPSHOT_SOURCECODE = "/api/v1/analysis/snapshot/source";
         public static readonly string POST_ACCOUNT_ADD_V1 = "/api/v1/accounts/add";


Removed stupid image typo (Fixes #121)

Removed stupid image typo (Fixes #121)

--- KerbalAlarmClock/Resources.cs
+++ KerbalAlarmClock/Resources.cs
@@ -77,7 +77,7 @@
         internal static Texture2D iconWarpToANDNOver = new Texture2D(20, 12, TextureFormat.ARGB32, false);
         internal static Texture2D iconWarpToTSApPe = new Texture2D(20, 12, TextureFormat.ARGB32, false);
         internal static Texture2D iconWarpToTSApPeOver = new Texture2D(20, 12, TextureFormat.ARGB32, false);
-        internal static Texture2D iconWarpToTSApPeOverConfirm = new Texture2D(20, 12, TextureFormat.ARGB32, false);
+        //internal static Texture2D iconWarpToTSApPeOverConfirm = new Texture2D(20, 12, TextureFormat.ARGB32, false);
         internal static Texture2D iconWarpToTSManNode = new Texture2D(20, 12, TextureFormat.ARGB32, false);
         internal static Texture2D iconWarpToTSManNodeOver = new Texture2D(20, 12, TextureFormat.ARGB32, false);

@@ -233,7 +233,7 @@
                 KACUtils.LoadImageFromFile(ref iconWarpToANDNOver, "img_buttonWarpToANDNOver.png");
                 KACUtils.LoadImageFromFile(ref iconWarpToTSApPe, "img_buttonWarpToTSApPe.png");
                 KACUtils.LoadImageFromFile(ref iconWarpToTSApPeOver, "img_buttonWarpToTSApPeOver.png");
-                KACUtils.LoadImageFromFile(ref iconWarpToTSApPeOverConfirm, "img_buttonWarpToTSApPeOverConfirm.png");
+                //KACUtils.LoadImageFromFile(ref iconWarpToTSApPeOverConfirm, "img_buttonWarpToTSApPeOverConfirm.png");
                 KACUtils.LoadImageFromFile(ref iconWarpToTSManNode, "img_buttonWarpToTSManNode.png");
                 KACUtils.LoadImageFromFile(ref iconWarpToTSManNodeOver, "img_buttonWarpToTSManNodeOver.png");


Removed the extra check on the idisnull

Removed the extra check on the idisnull

--- PizzaWaiterServiceApp/PizzaWaiterServiceLibrary/Models/Dish.cs
+++ PizzaWaiterServiceApp/PizzaWaiterServiceLibrary/Models/Dish.cs
@@ -167,13 +167,6 @@
                             }
                             break;
                         case Input.DishIdIsNull:
-                            if (this.ValidateIdIsNull(dish))
-                            {
-                                this.Response.AddMessage(ResponseMessage.DataEmpty); // add message
-                                err++; // count errors up
-                            }
-                            break;
-                        case Input.IdIsNull:
                             if (this.ValidateIdIsNull(dish))
                             {
                                 this.Response.AddMessage(ResponseMessage.DataEmpty); // add message


LiPTT

LiPTT

--- LiPTT/Compoments/PTTClient.cs
+++ LiPTT/Compoments/PTTClient.cs
@@ -165,7 +165,7 @@
         protected bool isConnected;
         public SemaphoreSlim ScreenLocker;

-        const int ConnectTimeout = 2 * 1000;
+        const int ConnectTimeout = 5 * 1000;
         const int AliveTimeout = 30 * 60 * 1000;

         public PTTClient()


Fix wording in doc comment

Fix wording in doc comment

--- RockLib.Configuration/RockLibConfigurationBuilderExtensions.cs
+++ RockLib.Configuration/RockLibConfigurationBuilderExtensions.cs
@@ -10,7 +10,7 @@
 namespace RockLib.Configuration
 {
     /// <summary>
-    /// Extension methods for adding to configuration providers to an instance of <see cref="IConfigurationBuilder"/>.
+    /// Extension methods for adding configuration providers to an instance of <see cref="IConfigurationBuilder"/>.
     /// </summary>
     public static class RockLibConfigurationBuilderExtensions
     {


[SharePoint] Fix MSCOPYS_S02_TC12 fail when the second SUT does not exist.

--- SharePoint/Source/MS-COPYS/TestSuite/S02_CopyIntoItemsLocal.cs
+++ SharePoint/Source/MS-COPYS/TestSuite/S02_CopyIntoItemsLocal.cs
@@ -682,6 +682,10 @@
         [TestCategory("MSCOPYS"), TestMethod()]
         public void MSCOPYS_S02_TC12_CopyIntoItemsLocal_SourceDestinationOnDifferentServer()
         {
+            if (Common.GetConfigurationPropertyValue("SourceSutComputerName", this.Site) == string.Empty)
+            {
+                Site.Assert.Inconclusive("This case runs only when the Source system under test exists.");
+            }
             string sourceFileUrl = this.GetSourceFileUrl(SourceFileUrlType.SourceFileOnSourceSUT);
             string desFileUrl = this.GetDestinationFileUrl(DestinationFileUrlType.NormalDesLibraryOnDesSUT);


Removed multi field query parser and let NHSearch deal with query

--- Solutions/SharpArchContrib.Data/NHibernate/LuceneExtensions.cs
+++ Solutions/SharpArchContrib.Data/NHibernate/LuceneExtensions.cs
@@ -4,11 +4,6 @@

     using global::NHibernate;
     using global::NHibernate.Search;
-
-    using Lucene.Net.Analysis.Standard;
-    using Lucene.Net.QueryParsers;
-    using Lucene.Net.Search;
-    using Lucene.Net.Util;

     using SharpArch.Core.PersistenceSupport;
     using SharpArch.Data.NHibernate;
@@ -21,14 +16,10 @@
     {
         public static IList<T> Search<T, TId>(this IRepositoryWithTypedId<T, TId> repository, string searchQuery) where T : ISearchable
         {
-            var parser = new MultiFieldQueryParser(Version.LUCENE_29, new[] { "Query" }, new StandardAnalyzer(Version.LUCENE_29));
-            Query luceneQuery = parser.Parse(searchQuery);
             ISession session = NHibernateSession.CurrentFor(SessionFactoryAttribute.GetKeyFrom(repository));
             using (IFullTextSession fullTextSession = NHSearch.Search.CreateFullTextSession(session))
             {
-                IQuery fullTextQuery = fullTextSession.CreateFullTextQuery(luceneQuery, new[] { typeof(T) });
-                IList<T> results = fullTextQuery.List<T>();
-                return results;
+                return fullTextSession.CreateFullTextQuery<T>(searchQuery).List<T>();
             }
         }
     }


up json format response

up json format response

--- Terradue.Tep/Terradue/Tep/WebServer/Storage/Storage.Service.cs
+++ Terradue.Tep/Terradue/Tep/WebServer/Storage/Storage.Service.cs
@@ -137,7 +137,7 @@
                 throw e;
             }

-            return new HttpResult(result);
+            return new HttpResult(result, Request.ContentType);
         }

         public object Get(GetStorageFilesRequestTep request) {
@@ -162,7 +162,7 @@
                 throw e;
             }

-            return new HttpResult(result);
+            return new HttpResult(result, Request.ContentType);
         }

         public object Get(GetDownloadStorageFileRequestTep request) {
@@ -212,7 +212,7 @@
                 throw e;
             }

-            return new HttpResult(result);
+            return new HttpResult(result, Request.ContentType);
         }

         public object Put(PutMoveStorageItemRequestTep request) {
@@ -240,7 +240,7 @@
                 throw e;
             }

-            return new HttpResult(result);
+            return new HttpResult(result, Request.ContentType);
         }

         public object Delete(DeleteStorageFileRequestTep request) {


Version - hardcoded FTW

Version - hardcoded FTW

--- src/ks.model/Services/CommandProcessorService.cs
+++ src/ks.model/Services/CommandProcessorService.cs
@@ -31,7 +31,7 @@
                 args = new[] { "-h" };
             }

-            _logService.Log("Welcome to k-scratch. Someversion number.");
+            _logService.Log("Welcome to k-scratch. v01.");

             bool monitor = false;
             bool log = false;


git-svn-id: https://jumony.svn.codeplex.com/svn/trunk@64760 2327b42d-5241-43d6-9e2a-de5ac946f064

--- Ivony.Html.JQuery/jQuery.cs
+++ Ivony.Html.JQuery/jQuery.cs
@@ -80,7 +80,7 @@

     public jQuery removeAttr( string name )
     {
-      each( e => e.SetAttribute( name ).Remove() );
+      ForAll( e => e.SetAttribute( name ).Remove() );
       return this;
     }

@@ -95,19 +95,19 @@

     public jQuery text( string text )
     {
-      each( element => element.InnerText( text ) );
+      ForAll( element => element.InnerText( text ) );
       return this;
     }

     public jQuery text( Func<string, string> evaluator )
     {
-      each( element => element.InnerText( evaluator( element.InnerText() ) ) );
+      ForAll( element => element.InnerText( evaluator( element.InnerText() ) ) );
       return this;
     }

     public jQuery text( Func<int, string, string> evaluator )
     {
-      each( ( i, element) => element.InnerText( evaluator( i, element.InnerText() ) ) );
+      ForAll( ( element, i ) => element.InnerText( evaluator( i, element.InnerText() ) ) );
       return this;
     }

@@ -121,19 +121,19 @@

     public jQuery html( string html )
     {
-      each( element => element.InnerHtml( html ) );
+      ForAll( element => element.InnerHtml( html ) );
       return this;
     }

     public jQuery html( Func<string, string> evaluator )
     {
-      each( element => element.InnerHtml( evaluator( element.InnerHtml() ) ) );
+      ForAll( element => element.InnerHtml( evaluator( element.InnerHtml() ) ) );
       return this;
     }

     public jQuery html( Func<int, string, string> evaluator )
     {
-      each( ( i, element ) => element.InnerHtml( evaluator( i, element.InnerHtml() ) ) );
+      ForAll( ( element, i ) => element.InnerHtml( evaluator( i, element.InnerHtml() ) ) );
       return this;
     }

@@ -141,7 +141,7 @@

     public jQuery addClass( string className )
     {
-      return each( element => element.Style().AddClass( className ) );
+      return ForAll( element => element.Style().AddClass( className ) );
     }

     public jQuery addClass( Func<int, string, string> classEvaluator )
@@ -151,7 +151,7 @@

     public jQuery addClass( Func<int, IEnumerable<string>, IEnumerable<string>> classEvaluator )
     {
-      return each( ( i, e ) => classEvaluator( i, e.Style().Classes() ).ForAll( c => e.Style().AddClass( c ) ) );
+      return ForAll( ( e, i ) => classEvaluator( i, e.Style().Classes() ).ForAll( c => e.Style().AddClass( c ) ) );
     }

@@ -159,7 +159,7 @@

     public jQuery removeClass( string className )
     {
-      return each( element => element.Style().RemoveClass( className ) );
+      return ForAll( element => element.Style().RemoveClass( className ) );
     }

     public jQuery removeClass( Func<int, string, string> classEvaluator )
@@ -169,14 +169,14 @@

     public jQuery removeClass( Func<int, IEnumerable<string>, IEnumerable<string>> classEvaluator )
     {
-      return each( ( i, e ) => classEvaluator( i, e.Style().Classes() ).ForAll( c => e.Style().RemoveClass( c ) ) );
+      return ForAll( ( e, i ) => classEvaluator( i, e.Style().Classes() ).ForAll( c => e.Style().RemoveClass( c ) ) );
     }

     public jQuery toogleClass( string className )
     {
-      return each( element =>
+      return ForAll( element =>
         {

           lock ( element.SyncRoot )
@@ -224,12 +224,12 @@

     public jQuery css( string propertyName, string value )
     {
-      return each( e => e.Style().Set( propertyName, value ) );
+      return ForAll( e => e.Style().Set( propertyName, value ) );
     }

     public jQuery css( string propertyName, Func<int, string, string> evaluator )
     {
-      return each( ( i, e ) => e.Style().Set( propertyName, evaluator( i, e.Style().Get( propertyName ) ) ) );
+      return ForAll( ( e, i ) => e.Style().Set( propertyName, evaluator( i, e.Style().Get( propertyName ) ) ) );
     }

     public jQuery css( object map )
@@ -267,17 +267,23 @@

-
-    public jQuery each( Action<IHtmlElement> action )
+    public jQuery each( Action<int, IHtmlElement> action )
+    {
+      _elements.ForAll( ( e, i ) => action( i, e ) );
+      return this;
+    }
+
+
+
+    protected jQuery ForAll( Action<IHtmlElement> action )
     {
       _elements.ForAll( action );
       return this;
     }

-
-    public jQuery each( Action<int, IHtmlElement> action )
-    {
-      _elements.ForAll( ( element, index ) => action( index, element ) );
+    protected jQuery ForAll( Action<IHtmlElement, int> action )
+    {
+      _elements.ForAll( action );
       return this;
     }


Changed to install ScriptableObjectInstallers before MonoInstallers since it is common to include settings in ScriptableObjectInstallers (including settings for MonoInstallers)

--- UnityProject/Assets/Zenject/Source/Install/Contexts/Context.cs
+++ UnityProject/Assets/Zenject/Source/Install/Contexts/Context.cs
@@ -116,18 +116,32 @@
         {
             CheckInstallerPrefabTypes();

-            var newGameObjects = new List<GameObject>();
+            // Ideally we would just have one flat list of all the installers
+            // since that way the user has complete control over the order, but
+            // that's not possible since Unity does not allow serializing lists of interfaces
+            // (and it has to be an inteface since the scriptable object installers only share
+            // the interface)
+            //
+            // So the best we can do is have a hard-coded order in terms of the installer type
+            //
+            // The order is:
+            //      - Normal installers given directly via code
+            //      - ScriptableObject installers
+            //      - MonoInstallers in the scene
+            //      - Prefab Installers
+            //
+            // We put ScriptableObject installers before the MonoInstallers because
+            // ScriptableObjectInstallers are often used for settings (including settings
+            // that are injected into other installers like MonoInstallers)
+
             var allInstallers = _normalInstallers.Cast<IInstaller>()
-                .Concat(_installers.Cast<IInstaller>()).Concat(_scriptableObjectInstallers.Cast<IInstaller>()).ToList();
+                .Concat(_scriptableObjectInstallers.Cast<IInstaller>()).Concat(_installers.Cast<IInstaller>()).ToList();

             foreach (var installerPrefab in _installerPrefabs)
             {
                 Assert.IsNotNull(installerPrefab, "Found null installer prefab in '{0}'", this.GetType().Name());

                 var installerGameObject = GameObject.Instantiate(installerPrefab.gameObject);
-
-                newGameObjects.Add(installerGameObject);
-
                 installerGameObject.transform.SetParent(this.transform, false);
                 var installer = installerGameObject.GetComponent<MonoInstaller>();


fix when someone clicks save without a filename.

Also set initial file name

--- WalletWasabi.Gui/ManagedDialogs/ManagedFileChooserViewModel.cs
+++ WalletWasabi.Gui/ManagedDialogs/ManagedFileChooserViewModel.cs
@@ -142,6 +142,7 @@
 			{
 				_savingFile = true;
 				_defaultExtension = sfd.DefaultExtension;
+				FileName = sfd.InitialFileName;
 			}

 			Navigate(directory, (dialog as FileDialog)?.InitialFileName);
@@ -310,12 +311,15 @@
 			}
 			else if(_savingFile)
 			{
-				if(!Path.HasExtension(FileName) && !string.IsNullOrWhiteSpace(_defaultExtension))
-				{
-					FileName = Path.ChangeExtension(FileName, _defaultExtension);
-				}
-
-				CompleteRequested?.Invoke(new[] { Path.Combine(Location, FileName) });
+				if (!string.IsNullOrWhiteSpace(FileName))
+				{
+					if (!Path.HasExtension(FileName) && !string.IsNullOrWhiteSpace(_defaultExtension))
+					{
+						FileName = Path.ChangeExtension(FileName, _defaultExtension);
+					}
+
+					CompleteRequested?.Invoke(new[] { Path.Combine(Location, FileName) });
+				}
 			}
 			else
 			{


Remove leftover comment

Remove leftover comment

--- WalletWasabi.Gui/Tabs/WalletManager/GenerateWalletViewModel.cs
+++ WalletWasabi.Gui/Tabs/WalletManager/GenerateWalletViewModel.cs
@@ -70,7 +70,7 @@
 			{
 				try
 				{
-					PasswordHelper.Guard(Password); // Here we are not letting anything that will be autocorrected later. We need to generate the wallet exactly with the entered password bacause of compatibility.						Owner.CurrentView = new GenerateWalletSuccessViewModel(Owner, Password, walletFilePath, Global);
+					PasswordHelper.Guard(Password); // Here we are not letting anything that will be autocorrected later. We need to generate the wallet exactly with the entered password bacause of compatibility.

 					var km = KeyManager.CreateNew(out Mnemonic mnemonic, Password);
 					km.SetNetwork(Global.Network);


Keep backward serialization compatibility

--- WalletWasabi/JsonConverters/UnblindedSignatureJsonConverter.cs
+++ WalletWasabi/JsonConverters/UnblindedSignatureJsonConverter.cs
@@ -1,9 +1,9 @@
-using NBitcoin;
 using NBitcoin.BouncyCastle.Math;
-using NBitcoin.Crypto;
 using Newtonsoft.Json;
 using Newtonsoft.Json.Linq;
 using System;
+using System.Linq;
+using WalletWasabi.Crypto;

 namespace WalletWasabi.JsonConverters
 {
@@ -20,19 +20,30 @@
 		{
 			JArray arr = JArray.Load(reader);

-			string c = arr[0].Value<string>();
-			string s = arr[1].Value<string>();
+			var cs = new BigInteger(arr[0].Value<string>());
+			var ss = new BigInteger(arr[1].Value<string>());

-			return UnblindedSignature.Parse($"{c}{s}");
+			var carr = cs.ToByteArrayUnsigned();
+			var sarr = ss.ToByteArrayUnsigned();
+
+			carr = new byte[32 - carr.Length].Concat(carr).ToArray();
+			sarr = new byte[32 - sarr.Length].Concat(sarr).ToArray();
+			var signatureBytes = carr.Concat(sarr).ToArray();
+			var signature = ByteHelpers.ToHex(signatureBytes);
+
+			var sig = UnblindedSignature.Parse(signature);
+			return sig;
 		}

 		/// <inheritdoc />
 		public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
 		{
 			var signature = ((UnblindedSignature)value).ToString();
+			var c = new BigInteger(signature[..64], 16);
+			var s = new BigInteger(signature[64..], 16);
 			writer.WriteStartArray();
-			writer.WriteValue(signature[..64]);
-			writer.WriteValue(signature[64..]);
+			writer.WriteValue(c.ToString());
+			writer.WriteValue(s.ToString());
 			writer.WriteEndArray();
 		}
 	}


Fixed Problem with not able to Login after reconnect 1.3.2

--- 7DTDManager/7DTDManager/Manager.cs
+++ 7DTDManager/7DTDManager/Manager.cs
@@ -76,6 +76,8 @@
         void serverConnection_ConnectionStatusChanged(object sender, ConnectionStatusEventArgs status)
         {
             logger.Info("ConnectionStatus: {0}", status.ConnectionStatus.ToString());
+            if (status.ConnectionStatus == ConnectionStatus.DisconnectedByHost)
+                bIsFirst = true; // Make Sure login again
         }

         bool bIsFirst = true;