add GrpcEnvironment.ShuttingDown event

add GrpcEnvironment.ShuttingDown event

--- src/csharp/Grpc.Core/GrpcEnvironment.cs
+++ src/csharp/Grpc.Core/GrpcEnvironment.cs
@@ -43,13 +43,15 @@
         static readonly HashSet<Channel> registeredChannels = new HashSet<Channel>();
         static readonly HashSet<Server> registeredServers = new HashSet<Server>();

+        static EventHandler shuttingDown;
+
         static ILogger logger = new NullLogger();

         readonly GrpcThreadPool threadPool;
         readonly DebugStats debugStats = new DebugStats();
         readonly AtomicCounter cqPickerCounter = new AtomicCounter();

-        bool isClosed;
+        bool isShutdown;

         /// <summary>
         /// Returns a reference-counted instance of initialized gRPC environment.
@@ -238,6 +240,21 @@
         }

         /// <summary>
+        /// Occurs when <c>GrpcEnvironment</c> is about the start the shutdown logic.
+        /// </summary>
+        public static event EventHandler ShuttingDown
+        {
+            add
+            {
+                shuttingDown += value;
+            }
+            remove
+            {
+                shuttingDown -= value;
+            }
+        }
+
+        /// <summary>
         /// Creates gRPC environment.
         /// </summary>
         private GrpcEnvironment()
@@ -311,13 +328,16 @@
         /// </summary>
         private async Task ShutdownAsync()
         {
-            if (isClosed)
-            {
-                throw new InvalidOperationException("Close has already been called");
-            }
+            if (isShutdown)
+            {
+                throw new InvalidOperationException("ShutdownAsync has already been called");
+            }
+
+            await Task.Run(() => shuttingDown.Invoke(this, null));
+
             await threadPool.StopAsync().ConfigureAwait(false);
             GrpcNativeShutdown();
-            isClosed = true;
+            isShutdown = true;

             debugStats.CheckOK();
         }


GameSetting.cs: Remove unnecessary code for client.

--- AIWolfLib/GameSetting.cs
+++ AIWolfLib/GameSetting.cs
@@ -7,7 +7,6 @@
 // http://opensource.org/licenses/mit-license.php
 //

-using System;
 using System.Collections.Generic;
 using System.Linq;
 using System.Runtime.Serialization;
@@ -21,109 +20,46 @@
     public class GameSetting
     {
         /// <summary>
-        /// Number of each roles.
-        /// </summary>
-        /// <remarks>
-        /// Order: bodyguard, freemason, medium, possessed, seer, villager, werewolf.
-        /// </remarks>
-        static readonly int[][] roleNumArray =
-        {
-            null,//0
-            null,//1
-            null,//2
-            null,//3
-            null,//4
-            new[] {0, 0, 0, 1, 1, 2, 1 },//5
-            new[] {0, 0, 0, 1, 1, 3, 1 },//6
-            new[] {0, 0, 0, 0, 1, 4, 2 },//7
-            new[] {0, 0, 1, 0, 1, 4, 2 },//8
-            new[] {0, 0, 1, 0, 1, 5, 2 },//9
-            new[] {1, 0, 1, 1, 1, 4, 2 },//10
-            new[] {1, 0, 1, 1, 1, 5, 2 },//11
-            new[] {1, 0, 1, 1, 1, 5, 3 },//12
-            new[] {1, 0, 1, 1, 1, 6, 3 },//13
-            new[] {1, 0, 1, 1, 1, 7, 3 },//14
-            new[] {1, 0, 1, 1, 1, 8, 3 },//15
-            new[] {1, 0, 1, 1, 1, 9, 3 },//16
-            new[] {1, 0, 1, 1, 1, 10, 3 },//17
-            new[] {1, 0, 1, 1, 1, 11, 3 },//18
-        };
-
-        /// <summary>
-        /// Default setting of game.
-        /// </summary>
-        /// <param name="agentNum">The number of agents.</param>
-        /// <returns>Default setting of game with given number of agents.</returns>
-        public static GameSetting GetDefaultGame(int agentNum)
-        {
-            if (agentNum < 5 || agentNum > 18)
-            {
-                throw new AIWolfRuntimeException("GameSetting.GetDefaultGame: agentNum must be between 5 and 18.");
-            }
-
-            GameSetting setting = new GameSetting();
-            setting.MaxTalk = 10;
-            setting.EnableNoAttack = false;
-            setting.VoteVisible = true;
-            setting.VotableInFirstDay = false;
-
-            Role[] roles = (Role[])Enum.GetValues(typeof(Role));
-            for (int i = 0; i < roles.Length; i++)
-            {
-                setting.RoleNumMap[roles[i]] = roleNumArray[agentNum][i];
-            }
-            return setting;
-        }
-
-        /// <summary>
         /// The number of each role.
         /// </summary>
         /// <value>Dictionary storing the number of each role.</value>
         [DataMember(Name = "roleNumMap")]
-        public Dictionary<Role, int> RoleNumMap { get; set; }
+        public Dictionary<Role, int> RoleNumMap { get; } = new Dictionary<Role, int>();

         /// <summary>
         /// The maximum number of talks.
         /// </summary>
         /// <value>The maximum number of talks.</value>
         [DataMember(Name = "maxTalk")]
-        public int MaxTalk { get; set; }
+        public int MaxTalk { get; }

         /// <summary>
         /// Whether or not the game permit to attack no one.
         /// </summary>
         /// <value>True if the game permit to attack no one, otherwise, false.</value>
         [DataMember(Name = "enableNoAttack")]
-        public bool EnableNoAttack { get; set; }
+        public bool EnableNoAttack { get; }

         /// <summary>
         /// Whether or not agent can see who vote to who.
         /// </summary>
         /// <value>True if agent can see who vote to who, otherwise, false.</value>
         [DataMember(Name = "voteVisible")]
-        public bool VoteVisible { get; set; }
+        public bool VoteVisible { get; }

         /// <summary>
         /// Whether or not there is vote in the first day.
         /// </summary>
         /// <value>True if there is vote in the first day, otherwise, false.</value>
         [DataMember(Name = "votableInFirstDay")]
-        public bool VotableInFirstDay { get; private set; }
+        public bool VotableInFirstDay { get; }

         /// <summary>
         /// The random seed.
         /// </summary>
         /// <value>The random seed.</value>
         [DataMember(Name = "randomSeed")]
-        public long RandomSeed { get; set; } = Environment.TickCount;
-
-        /// <summary>
-        /// Initializes a new instance of this class.
-        /// </summary>
-        public GameSetting()
-        {
-            RoleNumMap = new Dictionary<Role, int>();
-        }
+        public long RandomSeed { get; }

         /// <summary>
         /// The number of players.
@@ -134,24 +70,8 @@
         {
             get
             {
-                return RoleNumMap.Values.Sum();
+                return RoleNumMap == null ? 0 : RoleNumMap.Values.Sum();
             }
-        }
-
-        /// <summary>
-        /// Creates a new object that is a copy of the current instance.
-        /// </summary>
-        /// <returns>A new object that is a copy of the current instance.</returns>
-        public object Clone()
-        {
-            GameSetting gameSetting = new GameSetting();
-            gameSetting.EnableNoAttack = EnableNoAttack;
-            gameSetting.VotableInFirstDay = VotableInFirstDay;
-            gameSetting.VoteVisible = VoteVisible;
-            gameSetting.MaxTalk = MaxTalk;
-            gameSetting.RandomSeed = RandomSeed;
-            gameSetting.RoleNumMap = new Dictionary<Role, int>(RoleNumMap);
-            return gameSetting;
         }
     }
 }


Cleaned up the comments.

Cleaned up the comments.

--- ASPNETHosting/Program.cs
+++ ASPNETHosting/Program.cs
@@ -14,32 +14,33 @@
       try {
         var currentDir = Directory.GetCurrentDirectory();

-        // The web app root and its bin directory of the app this program will host.
-        // This will be under the directory this exe is running in.
+        // The web app root and its bin directory of the web app this program will host.
+        // Alternatively, you can use an existing web app directory structure.
+        // I am creating a new directory structure so I don't have to worry about reverting the web.config.
         var aspnetRootDir = Path.Combine(currentDir, "aspnet");
         var aspnetRootBinDir = Path.Combine(aspnetRootDir, "bin");

-        // Delete the web app root directory if it exists and create it.
+        // Ensure a clean web app directory structure.
         if(Directory.Exists(aspnetRootDir)) Directory.Delete(aspnetRootDir, true);
         Directory.CreateDirectory(aspnetRootBinDir);

         // The directory of the web app we're going to use. We're going to copy the necessary files from it to aspnetRootDir and aspnetRootBinDir.
         // You can just use the directory where the web app exists, but you have to be careful about cleaning up any modifications to its web.config.
         var aspnetSourceDir = Path.Combine(currentDir.Substring(0, currentDir.IndexOf("ASPNETHosting")), "ASPNETPOCs");
-        // Copy the web app artifacts we want.
+        // Copy the web app artifacts for this example.
         File.Copy(Path.Combine(Path.Combine(aspnetSourceDir, "bin"), "ASPNETPOCs.dll"), Path.Combine(aspnetRootBinDir, "ASPNETPOCs.dll"));
         File.Copy(Path.Combine(Path.Combine(aspnetSourceDir, "DISetupOnPageParse"), "DIPage.aspx"), Path.Combine(aspnetRootDir, "DIPage.aspx"));
         File.Copy(Path.Combine(Path.Combine(aspnetSourceDir, "DISetupOnPageParse"), "DIUserControl.ascx"), Path.Combine(aspnetRootDir, "DIUserControl.ascx"));

         // Put a copy of this exe in the web app's bin directory.
-        // This is just a short cut.
-        // You can use a separate dll to hold the host (ExampleAspNetHost) and any other code (ExampleHttpModule).
+        // This is just a short cut so I didn't have to create a separate dll to hold the host (ExampleAspNetHost) and the http module (ExampleHttpModule).
         var thisAssemblysLocation = Assembly.GetExecutingAssembly().Location;
         File.Copy(thisAssemblysLocation, Path.Combine(aspnetRootBinDir, Path.GetFileName(thisAssemblysLocation)));

         // Customize the web.config.
         // In this example we're writing the entire web.config because the target web app doesn't have one.
-        // If you web app has a web.config, open it, modify it, and overwrite it.
+        // If your web app has a web.config, open it, modify it, and overwrite it.
+        // "ExampleHttpModule" must be in an assembly in the bin (or the gac, but I haven't tried this).
         File.WriteAllText(Path.Combine(aspnetRootDir, "web.config"), @"
 <configuration>
   <system.web>
@@ -59,23 +60,25 @@
         // Process a page.
         host.ProcessRequest("DIPage.aspx");
       } finally {
+        // Cleanup.
         if(host != null) {
           AppDomain.Unload(host.GetAppDomain());
         }
       }
     }
+  }

