Removed unnecessary pragma; made platform logic more like before

--- Assets/UniRx/Scripts/UnityEngineBridge/ObservableWWW.cs
+++ Assets/UniRx/Scripts/UnityEngineBridge/ObservableWWW.cs
@@ -1,22 +1,19 @@
-// warning disable for Unity4.5's WWW(dictionary)
-#pragma warning disable 612, 618
-
 using System;
 using System.Collections;
 using UnityEngine;

 namespace UniRx
 {
-#if UNITY_METRO || UNITY_WP8 || (!UNITY_4_3 && !UNITY_4_2 && !UNITY_4_1 && !UNITY_4_0_1 && !UNITY_4_0 && !UNITY_3_5 && !UNITY_3_4 && !UNITY_3_3 && !UNITY_3_2 && !UNITY_3_1 && !UNITY_3_0_0 && !UNITY_3_0 && !UNITY_2_6_1 && !UNITY_2_6)
+#if !(UNITY_METRO || UNITY_WP8) && (UNITY_4_3 || UNITY_4_2 || UNITY_4_1 || UNITY_4_0_1 || UNITY_4_0 || UNITY_3_5 || UNITY_3_4 || UNITY_3_3 || UNITY_3_2 || UNITY_3_1 || UNITY_3_0_0 || UNITY_3_0 || UNITY_2_6_1 || UNITY_2_6)
+    // Fallback for Unity versions below 4.5
+    using Hash = System.Collections.Hashtable;
+    using HashEntry = System.Collections.DictionaryEntry;
+#else
     // Unity 4.5 release notes:
     // WWW: deprecated 'WWW(string url, byte[] postData, Hashtable headers)',
     // use 'public WWW(string url, byte[] postData, Dictionary<string, string> headers)' instead.
     using Hash = System.Collections.Generic.Dictionary<string, string>;
     using HashEntry = System.Collections.Generic.KeyValuePair<string, string>;
-#else
-    // Fallback for Unity versions below 4.5
-    using Hash = System.Collections.Hashtable;
-    using HashEntry = System.Collections.DictionaryEntry;
 #endif

     public static partial class ObservableWWW


Support null cell fields

Support null cell fields

You allow blank cells to show up as null but don't handle that case in `CellValueAsString`. It should be up to the user to handle empty values properly, but the importer should not fail on them.

--- Assets/Vendor/DataHelpers/Editor/Readers/ExcelReader.cs
+++ Assets/Vendor/DataHelpers/Editor/Readers/ExcelReader.cs
@@ -1,8 +1,8 @@
-using UnityEngine;
-using System.Collections.Generic;
-using System;
-using System.IO;
-
+using UnityEngine;
+using System.Collections.Generic;
+using System;
+using System.IO;
+
 // for importing excel files
 using NPOI.XSSF.UserModel;
 using NPOI.SS.UserModel;
@@ -22,7 +22,7 @@
         /// <param name="assetPath"></param>
         public void ReadAsset(string assetPath, ref ImportData data) {

-            Debug.Log("START IMPORT PROCESS FOR XLSX");
+            Debug.Log("START IMPORT PROCESS FOR XLSX: " + Path.GetFileName(assetPath));

             // get an absolute path to the asset
             string absolutePath = System.IO.Directory.GetCurrentDirectory() + "/" + assetPath;
@@ -54,6 +54,9 @@
         /// <returns>string representation of the cell</returns>
         private static string CellValueAsString(ICell cell) {
             string s = "";
+
+            if (cell == null)
+                return s;

             switch (cell.CellType) {
                 case CellType.String:
@@ -201,11 +204,11 @@
         }

-        /// <summary>
-        /// Gets the field names from a workbook and stores them in a list.
-        /// </summary>
-        /// <param name="fieldNames">list where field names will be stored</param>
-        /// <param name="workbook">workbook from which field names will be extracted</param>
+        /// <summary>
+        /// Gets the field names from a workbook and stores them in a list.
+        /// </summary>
+        /// <param name="fieldNames">list where field names will be stored</param>
+        /// <param name="workbook">workbook from which field names will be extracted</param>
         public static void GetFieldNames(ImportData data, XSSFWorkbook workbook) {

             ISheet sheet = workbook.GetSheetAt(0);
@@ -241,4 +244,4 @@
             }
         }
     }
-}+}


Delete Database.cs

Delete Database.cs

--- BAC_Tracker/BAC_Tracker_Standard/Controller/Database.cs
+++ BAC_Tracker/BAC_Tracker_Standard/Controller/Database.cs
@@ -1,20 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-
-using Android.App;
-using Android.Content;
-using Android.OS;
-using Android.Runtime;
-using Android.Views;
-using Android.Widget;
-using SQLite;
-
-namespace BAC_Tracker
-{
-    class Database
-    {
-
-    }
-}


Use the typed referred header

Use the typed referred header

--- Battery-Commander.Web/Controllers/SoldiersController.cs
+++ Battery-Commander.Web/Controllers/SoldiersController.cs
@@ -163,7 +163,7 @@

             await db.SaveChangesAsync();

-            return Redirect(Request.Headers["Referer"]);
+            return Redirect($"{Request.GetTypedHeaders().Referer}");
         }

         public static async Task<Soldier> Get(Database db, int id)


Got rid of HttmResponseMessage<T> in AttendanceLinksController because it will be yanked in Web API RC and we don't need it.

--- CodeCamper.Web/Controllers/AttendanceLinksController.cs
+++ CodeCamper.Web/Controllers/AttendanceLinksController.cs
@@ -14,12 +14,12 @@
         {
             DataService = dataService;
         }
-
+
         // GET: api/attendancelinks
-        public HttpResponseMessage<IQueryable<AttendanceLink>> GetAttendanceLinks()
+        public IQueryable<AttendanceLink> GetAttendanceLinks()
         {
-            return new HttpResponseMessage<IQueryable<AttendanceLink>>(DataService.AttendanceLinks.GetAll());
-            //return new HttpResponseMessage<IQueryable<AttendanceLink>>(HttpStatusCode.Forbidden); //security violation
+            return DataService.AttendanceLinks.GetAll();
+            //throw new HttpResponseException(HttpStatusCode.Forbidden); //security violation
         }

         // GET: api/attendancelinks/pid,sid


remove hard-coded Date type checking

remove hard-coded Date type checking

use IsAssignableFrom instead of hard-coded Date type checking

--- Json-Rpc/Handler.cs
+++ Json-Rpc/Handler.cs
@@ -390,7 +390,8 @@
         private object CleanUpParameter(object p, SMDAdditionalParameters metaData)
         {
             var bob = p as JValue;
-            if (bob != null && (bob.Value == null || bob.Value.GetType() == metaData.ObjectType || bob.Type == JTokenType.Date))
+            //if (bob != null && (bob.Value == null || bob.Value.GetType() == metaData.ObjectType))
+            if (bob != null && (bob.Value == null || metaData.ObjectType.IsAssignableFrom(bob.Value.GetType())))
             {
                 return bob.Value;
             }


changed from Hashtable to Dictionary<string, dynamic> list

--- Json/JsonConvert.cs
+++ Json/JsonConvert.cs
@@ -27,6 +27,7 @@
 using System.IO;
 using System.Globalization;
 using System.Collections;
+using System.Collections.Generic;
 #if !(NET20 || NET35 || SILVERLIGHT || PORTABLE40 || PORTABLE)
 using System.Numerics;
 #endif
@@ -499,9 +500,10 @@
     /// <returns>A JSON string representation of the object.</returns>
     public static string SerializeObject(object value)
     {
-			Hashtable hash = new Hashtable();
-			hash.Add ("params", value);
-      return SerializeObject(hash, Formatting.None, (JsonSerializerSettings) null);
+			Dictionary<string, dynamic> val = new Dictionary<string, dynamic>();
+			val.Add ("params", value);
+
+      return SerializeObject(val, Formatting.None, (JsonSerializerSettings) null);
     }

     /// <summary>


Remove `using` for Microsoft.AspNet.Mvc.Razor namespace from views - eventually will clean up IntelliSense -- removing classes users don't   need when editing a view - will _not_ cleanup IntelliSense 'til VS stops using a private copy of   Microsoft.AspNet.Mvc.Razor.Host.dll or we update that copy - all tests and MVC sample views still work fine - issue #969

--- src/Microsoft.AspNet.Mvc.Razor.Host/MvcRazorHost.cs
+++ src/Microsoft.AspNet.Mvc.Razor.Host/MvcRazorHost.cs
@@ -22,8 +22,7 @@
             "System.Linq",
             "System.Collections.Generic",
             "Microsoft.AspNet.Mvc",
-            "Microsoft.AspNet.Mvc.Razor",
-            "Microsoft.AspNet.Mvc.Rendering"
+            "Microsoft.AspNet.Mvc.Rendering",
         };

         private readonly MvcRazorHostOptions _hostOptions;
@@ -51,7 +50,7 @@
                 writeLiteralMethodName: "WriteLiteral",
                 writeToMethodName: "WriteTo",
                 writeLiteralToMethodName: "WriteLiteralTo",
-                templateTypeName: "HelperResult",
+                templateTypeName: "Microsoft.AspNet.Mvc.Razor.HelperResult",
                 defineSectionMethodName: "DefineSection")
             {
                 ResolveUrlMethodName = "Href"


Just default value

Just default value

--- KraxbotOSS/Form1.cs
+++ KraxbotOSS/Form1.cs
@@ -20,7 +20,7 @@
         internal int Version = 0;
         internal string ChatName = "NoName";
         internal SteamID InvitedID;
-        internal string InvitedName;
+        internal string InvitedName = "NoName";

         internal string Spam = "Kick";
         internal string WelcomeMsg = "Welcome";


Reenable test

Reenable test

svn path=/trunk/bitsharp/; revision=117136

--- src/MonoTorrent.Tests/Common/TorrentCreatorTests.cs
+++ src/MonoTorrent.Tests/Common/TorrentCreatorTests.cs
@@ -72,7 +72,6 @@
         }

         [Test]
-        [Ignore("Doesn't work right")]
         public void CreateSingleTest()
         {
             creator.Announces.AddRange(announces);
@@ -82,6 +81,7 @@
                                             files[0].StartPieceIndex,
                                             files[0].EndPieceIndex);

+            creator.Path = f.Path;
             BEncodedDictionary dict = creator.Create(new TorrentFile[] { f }, new TestWriter(), f.Path);
             Torrent torrent = Torrent.Load(dict);


Only accept friend requests if set

Only accept friend requests if set

--- KraxbotOSS/Form1.cs
+++ KraxbotOSS/Form1.cs
@@ -239,7 +239,8 @@
         }
         void OnFriendAdded(SteamFriends.FriendAddedCallback callback)
         {
-            Log(callback.PersonaName + " is now my friend");
+            if (config.FriendRequest == "AcceptAll")
+                Log(callback.PersonaName + " is now my friend");
         }
         void OnChatInvite(SteamFriends.ChatInviteCallback callback)
         {


Version fix

Version fix


Removing unused code

Removing unused code

SVN: 488784591515bd4cdaa016be4ec9b172dc4e7caf@4930

--- src/NHibernate/Engine/StatefulPersistenceContext.cs
+++ src/NHibernate/Engine/StatefulPersistenceContext.cs
@@ -720,14 +720,6 @@
 			}
 		}

-		public void ClearProxyFor(IEntityPersister persister, EntityKey key)
-		{
-			if (!persister.HasProxy || key == null)
-				return;
-
-			proxiesByKey.Remove(key);
-		}
-
 		/// <summary>
 		/// Return the existing proxy associated with the given <tt>EntityKey</tt>, or the
 		/// third argument (the entity associated with the key) if no proxy exists. Init


LA: vector storage copy zero-length subset should skip instead of fail

--- src/Numerics/LinearAlgebra/Storage/VectorStorage.cs
+++ src/Numerics/LinearAlgebra/Storage/VectorStorage.cs
@@ -278,6 +278,11 @@
                 throw new ArgumentNullException("target");
             }

+            if (count == 0)
+            {
+                return;
+            }
+
             ValidateSubVectorRange(target, sourceIndex, targetIndex, count);
             CopySubVectorToUnchecked(target, sourceIndex, targetIndex, count, skipClearing);
         }
@@ -318,6 +323,11 @@
                 throw new ArgumentNullException("target");
             }

