:lipstick:

:lipstick:

--- Code/OpenRealEstate.Tests/ReaTransmorgrifierFacts.cs
+++ Code/OpenRealEstate.Tests/ReaTransmorgrifierFacts.cs
@@ -36,7 +36,7 @@
                 result.ShouldNotBe(null);
                 result.Listings.Count.ShouldBe(1);
                 result.UnhandledData.ShouldBe(null);
-                AssertResidentialCurrentListing((ResidentialListing)result.Listings.First().Listing);
+                AssertResidentialCurrentListing(result.Listings.First().Listing as ResidentialListing);
             }

             [Fact]
@@ -52,13 +52,7 @@
                 // Assert.
                 result.Listings.Count.ShouldBe(1);
                 result.UnhandledData.ShouldBe(null);
-
-                var residentialSoldListing = result.Listings.Select(x => x.Listing)
-                    .AsQueryable()
-                    .WithId("Residential-Sold-ABCD1234")
-                    .OfType<ResidentialListing>()
-                    .SingleOrDefault();
-                AssertResidentialSoldListing(residentialSoldListing);
+                AssertResidentialSoldListing(result.Listings.First().Listing as ResidentialListing);
             }

             [Fact]
@@ -74,13 +68,7 @@
                 // Assert.
                 result.Listings.Count.ShouldBe(1);
                 result.UnhandledData.ShouldBe(null);
-
-                var residentialSoldListing = result.Listings.Select(x => x.Listing)
-                    .AsQueryable()
-                    .WithId("Residential-Sold-ABCD1234")
-                    .OfType<ResidentialListing>()
-                    .SingleOrDefault();
-                AssertResidentialSoldListing(residentialSoldListing);
+                AssertResidentialSoldListing(result.Listings.First().Listing as ResidentialListing);
             }

             [Fact]
@@ -96,13 +84,7 @@
                 // Assert.
                 result.Listings.Count.ShouldBe(1);
                 result.UnhandledData.ShouldBe(null);
-
-                var residentialSoldListing = result.Listings.Select(x => x.Listing)
-                    .AsQueryable()
-                    .WithId("Residential-Sold-ABCD1234")
-                    .OfType<ResidentialListing>()
-                    .SingleOrDefault();
-                AssertResidentialSoldListing(residentialSoldListing, false);
+                AssertResidentialSoldListing(result.Listings.First().Listing as ResidentialListing, false);
             }

             [Fact]
@@ -138,13 +120,7 @@
                 // Assert.
                 result.Listings.Count.ShouldBe(1);
                 result.UnhandledData.ShouldBe(null);
-
-                var residentialCurrentListing = result.Listings.Select(x => x.Listing)
-                    .AsQueryable()
-                    .WithId("Residential-Current-ABCD1234")
-                    .OfType<ResidentialListing>()
-                    .SingleOrDefault();
-                AssertResidentialCurrentListing(residentialCurrentListing);
+                AssertResidentialCurrentListing(result.Listings.First().Listing as ResidentialListing);
             }

             [Fact]
@@ -254,13 +230,7 @@
                 // Assert.
                 result.Listings.Count.ShouldBe(1);
                 result.UnhandledData.ShouldBe(null);
-
-                var rentalCurrentListing = result.Listings.Select(x => x.Listing)
-                    .AsQueryable()
-                    .WithId("Rental-Current-ABCD1234")
-                    .OfType<RentalListing>()
-                    .SingleOrDefault();
-                AssertRentalCurrentListing(rentalCurrentListing);
+                AssertRentalCurrentListing(result.Listings.First().Listing as RentalListing);
             }

             [Fact]
@@ -276,13 +246,10 @@
                 // Assert.
                 result.Listings.Count.ShouldBe(1);
                 result.UnhandledData.ShouldBe(null);
-
-                var rentalLeasedListing = result.Listings.Select(x => x.Listing)
-                    .AsQueryable()
-                    .WithId("Rental-Leased-ABCD1234")
-                    .OfType<RentalListing>()
-                    .SingleOrDefault();
-                AssertRentalLeasedListing(rentalLeasedListing);
+                var listing = result.Listings.First().Listing;
+                listing.AgencyId.ShouldBe("XNWXNW");
+                listing.Id.ShouldBe("Rental-Leased-ABCD1234");
+                listing.StatusType.ShouldBe(StatusType.Leased);
             }

             [Fact]
@@ -298,13 +265,10 @@
                 // Assert.
                 result.Listings.Count.ShouldBe(1);
                 result.UnhandledData.ShouldBe(null);
-
-                var rentalListing = result.Listings.Select(x => x.Listing)
-                    .AsQueryable()
-                    .WithId("Rental-Withdrawn-ABCD1234")
-                    .OfType<RentalListing>()
-                    .SingleOrDefault();
-                AssertRentalWithdrawnListing(rentalListing);
+                var listing = result.Listings.First().Listing;
+                listing.AgencyId.ShouldBe("XNWXNW");
+                listing.Id.ShouldBe("Rental-Withdrawn-ABCD1234");
+                listing.StatusType.ShouldBe(StatusType.Withdrawn);
             }

             [Fact]
@@ -320,13 +284,7 @@
                 // Assert.
                 result.Listings.Count.ShouldBe(1);
                 result.UnhandledData.ShouldBe(null);
-
-                var rentalCurrentListing = result.Listings.Select(x => x.Listing)
-                    .AsQueryable()
-                    .WithId("Rental-Current-ABCD1234")
-                    .OfType<RentalListing>()
-                    .SingleOrDefault();
-                AssertRentalCurrentListing(rentalCurrentListing);
+                AssertRentalCurrentListing(result.Listings.First().Listing as RentalListing);
             }

             private static void AssertRentalCurrentListing(RentalListing listing)
@@ -384,20 +342,6 @@
                 errors.Count.ShouldBe(0);
             }

-            private static void AssertRentalLeasedListing(RentalListing listing)
-            {
-                listing.AgencyId.ShouldBe("XNWXNW");
-                listing.Id.ShouldBe("Rental-Leased-ABCD1234");
-                listing.StatusType.ShouldBe(StatusType.Leased);
-            }
-
-            private static void AssertRentalWithdrawnListing(RentalListing listing)
-            {
-                listing.AgencyId.ShouldBe("XNWXNW");
-                listing.Id.ShouldBe("Rental-Withdrawn-ABCD1234");
-                listing.StatusType.ShouldBe(StatusType.Withdrawn);
-            }
-
             #endregion

             #region Land
@@ -415,13 +359,7 @@
                 // Assert.
                 result.Listings.Count.ShouldBe(1);
                 result.UnhandledData.ShouldBe(null);
-
-                var landCurrentListing = result.Listings.Select(x => x.Listing)
-                    .AsQueryable()
-                    .WithId("Land-Current-ABCD1234")
-                    .OfType<LandListing>()
-                    .SingleOrDefault();
-                AssertLandCurrentListing(landCurrentListing);
+                AssertLandCurrentListing(result.Listings.First().Listing as LandListing);
             }

             [Fact]
@@ -438,16 +376,11 @@
                 result.Listings.Count.ShouldBe(1);
                 result.UnhandledData.ShouldBe(null);

-                var landListing = result.Listings.Select(x => x.Listing)
-                    .AsQueryable()
-                    .WithId("Land-Current-ABCD1234")
-                    .OfType<LandListing>()
-                    .SingleOrDefault();
-
-                landListing.LandDetails.Area.ShouldBe(null);
-                landListing.LandDetails.Frontage.ShouldBe(null);
-                landListing.LandDetails.Depth.ShouldBe(null);
-                landListing.LandDetails.CrossOver.ShouldBeNullOrEmpty();
+                var listing = result.Listings.First().Listing;
+                listing.LandDetails.Area.ShouldBe(null);
+                listing.LandDetails.Frontage.ShouldBe(null);
+                listing.LandDetails.Depth.ShouldBe(null);
+                listing.LandDetails.CrossOver.ShouldBeNullOrEmpty();
             }

             private static void AssertLandCurrentListing(LandListing listing)
@@ -515,7 +448,7 @@
                 result.ShouldNotBe(null);
                 result.Listings.Count.ShouldBe(1);
                 result.UnhandledData.ShouldBe(null);
-                AssertRuralCurrentListing((RuralListing)result.Listings.First().Listing);
+                AssertRuralCurrentListing(result.Listings.First().Listing as RuralListing);
             }

             [Fact]
@@ -531,9 +464,7 @@
                 // Assert.
                 result.Listings.Count.ShouldBe(1);
                 result.UnhandledData.ShouldBe(null);
-
-                var listing = result.Listings.First().Listing;
-                AssertRuralSoldListing(listing as RuralListing);
+                AssertRuralSoldListing(result.Listings.First().Listing as RuralListing);
             }

             [Fact]
@@ -549,9 +480,7 @@
                 // Assert.
                 result.Listings.Count.ShouldBe(1);
                 result.UnhandledData.ShouldBe(null);
-
-                var listing = result.Listings.First().Listing;
-                AssertRuralSoldListing(listing as RuralListing, false);
+                AssertRuralSoldListing(result.Listings.First().Listing as RuralListing, false);
             }

             [Fact]


catch OperationCanceledException upon process.WaitForExit

--- Containerizer/Controllers/ContainerProcessHandler.cs
+++ Containerizer/Controllers/ContainerProcessHandler.cs
@@ -69,7 +69,10 @@
                         var process = container.Run(processSpec, new ProcessIO(this));
                         Task.Factory.StartNew(() =>
                         {
-                            process.WaitForExit();
+                            try
+                            {
+                                process.WaitForExit();
+                            } catch (OperationCanceledException e) { }
                             SendEvent("close", null);
                         });
                     }


Add typeserializer for lathe db

Add typeserializer for lathe db

--- Content.Shared/Lathe/SharedLatheDatabaseComponent.cs
+++ Content.Shared/Lathe/SharedLatheDatabaseComponent.cs
@@ -8,6 +8,7 @@
 using Robust.Shared.Prototypes;
 using Robust.Shared.Serialization;
 using Robust.Shared.Serialization.Manager.Attributes;