-    public class ExampleAspNetHost : MarshalByRefObject {
-      public void ProcessRequest(string page) {
-        HttpRuntime.ProcessRequest(new SimpleWorkerRequest(page, null, Console.Out));
-      }
+  public class ExampleAspNetHost : MarshalByRefObject {
+    public void ProcessRequest(string page) {
+      HttpRuntime.ProcessRequest(new SimpleWorkerRequest(page, null, Console.Out));
+    }

-      public AppDomain GetAppDomain() {
-        return Thread.GetDomain();
-      }
+    public AppDomain GetAppDomain() {
+      return Thread.GetDomain();
     }
   }

+  // Example http module that modifies the page's "Name" property.
   public class ExampleHttpModule : IHttpModule {
     public void Dispose() { }


Restricted date range to avoid 2000 year backtests (common user error 0201 year)

--- Algorithm/QCAlgorithm.cs
+++ Algorithm/QCAlgorithm.cs
@@ -505,10 +505,10 @@
         {
             //Validate the start date:
             //1. Check range;
-            //if (start < (new DateTime(1998, 01, 01)))
-            //{
-            //    throw new Exception("Please select data between January 1st, 1998 to July 31st, 2012.");
-            //}
+            if (start < (new DateTime(1900, 01, 01)))
+            {
+                throw new Exception("Please select a stat date after January 1st, 1900.");
+            }

             //2. Check end date greater:
             if (_endDate != new DateTime())


Bugs fixed

Bugs fixed

--- AndroidMultipleBuilds.cs
+++ AndroidMultipleBuilds.cs
@@ -57,12 +57,19 @@
         #region ongui
         void OnGUI()
         {
-            //string[] versionAux = Application.version.Split('.');
-            //string versionAux2 = Application.version.Replace(".", "");
-
-            bundleVersionCode = int.Parse(Application.version.Replace(".", "")) * 100;
-
-            scrollPosition = GUILayout.BeginScrollView(scrollPosition, false, false, GUILayout.Width(EditorGUIUtility.currentViewWidth), GUILayout.Height(650));
+            try
+            {
+                bundleVersionCode = int.Parse(Application.version.Replace(".", "")) * 100;
+            }
+            catch (System.Exception e)
+            {
+                bundleVersionCode = PlayerSettings.Android.bundleVersionCode;
+            }
+
+            GUILayout.BeginArea(new Rect(0, 0, this.position.width, this.position.height));
+            GUILayout.BeginVertical();
+
+            scrollPosition = GUILayout.BeginScrollView(scrollPosition, GUILayout.Width(EditorGUIUtility.currentViewWidth), GUILayout.MinHeight(200), GUILayout.MaxHeight(600));

             EditorGUILayout.Space();

@@ -114,41 +121,43 @@

             EditorGUILayout.Space();

-            GUILayout.Label("Keystore", EditorStyles.boldLabel);
-
-            EditorGUILayout.BeginHorizontal();
-
-            if (GUILayout.Button("Browse Keystore", GUILayout.ExpandWidth(false)))
-            {
-                //keystorePath = EditorUtility.SaveFolderPanel("Selecione a Keystore", keystorePath, Application.dataPath);
-                keystorePath = EditorUtility.OpenFilePanel("Open existing keystore...", Application.dataPath, "Keystore;*.keystore");
-            }
-            EditorGUILayout.LabelField(keystorePath, GUILayout.ExpandWidth(true));
-
-            EditorGUILayout.EndHorizontal();
-
-            EditorGUILayout.Space();
-
-            if (keystorePath != "")
-            {
-                EditorGUILayout.Space();
-
-                //keystorePass = EditorGUILayout.TextField("Keystore Pass", keystorePass);
-                keystorePass = EditorGUILayout.PasswordField("Keystore password", keystorePass);
-                keyaliasName = EditorGUILayout.TextField("Keystore Alias Name", keyaliasName);
-                //keyaliasPass = EditorGUILayout.TextField("Keystore Alias Pass", keyaliasPass);
-                keyaliasPass = EditorGUILayout.PasswordField("Keystore Alias password", keyaliasPass);
-            }
-            else
-            {
-                EditorGUILayout.HelpBox("If the project does not have a keystore, it is not necessary to select any file.", MessageType.Info);
-            }
+
+            //GUILayout.Label("Keystore", EditorStyles.boldLabel);
+
+            //EditorGUILayout.BeginHorizontal();
+
+            //if (GUILayout.Button("Browse Keystore", GUILayout.ExpandWidth(false)))
+            //{
+            //    //keystorePath = EditorUtility.SaveFolderPanel("Selecione a Keystore", keystorePath, Application.dataPath);
+            //    keystorePath = EditorUtility.OpenFilePanel("Open existing keystore...", Application.dataPath, "Keystore;*.keystore");
+            //}
+            //EditorGUILayout.LabelField(keystorePath, GUILayout.ExpandWidth(true));
+
+            //EditorGUILayout.EndHorizontal();
+
+            //EditorGUILayout.Space();
+
+            //if (keystorePath != "")
+            //{
+            //    EditorGUILayout.Space();
+
+            //    //keystorePass = EditorGUILayout.TextField("Keystore Pass", keystorePass);
+            //    keystorePass = EditorGUILayout.PasswordField("Keystore password", keystorePass);
+            //    keyaliasName = EditorGUILayout.TextField("Keystore Alias Name", keyaliasName);
+            //    //keyaliasPass = EditorGUILayout.TextField("Keystore Alias Pass", keyaliasPass);
+            //    keyaliasPass = EditorGUILayout.PasswordField("Keystore Alias password", keyaliasPass);
+            //}
+            //else
+            //{
+            //    EditorGUILayout.HelpBox("If the project does not have a keystore, it is not necessary to select any file.", MessageType.Info);
+            //}

             EditorGUILayout.Space();

             GUILayout.Label(string.Format("Version: {0}", Application.version), EditorStyles.boldLabel);
             GUILayout.Label(string.Format("Bundle Version Code: {0}", bundleVersionCode), EditorStyles.boldLabel);
-            EditorGUILayout.HelpBox("The Bundle Version Code is based on the Version of the project for easy identification.", MessageType.Info);
+            //bundleVersionCode = EditorGUILayout.IntField("Bundle Version", bundleVersionCode);
+            EditorGUILayout.HelpBox("Enter the Bundle Version Code with three digits or more. The last two digits is used to identify the type of architecture and texture.", MessageType.Info);

             EditorGUILayout.Space();

@@ -256,6 +265,8 @@
             GUILayout.Label("Special thanks for João Neto and Marcelo Henrique Cenço", EditorStyles.label);

             GUILayout.EndScrollView();
+            GUILayout.EndVertical();
+            GUILayout.EndArea();
         }
         #endregion


[Builder] Code organization

[Builder] Code organization

--- Assets/Source/Builder.cs
+++ Assets/Source/Builder.cs
@@ -26,11 +26,12 @@
 	private GameObject pivot;
 	private Material pivot_material;

+	// Lifecycle
+
 	void Awake() {
 		SetMode(Mode.edit);
 	}

-	// Use this for initialization
 	void Start () {
 		float cubes = floor.transform.localScale.x / CUBE_SIZE / 2;
 		for (float i = -cubes ; i < cubes; i++) {
@@ -52,21 +53,7 @@
 		}
 	}

-	private void SetMode(Mode mode) {
-		bool isEdit = mode == Mode.edit;
-		this.mode = mode;
-		Cursor.visible = ! isEdit;
-		fpc.enabled = isEdit;
-		controller.SetActive (! isEdit);
-	}
-
-	private void ToggleMode(){
-		if (mode == Mode.control) {
-			SetMode (Mode.edit);
-		} else {
-			SetMode (Mode.control);
-		}
-	}
+	// Modes

 	private void EditMode() {
 		SetToolBindings();
@@ -111,8 +98,20 @@
 		}
 	}

-	private bool IsSameObject(GameObject a, GameObject b) {
-		return a.GetInstanceID() == b.GetInstanceID();
+	private void ToggleMode(){
+		if (mode == Mode.control) {
+			SetMode (Mode.edit);
+		} else {
+			SetMode (Mode.control);
+		}
+	}
+
+	private void SetMode(Mode mode) {
+		bool isEdit = mode == Mode.edit;
+		this.mode = mode;
+		Cursor.visible = ! isEdit;
+		fpc.enabled = isEdit;
+		controller.SetActive (! isEdit);
 	}

 	// Tool
@@ -155,6 +154,8 @@
 		}
 	}

+	// GameObjects
+
 	private GameObject CreateCube(Vector3 position) {
 		GameObject go = GameObject.CreatePrimitive(PrimitiveType.Cube);
 		go.transform.position = position;
@@ -162,4 +163,8 @@
 		go.GetComponent<MeshRenderer> ().material = tool.GetComponent<MeshRenderer> ().material;
 		return go;
 	}
+
+	private bool IsSameObject(GameObject a, GameObject b) {
+		return a.GetInstanceID() == b.GetInstanceID();
+	}
 }


Fixed SecAnnotate issues with AutofacServiceLocator construction.

--- AutofacServiceLocator.cs
+++ AutofacServiceLocator.cs
@@ -2,6 +2,7 @@
 using System.Collections;
 using System.Collections.Generic;
 using System.Linq;
+using System.Security;
 using Autofac;
 using Microsoft.Practices.ServiceLocation;

@@ -10,13 +11,23 @@
     /// <summary>
     /// Autofac implementation of the Microsoft CommonServiceLocator.
     /// </summary>
-    public sealed class AutofacServiceLocator : ServiceLocatorImplBase
+    public class AutofacServiceLocator : ServiceLocatorImplBase
     {
         /// <summary>
         /// The <see cref="Autofac.IComponentContext"/> from which services
         /// should be located.
         /// </summary>
         private readonly IComponentContext _container;
+
+        /// <summary>
+        /// Initializes a new instance of the <see cref="Autofac.Extras.CommonServiceLocator.AutofacServiceLocator" /> class.
+        /// </summary>
+        [SecuritySafeCritical]
+        protected AutofacServiceLocator()
+        {
+            // This constructor needs to be here for SecAnnotate/CoreCLR security purposes
+            // but doesn't get used in standard situations.
+        }

         /// <summary>
         /// Initializes a new instance of the <see cref="Autofac.Extras.CommonServiceLocator.AutofacServiceLocator" /> class.
@@ -28,6 +39,7 @@
         /// <exception cref="System.ArgumentNullException">
         /// Thrown if <paramref name="container" /> is <see langword="null" />.
         /// </exception>
+        [SecuritySafeCritical]
         public AutofacServiceLocator(IComponentContext container)
         {
             if (container == null)


Fix assembly info generator

Fix assembly info generator

--- build/Knapcode.NuGetTools.Build/Program.cs
+++ build/Knapcode.NuGetTools.Build/Program.cs
@@ -52,7 +52,7 @@
             // Discover all project.json files.
             var projects = Directory.EnumerateFiles(
                 baseDirectory,
-                "*project.json",
+                "*.csproj",
                 SearchOption.AllDirectories);

             // Write assembly info for each project.json.


Add more xmldocs

Add more xmldocs

--- osu.Framework/Configuration/ConfigManager.cs
+++ osu.Framework/Configuration/ConfigManager.cs
@@ -41,10 +41,10 @@
         }

         /// <summary>
-        /// Sets a configuration value.
-        /// </summary>
-        /// <param name="lookup">The lookup key.</param>
-        /// <param name="value">The configuration value. Will also become the default value if one has not already been initialised.</param>
+        /// Sets a configuration's value.
+        /// </summary>
+        /// <param name="lookup">The lookup key.</param>
+        /// <param name="value">The value. Will also become the default value if one has not already been initialised.</param>
         /// <typeparam name="TValue">The type of value.</typeparam>
         public void SetValue<TValue>(TLookup lookup, TValue value)
         {
@@ -74,6 +74,15 @@
         [Obsolete("In derived classes, use SetDefault() to set the default value. In public contexts, use SetValue() to set the value.")] // Can be removed 20210915
         public Bindable<TValue> Set<TValue>(TLookup lookup, TValue value) => SetDefault(lookup, value);

+        /// <summary>
+        /// Sets a configuration's default value.
+        /// </summary>
+        /// <param name="lookup">The lookup key.</param>
+        /// <param name="value">The default value.</param>
+        /// <param name="min">The minimum value.</param>
+        /// <param name="max">The maximum value.</param>
+        /// <param name="precision">The value precision.</param>
+        /// <returns>The original bindable (not a bound copy).</returns>
         protected BindableDouble SetDefault(TLookup lookup, double value, double? min = null, double? max = null, double? precision = null)
         {
             value = getDefault(lookup, value);
@@ -96,6 +105,15 @@
             return bindable;
         }

+        /// <summary>
+        /// Sets a configuration's default value.
+        /// </summary>
+        /// <param name="lookup">The lookup key.</param>
+        /// <param name="value">The default value.</param>
+        /// <param name="min">The minimum value.</param>
+        /// <param name="max">The maximum value.</param>
+        /// <param name="precision">The value precision.</param>
+        /// <returns>The original bindable (not a bound copy).</returns>
         protected BindableFloat SetDefault(TLookup lookup, float value, float? min = null, float? max = null, float? precision = null)
         {
             value = getDefault(lookup, value);
@@ -118,6 +136,14 @@
             return bindable;
         }

+        /// <summary>
+        /// Sets a configuration's default value.
+        /// </summary>
+        /// <param name="lookup">The lookup key.</param>
+        /// <param name="value">The default value.</param>
+        /// <param name="min">The minimum value.</param>
+        /// <param name="max">The maximum value.</param>
+        /// <returns>The original bindable (not a bound copy).</returns>
         protected BindableInt SetDefault(TLookup lookup, int value, int? min = null, int? max = null)
         {
             value = getDefault(lookup, value);
@@ -139,6 +165,12 @@
             return bindable;
         }

+        /// <summary>
+        /// Sets a configuration's default value.
+        /// </summary>
+        /// <param name="lookup">The lookup key.</param>
+        /// <param name="value">The default value.</param>
+        /// <returns>The original bindable (not a bound copy).</returns>
         protected BindableBool SetDefault(TLookup lookup, bool value)
         {
             value = getDefault(lookup, value);
@@ -158,6 +190,14 @@
             return bindable;
         }

+        /// <summary>
+        /// Sets a configuration's default value.
+        /// </summary>
+        /// <param name="lookup">The lookup key.</param>
+        /// <param name="value">The default value.</param>
+        /// <param name="min">The minimum value.</param>
+        /// <param name="max">The maximum value.</param>
+        /// <returns>The original bindable (not a bound copy).</returns>
         protected BindableSize SetDefault(TLookup lookup, Size value, Size? min = null, Size? max = null)
         {
             value = getDefault(lookup, value);
@@ -179,6 +219,12 @@
             return bindable;
         }

+        /// <summary>
+        /// Sets a configuration's default value.
+        /// </summary>
+        /// <param name="lookup">The lookup key.</param>
+        /// <param name="value">The default value.</param>
+        /// <returns>The original bindable (not a bound copy).</returns>
         protected Bindable<TValue> SetDefault<TValue>(TLookup lookup, TValue value)
         {
             value = getDefault(lookup, value);


Allow GetDescription to be used on objects as well.

--- osu.Framework/Extensions/ExtensionMethods.cs
+++ osu.Framework/Extensions/ExtensionMethods.cs
@@ -147,7 +147,7 @@
             }
         }

-        public static string GetDescription(this Enum value)
+        public static string GetDescription(this object value)
             => value.GetType().GetField(value.ToString())
                     .GetCustomAttribute<DescriptionAttribute>()?.Description ?? value.ToString();


just use last index of regex instead

just use last index of regex instead

--- osu.Framework/Graphics/Shaders/ShaderPart.cs
+++ osu.Framework/Graphics/Shaders/ShaderPart.cs
@@ -33,7 +33,7 @@
         private readonly List<string> shaderCodes = new List<string>();

         private readonly Regex includeRegex = new Regex("^\\s*#\\s*include\\s+[\"<](.*)[\">]");
-        private readonly Regex shaderInputRegex = new Regex("^\\s*(?>attribute|in)\\s+[^\\s]+\\s+[^\\s]+([^;]+);");
+        private readonly Regex shaderInputRegex = new Regex("^\\s*(?>attribute|in)\\s+[^\\s]+([^;]+);");

         private readonly ShaderManager manager;

@@ -98,10 +98,12 @@

                         if (inputMatch.Success)
                         {
+                            var attribName = inputMatch.Groups[1].Value.Trim().Split(' ');
+
                             ShaderInputs.Add(new ShaderInputInfo
                             {
                                 Location = lastShaderInputIndex++,
-                                Name = inputMatch.Groups[1].Value.Trim()
+                                Name = attribName[attribName.Length - 1]
                             });
                         }
                     }