+            if (columnCount == 0)
+            {
+                return;
+            }
+
             ValidateSubRowRange(target, rowIndex, sourceColumnIndex, targetColumnIndex, columnCount);
             CopyToSubRowUnchecked(target, rowIndex, sourceColumnIndex, targetColumnIndex, columnCount, skipClearing);
         }
@@ -343,6 +353,11 @@
                 throw new ArgumentNullException("target");
             }

+            if (rowCount == 0)
+            {
+                return;
+            }
+
             ValidateSubColumnRange(target, columnIndex, sourceRowIndex, targetRowIndex, rowCount);
             CopyToSubColumnUnchecked(target, columnIndex, sourceRowIndex, targetRowIndex, rowCount, skipClearing);
         }


Trim the correct queue on Chirper account state (#7890)

--- samples/Chirper/Chirper.Grains/ChirperAccount.cs
+++ samples/Chirper/Chirper.Grains/ChirperAccount.cs
@@ -198,9 +198,9 @@
         _state.State.RecentReceivedMessages.Enqueue(chirp);

         // only relevant when not using fixed queue
-        while (_state.State.MyPublishedMessages.Count > PublishedMessagesCacheSize) // to keep not more than the max number of messages
-        {
-            _state.State.MyPublishedMessages.Dequeue();
+        while (_state.State.RecentReceivedMessages.Count > ReceivedMessagesCacheSize) // to keep not more than the max number of messages
+        {
+            _state.State.RecentReceivedMessages.Dequeue();
         }

         await WriteStateAsync();


Update Service.cs

Update Service.cs

--- src/Hprose.RPC/Service.cs
+++ src/Hprose.RPC/Service.cs
@@ -8,7 +8,7 @@
 |                                                          |
 |  Service class for C#.                                   |
 |                                                          |
-|  LastModified: Feb 5, 2019                               |
+|  LastModified: Feb 9, 2019                               |
 |  Author: Ma Bingyao <andot@hprose.com>                   |
 |                                                          |
 \*________________________________________________________*/
@@ -37,9 +37,11 @@
         static Service() {
             Register<HttpHandler, HttpListener>("http");
             Register<TcpHandler, TcpListener>("tcp");
+            Register<UdpHandler, UdpClient>("udp");
         }
         public HttpHandler Http => (HttpHandler)this["http"];
         public TcpHandler Tcp => (TcpHandler)this["tcp"];
+        public UdpHandler Udp => (UdpHandler)this["udp"];
         public TimeSpan Timeout { get; set; } = new TimeSpan(0, 0, 30);
         public IServiceCodec Codec { get; set; } = ServiceCodec.Instance;
         public int MaxRequestLength { get; set; } = 0x7FFFFFFF;


fix(DevSupport): Remove cached bundle for failed calls to packager (#673)

* fix(DevSupport): remove cached bundle on failure

When the bundle loading fails, ensure that the empty bundle is deleted.

Fixes #671

* fix(DevSupport): Use temporary file for cached bundle

Using a temporary file ensures we don't overwrite a valid bundle in case the dev server is not started.

--- ReactWindows/ReactNative/DevSupport/DevSupportManager.cs
+++ ReactWindows/ReactNative/DevSupport/DevSupportManager.cs
@@ -455,14 +455,17 @@

         private async Task ReloadJavaScriptFromServerAsync(Action dismissProgress, CancellationToken token)
         {
-            var localFolder = ApplicationData.Current.LocalFolder;
-            var localFile = await localFolder.CreateFileAsync(JSBundleFileName, CreationCollisionOption.ReplaceExisting);
+            var moved = false;
+            var temporaryFile = await ApplicationData.Current.TemporaryFolder.CreateFileAsync(JSBundleFileName, CreationCollisionOption.GenerateUniqueName);
             try
             {
-                using (var stream = await localFile.OpenStreamForWriteAsync())
+                using (var stream = await temporaryFile.OpenStreamForWriteAsync())
                 {
                     await _devServerHelper.DownloadBundleFromUrlAsync(_jsAppBundleName, stream, token);
                 }
+
+                await temporaryFile.MoveAsync(ApplicationData.Current.LocalFolder, JSBundleFileName, NameCollisionOption.ReplaceExisting);
+                moved = true;

                 dismissProgress();
                 _reactInstanceCommandsHandler.OnJavaScriptBundleLoadedFromServer();
@@ -480,6 +483,13 @@
                     "start the development server or connect your device?",
                     ex);
             }
+            finally
+            {
+                if (!moved)
+                {
+                    await temporaryFile.DeleteAsync();
+                }
+            }
         }

         private Task ReloadJavaScriptFromFileAsync(CancellationToken token)


minor spelling and renaming

minor spelling and renaming

--- RelhaxModpack/RelhaxModpack/UIComponents/ComboBoxItem.cs
+++ RelhaxModpack/RelhaxModpack/UIComponents/ComboBoxItem.cs
@@ -1,13 +1,13 @@
 namespace RelhaxModpack
 {
-    //an item to add ot a ComboBox
+    //an item to add to a ComboBox
     class ComboBoxItem : System.Windows.Controls.ComboBoxItem
     {
         public SelectablePackage Package { get; set; }
         public string DisplayName { get; set; }
-        public ComboBoxItem(SelectablePackage cfg, string display)
+        public ComboBoxItem(SelectablePackage package, string display)
         {
-            Package = cfg;
+            Package = package;
             DisplayName = display;
         }
         public override string ToString()


Increase backlog to 5.

Increase backlog to 5.

--- Renci.SshClient/Renci.SshNet/ForwardedPortDynamic.NET.cs
+++ Renci.SshClient/Renci.SshNet/ForwardedPortDynamic.NET.cs
@@ -30,7 +30,7 @@
             _listener.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.DontLinger, true);
             _listener.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.NoDelay, true);
             _listener.Bind(ep);
-            _listener.Listen(1);
+            _listener.Listen(5);

             Session.ErrorOccured += Session_ErrorOccured;
             Session.Disconnected += Session_Disconnected;


Air gap over the actual interface material not the theoretical support surface.

--- NewSupport.cs
+++ NewSupport.cs
@@ -63,9 +63,9 @@
 		public Polygons GetRequiredSupportAreas(int layerIndex)
 		{
 			layerIndex--;
-			if (layerIndex < allRequiredSupportOutlines.Count && layerIndex >= 0)
-			{
-				return allRequiredSupportOutlines[layerIndex];
+			if (layerIndex < interfaceLayers.Count && layerIndex >= 0)
+			{
+				return interfaceLayers[layerIndex];
 			}

 			return new Polygons();


Change some method and properties access from private to protected

--- NodeServer.cs
+++ NodeServer.cs
@@ -13,7 +13,7 @@
 {
     public class NodeServer
     {
-        private string _commandLineArguments;
+        protected string CommandLineArguments;
         public readonly NodeServerSettings Settings;

         public NodeServer(){}
@@ -30,7 +30,7 @@
         }

         public bool Monitoring { get; protected set; }
-        private Thread MonitoringThead { get; set; }
+        protected Thread MonitoringThead { get; set; }

         private Stream Post(string route, object data = null, int timeout = 100000)
         {
@@ -88,12 +88,12 @@
             }
         }

-        private void BuildCommandLineArguments()
+        protected void BuildCommandLineArguments()
         {
             var commandLineBuilder = new CommandLineBuilder();
             commandLineBuilder.AppendFileNameIfNotNull(PrepareJsonForCommandLine(JsonConvertCamelCase(Settings)));

-            _commandLineArguments = commandLineBuilder.ToString();
+            CommandLineArguments = commandLineBuilder.ToString();
         }

         public bool Start()
@@ -107,11 +107,11 @@
                     throw new Exception("Code file does not exist");
                 }

-                if (_commandLineArguments == null)
+                if (CommandLineArguments == null)
                 {
                     BuildCommandLineArguments();
                 }
-                var startupCommand = "node " + codeFile.Name + " --netnoder " + _commandLineArguments;
+                var startupCommand = "node " + codeFile.Name + " --netnoder " + CommandLineArguments;
 #if DEBUG
                 startupCommand += " --debug";
 #endif
@@ -155,7 +155,7 @@
             }
         }

-        private string GetAddress()
+        protected string GetAddress()
         {
             return Settings.Location.Protocol + "://" + Settings.Location.Host +
                    (Settings.Location.Port == 0 ? "" : ":" + Settings.Location.Port) + "/";


Added FindUnionWithVectorTest5() to TestVector class

--- MatricesTests/TestVector.cs
+++ MatricesTests/TestVector.cs
@@ -226,6 +226,34 @@
             Assert.AreEqual(expectedVector[5], resultVector[5]);
         }

-
+        [Test]
+        public void FindUnionWithVectorTest5()
+        {
+            Vector<double> vector1 = new Vector<double>(5);
+            vector1[0] = 5;
+            vector1[1] = 1;
+            vector1[2] = 7;
+            vector1[3] = 2;
+            vector1[4] = 4;
+
+            Vector<double> vector2 = new Vector<double>(0);
+
+            Vector<double> resultVector = vector1.FindUnionWithVector(vector2);
+
+            Vector<double> expectedVector = new Vector<double>(5);
+            expectedVector[0] = 5;
+            expectedVector[1] = 1;
+            expectedVector[2] = 7;
+            expectedVector[3] = 2;
+            expectedVector[4] = 4;
+
+            Assert.AreEqual(expectedVector.Length, resultVector.Length);
+
+            Assert.AreEqual(expectedVector[0], resultVector[0]);
+            Assert.AreEqual(expectedVector[1], resultVector[1]);
+            Assert.AreEqual(expectedVector[2], resultVector[2]);
+            Assert.AreEqual(expectedVector[3], resultVector[3]);
+            Assert.AreEqual(expectedVector[4], resultVector[4]);
+        }
     }
 }


Fixed the build of the test project

Fixed the build of the test project

--- DeveImageOptimizer.Tests/FileOptimizerProcessorFacts.cs
+++ DeveImageOptimizer.Tests/FileOptimizerProcessorFacts.cs
@@ -168,8 +168,7 @@
                 Assert.Equal(4, results.Count);
                 foreach (var result in results)
                 {
-                    Assert.True(result.Successful);
-                    Assert.False(result.SkippedBecausePreviouslyOptimized);
+                    Assert.Equal(OptimizationResult.Success, result.OptimizationResult);
                     Assert.True(result.OriginalSize > result.OptimizedSize);
                 }
             }
@@ -185,8 +184,7 @@
                 Assert.Equal(4, results.Count);
                 foreach (var result in results)
                 {
-                    Assert.True(result.Successful);
-                    Assert.True(result.SkippedBecausePreviouslyOptimized);
+                    Assert.Equal(OptimizationResult.Skipped, result.OptimizationResult);
                     Assert.True(result.OriginalSize == result.OptimizedSize);
                 }
             }
@@ -206,9 +204,9 @@

             try
             {
-                var worked = await fop.OptimizeFile(image1temppath, null);
-
-                Assert.True(worked.Successful);
+                var result = await fop.OptimizeFile(image1temppath, null);
+
+                Assert.Equal(OptimizationResult.Success, result.OptimizationResult);

                 var fileOptimized = new FileInfo(image1temppath);
                 var fileUnoptimized = new FileInfo(image1path);


Setting _map.Initialized to true in Navigator to fix #573

--- Mapsui/Navigator.cs
+++ Mapsui/Navigator.cs
@@ -28,7 +28,8 @@
             _viewport.SetResolution(resolution);

             _viewport.SetCenter(extent.Centroid);
-
+
+            _map.Initialized = true;
             _map.RefreshData(_viewport.Extent, _viewport.Resolution, true);
         }

@@ -40,6 +41,7 @@
         {
             _viewport.SetResolution(resolution);

+            _map.Initialized = true;
             _map.RefreshData(_viewport.Extent, _viewport.Resolution, true);
         }

@@ -50,7 +52,8 @@
         public void CenterOn(Point center)
         {
             _viewport.SetCenter(center);
-
+
+            _map.Initialized = true;
             _map.RefreshData(_viewport.Extent, _viewport.Resolution, true);
         }

@@ -60,6 +63,7 @@
             _viewport.SetCenter(center);
             _viewport.SetResolution(resolution);

+            _map.Initialized = true;
             _map.RefreshData(_viewport.Extent, _viewport.Resolution, true);
         }

