[Modify] Polish it

[Modify] Polish it

--- websocket-sharp/WebSocket.cs
+++ websocket-sharp/WebSocket.cs
@@ -862,20 +862,16 @@
     // As server
     private bool acceptHandshake ()
     {
-      _logger.Debug (
-        String.Format (
-          "A handshake request from {0}:\n{1}", _context.UserEndPoint, _context
-        )
-      );
-
-      string msg;
+      var fmt = "A handshake request from {0}:\n{1}";
+      var msg = String.Format (fmt, _context.UserEndPoint, _context);
+
+      _logger.Debug (msg);
+
       if (!checkHandshakeRequest (_context, out msg)) {
         _logger.Error (msg);

-        refuseHandshake (
-          CloseStatusCode.ProtocolError,
-          "A handshake error has occurred while attempting to accept."
-        );
+        var reason = "A handshake error has occurred while attempting to accept.";
+        refuseHandshake (CloseStatusCode.ProtocolError, reason);

         return false;
       }
@@ -883,10 +879,8 @@
       if (!customCheckHandshakeRequest (_context, out msg)) {
         _logger.Error (msg);

-        refuseHandshake (
-          CloseStatusCode.PolicyViolation,
-          "A handshake error has occurred while attempting to accept."
-        );
+        var reason = "A handshake error has occurred while attempting to accept.";
+        refuseHandshake (CloseStatusCode.PolicyViolation, reason);

         return false;
       }
@@ -895,15 +889,19 @@

       if (_protocol != null) {
         var vals = _context.SecWebSocketProtocols;
+
         processSecWebSocketProtocolClientHeader (vals);
       }

       if (!_ignoreExtensions) {
         var val = _context.Headers["Sec-WebSocket-Extensions"];
+
         processSecWebSocketExtensionsClientHeader (val);
       }

-      return sendHttpResponse (createHandshakeResponse ());
+      var res = createHandshakeResponse ();
+
+      return sendHttpResponse (res);
     }

     private bool canSet (out string message)


Usability

Usability

--- ILK-Protokoll/Views/Decisions/_DetailedTable.cshtml
+++ ILK-Protokoll/Views/Decisions/_DetailedTable.cshtml
@@ -19,7 +19,6 @@

 				@Html.DisplayNameFor(model => model.Text)

-

@@ -33,7 +32,12 @@
 					@Html.DisplayFor(modelItem => item.Report.End)

-					@Html.DisplayFor(modelItem => item.OriginTopic.Title)
+

+
+							@Html.DisplayFor(modelItem => item.OriginTopic.Title)
+
+
+

 				@{
 					var pushtargets = item.OriginTopic.PushTargets.Select(pt => pt.Confirmed).ToList();
@@ -44,10 +48,12 @@
 					@(confirmed) / @pushtargets.Count

-					@item.Text.Shorten(200)
-
-
-					@Html.ActionLink("Diskussion", "Details", "Topics", new {id = item.OriginTopic.ID}, null)
+

+
+							@item.Text.Shorten(200)
+
+
+

 		}


Added updater funcs to .ctor for inmemory cache

--- JB.Common.Reactive.Cache/ObservableInMemoryCache.cs
+++ JB.Common.Reactive.Cache/ObservableInMemoryCache.cs
@@ -77,20 +77,43 @@
         protected IEqualityComparer<TValue> ValueComparer { get; }

         /// <summary>
+        /// Gets the single key updater.
+        /// </summary>
+        /// <value>
+        /// The single key updater.
+        /// </value>
+        protected Func<TKey, TValue> SingleKeyUpdater { get; }
+
+        /// <summary>
+        /// Gets the multiple keys updater.
+        /// </summary>
+        /// <value>
+        /// The multiple keys updater.
+        /// </value>
+        protected Func<IEnumerable<TKey>, IEnumerable<KeyValuePair<TKey, TValue>>> MultipleKeysUpdater { get; }
+
+        /// <summary>
         /// Initializes a new instance of the <see cref="T:ObservableInMemoryCache" />.
         /// </summary>
         /// <param name="keyComparer">The <see cref="IEqualityComparer{T}" /> implementation to use when comparing keys.</param>
         /// <param name="valueComparer">The <see cref="IEqualityComparer{T}" /> implementation to use when comparing values.</param>
         /// <param name="scheduler">The scheduler to to send out observer messages & raise events on. If none is provided <see cref="System.Reactive.Concurrency.Scheduler.CurrentThread"/> will be used.</param>
+        /// <param name="singleKeyUpdater">The action that will be invoked whenever a single key has expired and has his expiration type set to <see cref="ObservableCacheExpirationType.Update"/>.</param>
+        /// <param name="multipleKeysUpdater">The action that will be invoked whenever multiple keys have expired and had their expiration type set to <see cref="ObservableCacheExpirationType.Update"/>.</param>
         public ObservableInMemoryCache(
             IEqualityComparer<TKey> keyComparer = null,
             IEqualityComparer<TValue> valueComparer = null,
+            Func<TKey, TValue> singleKeyUpdater = null,
+            Func<IEnumerable<TKey>, IEnumerable<KeyValuePair<TKey, TValue>>> multipleKeysUpdater = null,
             IScheduler scheduler = null)
         {
             Scheduler = scheduler ?? System.Reactive.Concurrency.Scheduler.CurrentThread;

             KeyComparer = keyComparer ?? EqualityComparer<TKey>.Default;
             ValueComparer = valueComparer ?? EqualityComparer<TValue>.Default;
+
+            SingleKeyUpdater = singleKeyUpdater;
+            MultipleKeysUpdater = multipleKeysUpdater;

             InnerDictionary = new ObservableDictionary<TKey, ObservableCachedElement<TKey, TValue>>(
                 keyComparer: KeyComparer,


Invoke uses the new PreservedException class so that its innermost try/catch blocks no longer work with ExceptionList objects directly.

--- src/Fixie/Behaviors/Invoke.cs
+++ src/Fixie/Behaviors/Invoke.cs
@@ -30,7 +30,7 @@
                 }
                 catch (TargetInvocationException ex)
                 {
-                    exceptions.Add(ex.InnerException);
+                    throw new PreservedException(ex.InnerException);
                 }

                 if (invokeReturned && isDeclaredAsync)
@@ -42,9 +42,13 @@
                     }
                     catch (AggregateException ex)
                     {
-                        exceptions.Add(ex.InnerExceptions.First());
+                        throw new PreservedException(ex.InnerExceptions.First());
                     }
                 }
+            }
+            catch (PreservedException preservedException)
+            {
+                exceptions.Add(preservedException.OriginalException);
             }
             catch (Exception ex)
             {


cleanup and fixed.. resharper adds c# 6 thingies :S

--- src/Histrio/MailBoxArbiter.cs
+++ src/Histrio/MailBoxArbiter.cs
@@ -1,39 +0,0 @@
-using System;
-using System.Collections.Concurrent;
-using System.Threading.Tasks;
-
-namespace Histrio
-{
-    internal sealed class MailboxArbiter : IArbiter
-    {
-        public MailboxArbiter(MailBox mailBox)
-        {
-            MailBox = new BlockingCollection<IMessage>();
-            new TaskFactory(TaskCreationOptions.LongRunning, TaskContinuationOptions.None)
-                .StartNew(() =>
-                {
-                    var messages = mailBox.Messages;
-                    foreach (var message in messages.GetConsumingEnumerable())
-                    {
-                        MailBox.Add(message);
-                    }
-                });
-        }
-
-        public BlockingCollection<IMessage> MailBox { get; }
-
-        public void Dispose()
-        {
-            Dispose(true);
-            GC.SuppressFinalize(this);
-        }
-
-        private void Dispose(bool disposing)
-        {
-            if (disposing)
-            {
-                MailBox.Dispose();
-            }
-        }
-    }
-}


dqm requests

dqm requests

(TFS CS 5702)

--- Signum.Windows.Extensions/Reports/CompositeReportGenerator.cs
+++ Signum.Windows.Extensions/Reports/CompositeReportGenerator.cs
@@ -50,7 +50,7 @@
                     File.WriteAllBytes(filename, er.File.BinaryFile);

                     // pedimos la consulta y traemos los datos
-                    ResultTable queryResult = Server.Return((IDynamicQueryServer s) => s.GetQueryResult(QueryClient.GetQueryName(er.Query.Key), null, null, null, null));
+                    ResultTable queryResult = Server.Return((IDynamicQueryServer s) => s.ExecuteQuery(new QueryRequest { QueryName = QueryClient.GetQueryName(er.Query.Key) }));
                     ExcelGenerator.WriteDataInExcelFile(queryResult, filename);
                     filename = "";


spaces

spaces

--- src/MarkovProcess/MainForm.cs
+++ src/MarkovProcess/MainForm.cs
@@ -70,17 +70,21 @@
                 Matr = new double[MatrixSize, MatrixSize];
                 FinalProbs = new double[MatrixSize];

+                ClearMatrix(Matr, MatrixSize, MatrixSize);
+                ClearArray(FinalProbs);
+
                 for (int i = 0; i < MatrixSize - 1; ++i)
                 {
-                    FinalProbs[i] = 0;
                     for (int j = 0; j < MatrixSize; ++j)
-                    {
                         Matr[i, i] -= GetCellValue(i, j);
-                        Matr[MatrixSize - 1, j] = 1;
-                    }
-                    for (int k = 0; k < MatrixSize; ++k)
-                        Matr[i, k] += GetCellValue(k, i);
+
+                    for (int j = 0; j < MatrixSize; ++j)
+                        Matr[i, j] += GetCellValue(j, i);
                 }
+
+                for (int i = 0; i < MatrixSize; ++i)
+                    Matr[MatrixSize - 1, i] = 1;
+
                 FinalProbs[MatrixSize - 1] = 1;

                 Gauss gauss = new Gauss(Matr, FinalProbs, MatrixSize);
@@ -103,6 +107,19 @@
             }
         }