Reword slightly

Reword slightly

--- osu.Game/Overlays/Chat/ExternalLinkDialog.cs
+++ osu.Game/Overlays/Chat/ExternalLinkDialog.cs
@@ -27,7 +27,7 @@
                 },
                 new PopupDialogCancelButton
                 {
-                    Text = @"No! Copy the URL instead!",
+                    Text = @"Copy URL to the clipboard instead.",
                     Action = copyExternalLinkAction
                 },
                 new PopupDialogCancelButton


Update with framework changes

Update with framework changes

--- osu.Game/Skinning/PoolableSkinnableSample.cs
+++ osu.Game/Skinning/PoolableSkinnableSample.cs
@@ -129,7 +129,7 @@
         /// </summary>
         public bool Playing => activeChannel?.Playing ?? false;

-        public bool Played => activeChannel?.Played ?? false;
+        public bool Played => !activeChannel?.Playing ?? false;

         private bool looping;


Add Miola in Praea Euq WD-T c3-36

Add Miola in Praea Euq WD-T c3-36

EDDN entry: <https://docs.google.com/spreadsheets/d/1kDtQYMeduzWghj1yXEsMY8isRccNhAr2XxYmaPIsB2o/edit#gid=470368893&range=O1429>
EDSM body: <https://www.edsm.net/en/system/bodies/id/2166337/name/Praea+Euq+WD-T+c3-36/details/idB/8375498/nameB/Miola>
Added in 2.4, and scanned in November 2017

--- EliteDangerous/EliteDangerous/BodyDesignations.cs
+++ EliteDangerous/EliteDangerous/BodyDesignations.cs
@@ -1947,6 +1947,9 @@
             {
                 { "Pepper", "Pepper A 1" }
             } },
+            { "Praea Euq WD-T c3-36", new Dictionary<string, string> {
+                { "Miola", "Praea Euq WD-T c3-36 B 9 a" }
+            } },
         };

         public struct DesigMap


Added Workshop.Query.RankedByTrendDays

Added Workshop.Query.RankedByTrendDays

--- Facepunch.Steamworks/Interfaces/Workshop.Query.cs
+++ Facepunch.Steamworks/Interfaces/Workshop.Query.cs
@@ -35,6 +35,12 @@

             public ulong? UserId { get; set; }

+            /// <summary>
+            /// If order is RankedByTrend, this value represents how many days to take
+            /// into account.
+            /// </summary>
+            public int RankedByTrendDays { get; set; }
+
             public UserQueryType UserQueryType { get; set; } = UserQueryType.Published;

             /// <summary>
@@ -107,6 +113,9 @@

                 if ( RequireTags.Count > 0 )
                     workshop.ugc.SetMatchAnyTag( Handle, !RequireAllTags );
+
+                if ( RankedByTrendDays > 0 )
+                    workshop.ugc.SetRankedByTrendDays( Handle, (uint) RankedByTrendDays );

                 foreach ( var tag in ExcludeTags )
                     workshop.ugc.AddExcludedTag( Handle, tag );
@@ -213,6 +222,8 @@
             /// If you're querying for a particular file or files, add them to this.
             /// </summary>
             public List<ulong> FileId { get; set; } = new List<ulong>();
+
+

             /// <summary>
             /// Don't call this in production!


fix orderby DeploymentReceivedTime desc

fix orderby DeploymentReceivedTime desc

--- Kudu.Client/Deployment/RemoteDeploymentManager.cs
+++ Kudu.Client/Deployment/RemoteDeploymentManager.cs
@@ -31,7 +31,7 @@

         public Task<IEnumerable<DeployResult>> GetResultsAsync(int? maxItems = null, bool excludeFailed = false)
         {
-            string url = "?$orderby=DeployStartTime desc";
+            string url = "?$orderby=DeploymentReceivedTime desc";
             if (maxItems != null && maxItems >= 0)
             {
                 url += String.Format("&$top={0}", maxItems);


NRE при неожиданном закрытии. #50

NRE при неожиданном закрытии. #50

--- MangaReader.Core/Services/Config/ConfigStorage.cs
+++ MangaReader.Core/Services/Config/ConfigStorage.cs
@@ -102,8 +102,12 @@

     public void Save()
     {
-      this.DatabaseConfig.Save();
-      this.DatabaseConfig.MangaSettings.SaveAll();
+      if (Mapping.Initialized)
+      {
+        this.DatabaseConfig.Save();
+        this.DatabaseConfig.MangaSettings.SaveAll();
+      }
+
       var str = JsonConvert.SerializeObject(this);
       File.WriteAllText(SettingsPath, str, Encoding.UTF8);
       Log.Add("Settings saved.");


Updated AssetType enumeration

Updated AssetType enumeration

--- MiX.Integrate.Shared/Entities/Assets/AssetType.cs
+++ MiX.Integrate.Shared/Entities/Assets/AssetType.cs
@@ -42,6 +42,10 @@
 		public static readonly AssetType Other = new AssetType(20, "Other", "asset-other.jpg");
 		public static readonly AssetType Train = new AssetType(21, "Train", "asset-train.jpg");
 		public static readonly AssetType LightDeliveryVehicle = new AssetType(22, "Light Delivery Vehicle", "asset-light-delivery-vehicle.jpg");
+		public static readonly AssetType OffRoadVehicle = new AssetType(24, "Off-Road Vehicle", "asset-light-delivery-vehicle.jpg");
+		public static readonly AssetType MediumCommercialVehicle = new AssetType(25, "Medium Commercial Vehicle", "asset-medium-commercial-vehicle.jpg");
+		public static readonly AssetType NonPoweredAsset = new AssetType(26, "Non-Powered Asset", "non-powered-asset.jpg");
+		public static readonly AssetType MobilePhone = new AssetType(27, "Mobile Phone", "asset-mobile-phone.jpg");

 		public static AssetType GetById(int id)
 		{


Update decoder

Update decoder

--- Modules/HtcSharp.Http/Model/HttpClient.Decoder.cs
+++ Modules/HtcSharp.Http/Model/HttpClient.Decoder.cs
@@ -103,6 +103,7 @@
             }

             private void DecodeProtocolHttp1_1(string data) {
+
                 Logger.Info(data.Replace("\n", "\\n").Replace("\r", "\\r"));
             }


Asteroid Hunt: fixing two bugs by altering a single statement ;)

--- NanoGames.Games/AsteroidHunt/AsteroidHuntMatch.cs
+++ NanoGames.Games/AsteroidHunt/AsteroidHuntMatch.cs
@@ -54,7 +54,7 @@
                 if (best == null || p.Score > best.Score) best = p;
                 if (secondBest == null || (p.Score < best.Score && p.Score > secondBest.Score)) secondBest = p;

-                if (p.Dead) return;
+                if (p.Dead) continue;
                 CheckDeath(p);
                 MovePlayer(p);
                 Fire(p);


Fix a bug to update entry size when importing a new file

--- OpenKh.Tools.BarEditor/ViewModels/BarViewModel.cs
+++ OpenKh.Tools.BarEditor/ViewModels/BarViewModel.cs
@@ -161,7 +161,7 @@
                         SelectedItem.Entry.Stream = memStream;
                     }

-                    OnPropertyChanged(nameof(SelectedItem.Size));
+                    OnPropertyChanged(nameof(SelectedItem));
                 }, Filters);
             }, x => IsItemSelected);
             SearchCommand = new RelayCommand(x => { }, x => false);


Add tooltips on sequencer buttons

Add tooltips on sequencer buttons

--- OpenKh.Tools.LayoutEditor/Controls/ImSequencer.cs
+++ OpenKh.Tools.LayoutEditor/Controls/ImSequencer.cs
@@ -126,13 +126,17 @@
             Bar = SelectionLeft | SelectionRight
         }

-        const float AnimationBarSideSelectionWidth = 8f;
+        private const float AnimationBarSideSelectionWidth = 8f;
+        private const int scrollBarHeight = 14;
+        private const float MinBarWidth = 44f;
+        private const float FLT_EPSILON = 1.192092896e-07F;
+        private const uint ColorWhite = 0xffffffff;
+
         static float framePixelWidth = 10f;
         static float framePixelWidthTarget = 10f;
         static int movingEntry = -1;
         static int movingPos = -1;
         static AnimationBarPart movingPart = AnimationBarPart.None;
-        const int scrollBarHeight = 14;
         static bool MovingScrollBar = false;
         static bool MovingCurrentFrame = false;
         static bool panningView = false;
@@ -140,8 +144,6 @@
         static int panningViewFrame;
         static bool sizingRBar = false;
         static bool sizingLBar = false;
-        private const float MinBarWidth = 44f;
-        private const float FLT_EPSILON = 1.192092896e-07F;

         public static float Lerp(float min, float max, float t) => min * (1 - t) + max * t;

@@ -162,7 +164,13 @@
             return overDel;
         }

-        private static bool SequencerButton(ImDrawListPtr draw_list, Vector2 pos, char ch, bool isSelected = false, uint color = 0xffffffffu)
+        private static bool SequencerButton(
+            ImDrawListPtr draw_list,
+            Vector2 pos,
+            char ch,
+            bool isSelected = false,
+            uint color = ColorWhite,
+            string description = null)
         {
             var io = ImGui.GetIO();
             var rect = new ImRect(pos, new Vector2(pos.X + 16, pos.Y + 16));
@@ -172,6 +180,17 @@

             draw_list.AddRect(rect.Min, rect.Max, color, 4);
             draw_list.AddText(new Vector2(pos.X + 4, pos.Y - 1), color, $"{ch}");
+            if (!string.IsNullOrEmpty(description) && rect.Contains(io.MousePos))
+            {
+                bool isOpen = false;
+                ImGui.Begin("Child Tooltip?", ref isOpen, ImGuiWindowFlags.Tooltip |
+                    ImGuiWindowFlags.NoTitleBar |
+                    ImGuiWindowFlags.AlwaysUseWindowPadding |
+                    ImGuiWindowFlags.AlwaysAutoResize |
+                    ImGuiWindowFlags.NoResize);
+                ImGui.Text(description);
+                ImGui.EndChild();
+            }

             return isMouseOver;
         }