@@ -71,7 +75,8 @@
         public void CenterOn(double x, double y)
         {
             _viewport.SetCenter(x, y);
-
+
+            _map.Initialized = true;
             _map.RefreshData(_viewport.Extent, _viewport.Resolution, true);
         }

@@ -83,6 +88,7 @@
         {
             _viewport.SetRotation(rotation);

+            _map.Initialized = true;
             _map.RefreshData(_viewport.Extent, _viewport.Resolution, true);
         }

@@ -90,7 +96,8 @@
         {
             var resolution = ZoomHelper.ZoomIn(_map.Resolutions, _viewport.Resolution);
             _viewport.SetResolution(resolution);
-
+
+            _map.Initialized = true;
             _map.RefreshData(_viewport.Extent, _viewport.Resolution, true);
         }

@@ -99,6 +106,7 @@
             var resolution = ZoomHelper.ZoomOut(_map.Resolutions, _viewport.Resolution);
             _viewport.SetResolution(resolution);

+            _map.Initialized = true;
             _map.RefreshData(_viewport.Extent, _viewport.Resolution, true);
         }

@@ -107,6 +115,7 @@
             var resolution = ZoomHelper.ZoomIn(_map.Resolutions, _viewport.Resolution);
             ZoomTo(resolution, centerOfZoom);

+            _map.Initialized = true;
             _map.RefreshData(_viewport.Extent, _viewport.Resolution, true);
         }

@@ -115,6 +124,7 @@
             var resolution = ZoomHelper.ZoomOut(_map.Resolutions, _viewport.Resolution);
             ZoomTo(resolution, centerOfZoom);

+            _map.Initialized = true;
             _map.RefreshData(_viewport.Extent, _viewport.Resolution, true);
         }

@@ -122,6 +132,7 @@
         {
             NavigateTo(_map.Envelope, scaleMethod);

+            _map.Initialized = true;
             _map.RefreshData(_viewport.Extent, _viewport.Resolution, true);
         }

@@ -138,6 +149,7 @@
                 _viewport.Width - centerOfZoom.X,
                 _viewport.Height - centerOfZoom.Y));

+            _map.Initialized = true;
             _map.RefreshData(_viewport.Extent, _viewport.Resolution, false);
         }
     }


changed pow to exp function

changed pow to exp function

--- osu.Game.Rulesets.Osu/Difficulty/Skills/Speed.cs
+++ osu.Game.Rulesets.Osu/Difficulty/Skills/Speed.cs
@@ -184,7 +184,7 @@
         public double RelevantNoteCount()
         {
             double maxStrain = objectStrains.Max();
-            return objectStrains.Aggregate((total, next) => total + (1.0 / (1.0 + Math.Pow(Math.E, -(next/maxStrain * 12.0 - 6.0)))));
+            return objectStrains.Aggregate((total, next) => total + (1.0 / (1.0 + Math.Exp(-(next/maxStrain * 12.0 - 6.0)))));
         }
     }
 }


Implement basic hover card state

Implement basic hover card state

--- osu.Game/Beatmaps/Drawables/Cards/BeatmapCard.cs
+++ osu.Game/Beatmaps/Drawables/Cards/BeatmapCard.cs
@@ -8,6 +8,7 @@
 using osu.Framework.Graphics.Containers;
 using osu.Framework.Graphics.Shapes;
 using osu.Framework.Graphics.Sprites;
+using osu.Framework.Input.Events;
 using osu.Framework.Localisation;
 using osu.Game.Graphics;
 using osu.Game.Graphics.Containers;
@@ -19,6 +20,7 @@
 using osuTK;
 using osu.Game.Overlays.BeatmapListing.Panels;
 using osu.Game.Resources.Localisation.Web;
+using osuTK.Graphics;

 namespace osu.Game.Beatmaps.Drawables.Cards
 {
@@ -28,8 +30,16 @@
         private const float height = 100;
         private const float corner_radius = 10;

+        private const float transition_duration = 400;
+
         private readonly APIBeatmapSet beatmapSet;
+
+        private UpdateableOnlineBeatmapSetCover leftCover;
         private FillFlowContainer iconArea;
+
+        private Container mainContent;
+        private Box foregroundGradient;
+
         private GridContainer titleContainer;
         private GridContainer artistContainer;

@@ -63,7 +73,7 @@
                     Size = new Vector2(height),
                     Children = new Drawable[]
                     {
-                        new UpdateableOnlineBeatmapSetCover(BeatmapSetCoverType.List)
+                        leftCover = new UpdateableOnlineBeatmapSetCover(BeatmapSetCoverType.List)
                         {
                             RelativeSizeAxes = Axes.Both,
                             OnlineInfo = beatmapSet
@@ -77,11 +87,10 @@
                         }
                     }
                 },
-                new Container
+                mainContent = new Container
                 {
                     Name = @"Main content",
                     X = height - corner_radius,
-                    Width = width - height,
                     Height = height,
                     CornerRadius = corner_radius,
                     Masking = true,
@@ -92,10 +101,9 @@
                             RelativeSizeAxes = Axes.Both,
                             OnlineInfo = beatmapSet,
                         },
-                        new Box
-                        {
-                            RelativeSizeAxes = Axes.Both,
-                            Colour = ColourInfo.GradientHorizontal(colourProvider.Background2, colourProvider.Background2.Opacity(0.8f)),
+                        foregroundGradient = new Box
+                        {
+                            RelativeSizeAxes = Axes.Both,
                         },
                         new FillFlowContainer
                         {
@@ -239,10 +247,44 @@
             }
         }

+        protected override void LoadComplete()
+        {
+            base.LoadComplete();
+            updateState();
+            FinishTransforms(true);
+        }
+
         private LocalisableString createArtistText()
         {
             var romanisableArtist = new RomanisableString(beatmapSet.ArtistUnicode, beatmapSet.Artist);
             return BeatmapsetsStrings.ShowDetailsByArtist(romanisableArtist);
         }
+
+        protected override bool OnHover(HoverEvent e)
+        {
+            updateState();
+            return base.OnHover(e);
+        }
+
+        protected override void OnHoverLost(HoverLostEvent e)
+        {
+            updateState();
+            base.OnHoverLost(e);
+        }
+
+        private void updateState()
+        {
+            float targetWidth = width - height;
+            if (IsHovered)
+                targetWidth -= 20;
+
+            mainContent.ResizeWidthTo(targetWidth, transition_duration, Easing.OutQuint);
+
+            var foregroundColour = IsHovered ? colourProvider.Background4 : colourProvider.Background2;
+            var foregroundGradientColour = ColourInfo.GradientHorizontal(foregroundColour, foregroundColour.Opacity(0.8f));
+            foregroundGradient.FadeColour(foregroundGradientColour, transition_duration, Easing.OutQuint);
+
+            leftCover.FadeColour(IsHovered ? OsuColour.Gray(0.2f) : Color4.White, transition_duration, Easing.OutQuint);
+        }
     }
 }


Fix incorrect indentation

Fix incorrect indentation

I used this for the o!f example.

--- osu.Game/Overlays/BeatmapListing/SearchPlayed.cs
+++ osu.Game/Overlays/BeatmapListing/SearchPlayed.cs
@@ -7,32 +7,32 @@

 namespace osu.Game.Overlays.BeatmapListing
 {
-[LocalisableEnum(typeof(SearchPlayedEnumLocalisationMapper))]
-public enum SearchPlayed
-{
-    Any,
-    Played,
-    Unplayed
-}
+    [LocalisableEnum(typeof(SearchPlayedEnumLocalisationMapper))]
+    public enum SearchPlayed
+    {
+        Any,
+        Played,
+        Unplayed
+    }

-public class SearchPlayedEnumLocalisationMapper : EnumLocalisationMapper<SearchPlayed>
-{
-    public override LocalisableString Map(SearchPlayed value)
+    public class SearchPlayedEnumLocalisationMapper : EnumLocalisationMapper<SearchPlayed>
     {
-        switch (value)
+        public override LocalisableString Map(SearchPlayed value)
         {
-            case SearchPlayed.Any:
-                return BeatmapsStrings.PlayedAny;
+            switch (value)
+            {
+                case SearchPlayed.Any:
+                    return BeatmapsStrings.PlayedAny;

-            case SearchPlayed.Played:
-                return BeatmapsStrings.PlayedPlayed;
+                case SearchPlayed.Played:
+                    return BeatmapsStrings.PlayedPlayed;

-            case SearchPlayed.Unplayed:
-                return BeatmapsStrings.PlayedUnplayed;
+                case SearchPlayed.Unplayed:
+                    return BeatmapsStrings.PlayedUnplayed;

-            default:
-                throw new ArgumentOutOfRangeException(nameof(value), value, null);
+                default:
+                    throw new ArgumentOutOfRangeException(nameof(value), value, null);
+            }
         }
     }
 }
-}


Brought the Today Class up to coding standard. (#37)

--- EPPlus/FormulaParsing/Excel/Functions/DateTime/Today.cs
+++ EPPlus/FormulaParsing/Excel/Functions/DateTime/Today.cs
@@ -27,11 +27,20 @@

 namespace OfficeOpenXml.FormulaParsing.Excel.Functions.DateTime
 {
+	/// <summary>
+	/// This class contains the formula for returning today's date.
+	/// </summary>
 	public class Today : ExcelFunction
 	{
+		/// <summary>
+		/// Execute returns today's date.
+		/// </summary>
+		/// <param name="arguments">Not used, but needed for overriding the method.</param>
+		/// <param name="context">Not used, but needed for overriding the method.</param>
+		/// <returns>Today's date as an OADate.</returns>
 		public override CompileResult Execute(IEnumerable<FunctionArgument> arguments, ParsingContext context)
 		{
-			return CreateResult(System.DateTime.Today.ToOADate(), DataType.Date);
+			return this.CreateResult(System.DateTime.Today.ToOADate(), DataType.Date);
 		}
 	}
 }


Fixed case where CredentialsValidatorAttribute would return true when logged into the C1 Console, even though the entered email adress didn't exist.

Added options for controlling whether CredentialsValidatorAttribute should validate Email, UserName or both. Default behaviour is only Email.

--- FormBuilder/Validation/CredentialsValidatorAttribute.cs
+++ FormBuilder/Validation/CredentialsValidatorAttribute.cs
@@ -1,5 +1,5 @@
-using System.Web.Security;
-using System.Linq;
+using System.Linq;
+using System.Web.Security;

 using Composite.C1Console.Security;

@@ -9,10 +9,16 @@
     {
         private readonly string _passwordField;

+        public bool CheckUserName { get; set; }
+        public bool CheckEmail { get; set; }
+
         public CredentialsValidatorAttribute(string message, string passwordField)
             : base(message)
         {
             _passwordField = passwordField;
+
+            CheckUserName = false;
+            CheckEmail = true;
         }

         public override FormValidationRule CreateRule(FormField field)
@@ -24,14 +30,31 @@
             {
                 Rule = () =>
                 {
-                    if (UserValidationFacade.IsLoggedIn())
+                    var isValid = false;
+
+                    if (!isValid && CheckUserName)
                     {
-                        return true;
+                        var user = Membership.GetUser(value);
+
+                        isValid = user != null;
                     }

-                    var userName = Membership.GetUserNameByEmail(value);
+                    if (!isValid && CheckEmail)
+                    {
+                        var username = Membership.GetUserNameByEmail(value);
+                        if (username != null)
+                        {
+                            isValid = true;
+                            value = username;
+                        }
+                    }

-                    return userName != null && Membership.ValidateUser(userName, password);
+                    if (!isValid)
+                    {
+                        return false;
+                    }
+
+                    return UserValidationFacade.IsLoggedIn() || Membership.ValidateUser(value, password);
                 }
             };
         }


KnownRegion に言語を追加

KnownRegion に言語を追加

--- PBXProject.cs
+++ PBXProject.cs
@@ -19,5 +19,21 @@
 				return (string)_data[ MAINGROUP_KEY ];
 			}
 		}
+
+		public void AddKnownRegion(string region)
+		{
+			if (string.IsNullOrEmpty(region)) {
+				return;
+			}
+
+			if (System.Text.RegularExpressions.Regex.IsMatch(region, "[a-z]{2}[_-][a-z]{2}", System.Text.RegularExpressions.RegexOptions.IgnoreCase)) {
+				region = "\"" + region.Replace("_", "-") + "\"";
+			}
+
+			PBXList _list = (PBXList)this.data["knownRegions"];
+			if (!_list.Contains(region)) {
+				_list.Add(region);
+			}
+		}
 	}
 }