+using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List;

 namespace Content.Shared.Lathe
 {
@@ -16,7 +17,7 @@
     {
         public override string Name => "LatheDatabase";

-        [DataField("recipes")] private List<string> _recipeIds = new();
+        [DataField("recipes", customTypeSerializer: typeof(PrototypeIdListSerializer<LatheRecipePrototype>))] private List<string> _recipeIds = new();

         private readonly List<LatheRecipePrototype> _recipes = new();


Testing appveyor take 6

Testing appveyor take 6

--- Core/System/Threading/Tasks/ITaskCompletionAction.cs
+++ Core/System/Threading/Tasks/ITaskCompletionAction.cs
@@ -116,7 +116,7 @@
                 var index = -1;
                 try
                 {
-                    Console.WriteLine((tasks);
+                    Console.WriteLine(tasks);
                     index = Array.IndexOf(tasks, completingTask);
                 }
                 catch (NullReferenceException ex)


Renaming class for consistency.

Renaming class for consistency.

--- Drupal7.Services/FieldTypes/TaxonomyTermReference.cs
+++ Drupal7.Services/FieldTypes/TaxonomyTermReference.cs
@@ -1,11 +1,11 @@
 namespace Drupal7.Services.FieldTypes
 {
-    public class TaxonomyTid
+    public class TaxonomyTermReferenceField
+    {
+        public TaxonomyTermReferenceItem[] und { get; set; }
+    }
+    public class TaxonomyTermReferenceItem
     {
         public int tid { get; set; }
     }
-    public class TaxonomyTermReferenceField
-    {
-        public TaxonomyTid[] und { get; set; }
-    }
 }


Missed Unwrapped Target

Missed Unwrapped Target

--- Dynamitey/DynamicObjects/ExtensionToInstanceProxy.cs
+++ Dynamitey/DynamicObjects/ExtensionToInstanceProxy.cs
@@ -83,7 +83,7 @@
             if (!base.TryGetMember(binder, out result))
             {

-                var tInterface = CallTarget.GetType().GetTypeInfo().GetInterfaces().Single(it => it.Name == _extendedType.Name);
+                var tInterface = UnwrappedTarget().GetType().GetTypeInfo().GetInterfaces().Single(it => it.Name == _extendedType.Name);
                 var typeInfo = tInterface.GetTypeInfo();
                 result = new Invoker(binder.Name,
                                      typeInfo.IsGenericType ? typeInfo.GetGenericArguments() : new Type[] {},null, this);


Add unit vectors

Add unit vectors

--- SolidworksAddinFramework/Geometry/PointDirection3.cs
+++ SolidworksAddinFramework/Geometry/PointDirection3.cs
@@ -46,6 +46,10 @@

         }

+        public static PointDirection3 UnitZ = new PointDirection3(Vector3.Zero, Vector3.UnitZ);
+        public static PointDirection3 UnitY = new PointDirection3(Vector3.Zero, Vector3.UnitY);
+        public static PointDirection3 UnitX = new PointDirection3(Vector3.Zero, Vector3.UnitX);
+

     }


Result of merge from main in test branch

--- Source/Csla/Configuration/ConfigurationExtensions.cs
+++ Source/Csla/Configuration/ConfigurationExtensions.cs
@@ -31,29 +31,35 @@
     /// Add CSLA .NET services for use by the application.
     /// </summary>
     /// <param name="services">ServiceCollection object</param>
-    /// <param name="config">Implement to configure CSLA .NET</param>
-    public static ICslaBuilder AddCsla(this IServiceCollection services, Action<CslaConfiguration> config)
+    /// <param name="options">Options for configuring CSLA .NET</param>
+    public static ICslaBuilder AddCsla(this IServiceCollection services, Action<CslaConfiguration> options)
     {
+      var builder = new CslaBuilder(services);
+
       // Configuration
-      config?.Invoke(CslaConfiguration.Configure());
+      var cslaOptions = new CslaConfiguration(services);
+      options?.Invoke(cslaOptions);

       // ApplicationContext
       services.TryAddScoped<ApplicationContext>();
       services.TryAddScoped(typeof(Core.IContextManager), typeof(Core.ApplicationContextManager));

-      // Data portal services
-      services.TryAddTransient(typeof(Server.IDataPortalServer), typeof(Csla.Server.DataPortal));
-      services.TryAddSingleton(typeof(Server.Dashboard.IDashboard), typeof(Csla.Server.Dashboard.NullDashboard));
-      services.TryAddTransient<Server.DataPortalSelector>();
-      services.TryAddTransient<Server.SimpleDataPortal>();
-      services.TryAddTransient<Server.FactoryDataPortal>();
-      services.TryAddTransient<Server.DataPortalBroker>();
+      //// Data portal services
+      //if (cslaOptions.DataPortal().UseDataPortalServer)
+      //{
+      //  services.TryAddTransient(typeof(Server.IDataPortalServer), typeof(Csla.Server.DataPortal));
+      //  services.TryAddTransient<Server.DataPortalSelector>();
+      //  services.TryAddTransient<Server.SimpleDataPortal>();
+      //  services.TryAddTransient<Server.FactoryDataPortal>();
+      //  services.TryAddTransient<Server.DataPortalBroker>();
+      //  services.TryAddSingleton(typeof(Server.Dashboard.IDashboard), typeof(Csla.Server.Dashboard.NullDashboard));
+      //}

       // Data portal API
       services.TryAddTransient(typeof(IDataPortal<>), typeof(DataPortal<>));
       services.TryAddTransient(typeof(IChildDataPortal<>), typeof(DataPortal<>));

-      return new CslaBuilder(services);
+      return builder;
     }

     /// <summary>
@@ -66,6 +72,23 @@
       config.Bind("csla", new CslaConfigurationOptions());
       return config;
     }
+
+    /// <summary>
+    /// Add services required to host the server-side
+    /// data portal.
+    /// </summary>
+    /// <param name="builder"></param>
+    public static CslaDataPortalConfiguration AddServerSideDataPortal(this CslaDataPortalConfiguration builder)
+    {
+      var services = builder.Services;
+      services.TryAddTransient(typeof(Server.IDataPortalServer), typeof(Csla.Server.DataPortal));
+      services.TryAddTransient<Server.DataPortalSelector>();
+      services.TryAddTransient<Server.SimpleDataPortal>();
+      services.TryAddTransient<Server.FactoryDataPortal>();
+      services.TryAddTransient<Server.DataPortalBroker>();
+      services.TryAddSingleton(typeof(Server.Dashboard.IDashboard), typeof(Csla.Server.Dashboard.NullDashboard));
+      return builder;
+    }
   }
 }
 #endif


GSF.PQDIF: Modified the GetOriginalValues() method of SeriesInstance to handle timestamps as a special case to prevent errors when attempting to apply scaling factors to DateTime objects.

--- Source/Libraries/GSF.PQDIF/Logical/SeriesInstance.cs
+++ Source/Libraries/GSF.PQDIF/Logical/SeriesInstance.cs
@@ -302,6 +302,8 @@

             for (int i = 0; i < values.Count; i++)
                 seriesValuesElement.Set(i, values[i]);
+
+            SeriesValues = seriesValuesElement;
         }

         /// <summary>
@@ -325,6 +327,8 @@
             seriesValuesElement.Set(0, start);
             seriesValuesElement.Set(1, count);
             seriesValuesElement.Set(2, increment);
+
+            SeriesValues = seriesValuesElement;
         }

         /// <summary>
@@ -401,13 +405,16 @@
                     values.Add(valuesVector.Get(i));
             }

-            for (int i = 0; i < values.Count; i++)
-            {
-                value = values[i];
-                values[i] = offset + (value * scale);
-            }
-
-            ApplyTransducerRatio(values);
+            if (valuesVector.TypeOfValue != PhysicalType.Timestamp)
+            {
+                for (int i = 0; i < values.Count; i++)
+                {
+                    value = values[i];
+                    values[i] = offset + (value * scale);
+                }
+
+                ApplyTransducerRatio(values);
+            }

             return values;
         }


Add bold style to ZirMed on home page.

Add bold style to ZirMed on home page.

--- ZirMed.TrainingSandbox/Views/Home/Index.cshtml
+++ ZirMed.TrainingSandbox/Views/Home/Index.cshtml
@@ -3,7 +3,7 @@
 }

-
ASP.NET - ZirMed Training Sandbox

+
ASP.NET - ZirMed Training Sandbox

ASP.NET is a free web framework for building great Web sites and Web applications using HTML, CSS and JavaScript.

Learn more »