@@ -306,7 +325,7 @@
                     const uint PauseColor = 0xFFf1c40f;
                     var nextButtonPosition = new Vector2(canvas_pos.X + legendWidth - ItemHeight, canvas_pos.Y + 2);

-                    if (SequencerButton(draw_list, nextButtonPosition, 'P', sequence.IsPaused, PauseColor) && io.MouseReleased[0])
+                    if (SequencerButton(draw_list, nextButtonPosition, 'P', sequence.IsPaused, PauseColor, sequence.IsPaused ? "Resume" : "Pause") && io.MouseReleased[0])
                         sequence.IsPaused = !sequence.IsPaused;
                 }

@@ -370,28 +389,32 @@
                     if (sequenceOptions.HasFlag(SEQUENCER_OPTIONS.SEQUENCER_DEL))
                     {
                         var isAnimationVisible = sequence.IsVisible(i);
-                        if (SequencerButton(draw_list, new Vector2(contentMin.X + legendWidth - (ItemHeight * 1) + 2 - 10, tPos.Y + 2), 'H',
-                            !isAnimationVisible, 0xff15208f) && io.MouseReleased[0])
+                        var buttonPos = new Vector2(contentMin.X + legendWidth - ItemHeight + 2 - 10, tPos.Y + 2);
+                        if (SequencerButton(draw_list, buttonPos, 'H', !isAnimationVisible, 0xff15208f, "Hide animation") && io.MouseReleased[0])
                         {
                             sequence.SetVisibility(i, !isAnimationVisible);
                         }

                         var isFocused = sequence.IsFocus(i);
-                        if (SequencerButton(draw_list, new Vector2(contentMin.X + legendWidth - (ItemHeight * 2) + 2 - 10, tPos.Y + 2), 'S',
-                            isFocused, 0xff69992f) && io.MouseReleased[0])
+                        buttonPos.X -= ItemHeight;
+                        if (SequencerButton(draw_list, buttonPos, 'S', isFocused, 0xff69992f, "Display only this animation") && io.MouseReleased[0])
                         {
                             if (isFocused)
                                 sequence.ResetFocus();
                             else
                                 sequence.SetFocus(i);
                         }
-                        if (SequencerButton(draw_list, new Vector2(contentMin.X + legendWidth - (ItemHeight * 3) + 2 - 10, tPos.Y + 2), 'D')
+
+                        buttonPos.X -= ItemHeight;
+                        if (SequencerButton(draw_list, buttonPos, 'D', false, ColorWhite, "Duplicate animation")
                             && io.MouseReleased[0])
                         {
                             // Duplicate animation
                             duplicateAnimationEntry = i;
                         }
-                        if (SequencerButton(draw_list, new Vector2(contentMin.X + legendWidth - (ItemHeight * 4) + 2 - 10, tPos.Y + 2), '-')
+
+                        buttonPos.X -= ItemHeight;
+                        if (SequencerButton(draw_list, buttonPos, '-', false, ColorWhite, "Remove animation")
                             && io.MouseReleased[0])
                         {
                             // Delete animation


Quick patch to fix a bug where CV vowels wouldn't be accounted for with the JP CVVC phonemizer.

--- OpenUtau.Plugin.Builtin/JapaneseCVVCPhonemizer.cs
+++ OpenUtau.Plugin.Builtin/JapaneseCVVCPhonemizer.cs
@@ -83,6 +83,7 @@
         public override Result Process(Note[] notes, Note? prev, Note? next, Note? prevNeighbour, Note? nextNeighbour, Note[] prevNeighbours) {
             var note = notes[0];
             var currentUnicode = ToUnicodeElements(note.lyric);
+            var vowLyric = note.lyric;
             var currentLyric = note.lyric;
             var attr0 = note.phonemeAttributes?.FirstOrDefault(attr => attr.index == 0) ?? default;
             var attr1 = note.phonemeAttributes?.FirstOrDefault(attr => attr.index == 1) ?? default;
@@ -97,8 +98,8 @@
                 var prevUnicode = ToUnicodeElements(prevNeighbour?.lyric);
                 // Current note is VV
                 if (vowelLookup.TryGetValue(prevUnicode.LastOrDefault() ?? string.Empty, out var vow)) {
-                    currentLyric = $"{vow} {currentLyric}";
-                    if (singer.TryGetMappedOto(currentLyric, note.tone + attr0.toneShift, attr0.voiceColor, out var oto)) {
+                    vowLyric = $"{vow} {currentLyric}";
+                    if (singer.TryGetMappedOto(vowLyric, note.tone + attr0.toneShift, attr0.voiceColor, out var oto)) {
                         currentLyric = oto.Alias;
                     }
                 }


fixup! Tweak useCache usage

fixup! Tweak useCache usage

--- Plugin/AerodynamicModel/VesselAerodynamicModel.cs
+++ Plugin/AerodynamicModel/VesselAerodynamicModel.cs
@@ -114,11 +114,6 @@
             isValid = false;
         }

-        public void ToggleCache(bool value)
-        {
-            UseCache = value;
-        }
-
         private double ComputeReferenceDrag()
         {
             Vector3 forces = ComputeForces(3000, new Vector3d(3000.0, 0, 0), new Vector3(0, 1, 0), 0);


fixed german translations / and all languages for ["Search for a mod:"] and ["Database News"]

--- RelhaxModpack/RelhaxModpack/Utils/Translations.cs
+++ RelhaxModpack/RelhaxModpack/Utils/Translations.cs
@@ -507,7 +507,7 @@
             //Component: InstallModpackButtonDescription
             //
             English.Add("InstallModpackButtonDescription", "Select the mods you want to install to your WoT client");
-            German.Add("InstallModpackButtonDescription", "Wähle die Mods aus, die du auf deinem WoT CLient installieren möchtest");
+            German.Add("InstallModpackButtonDescription", "Wähle die Mods aus, die du auf deinem WoT Client installieren möchtest");
             Polish.Add("InstallModpackButtonDescription", "Zaznacz modyfikacje, które chcesz zainstalować w swoim kliencie WoT");
             French.Add("InstallModpackButtonDescription", "Sélectionnez les mods que vous souhaitez installer sur votre client WoT");
             Spanish.Add("InstallModpackButtonDescription", "Seleccione los Mods que quiere instalar a su cliente de WoT");
@@ -525,7 +525,7 @@
             //Component: UninstallModpackButtonDescription
             //
             English.Add("UninstallModpackButtonDescription", "Remove *all* mods installed to your WoT client");
-            German.Add("UninstallModpackButtonDescription", "*Alle* Mods entfernen, die auf deinem WoT-Client installiert sind");
+            German.Add("UninstallModpackButtonDescription", "*Alle* Mods entfernen, die auf deinem WoT Client installiert sind");
             Polish.Add("UninstallModpackButtonDescription", "Usuń wszystkie zainstalowane modyfikacje do klienta WoT");
             French.Add("UninstallModpackButtonDescription", "Supprimer *tous* les mods installés sur votre client WoT");
             Spanish.Add("UninstallModpackButtonDescription", "Eliminar *todos* los Mods installados en su cliente de WoT");
@@ -534,7 +534,7 @@
             //Component: ViewNewsButton
             //
             English.Add("ViewNewsButton", "View update news");
-            German.Add("ViewNewsButton", "Aktualisierungsnachrichten");
+            German.Add("ViewNewsButton", "Aktualisierungen");
             Polish.Add("ViewNewsButton", "Zobacz wiadomości o aktualizacjach");
             French.Add("ViewNewsButton", "Voir les mises à jour");
             Spanish.Add("ViewNewsButton", "Ver noticias de actualizaciones");
@@ -735,7 +735,7 @@
             //Component: AllowStatsGatherText
             //
             English.Add("AllowStatsGatherText", "Allow statistics gathering of mod usage");
-            German.Add("AllowStatsGatherText", "Erlaube Statistiken über die Mod-Nutzung");
+            German.Add("AllowStatsGatherText", "Sende Satistik zur Mod-Nutzung");
             Polish.Add("AllowStatsGatherText", "Pozwól na gromadzenie statystyk dot. użycia modyfikacji");
             French.Add("AllowStatsGatherText", "Autoriser la collecte de statistiques sur l'utilisation des mods");
             Spanish.Add("AllowStatsGatherText", "Permitir recoleccón de estadísticas sobre el uso de Mods");
@@ -971,7 +971,7 @@
             //Component: AutoOneclickShowWarningOnSelectionsFailText
             //
             English.Add("AutoOneclickShowWarningOnSelectionsFailText", "Show warning if selection document has errors when loaded");
-            German.Add("AutoOneclickShowWarningOnSelectionsFailText", "Zeige Warnung wenn ein Fehler mit der Auswahldatei auftritt");
+            German.Add("AutoOneclickShowWarningOnSelectionsFailText", "Warnung bei Fehler mit der Auswahldatei");
             Polish.Add("AutoOneclickShowWarningOnSelectionsFailText", TranslationNeeded);
             French.Add("AutoOneclickShowWarningOnSelectionsFailText", TranslationNeeded);
             Spanish.Add("AutoOneclickShowWarningOnSelectionsFailText", TranslationNeeded);
@@ -1122,7 +1122,7 @@
             //Component: SaveDisabledModsInSelectionText
             //
             English.Add("SaveDisabledModsInSelectionText", "Keep disabled mods when saving selection");
-            German.Add("SaveDisabledModsInSelectionText", "Behalte deaktivierte Mods bei, wenn du die Auswahl speicherst");
+            German.Add("SaveDisabledModsInSelectionText", "Behalte deaktivierte Mods beim Speichern der Auswahl");
             Polish.Add("SaveDisabledModsInSelectionText", "Zachowaj wyłączone modyfikacje podczas zapisywania wyboru");
             French.Add("SaveDisabledModsInSelectionText", "Conserver les mods désactivés lors de l'enregistrement de la sélection");
             Spanish.Add("SaveDisabledModsInSelectionText", "Conservar los mods deshabilitados cuando se guarde la selección");
@@ -1349,7 +1349,7 @@
             //Component: NotifyIfSameDatabaseText
             //
             English.Add("NotifyIfSameDatabaseText", "Inform if no new database available");
-            German.Add("NotifyIfSameDatabaseText", "Hinweis wenn keine Aktuallisierungen erfolgt sind");
+            German.Add("NotifyIfSameDatabaseText", "Hinweis wenn es keine Aktuallisierungen gibt");
             Polish.Add("NotifyIfSameDatabaseText", "Poinformuj, jeśli nie będzie dostępna nowa baza danych");
             French.Add("NotifyIfSameDatabaseText", "Informer si aucune nouvelle base de données est disponible");
             Spanish.Add("NotifyIfSameDatabaseText", "Informar si no hay nueva base de datos");
@@ -1358,7 +1358,7 @@
             //Component: NotifyIfSameDatabaseCBDescription
             //
             English.Add("NotifyIfSameDatabaseCBDescription", "Notify you if your last installed database version is the same. If so, it means that there is no update to any mods.");
-            German.Add("NotifyIfSameDatabaseCBDescription", "Dich benachrichtigen: Die letzte verwendete Datenbank ist die selbe, d.h. es gibt keine Aktualisierungen und Veränderungen.");
+            German.Add("NotifyIfSameDatabaseCBDescription", "Erhalte eine Benachrichtigung wenn es keine Aktualisierung der Datenbank gegeben hat und diese den selben Stand wie beim letzten Start aufweist.");
             Polish.Add("NotifyIfSameDatabaseCBDescription", "Powiadom, jeśli ostatnia zainstalowana wersja bazy danych jest taka sama. Jeśli tak, to nie ma potrzeby aktualizacji modyfikacji.");
             French.Add("NotifyIfSameDatabaseCBDescription", "Avertir si votre dernière version de base de données installée est identique. Si c'est le cas," +
                 " cela signifie qu'il n'y a pas de mise à jour de mods.");
@@ -1453,7 +1453,7 @@
             //Component: DiagnosticUtilitiesButton
             //
             English.Add("DiagnosticUtilitiesButton", "Diagnostic utilities");
-            German.Add("DiagnosticUtilitiesButton", "Diagnosedienstprogramme");
+            German.Add("DiagnosticUtilitiesButton", "Diagnosedienst");
             Polish.Add("DiagnosticUtilitiesButton", "Narzędzia diagnostyczne");
             French.Add("DiagnosticUtilitiesButton", "Utilitaires de diagnostique");
             Spanish.Add("DiagnosticUtilitiesButton", "Utilidades de diagnóstico");
@@ -1667,7 +1667,7 @@

             //Component: UseBetaDatabaseText
             English.Add("UseBetaDatabaseText", "Use beta database");
-            German.Add("UseBetaDatabaseText", "Nutze Beta-Datenbank");
+            German.Add("UseBetaDatabaseText", "Beta-Datenbank");
             Polish.Add("UseBetaDatabaseText", "Użyj wersji beta bazy danych");
             French.Add("UseBetaDatabaseText", "Utiliser la base de données beta");
             Spanish.Add("UseBetaDatabaseText", "Utilizar la base de datos en beta");
@@ -1684,7 +1684,7 @@

             //Component: UseBetaApplicationText
             English.Add("UseBetaApplicationText", "Use beta application");
-            German.Add("UseBetaApplicationText", "Nutze die Beta-Version des Installers");
+            German.Add("UseBetaApplicationText", "Beta-Version des Installers");
             Polish.Add("UseBetaApplicationText", "Użyj wersji beta bazy aplikacji");
             French.Add("UseBetaApplicationText", "Utiliser l'application beta");
             Spanish.Add("UseBetaApplicationText", "Utilizar la aplicación en beta");
@@ -1837,7 +1837,7 @@
             //Component: failedToParseUISettingsFile
             //"branch" is this context is git respoitory branches
             English.Add("failedToParseUISettingsFile", "Failed to apply the theme. Check the log for details. Enable \"Verbose Logging\" for additional information.");
-            German.Add("failedToParseUISettingsFile", "Fehler beim Anwenden. Überprüfe log für Details. Aktiviere \"Verbose Logging\" für erweiterte informationen.");
+            German.Add("failedToParseUISettingsFile", "Fehler beim Anwenden. Überprüfe log für Details. Aktiviere \"Ausführliche Protokollierung\" für erweiterte informationen.");
             Polish.Add("failedToParseUISettingsFile", TranslationNeeded);
             French.Add("failedToParseUISettingsFile", TranslationNeeded);
             Spanish.Add("failedToParseUISettingsFile", "No se ha podido aplicar el tema. Compruebe el archivo de registro para más detalles. Habilite \"Registro Verboso\" para información adicional.");
@@ -1919,12 +1919,12 @@

             //Component: SearchTB
             //
-            English.Add("SearchTB", "Search for a mod...");
-            German.Add("SearchTB", "Suche einen Mod ...");
-            Polish.Add("SearchTB", "Szukaj modyfikacji… ");
-            French.Add("SearchTB", "Rechercher un mod ...");
-            Spanish.Add("SearchTB", "Buscar un mod...");
-            Russian.Add("SearchTB", "Найти мод...");
+            English.Add("SearchTB", "Search for a mod: ");
+            German.Add("SearchTB", "Suche einen Mod: ");
+            Polish.Add("SearchTB", "Szukaj modyfikacji:  ");
+            French.Add("SearchTB", "Rechercher un mod: ");
+            Spanish.Add("SearchTB", "Buscar un mod: ");
+            Russian.Add("SearchTB", "Найти мод: ");

             //Component: SeachTBDescription
             //
@@ -2157,7 +2157,7 @@
             //Component: ExpandAllButton
             //
             English.Add("ExpandAllButton", "Expand Current Tab");
-            German.Add("ExpandAllButton", "Erweitere alle Einträge der aktuellen Registerkarte");
+            German.Add("ExpandAllButton", "Erweitere aktuelle Registerkarte");
             Polish.Add("ExpandAllButton", "Rozwiń bieżącą kartę");
             French.Add("ExpandAllButton", "Elargir l'onglet");
             Spanish.Add("ExpandAllButton", "Expandir pestaña actual");
@@ -2166,7 +2166,7 @@
             //Component: CollapseAllButton
             //
             English.Add("CollapseAllButton", "Collapse Current Tab");
-            German.Add("CollapseAllButton", "Reduziere alle Einträge der aktuellen Registerkarte");
+            German.Add("CollapseAllButton", "Reduziere aktuelle Registerkarte");
             Polish.Add("CollapseAllButton", "Zwiń bieżącą kartę");
             French.Add("CollapseAllButton", "Réduire l'onglet");
             Spanish.Add("CollapseAllButton", "Colapsar pestaña actual");
@@ -3805,7 +3805,7 @@
             //Component: AdvancedInstallTrimDownloadCache
             //
             English.Add("AdvancedInstallTrimDownloadCache", "Trim download cache");
-            German.Add("AdvancedInstallTrimDownloadCache", "Download-Cache kürzen");
+            German.Add("AdvancedInstallTrimDownloadCache", "Download Cache kürzen");
             Polish.Add("AdvancedInstallTrimDownloadCache", "Ogranicz ściąganie plików cache");
             French.Add("AdvancedInstallTrimDownloadCache", "Réduire le cache de téléchargement");
             Spanish.Add("AdvancedInstallTrimDownloadCache", "Recortar la caché de descarga");
@@ -3825,20 +3825,20 @@
             #region News Viewer
             //Component: application_Update_TabHeader
             //
-            English.Add("application_Update_TabHeader", "Application News");
-            German.Add("application_Update_TabHeader", "App Neuigkeiten");
+            English.Add("application_Update_TabHeader", "Application");
+            German.Add("application_Update_TabHeader", "App");
             Polish.Add("application_Update_TabHeader", TranslationNeeded);
-            French.Add("application_Update_TabHeader", "Nouvelles d'application");
-            Spanish.Add("application_Update_TabHeader", "Novedades de la aplicación");
+            French.Add("application_Update_TabHeader", "Application");
+            Spanish.Add("application_Update_TabHeader", "Aplicación");
             Russian.Add("application_Update_TabHeader", "Новости приложения");

             //Component: database_Update_TabHeader
             //
-            English.Add("database_Update_TabHeader", "Database News");
-            German.Add("database_Update_TabHeader", "Datenbank Neuigkeiten");
+            English.Add("database_Update_TabHeader", "Database");
+            German.Add("database_Update_TabHeader", "Datenbank");
             Polish.Add("database_Update_TabHeader", TranslationNeeded);
-            French.Add("database_Update_TabHeader", "Nouvelles de la base de données");
-            Spanish.Add("database_Update_TabHeader", "Novedades de la base de datos");
+            French.Add("database_Update_TabHeader", "Base de données");
+            Spanish.Add("database_Update_TabHeader", "Base de datos");
             Russian.Add("database_Update_TabHeader", "Новости базы данных");

             //Component: ViewNewsOnGoogleTranslate
@@ -4036,7 +4036,7 @@
             //Component: WoTRunningHeader
             //
             English.Add("WoTRunningHeader", "It looks like your WoT install is currently open. Please close it before we can proceed");
-            German.Add("WoTRunningHeader", "Es sieht so aus als wäre Wot geöffnet. Bitte schließe das Programm um fortzufahren");
+            German.Add("WoTRunningHeader", "Es sieht so aus als wäre WoT geöffnet. Bitte schließe das Programm um fortzufahren");
             Polish.Add("WoTRunningHeader", TranslationNeeded);
             French.Add("WoTRunningHeader", TranslationNeeded);
             Spanish.Add("WoTRunningHeader", "Parece que su instalación de WoT está abierta. Por favor, ciérrela para poder continuar");
@@ -4112,7 +4112,7 @@
             //Component: ColorType
             //
             English.Add("ColorType", "Brush type");
-            German.Add("ColorType", "Typ Bürste");
+            German.Add("ColorType", "Pinseltyp");
             Polish.Add("ColorType", TranslationNeeded);
             French.Add("ColorType", TranslationNeeded);
             Spanish.Add("ColorType", "Tipo de pincel");
@@ -4310,7 +4310,7 @@
             //Component: BrushesLink
             //
             English.Add("BrushesLink", "Read about brush types here");
-            German.Add("BrushesLink", "Lies mehr über den Typ Bürste hier");
+            German.Add("BrushesLink", "Lies mehr über den Pinseltyp hier");
             Polish.Add("BrushesLink", TranslationNeeded);
             French.Add("BrushesLink", TranslationNeeded);
             Spanish.Add("BrushesLink", "Lea sobre los tipos de pincel aquí");


Update AssemblyVersion to 1.0.3

Update AssemblyVersion to 1.0.3

--- RealmAssemblyInfo.cs
+++ RealmAssemblyInfo.cs
@@ -23,8 +23,8 @@
 [assembly: AssemblyCompany("Realm Inc.")]
 [assembly: AssemblyProduct("Realm C#")]

-[assembly: AssemblyVersion("0.83.0.0")]
-[assembly: AssemblyFileVersion("0.83.0.0")]
+[assembly: AssemblyVersion("1.0.3.0")]
+[assembly: AssemblyFileVersion("1.0.3.0")]

 #if DEBUG
 [assembly: AssemblyConfiguration("Debug")]


cleanup

cleanup

--- Stiffener/Command.cs
+++ Stiffener/Command.cs
@@ -9,7 +9,6 @@
 using Autodesk.Revit.DB.Structure;
 using Autodesk.Revit.UI;
 using Autodesk.Revit.UI.Selection;
-using FamilyItemFactory = Autodesk.Revit.Creation.FamilyItemFactory;
 #endregion

 namespace Stiffener
@@ -180,7 +179,8 @@
       List<XYZ> pts,
       double thickness )
     {
-      FamilyItemFactory factory = doc.FamilyCreate;
+      Autodesk.Revit.Creation.FamilyItemFactory factory
+        = doc.FamilyCreate;

       //CreationApplication creapp = doc.Application.Create;


Add `LauchPatchDesignerText` translation;

--- RelhaxModpack/RelhaxModpack/Utils/Translations.cs
+++ RelhaxModpack/RelhaxModpack/Utils/Translations.cs
@@ -1343,7 +1343,7 @@
             //button for launching the editor from the main application window
             English.Add("LauchPatchDesignerText", "Launch Patch Designer");
             German.Add("LauchPatchDesignerText", "Starte Patch Designer");
-            Polish.Add("LauchPatchDesignerText", TranslationNeeded);
+            Polish.Add("LauchPatchDesignerText", "Uruchom Patch Designer");
             French.Add("LauchPatchDesignerText", TranslationNeeded);
             Spanish.Add("LauchPatchDesignerText", TranslationNeeded);
             Russian.Add("LauchPatchDesignerText", TranslationNeeded);


Added UIWindowBase.Show(MonoBehaviour) overload

--- UI/UIWindowBase.cs
+++ UI/UIWindowBase.cs
@@ -71,6 +71,12 @@
             in_progress = false;
         }

+        public void Show(MonoBehaviour monoBehaviour)
+        {
+            if(!in_progress)
+                monoBehaviour.StartCoroutine(Show());
+        }
+
         public void Close()
         {
             if(Controller != null)
@@ -90,7 +96,7 @@
             if(IsShown)
                 Close();
             else
-                monoBehaviour.StartCoroutine(Show());
+                Show(monoBehaviour);
         }
     }
 }


removed concurrent dict

removed concurrent dict

--- Resin/IndexWriter.cs
+++ Resin/IndexWriter.cs
@@ -32,12 +32,12 @@
         /// <summary>
         /// fileid/doc writer
         /// </summary>
-        private readonly ConcurrentDictionary<string, DocumentWriter> _docWriters;
+        private readonly Dictionary<string, DocumentWriter> _docWriters;

         /// <summary>
         /// fileid/postings writer
         /// </summary>
-        private readonly ConcurrentDictionary<string, PostingsWriter> _postingsWriters;
+        private readonly Dictionary<string, PostingsWriter> _postingsWriters;

         private readonly List<Document> _docs;

@@ -45,11 +45,11 @@
         {
             _directory = directory;
             _analyzer = analyzer;
-            _docWriters = new ConcurrentDictionary<string, DocumentWriter>();
+            _docWriters = new Dictionary<string, DocumentWriter>();
             _tries = new Dictionary<string, LcrsTrie>();
             _docCountByField = new ConcurrentDictionary<string, int>();
             _docs = new List<Document>();
-            _postingsWriters = new ConcurrentDictionary<string, PostingsWriter>();
+            _postingsWriters = new Dictionary<string, PostingsWriter>();
         }

         public void Write(IEnumerable<Document> docs)
@@ -74,7 +74,7 @@

                         writer = new DocumentWriter(sr);

-                        _docWriters.AddOrUpdate(fileId, writer, (s, file) => file);
+                        _docWriters.Add(fileId, writer);
                     }
                 }

@@ -99,7 +99,7 @@

                         writer = new PostingsWriter(sr);

-                        _postingsWriters.AddOrUpdate(fileId, writer, (s, file) => file);
+                        _postingsWriters.Add(fileId, writer);
                     }
                 }
             }