Removed unused CRS

Removed unused CRS

--- Samples/Mapsui.Samples.Common.Desktop/ShapefileSample.cs
+++ Samples/Mapsui.Samples.Common.Desktop/ShapefileSample.cs
@@ -23,14 +23,14 @@
         {
             var map = new Map();

-            var countrySource = new ShapeFile(GetAppDir() + "\\GeoData\\World\\countries.shp", true) {CRS = "EPSG:3785"};
-            var citySource = new ShapeFile(GetAppDir() + "\\GeoData\\World\\cities.shp", true) {CRS = "EPSG:3785"};
+            var countrySource = new ShapeFile(GetAppDir() + "\\GeoData\\World\\countries.shp", true);
+            var citySource = new ShapeFile(GetAppDir() + "\\GeoData\\World\\cities.shp", true);

             map.Layers.Add(new RasterizingLayer(CreateCountryLayer(countrySource)));
             map.Layers.Add(new RasterizingLayer(CreateCityLayer(citySource)));
             map.Layers.Add(new RasterizingLayer(CreateCountryLabelLayer(countrySource)));
             map.Layers.Add(new RasterizingLayer(CreateCityLabelLayer(citySource)));
-
+
             return map;
         }


get rid of file name enforcement

get rid of file name enforcement

--- SecretSanta/Services/Implementation/AccountRepository.cs
+++ SecretSanta/Services/Implementation/AccountRepository.cs
@@ -23,24 +23,10 @@

     public async Task<IEnumerable<Account>> GetAllAsync(CancellationToken token)
     {
-        string accountFileSuffix = _appSettings.AccountFilePattern.Replace("*", string.Empty);
-
-        string removeAccountFileSuffix(string filePath) =>
-            Path.GetFileNameWithoutExtension(filePath)
-                .Replace(accountFileSuffix, string.Empty)
-                .Trim(new[] { ' ', '.' });
-
-        bool isAccountFile(string filePath) => Guid.TryParseExact(removeAccountFileSuffix(filePath), "N", out Guid _);
-
         if (!_accounts.Any())
         {
             foreach (var filePath in Directory.EnumerateFiles(DataDirectory, _appSettings.AccountFilePattern))
             {
-                if (!isAccountFile(filePath))
-                {
-                    continue;
-                }
-
                 using var file = File.OpenRead(filePath);

                 var account = await JsonSerializer.DeserializeAsync<Account>(file, cancellationToken: token);


add NestedPropTest integrated test

add NestedPropTest integrated test

--- sdmap/test/sdmap.test/IntegratedTest/PropTest.cs
+++ sdmap/test/sdmap.test/IntegratedTest/PropTest.cs
@@ -80,5 +80,15 @@
             var result = rt.TryEmit("v1.v1", new { });
             Assert.False(result.IsSuccess);
         }
+
+        [Fact]
+        public void NestedPropTest()
+        {
+            var code = "sql v1{#prop<A.B>}";
+            var rt = new SdmapCompiler();
+            rt.AddSourceCode(code);
+            var result = rt.TryEmit("v1", new { A = new { B = 3 } });
+            Assert.Equal("3", result.Value);
+        }
     }
 }


Only annotate graphDrawingArea with weights, and x-y key if in debug mode

--- SlimeSimulation/View/WindowComponent/GraphDrawingArea.cs
+++ SlimeSimulation/View/WindowComponent/GraphDrawingArea.cs
@@ -121,7 +121,8 @@
         }

         private void DrawTextNearCoord(Context graphic, String s, double x, double y)
-        {
+        {
+#if DEBUG
             Logger.Trace("[DrawTextNearCoord] Drawing {0} at {1}, {2}", s, x, y);
             graphic.Save();

@@ -129,6 +130,7 @@
             graphic.ShowText(s);

             graphic.Restore();
+#endif
         }


Removed parameter. All tests pass with PS

--- Source/CmisCmdlets.Test/Commands/NewCmisDocumentTests.cs
+++ Source/CmisCmdlets.Test/Commands/NewCmisDocumentTests.cs
@@ -36,7 +36,7 @@

         [TestCase("/notexisting/__emptyDoc")]
         [TestCase("/nonexisting/")] // empty filename
-        public void CreatingDocumentWithInvalidPathThrows(string path, Type exceptionType)
+        public void CreatingDocumentWithInvalidPathThrows(string path)
         {
             CmisHelper.RegisterTempObject(path);
             Assert.Throws<CmdletInvocationException>(delegate {


Fix #947 (#948)

Fix #947 (#948)

--- Source/EasyNetQ/Consumer/DefaultConsumerErrorStrategy.cs
+++ Source/EasyNetQ/Consumer/DefaultConsumerErrorStrategy.cs
@@ -188,7 +188,7 @@
             return AckStrategies.NackWithRequeue;
         }

-        public AckStrategy HandleConsumerCancelled(ConsumerExecutionContext context)
+        public virtual AckStrategy HandleConsumerCancelled(ConsumerExecutionContext context)
         {
             return AckStrategies.NackWithRequeue;
         }


updated package description and title

updated package description and title

--- Source/SignalR.Extras.Autofac/Properties/AssemblyInfo.cs
+++ Source/SignalR.Extras.Autofac/Properties/AssemblyInfo.cs
@@ -5,7 +5,7 @@
 // General Information about an assembly is controlled through the following
 // set of attributes. Change these attribute values to modify the information
 // associated with an assembly.
-[assembly: AssemblyTitle("Autofac Lifetime Scoping for SignalR Hubs")]
+[assembly: AssemblyTitle("Autofac Lifetime Scoping for SignalR 2 Hubs")]
 [assembly: AssemblyDescription("Automatic Autofac lifetime-scope management for SignalR 2.x hubs.")]
 [assembly: AssemblyConfiguration("")]
 [assembly: AssemblyCompany("Michael Monsour")]


[Imaging] - Bug in dds codec where image cube would incorrectly load as a 2D image.

--- Gorgon/Gorgon.Graphics.Imaging/Codecs/GorgonCodecDds.cs
+++ Gorgon/Gorgon.Graphics.Imaging/Codecs/GorgonCodecDds.cs
@@ -528,6 +528,7 @@
                 if ((dx10settings.MiscFlags & DdsHeaderMiscFlags.TextureCube) == DdsHeaderMiscFlags.TextureCube)
                 {
                     arrayCount *= 6;
+                    imageType = ImageType.ImageCube;
                 }
             }
             else


Converted DamperEnabled and AttractorEnabled to UI_Toggles

DamperEnabled uses the callback to toggle Damper

--- Modules/ATMagneticDamper.cs
+++ Modules/ATMagneticDamper.cs
@@ -13,6 +13,15 @@
 {
     public class ATMagneticDamper : PartModule
     {
+        [KSPField(isPersistant = true,
+            guiName = "Damper Field",
+            guiActive = true,
+            guiActiveEditor = true,
+            guiActiveUnfocused = true,
+            unfocusedRange = 50)]
+        [UI_Toggle(scene = UI_Scene.All)]
+        public bool DamperEnabled;
+
         [KSPField(isPersistant = true,
             guiActive = true,
             guiActiveEditor = true,
@@ -42,6 +51,15 @@

         [KSPField] public bool VariableAttractorForce;

+        [KSPField(isPersistant = true,
+            guiName = "Attractor",
+            guiActive = true,
+            guiActiveEditor = true,
+            guiActiveUnfocused = true,
+            unfocusedRange = 50)]
+        [UI_Toggle(scene = UI_Scene.All)]
+        public bool AttractorEnabled = true;
+
         [KSPField] public string DamperID = string.Empty;
         [KSPField] public string Sensor = string.Empty;
         [KSPField] public string AttractorLocation = string.Empty;
@@ -57,9 +75,6 @@

         [KSPField] public string AnimatorID = string.Empty;
         private IAnimator animator;
-
-        [KSPField(isPersistant = true)] public bool damperEnabled = false;
-        [KSPField(isPersistant = true)] public bool attractorEnabled = true;
         protected Damper damper;
         protected ResourcePump socket;

@@ -102,10 +117,10 @@
                     sensor.AddCollider(true);
                     damper = sensor.gameObject.AddComponent<Damper>();
                     damper.Init(this);
-                    damper.enabled = damperEnabled;
+                    damper.enabled = DamperEnabled;
                     socket = part.CreateSocket();
                     animator = part.GetAnimator(AnimatorID);
-                    if(damperEnabled)
+                    if(DamperEnabled)
                         animator?.Open();
                     else
                         animator?.Close();
@@ -114,14 +129,14 @@
             }
             var damper_controllable = HasDamper && EnableControls;
             var attractor_controllable = damper_controllable && damper.HasAttractor;
+            Fields[nameof(DamperEnabled)].uiControlFlight.onFieldChanged = onDamperToggle;
+            Utils.EnableField(Fields[nameof(DamperEnabled)], damper_controllable);
             Utils.EnableField(Fields[nameof(Attenuation)], damper_controllable);
-            Events[nameof(ToggleEvent)].active = damper_controllable;
             Actions[nameof(ToggleAction)].active = damper_controllable;
+            Utils.EnableField(Fields[nameof(AttractorEnabled)], attractor_controllable);
             Utils.EnableField(Fields[nameof(AttractorPower)],
                 attractor_controllable && VariableAttractorForce);
-            Events[nameof(ToggleAttractorEvent)].active = attractor_controllable;
             Actions[nameof(ToggleAttractorAction)].active = attractor_controllable;
-            updatePAW();
         }

         private void OnDestroy()
@@ -156,71 +171,43 @@
             base.OnUpdate();
             if(!HasDamper)
                 return;
-            if(damperEnabled
+            if(reactivateAtUT > 0
+               && DamperEnabled
                && !damper.enabled
                && Planetarium.GetUniversalTime() > reactivateAtUT)
             {
                 animator?.Open();
                 damper.enabled = true;
+                reactivateAtUT = -1;
                 Utils.Message($"[{part.Title()}] Damper reactivated"); //debug
             }
         }

-        private void updatePAW()
-        {
-            Events[nameof(ToggleEvent)].guiName = damperEnabled
-                ? "Disable Damper"
-                : "Enable Damper";
-            Events[nameof(ToggleAttractorEvent)].guiName = attractorEnabled
-                ? "Disable Attractor"
-                : "Enable Attractor";
-        }
-
-        public void Enable(bool enable = true)
-        {
-            if(!HasDamper || enable == damperEnabled)
+        private void onDamperToggle(BaseField field, object value)
+        {
+            if(!HasDamper)
                 return;
-            damper.enabled = damperEnabled = enable;
-            if(damperEnabled)
+            damper.enabled = DamperEnabled;
+            if(DamperEnabled)
                 animator?.Open();
             else
                 animator?.Close();
-            updatePAW();
-        }
-
-        public void EnableAttractor(bool enable = true)
-        {
-            if(!HasDamper || enable == attractorEnabled)
-                return;
-            attractorEnabled = enable;
-            updatePAW();
-        }
-
-        [KSPEvent(guiName = "Disable Damper",
-            active = true,
-            guiActive = true,
-            guiActiveEditor = true,
-            guiActiveUnfocused = true,
-            externalToEVAOnly = false,
-            unfocusedRange = 50)]
-        public void ToggleEvent(BaseEventDetails data) => Enable(!damperEnabled);
+        }
+
+        public void EnableDamper(bool enable)
+        {
+            var old = DamperEnabled;
+            DamperEnabled = enable;
+            onDamperToggle(Fields[nameof(DamperEnabled)], old);
+        }

         [KSPAction(guiName = "Toggle Damper")]
-        public void ToggleAction(KSPActionParam data) => Enable(!damperEnabled);
-
-        [KSPEvent(guiName = "Disable Attractor",
-            active = true,
-            guiActive = true,
-            guiActiveEditor = true,
-            guiActiveUnfocused = true,
-            externalToEVAOnly = false,
-            unfocusedRange = 50)]
-        public void ToggleAttractorEvent(BaseEventDetails data) =>
-            EnableAttractor(!attractorEnabled);
+        public void ToggleAction(KSPActionParam data) =>
+            EnableDamper(!DamperEnabled);

         [KSPAction(guiName = "Toggle Attractor")]
         public void ToggleAttractorAction(KSPActionParam data) =>
-            EnableAttractor(!attractorEnabled);
+            AttractorEnabled = !AttractorEnabled;

         protected class Damper : MonoBehaviour
         {
@@ -265,7 +252,7 @@
                     attractor = controller.part.FindModelTransform(controller.AttractorLocation);
                 if(!string.IsNullOrEmpty(controller.AffectedPartTags))
                     tags = Utils.ParseLine(controller.AffectedPartTags, Utils.Comma);
-                controller.attractorEnabled = attractor != null;
+                controller.AttractorEnabled = attractor != null;
             }

             private void FixedUpdate()
@@ -277,7 +264,7 @@
                 {
                     var A = controller.Attenuation / 100f;
                     var total_energy = 0f;
-                    var attractorEnabled = controller.attractorEnabled && attractor != null;
+                    var attractorEnabled = controller.AttractorEnabled && attractor != null;
                     var attractorPosition = attractorEnabled ? attractor.position : Vector3.zero;
                     var h = controller.part.Rigidbody;
                     var nBodies = dampedBodies.Count;


Adding a simple standalone battelobby parser, to be used for parsing the temporary Battlelobby file created on the Heroes of the Storm loading screen

--- Heroes.ReplayParser/MPQFiles/ReplayServerBattlelobby.cs
+++ Heroes.ReplayParser/MPQFiles/ReplayServerBattlelobby.cs
@@ -5,6 +5,8 @@
     using System;
     using System.Text;
     using System.Collections.Generic;
+    using System.Text.RegularExpressions;
+    using System.Linq;

     /// <summary> Parses the replay.server.battlelobby file in the replay file. </summary>
     public class ReplayServerBattlelobby
@@ -368,4 +370,65 @@
                 throw new Exception("Not 0x00");
         }
     }
+
+    public static class StandaloneBattleLobbyParser
+    {
+        public static Replay Parse(byte[] data)
+        {
+            var stringData = Encoding.UTF8.GetString(data);
+
+            var replay = new Replay();
+
+            // Find player region using Regex
+            var playerBattleNetRegionId = 99;
+            switch (Regex.Match(stringData, @"s2mh..(US|EU|KR|CN|XX)").Value.Substring(6))
+            {
+                case "US":
+                    playerBattleNetRegionId = 1;
+                    break;
+                case "EU":
+                    playerBattleNetRegionId = 2;
+                    break;
+                case "KR":
+                    playerBattleNetRegionId = 3;
+                    break;
+                case "CN":
+                    playerBattleNetRegionId = 5;
+                    break;
+                case "XX":
+                default:
+                    break;
+            }
+
+            // Find player BattleTags using Regex
+            replay.Players = Regex.Matches(stringData, @"(\p{L}|\d){3,24}#\d{4,10}[zØ]?").Cast<Match>().Select(i => i.Value.Split('#')).Select(i => new Player {
+                Name = i[0],
+                BattleTag = int.Parse(i[1].Last() == 'z' || i[1].Last() == 'Ø' ? i[1].Substring(0, i[1].Length - 2) : i[1]),
+                BattleNetRegionId = playerBattleNetRegionId
+            }).ToArray();
+
+            // For all game modes other than Custom, players should be ordered by team in the lobby
+            // This may be true for Custom games as well; more testing needed
+            for (var i = 0; i < replay.Players.Length; i++)
+                replay.Players[i].Team = i >= 5 ? 1 : 0;
+
+            return replay;
+        }
+
+        public static string Base64EncodeStandaloneBattlelobby(Heroes.ReplayParser.Replay replay)
+        {
+            return Convert.ToBase64String(Encoding.UTF8.GetBytes(string.Join(",", replay.Players.Select(i => i.BattleNetRegionId + "#" + i.Name + "#" + i.BattleTag + "#" + i.Team))));
+        }
+
+        public static Replay Base64DecodeStandaloneBattlelobby(string base64EncodedData)
+        {
+            return new Replay {
+                Players = Encoding.UTF8.GetString(Convert.FromBase64String(base64EncodedData)).Split(',').Select(i => i.Split('#')).Select(i => new Player {
+                    Name = i[1],
+                    BattleTag = int.Parse(i[2]),
+                    BattleNetRegionId = int.Parse(i[0]),
+                    Team = int.Parse(i[3])
+                }).ToArray() };
+        }
+    }
 }


MagneticDamper: moved all dampening logic from Damper to the main module

In order to avoid double dampening when a Rigidbody triggers more than one
Damper

--- Modules/ATMagneticDamper.cs
+++ Modules/ATMagneticDamper.cs
@@ -111,20 +111,28 @@
         private Vector3 attractorAxis;
         private string[] tags;

+        /// <summary>
+        /// For holding damped packed vessels in place.
+        /// </summary>
+        private readonly Dictionary<uint, VesselInfo> dampedVessels =
+            new Dictionary<uint, VesselInfo>();
+
+        /// <summary>
+        /// For damping unpacked vessels, per Rigidbody.
+        /// </summary>
+        private readonly Dictionary<int, RBInfo> dampedBodies =
+            new Dictionary<int, RBInfo>();
+
+        /// <summary>
+        /// A set of persistentIds of Vessels that have
+        /// triggered the damper this frame. It is cleared at LateUpdate.
+        /// </summary>
+        public readonly HashSet<uint> VesselsInside =
+            new HashSet<uint>();
+
         public bool HasDamper { get; private set; }
         public bool HasAttractor { get; private set; }
-
-        private bool _damperActive;
-
-        private bool damperActive
-        {
-            get => _damperActive;
-            set
-            {
-                _damperActive = value;
-                dampers.ForEach(d => d.enabled = value);
-            }
-        }
+        private bool damperActive;

         public static ATMagneticDamper GetDamper(Part p, string id) =>
             string.IsNullOrEmpty(id)
@@ -216,6 +224,7 @@
                         animator?.Open();
                     else
                         animator?.Close();
+                    StartCoroutine(dampPackedVessels());
                 }
             }
             var damper_controllable = HasDamper && EnableControls;