Replaced ContainsKey and getting by value with TryGetValue method (#2013)

--- Src/Newtonsoft.Json/Linq/JPropertyKeyedCollection.cs
+++ Src/Newtonsoft.Json/Linq/JPropertyKeyedCollection.cs
@@ -129,7 +129,7 @@

             if (_dictionary != null)
             {
-                return _dictionary.ContainsKey(key) && Remove(_dictionary[key]);
+                return _dictionary.TryGetValue(key, out JToken value) && Remove(value);
             }

             return false;


Modified methods names in DeserializeJsonService

--- StudyBox/StudyBox/Services/DeserializeJsonService.cs
+++ StudyBox/StudyBox/Services/DeserializeJsonService.cs
@@ -11,14 +11,14 @@
 {
     public static class DeserializeJsonService
     {
-        public static Flashcard GetFlashCardFromJson(string jsonToDeserialize)
+        public static Flashcard GetFlashcardFromJson(string jsonToDeserialize)
         {
             if (jsonToDeserialize != null && jsonToDeserialize != "")
             {
                 try
                 {
-                    Flashcard flashCardObject = JsonConvert.DeserializeObject<Flashcard>(jsonToDeserialize);
-                    return flashCardObject;
+                    Flashcard flashcardObject = JsonConvert.DeserializeObject<Flashcard>(jsonToDeserialize);
+                    return flashcardObject;
                 }
                 catch (Exception)
                 {
@@ -29,14 +29,14 @@
                 return null;
         }

-        public static List<Flashcard> GetFlashCardsFromJson(string jsonToDeserialize)
+        public static List<Flashcard> GetFlashcardsFromJson(string jsonToDeserialize)
         {
             if (jsonToDeserialize != null && jsonToDeserialize != "")
             {
                 try
                 {
-                    List<Flashcard> flashCardObject = JsonConvert.DeserializeObject<List<Flashcard>>(jsonToDeserialize);
-                    return flashCardObject;
+                    List<Flashcard> flashcardObject = JsonConvert.DeserializeObject<List<Flashcard>>(jsonToDeserialize);
+                    return flashcardObject;
                 }
                 catch (Exception)
                 {


fix dev support hotkeys for Ctrl+R , Shift+F10, Menu. (#430)

* fix dev support hotkeys for Ctrl+R , Shift+F10, Menu.

* unsubscribe key event ondestroy

* menu key alone should open dev menu

* potential fix to menu key

--- ReactNative/ReactPage.cs
+++ ReactNative/ReactPage.cs
@@ -97,8 +97,10 @@
                 _reactInstanceManager.OnBackPressed();
                 args.Handled = true;
             };
+
+            Window.Current.CoreWindow.Dispatcher.AcceleratorKeyActivated += OnAcceleratorKeyActivated;
         }
-
+
         /// <summary>
         /// Called before the application is suspended.
         /// </summary>
@@ -123,7 +125,9 @@
         /// </summary>
         public void OnDestroy()
         {
-            _reactInstanceManager.OnDestroy();
+            _reactInstanceManager.OnDestroy();
+
+            Window.Current.CoreWindow.Dispatcher.AcceleratorKeyActivated -= OnAcceleratorKeyActivated;
         }

         /// <summary>
@@ -140,57 +144,34 @@
         }

         /// <summary>
-        /// Captures the key down events to
-        /// </summary>
+        /// Captures the all key downs and Ups.
+        /// </summary>
+        /// <param name="sender"></param>
         /// <param name="e"></param>
-        protected override void OnKeyDown(KeyRoutedEventArgs e)
+        private void OnAcceleratorKeyActivated(CoreDispatcher sender, AcceleratorKeyEventArgs e)
         {
             if (_reactInstanceManager.DevSupportManager.IsEnabled)
             {
-                if (e.Key == VirtualKey.Shift)
+                if (e.VirtualKey == VirtualKey.Shift)
                 {
-                    _isShiftKeyDown = true;
+                    _isShiftKeyDown = e.EventType == CoreAcceleratorKeyEventType.KeyDown;
                 }
-                else if (e.Key == VirtualKey.Control)
+                else if (e.VirtualKey == VirtualKey.Control)
                 {
-                    _isControlKeyDown = true;
+                    _isControlKeyDown = e.EventType == CoreAcceleratorKeyEventType.KeyDown;
                 }
-                else if (_isShiftKeyDown && e.Key == VirtualKey.F10)
+                else if ( (_isShiftKeyDown && e.VirtualKey == VirtualKey.F10) ||
+                          (e.EventType == CoreAcceleratorKeyEventType.KeyDown && e.VirtualKey == VirtualKey.Menu))
                 {
-                    _reactInstanceManager.DevSupportManager.ShowDevOptionsDialog();
-                    e.Handled = true;
+                    _reactInstanceManager.DevSupportManager.ShowDevOptionsDialog();
                 }
-                else if (_isControlKeyDown && e.Key == VirtualKey.R)
+                else if (e.EventType == CoreAcceleratorKeyEventType.KeyUp && _isControlKeyDown && e.VirtualKey == VirtualKey.R)
                 {
-                    _reactInstanceManager.DevSupportManager.HandleReloadJavaScript();
-                    e.Handled = true;
+                    _reactInstanceManager.DevSupportManager.HandleReloadJavaScript();
                 }
             }
         }
-
-        /// <summary>
-        /// Captures the key up event to potentially launch the dev options menu.
-        /// </summary>
-        /// <param name="e"></param>
-        protected override void OnKeyUp(KeyRoutedEventArgs e)
-        {
-            if (_reactInstanceManager.DevSupportManager.IsEnabled)
-            {
-                if (e.Key == VirtualKey.Menu)
-                {
-                    _reactInstanceManager.DevSupportManager.ShowDevOptionsDialog();
-                    e.Handled = true;
-                }
-                else if (e.Key == VirtualKey.Shift)
-                {
-                    _isShiftKeyDown = false;
-                }
-                else if (e.Key == VirtualKey.Control)
-                {
-                    _isControlKeyDown = false;
-                }
-            }
-        }
+

         private IReactInstanceManager CreateReactInstanceManager()
         {


reduced visibility of GivenSut and WhenSut for SutSpecification

--- src/dokimi/dokimi.core/Specs/SutSpecification.cs
+++ src/dokimi/dokimi.core/Specs/SutSpecification.cs
@@ -6,8 +6,8 @@
 {
     public class SutSpecification<TSut, TResult> : Specification
     {
-        private GivenSut<TSut> _given;
-        private WhenSut<TSut, TResult> _when;
+        private GivenSut _given;
+        private WhenSut _when;
         private readonly Expectations _expectations = new Expectations();

         public SpecificationCategory SpecificationCategory { get; private set; }
@@ -46,7 +46,7 @@

             public ExpectingWhen Given(string description, Expression<Func<TSut>> factory)
             {
-                _instance._given = new GivenSut<TSut>(factory, description);
+                _instance._given = new GivenSut(factory, description);
                 return new ExpectingWhen(_instance);
             }
         }
@@ -67,7 +67,7 @@

             public ExpectingThen When(string description, Expression<Func<TSut, TResult>> when)
             {
-                _instance._when = new WhenSut<TSut, TResult>(when, description);
+                _instance._when = new WhenSut(when, description);
                 return new ExpectingThen(_instance);
             }
         }
@@ -153,56 +153,56 @@

             return spec;
         }
-    }
-
-    public class GivenSut<TSut>
-    {
-        private readonly Expression<Func<TSut>> _given;
-        private readonly string _description;
-
-        public GivenSut(Expression<Func<TSut>> given, string description)
-        {
-            _given = given;
-            _description = description;
-        }
-
-        public void DescribeTo(SpecInfo spec, MessageFormatter formatter)
-        {
-            var description = string.IsNullOrWhiteSpace(_description) ? formatter.FormatMessage(_given) : _description;
-
-            spec.ReportGivenStep(new StepInfo(description));
-        }
-
-        public TSut GetSut(SpecInfo info)
-        {
-            var result = _given.Compile()();
-            return result;
-        }
-    }
-
-    public class WhenSut<TSut, TResult>
-    {
-        private readonly Expression<Func<TSut, TResult>> _when;
-        private readonly string _description;
-
-        public WhenSut(Expression<Func<TSut, TResult>> when, string description)
-        {
-            _when = when;
-            _description = description;
-        }
-
-        public void DescribeTo(SpecInfo spec)
-        {
-            if (!string.IsNullOrWhiteSpace(_description))
-                spec.ReportWhenStep(_description);
-            else
-                spec.ReportWhenStep(_when);
-        }
-
-        public TResult GetResult(TSut sut)
-        {
-            var result = _when.Compile()(sut);
-            return result;
+
+        private class GivenSut
+        {
+            private readonly Expression<Func<TSut>> _given;
+            private readonly string _description;
+
+            public GivenSut(Expression<Func<TSut>> given, string description)
+            {
+                _given = given;
+                _description = description;
+            }
+
+            public void DescribeTo(SpecInfo spec, MessageFormatter formatter)
+            {
+                var description = string.IsNullOrWhiteSpace(_description) ? formatter.FormatMessage(_given) : _description;
+
+                spec.ReportGivenStep(new StepInfo(description));
+            }
+
+            public TSut GetSut(SpecInfo info)
+            {
+                var result = _given.Compile()();
+                return result;
+            }
+        }
+
+        private class WhenSut
+        {
+            private readonly Expression<Func<TSut, TResult>> _when;
+            private readonly string _description;
+
+            public WhenSut(Expression<Func<TSut, TResult>> when, string description)
+            {
+                _when = when;
+                _description = description;
+            }
+
+            public void DescribeTo(SpecInfo spec)
+            {
+                if (!string.IsNullOrWhiteSpace(_description))
+                    spec.ReportWhenStep(_description);
+                else
+                    spec.ReportWhenStep(_when);
+            }
+
+            public TResult GetResult(TSut sut)
+            {
+                var result = _when.Compile()(sut);
+                return result;
+            }
         }
     }
 }


Unset read-only before deleting a file.

Unset read-only before deleting a file.

--- src/ContentSync/Sync.cs
+++ src/ContentSync/Sync.cs
@@ -39,6 +39,12 @@
             foreach (var rightOnly in diff.RightOnlyFiles)
             {
                 var deletedFilePath = destination + rightOnly;
+                var attributes = File.GetAttributes(deletedFilePath);
+                if ((attributes & FileAttributes.ReadOnly) == FileAttributes.ReadOnly)
+                {
+                    File.SetAttributes(deletedFilePath, attributes & ~FileAttributes.ReadOnly);
+                }
+
                 File.Delete(deletedFilePath);
                 Console.WriteLine("Delete " + deletedFilePath);
             }


Add key remapping funcionality to InputSystem

--- src/Core/InputSystem.cs
+++ src/Core/InputSystem.cs
@@ -15,6 +15,8 @@

         public static Dictionary<Key, KeyRepeatSettings> RepeatingKeys = new Dictionary<Key, KeyRepeatSettings>();

+        public static Dictionary<Key, Key> KeyRemappings = new Dictionary<Key, Key>();
+
         public static List<MouseButton> ReleasedButtons = new List<MouseButton>();
         public static List<MouseButton> CurrentButtons = new List<MouseButton>();
         public static List<MouseButton> PressedButtons = new List<MouseButton>();
@@ -44,28 +46,46 @@

         public static void KeyDown(KeyboardKeyEventArgs e)
         {
-            if (Focused) {
-
-                if (!NewKeys.Contains(e.Key) && !CurrentKeys.Contains(e.Key))
-                {
-                    NewKeys.Add(e.Key);
-                }
-                //NewKeys.Add(e.Key);
-                if (!CurrentKeys.Contains(e.Key)) {
-                    CurrentKeys.Add(e.Key);
-                }
+            if (Focused)
+            {
+                HandleKeyDown(e.Key);
+                var remappedKey = RemapKey(e.Key);
+                if (remappedKey != e.Key)
+                    HandleKeyDown(remappedKey);
+            }
+        }
+
+        private static void HandleKeyDown(Key key)
+        {
+            if (!NewKeys.Contains(key) && !CurrentKeys.Contains(key))
+            {
+                NewKeys.Add(key);
+            }
+            if (!CurrentKeys.Contains(key))
+            {
+                CurrentKeys.Add(key);
             }
         }

         public static void KeyUp(KeyboardKeyEventArgs e)
         {
-            if (Focused) {
-                if (CurrentKeys.Contains(e.Key)) {
-                    CurrentKeys.Remove(e.Key);
-                }
-                if (!ReleasedKeys.Contains(e.Key))
-                    ReleasedKeys.Add(e.Key);
-            }
+            if (Focused)
+            {
+                HandleKeyUp(e.Key);
+                var remappedKey = RemapKey(e.Key);
+                if (remappedKey != e.Key)
+                    HandleKeyUp(remappedKey);
+            }
+        }
+
+        private static void HandleKeyUp(Key key)
+        {
+            if (CurrentKeys.Contains(key))
+            {
+                CurrentKeys.Remove(key);
+            }
+            if (!ReleasedKeys.Contains(key))
+                ReleasedKeys.Add(key);
         }

         public static void MouseDown(MouseButtonEventArgs e)
@@ -165,6 +185,9 @@
             }
         }

+        private static Key RemapKey(Key oldKey)
+            => KeyRemappings.ContainsKey(oldKey) ? RemapKey(KeyRemappings[oldKey]) : oldKey;
+
         private static void UpdateGUIInputs()
         {
             foreach (OpenTKAlternative gInput in _guiInputDevices)
@@ -207,9 +230,6 @@
             MouseDelta = Vector2.Subtract(MouseXY, MousePreviousXY);
             HasMouseMoved = true;
         }
-
-
-        public static Key[] Letters = { Key.A, Key.B, Key.C, Key.D, Key.E, Key.F, Key.G };
 	}

     public class KeyRepeatSettings


Add 'disable' command line option

Add 'disable' command line option

--- src/DeadCode/Program.cs
+++ src/DeadCode/Program.cs
@@ -30,6 +30,7 @@
             var projectPaths = new List<string>();
             IEnumerable<string> ignoredSymbols = null;
             IEnumerable<string> definedSymbols = null;
+            IEnumerable<string> disabledSymbols = null;

             for (int i = 0; i < args.Length; i++)
             {
@@ -54,6 +55,18 @@
                         if (++i < args.Length)
                         {
                             definedSymbols = args[i].Split(';', ',', ' ', '\t', '\n');
+                        }
+                        else
+                        {
+                            PrintUsage();
+                            return -1;
+                        }
+                    }
+                    else if (argName.Equals("disable", StringComparison.InvariantCultureIgnoreCase))
+                    {
+                        if (++i < args.Length)
+                        {
+                            disabledSymbols = args[i].Split(';', ',', ' ', '\t', '\n');
                         }
                         else
                         {
@@ -99,6 +112,7 @@
             _engine = AnalysisEngine.FromFilePaths(
                 projectPaths,
                 alwaysDefinedSymbols: definedSymbols,
+                alwaysDisabledSymbols: disabledSymbols,
                 alwaysIgnoredSymbols: ignoredSymbols);

             try


Fix references to non-existent tracks/samples

--- osu.Framework.Tests/Visual/Audio/TestSceneBassMix.cs
+++ osu.Framework.Tests/Visual/Audio/TestSceneBassMix.cs
@@ -54,10 +54,9 @@
             Bass.ChannelPlay(mixerHandle);
             Logger.Log($"[BASSDLL] ChannelPlay: {Bass.LastError}");
             channelHandles[num_mix_channels - 1] = mixerHandle;
-            // bassTrack = (TrackBass)tracks.Get("sample-track.mp3");

             // Load BGM Track
-            var bgmData = resources.Get("Resources.Tracks.bgm_main.ogg");
+            var bgmData = resources.Get("Resources.Tracks.sample-track.mp3");
             trackHandle = Bass.CreateStream(bgmData, 0, bgmData.Length, BassFlags.Decode | BassFlags.Loop);

             // Add BGM Track to Mixer
@@ -66,7 +65,7 @@
             channelHandles[0] = trackHandle;

             // Load SFX1
-            var sfxData = resources.Get("Resources.Samples.se_common_move2.ogg");
+            var sfxData = resources.Get("Resources.Samples.long.mp3");
             sfxHandle = Bass.CreateStream(sfxData, 0, sfxData.Length, BassFlags.Decode);

             // Add SFX1 to Mixer
@@ -75,7 +74,7 @@
             channelHandles[1] = sfxHandle;

             // Load SFX2
-            var sfx2Data = resources.Get("Resources.Samples.loud.wav");
+            var sfx2Data = resources.Get("Resources.Samples.tone.wav");
             sfx2Handle = Bass.CreateStream(sfx2Data, 0, sfx2Data.Length, BassFlags.Decode);

             // Add SFX1 to Mixer


Disallow clicking through the scrollbar

Disallow clicking through the scrollbar

--- osu.Framework/Graphics/Containers/ScrollContainer.cs
+++ osu.Framework/Graphics/Containers/ScrollContainer.cs
@@ -387,6 +387,8 @@
                 ResizeTo(size, duration, easing);
             }

+            protected override bool OnClick(InputState state) => true;
+
             protected override bool OnHover(InputState state)
             {
                 FadeColour(hover_colour, 100);


Expose content background.

Expose content background.

--- osu.Framework/Graphics/UserInterface/DropDownMenu.cs
+++ osu.Framework/Graphics/UserInterface/DropDownMenu.cs
@@ -130,6 +130,7 @@
         }

         private DropDownMenuState state = DropDownMenuState.Closed;
+        protected Box ContentBackground;

         public DropDownMenuState State
         {
@@ -179,11 +180,10 @@
                     Masking = true,
                     Children = new Drawable[]
                     {
-                        new Box
+                        ContentBackground = new Box
                         {
                             RelativeSizeAxes = Axes.Both,
                             Colour = Color4.Black,
-                            Alpha = 0.8f,
                         },
                         new ScrollContainer
                         {


Renamings + refactorings to Pattern.

Renamings + refactorings to Pattern.

--- osu.Game.Rulesets.Mania/Beatmaps/Patterns/Pattern.cs
+++ osu.Game.Rulesets.Mania/Beatmaps/Patterns/Pattern.cs
@@ -21,16 +21,16 @@
         public IEnumerable<ManiaHitObject> HitObjects => hitObjects;

         /// <summary>
-        /// Whether this pattern already contains a hit object in a code.
+        /// Check whether a column of this patterns contains a hit object.
         /// </summary>
         /// <param name="column">The column index.</param>
-        /// <returns>Whether this pattern already contains a hit object in <paramref name="column"/></returns>
-        public bool IsFilled(int column) => hitObjects.Exists(h => h.Column == column);
+        /// <returns>Whether the column with index <paramref name="column"/> contains a hit object.</returns>
+        public bool ColumnHasObject(int column) => hitObjects.Exists(h => h.Column == column);

         /// <summary>
         /// Amount of columns taken up by hit objects in this pattern.
         /// </summary>
-        public int ColumnsFilled => HitObjects.GroupBy(h => h.Column).Count();
+        public int ColumnWithObjects => HitObjects.GroupBy(h => h.Column).Count();

         /// <summary>
         /// Adds a hit object to this pattern.
@@ -42,10 +42,7 @@
         /// Copies hit object from another pattern to this one.
         /// </summary>
         /// <param name="other">The other pattern.</param>
-        public void Add(Pattern other)
-        {
-            other.HitObjects.ForEach(Add);
-        }
+        public void Add(Pattern other) => hitObjects.AddRange(other.HitObjects);

         /// <summary>
         /// Clears this pattern, removing all hit objects.


add test scene for error page

add test scene for error page

--- osu.Game.Tests/Visual/Online/TestSceneWikiOverlay.cs
+++ osu.Game.Tests/Visual/Online/TestSceneWikiOverlay.cs
@@ -1,6 +1,7 @@
 // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
 // See the LICENCE file in the repository root for full licence text.

+using System.Net;
 using NUnit.Framework;
 using osu.Game.Online.API;
 using osu.Game.Online.API.Requests;
@@ -32,7 +33,14 @@
             AddStep("Show Article Page", () => wiki.ShowPage("Interface"));
         }

-        private void setUpWikiResponse(APIWikiPage r)
+        [Test]
+        public void TestErrorPage()
+        {
+            setUpWikiResponse(null, true);
+            AddStep("Show Error Page", () => wiki.ShowPage("Error"));
+        }
+
+        private void setUpWikiResponse(APIWikiPage r, bool isFailed = false)
             => AddStep("set up response", () =>
             {
                 dummyAPI.HandleRequest = request =>
@@ -40,7 +48,11 @@
                     if (!(request is GetWikiRequest getWikiRequest))
                         return false;

-                    getWikiRequest.TriggerSuccess(r);
+                    if (isFailed)
+                        getWikiRequest.TriggerFailure(new WebException());
+                    else
+                        getWikiRequest.TriggerSuccess(r);
+
                     return true;
                 };
             });


Do not hardcore values

Do not hardcore values

--- source/Cosmos.System2/Network/IPv4/TCP/TCPClient.cs
+++ source/Cosmos.System2/Network/IPv4/TCP/TCPClient.cs
@@ -116,15 +116,14 @@

             Address source = IPConfig.FindNetwork(dest);

-            //TODO: Generate sequence number
-            //TODO: Dynamic header len
-            // Flags=0x02 -> Syn
-            var packet = new TCPPacket(source, dest, (ushort)localPort, (ushort)destPort, 3455719727, 0, 20 + 12, 0x02, 0xFAF0, 0, 12);
-
             byte[] options = new byte[]
             {
                 0x02, 0x04, 0x05, 0xB4, 0x01, 0x03, 0x03, 0x08, 0x01, 0x01, 0x04, 0x02
             };
+
+            //TODO: Generate sequence number
+            // Flags=0x02 -> Syn
+            var packet = new TCPPacket(source, dest, (ushort)localPort, (ushort)destPort, 3455719727, 0, (ushort)(20 + options.Length), 0x02, 0xFAF0, 0, (ushort)options.Length);

             packet.AddOption(options);


Security check + throw exception if packet sequencing + add IsConnected method

--- source/Cosmos.System2/Network/IPv4/TCP/TCPClient.cs
+++ source/Cosmos.System2/Network/IPv4/TCP/TCPClient.cs
@@ -155,8 +155,14 @@
         /// </summary>
         /// <param name="dest">Destination address.</param>
         /// <param name="destPort">Destination port.</param>
+        /// <exception cref="Exception">Thrown if TCP Status is not CLOSED.</exception>
         public void Connect(Address dest, int destPort, int timeout = 5000)
         {
+            if (Status != Status.CLOSED)
+            {
+                throw new Exception("Client must be closed before setting a new connection.");
+            }
+
             destination = dest;
             destinationPort = destPort;

@@ -184,8 +190,13 @@
         /// Close connection.
         /// </summary>
         /// <exception cref="ArgumentOutOfRangeException">Thrown on fatal error (contact support).</exception>
+        /// <exception cref="Exception">Thrown if TCP Status is CLOSED.</exception>
         public void Close()
         {
+            if (Status == Status.CLOSED)
+            {
+                throw new Exception("Client already closed.");
+            }
             if (Status == Status.ESTABLISHED)
             {
                 var packet = new TCPPacket(source, destination, (ushort)localPort, (ushort)destinationPort, SequenceNumber, AckNumber, 20, (byte)(Flags.FIN | Flags.ACK), 0xFAF0, 0);
@@ -216,6 +227,7 @@
         /// <exception cref="ArgumentException">Thrown on fatal error (contact support).</exception>
         /// <exception cref="OverflowException">Thrown if data array length is greater than Int32.MaxValue.</exception>
         /// <exception cref="Sys.IO.IOException">Thrown on IO error.</exception>
+        /// <exception cref="Exception">Thrown if TCP Status is not ESTABLISHED.</exception>
         public void Send(byte[] data)
         {
             if ((destination == null) || (destinationPort == 0))
@@ -225,6 +237,10 @@
             if (data.Length > 1500)
             {
                 throw new NotImplementedException("Data length must be less than 1500 bytes (yet!)");
+            }
+            if (Status != Status.ESTABLISHED)
+            {
+                throw new Exception("Client must be connected before sending data.");
             }

             var packet = new TCPPacket(source, destination, (ushort)localPort, (ushort)destinationPort, SequenceNumber, AckNumber, 20, 0x18, 0xFAF0, 0, data);
@@ -232,11 +248,6 @@
             NetworkStack.Update();

             SequenceNumber += (uint)data.Length;
-
-            /*if (WaitStatus(Status.OPENED, 5000) == false)
-            {
-                throw new Exception("Failed to send TCP data!");
-            }*/
         }

         /// <summary>
@@ -245,8 +256,13 @@
         /// <param name="source">Source end point.</param>
         /// <returns>byte array value.</returns>
         /// <exception cref="InvalidOperationException">Thrown on fatal error (contact support).</exception>
+        /// <exception cref="Exception">Thrown if TCP Status is not ESTABLISHED.</exception>
         public byte[] NonBlockingReceive(ref EndPoint source)
         {
+            if (Status != Status.ESTABLISHED)
+            {
+                throw new Exception("Client must be connected before receiving data.");
+            }
             if (rxBuffer.Count < 1)
             {
                 return null;
@@ -265,8 +281,13 @@
         /// <param name="source">Source end point.</param>
         /// <returns>byte array value.</returns>
         /// <exception cref="InvalidOperationException">Thrown on fatal error (contact support).</exception>
+        /// <exception cref="Exception">Thrown if TCP Status is not ESTABLISHED.</exception>
         public byte[] Receive(ref EndPoint source)
         {
+            if (Status != Status.ESTABLISHED)
+            {
+                throw new Exception("Client must be connected before receiving data.");
+            }
             while (rxBuffer.Count < 1);

             var packet = new TCPPacket(rxBuffer.Dequeue().RawData);
@@ -336,7 +357,15 @@
             }
             else if (Status == Status.ESTABLISHED)
             {
-                if (packet.FIN && packet.ACK)
+                if (packet.RST)
+                {
+                    Status = Status.CLOSED;
+                }
+                else if (packet.TCPFlags == (byte)Flags.ACK) //only ACK
+                {
+                    throw new NotImplementedException("TCP sequencing is not supported yet! (received packet size is too huge)");
+                }
+                else if (packet.FIN && packet.ACK)
                 {
                     AckNumber++;

@@ -369,61 +398,55 @@
                         SendEmptyPacket(Flags.ACK);
                     }
                 }
-                else if (packet.RST)
-                {
-                    AckNumber = packet.SequenceNumber + 1;
-
+            }
+            else if (Status == Status.FIN_WAIT1)
+            {
+                if (packet.FIN && packet.ACK)
+                {
+                    AckNumber++;
+
+                    SendEmptyPacket(Flags.ACK);
+
+                    WaitAndClose();
+                }
+                else if (packet.FIN)
+                {
+                    AckNumber++;
+
+                    SendEmptyPacket(Flags.ACK);
+
+                    Status = Status.CLOSING;
+                }
+                else if (packet.ACK)
+                {
+                    Status = Status.FIN_WAIT2;
+                }
+            }
+            else if (Status == Status.FIN_WAIT2)
+            {
+                if (packet.FIN)
+                {
+                    AckNumber++;
+
+                    SendEmptyPacket(Flags.ACK);
+
+                    WaitAndClose();
+                }
+            }
+            else if (Status == Status.CLOSING)
+            {
+                if (packet.ACK)
+                {
+                    WaitAndClose();
+                }
+            }
+            else if (Status == Status.CLOSE_WAIT || Status == Status.LAST_ACK)
+            {
+                if (packet.ACK)
+                {
                     Status = Status.CLOSED;
                 }
             }
-            else if (Status == Status.FIN_WAIT1)
-            {
-                if (packet.FIN && packet.ACK)
-                {
-                    AckNumber++;
-
-                    SendEmptyPacket(Flags.ACK);
-
-                    WaitAndClose();
-                }
-                else if (packet.FIN)
-                {
-                    AckNumber++;
-
-                    SendEmptyPacket(Flags.ACK);
-
-                    Status = Status.CLOSING;
-                }
-                else if (packet.ACK)
-                {
-                    Status = Status.FIN_WAIT2;
-                }
-            }
-            else if (Status == Status.FIN_WAIT2)
-            {
-                if (packet.FIN)
-                {
-                    AckNumber++;
-
-                    SendEmptyPacket(Flags.ACK);
-
-                    WaitAndClose();
-                }
-            }
-            else if (Status == Status.CLOSING)
-            {
-                if (packet.ACK)
-                {
-                    WaitAndClose();
-                }
-            }
-            else if (Status == Status.CLOSE_WAIT || Status == Status.LAST_ACK)
-            {
-                if (packet.ACK)
-                {
-                    Status = Status.CLOSED;
-                }
-            }
         }

         /// <summary>
@@ -433,7 +456,7 @@
         {
             Status = Status.TIME_WAIT;

-            //Thread.Sleep(100); //100ms for now
+            HAL.Global.PIT.Wait(300); //TODO: Calculate time value

             Status = Status.CLOSED;
         }
@@ -473,6 +496,22 @@
         }

         /// <summary>
+        /// Is TCP Connected.
+        /// </summary>
+        /// <returns>Boolean value.</returns>
+        public bool IsConnected()
+        {
+            if (Status == Status.ESTABLISHED)
+            {
+                return true;
+            }
+            else
+            {
+                return false;
+            }
+        }
+
+        /// <summary>
         /// Close Client
         /// </summary>
         public void Dispose()


[WIP] Packet sequencing on sent packets.

--- source/Cosmos.System2/Network/IPv4/TCP/TCPClient.cs
+++ source/Cosmos.System2/Network/IPv4/TCP/TCPClient.cs
@@ -229,22 +229,36 @@
             {
                 throw new InvalidOperationException("Must establish a default remote host by calling Connect() before using this Send() overload");
             }
+            if (Status != Status.ESTABLISHED)
+            {
+                throw new Exception("Client must be connected before sending data.");
+            }
             if (data.Length > 1500)
             {
                 throw new NotImplementedException("Data length must be less than 1500 bytes (yet!)");
             }
-            if (Status != Status.ESTABLISHED)
-            {
-                throw new Exception("Client must be connected before sending data.");
-            }
-
-            var packet = new TCPPacket(source, destination, (ushort)localPort, (ushort)destinationPort, SequenceNumber, AckNumber, 20, (byte)(Flags.PSH | Flags.ACK), 0xFAF0, 0, data);
-            OutgoingBuffer.AddPacket(packet);
-            NetworkStack.Update();
-
+            if (data.Length > 1500) //should never go here
+            {
+                var chunks = BufferSplit(data, 537);
+
+                for (int i = 0; i < chunks.Length; i++)
+                {
+                    var packet = new TCPPacket(source, destination, (ushort)localPort, (ushort)destinationPort, SequenceNumber, AckNumber, 20, i == chunks.Length - 2 ? (byte)(Flags.PSH | Flags.ACK) : (byte)(Flags.ACK), 0xFAF0, 0, chunks[i]);
+                    OutgoingBuffer.AddPacket(packet);
+                    NetworkStack.Update();
+
+                    SequenceNumber += (uint)chunks[i].Length;
+                }
+            }
+            else
+            {
+                var packet = new TCPPacket(source, destination, (ushort)localPort, (ushort)destinationPort, SequenceNumber, AckNumber, 20, (byte)(Flags.PSH | Flags.ACK), 0xFAF0, 0, data);
+                OutgoingBuffer.AddPacket(packet);
+                NetworkStack.Update();
+
+                SequenceNumber += (uint)data.Length;
+            }
             WaitingAck = true;
-
-            SequenceNumber += (uint)data.Length;
         }

         /// <summary>
@@ -543,12 +557,11 @@
         private byte[] Concat(byte[] a, byte[] b)
         {
             byte[] output;
-            int alen;
+            int alen = 0;

             if (a == null)
             {
                 output = new byte[b.Length];
-                alen = 0;
             }
             else
             {
@@ -567,6 +580,22 @@
         }

         /// <summary>
+        /// Split byte array into chunks. https://stackoverflow.com/a/50655528
+        /// </summary>
+        public static byte[][] BufferSplit(byte[] buffer, int blockSize)
+        {
+            byte[][] blocks = new byte[(buffer.Length + blockSize - 1) / blockSize][];
+
+            for (int i = 0, j = 0; i < blocks.Length; i++, j += blockSize)
+            {
+                blocks[i] = new byte[Math.Min(blockSize, buffer.Length - j)];
+                Array.Copy(buffer, j, blocks[i], 0, blocks[i].Length);
+            }
+
+            return blocks;
+        }
+
+        /// <summary>
         /// Wait until remote receive ACK of its connection termination request.
         /// </summary>
         private void WaitAndClose()


Clean up Disposewatch

Clean up Disposewatch

--- source/MasterDevs.Core/Import/Utils/Disposewatch.cs
+++ source/MasterDevs.Core/Import/Utils/Disposewatch.cs
@@ -1,58 +1,46 @@
-using MasterDevs.Core.Common.Infrastructure;
+using MasterDevs.Core.Common.Service;
 using System;
-using Debug = System.Diagnostics.Debug;
+using System.Diagnostics;

 namespace MasterDevs.Core.Common.Utils
 {
     public class Disposewatch : IDisposable
     {
-        private const string DEFAULT_Message = @"Finished ";
-        private readonly DateTime _startTime = DateTime.Now;
-        private readonly string Message;
-        private readonly Action<TimeSpan> OnFinished;
-        private readonly Action<string> OnFinishedMessage;
-        private bool isDisposed = false;
+        private const string DEFAULT_MESSAGE = @"Finished ";

-        private Disposewatch(string message, Action<string> onFinishedMessage, Action<TimeSpan> onFinished = null)
+        private readonly Action<TimeSpan> _onFinished;
+        private bool _isDisposed = false;
+        private Stopwatch _watch;
+
+        private Disposewatch(Action<TimeSpan> onFinished)
         {
-            Message = CodeContract.RequireNotNull(message, "message");
-            OnFinishedMessage = CodeContract.RequireNotNull(onFinishedMessage, "onFinishedMessage");
-            OnFinished = onFinished;
-            Duration = TimeSpan.Zero;
+            _onFinished = onFinished.RequireNotNull("onFinished");
+            _watch = Stopwatch.StartNew();
         }

-        public TimeSpan Duration { get; private set; }
-
-        private static Action<string> DefaultMessageAction
+        public static Disposewatch Start(string message = DEFAULT_MESSAGE)
         {
-            get { return (Action<string>)((s) => Debug.WriteLine(s)); }
+            return new Disposewatch(e => Debug.WriteLine("{0 }{1}", message, e));
         }

-        public static Disposewatch Start(string message = DEFAULT_Message)
+        public static Disposewatch Start(ILogger logger, string message = DEFAULT_MESSAGE)
         {
-            return new Disposewatch(message, DefaultMessageAction);
-        }
-
-        public static Disposewatch Start(Action<string> onFinishedMessage, string message = DEFAULT_Message)
-        {
-            return new Disposewatch(message, onFinishedMessage);
+            return new Disposewatch(e => logger.Debug("{0 }{1}", message, e));
         }

         public static Disposewatch StartTimeSpan(Action<TimeSpan> onFinished)
         {
-            return new Disposewatch(DEFAULT_Message, msg => { }, onFinished);
+            return new Disposewatch(onFinished);
         }

         public void Dispose()
         {
-            if (isDisposed) return;
-            isDisposed = true;
+            if (_isDisposed) return;
+            _isDisposed = true;

-            var stopTime = DateTime.Now;
-            Duration = stopTime - _startTime;
+            _watch.Stop();

-            OnFinished.SafeInvoke(Duration);
-            OnFinishedMessage.SafeInvoke(string.Format(@"{0}{1}", Message, Duration));
+            _onFinished.SafeInvoke(_watch.Elapsed);
         }
     }
 }


Bitmap変換処理の修正

Bitmap変換処理の修正

--- source/WinCap/Utilities/Drawing/BitmapExtensions.cs
+++ source/WinCap/Utilities/Drawing/BitmapExtensions.cs
@@ -1,28 +1,35 @@
-using System;
-using System.Drawing;
-using System.Windows;
-using System.Windows.Interop;
-using System.Windows.Media.Imaging;
-using WinCap.Win32;
-
-namespace WinCap.Utilities.Drawing
-{
-    /// <summary>
-    /// Bitmap拡張
-    /// </summary>
-    public static class BitmapExtensions
-    {
-        /// <summary>
-        /// <see cref="Bitmap"/>オブジェクトを<see cref="BitmapSource"/>オブジェクトに変換する。
-        /// </summary>
-        /// <param name="source">Bitmapオブジェクト</param>
-        /// <returns>BitmapSourceオブジェクト</returns>
-        public static BitmapSource ToBitmapSource(this Bitmap source)
-        {
-            IntPtr ptr = source.GetHbitmap();
-            BitmapSource bs = Imaging.CreateBitmapSourceFromHBitmap(ptr, IntPtr.Zero, Int32Rect.Empty, BitmapSizeOptions.FromEmptyOptions());
-            NativeMethods.DeleteObject(ptr);
-            return bs;
-        }
-    }
-}
+using System;
+using System.Drawing;
+using System.Windows;
+using System.Windows.Interop;
+using System.Windows.Media.Imaging;
+using WinCap.Win32;
+
+namespace WinCap.Utilities.Drawing
+{
+    /// <summary>
+    /// Bitmap拡張
+    /// </summary>
+    public static class BitmapExtensions
+    {
+        /// <summary>
+        /// <see cref="Bitmap"/>オブジェクトを<see cref="BitmapSource"/>オブジェクトに変換する。
+        /// </summary>
+        /// <param name="source">Bitmapオブジェクト</param>
+        /// <returns>BitmapSourceオブジェクト</returns>
+        public static BitmapSource ToBitmapSource(this Bitmap source)
+        {
+            IntPtr ptr = source.GetHbitmap();
+            BitmapSource bs;
+            try
+            {
+                bs = Imaging.CreateBitmapSourceFromHBitmap(ptr, IntPtr.Zero, Int32Rect.Empty, BitmapSizeOptions.FromEmptyOptions());
+            }
+            finally
+            {
+                NativeMethods.DeleteObject(ptr);
+            }
+            return bs;
+        }
+    }
+}


IDT

IDT

--- source2/IL2CPU/Cosmos.IL2CPU.X86/CosmosAssembler.cs
+++ source2/IL2CPU/Cosmos.IL2CPU.X86/CosmosAssembler.cs
@@ -87,6 +87,8 @@
       return xResult;
     }

+    byte mGdCode;
+    byte mGdData;
     public void CreateGDT() {
       new Comment(this, "BEGIN - Create GDT");
       var xGDT = new List<byte>();
@@ -94,10 +96,10 @@
       // Not used, but required by many emulators.
       xGDT.AddRange(new byte[8] { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 });
       // Code Segment
-      byte xCodeSelector = (byte)xGDT.Count;
+      mGdCode = (byte)xGDT.Count;
       xGDT.AddRange(GdtDescriptor(0x00000000, 0xFFFFFFFF, true));
       // Data Segment - Selector
-      byte xDataSelector = (byte)xGDT.Count;
+      mGdData = (byte)xGDT.Count;
       xGDT.AddRange(GdtDescriptor(0x00000000, 0xFFFFFFFF, false));
       DataMembers.Add(new DataMember("_NATIVE_GDT_Contents", xGDT.ToArray()));

@@ -118,7 +120,7 @@
       new Lgdt { DestinationReg = Registers.EAX, DestinationIsIndirect = true };

       new Comment("Set data segments");
-      new Move { DestinationReg = Registers.AX, SourceValue = xDataSelector };
+      new Move { DestinationReg = Registers.AX, SourceValue = mGdData };
       new Move { DestinationReg = Registers.DS, SourceReg = Registers.AX };
       new Move { DestinationReg = Registers.ES, SourceReg = Registers.AX };
       new Move { DestinationReg = Registers.FS, SourceReg = Registers.AX };
@@ -126,21 +128,40 @@
       new Move { DestinationReg = Registers.SS, SourceReg = Registers.AX };

       new Comment("Force reload of code segment");
-      new JumpToSegment { Segment = xCodeSelector, DestinationLabel = "Boot_FlushCsGDT" };
+      new JumpToSegment { Segment = mGdCode, DestinationLabel = "Boot_FlushCsGDT" };
       new Label("Boot_FlushCsGDT");
       new Comment(this, "END - Create GDT");
     }

-    protected void SetIdtDescriptor(byte[] aIDT, int aNo) {
+    protected void SetIdtDescriptor(int aNo, string aLabel) {
+      int xOffset = aNo * 8;
+      new Move { DestinationReg = Registers.EAX, SourceRef = ElementReference.New(aLabel) };
+      var xIDT = ElementReference.New("_NATIVE_IDT_Contents");
+      new Move { DestinationRef = xIDT, DestinationIsIndirect = true, DestinationDisplacement = xOffset, SourceReg = Registers.AL };
+      new Move { DestinationRef = xIDT, DestinationIsIndirect = true, DestinationDisplacement = xOffset + 1, SourceReg = Registers.AH };
+      new ShiftRight { DestinationReg = Registers.EAX, SourceValue = 16 };
+      new Move { DestinationRef = xIDT, DestinationIsIndirect = true, DestinationDisplacement = xOffset + 6, SourceReg = Registers.AL };
+      new Move { DestinationRef = xIDT, DestinationIsIndirect = true, DestinationDisplacement = xOffset + 7, SourceReg = Registers.AH };
+
+      // Code Segment
+      //TODO: Selectors are 16 bit, convert it to 16 bit but also check GDT settings first (prob just old code)
+      new Move { DestinationRef = xIDT, DestinationIsIndirect = true, DestinationDisplacement = xOffset + 2, SourceValue = mGdCode, Size = 8 };
+      new Move { DestinationRef = xIDT, DestinationIsIndirect = true, DestinationDisplacement = xOffset + 3, SourceValue = 0x00, Size = 8 };
+
+      // Reserved
+      new Move { DestinationRef = xIDT, DestinationIsIndirect = true, DestinationDisplacement = xOffset + 4, SourceValue = 0x00, Size = 8 };
+
+      // Type
+      new Move { DestinationRef = xIDT, DestinationIsIndirect = true, DestinationDisplacement = xOffset + 5, SourceValue = 0x8E, Size = 8 };
     }

     public void CreateIDT() {
       new Comment(this, "BEGIN - Create IDT");
-      var xIDT = new byte[8 * 256];
-      SetIdtDescriptor(xIDT, 3);
-
-      DataMembers.Add(new DataMember("_NATIVE_IDT_Contents", xIDT));
-      DataMembers.Add(new DataMember("_NATIVE_IDT_Pointer", new UInt16[] { (UInt16)xIDT.Length, 0, 0 }));
+      UInt16 xIdtSize = 8 * 256;
+      DataMembers.Add(new DataMember("_NATIVE_IDT_Contents", new byte[xIdtSize]));
+      DataMembers.Add(new DataMember("_NATIVE_IDT_Pointer", new UInt16[] { xIdtSize, 0, 0 }));
+      SetIdtDescriptor(3, "DebugStub_INT3");
+      new Label("DebugStub_INT3");
       new Comment(this, "END - Create IDT");
     }


Formatting

Formatting

--- src/AspComet.Specifications/AutoStubbingScenario.cs
+++ src/AspComet.Specifications/AutoStubbingScenario.cs
@@ -15,7 +15,7 @@
         static TSut sut;

         Establish context = () =>
-                            dependencies = new Dictionary<Type, object>();
+            dependencies = new Dictionary<Type, object>();

         Cleanup stuff = () =>
         {


Fix Issue #232 Corrupted xlsx when CurrentCulture time separator is not :

--- openxml4Net/OPC/Internal/PackagePropertiesPart.cs
+++ openxml4Net/OPC/Internal/PackagePropertiesPart.cs
@@ -621,7 +621,7 @@
                 return "";
             else {
                 SimpleDateFormat df = new SimpleDateFormat(DEFAULT_DATEFORMAT);
-                return df.Format(d.Value, CultureInfo.CurrentCulture);
+                return df.Format(d.Value, CultureInfo.InvariantCulture);
             }
         }


Fix not releasing chat focus after sending a message (#11865)

--- Content.Client/UserInterface/Systems/Chat/ChatUIController.cs
+++ Content.Client/UserInterface/Systems/Chat/ChatUIController.cs
@@ -630,7 +630,7 @@

         box.ChatInput.Input.Clear();
         box.UpdateSelectedChannel();
-        box.ChatInput.ReleaseKeyboardFocus();
+        box.ChatInput.Input.ReleaseKeyboardFocus();
     }

     private void OnChatMessage(MsgChatMessage msg)


Fix a typo

Fix a typo

--- Database.Migrations/Migrations/4-ThisMonthsTestResultsView.cs
+++ Database.Migrations/Migrations/4-ThisMonthsTestResultsView.cs
@@ -3,7 +3,7 @@

 namespace BroadbandSpeedTests.Database.Migrations.Migrations
 {
-    [Migration(20170300)]
+    [Migration(20170302)]
     public class ThisMonthsTestResultsView : Migration
     {
         public override void Up()


better metadata warning info

better metadata warning info

--- Duplicati/Library/Main/Operation/Backup/FileBlockProcessor.cs
+++ Duplicati/Library/Main/Operation/Backup/FileBlockProcessor.cs
@@ -71,7 +71,7 @@
                                     if (!res.Item1)
                                         return res.Item2;

-                                    Logging.Log.WriteWarningMessage(FILELOGTAG, "UnexpextedMetadataLookup", null, "Metadata was reported as not changed, but still requires being added?\nHash: {0}, Length: {1}, ID: {2}", e.MetaHashAndSize.FileHash, e.MetaHashAndSize.Blob.Length, res.Item2);
+                                    Logging.Log.WriteWarningMessage(FILELOGTAG, "UnexpextedMetadataLookup", null, "Metadata was reported as not changed, but still requires being added?\nPath: {0}, Hash: {1}, Length: {2}, ID: {3}", e.Path, e.MetaHashAndSize.FileHash, e.MetaHashAndSize.Blob.Length, res.Item2);
                                     e.MetadataChanged = true;
                                 }


Fix info wedge test case failing randomly

--- osu.Game.Tests/Visual/TestCaseBeatmapInfoWedge.cs
+++ osu.Game.Tests/Visual/TestCaseBeatmapInfoWedge.cs
@@ -3,6 +3,7 @@

 using System.Collections.Generic;
 using System.Linq;
+using JetBrains.Annotations;
 using NUnit.Framework;
 using OpenTK;
 using osu.Framework.Allocation;
@@ -116,7 +117,7 @@

         private void testNullBeatmap()
         {
-            selectNullBeatmap();
+            selectBeatmap(null);
             AddAssert("check empty version", () => string.IsNullOrEmpty(infoWedge.Info.VersionLabel.Text));
             AddAssert("check default title", () => infoWedge.Info.TitleLabel.Text == Beatmap.Default.BeatmapInfo.Metadata.Title);
             AddAssert("check default artist", () => infoWedge.Info.ArtistLabel.Text == Beatmap.Default.BeatmapInfo.Metadata.Artist);
@@ -124,26 +125,17 @@
             AddAssert("check no info labels", () => !infoWedge.Info.InfoLabelContainer.Children.Any());
         }

-        private void selectBeatmap(IBeatmap b)
+        private void selectBeatmap([CanBeNull] IBeatmap b)
         {
             BeatmapInfoWedge.BufferedWedgeInfo infoBefore = null;

-            AddStep($"select {b.Metadata.Title} beatmap", () =>
+            AddStep($"select {b?.Metadata.Title ?? "null"} beatmap", () =>
             {
                 infoBefore = infoWedge.Info;
-                infoWedge.Beatmap = Beatmap.Value = new TestWorkingBeatmap(b);
+                infoWedge.Beatmap = Beatmap.Value = b == null ? Beatmap.Default : new TestWorkingBeatmap(b);
             });

             AddUntilStep(() => infoWedge.Info != infoBefore, "wait for async load");
-        }
-
-        private void selectNullBeatmap()
-        {
-            AddStep("select null beatmap", () =>
-            {
-                Beatmap.Value = Beatmap.Default;
-                infoWedge.Beatmap = Beatmap;
-            });
         }

         private IBeatmap createTestBeatmap(RulesetInfo ruleset)


[packages,Python,3.6.1] I believe RTLD_LAZY is defined in most distros these days

--- packages/Python-3.6.1/bam/Scripts/ConfigHeader.cs
+++ packages/Python-3.6.1/bam/Scripts/ConfigHeader.cs
@@ -177,6 +177,7 @@
                 contents.AppendLine("#define SOABI \"cpython-36\"");
                 contents.AppendLine("#define HAVE_DLFCN_H");
                 contents.AppendLine("#define HAVE_DLOPEN");
+                contents.AppendLine("#define HAVE_DECL_RTLD_LAZY 1");
                 contents.AppendLine("#define HAVE_GETADDRINFO"); // for socket extension module
                 contents.AppendLine("#define HAVE_ADDRINFO"); // for socket extension module
                 contents.AppendLine("#define HAVE_SOCKADDR_STORAGE"); // for socket extension module


fix decimal point

fix decimal point

--- HackManchester2014/HackManchester2014/Home/Views/index.cshtml
+++ HackManchester2014/HackManchester2014/Home/Views/index.cshtml
@@ -51,7 +51,7 @@

-
£@Model.TotalDonations

+
£@Model.TotalDonations.ToString("F2")

Raised so far


Switched to using webclient

Switched to using webclient

--- HeroesMatchTracker.Core/ReplayUploads/HotsLogsReplayUpload.cs
+++ HeroesMatchTracker.Core/ReplayUploads/HotsLogsReplayUpload.cs
@@ -3,7 +3,6 @@
 using Heroes.Helpers;
 using System;
 using System.Net;
-using System.Net.Http;
 using System.Threading.Tasks;
 using static Heroes.ReplayParser.DataParser;

@@ -29,9 +28,13 @@
             if (response.HttpStatusCode != HttpStatusCode.OK)
                 return ReplayParseResult.Exception;

-            HttpClient httpClient = new HttpClient();
-            httpClient.DefaultRequestHeaders.UserAgent.ParseAdd(Uploader.AppUserAgent);
-            string result = await httpClient.GetStringAsync($"https://www.hotslogs.com/UploadFile?FileName={fileGuidName}&Source=HeroesMatchTracker");
+            string result = string.Empty;
+
+            using (var webClient = new WebClient())
+            {
+                webClient.Headers.Add("user-agent", Uploader.AppUserAgent);
+                result = await webClient.DownloadStringTaskAsync($"https://www.hotslogs.com/UploadFile?FileName={fileGuidName}&Source=HeroesMatchTracker");
+            }

             if (result == "Maintenance")
                 throw new MaintenanceException("Maintenance");


create random data for geometry source version

--- ISAAR.MSolve.SamplesConsole/RVEkanoninkhsGewmetriasBuilder.cs
+++ ISAAR.MSolve.SamplesConsole/RVEkanoninkhsGewmetriasBuilder.cs
@@ -509,11 +509,95 @@
             //prwta ta n_graphene_sheets
             for (int j = 0; j < n_graphene_sheets ; j++)
             {
-                createGrShBoxSurroundingPlanes(L1[j], L2[j], sigma_f, rot_phi_1[j], rot_phi_2[j], line_points[j], line_segments[j], pl_points[j], vec1s[j], vec2s[j], perp_vec3s[j]);
-            }
-        }
-
-        public static void createGrShBoxSurroundingPlanes(double L1,double L2,double sigma_f,double rot_phi_1,double rot_phi_2,double[,] line_points, double[,] line_segments, double[,] pl_points, double[,] vec1s, double[,] vec2s, double[,]perp_vec3s)
+                createGrShBoxSurroundingPlanes(L1[j], L2[j], sigma_f, rot_phi_1[j], rot_phi_2[j],ekk_xyz[j], line_points[j], line_segments[j], pl_points[j], vec1s[j], vec2s[j], perp_vec3s[j]);
+            }
+            //kai meta to RVE box
+            createGrShBoxSurroundingPlanes(L01, L02, L03 / 7, 0,0,new double [3] { 0,0,0}, line_points[n_graphene_sheets], line_segments[n_graphene_sheets], pl_points[n_graphene_sheets], vec1s[n_graphene_sheets], vec2s[n_graphene_sheets], perp_vec3s[n_graphene_sheets]);
+
+
+
+            bool[,] GrSh_intersections = new bool [n_graphene_sheets + 1, n_graphene_sheets + 1];
+            for (int i1 = 0; i1 < n_graphene_sheets+1; i1++)
+            { for (int j1 = 0; j1 < n_graphene_sheets+1; j1++) { GrSh_intersections[i1, j1] = false; } }  // arxiko ola einai false
+
+            for (int i1 = 0; i1 < n_graphene_sheets + 1; i1++)
+            {
+                for (int i2 = i1+1; i2 < n_graphene_sheets + 1; i2++)
+                {
+                    //check for intersection between i1 and i2 graphene sheets
+                    GrSh_intersections[i1, i2] = check_for_intersection_between_i1_and_i2_graphene_sheets(i1, i2, line_points, line_segments, pl_points, vec1s, vec2s, perp_vec3s);
+                }
+            }
+            //Gemisma summetrikou
+            for (int i1 = 0; i1 < n_graphene_sheets + 1; i1++)
+            {
+                for (int i2 = i1 + 1; i2 < n_graphene_sheets + 1; i2++)
+                {
+                    GrSh_intersections[i2,i1] = GrSh_intersections[i1, i2];
+                }
+            }
+
+            // TODO display rve geometry
+            //
+
+            while (combine_bool_any(GrSh_intersections))
+            {
+
+                //epilogh GrSh
+                double inter_counter_min = sum_of_bool_array_elements(GrSh_intersections);
+
+                int chosen_GrSh=-1;
+                for (int i1 = 0; i1 < n_graphene_sheets ; i1++)
+                {
+                    bool[,] new_intersections = Clone_array(GrSh_intersections);
+
+                    for (int j = 0; j < new_intersections.GetLength(1); j++)
+                    { new_intersections[i1, j] = false; }
+                    for (int j = 0; j < new_intersections.GetLength(0); j++)
+                    { new_intersections[j,i1] = false; }
+
+                    double inter_counter = sum_of_bool_array_elements(new_intersections);
+
+                    if (inter_counter<inter_counter_min)
+                    {
+                        chosen_GrSh = i1;
+                        inter_counter_min = inter_counter;
+                    }
+                }
+
+
+                // "afairesh" tou epilegmenou kai topothetisi neou
+                rot_phi_1[chosen_GrSh] = Math.PI * rand();
+                rot_phi_2[chosen_GrSh] =0.5* Math.PI * rand();
+                ekk_xyz[chosen_GrSh][0] = -0.5 * L01 + 0.03 * L01 + ((L01 - 0.06 * L01) * rand());
+                ekk_xyz[chosen_GrSh][1] = -0.5 * L02 + 0.03 * L02 + ((L02 - 0.06 * L02) * rand());
+                ekk_xyz[chosen_GrSh][2] = -0.5 * L03 + 0.03 * L03 + ((L03 - 0.06 * L03) * rand());
+                createGrShBoxSurroundingPlanes(L1[chosen_GrSh], L2[chosen_GrSh], sigma_f, rot_phi_1[chosen_GrSh], rot_phi_2[chosen_GrSh], ekk_xyz[chosen_GrSh], line_points[chosen_GrSh], line_segments[chosen_GrSh], pl_points[chosen_GrSh], vec1s[chosen_GrSh], vec2s[chosen_GrSh], perp_vec3s[chosen_GrSh]);
+
+
+                for (int i1 = 0; i1 < n_graphene_sheets+1; i1++)
+                {
+                    //check for intersection between i1 and chosen_GrSh graphene sheets
+                    if (i1==chosen_GrSh)
+                    { }
+                    else
+                    {
+                        GrSh_intersections[i1, chosen_GrSh] = check_for_intersection_between_i1_and_i2_graphene_sheets(i1, chosen_GrSh, line_points, line_segments, pl_points, vec1s, vec2s, perp_vec3s);
+                    }
+                }
+
+                //Gemisma summetrikou
+                for (int i1 = 0; i1 < n_graphene_sheets + 1; i1++)
+                {
+                    GrSh_intersections[ chosen_GrSh,i1] = GrSh_intersections[i1, chosen_GrSh];
+                }
+            }
+
+            // return
+
+        }
+
+        public static void createGrShBoxSurroundingPlanes(double L1,double L2,double sigma_f,double rot_phi_1,double rot_phi_2,double [] ekk_xyz,double[,] line_points, double[,] line_segments, double[,] pl_points, double[,] vec1s, double[,] vec2s, double[,]perp_vec3s)
         {
             double[,] line_points_data = new double[3, 12] { { 0.5 * L1, -0.5 * L1, -0.5 * L1, 0.5 * L1, -0.5 * L1, -0.5 * L1, -0.5 * L1, -0.5 * L1, 0.5 * L1, -0.5 * L1, -0.5 * L1, 0.5 * L1 },
                 {0.5*L2,0.5*L2,-0.5*L2,-0.5*L2,0.5*L2,-0.5*L2,-0.5*L2,+0.5*L2, -0.5*L2,-0.5*L2,-0.5*L2,-0.5*L2 },
@@ -552,6 +636,7 @@
                 }
             }

+
             // ROTATION copy apo to gewmetria_shell_coh...._ekk_random th dhmiourgia tou
             // Qij kai meta efarmogh sta dianusmata(theshs kai katefthunshs)
             double e1_new_z = Math.Sin(rot_phi_2);
@@ -584,10 +669,329 @@
                 double[] product;
                 product = RVEExamplesBuilder.MatVecMult(Qij, new double[3] { line_points[0, q1], line_points[1, q1], line_points[2, q1] });
                 for (int q2 = 0; q2 < 3; q2++) { line_points[q2, q1] = product[q2]; }
-                // na grafei to line segments
-            }
-
-        }
+                product = RVEExamplesBuilder.MatVecMult(Qij, new double[3] { line_segments[0, q1], line_segments[1, q1], line_segments[2, q1] });
+                for (int q2 = 0; q2 < 3; q2++) { line_segments[q2, q1] = product[q2]; }
+            }
+
+            for (int q1 = 0; q1 < 6; q1++)
+            {
+                double[] product;
+                product = RVEExamplesBuilder.MatVecMult(Qij, new double[3] { pl_points[0, q1], pl_points[1, q1], pl_points[2, q1] });
+                for (int q2 = 0; q2 < 3; q2++) { pl_points[q2, q1] = product[q2]; }
+                product = RVEExamplesBuilder.MatVecMult(Qij, new double[3] { vec1s[0, q1], vec1s[1, q1], vec1s[2, q1] });
+                for (int q2 = 0; q2 < 3; q2++) { vec1s[q2, q1] = product[q2]; }
+                product = RVEExamplesBuilder.MatVecMult(Qij, new double[3] { vec2s[0, q1], vec2s[1, q1], vec2s[2, q1] });
+                for (int q2 = 0; q2 < 3; q2++) { vec2s[q2, q1] = product[q2]; }
+                product = RVEExamplesBuilder.MatVecMult(Qij, new double[3] { perp_vec3s[0, q1], perp_vec3s[1, q1], perp_vec3s[2, q1] });
+                for (int q2 = 0; q2 < 3; q2++) { perp_vec3s[q2, q1] = product[q2]; }
+            }
+
+
+            // TRANSLATION copy apo to gewmetria_shell_coh...._ekk_random kai to
+            //efarmozoume mono sta points kai oxi kai sta dianusmata katefthunshs
+            for (int q1 = 0; q1 < 12; q1++)
+            {
+                line_points[0, q1] += ekk_xyz[0];
+                line_points[1, q1] += ekk_xyz[1];
+                line_points[2, q1] += ekk_xyz[2];
+            }
+            for (int q1 = 0; q1 < 6; q1++)
+            {
+                pl_points[0, q1] += ekk_xyz[0];
+                pl_points[1, q1] += ekk_xyz[1];
+                pl_points[2, q1] += ekk_xyz[2];
+            }
+        }
+
+        public static bool check_for_intersection_between_i1_and_i2_graphene_sheets(int i1, int i2, double[][,] line_points, double[][,] line_segments, double[][,] pl_points, double[][,] vec1s, double[][,] vec2s, double[][,] perp_vec3s)
+        {
+            bool they_intersect = false;
+
+            bool stop_q1 = false;
+            for (int q1 = 0; q1 < line_points[0].GetLength(1); q1++)
+            {
+                for (int q2 = 0; q2 < pl_points[0].GetLength(1); q2++)
+                {
+                    if (check_if_plane_and_vec_intersect(new double[3] { pl_points[i1][0, q2], pl_points[i1][1, q2], pl_points[i1][2, q2] },
+                        new double[3] { vec1s[i1][0, q2], vec1s[i1][1, q2], vec1s[i1][2, q2] },
+                        new double[3] { vec2s[i1][0, q2], vec2s[i1][1, q2], vec2s[i1][2, q2] },
+                        new double[3] { perp_vec3s[i1][0, q2], perp_vec3s[i1][1, q2], perp_vec3s[i1][2, q2] },
+                        new double[3] { line_points[i2][0, q1], line_points[i2][1, q1], line_points[i2][2, q1] },
+                        new double[3] { line_segments[i2][0, q1], line_segments[i2][1, q1], line_segments[i2][2, q1] }))
+                    {
+                        they_intersect = true;
+                        stop_q1 = true;
+                        break;
+                    }
+                }
+                if (stop_q1)
+                {
+                    break;
+                }
+            }
+
+            if (stop_q1)
+            {
+            }
+            else
+            {
+                for (int q1 = 0; q1 < line_points[0].GetLength(1); q1++)
+                {
+                    for (int q2 = 0; q2 < pl_points[0].GetLength(1); q2++)
+                    {
+                        if (check_if_plane_and_vec_intersect(new double[3] { pl_points[i2][0, q2], pl_points[i2][1, q2], pl_points[i2][2, q2] },
+                            new double[3] { vec1s[i2][0, q2], vec1s[i2][1, q2], vec1s[i2][2, q2] },
+                            new double[3] { vec2s[i2][0, q2], vec2s[i2][1, q2], vec2s[i2][2, q2] },
+                            new double[3] { perp_vec3s[i2][0, q2], perp_vec3s[i2][1, q2], perp_vec3s[i2][2, q2] },
+                            //
+                            new double[3] { line_points[i1][0, q1], line_points[i1][1, q1], line_points[i1][2, q1] },
+                            new double[3] { line_segments[i1][0, q1], line_segments[i1][1, q1], line_segments[i1][2, q1] }))
+                        {
+                            they_intersect = true;
+                            stop_q1 = true;
+                            break;
+                        }
+                    }
+                    if (stop_q1)
+                    {
+                        break;
+                    }
+                }
+            }
+
+            return they_intersect;
+        }
+
+        public static bool check_if_plane_and_vec_intersect(double[] pl_point, double[] vec1, double[] vec2, double[] perp_vec3, double[] line_point, double[] line_segment )
+        {
+            bool intersection = false;
+
+            bool plane_and_line_parallel = false;
+
+            if ( RVEExamplesBuilder.dot_product(perp_vec3,line_segment)==0)
+            {
+                plane_and_line_parallel = true;
+            }
+            else
+            {
+                // diadikasia evreshs shmeiou tomhs
+                double t = (perp_vec3[1] * (pl_point[1] - line_point[1]) + perp_vec3[2] * (pl_point[2] - line_point[2]) + perp_vec3[3] * (pl_point[3] - line_point[3])) /(perp_vec3[1] * line_segment[1] + perp_vec3[2] * line_segment[2] + perp_vec3[3] * line_segment[3]);
+                double[] intersection_point = new double[3];
+                for (int q2 = 0; q2 < 3; q2++)
+                { intersection_point[q2] = line_point[q2] +t*line_segment[q2]; }
+                double[] pl_point_TO_int_point_VECTOR = new double[3];
+                for (int q2 = 0; q2 < 3; q2++)
+                { pl_point_TO_int_point_VECTOR[q2] = intersection_point[q2] -pl_point[q2]; }
+
+                double[,] A = new double[3, 3] { {vec1[0],vec2[0],perp_vec3[0] }, { vec1[1], vec2[1], perp_vec3[1] }, { vec1[2], vec2[2], perp_vec3[2] } };
+                double[] lamda = invert3by3(A, pl_point_TO_int_point_VECTOR);
+
+                if (t<=1)
+                {
+                    if (t>=0)
+                    {
+                        if (lamda[0] <=1)
+                        {
+                            if (lamda[0] >=0)
+                            {
+                                if (lamda[1] <= 1)
+                                {
+                                    if (lamda[1] >= 0)
+                                    {
+                                        intersection = true;
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+
+            //PART B
+            if(plane_and_line_parallel)
+            {
+                double distance = point_plane_distance(pl_point, perp_vec3, line_point);
+
+                if (distance==0)
+                {
+                    bool[] plane_section = new bool[4];
+                    plane_section[0] = check_if_vec_and_vec_intersect(pl_point, vec1, line_point, line_segment);
+                    plane_section[1] = check_if_vec_and_vec_intersect(pl_point, vec2, line_point, line_segment);
+                    plane_section[2] = check_if_vec_and_vec_intersect(new double[3] { pl_point[0] + vec2[0], pl_point[1] + vec2[1], pl_point[2] + vec2[2] }, vec1, line_point, line_segment);
+                    plane_section[3] = check_if_vec_and_vec_intersect(new double[3] { pl_point[0] + vec1[0],pl_point[1] + vec1[1], pl_point[2] + vec1[2] }, vec2, line_point, line_segment);
+
+                    if(plane_section[0]|| plane_section[0]|| plane_section[0]|| plane_section[0])
+                    {
+                        intersection = true;
+                    }
+
+                }
+            }
+            return intersection;
+        }
+
+        public static double point_plane_distance(double [] pl_point, double[] perp_vec3, double[] line_point)
+        {
+            double[] QP = new double[3];
+            for (int q2 = 0; q2 < 3; q2++)
+            { QP[q2] = line_point[q2] - pl_point[q2]; }
+
+            double[] n = new double[3];
+            double norm_perp_vec3 = Math.Sqrt(perp_vec3[0] * perp_vec3[0] + perp_vec3[1] * perp_vec3[1] + perp_vec3[2] * perp_vec3[2]);
+            for (int q2 = 0; q2 < 3; q2++)
+            { n[q2] = perp_vec3[q2] / norm_perp_vec3; }
+
+            double distance = RVEExamplesBuilder.dot_product(QP, n);
+
+            return distance;
+        }
+
+        public static bool check_if_vec_and_vec_intersect(double[] pl_point,double[] pl_vec, double[] point, double[] vec )
+        {
+            bool intersection = false;
+
+            double[] b = new double[2];
+            for (int q2 = 0; q2 < 2; q2++)
+            { b[q2] = point[q2] - pl_point[q2]; }
+
+            double[,] A = new double[2, 2] { { -vec[0],pl_vec[0] }, { -vec[1], pl_vec[1] } };
+
+            double[] lamda = invert2by2(A, b);
+
+            if (lamda[0] <= 1)
+            {
+                if (lamda[0] >= 0)
+                {
+                    if (lamda[1] <= 1)
+                    {
+                        if (lamda[1] >= 0)
+                        { intersection = true; }
+                    }
+                }
+            }
+
+            return intersection;
+
+        }
+
+        public static double [] invert2by2 (double [,] A, double [] b )
+        {
+            double[,] A_inverse = new double[2, 2] { {A[1,1],-A[0,1] }, {-A[1,0], A[0,0] } };
+            for (int q2 = 0; q2 < 2; q2++)
+            {
+                for (int q1 = 0; q1 < 2; q1++)
+                { A_inverse[q1, q2] = A_inverse[q1, q2] / (A[0,0]*A[1,1]-A[0,1]*A[1,0]); }
+            }
+
+            double[] x = RVEExamplesBuilder.MatVecMult(A_inverse, b);
+            return x;
+
+        }
+
+        public static double[] invert3by3(double[,] A, double[] b)
+        {
+            double[,] A_inverse = new double[3, 3] { { A[2, 2]*A[1,1]- A[2, 1] * A[1, 2],-(A[2, 2] * A[0, 1] - A[2, 1] * A[0, 2]), A[1,2] * A[0, 1] - A[1, 1] * A[0, 2] },
+                { -(A[2,2]*A[1,0]-A[2,0]*A[1,2]),A[2,2]*A[0,0]-A[2,0]*A[0,2], -(A[1,2]*A[0,0]-A[1,0]*A[0,2]) },
+                {A[2,1]*A[1,0]-A[2,0]*A[1,1],-(A[2,1]*A[0,0]-A[2,0]*A[0,1]),A[1,1]*A[0,0]-A[1,0]*A[0,1] } };
+
+
+
+            double det_A;
+
+            det_A = A[0, 0] * (A[2, 2] * A[1, 1] - A[2, 1] * A[1, 2]) - A[1, 0] * (A[2, 2] * A[0, 1] - A[2, 1] * A[0, 2]) + A[2, 0] * (A[1, 2] * A[0, 1] - A[1, 1] * A[0, 2]);
+            for (int q2 = 0; q2 < 3; q2++)
+            {
+                for (int q1 = 0; q1 < 3; q1++)
+                { A_inverse[q1, q2] = A_inverse[q1, q2] / det_A; }
+            }
+
+            double[] x = RVEExamplesBuilder.MatVecMult(A_inverse, b);
+            return x;
+
+        }
+
+        public static bool combine_bool_any(bool [,] matrix)
+        {
+            bool output_value = false;
+            bool stop_outer_loop = false;
+            for (int i1 = 0; i1 < matrix.GetLength(0); i1++)
+            {
+                for (int i2 = 0; i2 < matrix.GetLength(1); i2++)
+                {
+                    output_value = (output_value || matrix[i1, i2]);
+                    if (output_value)
+                    {
+                        stop_outer_loop = true;
+                        break;
+                    }
+                }
+                if (stop_outer_loop)
+                {
+                    break;
+                }
+            }
+
+            return output_value;
+        }
+
+        public static bool combine_bool_any(bool[] array)
+        {
+            bool output_value = false;
+            for (int i1 = 0; i1 < array.GetLength(0); i1++)
+            {
+                output_value = (output_value || array[i1]);
+                if (output_value)
+                {
+                    break;
+                }
+            }
+
+            return output_value;
+        }
+
+        public static double sum_of_bool_array_elements(bool [,] array)
+        {
+            double output_value = 0;
+
+            for (int i1 = 0; i1 < array.GetLength(0); i1++)
+            {
+                for (int i2 =0; i2 < array.GetLength(1); i2++)
+                {
+                    if (array[i1, i2])
+                    { output_value += 1; }
+
+                }
+            }
+
+            return output_value;
+        }
+
+        public static double[,] Clone_array(double [,] matrix)
+        {
+            double[,] array_copy = new double[matrix.GetLength(0), matrix.GetLength(1)];
+            for (int i1 = 0; i1 < matrix.GetLength(0); i1++)
+            {
+                for (int i2 = 0; i2 < matrix.GetLength(1); i2++)
+                {
+                    array_copy[i1, i2] = matrix[i1, i2];
+                }
+            }
+            return array_copy;
+        }
+
+        public static bool[,] Clone_array(bool[,] matrix)
+        {
+            bool[,] array_copy = new bool[matrix.GetLength(0), matrix.GetLength(1)];
+            for (int i1 = 0; i1 < matrix.GetLength(0); i1++)
+            {
+                for (int i2 = 0; i2 < matrix.GetLength(1); i2++)
+                {
+                    array_copy[i1, i2] = matrix[i1, i2];
+                }
+            }
+            return array_copy;
+        }
+        //public static

         public static double rand()
         {


フィルタカラムの有無で自動生成を制御するスイッチの追加。

フィルタカラムの有無で自動生成を制御するスイッチの追加。

--- Implem.CodeDefiner/Functions/AspNetMvc/CSharp/Parts/Column.cs
+++ Implem.CodeDefiner/Functions/AspNetMvc/CSharp/Parts/Column.cs
@@ -107,6 +107,7 @@
             if (codeDefinition.History && columnDefinition.History == 0) return true;
             if (codeDefinition.PkHistory && columnDefinition.PkHistory == 0) return true;
             if (codeDefinition.GridColumn && columnDefinition.GridColumn == 0) return true;
+            if (codeDefinition.FilterColumn && columnDefinition.FilterColumn == 0) return true;
             if (codeDefinition.EditorColumn && !columnDefinition.EditorColumn) return true;
             if (codeDefinition.TitleColumn && columnDefinition.TitleColumn == 0) return true;
             if (codeDefinition.UserColumn && !columnDefinition.UserColumn) return true;


+ Metadata convention

+ Metadata convention

--- InfinniPlatform.Owin/Services/HttpServiceNancyBootstrapper.cs
+++ InfinniPlatform.Owin/Services/HttpServiceNancyBootstrapper.cs
@@ -1,7 +1,4 @@
-using System;
-using System.Collections.Generic;
-
-using InfinniPlatform.Core.Metadata;
+using InfinniPlatform.Core.Metadata;
 using InfinniPlatform.Sdk.Services;

 using Nancy;
@@ -60,18 +57,9 @@

         protected override void ApplicationStartup(TinyIoCContainer container, IPipelines pipelines)
         {
-            //base.ApplicationStartup(container, pipelines);
+            base.ApplicationStartup(container, pipelines);

-//            Conventions.ViewLocationConventions
-//                       .Add((viewName, model, context) =>
-//                            $"{_metadataSettings.ViewsDirectoryPath}/{viewName}");
-
-//
-//            Conventions.StaticContentsConventions = new List<Func<NancyContext, string, Response>>
-//                                                    {
-//                                                        StaticContentConventionBuilder.AddDirectory("moo", _metadataSettings.ViewsDirectoryPath)
-//                                                    };
-
+            Conventions.StaticContentsConventions.AddDirectory("/content", $"{_metadataSettings.ContentDirectory}", "json");
         }
     }
 }


Removed unused import, fixed error, added includes

Processed the comments of both teugis and daanvc.

--- IntelliCloud/IntelliCloud.Business/Manager/FeedbackManager.cs
+++ IntelliCloud/IntelliCloud.Business/Manager/FeedbackManager.cs
@@ -5,7 +5,6 @@
 using System;
 using System.Collections.Generic;
 using System.Linq;
-using System.Text;

 namespace nl.fhict.IntelliCloud.Business.Manager
 {
@@ -30,8 +29,11 @@
                 return context.Feedbacks
                        .Include("Answer")
                        .Include("Question")
+                       .Include("Question.SourceDefinition")
                        .Include("User")
+                       .Include("User.Sources")
                        .Where(f => f.Answer.Id == answerId)
+                       .ToList()
                        .Select(f => ConvertEntities.FeedbackEntityToFeedback(f))
                        .ToList();
             }


TODO require第三方库的处理

TODO require第三方库的处理

--- KSFramework/Assets/KSFramework/Modules/LuaModule/LuaModule.cs
+++ KSFramework/Assets/KSFramework/Modules/LuaModule/LuaModule.cs
@@ -290,12 +290,11 @@
             LuaDLL.lua_pushcfunction(L, ImportCSharpType);
             LuaDLL.lua_setglobal(L, "import_type"); // same as SLua's SLua.GetClass(), import C# type
 #else
-
+            //TODO require第三方库的处理,本地会无法找到
             var L = _luaEnv.L;
             Lua.lua_pushstdcallcfunction(L, LuaImport);
             Lua.xlua_setglobal(L, "require");
-            //TODO 如果有新加入的库，加入进去
-//            _luaEnv.AddBuildin("",);
+
             yield return null;
 #endif


from last commit

from last commit

--- PanoramicDataWin8/view/vis/render/CalculationRenderer.xaml.cs
+++ PanoramicDataWin8/view/vis/render/CalculationRenderer.xaml.cs
@@ -63,7 +63,7 @@
             CodeBox.Text = CalculationOperationModel.GetAttributeModel().GetCode();
         }

-        void CodeBox_KeyUp(object sender, KeyRoutedEventArgs e)
+        async void CodeBox_KeyUp(object sender, KeyRoutedEventArgs e)
         {
             var codeText = CodeBox.Text;
             var newAttr = new AttributeCodeParameters() { Code = codeText, RawName = CalculationOperationModel?.GetAttributeModel().RawName };


Fixed TestClient JumpCommand.cs to work with previous commit

git-svn-id: c32cf1ecefca26b8770d7b0740bc0c5c174087e4@2315 c754d5e9-d413-0410-bcdf-9574c9dba6b7

--- Programs/examples/TestClient/Commands/Movement/JumpCommand.cs
+++ Programs/examples/TestClient/Commands/Movement/JumpCommand.cs
@@ -14,7 +14,7 @@

         public override string Execute(string[] args, UUID fromAgentID)
 		{
-            Client.Self.Jump();
+            Client.Self.Jump(true);
             return "Jumped";
 		}
     }


RCNETSDK-60 Corrected Response not being parsed from Subscribe

--- RingCentral/subscription/SubscriptionServiceImplementation.cs
+++ RingCentral/subscription/SubscriptionServiceImplementation.cs
@@ -144,7 +144,8 @@
 				var jsonData = GetFullEventsFilter();
 				Request request = new Request(SubscriptionEndPoint, jsonData);
 				Response response = _platform.Post(request);
-				if (_subscription.DeliveryMode.Encryption)
+                _subscription = JsonConvert.DeserializeObject<Subscription>(response.GetBody());
+                if (_subscription.DeliveryMode.Encryption)
                 {
 					PubNubServiceImplementation("", _subscription.DeliveryMode.SubscriberKey, _subscription.DeliveryMode.SecretKey, _subscription.DeliveryMode.EncryptionKey, sslOn);
 				}


liquidar muchos

liquidar muchos

(TFS CS 4126)

--- Signum.Windows.Extensions/Operations/ConstructFromMenuItem.cs
+++ Signum.Windows.Extensions/Operations/ConstructFromMenuItem.cs
@@ -67,16 +67,16 @@

                 ConstructorFromManySettings settings = (ConstructorFromManySettings)OperationClient.Manager.Settings.TryGetC(operationInfo.Key);

+                IIdentifiable entity;
                 if (settings != null && settings.Constructor != null)
-                    settings.Constructor(new ConstructorFromManyEventArgs
+                    entity = settings.Constructor(new ConstructorFromManyEventArgs
                     {
                         Entities = lites,
                         Window = b.FindCurrentWindow(),
                         OperationInfo = operationInfo,
                         QueryName = queryName
                     });
-
-                IIdentifiable entity = Server.Return((IOperationServer s)=>s.ConstructFromMany(lites, entityType, operationInfo.Key));
+                else entity = Server.Return((IOperationServer s)=>s.ConstructFromMany(lites, entityType, operationInfo.Key));

                 if (operationInfo.Returns && Navigator.IsViewable(entity.GetType(), false))
                     Navigator.Navigate(entity);