@@ -150,7 +150,7 @@

             var analyzeTime = Time();

-            foreach (var doc in _docs)
+            foreach(var doc in _docs)
             {
                 var analyzed = _analyzer.AnalyzeDocument(doc);


Added a method for getting all local IP addresses of a system

--- Easy.Common/NetworkHelper.cs
+++ Easy.Common/NetworkHelper.cs
@@ -1,5 +1,7 @@
 namespace Easy.Common
 {
+    using System.Collections.Generic;
+    using System.Diagnostics.CodeAnalysis;
     using System.Net;
     using System.Net.NetworkInformation;
     using System.Net.Sockets;
@@ -7,13 +9,14 @@
     /// <summary>
     /// Provides a set of methods to help work with network related activities.
     /// </summary>
+    [SuppressMessage("ReSharper", "InconsistentNaming")]
     public static class NetworkHelper
     {
         /// <summary>
         /// Returns the LocalHost Fully Qualified Domain Name
         /// <see href="http://stackoverflow.com/questions/804700/how-to-find-fqdn-of-local-machine-in-c-net"/>
         /// </summary>
-        /// <returns>The localhost Fully Qualified Domain Name</returns>
+        /// <returns>The <c>localhost</c> Fully Qualified Domain Name</returns>
         public static string GetFQDN()
         {
             var domainName = IPGlobalProperties.GetIPGlobalProperties().DomainName;
@@ -35,7 +38,7 @@
         /// </remarks>
         /// </summary>
         /// <returns>The local IP address</returns>
-        public static IPAddress GetLocalIpAddress()
+        public static IPAddress GetLocalIPAddress()
         {
             using (var socket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, 0))
             {
@@ -46,5 +49,36 @@
                 return IPAddress.Parse(endPoint.Address.ToString());
             }
         }
+
+        /// <summary>
+        /// Gets all the IP (v4 and not v6) addresses of the local computer together with
+        /// the interface to which the IP belongs.
+        /// <see href="https://blog.stephencleary.com/2009/05/getting-local-ip-addresses.html"/>
+        /// </summary>
+        public static IDictionary<IPAddress, string> GetLocalIPAddresses()
+        {
+            // Get a list of all network interfaces (usually one per network card, dial-up, and VPN connection)
+            var networkInterfaces = NetworkInterface.GetAllNetworkInterfaces();
+
+            var result = new Dictionary<IPAddress, string>();
+            foreach (var networkInterface in networkInterfaces)
+            {
+                // Read the IP configuration for each network
+                var properties = networkInterface.GetIPProperties();
+
+                // Each network interface may have multiple IP addresses
+                foreach (var address in properties.UnicastAddresses)
+                {
+                    // We're only interested in IPv4 addresses for now
+                    if (address.Address.AddressFamily != AddressFamily.InterNetwork) { continue; }
+
+                    // Ignore loopback addresses (e.g., 127.0.0.1)
+                    if (IPAddress.IsLoopback(address.Address)) { continue; }
+
+                    result.Add(address.Address, networkInterface.Name);
+                }
+            }
+            return result;
+        }
     }
 }


Spinner for AggregateDataExport

Spinner for AggregateDataExport

--- SPM/Views/AggregateDataExport/CreateMetric.cshtml
+++ SPM/Views/AggregateDataExport/CreateMetric.cshtml
@@ -1,6 +1,6 @@

 @model SPM.Models.AggDataExportViewModel
-@using (Ajax.BeginForm("CreateMetric", "AggregateDataExport", new AjaxOptions { InsertionMode = System.Web.Mvc.Ajax.InsertionMode.Replace, UpdateTargetId = "Results", HttpMethod = "POST" }))
+@using (Ajax.BeginForm("CreateMetric", "AggregateDataExport", new AjaxOptions { InsertionMode = System.Web.Mvc.Ajax.InsertionMode.Replace, UpdateTargetId = "Results", HttpMethod = "POST", OnBegin = "StartReportSpinner()", OnSuccess = "StopReportSpinner()", OnFailure = "StopReportSpinner()" }))
 {
     @Html.AntiForgeryToken()
     @Html.DisplayFor(m => m.Signals)


Rename methods

Rename methods

--- Editor/TPPCamSetterEditor.cs
+++ Editor/TPPCamSetterEditor.cs
@@ -44,22 +44,24 @@

             GUILayout.Label("TPPCam Properties", EditorStyles.boldLabel);

+            HandleDrawCameraOffsetField();
+            HandleDrawLookAtPointOffsetField();
+
             serializedObject.ApplyModifiedProperties();
         }
+        #endregion

+        #region INSPECTOR
         private void DrawPropertiesDropdown() {
-            Script.Properties = (Properties) EditorGUILayout.EnumMaskField(
+            Script.Properties = (Properties)EditorGUILayout.EnumMaskField(
                 new GUIContent(
                     "Properties",
                     ""),
                 Script.Properties);
         }

-        #endregion

-        #region INSPECTOR
-
-        private void DrawLookAtPointOffsetField() {
+        private void HandleDrawLookAtPointOffsetField() {
             EditorGUILayout.PropertyField(
                 lookAtPointOffset,
                 new GUIContent(
@@ -67,7 +69,7 @@
                     ""));
         }

-        private void DrawCameraOffsetField() {
+        private void HandleDrawCameraOffsetField() {
             EditorGUILayout.PropertyField(
                 cameraOffset,
                 new GUIContent(


Adjust colors to be a smidge more readable.

--- UnityREPLHelper.cs
+++ UnityREPLHelper.cs
@@ -240,10 +240,10 @@
       if(_OutputStyle == null) {
         _OutputStyle = new GUIStyle(Default);
         _OutputStyle.name = "OutputStyle";
-        _OutputStyle.normal.textColor = Color.green;
-        _OutputStyle.active.textColor = Color.green;
-        _OutputStyle.onNormal.textColor = Color.green;
-        _OutputStyle.onActive.textColor = Color.green;
+        _OutputStyle.normal.textColor = new Color(0f, 0.5f, 0f, 1f);
+        _OutputStyle.active.textColor = new Color(0f, 0.5f, 0f, 1f);
+        _OutputStyle.onNormal.textColor = new Color(0f, 0.5f, 0f, 1f);
+        _OutputStyle.onActive.textColor = new Color(0f, 0.5f, 0f, 1f);
       }
       return _OutputStyle;
     }
@@ -255,10 +255,10 @@
       if(_EvaluationErrorStyle == null) {
         _EvaluationErrorStyle = new GUIStyle(Default);
         _EvaluationErrorStyle.name = "EvaluationErrorStyle";
-        _EvaluationErrorStyle.normal.textColor = Color.red;
-        _EvaluationErrorStyle.active.textColor = Color.red;
-        _EvaluationErrorStyle.onNormal.textColor = Color.red;
-        _EvaluationErrorStyle.onActive.textColor = Color.red;
+        _EvaluationErrorStyle.normal.textColor = new Color(0.5f, 0f, 0f, 1f);
+        _EvaluationErrorStyle.active.textColor = new Color(0.5f, 0f, 0f, 1f);
+        _EvaluationErrorStyle.onNormal.textColor = new Color(0.5f, 0f, 0f, 1f);
+        _EvaluationErrorStyle.onActive.textColor = new Color(0.5f, 0f, 0f, 1f);
       }
       return _EvaluationErrorStyle;
     }
@@ -270,10 +270,10 @@
       if(_SystemConsoleStyle == null) {
         _SystemConsoleStyle = new GUIStyle(Default);
         _SystemConsoleStyle.name = "SystemConsoleStyle";
-        _SystemConsoleStyle.normal.textColor = Color.yellow;
-        _SystemConsoleStyle.active.textColor = Color.yellow;
-        _SystemConsoleStyle.onNormal.textColor = Color.yellow;
-        _SystemConsoleStyle.onActive.textColor = Color.yellow;
+        _SystemConsoleStyle.normal.textColor = new Color(0.5f, 0.5f, 0f, 1f);
+        _SystemConsoleStyle.active.textColor = new Color(0.5f, 0.5f, 0f, 1f);
+        _SystemConsoleStyle.onNormal.textColor = new Color(0.5f, 0.5f, 0f, 1f);
+        _SystemConsoleStyle.onActive.textColor = new Color(0.5f, 0.5f, 0f, 1f);
       }
       return _SystemConsoleStyle;
     }


Closes NUCATSAM-324 improve SAS verbatim output

--- SAS/SASAutomation.cs
+++ SAS/SASAutomation.cs
@@ -3,6 +3,7 @@
 using System.IO;
 using System.Linq;
 using System.Text;
+using System.Threading;
 using System.Threading.Tasks;
 using StatTag.Core.Interfaces;
 using StatTag.Core.Models;
@@ -13,6 +14,10 @@
     public class SASAutomation : IStatAutomation
     {
         private const string DisplayMacroValueCommand = "%PUT";
+
+        //private const string GetWorkDirectoryCommand = "proc options option=work; run;";
+        //private const string StartVerbatimCaptureCommand = "ods listing;";
+        //private const string StopVerbatimCaptureCommand = "ods listing close;";

         private SasServer Server = null;
         protected SASParser Parser { get; set; }
@@ -68,6 +73,12 @@
         public CommandResult[] RunCommands(string[] commands, Tag tag = null)
         {
             var commandResults = new List<CommandResult>();
+
+            //if (tag != null && tag.Type == Constants.TagType.Verbatim && Parser.IsTagStart(commands.First()))
+            //{
+            //    commands = new [] { string.Join("\r\n", commands) };
+            //}
+
             foreach (var command in commands)
             {
                 if (tag != null && tag.Type == Constants.TagType.Verbatim && Parser.IsTagStart(command))
@@ -84,7 +95,7 @@
                     {
                         result = new CommandResult();
                     }
-                    result.VerbatimResult = string.Join("\r\n", LogCache);
+                    result.VerbatimResult = string.Join("\r\n", LogCache).Replace('ƒ', '-');s
                     LogCacheEnabled = false;
                 }

@@ -117,6 +128,29 @@
             return originalLocation;
         }

+        //private string GetWorkPath()
+        //{
+        //    // For reasons that elude me, the only way to get this properly initialized is to explicitly access the following
+        //    // enum values.  Otherwise, the call to GetOptions throws an exception, stating the enum cannot be loaded.
+        //    var dataType = SAS.OptionServiceDataType.OptionServiceDataTypeString;
+        //    var getError = SAS.OptionServiceGetError.OptionServiceGetErrorNone;
+
+        //    // We need to use the C# Array class here, not the usual primitive array ([]) types.  This is so the arrays can
+        //    // be passed appropriately to the underlying COM call.
+        //    var options = Array.CreateInstance(typeof(string), 1);
+        //    options.SetValue("work", 0);
+        //    var types = Array.CreateInstance(typeof(string), 1);
+        //    var isPortable = Array.CreateInstance(typeof(string), 1);
+        //    var isStartupOnly = Array.CreateInstance(typeof(string), 1);
+        //    var values = Array.CreateInstance(typeof(string), 1);
+        //    var errorIndices = Array.CreateInstance(typeof(string), 1);
+        //    var errorCodes = Array.CreateInstance(typeof(string), 1);
+        //    var errorMessages = Array.CreateInstance(typeof(string), 1);
+        //    var optionService = Server.Workspace.Utilities.OptionService;
+        //    optionService.GetOptions(ref options, out types, out isPortable, out isStartupOnly, out values, out errorIndices, out errorCodes, out errorMessages);
+        //    return values.OfType<string>().FirstOrDefault();
+        //}
+
         /// <summary>
         /// Run a Stata command and provide the result of the command (if one should be returned).
         /// </summary>
@@ -134,32 +168,78 @@
             // These calls need to be made because they cause SAS to initialize internal structures that
             // are used when FlushLogLines is called.  Even though we're not really doing anything with these
             // values, don't remove these calls.
-            SAS.LanguageServiceCarriageControl carriageControl = new SAS.LanguageServiceCarriageControl();
-            SAS.LanguageServiceLineType lineType = new SAS.LanguageServiceLineType();
-
-            Server.Workspace.LanguageService.FlushLogLines(10000, out carriageControls, out lineTypeArray,
-                out logLineArray);
+            SAS.LanguageServiceCarriageControl carriageControlTemp = new SAS.LanguageServiceCarriageControl();
+            SAS.LanguageServiceLineType lineTypeTemp = new SAS.LanguageServiceLineType();
+
+            //Server.Workspace.LanguageService.FlushLogLines(10000, out carriageControls, out lineTypeArray,
+            //    out logLineArray);

             // For all of the lines that we got back from SAS, we want to find those that are of the Normal type (meaning they
             // would contain some type of result/output), and that aren't empty.  Filtering empty lines is done because SAS
             // will dump out a bunch of extra output when we run, including blank Normal lines.
             var relevantLines = new List<string>();
-            var lineTypes = lineTypeArray.OfType<LanguageServiceLineType>().ToArray();
-            var logLines = logLineArray.OfType<string>().ToArray();
-            for (int index = 0; index < lineTypes.Length; index++)
-            {
-                var line = logLines[index];
-
+            //var lineTypes = lineTypeArray.OfType<LanguageServiceLineType>().ToArray();
+            //var logLines = logLineArray.OfType<string>().ToArray();
+            //for (int index = 0; index < lineTypes.Length; index++)
+            //{
+            //    var line = logLines[index];
+
+            //    if (LogCacheEnabled)
+            //    {
+            //        LogCache.Add(logLines[index]);
+            //    }
+
+            //    if (lineTypes[index] == LanguageServiceLineType.LanguageServiceLineTypeNormal
+            //        && !string.IsNullOrWhiteSpace(line))
+            //    {
+            //        relevantLines.Add(line);
+            //    }
+            //}
+
+            do
+            {
+                Server.Workspace.LanguageService.FlushLogLines(1000, out carriageControls, out lineTypeArray, out logLineArray);
+                for (int index = 0; index < logLineArray.GetLength(0); index++)
+                {
+                    var lineType = (SAS.LanguageServiceLineType)lineTypeArray.GetValue(index);
+                    var line = (string)logLineArray.GetValue(index);
+                    if (lineType == LanguageServiceLineType.LanguageServiceLineTypeNormal
+                        && !string.IsNullOrWhiteSpace(line))
+                    {
+                        relevantLines.Add(line);
+                    }
+                }
+
+            }
+            while (logLineArray != null && logLineArray.Length > 0);
+
+            // Process the listing, even if we aren't going to use the output (it's only relevant when collecting
+            // verbatim results).  This way we know that it's appropriately flushed when it comes time to use it for
+            // verbatim tags.
+            do
+            {
+                Server.Workspace.LanguageService.FlushListLines(1000, out carriageControls, out lineTypeArray, out logLineArray);
                 if (LogCacheEnabled)
                 {
-                    LogCache.Add(logLines[index]);
-                }
-
-                if (lineTypes[index] == LanguageServiceLineType.LanguageServiceLineTypeNormal
-                    && !string.IsNullOrWhiteSpace(line))
-                {
-                    relevantLines.Add(line);
-                }
+                    for (int index = 0; index < logLineArray.GetLength(0); index++)
+                    {
+                        var lineType = (SAS.LanguageServiceLineType)lineTypeArray.GetValue(index);
+                        var line = (string)logLineArray.GetValue(index);
+                        // For verbatim we skip titles, but leave everything else.
+                        if (lineType != LanguageServiceLineType.LanguageServiceLineTypeTitle)
+                        {
+                            LogCache.Add(line);
+                        }
+                    }
+                }
+            }
+            while (logLineArray != null && logLineArray.Length > 0);
+
+            // If we're doing verbatim output, don't bother continuing down and trying
+            // to otherwise process the commands.
+            if (tag != null && tag.Type == Constants.TagType.Verbatim)
+            {
+                return null;
             }

             if (Parser.IsValueDisplay(command))
@@ -181,6 +261,43 @@
             return null;
         }

+        ///// <summary>
+        ///// Collect the results of a job from the SAS server
+        ///// </summary>
+        //private void FetchResults()
+        //{
+        //    bool hasErrors = false, hasWarnings = false;
+
+        //    // when code is complete, update the log viewer
+        //    Array carriage, lineTypes, lines;
+        //    do
+        //    {
+        //        Server.Workspace.LanguageService.FlushLogLines(1000,
+        //            out carriage,
+        //            out lineTypes,
+        //            out lines);
+        //        for (int i = 0; i < lines.GetLength(0); i++)
+        //        {
+        //            SAS.LanguageServiceLineType pre =
+        //                (SAS.LanguageServiceLineType)lineTypes.GetValue(i);
+        //        }
+
+        //    }
+        //    while (lines != null && lines.Length > 0);
+
+        //    // and update the Listing viewer
+        //    do
+        //    {
+        //        Server.Workspace.LanguageService.FlushListLines(1000, out carriage, out lineTypes, out lines);
+        //        if (lines.GetLength(0) > 0)
+        //        {
+        //            int n = 1 + 2;
+        //        }
+        //    }
+        //    while (lines != null && lines.Length > 0);
+
+        //}
+
         public bool IsReturnable(string command)
         {
             return Parser.IsValueDisplay(command) || Parser.IsImageExport(command) || Parser.IsTableResult(command);


Flush filesystem on dispose.

Flush filesystem on dispose.

--- SRFS.Model/FileIO.cs
+++ SRFS.Model/FileIO.cs
@@ -41,6 +41,7 @@
             if (!_isDisposed) {
                 if (disposing) {
                     Flush();
+                    _fileSystem.Flush();
                 }

                 _isDisposed = true;


Remove hard coded USD dollar symbol and use currency string formatting instead.

TODO: Reflect currency format according to 'Default Site Culture' set within Orchard, not the culture settings of the server.

--HG--
branch : currency_string_format

--- Views/Price.cshtml
+++ Views/Price.cshtml
@@ -1,8 +1,10 @@
-@if (Model.DiscountedPrice != Model.Price) {
-    $@Model.Price
-    $@Model.DiscountedPrice
+@if (Model.DiscountedPrice != Model.Price)
+{
+    @Model.Price.ToString("c")
+    @Model.DiscountedPrice.ToString("c")
     @Model.DiscountComment
 }
-else {
-    $@Model.Price
-}+else
+{
+    @Model.Price.ToString("c")
+}


Fix IgnoreCasing test (#437)

Fix IgnoreCasing test (#437)

Fixes #436

--- Fluid.Tests/TemplateTests.cs
+++ Fluid.Tests/TemplateTests.cs
@@ -840,17 +840,24 @@
         [Fact]
         public async Task IgnoreCasing()
         {
-            _parser.TryParse("{{ p.Firstname }}", out var template, out var error);
-
-
-            var options = new TemplateOptions();
-            var context = new TemplateContext(options);
-            context.SetValue("p", new Person { Firstname = "John" });
+            _parser.TryParse("{{ p.firsTname }}", out var template, out var error);
+
+            var options = new TemplateOptions();
             options.MemberAccessStrategy.IgnoreCasing = true;
             options.MemberAccessStrategy.Register<Person>();

+            var context = new TemplateContext(options);
+            context.SetValue("p", new Person { Firstname = "John" });
             var result = await template.RenderAsync(context);
             Assert.Equal("John", result);
+
+            options = new TemplateOptions();
+            options.MemberAccessStrategy.IgnoreCasing = false;
+            options.MemberAccessStrategy.Register<Person>();
+            context = new TemplateContext(options);
+            context.SetValue("p", new Person { Firstname = "John" });
+            result = await template.RenderAsync(context);
+            Assert.Equal("", result);
         }

         [Theory]


fix the aim dir

fix the aim dir

--- Source/BulletBoid.cs
+++ Source/BulletBoid.cs
@@ -52,6 +52,8 @@

 			//Next the position of the boid is set to the updated position of the bullet.
 			MyBoid.Position = _position;
+			MyBoid.Speed = Speed * 60.0f;
+

 			//Last, the position of the circle is updated.
 			Physics.Pos = _position;


use rounding to even numbers

use rounding to even numbers

--- Source/Code/Utils.cs
+++ Source/Code/Utils.cs
@@ -37,7 +37,7 @@

             angle = (angle - min) * 60.0; // seconds
             var sec = Math.Round(angle, SecDecPlaces + 3, MidpointRounding.ToEven); // remove rounding precision noise  ("0.000": 36.032500000002443 -> 36.032500)
-            sec = Math.Round(sec, secDecPlaces, MidpointRounding.ToEven);           // without above fix result will be 36.033 (valid result is 36.032)
+            sec = Math.Round(sec, secDecPlaces, MidpointRounding.ToEven);           // without above fix result would be 36.033, but it should be 36.032

             var secPrec = "00";
             if (secDecPlaces > 0)


Made it possible to Console.Readline() during program execution, and exits when told to via the console


Tidied exception in example program #5

Tidied exception in example program #5


Registered key size provider to reference the hash algorithm's output size

--- GPSLogger/CompositionRoot.cs
+++ GPSLogger/CompositionRoot.cs
@@ -33,11 +33,12 @@
                 builder.Register(c =>
                 {
                     var rngFactoryAsync = c.Resolve<Delegates.RNGFactoryAsync>();
+                    var keySizeProvider = c.Resolve<KeySizeProvider>();
                     return new Delegates.GenerateSaltDelegateAsync(async () =>
                     {
                         using (var rng = await rngFactoryAsync())
                         {
-                            return await rng.GetBytesAsync(CredentialImpl.IDSize);
+                            return await rng.GetBytesAsync(keySizeProvider.KeySize);
                         }
                     });
                 });
@@ -66,6 +67,18 @@

                 // IHMACProvider
                 builder.RegisterType<HMACProvider>().As<IHMACProvider>().SingleInstance();
+
+                // IKeySizeProvider
+                builder.Register(c =>
+                    {
+                        var hmacProvider = c.Resolve<IHMACProvider>();
+                        using (var hmac = hmacProvider.GetAsync().WaitAndGet())
+                        {
+                            var keySize = hmac.HashSize;
+                            return (IKeySizeProvider) new KeySizeProvider(keySize);
+                        }
+                    })
+                .SingleInstance();

                 // RNG factory
                 builder.RegisterInstance(new Delegates.RNGFactoryAsync(() => Task.FromResult(RandomNumberGenerator.Create()))); // Not single instance, since we need a new RNG each time


"A property or indexer may not be passed as an out or ref"

--- GUI/Types/Renderer/Camera.cs
+++ GUI/Types/Renderer/Camera.cs
@@ -7,8 +7,8 @@
 {
     internal class Camera
     {
-        public Matrix4 ProjectionMatrix { get; private set; }
-        public Matrix4 CameraViewMatrix { get; private set; }
+        public Matrix4 ProjectionMatrix;
+        public Matrix4 CameraViewMatrix;

         public bool MouseOverRenderArea { get; set; }
         private bool MouseDragging;


Create startProcess methods and refactor code

--- GitAutoUpdateGUI/FormMain.cs
+++ GitAutoUpdateGUI/FormMain.cs
@@ -1036,35 +1036,14 @@
       AddPauseToFile(updateScript);
       if (!checkBoxOnlyGenerateScriptFile.Checked)
       {
-        Process task = new Process
-        {
-          StartInfo =
-          {
-            UseShellExecute = true,
-            FileName = updateScript,
-            CreateNoWindow = false
-          }
-        };
-
-        task.Start();
+        StartProcess(updateScript);
       }
       else
       {
         if (DisplayMessage(Translate("Would you like to view the update script file"),
           Translate("View update script file"), MessageBoxButtons.YesNo) == DialogResult.Yes)
         {
-          Process task = new Process
-          {
-            StartInfo =
-            {
-              UseShellExecute = true,
-              FileName = "Notepad.exe",
-              Arguments = updateScript,
-              CreateNoWindow = false
-            }
-          };
-
-          task.Start();
+          StartApplication("Notepad.exe", updateScript);
         }
       }
     }
@@ -2183,7 +2162,7 @@
       }
     }

-    private List<string> GetCheckedVsVersion(CheckedListBox ckListBox)
+    private static List<string> GetCheckedVsVersion(CheckedListBox ckListBox)
     {
       List<string> itemList = new List<string>();
       foreach (var item in ckListBox.CheckedItems)
@@ -2199,7 +2178,7 @@
       return theString.Replace(oldChar, newChar);
     }

-    private List<string> ChangeCharacterInList(List<string> theList)
+    private static List<string> ChangeCharacterInList(List<string> theList)
     {
       List<string> result = new List<string>();
       foreach (var item in theList)
@@ -2209,5 +2188,36 @@

       return result;
     }
+
+    private static void StartProcess(string dosScript, bool useShellExecute = true, bool createNoWindow = false)
+    {
+      Process task = new Process
+      {
+        StartInfo =
+        {
+          UseShellExecute = useShellExecute,
+          FileName = dosScript,
+          CreateNoWindow = createNoWindow
+        }
+      };
+
+      task.Start();
+    }
+
+    private static void StartApplication(string applicationName, string argument, bool useShellExecute = true, bool createNoWindow = false)
+    {
+      Process task = new Process
+      {
+        StartInfo =
+        {
+          UseShellExecute = useShellExecute,
+          FileName = applicationName,
+          Arguments = argument,
+          CreateNoWindow = createNoWindow
+        }
+      };
+
+      task.Start();
+    }
   }
 }


Completed MutableObjectId

Completed MutableObjectId

--- Gitty/Lib/MutableObjectId.cs
+++ Gitty/Lib/MutableObjectId.cs
@@ -6,6 +6,7 @@

 namespace Gitty.Lib
 {
+    [Complete]
     public class MutableObjectId : AnyObjectId
     {

@@ -24,12 +25,12 @@
             this.W5 = src.W5;
         }

-        public void fromRaw(byte[] bs)
+        public void FromRaw(byte[] bs)
         {
-            fromRaw(bs, 0);
+            FromRaw(bs, 0);
         }

-        public void fromRaw(byte[] bs, int p)
+        public void FromRaw(byte[] bs, int p)
         {
             W1 = NB.DecodeInt32(bs, p);
             W2 = NB.DecodeInt32(bs, p + 4);
@@ -38,12 +39,12 @@
             W5 = NB.DecodeInt32(bs, p + 16);
         }

-        public void fromRaw(int[] ints)
+        public void FromRaw(int[] ints)
         {
-            fromRaw(ints, 0);
+            FromRaw(ints, 0);
         }

-        public void fromRaw(int[] ints, int p)
+        public void FromRaw(int[] ints, int p)
         {
             W1 = ints[p];
             W2 = ints[p + 1];
@@ -52,19 +53,19 @@
             W5 = ints[p + 4];
         }

-        public void fromString(byte[] buf, int offset)
+        public void FromString(byte[] buf, int offset)
         {
-            fromHexString(buf, offset);
+            FromHexString(buf, offset);
         }

-        public void fromString(String str)
+        public void FromString(String str)
         {
             if (str.Length != Constants.StringLength)
                 throw new ArgumentException("Invalid id: " + str);
-            fromHexString(Encoding.ASCII.GetBytes(str), 0);
+            FromHexString(Encoding.ASCII.GetBytes(str), 0);
         }

-        private void fromHexString(byte[] bs, int p)
+        private void FromHexString(byte[] bs, int p)
         {
             try
             {
@@ -90,7 +91,7 @@

         public override ObjectId ToObjectId()
         {
-            throw new NotImplementedException();
+            return new ObjectId(this);
         }
     }
 }


Corrected spelling in Gurkenplayer.cs

Corrected spelling in Gurkenplayer.cs

--- Gurkenplayer/Gurkenplayer.cs
+++ Gurkenplayer/Gurkenplayer.cs
@@ -24,7 +24,7 @@
         //Necessary properties
         public string Description
         {
-            get { return "Test multiplayer mod for Cities: Skyline."; }
+            get { return "Test multiplayer mod for Cities: Skylines."; }
         }

         public string Name


Added mandatory commandline args to StreakCLI.

--- StreakCLI/Program.cs
+++ StreakCLI/Program.cs
@@ -15,10 +15,20 @@

         static void Main(string[] args)
         {
-            ulong[,] results = new ulong[15, 15];
+            // Parse commandline args...
+            if (args.Length != 3)
+            {
+                Console.WriteLine("Usage: StreakCLI.exe N K OutputFile.csv");
+            }
+            ulong nMax = ulong.Parse(args[0]);
+            ulong kMax = ulong.Parse(args[1]);
+            string file = args[2];

+
+            // Perform calculations...
             Stopwatch stopwatch = new Stopwatch();
             stopwatch.Start();
+            ulong[,] results = new ulong[nMax, kMax];
             ExactStreakAlgo algo = new ExactStreakAlgo();
             Parallel.For(0, results.GetLength(NDimensionIndex), (n) =>
             {
@@ -26,12 +36,14 @@
                 {
                     results[n, k] = n < k ? 0 : algo.Calculate(StreakVariant.HeadsOnly, n+1, k+1).Matches;
                 });
+                Console.WriteLine("Finish n={0}", n + 1);
             });
             stopwatch.Stop();

-            File.WriteAllText("Streak.csv", PrintAsCSV(results));
-            File.AppendAllText("Streak.csv", string.Format("Elapse: {0}\r\n", stopwatch.Elapsed));
-            Process.Start("Streak.csv");
+            // Dump to file...
+            File.WriteAllText(file, PrintAsCSV(results));
+            File.AppendAllText(file, string.Format("Elapse: {0}\r\n", stopwatch.Elapsed));
+            //Process.Start(file);
         }

         private static string PrintAsCSV(ulong[,] input)


Update version to 1.0.1.

Update version to 1.0.1.

--- AssemblyVersion.cs
+++ AssemblyVersion.cs
@@ -1,3 +1,3 @@
 using System.Reflection;
-[assembly: AssemblyVersion("1.0.0")]
-[assembly: AssemblyFileVersion("1.0.0")]+[assembly: AssemblyVersion("1.0.1")]
+[assembly: AssemblyFileVersion("1.0.1")]


don't subscribe to global exception handler when in debug

--- TCC.Core/App.xaml.cs
+++ TCC.Core/App.xaml.cs
@@ -64,8 +64,9 @@
             var v = Assembly.GetExecutingAssembly().GetName().Version;
             AppVersion = $"TCC v{v.Major}.{v.Minor}.{v.Build}{(Experimental ? "-e" : "")}";
             InitSplashScreen();
-
+#if !DEBUG
             AppDomain.CurrentDomain.UnhandledException += GlobalExceptionHandler.HandleGlobalException;
+#endif
             UpdateManager.TryDeleteUpdater();

             SplashScreen.SetText("Checking for application updates...");


Prevent modding mistake of multiple moditems with same name.

--- patches/tModLoader/Terraria.ModLoader/Mod.cs
+++ patches/tModLoader/Terraria.ModLoader/Mod.cs
@@ -328,6 +328,10 @@
 			item.item.name = name;
 			item.item.ResetStats(id);
 			item.item.modItem = item;
+			if (items.ContainsKey(name))
+			{
+				throw new Exception("You tried to add 2 ModItems with the same name: " + name + ". Maybe 2 classes share a classname but in different namespaces while autoloading or you manually called AddItem with 2 items of the same name.");
+			}
 			items[name] = item;
 			ItemLoader.items.Add(item);
 			item.texture = texture;


Put passwords in startup args

Put passwords in startup args

--- Console/Program.cs
+++ Console/Program.cs
@@ -15,9 +15,11 @@
         {
             try
             {
-                using (var client = new XmppClient("something.com", "someone", "password"))
+                using (var client = new XmppClient(args[0], args[1], args[2]))
                 {
                     client.Connect();
+                    client.SetStatus(Availability.Online);
+
                     client.Message += OnMessage;

                     Console.WriteLine("Connected as " + client.Jid);
@@ -28,6 +30,8 @@
                         Jid to = new Jid("something.com", "someone");
                         client.SendMessage(to, line, type: MessageType.Chat);
                     }
+
+                    client.SetStatus(Availability.Offline);
                 }
             }
             catch (Exception exc)


modify WXEnum.cs

modify WXEnum.cs

--- Business/Model/WXEnum.cs
+++ Business/Model/WXEnum.cs
@@ -25,7 +25,8 @@
         Scan,
         Location,
         Click,
-        MASSSENDJOBFINISH
+        MASSSENDJOBFINISH,
+        View
     }

     public enum MediaType


Unit tests working with new service signature

--- Tests/LicenseTest.cs
+++ Tests/LicenseTest.cs
@@ -19,14 +19,12 @@
  *
  */
 using System;
-using System.Text;
 using System.Collections.Generic;
-using System.Linq;
+using System.Security.Cryptography;
+using System.Xml;
+using Dover.Framework.Model.License;
+using Dover.LicenseGenerator;
 using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Dover.LicenseGenerator;
-using System.Xml;
-using System.IO;
-using System.Security.Cryptography;

 namespace Tests
 {
@@ -44,7 +42,7 @@
             publicKey.FromXmlString(key.ToXmlString(false));
         }

-        private List<LicenseModule> CreateModulesTemplate()
+        private LicenseHeader CreateModulesTemplate()
         {
             List<LicenseModule> modules = new List<LicenseModule>();
             LicenseModule module = new LicenseModule();
@@ -58,24 +56,15 @@
             module.ExpirationDate = new DateTime(2015, 12, 31);
             modules.Add(module);

-            return modules;
+            LicenseHeader header = new LicenseHeader();
+            header.InstallNumber = "123456";
+            header.SystemNumber = "54321";
+            header.LicenseNamespace = "TEST";
+            header.Items = modules;
+
+            return header;
         }

-        [TestMethod]
-        public void CreateSignedLicenseAndSave()
-        {
-            // Este teste e usado para gerar um arquivo valido para testes no ambiente de testes.
-            List<LicenseModule> modules = new List<LicenseModule>();
-            LicenseModule module = new LicenseModule();
-            module.Description = "Treinamento";
-            module.Name = "Treinamento";
-            module.ExpirationDate = new DateTime(2020, 12, 31);
-            modules.Add(module);
-
-            LicenseService service = new LicenseService();
-            string xml = service.GenerateLicense(modules, key);
-            File.WriteAllText(Path.Combine("c:\\temp", "License.xml"), xml);
-        }

         [TestMethod]
         public void CreateSignedLicense()
@@ -123,4 +112,4 @@
             Assert.IsFalse(service.CheckSignature(xmlDoc.InnerXml, publicKey));
         }
     }
-}
+}


Fixed portable build usings

Fixed portable build usings

--- Chordious.WPF/Program.cs
+++ Chordious.WPF/Program.cs
@@ -28,6 +28,11 @@
 using System.IO;
 using System.Threading;
 using System.Windows;
+
+#if PORTABLE
+using System.Globalization;
+using System.Reflection;
+#endif

 using com.jonthysell.Chordious.WPF.Resources;


Fix comments

Fix comments

--- IncidentCS/Incident.Utils.cs
+++ IncidentCS/Incident.Utils.cs
@@ -10,7 +10,7 @@
 	public static partial class Incident
 	{
 		/// <summary>
-		/// Chooses an element from the list
+		/// Chooses a random element from the list
 		/// </summary>
 		/// <typeparam name="T">Collection item type</typeparam>
 		/// <param name="collection">[Extended] A collection from which to choose</param>
@@ -39,6 +39,12 @@
 			return collection.Skip(index).First();
 		}

+		/// <summary>
+		/// Picks a random element from the list. Removes the element from the list.
+		/// </summary>
+		/// <typeparam name="T">Collection item type</typeparam>
+		/// <param name="collection">[Extended] A collection from which to choose</param>
+		/// <returns>A random element from the collection</returns>
 		public static T PickAtRandom<T>(this List<T> collection)
 		{
 			int index = Rand.Next(collection.Count);
@@ -72,6 +78,12 @@
 			}
 		}