@@ -245,7 +254,7 @@
             sensor.AddCollider(true);
             var damper = sensor.gameObject.AddComponent<Damper>();
             damper.Init(this);
-            damper.enabled = DamperEnabled;
+            damper.enabled = true;
             dampers.Add(damper);
         }

@@ -261,6 +270,7 @@
             if(socket == null)
                 return;
             drainEnergy(IdleEnergyConsumption);
+            dampRigidBodies();
             if(!socket.TransferResource())
                 return;
             if(socket.PartialTransfer)
@@ -275,6 +285,152 @@
                 part.AddThermalFlux(EnergyToThermalK * socket.Result / TimeWarp.fixedDeltaTime);
         }

+        private void dampRigidBodies()
+        {
+            if(dampedBodies.Count <= 0 || part.Rigidbody == null)
+                return;
+            var A = Attenuation / 100f;
+            var total_energy = 0f;
+            var attractorEnabled = HasAttractor && AttractorEnabled;
+            var attractorPosition = attractorEnabled
+                ? attractor.position
+                : Vector3.zero;
+            var attractorAxisW = attractorEnabled
+                ? attractor.rotation * attractorAxis
+                : Vector3.zero;
+            var h = part.Rigidbody;
+            var rbIds = dampedBodies.Keys.ToList();
+            foreach(var rbId in rbIds)
+            {
+                var b = dampedBodies[rbId];
+                if(b.rb == null || b.part == null)
+                    continue;
+                if(b.part.packed)
+                {
+                    trackPackedVessel(b.part);
+                    continue;
+                }
+                var dist = b.rb.position - h.position;
+                b.relV = b.rb.velocity
+                         - h.velocity
+                         - Vector3.Cross(h.angularVelocity, dist);
+                if(A > 0)
+                {
+                    b.dAv = A * (h.angularVelocity - b.rb.angularVelocity);
+                    b.dP = A * b.rb.mass * b.relV;
+                }
+                if(attractorEnabled)
+                {
+                    var toAttractor = b.rb.worldCenterOfMass - attractorPosition;
+                    if(!toAttractor.IsZero())
+                    {
+                        var toAttractorDist = toAttractor.magnitude;
+                        toAttractor /= toAttractorDist;
+                        var rVel2attractor = -Vector3.Dot(b.relV, toAttractor);
+                        var dV = Mathf.Min(
+                            part.crashTolerance * 0.9f - rVel2attractor,
+                            TimeWarp.fixedDeltaTime * AttractorPower);
+                        if(dV > 0)
+                        {
+                            if(InvertAttractor)
+                            {
+                                var toCenter = Vector3.ProjectOnPlane(
+                                    toAttractor,
+                                    attractorAxisW);
+                                toAttractor = 2 * toCenter - toAttractor;
+                                toAttractor.Normalize();
+                            }
+                            if(!InvertAttractor && toAttractorDist < 1)
+                                dV *= toAttractorDist;
+                            b.dP += b.rb.mass * dV * toAttractor;
+                        }
+                    }
+                }
+                b.dP = b.dP.ClampMagnitudeH(MaxForce * TimeWarp.fixedDeltaTime);
+                var dL2 = Vector3.Dot(b.dAv.SquaredComponents(), b.rb.inertiaTensor);
+                var dP2 = b.dP.sqrMagnitude
+                          * Utils.ClampH(b.relV.magnitude / RelativeVelocityThreshold, 1);
+                total_energy += dP2 / b.rb.mass + dP2 / h.mass + dL2;
+                dampedBodies[rbId] = b;
+            }
+            if(total_energy > 0)
+            {
+                var energy_consumption = total_energy
+                                         / TimeWarp.fixedDeltaTime
+                                         * EnergyConsumptionK;
+                var K = 1f;
+                if(energy_consumption > MaxEnergyConsumption)
+                {
+                    K = Mathf.Sqrt(MaxEnergyConsumption / energy_consumption);
+                    energy_consumption = MaxEnergyConsumption;
+                }
+                foreach(var rbId in rbIds)
+                {
+                    var b = dampedBodies[rbId];
+                    if(b.rb == null)
+                        continue;
+                    if(K < 1)
+                    {
+                        b.dP *= K;
+                        b.dAv *= K;
+                    }
+                    b.rb.AddTorque(b.dAv, ForceMode.VelocityChange);
+                    b.rb.AddForce(-b.dP, ForceMode.Impulse);
+                    h.AddForceAtPosition(b.dP, b.rb.position, ForceMode.Impulse);
+                }
+                drainEnergy(energy_consumption);
+            }
+            dampedBodies.Clear();
+        }
+
+        private IEnumerator<YieldInstruction> dampPackedVessels()
+        {
+            while(true)
+            {
+                yield return new WaitForFixedUpdate();
+                if(dampedVessels.Count <= 0)
+                    continue;
+                var T = transform;
+                foreach(var vsl_info in dampedVessels.Values.ToList())
+                {
+                    if(vsl_info.vessel != null && vsl_info.vessel.packed)
+                    {
+                        if(!vsl_info.inited)
+                        {
+                            vsl_info.SetPosRot(
+                                T.InverseTransformPoint(
+                                    vsl_info.vessel.vesselTransform.position),
+                                Quaternion.Inverse(T.rotation)
+                                * vsl_info.vessel.vesselTransform.rotation);
+                            dampedVessels[vsl_info.id] = vsl_info;
+                        }
+                        vsl_info.vessel.SetPosition(
+                            transform.TransformPoint(vsl_info.position));
+                        vsl_info.vessel.SetRotation(T.rotation * vsl_info.rotation, false);
+                        if(vsl_info.energyConsumption > 0)
+                            drainEnergy(vsl_info.energyConsumption);
+                    }
+                    else
+                        dampedVessels.Remove(vsl_info.id);
+                }
+            }
+            // ReSharper disable once IteratorNeverReturns
+        }
+
+        private void trackPackedVessel(Part p)
+        {
+            if(dampedVessels.ContainsKey(p.vessel.persistentId))
+                return;
+            dampedVessels[p.vessel.persistentId] = new VesselInfo
+            {
+                id = p.vessel.persistentId,
+                vessel = p.vessel,
+                energyConsumption = p.TotalMass()
+                                    * EnergyConsumptionK
+                                    * 0.01f
+            };
+        }
+
         public override void OnUpdate()
         {
             base.OnUpdate();
@@ -291,6 +447,11 @@
                 reactivateAtUT = -1;
                 Utils.Message($"[{part.Title()}] Damper reactivated");
             }