+        private void ClearMatrix(double[,] matrix, int rowCount, int colCount)
+        {
+            for (int i = 0; i < rowCount; ++i)
+                for (int j = 0; j < colCount; ++j)
+                    matrix[i, j] = 0;
+        }
+
+        private void ClearArray(double[] array)
+        {
+            for (int i = 0; i < array.Length; ++i)
+                array[i] = 0;
+        }
+
         private void btnClear_Click(object sender, EventArgs e)
         {
             for (int j = 0; j < tblCDS.ColumnCount; ++j)


coverage

coverage

--- King.Service.ServiceBus.Unit.Tests/BusQueueTests.cs
+++ King.Service.ServiceBus.Unit.Tests/BusQueueTests.cs
@@ -10,19 +10,18 @@
     [TestFixture]
     public class BusQueueTests
     {
+        const string connection = "Endpoint=sb://test.servicebus.windows.net;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=[your secret]";
         [Test]
         public void Constructor()
         {
-            var fake = "Endpoint=sb://test.servicebus.windows.net;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=[your secret]";
-            new BusQueue(Guid.NewGuid().ToString(), fake);
+            new BusQueue(Guid.NewGuid().ToString(), connection);
         }

         [Test]
         [ExpectedException(typeof(ArgumentException))]
         public void ConstructorNameNull()
         {
-            var fake = "Endpoint=sb://test.servicebus.windows.net;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=[your secret]";
-            new BusQueue(null, fake);
+            new BusQueue(null, connection);
         }

         [Test]
@@ -36,8 +35,7 @@
         [ExpectedException(typeof(ArgumentNullException))]
         public async Task SaveObjectNull()
         {
-            var fake = "Endpoint=sb://test.servicebus.windows.net;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=[your secret]";
-            var queue = new BusQueue(Guid.NewGuid().ToString(), fake);
+            var queue = new BusQueue(Guid.NewGuid().ToString(), connection);
             await queue.Save((object)null);
         }

@@ -45,8 +43,7 @@
         [ExpectedException(typeof(ArgumentNullException))]
         public async Task SaveBrokeredMessageNull()
         {
-            var fake = "Endpoint=sb://test.servicebus.windows.net;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=[your secret]";
-            var queue = new BusQueue(Guid.NewGuid().ToString(), fake);
+            var queue = new BusQueue(Guid.NewGuid().ToString(), connection);
             await queue.Save((BrokeredMessage)null);
         }

@@ -54,8 +51,7 @@
         [ExpectedException(typeof(ArgumentNullException))]
         public void RegisterForEventsCallbackNull()
         {
-            var fake = "Endpoint=sb://test.servicebus.windows.net;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=[your secret]";
-            var queue = new BusQueue(Guid.NewGuid().ToString(), fake);
+            var queue = new BusQueue(Guid.NewGuid().ToString(), connection);
             queue.RegisterForEvents(null, new OnMessageOptions());
         }

@@ -63,8 +59,7 @@
         [ExpectedException(typeof(ArgumentNullException))]
         public void RegisterForEventsOptionsNull()
         {
-            var fake = "Endpoint=sb://test.servicebus.windows.net;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=[your secret]";
-            var queue = new BusQueue(Guid.NewGuid().ToString(), fake);
+            var queue = new BusQueue(Guid.NewGuid().ToString(), connection);
             queue.RegisterForEvents(this.OnMessageArrived, null);
         }


#1644 Inject HttpClient to HttpProxy instance

--- Source/Csla.Shared/DataPortalClient/DataPortalProxyFactory.cs
+++ Source/Csla.Shared/DataPortalClient/DataPortalProxyFactory.cs
@@ -66,7 +66,20 @@
       if (provider == null)
         return (IDataPortalProxy)MethodCaller.CreateInstance(_proxyType);
       else
-        return (IDataPortalProxy)Microsoft.Extensions.DependencyInjection.ActivatorUtilities.CreateInstance(provider, _proxyType);
+      {
+        if (_proxyType.Equals(typeof(HttpProxy)))
+        {
+          var httpClient = ApplicationContext.ScopedServiceProvider.GetService(typeof(System.Net.Http.HttpClient));
+          if (httpClient == null)
+            return (IDataPortalProxy)MethodCaller.CreateInstance(_proxyType);
+          else
+            return (IDataPortalProxy)MethodCaller.CreateInstance(_proxyType, httpClient);
+        }
+        else
+        {
+          return (IDataPortalProxy)Microsoft.Extensions.DependencyInjection.ActivatorUtilities.CreateInstance(provider, _proxyType);
+        }
+      }
 #else
       return (IDataPortalProxy)MethodCaller.CreateInstance(_proxyType);
 #endif


Files view- support changing folder

Files view- support changing folder

--- Source/Editor/AGS.Editor/Components/FileSelector/FilesView.cs
+++ Source/Editor/AGS.Editor/Components/FileSelector/FilesView.cs
@@ -71,6 +71,11 @@
             var invWindow = _invWindow;
             if (folder == null || invWindow == null) return;
             var files = await Task.Run(() => _files.GetFiles(folder));
+            foreach (var item in invWindow.Inventory.Items)
+            {
+                item.Graphics?.DestroyWithChildren();
+            }
+            invWindow.Inventory.Items.Clear();
             foreach (var file in files)
             {
                 IObject graphics = await getGraphics(file);


GSF.TimeSeries: Improved the performance of RuntimeID lookups in the SignalIndexCache.

git-tfs-id: [https://tfs.codeplex.com/tfs/TFS07]$/gsf/Main;C90141

--- Source/Libraries/GSF.TimeSeries/Transport/SignalIndexCache.cs
+++ Source/Libraries/GSF.TimeSeries/Transport/SignalIndexCache.cs
@@ -59,7 +59,7 @@
         private Guid[] m_unauthorizedSignalIDs;

         [NonSerialized] // SignalID reverse lookup runtime cache (used to speed deserialization)
-        private readonly ConcurrentDictionary<Guid, ushort> m_signalIDCache;
+        private Dictionary<Guid, ushort> m_signalIDCache;

         [NonSerialized]
         private Encoding m_encoding;
@@ -74,7 +74,7 @@
         public SignalIndexCache()
         {
             m_reference = new ConcurrentDictionary<ushort, Tuple<Guid, string, uint>>();
-            m_signalIDCache = new ConcurrentDictionary<Guid, ushort>();
+            m_signalIDCache = new Dictionary<Guid, ushort>();
         }

         /// <summary>
@@ -145,8 +145,10 @@
             }
             set
             {
-                m_signalIDCache.Clear();
+                Dictionary<Guid, ushort> signalIDCache = value.ToDictionary(pair => pair.Value.Item1, pair => pair.Key);
+
                 m_reference = value;
+                m_signalIDCache = signalIDCache;
             }
         }

@@ -253,21 +255,7 @@
             ushort index;

             if (!m_signalIDCache.TryGetValue(signalID, out index))
-            {
-                index = ushort.MaxValue;
-
-                foreach (KeyValuePair<ushort, Tuple<Guid, string, uint>> item in m_reference)
-                {
-                    if (item.Value.Item1 == signalID)
-                    {
-                        index = item.Key;
-                        break;
-                    }
-                }
-
-                if (index != ushort.MaxValue)
-                    m_signalIDCache.TryAdd(signalID, index);
-            }
+                return ushort.MaxValue;

             return index;
         }


:bug: Fix HTML parsing

:bug: Fix HTML parsing

--- Source/Orion.UWP/Converters/TextToBlockCollectionConverter.cs
+++ Source/Orion.UWP/Converters/TextToBlockCollectionConverter.cs
@@ -16,6 +16,7 @@
     internal class TextToBlockCollectionConverter : IValueConverter
     {
         private static readonly string HtmlTags = string.Join("|", "a", "p", "span", "strong");
+        private readonly Regex _newLineRegex = new Regex(@"<br(\s)?/>", RegexOptions.Compiled);
         private readonly Regex _tagRegex = new Regex($@"<[{HtmlTags}]( .*)?>.*?</[{HtmlTags}]>", RegexOptions.Compiled);
         private readonly Regex _tcoRegex = new Regex("<tco disp=\"(?<display_url>.*?)\">(?<original_url>.*?)</tco>", RegexOptions.Compiled);

@@ -35,7 +36,7 @@
         {
             var text = value;
             // Is HTML?
-            if (_tagRegex.IsMatch(value) || value.Contains("br"))
+            if (_tagRegex.IsMatch(value) || _newLineRegex.IsMatch(value))
                 text = FlattenHtmlText(value);

             text = text.Replace("\n", Environment.NewLine);


Breaking change: Extension method renamed from CleanValues to ClearValues.

--- Sources/Linq2Acad/Extensions/AttributeCollectionExtensions.cs
+++ Sources/Linq2Acad/Extensions/AttributeCollectionExtensions.cs
@@ -47,11 +47,11 @@
       attribute.TextString = value;
     }

-    public static void CleanValues(this AttributeCollection attributes)
     /// <summary>
     /// Resets the values of all AttributeReferences in the AttributeCollection.
     /// </summary>
     /// <param name="attributes">The AttributeCollection.</param>
+    public static void ClearValues(this AttributeCollection attributes)
     {
       GetAttributeReferences(attributes, OpenMode.ForWrite)
         .ForEach(ar => ar.TextString = "");


refactor

refactor

--- Stove.EntityFramework/EntityFramework/DbContextTypeMatcher.cs
+++ Stove.EntityFramework/EntityFramework/DbContextTypeMatcher.cs
@@ -28,6 +28,10 @@
             _dbContextTypes = new Dictionary<Type, List<Type>>();
         }

+        /// <summary>
+        ///     Populates the specified database context types.
+        /// </summary>
+        /// <param name="dbContextTypes">The database context types.</param>
         public void Populate(Type[] dbContextTypes)
         {
             foreach (Type dbContextType in dbContextTypes)
@@ -44,11 +48,17 @@
         }

         //TODO: GetConcreteType method can be optimized by extracting/caching MultiTenancySideAttribute attributes for DbContexes.
-
+        /// <summary>
+        ///     Gets the type of the concrete.
+        /// </summary>
+        /// <param name="sourceDbContextType">Type of the source database context.</param>
+        /// <returns></returns>
+        /// <exception cref="StoveException">
+        ///     Could not find a concrete implementation of given DbContext type: " +
+        ///     sourceDbContextType.AssemblyQualifiedName
+        /// </exception>
         public virtual Type GetConcreteType(Type sourceDbContextType)
         {
-            //TODO: This can also get MultiTenancySide to filter dbcontexes
-
             if (!sourceDbContextType.IsAbstract)
             {
                 return sourceDbContextType;


add page param

add page param

--- Terradue.Tep/Terradue/Tep/WebServer/News/Discourse.Service.cs
+++ Terradue.Tep/Terradue/Tep/WebServer/News/Discourse.Service.cs
@@ -12,7 +12,7 @@
     public class DiscourseServiceTep : ServiceStack.ServiceInterface.Service {

         public object Get(GetDiscourseTopicsPerCategory request){
-            return GetDiscourseRequest(string.Format("c/{0}.json", request.catId));
+            return GetDiscourseRequest(string.Format("c/{0}.json?page={1}", request.catId, request.page));
         }

         public object Get(GetDiscourseLatestTopicsPerCategory request){
@@ -47,6 +47,9 @@
     public class GetDiscourseTopicsPerCategory {
         [ApiMember(Name="catId", Description = "request", ParameterType = "query", DataType = "int", IsRequired = true)]
         public int catId{ get; set; }
+
+        [ApiMember(Name="page", Description = "request", ParameterType = "query", DataType = "int", IsRequired = false)]
+        public int page{ get; set; }
     }

     [Route("/discourse/t/{topicId}", "GET", Summary = "", Notes = "")]


stupid debug

stupid debug

--- game/Assets/scripts/PlayerShooting.cs
+++ game/Assets/scripts/PlayerShooting.cs
@@ -45,7 +45,6 @@
 		Physics.Raycast (Camera.main.transform.position, Camera.main.transform.forward, out hit, 1000000, FinalMask);

 		Transform hitTransform = hit.transform;
-		Debug.Log ("You hit: " + hit.transform);

 		if (hitTransform != null && hitTransform.tag == "Level Part") {
 			Instantiate(decalHitWall,  hit.point +


Simplify

Simplify

--- src/Features/LanguageServer/Protocol/Handler/Diagnostics/DiagnosticSources/AbstractDocumentDiagnosticSource.cs
+++ src/Features/LanguageServer/Protocol/Handler/Diagnostics/DiagnosticSources/AbstractDocumentDiagnosticSource.cs
@@ -87,7 +87,7 @@
                 originalStartColumn: comment.Span.StartLinePosition.Character,
                 originalEndLine: comment.Span.EndLinePosition.Line,
                 originalEndColumn: comment.Span.EndLinePosition.Character,
-                mappedFilePath: comment.MappedSpan.HasMappedPath ? comment.MappedSpan.Path : null,
+                mappedFilePath: comment.MappedSpan.GetMappedFilePathIfExist(),
                 mappedStartLine: comment.MappedSpan.StartLinePosition.Line,
                 mappedStartColumn: comment.MappedSpan.StartLinePosition.Character,
                 mappedEndLine: comment.MappedSpan.EndLinePosition.Line,


Revise filter

Revise filter

--- Library/Providers/FileSystem/FileSystemContainer.cs
+++ Library/Providers/FileSystem/FileSystemContainer.cs
@@ -159,10 +159,11 @@
 					containers = new List<ILibraryContainerLink>();
 				}

-				var matchedFiles = (filter == "") ? nonZipFiles : nonZipFiles.Where(filePath =>
+				var matchedFiles = nonZipFiles.Where(filePath =>
 				{
 					string fileName = Path.GetFileName(filePath);
-					return FileNameContainsFilter(filePath, filter)
+
+					return (filter == "" || FileNameContainsFilter(filePath, filter))
 						&& ApplicationController.Instance.Library.IsContentFileType(fileName);
 				});


resolve env from the DI container in static context

--- src/OmniSharp.Host/Startup.cs
+++ src/OmniSharp.Host/Startup.cs
@@ -74,7 +74,7 @@
             services.Configure<OmniSharpOptions>(Configuration);
         }

-        public CompositionHost ConfigureMef(
+        public static CompositionHost ConfigureMef(
             IServiceProvider serviceProvider,
             OmniSharpOptions options,
             IEnumerable<Assembly> assemblies)
@@ -91,6 +91,7 @@

             var memoryCache = serviceProvider.GetService<IMemoryCache>();
             var loggerFactory = serviceProvider.GetService<ILoggerFactory>();
+            var env = serviceProvider.GetService<IOmniSharpEnvironment>();
             var writer = serviceProvider.GetService<ISharedTextWriter>();
             var applicationLifetime = serviceProvider.GetService<IApplicationLifetime>();
             var loader = serviceProvider.GetService<IAssemblyLoader>();
@@ -100,7 +101,7 @@
                 .WithProvider(MefValueProvider.From<IFileSystemWatcher>(new ManualFileSystemWatcher()))
                 .WithProvider(MefValueProvider.From(memoryCache))
                 .WithProvider(MefValueProvider.From(loggerFactory))
-                .WithProvider(MefValueProvider.From(_omniSharpEnvironment))
+                .WithProvider(MefValueProvider.From(env))
                 .WithProvider(MefValueProvider.From(writer))
                 .WithProvider(MefValueProvider.From(applicationLifetime))
                 .WithProvider(MefValueProvider.From(options))
@@ -108,7 +109,7 @@
                 .WithProvider(MefValueProvider.From(loader))
                 .WithProvider(MefValueProvider.From(new MetadataHelper(loader))); // other way to do singleton and autowire?

-            if (_omniSharpEnvironment.TransportType == TransportType.Stdio)
+            if (env.TransportType == TransportType.Stdio)
             {
                 config = config
                     .WithProvider(MefValueProvider.From<IEventEmitter>(new StdioEventEmitter(writer)));


remove support for date time as route segment

--- LiteApi/LiteApi.Tests/RouteParametersInvokeTests.cs
+++ LiteApi/LiteApi.Tests/RouteParametersInvokeTests.cs
@@ -93,11 +93,11 @@
             await AssertCanInvokeActionWithRouteParamOfType<double>();
         }

-        [Fact]
-        public async Task Action_WithRouteParameterOfTypeDateTime_CanBeInvoked()
-        {
-            await AssertCanInvokeActionWithRouteParamOfType<DateTime>();
-        }
+        //[Fact]
+        //public async Task Action_WithRouteParameterOfTypeDateTime_CanBeInvoked()
+        //{
+        //    await AssertCanInvokeActionWithRouteParamOfType<DateTime>();
+        //}

         [Fact]
         public async Task Action_WithRouteParameterOfTypeGuid_CanBeInvoked()


Hotend controls should consider printing status

- Issue MatterHackers/MCCentral#4330
Hot end controls should be disabled while printing

--- MatterControlLib/ActionBar/TemperatureWidgetBase.cs
+++ MatterControlLib/ActionBar/TemperatureWidgetBase.cs
@@ -113,7 +113,7 @@

 			printer.Connection.CommunicationStateChanged.RegisterEvent((s, e) =>
 			{
-				enableControls();
+				this.EnableControls();
 			}, ref unregisterEvents);

 			foreach (var child in this.Children)
@@ -148,7 +148,7 @@

 		public override void OnLoad(EventArgs args)
 		{
-			enableControls();
+			this.EnableControls();

 			base.OnLoad(args);
 		}
@@ -161,11 +161,11 @@

 		bool? isEnabled = null;

-		private void enableControls()
+		private void EnableControls()
 		{
-			if (isEnabled != printer.Connection.IsConnected)
+			if (isEnabled != printer.Connection.IsConnected && !printer.Connection.PrinterIsPrinting)
 			{
-				isEnabled = printer.Connection.IsConnected;
+				isEnabled = printer.Connection.IsConnected && !printer.Connection.PrinterIsPrinting;

 				var flowLayout = this.PopupContent.Children.OfType<FlowLayoutWidget>().FirstOrDefault();
 				if (flowLayout != null)


Don't collapse tree of existing selection

--- MatterControlLib/CustomWidgets/TreeView/TreeView.cs
+++ MatterControlLib/CustomWidgets/TreeView/TreeView.cs
@@ -210,17 +210,6 @@
 				{
 					OnBeforeSelect(null);

-					if (_selectedNode != null)
-					{
-						// Collapse the old tree
-						foreach (var ancestor in _selectedNode.Parents<TreeNode>())
-						{
-							ancestor.Expanded = false;
-						}
-
-						_selectedNode.Expanded = false;
-					}
-
 					// if the current selection (before change) is !null than clear its background color
 					if (_selectedNode != null)
 					{


Move SyncingPrinters page to CloudLibrary

--- MatterControlLib/SetupWizard/SyncingPrintersPage.cs
+++ MatterControlLib/SetupWizard/SyncingPrintersPage.cs
@@ -1,55 +0,0 @@
-using MatterHackers.Localizations;
-using MatterHackers.Agg.UI;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using MatterHackers.MatterControl.SlicerConfiguration;
-using MatterHackers.MatterControl.CustomWidgets;
-using MatterHackers.MatterControl.PrinterControls.PrinterConnections;
-using MatterHackers.Agg;
-
-namespace MatterHackers.MatterControl.SetupWizard
-{
-	public class SyncingPrintersPage: DialogPage
-	{
-		TextWidget syncingDetails;
-		public SyncingPrintersPage()
-			: base("Close".Localize())
-		{
-			this.WindowTitle = "Sync Printer Profiles Page".Localize();
-
-			TextWidget syncingText = new TextWidget("Syncing Profiles...".Localize(),textColor: ActiveTheme.Instance.PrimaryTextColor);
-			syncingDetails = new TextWidget("Retrieving sync information...".Localize(), textColor: ActiveTheme.Instance.PrimaryTextColor, pointSize:10);
-			syncingDetails.AutoExpandBoundsToText = true;
-			contentRow.AddChild(syncingText);
-			contentRow.AddChild(syncingDetails);
-			Progress<ProgressStatus> progress = new Progress<ProgressStatus>(ReportProgress);
-
-			ApplicationController.SyncPrinterProfiles("SyncingPrintersPage.ctor()", progress).ContinueWith((task) =>
-			{
-				if (ProfileManager.Instance.ActiveProfiles.Count() == 1)
-				{
-					// TODO: Investigate what this was doing and re-implement
-					//ActiveSliceSettings.ShowComPortConnectionHelp();
-
-					//Set as active printer
-					ProfileManager.SwitchToProfile(ProfileManager.Instance.ActiveProfiles.First().ID).ConfigureAwait(false);
-
-					// only close the window if we are not switching to the setup printer form
-					UiThread.RunOnIdle(DialogWindow.Close);
-				}
-				else // multiple printers - close the window
-				{
-					UiThread.RunOnIdle(DialogWindow.Close);
-				}
-			});
-		}
-
-		private void ReportProgress(ProgressStatus report)
-		{
-			syncingDetails.Text = report.Status;
-		}
-	}
-}


Solved "05. A Miner Task"

Solved "05. A Miner Task"


- adding comments and correcting errors in shortestpathfunc

git-tfs-id: [http://tfs2010.sones:8080/tfs/sones]$/Experimental/IGraphFSReDesign;C2710

--- Plugins/GraphQL/SonesGQL/Functions/GraphAlgorithms/ShortestPathAlgorithms/BreathFirstSearch/BidirectionalBFS.cs
+++ Plugins/GraphQL/SonesGQL/Functions/GraphAlgorithms/ShortestPathAlgorithms/BreathFirstSearch/BidirectionalBFS.cs
@@ -12,7 +12,6 @@
         /// Please look at the class documentation for detailed description how this algorithm works.
         /// </summary>
         /// <param name="myTypeAttribute">The Attribute representing the edge to follow (p.e. "Friends")</param>
-        /// <param name="myDBContext">The DBContext holds the TypeManager and the ObjectCache</param>
         /// <param name="myStart">The start node</param>
         /// <param name="myEnd">The end node</param>
         /// <param name="shortestOnly">true, if only shortest path shall be found</param>
@@ -124,64 +123,8 @@
                 if (((queueLeft.Count > 0) && (queueRight.Count > 0)) && ((depthLeft <= maxDepthLeft) && (depthRight <= maxDepthRight)))
                 {
                     #region check if there is a dummyNode at the beginning of a queue
-                    //first of both queues are dummies
-                    if ((queueLeft.First<IVertex>() == null) && (queueRight.First<IVertex>() == null))
-                    {
-                        //if maxDepth of a side is reached and there is a dummy, one level is totaly searched
-                        if (depthLeft == maxDepthLeft && depthRight == maxDepthRight)
-                        {
-                            depthLeft++;
-                            depthRight++;
-
-                            continue;
-                        }
-                        else if (depthLeft == maxDepthLeft)
-                        {
-                            depthLeft++;
-
-                            continue;
-                        }
-                        else if (depthRight == maxDepthRight)
-                        {
-                            depthRight++;
-
-                            continue;
-                        }
-
-                        //dequeue dummies
-                        queueLeft.Dequeue();
-                        queueRight.Dequeue();
-
-                        //increase depth's
-                        depthLeft++;
-                        depthRight++;
-
-                        //if both queues are empty -> break loop
-                        if (queueLeft.Count == 0 && queueRight.Count == 0)
-                        {
-                            break;
-                        }
-                        //if left queue is empty enqueue right dummy and continue
-                        else if (queueLeft.Count == 0)
-                        {
-                            queueRight.Enqueue(dummyRight);
-                            continue;
-                        }
-                        //if right queue is empty enqueue left dummy and continue
-                        else if (queueRight.Count == 0)
-                        {
-                            queueLeft.Enqueue(dummyLeft);
-                            continue;
-                        }
-                        //enqueue both dummies
-                        else
-                        {
-                            queueLeft.Enqueue(dummyLeft);
-                            queueRight.Enqueue(dummyRight);
-                        }
-                    }
                     //first of left queue is a dummy
-                    else if (queueLeft.First<IVertex>() == null)
+                    if (queueLeft.First<IVertex>() == null)
                     {
                         //if maxDepth of a side is reached and there is a dummy, one level is totaly searched
                         if (depthLeft == maxDepthLeft)
@@ -208,8 +151,9 @@
                             queueLeft.Enqueue(dummyLeft);
                         }
                     }
+
                     //first of right queue is a dummy
-                    else if (queueRight.First<IVertex>() == null)
+                    if (queueRight.First<IVertex>() == null)
                     {
                         //if maxDepth of a side is reached and there is a dummy, one level is totaly searched
                         if (depthRight == maxDepthRight)
@@ -1253,6 +1197,7 @@
                 #endregion abort loop
             }

+            //get result paths
             #region start TargetAnalyzer
             if (shortestOnly && findAll)
             {


Updated pool demo to include instructions on how to restart the demo.

--- Demos/AdvancedSamplesXNA/Demos/Demo2/Demo2Screen.cs
+++ Demos/AdvancedSamplesXNA/Demos/Demo2/Demo2Screen.cs
@@ -65,7 +65,7 @@
         {
             _border.Load(ScreenManager.GraphicsDevice, PhysicsSimulator);

-            _panelTexture = DrawingHelper.CreateRectangleTexture(ScreenManager.GraphicsDevice, 250, 100, new Color(0, 0, 0, 155));
+            _panelTexture = DrawingHelper.CreateRectangleTexture(ScreenManager.GraphicsDevice, 290, 100, new Color(0, 0, 0, 155));

             base.LoadContent();
         }
@@ -157,7 +157,7 @@

             ScreenManager.SpriteBatch.DrawString(ScreenManager.SpriteFonts.DiagnosticSpriteFont, "Ticks per ball creation: " + _stopWatch.ElapsedTicks, _timerPosition, Color.White);
             ScreenManager.SpriteBatch.DrawString(ScreenManager.SpriteFonts.DiagnosticSpriteFont, "Current number of balls: " + _ballsToDraw.Count, _ballCountPosition, Color.White);
-            ScreenManager.SpriteBatch.DrawString(ScreenManager.SpriteFonts.DiagnosticSpriteFont, "Using pool: " + _usePool, _poolEnabledPosition, Color.White);
+            ScreenManager.SpriteBatch.DrawString(ScreenManager.SpriteFonts.DiagnosticSpriteFont, "Using pool: " + _usePool + " (press R to toggle)", _poolEnabledPosition, Color.White);

             _border.Draw(ScreenManager.SpriteBatch);


fjernet død kode

fjernet død kode

--- Difi.SikkerDigitalPost.Klient.Tester/ArkivTester.cs
+++ Difi.SikkerDigitalPost.Klient.Tester/ArkivTester.cs
@@ -25,13 +25,7 @@
     {
         public TestContext TestContext { get; set; }

-        [ClassInitialize]
-        public static void ClassInitialize(TestContext context)
-        {
-            //Overkjør arkiv i Base for å bruke et sertifikat vi har privatekey til.
-            //DigitalPostMottaker.Sertifikat = Mottakersertifikat();
-        }
-
+
         [TestMethod]
         public void LeggFilerTilDokumentpakkeAntallStemmer()
         {
@@ -76,14 +70,5 @@
             dokumentpakke.LeggTilVedlegg(new Dokument("DokumentSomHoveddokument", new byte[] { 0x00 }, "text/plain", "NO", dokumentpakke.Hoveddokument.Filnavn));
         }

-        private static X509Certificate2 Mottakersertifikat()
-        {
-            var storeMy = new X509Store(StoreName.My, StoreLocation.CurrentUser);
-            storeMy.Open(OpenFlags.ReadOnly);
-            var sertifikat = storeMy.Certificates[0];
-            storeMy.Close();
-            return sertifikat;
-        }
-
     }
 }


Specify life time manager.

Specify life time manager.

--- Miles.MassTransit.Unity/UnityContainerExtensions.cs
+++ Miles.MassTransit.Unity/UnityContainerExtensions.cs
@@ -15,7 +15,7 @@
         /// <param name="container">The container.</param>
         /// <param name="contracts">The contracts you want to handle.</param>
         /// <returns></returns>
-        public static IUnityContainer LoadMilesMassTransitConfiguration(this IUnityContainer container, params Type[] contracts)
+        public static IUnityContainer LoadMilesMassTransitConfiguration(this IUnityContainer container, Func<LifetimeManager> lifetimeManagerFactory, params Type[] contracts)
         {
             var genericIConsumerType = typeof(IConsumer<>);
             var genericConsumerType = typeof(MassTransitConsumer<>);
@@ -24,13 +24,13 @@
             {
                 var iconsumerContract = genericIConsumerType.MakeGenericType(contract);
                 var consumerContract = genericConsumerType.MakeGenericType(contract);
-                container.RegisterType(iconsumerContract, consumerContract, new HierarchicalLifetimeManager());
+                container.RegisterType(iconsumerContract, consumerContract, lifetimeManagerFactory());
             }

             return container
-                .RegisterType<IProcessorFactory, ProcessorFactory>(new HierarchicalLifetimeManager())
+                .RegisterType<IProcessorFactory, ProcessorFactory>(lifetimeManagerFactory())
                 .RegisterType<IEventPublisher, TransactionalMessagePublisher>(
-                    new HierarchicalLifetimeManager(),
+                    lifetimeManagerFactory(),
                     new InjectionConstructor(
                         new ResolvedParameter<ITransaction>(),
                         new ResolvedParameter<IOutgoingMessageRepository>(),


Well rip global custom reactions

Well rip global custom reactions

--- NadekoBot.Core/Migrations/20180806233144_cleanup.cs
+++ NadekoBot.Core/Migrations/20180806233144_cleanup.cs
@@ -24,7 +24,7 @@
 WHERE GuildConfigId is null;

 DELETE FROM CustomReactions
-WHERE GuildId='' or GuildId is null;
+WHERE GuildId='';

 DELETE FROM DelMsgOnCmdChannel
 WHERE GuildConfigId is null or ChannelId < 1000;


Perform BatchedQuerying only when Url is too long.

--HG--
extra : rebase_source : d92a1b20aa2ede098ba57a0a3e66d6b7636a9528

--- NuPack.Core/Repositories/BatchedDataServiceQuery.cs
+++ NuPack.Core/Repositories/BatchedDataServiceQuery.cs
@@ -8,8 +8,17 @@
 using System.Reflection;

 namespace NuGet {
+    /// <summary>
+    /// Wrapper around OData's DataServiceRequest that switches to BatchQuery when the request URI becomes too long.
+    /// </summary>
+    /// <remarks>
+    /// Batch queries are multiple queries tunneled via a single post. Post requests are never cached, therefore it is imperative that batch queries are used sparingly.
+    /// A formalized max-length is not specified, so we use 4k as per the analysis in http://www.boutell.com/newfaq/misc/urllength.html and only switch to batch queries when the url
+    /// exceeds this limit.
+    /// </remarks>
     [SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix", Justification="Type is an IQueryable and by convention should end with the term Query")]
     public class BatchedDataServiceQuery<T> : IQueryable<T>, IQueryProvider, IOrderedQueryable<T> {
+        private const int MaxUrlLength = 4000;
         private readonly DataServiceContext _context;
         private readonly IQueryable<T> _query;

@@ -23,12 +32,14 @@
         }

         public IEnumerator<T> GetEnumerator() {
-            // REVIEW: Should we batch only if we're over the url limit?
-            var request = (DataServiceRequest)_query;
-            return _context.ExecuteBatch(request)
-                           .Cast<QueryOperationResponse>()
-                           .SelectMany(o => o.Cast<T>())
-                           .GetEnumerator();
+            var request = (DataServiceQuery)_query;
+            if (request.RequestUri.OriginalString.Length >= MaxUrlLength) {
+                return _context.ExecuteBatch(request)
+                               .Cast<QueryOperationResponse>()
+                               .SelectMany(o => o.Cast<T>())
+                               .GetEnumerator();
+            }
+            return request.Execute().Cast<T>().GetEnumerator();
         }

         IEnumerator IEnumerable.GetEnumerator() {


Fixed shallow copy (reference copying) in SOG.Copy

Several SOG members are references to other objects and the
MemberwiseClone() copies the _reference_. So changes to things like sit
target lists, or LSL scripted targets, bounding box, etc in one copy of
a SOG affected all copies of that SOG that were shift-copied. This
resulted in Mike's report of sit targets being cleared in the original
_after_ a shift-copy, and is probably responsible for some of the LSL
target-related bugs, as well as other object "quantum entanglement"
reports.

--- OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -2062,7 +2062,18 @@
             SceneObjectGroup dupe = (SceneObjectGroup)MemberwiseClone();
             dupe.m_InTransition = 0;
             dupe.m_isBackedUp = false;
+
+            // The MemberwiseClone() above is a shallow copy. All of the object references from the old SOG need new instances.
             dupe.m_childParts = new GroupPartsCollection();
+            dupe.m_childAvatars = new AvatarPartsCollection();
+            dupe.m_sitTargets = new Dictionary<UUID, SitTargetInfo>();
+            dupe.m_targets = new List<ScriptPosTarget>(MAX_TARGETS);
+            dupe.m_rotTargets = new List<ScriptRotTarget>(MAX_TARGETS);
+            dupe.m_targetsLock = new object();
+            dupe._bbLock = new object();
+
+            dupe.m_targets.InsertRange(0, m_targets);
+            dupe.m_rotTargets.InsertRange(0, m_rotTargets);

             dupe.CopyRootPart(m_rootPart, OwnerID, GroupID, userExposed, serializePhysicsState);


Use more pattern matching

Use more pattern matching

--- PKMDS-Save-Editor/PKMDS-Save-Editor/frmPKMViewer.cs
+++ PKMDS-Save-Editor/PKMDS-Save-Editor/frmPKMViewer.cs
@@ -551,7 +551,7 @@
         for (ushort itemindex = 0; itemindex <= 0x027E; itemindex++)
         {
             item = new Item(itemindex);
-            if ((item.ItemName is not "") & (item.ItemName is not null))
+            if (item.ItemName is { Length: > 0 })
             {
                 items.Add(item);
             }
@@ -567,7 +567,7 @@
         for (ushort abilityindex = 0; abilityindex <= 164; abilityindex++)
         {
             ability = new Ability(abilityindex);
-            if ((ability.AbilityName is not "") & (ability.AbilityName is not null) & (ability.AbilityID != 0))
+            if (ability is { AbilityName.Length: > 0, AbilityID: not 0 })
             {
                 abilities.Add(ability);
             }
@@ -583,7 +583,7 @@
         for (ushort speciesindex = 0; speciesindex <= 649; speciesindex++)
         {
             species = new Species(speciesindex);
-            if ((species.SpeciesName is not "") & (species.SpeciesName is not null) & (species.SpeciesID != 0))
+            if (species is { SpeciesName.Length: > 0, SpeciesID: not 0 })
             {
                 species_l.Add(species);
             }
@@ -599,7 +599,7 @@
         for (byte ballindex = 0; ballindex <= 25; ballindex++)
         {
             ball = new Ball(ballindex);
-            if ((ball.BallName is not "") & (ball.BallName is not null))
+            if (ball.BallName is { Length: > 0 })
             {
                 balls.Add(ball);
             }
@@ -615,7 +615,7 @@
         for (byte natureindex = 0; natureindex <= 24; natureindex++)
         {
             nature = new Nature(natureindex);
-            if ((nature.NatureName is not "") & (nature.NatureName is not null))
+            if (nature.NatureName is { Length: > 0 })
             {
                 natures.Add(nature);
             }
@@ -632,7 +632,7 @@
         for (ushort locationindex = 0; locationindex <= 153; locationindex++)
         {
             location = new Location(locationindex);
-            if ((location.LocationName is not "") & (location.LocationName is not null) & (location.LocationID != 0))
+            if (location is { LocationName.Length: > 0, LocationID: not 0 })
             {
                 metlocations.Add(location);
                 egglocations.Add(location);
@@ -680,7 +680,7 @@
         for (ushort moveindex = 0; moveindex <= 559; moveindex++)
         {
             move = new Move(moveindex);
-            if ((move.MoveName is not "") & (move.MoveName is not null) & (move.MoveID != 0))
+            if (move is { MoveName.Length: > 0, MoveID: not 0 })
             {
                 moves1.Add(move);
             }
@@ -707,7 +707,7 @@
         for (byte hometownindex = 0; hometownindex <= 25; hometownindex++)
         {
             var hometown = new Hometown(hometownindex);
-            if ((hometown.HometownName is not "") & (hometown.HometownName is not null) & (hometown.HometownID != 0))
+            if (hometown is { HometownName.Length: > 0, HometownID: not 0 })
             {
                 hometowns.Add(hometown);
             }
@@ -725,7 +725,7 @@
             if (countryindex != 6)
             {
                 country = new Country(countryindex);
-                if ((country.CountryName is not "") & (country.CountryName is not null) & (country.CountryID != 0))
+                if (country is { CountryName.Length: > 0, CountryID: not 0 })
                 {
                     countries.Add(country);
                 }


Fix bug when moving between pages executing on UI thread.

--- PackageViewModel/PackageChooser/QueryContextBase.cs
+++ PackageViewModel/PackageChooser/QueryContextBase.cs
@@ -36,7 +36,7 @@
         protected async Task<IEnumerable<T>> LoadData(IQueryable<T> query)
         {
             var dataServiceQuery = query as DataServiceQuery<T>;
-            if (!TotalItemCountReady && dataServiceQuery != null)
+            if (dataServiceQuery != null)
             {
                 var queryResponse = (QueryOperationResponse<T>)
                     await Task.Factory.FromAsync<IEnumerable<T>>(dataServiceQuery.BeginExecute(null, null), dataServiceQuery.EndExecute);
@@ -47,9 +47,12 @@
                 }
                 catch (InvalidOperationException)
                 {
-                    // the server doesn't return $inlinecount value,
-                    // fall back to using $count query
-                    _totalItemCount = Source.Count();
+                    if (!TotalItemCountReady)
+                    {
+                        // the server doesn't return $inlinecount value,
+                        // fall back to using $count query
+                        _totalItemCount = Source.Count();
+                    }
                 }

                 return queryResponse;
@@ -65,4 +68,4 @@
             }
         }
     }
-}
+}


Removed tabs and moved static ctor.

Removed tabs and moved static ctor.

--- src/Perspex.Controls/Image.cs
+++ src/Perspex.Controls/Image.cs
@@ -23,7 +23,13 @@
         /// </summary>
         public static readonly StyledProperty<Stretch> StretchProperty =
             PerspexProperty.Register<Image, Stretch>(nameof(Stretch), Stretch.Uniform);
-
+
+        static Image()
+        {
+            AffectsRender(SourceProperty);
+            AffectsRender(StretchProperty);
+        }
+
         /// <summary>
         /// Gets or sets the bitmap image that will be displayed.
         /// </summary>
@@ -42,17 +48,11 @@
             set { SetValue(StretchProperty, value); }
         }

-		static Image()
-		{
-			AffectsRender(SourceProperty);
-			AffectsRender(StretchProperty);
-		}
-
-		/// <summary>
-		/// Renders the control.
-		/// </summary>
-		/// <param name="context">The drawing context.</param>
-		public override void Render(DrawingContext context)
+        /// <summary>
+        /// Renders the control.
+        /// </summary>
+        /// <param name="context">The drawing context.</param>
+        public override void Render(DrawingContext context)
         {
             var source = Source;


zoom the images on setting the background

--- src/Platform/Gnome/Desktop.cs
+++ src/Platform/Gnome/Desktop.cs
@@ -16,7 +16,7 @@
 			GConf.Client client = new GConf.Client ();
 			client.Set ("/desktop/gnome/background/color_shading_type", "solid");
 			client.Set ("/desktop/gnome/background/primary_color", "#000000");
-			client.Set ("/desktop/gnome/background/picture_options", "stretched");
+			client.Set ("/desktop/gnome/background/picture_options", "zoom");
 			client.Set ("/desktop/gnome/background/picture_opacity", 100);
 			client.Set ("/desktop/gnome/background/picture_filename", path);
 			client.Set ("/desktop/gnome/background/draw_background", true);


#247 Add needed functionality to the IsSitecoreEnvironmentMember property

--- src/SIM.Instances/Instance.cs
+++ src/SIM.Instances/Instance.cs
@@ -156,7 +156,16 @@
         {
           if (!IsSitecore && File.Exists(Path.Combine(ApplicationManager.ProfilesFolder, "Environments.json")))
           {
-            return true;
+            foreach (SitecoreEnvironment sitecoreEnvironment in SitecoreEnvironmentHelper.SitecoreEnvironments)
+            {
+              foreach (SitecoreEnvironmentMember sitecoreEnvironmentMember in sitecoreEnvironment.Members)
+              {
+                if (sitecoreEnvironmentMember.Name == Name)
+                {
+                  return true;
+                }
+              }
+            }
           }

           return false;


rewrote support precompute. now subtracting dilated lower area, instead of contracting upper. This avoids eroding away thin/small things. However after shift-inset, we might still disappear/erode things. Detect (some of) those cases and use un-eroded version instead. Replace tiny support regions with (larger) support point polys.

--- generators/ThreeAxisPrintGenerator.cs
+++ generators/ThreeAxisPrintGenerator.cs
@@ -830,7 +830,7 @@
             /*
              *  Here is the strategy for computing support areas:
              *    For layer i, support region is union of:
-             *         1) Difference[ offset(layer i+1 solids, fOverhangAngleDist), layer i solids ]
+             *         1) Difference[ layer i+1 solids, offset(layer i solids, fOverhangAngleDist) ]
              *              (ie the bit of the next layer we need to support)
              *         2) support region at layer i+1
              *         3) any pre-defined support solids  (ie from user-defined mesh)
@@ -866,37 +866,102 @@
             // space we leave between support polygons and solids
             // [TODO] do we need to include SupportAreaOffsetX here?
             double fSupportGapInLayer = Settings.SupportSolidSpace;
-
-            // we will throw away tiny support regions smaller than these thresholds
-            double DiscardHoleSizeMM = 0.1;
-            double DiscardHoleArea = 0.1 * 0.1;
-
-            int nLayers = Slices.Count;
-            LayerSupportAreas = new List<GeneralPolygon2d>[nLayers];
-            if (nLayers <= 1)
-                return;
-
-
-            // For layer i, compute support region needed to support layer (i+1)
-            // We do this by shrinking/offsetting layer i+1, and then subtracting layer i
-            // The overhang angle gives us the offset distance
-            // This is the *absolute* support area - no inset for filament width or spacing from model
-            gParallel.ForEach(Interval1i.Range(nLayers-1), (layeri) => {
-                PlanarSlice slice = Slices[layeri];
-                PlanarSlice next_slice = Slices[layeri + 1];
-
-                List<GeneralPolygon2d> insetPolys = ClipperUtil.MiterOffset(next_slice.Solids, -fOverhangAngleDist);
-                List<GeneralPolygon2d> supportPolys = ClipperUtil.Difference(insetPolys, slice.Solids);
-
-                // expand back out so it is full area, plus inset/outset
-                supportPolys = ClipperUtil.MiterOffset(supportPolys,
-                    fOverhangAngleDist + Settings.SupportAreaOffsetX*Settings.Machine.NozzleDiamMM);
+
+			// extra offset we add to support polygons, eg to nudge them
+			// in/out depending on shell layers, etc
+			double fSupportOffset = Settings.SupportAreaOffsetX * Settings.Machine.NozzleDiamMM;
+
+			// we will throw away holes in support regions smaller than these thresholds
+			double DiscardHoleSizeMM = Settings.Machine.NozzleDiamMM;
+			double DiscardHoleArea = DiscardHoleSizeMM * DiscardHoleSizeMM;
+
+			// if support poly is further than this from model, we consider
+			// it a min-z-tip and it gets special handling
+			double fSupportMinDist = Settings.Machine.NozzleDiamMM;
+
+
+			int nLayers = Slices.Count;
+			LayerSupportAreas = new List<GeneralPolygon2d>[nLayers];
+			if (nLayers <= 1)
+				return;
+
+
+			/*
+			 * Step 1: compute absolute support polygon for each layer
+			 */
+
+			// For layer i, compute support region needed to support layer (i+1)
+			// This is the *absolute* support area - no inset for filament width or spacing from model
+			gParallel.ForEach(Interval1i.Range(nLayers - 1), (layeri) => {
+				PlanarSlice slice = Slices[layeri];
+				PlanarSlice next_slice = Slices[layeri + 1];
+
+				// expand this layer and subtract from next layer. leftovers are
+				// what needs to be supported on next layer.
+				List<GeneralPolygon2d> expandPolys = ClipperUtil.MiterOffset(slice.Solids, fOverhangAngleDist);
+				List<GeneralPolygon2d> supportPolys = ClipperUtil.Difference(next_slice.Solids, expandPolys);
+
+				// if we have an support inset/outset, apply it here.
+				// for insets the poly may disappear, in that case we
+				// keep the original poly.
+				// [TODO] handle partial-disappears
+				if (fSupportOffset != 0) {
+					List<GeneralPolygon2d> offsetPolys = new List<GeneralPolygon2d>();
+					foreach (var poly in supportPolys) {
+						List<GeneralPolygon2d> offset = ClipperUtil.MiterOffset(poly, fSupportOffset);
+						// if offset is empty, use original poly
+						if (offset.Count == 0) {
+							offsetPolys.Add(poly);
+						} else {
+							offsetPolys.AddRange(offset);
+						}
+					}
+					supportPolys = offsetPolys;
+				}
+
+				// now we need to deal with tiny polys. If they are min-z-tips,
+				// we want to add larger support regions underneath them.
+				// We determine this by measuring distance to this layer.
+				// NOTE: we **cannot** discard tiny polys here, because a bunch of
+				// tiny per-layer polygons may merge into larger support regions
+				// after dilate/contract, eg on angled thin strips.
+				// NOTE2: we could discard tiny polys if we are sure they are
+				// sufficiently supported, but the test is kind of expensive,
+				// need to spatial query in a ring and make sure it is
+				// connected on multiple sides...
+				List<GeneralPolygon2d> filteredPolys = new List<GeneralPolygon2d>();
+				foreach ( var poly in supportPolys ) {
+					var bounds = poly.Bounds;
+					// big enough to keep
+					if (bounds.MaxDim > 4*fPrintWidth) {
+						filteredPolys.Add(poly);
+						continue;
+					}
+					// check distance. if we are not close to any solids, this
+					// is a min-z-tip, and gets a larger support poly.
+					double dist_sqr = slice.DistanceSquared(bounds.Center, 3*fSupportMinDist);
+					if (dist_sqr < fSupportMinDist * fSupportMinDist) {
+						filteredPolys.Add(poly);
+					} else {
+						filteredPolys.Add(make_support_point_poly(bounds.Center));
+					}
+				}
+				supportPolys = filteredPolys;
+
+
+				// add any explicit support points in this layer as circles
+				foreach (Vector2d v in slice.InputSupportPoints)
+					supportPolys.Add(make_support_point_poly(v));

                 LayerSupportAreas[layeri] = supportPolys;
                 count_progress_step();
             });
             LayerSupportAreas[nLayers-1] = new List<GeneralPolygon2d>();

+
+			/*
+			 * Step 1: sweep support polygons downwards
+			 */

 			// now merge support layers. Process is to track "current" support area,
 			// at layer below we union with that layers support, and then subtract


License Acceptance Dialog #CHANGE: Replaced the "I Decline" button with a "Cancel" button to be more clear about either accepting or not using it.

--- DualityEditor/Forms/LicenseAcceptDialog.Designer.cs
+++ DualityEditor/Forms/LicenseAcceptDialog.Designer.cs
@@ -87,7 +87,7 @@
 			this.buttonDecline.Name = "buttonDecline";
 			this.buttonDecline.Size = new System.Drawing.Size(75, 23);
 			this.buttonDecline.TabIndex = 2;
-			this.buttonDecline.Text = "I Decline";
+			this.buttonDecline.Text = "Cancel";
 			this.buttonDecline.UseVisualStyleBackColor = true;
 			this.buttonDecline.Click += new System.EventHandler(this.buttonDecline_Click);
 			//


Update ExtensionMethods.cs

Update ExtensionMethods.cs

--- Duplicati/Library/Main/Database/ExtensionMethods.cs
+++ Duplicati/Library/Main/Database/ExtensionMethods.cs
@@ -147,7 +147,27 @@
             con.Transaction = transaction;
             return con;
         }
-
+
+        /// <summary> Small helper method querying and returning a textual representation of the SQLite execution plan. </summary>
+        public static string GetSQLiteExecutionPlan(this System.Data.IDbCommand cmd)
+        {
+            var qpCmd = cmd.Connection.CreateCommand();
+            qpCmd.CommandText = "EXPLAIN QUERY PLAN " + cmd.CommandText;
+            qpCmd.Connection = cmd.Connection;
+            qpCmd.CommandType = cmd.CommandType;
+            qpCmd.Transaction = cmd.Transaction;
+
+            System.Data.DataTable dt = new System.Data.DataTable();
+            using (var rd = qpCmd.ExecuteReader())
+                dt.Load(rd);
+
+            string plan =
+                 String.Join("\t", dt.Columns.Cast<System.Data.DataColumn>().Select(c => c.ColumnName).ToArray()) + "\n"
+                + string.Join("\n", dt.Rows.Cast<System.Data.DataRow>().Select(r => String.Join("\t", r.ItemArray.Select(o => o == null ? "" : o.ToString()).ToArray())).ToArray());
+
+            return plan;
+        }
+
         public static void DumpSQL(this System.Data.IDbConnection self, System.Data.IDbTransaction trans, string sql, params object[] parameters)
         {
             using (var c = self.CreateCommand())


Material events only

Material events only

--- EDDiscovery/UserControls/UserControlShoppingList.cs
+++ EDDiscovery/UserControls/UserControlShoppingList.cs
@@ -106,7 +106,8 @@
         private void Discoveryform_OnNewEntry(HistoryEntry he, HistoryList hl)
         {
             last_he = he;
-            Display();
+            if (he is IMaterialCommodityJournalEntry)
+                Display();
         }

         private void Display(HistoryEntry he, HistoryList hl)


Update SpriteBatchBase.cs

Update SpriteBatchBase.cs

--- Emotion/Graphics/Command/Batches/SpriteBatchBase.cs
+++ Emotion/Graphics/Command/Batches/SpriteBatchBase.cs
@@ -160,7 +160,7 @@
         /// <param name="pointer">The texture pointer to add.</param>
         /// <param name="bindingPointer">The pointer to the internal binding.</param>
         /// <returns>Whether the texture was added.</returns>
-        public bool AddTextureBinding(uint pointer, out int bindingPointer)
+        public virtual bool AddTextureBinding(uint pointer, out int bindingPointer)
         {
             bindingPointer = -1;

@@ -201,7 +201,7 @@
         /// <summary>
         /// Bind the textures in use.
         /// </summary>
-        public void BindTextures()
+        public virtual void BindTextures()
         {
             Debug.Assert(GLThread.IsGLThread());


Fixed binary serialization of scripts

Fixed binary serialization of scripts

--- ForgeNetworkingUnityEditor/ForgeNetworkingEditor.cs
+++ ForgeNetworkingUnityEditor/ForgeNetworkingEditor.cs
@@ -221,49 +221,60 @@
 			if (!Directory.Exists(_userStoringPath))
 				Directory.CreateDirectory(_userStoringPath);

-			string[] files = Directory.GetFiles(_storingPath, "*", SearchOption.TopDirectoryOnly);
-			string[] userFiles = Directory.GetFiles(_userStoringPath, "*", SearchOption.TopDirectoryOnly);
+			string[] files = Directory.GetFiles(_storingPath, "*.cs", SearchOption.TopDirectoryOnly);
+			string[] userFiles = Directory.GetFiles(_userStoringPath, "*.cs", SearchOption.TopDirectoryOnly);

 			if (File.Exists(Path.Combine(_storingPath, FN_WIZARD_DATA))) //Check for our temp file, this will make it so that we can load this data from memory regaurdless of errors
 			{
 				IFormatter bFormatter = new BinaryFormatter();
+				bool updateColors = false;
 				using (Stream s = new FileStream(Path.Combine(_storingPath, FN_WIZARD_DATA), FileMode.Open, FileAccess.Read, FileShare.Read))
-					_editorButtons = (List<ForgeEditorButton>)bFormatter.Deserialize(s);
-
-				for (int i = 0; i < _editorButtons.Count; ++i)
-				{
-					_editorButtons[i].UpdateButtonColor();
-					if (_editorButtons[i].IsNetworkObject)
-						ForgeClassObject.IDENTITIES++;
+				{
+					try
+					{
+						object deserializedObject = bFormatter.Deserialize(s);
+						if (deserializedObject != null)
+						{
+							_editorButtons = (List<ForgeEditorButton>)deserializedObject;
+							bool cleared = true;
+							for (int i = 0; i < _editorButtons.Count; ++i)
+							{
+								if (_editorButtons[i].TiedObject == null)
+								{
+									cleared = false;
+									break;
+								}
+							}
+
+							if (cleared)
+								updateColors = true;
+							else
+							{
+								_editorButtons = new List<ForgeEditorButton>();
+								ReloadScripts(files, userFiles);
+							}
+						}
+						else
+							ReloadScripts(files, userFiles);
+					}
+					catch (Exception ex)
+					{
+						ReloadScripts(files, userFiles);
+					}
+				}
+
+				if (updateColors)
+				{
+					for (int i = 0; i < _editorButtons.Count; ++i)
+					{
+						_editorButtons[i].UpdateButtonColor();
+						if (_editorButtons[i].IsNetworkObject)
+							ForgeClassObject.IDENTITIES++;
+					}
 				}
 			}
 			else
-			{
-				List<ForgeClassObject> correctFiles = new List<ForgeClassObject>();
-
-				for (int i = 0; i < files.Length; ++i)
-				{
-					if (!files[i].EndsWith(".meta")) //Ignore all meta files
-						correctFiles.Add(new ForgeClassObject(files[i]));
-				}
-
-				for (int i = 0; i < userFiles.Length; ++i)
-				{
-					if (!userFiles[i].EndsWith(".meta")) //Ignore all meta files
-						correctFiles.Add(new ForgeClassObject(userFiles[i]));
-				}
-
-				if (!ForgeClassObject.HasExactFilename(correctFiles, "NetworkObjectFactory"))
-					MakeForgeFactory(); //We do not have the Forge Factory, we need to make this!
-
-				for (int i = 0; i < correctFiles.Count; ++i)
-				{
-					var btn = new ForgeEditorButton(correctFiles[i]);
-
-					if (btn.IsNetworkObject || btn.IsNetworkBehavior)
-						_editorButtons.Add(btn);
-				}
-			}
+				ReloadScripts(files, userFiles);

 			#region Texture Loading
 			Arrow = Resources.Load<Texture2D>("Arrow");
@@ -343,8 +354,8 @@

 		public void CloseFinal()
 		{
-			//Close();
-			//_instance = null;
+			Close();
+			_instance = null;
 		}
 		#endregion

@@ -916,6 +927,37 @@

 		#region Compiling
 		/// <summary>
+		/// Reloads the scripts into the editor
+		/// </summary>
+		private void ReloadScripts(string[] files, string[] userFiles)
+		{
+			List<ForgeClassObject> correctFiles = new List<ForgeClassObject>();
+
+			for (int i = 0; i < files.Length; ++i)
+			{
+				if (!files[i].EndsWith(".meta")) //Ignore all meta files
+					correctFiles.Add(new ForgeClassObject(files[i]));
+			}
+
+			for (int i = 0; i < userFiles.Length; ++i)
+			{
+				if (!userFiles[i].EndsWith(".meta")) //Ignore all meta files
+					correctFiles.Add(new ForgeClassObject(userFiles[i]));
+			}
+
+			if (!ForgeClassObject.HasExactFilename(correctFiles, "NetworkObjectFactory"))
+				MakeForgeFactory(); //We do not have the Forge Factory, we need to make this!
+
+			for (int i = 0; i < correctFiles.Count; ++i)
+			{
+				var btn = new ForgeEditorButton(correctFiles[i]);
+
+				if (btn.IsNetworkObject || btn.IsNetworkBehavior)
+					_editorButtons.Add(btn);
+			}
+		}
+
+		/// <summary>
 		/// Compiles our generated code for the user
 		/// </summary>
 		public void Compile()


Version Up

Version Up

--- Grabacr07.KanColleViewer/Properties/AssemblyInfo.cs
+++ Grabacr07.KanColleViewer/Properties/AssemblyInfo.cs
@@ -7,7 +7,7 @@
 // アセンブリに関する一般情報は以下の属性セットをとおして制御されます。
 // アセンブリに関連付けられている情報を変更するには、
 // これらの属性値を変更してください。
-[assembly: AssemblyTitle("제독업무도 바빠! R135")]
+[assembly: AssemblyTitle("제독업무도 바빠! R136")]
 [assembly: AssemblyDescription("제독업무도 바빠!")]
 [assembly: AssemblyConfiguration("")]
 [assembly: AssemblyCompany("grabacr.net")]
@@ -51,4 +51,4 @@
 // すべての値を指定するか、下のように '*' を使ってビルドおよびリビジョン番号を
 // 既定値にすることができます:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("3.4.0.135")]
+[assembly: AssemblyVersion("3.4.0.136")]


Bring back logic that scrolls to the first selected item when the view is

2008-09-15  Gabriel Burt  <gabriel.burt@gmail.com>

	* src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Model.cs: Bring
	back logic that scrolls to the first selected item when the view is
	refreshed unless it's already in the view (BGO #551970).

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

--- Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Model.cs
+++ Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Model.cs
@@ -80,6 +80,19 @@
             } else if (Model.Count <= RowsInView) {
                 // If our view fits all rows at once, make sure we're scrolled to the top
                 ScrollTo (0.0);
+            } else if (Selection != null && Selection.Count > 0 && !Selection.AllSelected) {
+                bool selection_in_view = false;
+                int first_row = GetRowAtY (0);
+                for (int i = 0; i < RowsInView; i++) {
+                    if (Selection.Contains (first_row + i)) {
+                        selection_in_view = true;
+                        break;
+                    }
+                }
+
+                if (!selection_in_view) {
+                    CenterOn (Selection.Ranges[0].Start);
+                }
             } else if (vadjustment != null) {
                 ScrollTo (vadjustment.Value);
             }


Improve WebAssembly processing

Improve WebAssembly processing

--- Il2CppDumper/ExecutableFormats/WebAssemblyMemory.cs
+++ Il2CppDumper/ExecutableFormats/WebAssemblyMemory.cs
@@ -33,9 +33,9 @@
             var bss = new SearchSection
             {
                 offset = Length,
-                offsetEnd = 1024 + 2159056, //STATICTOP
+                offsetEnd = long.MaxValue, //hack
                 address = Length,
-                addressEnd = 1024 + 2159056 //STATICTOP
+                addressEnd = long.MaxValue //hack
             };
             var plusSearch = new PlusSearch(this, methodCount, typeDefinitionsCount, maxMetadataUsages);
             plusSearch.SetSection(SearchSectionType.Exec, exec);


Check if theres a selected channel before allow contextmenu delete

--- twitch-tv-viewer/ViewModels/Components/ChannelsDisplayViewModel.cs
+++ twitch-tv-viewer/ViewModels/Components/ChannelsDisplayViewModel.cs
@@ -78,7 +78,11 @@

         private async void OnLoaded() => await Main();

-        private void Delete() => new Delete(SelectedChannel).ShowDialog();
+        private void Delete()
+        {
+            if (SelectedChannel != null)
+                new Delete(SelectedChannel).ShowDialog();
+        }

         private async void Click()
         {


Fixed missing string format for settings tooltip (Fixes #68)

--- KerbalAlarmClock/KerbalAlarmClock_WindowSettings.cs
+++ KerbalAlarmClock/KerbalAlarmClock_WindowSettings.cs
@@ -74,6 +74,7 @@
         {
             strAlarmDescSOI = String.Format(strAlarmDescSOI, settings.AlarmAddSOIAutoThreshold.ToString());
             strAlarmDescXfer = String.Format(strAlarmDescXfer, settings.AlarmXferRecalcThreshold.ToString());
+            strAlarmDescNode = String.Format(strAlarmDescNode, settings.AlarmNodeRecalcThreshold.ToString());
             strAlarmDescMan = String.Format(strAlarmDescMan, settings.AlarmAddManAutoThreshold.ToString());

             GUILayout.BeginVertical();
@@ -361,7 +362,7 @@
             GUILayout.Label("Sphere Of Influence Alarms", KACResources.styleAddSectionHeading);
             GUILayout.BeginVertical(KACResources.styleAddFieldAreas, GUILayout.Height(intSOIBoxheight));

-            if (DrawCheckbox(ref settings.AlarmSOIRecalc, new GUIContent("Auto Recalc of Manual SOI Alarms", strAlarmDescXfer)))
+            if (DrawCheckbox(ref settings.AlarmSOIRecalc, new GUIContent("Auto Recalc of Manual SOI Alarms")))
             {
                 settings.Save();
                 //if it was turned on then force a recalc regardless of the gap


fix csproj to avoid RIDER-18316 Rider fails to resolve mscorlib (#684)

--- unity/EditorPlugin/AssetPostprocessors/CsprojAssetPostprocessor.cs
+++ unity/EditorPlugin/AssetPostprocessors/CsprojAssetPostprocessor.cs
@@ -117,8 +117,21 @@
       changed |= SetManuallyDefinedCompilerSettings(projectFile, projectContentElement, xmlns);
       changed |= SetXCodeDllReference("UnityEditor.iOS.Extensions.Xcode.dll", projectContentElement, xmlns);
       changed |= SetXCodeDllReference("UnityEditor.iOS.Extensions.Common.dll", projectContentElement, xmlns);
+      changed |= SetDisableHandlePackageFileConflicts(projectContentElement, xmlns);

       return changed;
+    }
+
+    private static bool SetDisableHandlePackageFileConflicts(XElement projectContentElement, XNamespace xmlns)
+    {
+      // https://developercommunity.visualstudio.com/content/problem/138986/1550-preview-2-breaks-scriptsharp-compilation.html
+      // RIDER-18316 Rider fails to resolve mscorlib
+
+      // is expected to be no problem with new unity mono runtime or non-windows OS-s
+      if (UnityUtils.ScriptingRuntime > 0 || PluginSettings.SystemInfoRiderPlugin.operatingSystemFamily != OperatingSystemFamilyRider.Windows)
+        return false;
+
+      return SetOrUpdateProperty(projectContentElement, xmlns, "DisableHandlePackageFileConflicts", existing => "true");
     }

     private static bool FixSystemXml(XElement projectContentElement, XNamespace xmlns)


remove unused private variable

remove unused private variable

--- test/IBM.WatsonDeveloperCloud.VisualRecognition.v3.IntegrationTests/VisualRecognitionServiceIntegrationTests.cs
+++ test/IBM.WatsonDeveloperCloud.VisualRecognition.v3.IntegrationTests/VisualRecognitionServiceIntegrationTests.cs
@@ -38,7 +38,6 @@
         private string _faceUrl = "https://upload.wikimedia.org/wikipedia/commons/thumb/8/8d/President_Barack_Obama.jpg/220px-President_Barack_Obama.jpg";
         private string _localGiraffeFilePath = @"VisualRecognitionTestData\giraffe_to_classify.jpg";
         private string _localFaceFilePath = @"VisualRecognitionTestData\obama.jpg";
-        private string _localTurtleFilePath = @"VisualRecognitionTestData\turtle_to_classify.jpg";
         private string _localGiraffePositiveExamplesFilePath = @"VisualRecognitionTestData\giraffe_positive_examples.zip";
         private string _giraffeClassname = "giraffe";
         private string _localTurtlePositiveExamplesFilePath = @"VisualRecognitionTestData\turtle_positive_examples.zip";


show startup messages when launching kestrel app

--- src/Sir.HttpServer/Program.cs
+++ src/Sir.HttpServer/Program.cs
@@ -26,8 +26,9 @@

                 logging.ClearProviders();
                 logging.AddFile("AppData/sirhttpserver-log-{Date}.txt", LogLevel.Debug);
-                logging.AddFilter("Microsoft", LogLevel.Warning);
-                logging.AddFilter("System", LogLevel.Warning);
+                logging.AddConsole();
+                //logging.AddFilter("Microsoft", LogLevel.Warning);
+                //logging.AddFilter("System", LogLevel.Warning);
             })
             .ConfigureWebHostDefaults(webBuilder =>
             {


Note for later.

Note for later.

--- src/SparkPost/MessageEvent.cs
+++ src/SparkPost/MessageEvent.cs
@@ -51,6 +51,7 @@
             {
                 int bounceClassAsInt;
                 if (!int.TryParse(BounceClassRaw, out bounceClassAsInt)) return BounceClass.Undefined;
+                // note:  these scare me, perhaps we should check that it is valid?
                 var bounceClass = (BounceClass)bounceClassAsInt;
                 return bounceClass.ToString() == bounceClassAsInt.ToString()
                     ? BounceClass.Undefined


Stopwatch: rename 'ElapsedTime' to 'Elapsed'

Turns out that .NET's Stopwatch already has a TimeSpan property,
and it's named 'Elapsed', not 'ElapsedTime', so let's be consistent
here.

This also simplifies the code for it, to be just a wrapper to
the inner stopwatch's TimeSpan object.

--- src/StatsdClient/Stopwatch.cs
+++ src/StatsdClient/Stopwatch.cs
@@ -6,9 +6,9 @@
     {
         void Start();
         void Stop();
-        TimeSpan ElapsedTime { get; }
+        TimeSpan Elapsed { get; }

-        [Obsolete("use ElapsedTime property")]
+        [Obsolete("use Elapsed property")]
         int ElapsedMilliseconds();
     }

@@ -26,21 +26,20 @@
             _stopwatch.Stop();
         }

-        public TimeSpan ElapsedTime
+        public TimeSpan Elapsed
         {
             get {
-                var milliseconds = (double)unchecked(_stopwatch.ElapsedMilliseconds);
-                return TimeSpan.FromMilliseconds(milliseconds);
+                return _stopwatch.Elapsed;
             }
         }

-        [Obsolete("use ElapsedTime property")]
+        [Obsolete("use Elapsed property")]
         public int ElapsedMilliseconds()
         {
-            double milliseconds = ElapsedTime.TotalMilliseconds;
+            double milliseconds = Elapsed.TotalMilliseconds;
             if (milliseconds > int.MaxValue)
             {
-                throw new InvalidOperationException("Please use new API 'ElapsedTime' instead of 'ElapsedMilliseconds()', as your value just overflowed for this old API");
+                throw new InvalidOperationException("Please use new API 'Elapsed' instead of 'ElapsedMilliseconds()', as your value just overflowed for this old API");
             }
             return (int)milliseconds;
         }


+ Removed Xiph warning

+ Removed Xiph warning

--- src/TagLib/Ogg/XiphComment.cs
+++ src/TagLib/Ogg/XiphComment.cs
@@ -53,12 +53,6 @@
 		private string vendor_id;

 		/// <summary>
-		///    Contains the field identifier to use for <see
-		///    cref="Comment" />.
-		/// </summary>
-		private string comment_field = "DESCRIPTION";
-
-		/// <summary>
 		///    Picture instances parsed from the fields.
 		/// </summary>
 		private IPicture[] pictures = null;


Maybe fixing a bug with bad offsets in 'TextScannerBase.Unread()'

--- src/TextFx/TextScannerBase.cs
+++ src/TextFx/TextScannerBase.cs
@@ -179,7 +179,7 @@
             this.nextCharacter = s[0];
             var values = s.ToCharArray(1, s.Length - 1);
             this.UnreadImpl(values);
-            this.offset -= values.Length;
+            this.offset -= s.Length;
             this.endOfInput = false;
         }


Fix error in parsing xml doc file

Fix error in parsing xml doc file

--- Dependinator/ModelViewing/ModelHandling/Private/ModelParsing/Private/AssemblyFileParsing/Private/XmlDocParser.cs
+++ Dependinator/ModelViewing/ModelHandling/Private/ModelParsing/Private/AssemblyFileParsing/Private/XmlDocParser.cs
@@ -101,8 +101,9 @@
 				fullName = $"{assemblyName}.{memberName}";
 			}

-			items.Add(fullName, summary);
+			items[fullName] = summary;
 		}
+

 		private static string GetSummary(XElement member)


Fixes  U4-9401 Double slashes in some Umbraco generated urls causes broken links

--- src/Umbraco.Web/UriUtility.cs
+++ src/Umbraco.Web/UriUtility.cs
@@ -70,7 +70,7 @@
 				if (!GlobalSettings.UseDirectoryUrls)
 					path += ".aspx";
                 else if (UmbracoConfig.For.UmbracoSettings().RequestHandler.AddTrailingSlash)
-					path += "/";
+				    path = path.EnsureEndsWith("/");
 			}

 			path = ToAbsolute(path);


Check if potential solution file is really a file with the extension .sln

Because the Windows API has legacy behavior, the searchpattern *.sln will be converted to *.sln*.

--- src/XMakeCommandLine/XMake.cs
+++ src/XMakeCommandLine/XMake.cs
@@ -2082,7 +2082,7 @@
                 {
                     foreach (string s in potentialSolutionFiles)
                     {
-                        if (s.EndsWith("~", true, CultureInfo.CurrentCulture))
+                        if (!FileUtilities.IsSolutionFilename(s))
                         {
                             extensionsToIgnore.Add(Path.GetExtension(s));
                         }


TriplestoreClientQualityWrapper.cs implemented (not tested yet)

--- Libraries/Server/TriplestoreClientQualityWrapper.cs
+++ Libraries/Server/TriplestoreClientQualityWrapper.cs
@@ -314,8 +314,7 @@
             var graphQualityChecksPassed = false;
             foreach (var graphUri in triplesByGraphUri.Keys)
             {
-                var graphQualityCheckTriples = activeQualityChecks.Where(
-                        t => t.Subject.ToString() == WholeDatasetSubject || t.Subject.ToString() == graphUri.ToString())
+                var graphQualityCheckTriples = activeQualityChecks.Where(t => t.Subject.ToString() == WholeDatasetSubject || t.Subject.ToString() == graphUri.ToString())
                     .Select(t => t.ToString());

                 var graphQualityChecks = GetQualityChecksFromTriples(graphQualityCheckTriples);
@@ -340,10 +339,16 @@
             return true;
         }

-        private Dictionary<IQualityCheck, IEnumerable<string>> GetQualityChecksFromTriples(IEnumerable<string> triples)
-        {
-            //TODO
-            throw new NotImplementedException();
+        private Dictionary<IQualityCheck, List<string>> GetQualityChecksFromTriples(IEnumerable<string> triples)
+        {
+            var qualityChecks = new Dictionary<IQualityCheck, List<string>>();
+            foreach (var triple in triples)
+            {
+                var qualityCheck = _qualityChecks.First(qc => qc.GetPredicate() == triple.Predicate());
+                qualityChecks[qualityCheck].Add(triple.Object());
+            }
+
+            return qualityChecks;
         }

         #endregion


Fix for overallocation

Fix for overallocation

--- Lidgren.Network/Encryption/NetCryptoProviderBase.cs
+++ Lidgren.Network/Encryption/NetCryptoProviderBase.cs
@@ -60,8 +60,9 @@
 			var ms = new MemoryStream(msg.m_data, 4, msg.LengthBytes - 4);
 			var cs = new CryptoStream(ms, m_algorithm.CreateDecryptor(), CryptoStreamMode.Read);

-			var result = m_peer.GetStorage(unEncLenBits);
-			cs.Read(result, 0, NetUtility.BytesToHoldBits(unEncLenBits));
+			var byteLen = NetUtility.BytesToHoldBits(unEncLenBits);
+			var result = m_peer.GetStorage(byteLen);
+			cs.Read(result, 0, byteLen);
 			cs.Close();

 			// TODO: recycle existing msg


Include TextGravity in the test.

Include TextGravity in the test.

--- Magick.NET.Tests/Core/MagickImageCollectionTests.cs
+++ Magick.NET.Tests/Core/MagickImageCollectionTests.cs
@@ -716,11 +716,12 @@
       settings.FontFamily = "Courier New";
       settings.FillColor = MagickColors.Gold;
       settings.FontPointsize = 80;
+      settings.TextGravity = Gravity.Center;

       using (MagickImageCollection images = new MagickImageCollection(Files.ImageMagickTXT, settings))
       {
         Assert.AreEqual(2, images.Count);
-        ColorAssert.AreEqual(MagickColors.Gold, images[0], 67, 549);
+        ColorAssert.AreEqual(MagickColors.Gold, images[0], 348, 648);
       }
     }


Fixed issue #355

Fixed issue #355

--- MileageStats.Web/Views/Fillup/Details.Mobile.cshtml
+++ MileageStats.Web/Views/Fillup/Details.Mobile.cshtml
@@ -12,7 +12,7 @@
     @using (var breadcrumbsection = Mustache.Section("Model"))
     {

-
Fillups

+
Fillups

@Mustache.Value(m => m.Vendor) : @Mustache.Value(m => m.Date)

     }


Eliminate race condition where SimStatsReporter starts reporting stats before the region is completely initialized.

--- OpenSim/Region/Framework/Scenes/SimStatsReporter.cs
+++ OpenSim/Region/Framework/Scenes/SimStatsReporter.cs
@@ -289,6 +289,9 @@

         private void statsHeartBeat(object sender, EventArgs e)
         {
+            if (!m_scene.Active)
+                return;
+
             SimStatsPacket.StatBlock[] sb = new SimStatsPacket.StatBlock[22];
             SimStatsPacket.RegionBlock rb = new SimStatsPacket.RegionBlock();


Finalized unit tests for BudgetInterval

Finalized unit tests for BudgetInterval

--- PART/Source/Core/Data.Tests/BudgetInterval.Tests.cs
+++ PART/Source/Core/Data.Tests/BudgetInterval.Tests.cs
@@ -120,6 +120,43 @@
                 var ret = bi.CanRunAt(bi.LastChecked.Value.AddMilliseconds(checkTimeOffset), allowancePercentage);
                 Assert.True(ret);
             }
+
+            [Test]
+            [ExpectedException(typeof(ArgumentOutOfRangeException))]
+            public void CanRunAt_InvalidAllowance_Exception(
+                [Values(1000)]int interval,
+                [Values(-100, -1, 101)] int allowancePercentage,
+                [Values(1000)] int checkTimeOffset)
+            {
+                var bi = new BudgetInterval() { IntervalMillisecods = interval, LastChecked = DateTime.Now };
+                var ret = bi.CanRunAt(bi.LastChecked.Value.AddMilliseconds(checkTimeOffset), allowancePercentage);
+            }
+        }
+
+        [TestFixture]
+        public class SuggestedStartTime
+        {
+            [Test]
+            public void SuggestedStartTime_NeverRun_NowMinusInterval(
+                [Values(19, 100, 87636)]int interval)
+            {
+                var bi = new BudgetInterval() { LastChecked = null, IntervalMillisecods = interval };
+                var now = DateTime.Now;
+                var ret = bi.SuggestedStartTime(now);
+                Assert.AreEqual((double)interval, (now - ret).TotalMilliseconds);
+            }
+
+            [Test]
+            public void SuggestedStartTime_RunToday_Today(
+                [Values(19, 100, 87636, int.MaxValue)]int interval,
+                [Values(545456,0,87895465)]int nowOffset)
+            {
+                var now = DateTime.Now;
+                var bi = new BudgetInterval() { LastChecked = now, IntervalMillisecods = interval };
+                var ret = bi.SuggestedStartTime(now.AddMilliseconds(nowOffset));
+
+                Assert.AreEqual(now, ret);
+            }
         }
     }
 }


Fix uninitialized ui

Fix uninitialized ui

fix #569

--- Plugins/Wox.Plugin.Program/AddProgramSource.xaml.cs
+++ Plugins/Wox.Plugin.Program/AddProgramSource.xaml.cs
@@ -15,6 +15,7 @@
         public AddProgramSource(Settings settings)
         {
             _settings = settings;
+
             InitializeComponent();
             Suffixes.Text = string.Join(";", settings.ProgramSuffixes);
         }
@@ -22,11 +23,12 @@
         public AddProgramSource(ProgramSource edit, Settings settings)
         {
             _editing = edit;
+            _settings = settings;
+
+            InitializeComponent();
             Directory.Text = _editing.Location;
             MaxDepth.Text = _editing.MaxDepth.ToString();
             Suffixes.Text = string.Join(";", _editing.Suffixes);
-            _settings = settings;
-            InitializeComponent();
         }

         private void BrowseButton_Click(object sender, RoutedEventArgs e)


re-worked the loading of texture data to make the code compact and optimized. No need to lock the atlas, only need to clone and then lock/unlock the texture to ensure a deep copy.

--- RelhaxModpack/RelhaxModpack/Atlases/AtlasCreator.cs
+++ RelhaxModpack/RelhaxModpack/Atlases/AtlasCreator.cs
@@ -251,44 +251,21 @@
             //copy the sub-texture bitmap data to each texture bitmap data
             stopwatch.Start();
             Logging.Info("[atlas file {0}]: Parsing bitmap data", Atlas.AtlasFile);
-            lock (AtlasUtils.AtlasLoaderLockObject)
-            {
-                //lock the atlas image into memory
-                Rectangle rect = new Rectangle(0, 0, atlasImage.Width, atlasImage.Height);
-                BitmapData atlasLock = atlasImage.LockBits(rect, ImageLockMode.ReadOnly, atlasImage.PixelFormat);
-                foreach (Texture texture in Atlas.TextureList)
-                {
-                    Token.ThrowIfCancellationRequested();
-                    //copy the texture bitmap data into the texture bitmap object
-                    //https://docs.microsoft.com/en-us/dotnet/api/system.drawing.bitmap.clone?redirectedfrom=MSDN&view=netframework-4.8#System_Drawing_Bitmap_Clone_System_Drawing_Rectangle_System_Drawing_Imaging_PixelFormat_
-                    //rectangle of desired area to clone
-                    Rectangle textureRect = new Rectangle(texture.X, texture.Y, texture.Width, texture.Height);
-                    //copy the bitmap
-                    try
-                    {
-                        texture.AtlasImage = atlasImage.Clone(textureRect, atlasImage.PixelFormat);
-                        //do a quick lock on the bits to ensure that the image data is deep copied
-                        //https://stackoverflow.com/a/13935966/3128017
-                        BitmapData data = texture.AtlasImage.LockBits(new Rectangle(0, 0, texture.AtlasImage.Width, texture.AtlasImage.Height), ImageLockMode.ReadOnly, texture.AtlasImage.PixelFormat);
-                        texture.AtlasImage.UnlockBits(data);
-                    }
-                    catch (Exception ex)
-                    {
-                        Logging.Exception("Failed to clone atlas image data");
-                        Logging.Exception(ex.ToString());
-                        try
-                        {
-                            atlasImage.UnlockBits(atlasLock);
-                            atlasImage.Dispose();
-                        }
-                        catch
-                        { }
-                        return FailCode.ImageImporter;
-                    }
-                }
-                atlasImage.UnlockBits(atlasLock);
-                atlasImage.Dispose();
-            }
+            //get the overall size of the bitmap
+            Rectangle rect = new Rectangle(0, 0, atlasImage.Width, atlasImage.Height);
+            foreach (Texture texture in Atlas.TextureList)
+            {
+                Rectangle textureRect = new Rectangle(texture.X, texture.Y, texture.Width, texture.Height);
+                //copy the texture bitmap data from the atlas bitmap into the texture bitmap
+                //https://docs.microsoft.com/en-us/dotnet/api/system.drawing.bitmap.clone?redirectedfrom=MSDN&view=netframework-4.8#System_Drawing_Bitmap_Clone_System_Drawing_Rectangle_System_Drawing_Imaging_PixelFormat
+                texture.AtlasImage = atlasImage.Clone(textureRect, atlasImage.PixelFormat);
+                //do a quick lock on the bits to ensure that the image data is deep copied. Clone() seems to only shallow copy
+                //https://stackoverflow.com/a/13935966/3128017
+                BitmapData data = texture.AtlasImage.LockBits(new Rectangle(0, 0, texture.AtlasImage.Width, texture.AtlasImage.Height), ImageLockMode.ReadOnly, texture.AtlasImage.PixelFormat);
+                texture.AtlasImage.UnlockBits(data);
+            }
+            //dispose of the original cause now we're done with it
+            atlasImage.Dispose();
             OnAtlasProgres?.Invoke(this, null);
             Token.ThrowIfCancellationRequested();
             stopwatch.Stop();


Added some missing implementation to LinkedHashSet.

--- Collections/Generic/LinkedHashSet.cs
+++ Collections/Generic/LinkedHashSet.cs
@@ -113,11 +113,29 @@
 		}

 		#region Implements ISet<T>
+		///
+		/// Modifies the current set so that it contains all elements that are present in
+		/// the current set, in the specified collection, or in both.
+		///
+		/// <param name="other">The collection to compare to the current set.</param>
 		public void UnionWith(IEnumerable<T> other)
 		{
-			throw new NotImplementedException();
-		}
-
+			if (other == null) throw new ArgumentNullException(nameof(other));
+
+			foreach (var item in other)
+			{
+				if (dict.ContainsKey(item)) continue;
+
+				LinkedListNode<T> node = list.AddLast(item);
+				dict.Add(item, node);
+			}
+		}
+
+		///
+		/// Modifies the current set so that it contains only elements that are also in a
+		/// specified collection.
+		///
+		/// <param name="other">The collection to compare to the current set.</param>
 		public void IntersectWith(IEnumerable<T> other)
 		{
 			if (other == null) throw new ArgumentNullException(nameof(other));
@@ -200,6 +218,10 @@
 			while (list.Count > 0 && c != list.First);
 		}

+		///
+		/// Removes all elements in the specified collection from the current set.
+		///
+		/// <param name="other">The collection to compare to the current set.</param>
 		public void ExceptWith(IEnumerable<T> other)
 		{
 			if (other == null) throw new ArgumentNullException(nameof(other));
@@ -207,9 +229,78 @@
 			foreach (T item in other) Remove(item);
 		}

+		///
+		/// Modifies the current set so that it contains only elements that are present either
+		/// in the current set or in the specified collection, but not both.
+		///
+		/// <param name="other">The collection to compare to the current set.</param>
 		public void SymmetricExceptWith(IEnumerable<T> other)
 		{
-			throw new NotImplementedException();
+			if (other == null) throw new ArgumentNullException(nameof(other));
+
+			if (dict.Count == 0) // 0 XOR x == x
+			{
+				UnionWith(other);
+				return;
+			}
+
+			if (ReferenceEquals(this, other)) // x XOR x == 0
+			{
+				Clear();
+				return;
+			}
+
+			var c = list.First;
+			if (c == null) return;
+
+			ICollection<T> collection = other as ICollection<T>;
+			if (collection != null)
+			{
+				if (collection.Count == 0) return; // x XOR 0 == x
+
+				LinkedHashSet<T> lhs = other as LinkedHashSet<T>;
+				HashSet<T> hs = other as HashSet<T>;
+				if ((lhs != null && Comparer.Equals(lhs.Comparer))|| (hs != null && Comparer.Equals(hs.Comparer))) // No dupicates in other.
+				{
+					foreach (var item in other)
+					{
+						LinkedListNode<T> node;
+						if (dict.TryGetValue(item, out node))
+						{
+							dict.Remove(item);
+							list.Remove(node);
+						}
+						else
+						{
+							node = list.AddLast(item);
+							dict.Add(item, node);
+						}
+					}
+
+					return;
+				}
+			}
+
+			LinkedHashSet<T> add = new LinkedHashSet<T>(dict.Comparer);
+			HashSet<LinkedListNode<T>> remove = new HashSet<LinkedListNode<T>>();
+			foreach (var item in other)
+			{
+				LinkedListNode<T> node;
+				if (dict.TryGetValue(item, out node)) remove.Add(node);
+				else add.Add(item);
+			}
+
+			foreach(var node in remove)
+			{
+				dict.Remove(node.Value);
+				list.Remove(node);
+			}
+
+			foreach (var item in add)
+			{
+				LinkedListNode<T> node = list.AddLast(item);
+				dict.Add(item, node);
+			}
 		}

 		public bool IsSubsetOf(IEnumerable<T> other)
@@ -232,9 +323,20 @@
 			throw new NotImplementedException();
 		}

+		///
+		/// Determines whether the current set overlaps with the specified collection.
+		///
+		/// <param name="other">The collection to compare to the current set.</param>
+		/// <returns>true if the current set and other share at least one common element; otherwise, false.</returns>
 		public bool Overlaps(IEnumerable<T> other)
 		{
-			throw new NotImplementedException();
+			if (other == null) throw new ArgumentNullException(nameof(other));
+
+			if (dict.Count == 0) return false;
+
+			foreach (T item in other) if (dict.ContainsKey(item)) return true;
+
+			return false;
 		}

 		public bool SetEquals(IEnumerable<T> other)


Zico/David - Fixed carousel navigation for screen readers

--- src/StockportWebapp/Views/Shared/Carousel.cshtml
+++ src/StockportWebapp/Views/Shared/Carousel.cshtml
@@ -1,5 +1,5 @@
 @model List<StockportWebapp.Models.CarouselContent>
-

+

     @{ int counter = 1; }
     @foreach (var carouselContent in Model)
     {


dfddf

dfddf


added RandomGenome()

added RandomGenome()


Put version in app title

Put version in app title


Implemented Load from DB function [WIP]

Implemented Load from DB function [WIP]


Uncommented consoleFont & added guard iff not available


removed logging

removed logging


Added getImage() method

Added getImage() method