+		/// <summary>
+		/// Capitalizes evey word in a string.
+		/// Word is every non-empty character string following a non-letter character.
+		/// </summary>
+		/// <param name="text">[Extended] The text to capitalize</param>
+		/// <returns>Capitalized string</returns>
 		public static string Capitalize(this string text)
 		{
 			StringBuilder result = new StringBuilder();
@@ -93,6 +105,17 @@
 			return result.ToString();
 		}

+		/// <summary>
+		/// Generates a new collection by repeating a collection <paramref name="count"/> times.
+		/// </summary>
+		/// <remarks>
+		///		Implemented as a generator.
+		///		It does not allocate new memory for the collection.
+		/// </remarks>
+		/// <typeparam name="T">Collection item type</typeparam>
+		/// <param name="collection">[Extended] A collection to repeat</param>
+		/// <param name="count">Number of times to repeat</param>
+		/// <returns>A new collection created by repeating an original collection <paramref name="count"/> times.</returns>
 		public static IEnumerable<T> Repeat<T>(this IEnumerable<T> collection, int count)
 		{
 			for (int i = 0; i < count; i++)
@@ -104,6 +127,12 @@
 			}
 		}

+		/// <summary>
+		/// Creates a string created by repeating a string.
+		/// </summary>
+		/// <param name="itemGenerator">A function that gives the original string</param>
+		/// <param name="count">Number of times to repeat</param>
+		/// <returns>A string created by repeating a string</returns>
 		public static string Repeat(Func<string> itemGenerator, int count)
 		{
 			StringBuilder result = new StringBuilder();