+        }
+
+        private void LateUpdate()
+        {
+            VesselsInside.Clear();
         }

         private void onDamperToggle(object value)
@@ -321,212 +482,45 @@
         public void InvertAttractorAction(KSPActionParam data) =>
             InvertAttractor = !InvertAttractor;

+        private struct VesselInfo
+        {
+            public uint id;
+            public Vessel vessel;
+            public Vector3 position;
+            public Quaternion rotation;
+            public float energyConsumption;
+            public bool inited;
+
+            public void SetPosRot(Vector3 pos, Quaternion rot)
+            {
+                position = pos;
+                rotation = rot;
+                inited = true;
+            }
+        }
+
+        private struct RBInfo
+        {
+            public Part part;
+            public Rigidbody rb;
+            public Vector3 relV;
+            public Vector3 dP;
+            public Vector3 dAv;
+        }
+
         protected class Damper : MonoBehaviour
         {
             private ATMagneticDamper controller;

-            private struct VesselInfo
-            {
-                public uint id;
-                public Vessel vessel;
-                public Vector3 position;
-                public Quaternion rotation;
-                public float energyConsumption;
-                public bool inited;
-
-                public void SetPosRot(Vector3 pos, Quaternion rot)
-                {
-                    position = pos;
-                    rotation = rot;
-                    inited = true;
-                }
-            }
-
-            private struct RBInfo
-            {
-                public Part part;
-                public Rigidbody rb;
-                public Vector3 relV;
-                public Vector3 dP;
-                public Vector3 dAv;
-            }
-
-            /// <summary>
-            /// For holding damped packed vessels in place.
-            /// </summary>
-            private readonly Dictionary<uint, VesselInfo> dampedVessels =
-                new Dictionary<uint, VesselInfo>();
-
-            /// <summary>
-            /// For damping unpacked vessels, per Rigidbody.
-            /// </summary>
-            private readonly List<RBInfo> dampedBodies =
-                new List<RBInfo>();
-
-            /// <summary>
-            /// A set of persistentIds of Vessels that have
-            /// triggered the damper this frame. It is cleared at LateUpdate.
-            /// </summary>
-            public readonly HashSet<uint> VesselsInside =
-                new HashSet<uint>();
-
             public void Init(ATMagneticDamper damper_module)
             {
                 controller = damper_module;
-                StartCoroutine(damp_packed_vessels());
-            }
-
-            private void FixedUpdate()
-            {
-                if(FlightDriver.Pause || controller == null)
-                    return;
-                if(dampedBodies.Count <= 0 || controller.part.Rigidbody == null)
-                    return;
-                var A = controller.Attenuation / 100f;
-                var total_energy = 0f;
-                var attractorEnabled = controller.HasAttractor && controller.AttractorEnabled;
-                var attractorPosition = attractorEnabled
-                    ? controller.attractor.position
-                    : Vector3.zero;
-                var attractorAxisW = attractorEnabled
-                    ? controller.attractor.rotation * controller.attractorAxis
-                    : Vector3.zero;
-                var h = controller.part.Rigidbody;
-                var nBodies = dampedBodies.Count;
-                for(var i = 0; i < nBodies; i++)
-                {
-                    var b = dampedBodies[i];
-                    if(b.rb == null || b.part == null)
-                        continue;
-                    if(b.part.packed)
-                    {
-                        track_packed_vessel(b.part);
-                        continue;
-                    }
-                    var dist = b.rb.position - h.position;
-                    b.relV = b.rb.velocity
-                             - h.velocity
-                             - Vector3.Cross(h.angularVelocity, dist);
-                    if(A > 0)
-                    {
-                        b.dAv = A * (h.angularVelocity - b.rb.angularVelocity);
-                        b.dP = A * b.rb.mass * b.relV;
-                    }
-                    if(attractorEnabled)
-                    {
-                        var toAttractor = b.rb.worldCenterOfMass - attractorPosition;
-                        if(!toAttractor.IsZero())
-                        {
-                            var toAttractorDist = toAttractor.magnitude;
-                            toAttractor /= toAttractorDist;
-                            var rVel2attractor = -Vector3.Dot(b.relV, toAttractor);
-                            var dV = Mathf.Min(
-                                controller.part.crashTolerance * 0.9f - rVel2attractor,
-                                TimeWarp.fixedDeltaTime * controller.AttractorPower);
-                            if(dV > 0)
-                            {
-                                if(controller.InvertAttractor)
-                                {
-                                    var toCenter = Vector3.ProjectOnPlane(
-                                        toAttractor,
-                                        attractorAxisW);
-                                    toAttractor = 2 * toCenter - toAttractor;
-                                    toAttractor.Normalize();
-                                }
-                                if(!controller.InvertAttractor && toAttractorDist < 1)
-                                    dV *= toAttractorDist;
-                                b.dP += b.rb.mass * dV * toAttractor;
-                            }
-                        }
-                    }
-                    b.dP = b.dP.ClampMagnitudeH(controller.MaxForce * TimeWarp.fixedDeltaTime);
-                    var dL2 = Vector3.Dot(b.dAv.SquaredComponents(), b.rb.inertiaTensor);
-                    var dP2 = b.dP.sqrMagnitude
-                              * Utils.ClampH(b.relV.magnitude / RelativeVelocityThreshold, 1);
-                    total_energy += dP2 / b.rb.mass + dP2 / h.mass + dL2;
-                    dampedBodies[i] = b;
-                }
-                if(total_energy > 0)
-                {
-                    var energy_consumption = total_energy
-                                             / TimeWarp.fixedDeltaTime
-                                             * controller.EnergyConsumptionK;
-                    var K = 1f;
-                    if(energy_consumption > controller.MaxEnergyConsumption)
-                    {
-                        K = Mathf.Sqrt(controller.MaxEnergyConsumption / energy_consumption);
-                        energy_consumption = controller.MaxEnergyConsumption;
-                    }
-                    for(var i = 0; i < nBodies; i++)
-                    {
-                        var b = dampedBodies[i];
-                        if(b.rb == null)
-                            continue;
-                        if(K < 1)
-                        {
-                            b.dP *= K;
-                            b.dAv *= K;
-                        }
-                        b.rb.AddTorque(b.dAv, ForceMode.VelocityChange);
-                        b.rb.AddForce(-b.dP, ForceMode.Impulse);
-                        h.AddForceAtPosition(b.dP, b.rb.position, ForceMode.Impulse);
-                    }
-                    controller.drainEnergy(energy_consumption);
-                }
-                dampedBodies.Clear();
-            }
-
-            private IEnumerator<YieldInstruction> damp_packed_vessels()
-            {
-                while(true)
-                {
-                    yield return new WaitForFixedUpdate();
-                    if(dampedVessels.Count <= 0)
-                        continue;
-                    var T = transform;
-                    foreach(var vsl_info in dampedVessels.Values.ToList())
-                    {
-                        if(vsl_info.vessel != null && vsl_info.vessel.packed)
-                        {
-                            if(!vsl_info.inited)
-                            {
-                                vsl_info.SetPosRot(
-                                    T.InverseTransformPoint(
-                                        vsl_info.vessel.vesselTransform.position),
-                                    Quaternion.Inverse(T.rotation)
-                                    * vsl_info.vessel.vesselTransform.rotation);
-                                dampedVessels[vsl_info.id] = vsl_info;
-                            }
-                            vsl_info.vessel.SetPosition(
-                                transform.TransformPoint(vsl_info.position));
-                            vsl_info.vessel.SetRotation(T.rotation * vsl_info.rotation, false);
-                            if(vsl_info.energyConsumption > 0)
-                                controller.drainEnergy(vsl_info.energyConsumption);
-                        }
-                        else
-                            dampedVessels.Remove(vsl_info.id);
-                    }
-                }
-                // ReSharper disable once IteratorNeverReturns
-            }
-
-            private void track_packed_vessel(Part p)
-            {
-                if(dampedVessels.ContainsKey(p.vessel.persistentId))
-                    return;
-                dampedVessels[p.vessel.persistentId] = new VesselInfo
-                {
-                    id = p.vessel.persistentId,
-                    vessel = p.vessel,
-                    energyConsumption = p.TotalMass()
-                                        * controller.EnergyConsumptionK
-                                        * 0.01f
-                };
             }

             private void OnTriggerStay(Collider col)
             {
-                if(!enabled
+                if(controller == null
+                   || !controller.damperActive
                    || col == null
                    || col.attachedRigidbody == null)
                     return;
@@ -543,20 +537,17 @@
                 if(controller.tags != null
                    && !controller.tags.Any(t => p.partInfo.tags.Contains(t)))
                     return;
-                VesselsInside.Add(p.vessel.persistentId);
+                controller.VesselsInside.Add(p.vessel.persistentId);
                 if(!p.packed && !controller.part.packed)
                 {
-                    var r = col.attachedRigidbody;
-                    dampedBodies.Add(new RBInfo { rb = r, part = p });
-                    dampedVessels.Remove(p.vessel.persistentId);
+                    var rb = col.attachedRigidbody;
+                    var rbId = rb.GetInstanceID();
+                    if(!controller.dampedBodies.ContainsKey(rbId))
+                        controller.dampedBodies.Add(rbId, new RBInfo { rb = rb, part = p });
+                    controller.dampedVessels.Remove(p.vessel.persistentId);
                 }
                 else
-                    track_packed_vessel(p);
-            }
-
-            private void LateUpdate()
-            {
-                VesselsInside.Clear();
+                    controller.trackPackedVessel(p);
             }
         }
     }


Delete MoveVerticallyWithArrows.cs

Delete MoveVerticallyWithArrows.cs

--- MoveVerticallyWithArrows.cs
+++ MoveVerticallyWithArrows.cs
@@ -1,18 +0,0 @@
-using UnityEngine;
-
-public class MoveVerticallyWithArrows : MonoBehaviour
-{
-	public float Velocity;
-	public Rigidbody2D rigidBody;
-
-	void Update ()
-	{
-		if (Input.GetKey (KeyCode.UpArrow)) {
-			rigidBody.velocity = new Vector2 (rigidBody.velocity.x, Velocity);
-		} else if (Input.GetKey (KeyCode.DownArrow)) {
-			rigidBody.velocity = new Vector2 (rigidBody.velocity.x, -Velocity);
-		} else {
-			rigidBody.velocity = new Vector2 (rigidBody.velocity.x, 0);
-		}
-	}
-}


Moving the functions to find layer position and offset into GCodeFile

--- examples/GCodeVisualizer/GCodeFile.cs
+++ examples/GCodeVisualizer/GCodeFile.cs
@@ -46,7 +46,18 @@
 {
     public class GCodeFile
     {
-        List<int> indexOfChangeInZ = new List<int>();
+		const int Max32BitFileSize = 500000000;
+
+		const string matchDouble = @"^-*[0-9]*\.?[0-9]*";
+		private static readonly Regex matchDoubleRegex = new Regex(matchDouble, RegexOptions.Compiled);
+
+		static readonly Vector4 VelocitySameAsStopMmPerS = new Vector4(8, 8, .4, 5);
+		static readonly Vector4 MaxAccelerationMmPerS2 = new Vector4(1000, 1000, 100, 5000);
+		static readonly Vector4 MaxVelocityMmPerS = new Vector4(500, 500, 5, 25);
+
+		double amountOfAccumulatedEWhileParsing = 0;
+
+		List<int> indexOfChangeInZ = new List<int>();
         Vector2 center = Vector2.Zero;
         double parsingLastZ;
         bool gcodeHasExplicitLayerChangeInfo = false;
@@ -139,7 +150,6 @@
 			return false;
 		}

-		public static readonly int Max32BitFileSize = 500000000;
 		public static bool FileTooBigToLoad(string fileName)
 		{
 			if (File.Exists(fileName)
@@ -205,19 +215,22 @@

         public void Load(string gcodePathAndFileName)
         {
-            using (FileStream fileStream = new FileStream(gcodePathAndFileName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
-            {
-                using (StreamReader streamReader = new StreamReader(fileStream))
-                {
-                    GCodeFile loadedFile = GCodeFile.Load(streamReader.BaseStream);
-
-                    this.indexOfChangeInZ = loadedFile.indexOfChangeInZ;
-                    this.center = loadedFile.center;
-                    this.parsingLastZ = loadedFile.parsingLastZ;
-
-                    this.GCodeCommandQueue = loadedFile.GCodeCommandQueue;
-                }
-            }
+			if (!FileTooBigToLoad(gcodePathAndFileName))
+			{
+				using (FileStream fileStream = new FileStream(gcodePathAndFileName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
+				{
+					using (StreamReader streamReader = new StreamReader(fileStream))
+					{
+						GCodeFile loadedFile = GCodeFile.Load(streamReader.BaseStream);
+
+						this.indexOfChangeInZ = loadedFile.indexOfChangeInZ;
+						this.center = loadedFile.center;
+						this.parsingLastZ = loadedFile.parsingLastZ;
+
+						this.GCodeCommandQueue = loadedFile.GCodeCommandQueue;
+					}
+				}
+			}
         }

         private static IEnumerable<string> CustomSplit(string newtext, char splitChar)
@@ -429,9 +442,6 @@
             }
         }

-        public static Vector4 VelocitySameAsStopMmPerS = new Vector4(8, 8, .4, 5);
-        public static Vector4 MaxAccelerationMmPerS2 = new Vector4(1000, 1000, 100, 5000);
-        public static Vector4 MaxVelocityMmPerS = new Vector4(500, 500, 5, 25);
         private double GetSecondsThisLine(int lineIndex, Vector3 deltaPositionThisLine, double deltaEPositionThisLine, double feedRateMmPerMin)
         {
             double startingVelocityMmPerS = VelocitySameAsStopMmPerS.x;
@@ -502,8 +512,6 @@
             return false;
         }

-        const string matchDouble = @"^-*[0-9]*\.?[0-9]*";
-        private static readonly Regex matchDoubleRegex = new Regex(matchDouble, RegexOptions.Compiled);
         public static bool GetFirstNumberAfter(string stringToCheckAfter, string stringWithNumber, ref double readValue, int startIndex = 0)
         {
             int stringPos = stringWithNumber.IndexOf(stringToCheckAfter, startIndex);
@@ -712,7 +720,6 @@
 #endif
         }

-        double amountOfAccumulatedE = 0;
         void ParseGLine(string lineString, PrinterMachineInstruction processingMachineState)
         {
             // take off any comments before we check its length
@@ -757,7 +764,7 @@
                         {
                             if (processingMachineState.movementType == PrinterMachineInstruction.MovementTypes.Absolute)
                             {
-                                processingMachineState.EPosition = valueE + amountOfAccumulatedE;
+                                processingMachineState.EPosition = valueE + amountOfAccumulatedEWhileParsing;
                             }
                             else
                             {
@@ -818,7 +825,7 @@
                     if (GetFirstNumberAfter("E", lineString, ref ePosition))
                     {
                         // remember how much e position we just gave up
-                        amountOfAccumulatedE = (processingMachineState.EPosition - ePosition);
+                        amountOfAccumulatedEWhileParsing = (processingMachineState.EPosition - ePosition);
                     }
                     break;

@@ -1023,5 +1030,48 @@

             return .5;
         }
-    }
+
+		public int GetLayerIndex(int instructionIndex)
+		{
+			if (instructionIndex >= 0
+				&& instructionIndex < Count)
+			{
+				for (int zIndex = 0; zIndex < NumChangesInZ; zIndex++)
+				{
+					if (instructionIndex < IndexOfChangeInZ[zIndex])
+					{
+						return zIndex;
+					}
+				}
+
+				return NumChangesInZ - 1;
+			}
+
+			return -1;
+		}
+
+		public double Ratio0to1IntoContainedLayer(int instructionIndex)
+		{
+			int currentLayer = GetLayerIndex(instructionIndex);
+
+			if (currentLayer > -1)
+			{
+				int startIndex = 0;
+				if (currentLayer > 0)
+				{
+					startIndex = IndexOfChangeInZ[currentLayer - 1];
+				}
+				int endIndex = Count - 1;
+				if (currentLayer < NumChangesInZ - 1)
+				{
+					endIndex = IndexOfChangeInZ[currentLayer];
+				}
+
+				int deltaFromStart = Math.Max(0, instructionIndex - startIndex);
+				return deltaFromStart / (double)(endIndex - startIndex);
+			}
+
+			return 0;
+		}
+	}
 }


working with mysql

working with mysql

--- NMG.Core/MetadataFactory.cs
+++ NMG.Core/MetadataFactory.cs
@@ -16,6 +16,10 @@
             {
                 metadataReader = new SqlServerMetadataReader(connectionStr);
             }
+            else if (serverType == ServerType.MySQL)
+            {
+                metadataReader = new MysqlMetadataReader(connectionStr);
+            }
             else
             {
                 metadataReader = new NpgsqlMetadataReader(connectionStr);


fix tests

fix tests

--- Spa2/NakedObjects.Spa.Selenium.Test/tests/FooterTests.cs
+++ Spa2/NakedObjects.Spa.Selenium.Test/tests/FooterTests.cs
@@ -119,14 +119,15 @@
             WaitForView(Pane.Single, PaneType.Home);
             ClickPropertiesButton();
             WaitForView(Pane.Single, PaneType.Properties, "Application Properties");
-            wait.Until(d => br.FindElements(By.CssSelector(".property")).Count >= 4);
+            wait.Until(d => br.FindElements(By.CssSelector(".property")).Count >= 5);
             ReadOnlyCollection<IWebElement> properties = br.FindElements(By.CssSelector(".property"));
             Thread.Sleep(1000);
             Assert.IsTrue(properties[0].Text.StartsWith("Application Name:"));
             Assert.IsTrue(properties[1].Text.StartsWith("User Name:"));
-            Assert.IsTrue(properties[2].Text.StartsWith("Server Url: http:"));
-            Assert.IsTrue(properties[3].Text.StartsWith("Server version: 8.1.0"));
-            Assert.IsTrue(properties[4].Text.StartsWith("Client version:"));
+            Assert.IsTrue(properties[2].Text.StartsWith("Client Profile Name:"));
+            Assert.IsTrue(properties[3].Text.StartsWith("Server Url: http")); // maybe https
+            Assert.IsTrue(properties[4].Text.StartsWith("Server version: 8.1.0"));
+            Assert.IsTrue(properties[5].Text.StartsWith("Client version:"));
         }

         public virtual void LogOff() {


Fixed the spelling of some HeaderId fields and added a few new ones

--- MimeKit/HeaderId.cs
+++ MimeKit/HeaderId.cs
@@ -198,7 +198,7 @@
 		/// <summary>
 		/// The Followup-To header field.
 		/// </summary>
-		FollowUpTo,
+		FollowupTo,

 		/// <summary>
 		/// The From header field.
@@ -252,9 +252,9 @@
 		MimeVersion,

 		/// <summary>
-		/// The News-Groups header field.
-		/// </summary>
-		NewsGroups,
+		/// The Newsgroups header field.
+		/// </summary>
+		Newsgroups,

 		/// <summary>
 		/// The Nntp-Posting-Host header field.
@@ -362,6 +362,11 @@
 		Sensitivity,

 		/// <summary>
+		/// The Status header field.
+		/// </summary>
+		Status,
+
+		/// <summary>
 		/// The Subject header field.
 		/// </summary>
 		Subject,
@@ -372,14 +377,24 @@
 		Summary,

 		/// <summary>
-		/// The Supercedes header field.
-		/// </summary>
-		Supercedes,
+		/// The Supersedes header field.
+		/// </summary>
+		Supersedes,

 		/// <summary>
 		/// The To header field.
 		/// </summary>
 		To,
+
+		/// <summary>
+		/// The User-Agent header field.
+		/// </summary>
+		UserAgent,
+
+		/// <summary>
+		/// The X-Mailer header field.
+		/// </summary>
+		XMailer,

 		/// <summary>
 		/// The X-MSMail-Priority header field.
@@ -391,6 +406,11 @@
 		/// The X-Priority header field.
 		/// </summary>
 		XPriority,
+
+		/// <summary>
+		/// The X-Status header field.
+		/// </summary>
+		XStatus,

 		/// <summary>
 		/// An unknown header field.


Correção da legenda. #20000006-1914 #271

--- Src/GestaoEscolar/Academico/ControleTurma/Listao.aspx.cs
+++ Src/GestaoEscolar/Academico/ControleTurma/Listao.aspx.cs
@@ -1393,7 +1393,7 @@
                                            where (bool)dr["semPlanoAula"] && Convert.ToDateTime(dr["data"]).Date < DateTime.Now
                                            select dr).Count() > 0;

-                if (existeAulaSemPlano
+                if (existeAulaSemPlano && ACA_ParametroAcademicoBO.ParametroValorBooleanoPorEntidade(eChaveAcademico.EXIBIR_ALERTA_AULA_SEM_PLANO, __SessionWEB.__UsuarioWEB.Usuario.ent_id)
                     && (__SessionWEB.__UsuarioWEB.Grupo.vis_id == SysVisaoID.Individual
                         || VS_EntitiesControleTurma.curso.tne_id != ACA_ParametroAcademicoBO.ParametroValorInt32PorEntidade(eChaveAcademico.TIPO_NIVEL_ENSINO_EDUCACAO_INFANTIL, __SessionWEB.__UsuarioWEB.Usuario.ent_id)
                         || ACA_ParametroAcademicoBO.ParametroValorBooleanoPorEntidade(eChaveAcademico.EXIBIR_ALERTA_AULA_SEM_PLANO_ENSINO_INFANTIL, __SessionWEB.__UsuarioWEB.Usuario.ent_id)))


Fix null arg name test for Shuffle

Fix null arg name test for Shuffle

--- MoreLinq/Shuffle.cs
+++ MoreLinq/Shuffle.cs
@@ -51,12 +51,12 @@
         /// used for the random selection algorithm.
         /// </summary>
         /// <typeparam name="T">The type of source sequence elements.</typeparam>
-        /// <param name="sequence">
+        /// <param name="source">
         /// The sequence from which to return random elements.</param>
         /// <param name="rand">
         /// A random generator used as part of the selection algorithm.</param>
         /// <returns>
-        /// A sequence of elements <paramref name="sequence"/> randomized in
+        /// A sequence of elements <paramref name="source"/> randomized in
         /// their order.
         /// </returns>
         /// <remarks>
@@ -65,14 +65,14 @@
         /// streamed.
         /// </remarks>

-        public static IEnumerable<T> Shuffle<T>(this IEnumerable<T> sequence, Random rand)
+        public static IEnumerable<T> Shuffle<T>(this IEnumerable<T> source, Random rand)
         {
-            if (sequence == null) throw new ArgumentNullException(nameof(sequence));
+            if (source == null) throw new ArgumentNullException(nameof(source));
             if (rand == null) throw new ArgumentNullException(nameof(rand));

-            return RandomSubsetImpl(sequence, rand, source =>
+            return RandomSubsetImpl(source, rand, seq =>
             {
-                var array = source.ToArray();
+                var array = seq.ToArray();
                 return (array, array.Length);
             });
         }


#62 Access token can now specify an expiry length in seconds

--- src/Procon.Core.Shared/Models/AccountAccessToken.cs
+++ src/Procon.Core.Shared/Models/AccountAccessToken.cs
@@ -35,13 +35,25 @@
         /// touched for longer than 48 hours are removed and the user will need to authenticate again.
         /// </summary>
         public DateTime LastTouched { get; set; }
-
+
+        /// <summary>
+        /// The maximum age in seconds that a token can go without being touched before it is considered expired.
+        /// </summary>
+        public int ExpiredWindowSeconds {
+            get { return _expiredWindowSeconds; }
+            set { _expiredWindowSeconds = Math.Abs(value); }
+        }
+
+        private int _expiredWindowSeconds;
+
         /// <summary>
         /// Initializes the basics, like a new guid.
         /// </summary>
         public AccountAccessToken() {
             this.Id = Guid.NewGuid();
             this.LastTouched = DateTime.Now;
+
+            this.ExpiredWindowSeconds = 172800;
         }

         /// <summary>
@@ -115,7 +127,7 @@
             // 5. If.. for some reason.. we don't have a token for them to validate against..
             // 6. If we don't know who owns this token?
             // 7. If the owner does not have a password hash set (accounts don't require a password hash set, but we need one here)
-            if (this.Id == id && this.LastTouched > DateTime.Now.AddDays(-2) && String.IsNullOrEmpty(token) == false && String.IsNullOrEmpty(identifer) == false && String.IsNullOrEmpty(this.TokenHash) == false && this.Account != null && String.IsNullOrEmpty(this.Account.PasswordHash) == false) {
+            if (this.Id == id && this.LastTouched > DateTime.Now.AddSeconds(-1 * this.ExpiredWindowSeconds) && String.IsNullOrEmpty(token) == false && String.IsNullOrEmpty(identifer) == false && String.IsNullOrEmpty(this.TokenHash) == false && this.Account != null && String.IsNullOrEmpty(this.Account.PasswordHash) == false) {
                 authenticated = String.CompareOrdinal(this.TokenHash, BCrypt.Net.BCrypt.HashPassword(this.ShaHash(token + this.Account.PasswordHash + identifer), this.TokenHash)) == 0;

                 if (authenticated == true) {


Close #152

Close #152

--- LCIAToolAPI/CalRecycleLCA.Services/LCIAMethodService.cs
+++ LCIAToolAPI/CalRecycleLCA.Services/LCIAMethodService.cs
@@ -18,21 +18,25 @@
     public class LCIAMethodService : Service<LCIAMethod>, ILCIAMethodService
     {
         private IRepositoryAsync<LCIAMethod> _repository;
+        /*
+         * // note: this list has been retired.  The following

         private List<int> activeMethods = new List<int> {
-            2,  //	ILCD2011; Climate change; midpoint; GWP100; IPCC2007
-            28, //	ILCD2011; Acidification terrestrial and freshwater; midpoint; Accumulated Exceedance; Seppälä et al. 2006, Posch et al. 2008
-            20, //	ILCD2011; Ecotoxicity freshwater; midpoint; CTUe; USEtox
-            5, //	ILCD2011; Eutrophication marine; midpoint; N equivalents; ReCiPe
-            16, //	ILCD2011; Eutrophication freshwater; midpoint; P equivalents; ReCiPe
-            3, //	ILCD2011; Eutrophication terrestrial; midpoint; Accumulated Exceedance; Seppala et al 2006, Posch et al 2008
-            23, //	ILCD2011; Cancer human health effects; midpoint; CTUh; USEtox
-            1, //	ILCD2011; Non-cancer human health effects; midpoint; CTUh; USEtox
-            8, //	ILCD2011; Respiratory inorganics; midpoint; PM2.5eq; Rabl and Spadaro 2004-Greco et al 2007
-            12, //	ILCD2011; Ozone depletion; midpoint; ODP; WMO1999
-            25, //	ILCD2011; Photochemical ozone formation; midpoint - human health; POCP; Van Zelm et al. (2008)
-            21 //	ILCD2011; Resource depletion- mineral, fossils and renewables; midpoint;abiotic resource depletion; Van Oers et al. 2002
+                1, //	ILCD2011; Non-cancer human health effects; midpoint; CTUh; USEtox
+                2,  //	ILCD2011; Climate change; midpoint; GWP100; IPCC2007
+                3, //	ILCD2011; Eutrophication terrestrial; midpoint; Accumulated Exceedance; Seppala et al 2006, Posch et al 2008
+                5, //	ILCD2011; Eutrophication marine; midpoint; N equivalents; ReCiPe
+                8, //	ILCD2011; Respiratory inorganics; midpoint; PM2.5eq; Rabl and Spadaro 2004-Greco et al 2007
+                12, //	ILCD2011; Ozone depletion; midpoint; ODP; WMO1999
+                16, //	ILCD2011; Eutrophication freshwater; midpoint; P equivalents; ReCiPe
+                20, //	ILCD2011; Ecotoxicity freshwater; midpoint; CTUe; USEtox
+                21, //	ILCD2011; Resource depletion- mineral, fossils and renewables; midpoint;abiotic resource depletion; Van Oers et al. 2002
+                23, //	ILCD2011; Cancer human health effects; midpoint; CTUh; USEtox
+                25, //	ILCD2011; Photochemical ozone formation; midpoint - human health; POCP; Van Zelm et al. (2008)
+                28, //	ILCD2011; Acidification terrestrial and freshwater; midpoint; Accumulated Exceedance; Seppälä et al. 2006, Posch et al. 2008
         };
+
+         * */

         public LCIAMethodService(IRepositoryAsync<LCIAMethod> repository)
             : base(repository)
@@ -47,7 +51,7 @@
         /// <returns></returns>
         public List<int> QueryActiveMethods()
         {
-            return _repository.Queryable().Where(k => activeMethods.Contains(k.LCIAMethodID))
+            return _repository.Queryable() //.Where(k => activeMethods.Contains(k.LCIAMethodID))
                 .Select(k => k.LCIAMethodID).ToList();
         }
         /// <summary>
@@ -57,10 +61,10 @@
         /// <returns></returns>
         public IEnumerable<LCIAMethod> FetchActiveMethods()
         {
-            return _repository.Query(k => activeMethods.Contains(k.LCIAMethodID))
-                                                .Include(x => x.IndicatorType)
-                                                .Include(x => x.ILCDEntity)
-                                                .Select();
+            return _repository.Query() //Query(k => activeMethods.Contains(k.LCIAMethodID))
+                .Include(x => x.IndicatorType)
+                .Include(x => x.ILCDEntity)
+                .Select();
         }
     }
 }


Improve comment on AddCredential() extension method (#1373)

--- Src/Support/Google.Apis.Auth/OAuth2/RequestExtensions.cs
+++ Src/Support/Google.Apis.Auth/OAuth2/RequestExtensions.cs
@@ -29,6 +29,8 @@
         /// <summary>
         /// Add a credential that is used for this request only.
         /// This will override a service-level credential (if there is one).
+        /// Do not call more than once per request instance, as each call incrementally adds the provided credential.
+        /// To perform identical requests but with distinct credentials, create a separate request instance for each credential.
         /// </summary>
         /// <typeparam name="T">The request type.</typeparam>
         /// <param name="request">The request which requires a credential. Must not be null.</param>


git review changes

git review changes

Removed unused variable

--- Tests.Integration.Presentation.Web/Tools/AdviceHelper.cs
+++ Tests.Integration.Presentation.Web/Tools/AdviceHelper.cs
@@ -25,8 +25,6 @@
                 StopDate = advice.StopDate?.ToString(HttpApi.OdataDateTimeFormat)
             };

-            var test = body;
-
             return await HttpApi.PostWithCookieAsync(TestEnvironment.CreateUrl($"odata/advice?organizationId={organizationId}"), cookie, body);
         }


Updated AssemblyVersions for June release

--- OfficeDevPnP.Core/OfficeDevPnP.Core/Properties/AssemblyInfo.cs
+++ OfficeDevPnP.Core/OfficeDevPnP.Core/Properties/AssemblyInfo.cs
@@ -32,5 +32,10 @@
 //
 // You can specify all the values or you can default the Build and Revision Numbers
 // by using the '*' as shown below:
-[assembly: AssemblyVersion("1.2.0515.0")]
-[assembly: AssemblyFileVersion("1.2.0515.0")]
+// Convention:
+// Major version = current version 1
+// Minor version = Sequence...version 0 was with March release...so 1=April, 2=May, 3=June, 4=July, 5=August, 6=September, 7=October, 8=November, 9=December
+// Third part = version indenpendant showing the release month in MMYY
+// Fourth part = 0
+[assembly: AssemblyVersion("1.3.0615.0")]
+[assembly: AssemblyFileVersion("1.3.0615.0")]


Apparently, 00place.bin is unused and the one read by the game is in msg

--- OpenKh.Tools.Kh2PlaceEditor/ViewModels/PlaceEditorViewModel.cs
+++ OpenKh.Tools.Kh2PlaceEditor/ViewModels/PlaceEditorViewModel.cs
@@ -22,7 +22,7 @@
             Japanese
         }

-        private static readonly List<FileDialogFilter> Filters = FileDialogFilterComposer.Compose().AddExtensions("00place.bin", "bin").AddAllFiles();
+        private static readonly List<FileDialogFilter> Filters = FileDialogFilterComposer.Compose().AddExtensions("00place.bin or place.bin", "bin").AddAllFiles();
         private static readonly string ApplicationName = Utilities.GetApplicationName();

         private Window Window => Application.Current.Windows.OfType<Window>().FirstOrDefault(x => x.IsActive);


#1015 Deleting MoM folder will state, that the official MoM app is not installed

Fix regression introduced in #656

--- unity/Assets/Scripts/UI/Screens/GameSelectionScreen.cs
+++ unity/Assets/Scripts/UI/Screens/GameSelectionScreen.cs
@@ -149,27 +149,15 @@
             }

             // Draw MoM button
+            startColor = Color.white;
+            if (fcMoM.NeedImport())
+            {
+                startColor = Color.gray;
+            }
             ui = new UIElement();
             ui.SetLocation((UIScaler.GetWidthUnits() - 30) / 2, 19, 30, 3);
             ui.SetText(MOM_NAME, startColor);
-            if (fcMoM.NeedImport())
-            {
-                startColor = Color.gray;
-                if (Application.platform == RuntimePlatform.Android)
-                {
-                    ui.SetText(MOM_APP_NOT_FOUND_ANDROID, Color.red);
-                }
-                else
-                {
-                    ui.SetText(MOM_APP_NOT_FOUND, Color.red);
-                }
-            }
-            else
-            {
-                startColor = Color.white;
-                ui.SetText(MOM_NAME, startColor);
-                ui.SetButton(delegate { MoM(); });
-            }
+            ui.SetButton(delegate { MoM(); });
             ui.SetFontSize(UIScaler.GetMediumFont());
             ui.SetBGColor(new Color(0, 0.03f, 0f));
             new UIElementBorder(ui, startColor);


handled malformed base64

handled malformed base64

--- src/RsdnFoundation/Xaml/Rendering/MarkupRenderer.cs
+++ src/RsdnFoundation/Xaml/Rendering/MarkupRenderer.cs
@@ -370,7 +370,15 @@
             }

             // read stream
-            var bytes = Convert.FromBase64String(base64);
+            byte[] bytes = null;
+            try
+            {
+                bytes = Convert.FromBase64String(base64);
+            }
+            catch (FormatException)
+            {
+                return null;
+            }

             // create bitmap
             using (var ms = new InMemoryRandomAccessStream())


Update copy

Update copy

--- src/SFA.DAS.EAS.Web/Views/EmployerTeam/Index.cshtml
+++ src/SFA.DAS.EAS.Web/Views/EmployerTeam/Index.cshtml
@@ -69,7 +69,7 @@

                             Recruitment

-
Recruit an apprentice by creating a vacancy. This vacancy will be advertised on Find an apprentice.

+
Recruit an apprentice by creating a vacancy. This vacancy will be advertised on Find an apprenticeship.

                     }


Bug 679148 - Should trim trailing / in WebSyncPreferencesWidge.
Thanks to Roman Yepishev for providing this patch.
Launchpad Bug 1019256

Ubuntu One has recently switched to a more strict path checking.
This breaks the follow URL https://one.ubuntu.com/notes/
Tomboy tries to access https://one.ubuntu.com/notes//api/1.0.

--- Tomboy/Addins/WebSyncService/WebSyncPreferencesWidget.cs
+++ Tomboy/Addins/WebSyncService/WebSyncPreferencesWidget.cs
@@ -111,7 +111,7 @@
 			if (Auth == null)
 				Auth = new Api.OAuth ();

-			string rootUri = Server + "/api/1.0";
+			string rootUri = Server.TrimEnd('/') + "/api/1.0";
 			try {
 				RootInfo root = RootInfo.GetRoot (rootUri, new Api.AnonymousConnection ());


Fixed error when checking if collection exists on MongoDb 3.6

--- src/Serilog.Sinks.MongoDB/Helpers/MongoDbHelpers.cs
+++ src/Serilog.Sinks.MongoDB/Helpers/MongoDbHelpers.cs
@@ -35,10 +35,8 @@
         /// <returns></returns>
         internal static bool CollectionExists(this IMongoDatabase database, string collectionName)
         {
-            return
-                database.ListCollections(new ListCollectionsOptions { Filter = new BsonDocument { { "name", collectionName } } })
-                    .ToList()
-                    .Any();
+            var collection = database.GetCollection<BsonDocument>(collectionName);
+            return collection != null;
         }

         /// <summary>