new minimal configuration for testing new API changes and feature enabler

--- WpfApplication2/UI/Window1.xaml.cs
+++ WpfApplication2/UI/Window1.xaml.cs
@@ -1420,7 +1420,26 @@
                     CommandImportFile.Execute(path, this);
                 }
                 else
+                {
                     await OpenTranscription(false, path);
+#if MINIMAL
+                    Transcription.MediaURI = @"http://demo.ite.tul.cz/audio_cro/51b5752ca802563ad80020d1.mp4";
+                    _api = new SpeakersApi2("https://demo.ite.tul.cz/speechlab/cro_1968_1988_trsx07/api/speakers?", this);
+                    _api.Info = new OnlineTranscriptionInfo()
+                    {
+                        TrsxUploadURL = new Uri("https://demo.ite.tul.cz/speechlab/cro_1968_1988_trsx07/api/speakers"),
+                        SpeakerAPI_URL = new Uri("https://demo.ite.tul.cz/speechlab/cro_1968_1988_trsx07/api/speakers"),
+
+                    };
+
+                    _api.LoadTranscription(Transcription);
+
+                    await _api.UpdateTranscriptionSpeakers();
+                    LoadOnlineSetting();
+
+
+#endif
+                }
             }

             VirtualizingListBox.RequestTimePosition += delegate(out TimeSpan value) { value = waveform1.CaretPosition; };


Refactor ROWS & COLS grid

Refactor ROWS & COLS grid

--- WpfTest/WpfTest/MainWindow.xaml.cs
+++ WpfTest/WpfTest/MainWindow.xaml.cs
@@ -27,6 +27,9 @@
         private const string BACKGROUND_GAMEBOARD = "#FF111111";
         private const int LINE_STROCK_THICKNESS = 1;

+        private const int NB_ROWS_GRID = 80;
+        private const int NB_COLS_GRID = (int)(NB_ROWS_GRID*1.33);
+
         private bool isInPause;

         public MainWindow()
@@ -180,8 +183,8 @@

         private void drawGameBoard()
         {
-            double nbRows = 50;
-            double nbCols = 80;
+            double nbRows = NB_ROWS_GRID;
+            double nbCols = NB_COLS_GRID;
             double width = (cvsGameBoard.ActualWidth - nbCols * LINE_STROCK_THICKNESS) / nbCols - 0.025;
             double height = (cvsGameBoard.ActualHeight - nbRows * LINE_STROCK_THICKNESS) / nbRows - 0.025;


CA-142255:XenCenter popup exception dialog which is unexpected

Signed-off-by: Cheng Zhang <f157832f2f1df5a7c962d3abb092f6b1ea020882@citrix.com>

--- XenModel/XenAPI-Extensions/Role.cs
+++ XenModel/XenAPI-Extensions/Role.cs
@@ -223,13 +223,16 @@
         /// <param name="validRoleList">The list of roles which can perform all the methods</param>
         public static bool CanPerform(RbacMethodList apiMethodsToRoleCheck, IXenConnection connection, out List<Role> validRoleList, bool debug)
         {
-            validRoleList = ValidRoleList(apiMethodsToRoleCheck, connection, debug);
+            if (!connection.IsConnected)
+            {
+                validRoleList = new List<Role>();
+                return false;
+            }
+            else
+                validRoleList = ValidRoleList(apiMethodsToRoleCheck, connection, debug);

             if (Helpers.MidnightRideOrGreater(connection))
             {
-                if (!connection.IsConnected)
-                    return false;
-
                 if (connection.Session.IsLocalSuperuser)
                     return true;


* Define Options as Enum to simplify the code.

--- csharp/XSData.cs
+++ csharp/XSData.cs
@@ -27,21 +27,19 @@
     public int endToken;
 }

+public enum Options {
+    UNKNOWN_NAMESPACE, END_UNKNOWN_NAMESPACE,
+    UNKNOWN_TAG, END_UNKNOWN_TAG,
+    UNKNOWN_ATTR_NAMESPACE, UNKNOWN_ATTR,
+    // For the nodes in common status.
+    TEXT, CDATA, COMMENT, WHITESPACE, PROCESSING_INSTRUCTION,
+    // For the nodes in Unknown namespaces.
+    UNS_TEXT, UNS_CDATA, UNS_COMMENT, UNS_WHITESPACE, UNS_PROCESSING_INSTRUCTION,
+    // For the nodes in Unknown tags.
+    UT_TEXT, UT_CDATA, UT_COMMENT, UT_WHITESPACE, UT_PROCESSING_INSTRUCTION
+};
+
 public class XmlLangDefinition {
-    // The following list must be same with OptionDecl in CocoXml.atg.
-    public static readonly string[] OptStrings = new string[] {
-	"UNKNOWN_NAMESPACE", "UNKNOWN_TAG", "UNKNOWN_ATTR",
-	"TEXT", "CDATA", "COMMENT",
-	"WHITESPACE", "PROCESSING_INSTRUCTION",
-	// For the nodes in Unknown namespaces.
-	"UNS_TEXT", "UNS_CDATA", "UNS_COMMENT",
-	"UNS_WHITESPACE", "UNS_PROCESSING_INSTRUCTION",
-	// For the nodes in Unknown tags.
-	"UT_TEXT", "UT_CDATA", "UT_COMMENT",
-	"UT_WHITESPACE", "UT_PROCESSING_INSTRUCTION"
-    };
-    public const int numOptions = 18;
-
     Tab                         tab;
     Errors                      errors;
     bool[]                      useVector;
@@ -49,26 +47,24 @@
     Dictionary<string, int>     Attrs;

     public XmlLangDefinition(Tab tab, Errors errors) {
-	if (numOptions != OptStrings.Length)
-	    Console.WriteLine("numOptions:{0} != OptString.Length:{1}",
-			      numOptions, OptStrings.Length);
 	this.tab = tab;
 	this.errors = errors;
-	useVector = new bool[numOptions];
+	useVector = new bool[Enum.GetValues(typeof(Options)).Length];
 	Tags = new Dictionary<string, TagInfo>();
 	Attrs = new Dictionary<string, int>();
     }

     public void AddOption(string optname, int line) {
-	Symbol sym;
-	for (int option = 0; option < numOptions; ++option)
-	    if (optname == OptStrings[option]) {
-		useVector[option] = true;
-		sym = tab.FindSym(optname);
-		if (sym == null) tab.NewSym(Node.t, optname, line);
-		return;
-	    }
-	errors.SemErr("Unsupported option '" + optname + "' encountered.");
+	int optval; Symbol sym;
+	try {
+	    optval = (int)Enum.Parse(typeof(Options), optname);
+	} catch (System.ArgumentException) {
+	    errors.SemErr("Unsupported option '" + optname + "' encountered.");
+	    return;
+	}
+	useVector[optval] = true;
+	sym = tab.FindSym(optname);
+	if (sym == null) tab.NewSym(Node.t, optname, line);
     }

     int addUniqueToken(string tokenName, string typeName, int line) {
@@ -162,26 +158,20 @@

     void WriteOptions() {
 	gen.WriteLine("    public enum Options {");
-	gen.Write("        " + XmlLangDefinition.OptStrings[0]);
-	for (int option = 1; option < XmlLangDefinition.numOptions; ++option)
-	    gen.Write(", " + XmlLangDefinition.OptStrings[option]);
-	gen.WriteLine("");
+	foreach (string optname in Enum.GetNames(typeof(Options)))
+	    gen.WriteLine("        {0},", optname);
 	gen.WriteLine("    };");
 	gen.WriteLine("    public const int numOptions = {0};",
-		      XmlLangDefinition.numOptions);
-    }
-
-    int getOptionKind(int option) {
-	Symbol sym = tab.FindSym(XmlLangDefinition.OptStrings[option]);
-	if (sym == null) return -1;
-	return sym.n;
+		      Enum.GetValues(typeof(Options)).Length);
     }

     void WriteDeclarations() {
-	gen.Write("    static readonly int[] useKindVector = new int[] { " +
-		  getOptionKind(0));
-	for (int option = 1; option < XmlLangDefinition.numOptions; ++option)
-	    gen.Write(", " + getOptionKind(option));
+	Symbol sym;
+	gen.WriteLine("    static readonly int[] useKindVector = new int[] {");
+	foreach (string optname in Enum.GetNames(typeof(Options))) {
+	    sym = tab.FindSym(optname);
+	    gen.WriteLine("        {0},", sym == null ? -1 : sym.n);
+	}
 	gen.WriteLine(" };");
     }


[Modify] 2021

[Modify] 2021

--- websocket-sharp/Net/HttpStreamAsyncResult.cs
+++ websocket-sharp/Net/HttpStreamAsyncResult.cs
@@ -8,7 +8,7 @@
  * The MIT License
  *
  * Copyright (c) 2005 Novell, Inc. (http://www.novell.com)
- * Copyright (c) 2012-2015 sta.blockhead
+ * Copyright (c) 2012-2021 sta.blockhead
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to deal


JimEvans: Adding type safe ability via InternetExplorerOptions to enable/disable the persistent hover capability in the .NET bindings for the IE driver.

git-svn-id: aa1aa1384423cb28c2b1e29129bb3a91de1d9196@18333 07704840-8298-11de-bf8c-fd130f914ac9

--- dotnet/src/WebDriver/IE/InternetExplorerOptions.cs
+++ dotnet/src/WebDriver/IE/InternetExplorerOptions.cs
@@ -93,12 +93,14 @@
         private const string IgnoreZoomSettingCapability = "ignoreZoomSetting";
         private const string InitialBrowserUrlCapability = "initialBrowserUrl";
         private const string EnableNativeEventsCapability = "nativeEvents";
+        private const string EnablePersistentHoverCapability = "enablePersistentHover";
         private const string ElementScrollBehaviorCapability = "elementScrollBehavior";
         private const string UnexpectedAlertBehaviorCapability = "unexpectedAlertBehaviour";

         private bool ignoreProtectedModeSettings;
         private bool ignoreZoomLevel;
         private bool enableNativeEvents = true;
+        private bool enablePersistentHover = true;
         private string initialBrowserUrl = string.Empty;
         private InternetExplorerElementScrollBehavior elementScrollBehavior = InternetExplorerElementScrollBehavior.Top;
         private InternetExplorerUnexpectedAlertBehavior unexpectedAlertBehavior = InternetExplorerUnexpectedAlertBehavior.Default;
@@ -165,6 +167,16 @@
         {
             get { return this.unexpectedAlertBehavior; }
             set { this.unexpectedAlertBehavior = value; }
+        }
+
+        /// <summary>
+        /// Gets or sets a value indicating whether to enable persistently sending WM_MOUSEMOVE messages
+        /// to the IE window during a mouse hover.
+        /// </summary>
+        public bool EnablePersistentHover
+        {
+            get { return this.enablePersistentHover; }
+            set { this.enablePersistentHover = value; }
         }

         /// <summary>
@@ -210,6 +222,7 @@
         {
             DesiredCapabilities capabilities = DesiredCapabilities.InternetExplorer();
             capabilities.SetCapability(EnableNativeEventsCapability, this.enableNativeEvents);
+            capabilities.SetCapability(EnablePersistentHoverCapability, this.enablePersistentHover);
             if (this.ignoreProtectedModeSettings)
             {
                 capabilities.SetCapability(IgnoreProtectedModeSettingsCapability, true);


* NuGet deploy task added

* NuGet deploy task added


Changed line order

Changed line order

--- build.cake
+++ build.cake
@@ -5,8 +5,8 @@
 using Polly;

 var target = Argument("target", "Default");
+var platform = Argument("platform", "AnyCPU");
 var configuration = Argument("configuration", "Release");
-var platform = Argument("platform", "AnyCPU");

 var msBuildSolution = "./Core2D.sln";
 var xBuildSolution = "./Core2D.mono.sln";


Add myget as a package source

Add myget as a package source


Do not use EnvironmentVariable for version

--- build.cake
+++ build.cake
@@ -85,13 +85,7 @@
     versionInfo = GitVersion(new GitVersionSettings{
         OutputType = GitVersionOutput.Json,
     });
-    Information("GitVersion_NuGetVersion - " + versionInfo.NuGetVersion + " - " + Environment.GetEnvironmentVariable("GitVersion_NuGetVersion"));
-    Information("GitVersion_LegacySemVerPadded - " + versionInfo.LegacySemVerPadded + " - " + Environment.GetEnvironmentVariable("GitVersion_LegacySemVerPadded"));
-    if (AppVeyor.IsRunningOnAppVeyor) {
-        version = Environment.GetEnvironmentVariable("GitVersion_LegacySemVerPadded");
-    } else {
-        version = versionInfo.LegacySemVerPadded;
-    }
+    version = versionInfo.LegacySemVerPadded;
 });

 Task("CreateNuGetPackage")


Bump version to 0.10.1

Bump version to 0.10.1

--- build.cake
+++ build.cake
@@ -21,7 +21,7 @@
 // Define product name and version
 var product = "Htc.Vita.Core";
 var companyName = "HTC";
-var version = "0.10.0";
+var version = "0.10.1";
 var semanticVersion = string.Format("{0}.{1}", version, revision);
 var ciVersion = string.Format("{0}.{1}", version, "0");


Fix update error popup icon

Fix update error popup icon

--- DesktopWidgets/Helpers/UpdateHelper.cs
+++ DesktopWidgets/Helpers/UpdateHelper.cs
@@ -2,6 +2,7 @@
 using System.Collections.Generic;
 using System.ComponentModel;
 using System.Deployment.Application;
+using System.Windows;
 using DesktopWidgets.Classes;
 using DesktopWidgets.Properties;
 using DesktopWidgets.Windows;
@@ -51,7 +52,7 @@
                 {
                     if (!auto)
                         Popup.Show(
-                            "An error occurred while trying to check for updates.");
+                            "An error occurred while trying to check for updates.", image: MessageBoxImage.Error);
                     return;
                 }

@@ -127,7 +128,7 @@
                                 {
                                     Popup.Show(
                                         "Cannot download the latest version of this application.\n\nPlease check your network connection, or try again later.\n\nError: " +
-                                        dde);
+                                        dde, image: MessageBoxImage.Error);
                                 }
                                 break;
                         }


Fix widget intro timer not running if always open or muted

--- DesktopWidgets/View/WidgetView.xaml.cs
+++ DesktopWidgets/View/WidgetView.xaml.cs
@@ -110,11 +110,9 @@
             return IntPtr.Zero;
         }

-        public void ShowIntro(int duration = -1, bool reversable = false, bool activate = false, bool hideOnFinish = true)
-        {
-            if (Settings.OpenMode == OpenMode.AlwaysOpen || App.IsMuted)
-                return;
-
+        public void ShowIntro(int duration = -1, bool reversable = false, bool activate = false,
+            bool hideOnFinish = true)
+        {
             if (_introTimer == null)
             {
                 _introTimer = new DispatcherTimer();


fixup 781096c

fixup 781096c

--- DiffPatch.DiffParser/FileDiffHelper.cs
+++ DiffPatch.DiffParser/FileDiffHelper.cs
@@ -13,7 +13,7 @@

         public static IEnumerable<FileDiff> Parse(string input, string lineEnding = "\n")
         {
-            var lines = StringHelper.SplitLines(input);
+            var lines = StringHelper.SplitLines(input, lineEnding);

             if (!lines.Any()) return Enumerable.Empty<FileDiff>();


Increased 'Terrain Height' for Deformable Terrain created from main menu.

--- Editor/AGXUnityEditor/Menus/TopMenu.cs
+++ Editor/AGXUnityEditor/Menus/TopMenu.cs
@@ -307,7 +307,7 @@
     {
       var terrainData = new TerrainData()
       {
-        size = new Vector3( 60 / 8.0f, 25, 60 / 8.0f ),
+        size = new Vector3( 60 / 8.0f, 45, 60 / 8.0f ),
         heightmapResolution = 257
       };
 #if UNITY_2018_1_OR_NEWER


Fixes computing progress in console result handler

--- Engine/Results/ConsoleResultHandler.cs
+++ Engine/Results/ConsoleResultHandler.cs
@@ -468,23 +468,57 @@
         private class BacktestConsoleStatusHandler : IConsoleStatusHandler
         {
             private readonly BacktestNodePacket _job;
-            private readonly double _backtestSpanInDays;
+            private double? _backtestSpanInDays;
             public BacktestConsoleStatusHandler(BacktestNodePacket _job)
             {
                 this._job = _job;
-                _backtestSpanInDays = (_job.PeriodFinish - _job.PeriodStart).TotalDays;
             }
             public void LogAlgorithmStatus(DateTime current)
             {
-                var _daysProcessed = (current - _job.PeriodStart).TotalDays;
-                Log.Trace("Progress: " + (_daysProcessed * 100 / _backtestSpanInDays).ToString("F2") + "% Processed: " + _daysProcessed + " days of total: " + (int)_backtestSpanInDays);
-            }
+                if (!_backtestSpanInDays.HasValue)
+                {
+                    _backtestSpanInDays = (_job.PeriodFinish - _job.PeriodStart).TotalDays;
+                    if (_backtestSpanInDays == 0.0)
+                    {
+                        _backtestSpanInDays = null;
+                    }
+                }
+
+                // we need to wait until we've called initialize on the algorithm
+                // this is not ideal at all
+                if (_backtestSpanInDays.HasValue)
+                {
+                    var daysProcessed = (current - _job.PeriodStart).TotalDays;
+                    if (daysProcessed < 0) daysProcessed = 0;
+                    if (daysProcessed > _backtestSpanInDays.Value) daysProcessed = _backtestSpanInDays.Value;
+                    Log.Trace("Progress: " + (daysProcessed * 100 / _backtestSpanInDays.Value).ToString("F2") + "% Processed: " + daysProcessed + " days of total: " + (int)_backtestSpanInDays);
+                }
+                else
+                {
+                    Log.Trace("Initializing...");
+                }
+            }
+
             public TimeSpan ComputeSampleEquityPeriod()
             {
                 const double samples = 4000;
                 const double minimumSamplePeriod = 4 * 60;
+                double resampleMinutes = minimumSamplePeriod;
+
                 var totalMinutes = (_job.PeriodFinish - _job.PeriodStart).TotalMinutes;
-                var resampleMinutes = (totalMinutes < (minimumSamplePeriod * samples)) ? minimumSamplePeriod : (totalMinutes / samples);
+
+                // before initialize is called this will be zero
+                if (totalMinutes > 0.0)
+                {
+                    resampleMinutes = (totalMinutes < (minimumSamplePeriod * samples)) ? minimumSamplePeriod : (totalMinutes / samples);
+                }
+
+                // set max value
+                if (resampleMinutes < minimumSamplePeriod)
+                {
+                    resampleMinutes = minimumSamplePeriod;
+                }
+
                 return TimeSpan.FromMinutes(resampleMinutes);
             }
         }


Inject TunnelRepository as singleton for persistance data source

--- src/nancy-api/Bootstrapper.cs
+++ src/nancy-api/Bootstrapper.cs
@@ -1,4 +1,5 @@
 using Nancy;
+using NancyApi.Repository;

 namespace NancyApi
 {
@@ -7,5 +8,13 @@
         // The bootstrapper enables you to reconfigure the composition of the framework,
         // by overriding the various methods and properties.
         // For more information https://github.com/NancyFx/Nancy/wiki/Bootstrapper
+
+        protected override void ApplicationStartup(Nancy.TinyIoc.TinyIoCContainer container, Nancy.Bootstrapper.IPipelines pipelines)
+        {
+            base.ApplicationStartup(container, pipelines);
+
+            // Register repository as singleton for persistant data source
+            container.Register<TunnelRepository>().AsSingleton();
+        }
     }
 }


Validate data items before creating new column

--- GlossaryManager/GUI/EDD_MainControl.cs
+++ GlossaryManager/GUI/EDD_MainControl.cs
@@ -1085,8 +1085,29 @@
             {
                 if (targetTable != null)
                 {
-                    e.Effect = DragDropEffects.Link;
-                    e.InfoMessage = "Create new column";
+                    //check if the dataItem has a valid logical datatype
+                    if (dataItem.logicalDatatype == null)
+                    {
+                        e.Effect = DragDropEffects.None;
+                        e.InfoMessage = "Data Item has no logical data type";
+                    }
+                    else if(dataItem.logicalDatatype.getBaseDatatype(targetTable.wrappedTable.factory.databaseName) == null)
+                    {
+                        //check if base datatype found
+                        e.Effect = DragDropEffects.None;
+                        e.InfoMessage = $"No technical datatype found for {targetTable.wrappedTable.factory.databaseName}";
+                    }
+                    else if (string.IsNullOrEmpty(dataItem.Label))
+                    {
+                        //check if data item has label
+                        e.Effect = DragDropEffects.None;
+                        e.InfoMessage = "Data Item has no label";
+                    }
+                    else
+                    {
+                        e.Effect = DragDropEffects.Link;
+                        e.InfoMessage = "Create new column";
+                    }
                 }
                 else if (targetColumn != null)
                 {


Made file selection async compatible.

Made file selection async compatible.

--- examples/GCodeVisualizer/GCodeViewerApplication.cs
+++ examples/GCodeVisualizer/GCodeViewerApplication.cs
@@ -138,18 +138,21 @@
             UiThread.RunOnIdle((state) =>
                 {
                     OpenFileDialogParams openParams = new OpenFileDialogParams("gcode files|*.gcode");
-                    Stream streamToLoadFrom = FileDialog.OpenFileDialog(ref openParams);
-
-                    if (openParams.FileName != null && openParams.FileName != "")
-                    {
-                        gCodeViewWidget.Load(openParams.FileName);
-                        currentLayerIndex.Value = 0;
-                        currentLayerIndex.MaxValue = gCodeViewWidget.LoadedGCode.NumChangesInZ;
-                    }
-
-                    Invalidate();
+                    FileDialog.OpenFileDialog(openParams, onFileSelected);
                 });
         }
+
+		void onFileSelected(OpenFileDialogParams openParams)
+		{
+			if (openParams.FileName != null && openParams.FileName != "")
+			{
+				gCodeViewWidget.Load(openParams.FileName);
+				currentLayerIndex.Value = 0;
+				currentLayerIndex.MaxValue = gCodeViewWidget.LoadedGCode.NumChangesInZ;
+			}
+
+			Invalidate();
+		}

         public override void OnDraw(Graphics2D graphics2D)
         {


v2.1.0 * Softened default PlayerHelpers.Teleport noise

--- Helpers/PlayerHelpers/PlayerHelpers.cs
+++ Helpers/PlayerHelpers/PlayerHelpers.cs
@@ -55,6 +55,7 @@
 			if( Main.netMode <= 1 ) {
 				player.Teleport( pos, style );
 			} else {
+				style = style == -1 ? 1 : style;
 				NetMessage.SendData( 65, -1, -1, null, 0, (float)player.whoAmI, pos.X, pos.Y, style, 0, 0 );
 			}
 		}


Update

Update

--- ISAAR.MSolve.SamplesConsole/Program.cs
+++ ISAAR.MSolve.SamplesConsole/Program.cs
@@ -20,6 +20,7 @@
             model.SubdomainsDictionary.Add(1, new Subdomain() { ID = 1 });
             BeamBuildingBuilder.MakeBeamBuilding(model, 20, 20, 20, 5, 4, model.NodesDictionary.Count + 1,
                 model.ElementsDictionary.Count + 1, 1, 4, false, false);
+            model.Loads.Add(new Load() { Amount = -100, Node = model.Nodes[21], DOF = DOFType.X });
             model.ConnectDataStructures();

             SolverSkyline solver = new SolverSkyline(model);
@@ -33,8 +34,28 @@
             parentAnalyzer.Initialize();
             parentAnalyzer.Solve();
         }
-        static double[,] Dimer = new double[3, 3];
-        Matrix2D<double> kati = new Matrix2D<double>(Dimer);
+
+        private static void SolveBuildingInNoSoilSmallDynamic()
+        {
+            VectorExtensions.AssignTotalAffinityCount();
+            Model model = new Model();
+            model.SubdomainsDictionary.Add(1, new Subdomain() { ID = 1 });
+            BeamBuildingBuilder.MakeBeamBuilding(model, 20, 20, 20, 5, 4, model.NodesDictionary.Count + 1,
+                model.ElementsDictionary.Count + 1, 1, 4, false, false);
+            model.ConnectDataStructures();
+
+            SolverSkyline solver = new SolverSkyline(model);
+            ProblemStructural provider = new ProblemStructural(model, solver.SubdomainsDictionary);
+            LinearAnalyzer analyzer = new LinearAnalyzer(solver, solver.SubdomainsDictionary);
+            NewmarkDynamicAnalyzer parentAnalyzer = new NewmarkDynamicAnalyzer(provider, analyzer, solver.SubdomainsDictionary, 0.5, 0.25, 0.01, 0.1);
+
+            analyzer.LogFactories[1] = new LinearAnalyzerLogFactory(new int[] { 420 });
+
+            parentAnalyzer.BuildMatrices();
+            parentAnalyzer.Initialize();
+            parentAnalyzer.Solve();
+        }
+

         static void Main(string[] args)
         {


Added "-prerelease01" to nuget version number

--- Identifiers/Properties/AssemblyInfo.cs
+++ Identifiers/Properties/AssemblyInfo.cs
@@ -8,4 +8,4 @@
 [assembly: AssemblyFileVersion("1.4.0.0")]

 // This version is used by NuGet:
-[assembly: AssemblyInformationalVersion("1.4.0")]+[assembly: AssemblyInformationalVersion("1.4.0-prerelease01")]


Fix empty mods list issue. Hide share button for builtin mods.

--- ImprovedModsPanel/ImprovedModsPanel.cs
+++ ImprovedModsPanel/ImprovedModsPanel.cs
@@ -65,6 +65,19 @@
                 {
                     _thisGameObject = new GameObject { name = "ImprovedModsPanel" };
                     _thisGameObject.AddComponent<ImprovedModsPanel>();
+                    var updateHook = _thisGameObject.AddComponent<UpdateHook>();
+                    updateHook.once = false;
+                    updateHook.onUnityUpdate = () =>
+                    {
+                        var contentManagerPanelObj = GameObject.Find("(Library) ContentManagerPanel");
+                        if (contentManagerPanelObj == null)
+                        {
+                            return;
+                        }
+                        updateHook.once = true;
+                        InitializeModSortDropDown();
+                        _thisGameObject.gameObject.AddComponent<UpdateHook>().onUnityUpdate = RefreshPlugins;
+                    };
                 }

                 if (!_detoured)
@@ -86,16 +99,6 @@
                     );
                     _detoured = true;
                 }
-
-
-                InitializeModSortDropDown();
-
-                var contentManagerPanelObj = GameObject.Find("(Library) ContentManagerPanel");
-                if (contentManagerPanelObj == null)
-                {
-                    return;
-                }
-                contentManagerPanelObj.AddComponent<UpdateHook>().onUnityUpdate = RefreshPlugins;
                 _bootstrapped = true;
             }
             catch (Exception ex)
@@ -191,46 +194,44 @@
             _bootstrapped = false;
         }

-        private static bool _refreshModContents;
-
         void OnDestroy()
         {
             Revert();
         }

-        void Update()
-        {
-            if (!_refreshModContents || !_bootstrapped)
-            {
-                return;
-            }
-
-            var categoryContainer = GameObject.Find("CategoryContainer").GetComponent<UITabContainer>();
-            var modsList = categoryContainer.Find("Mods").Find("Content");
-            if (modsList == null)
-            {
-                return;
-            }
-
-            for (var i = 0; i < modsList.transform.childCount; i++)
-            {
-                var child = modsList.transform.GetChild(i).GetComponent<UIPanel>();
-                var shareButton = child.Find<UIButton>("Share");
-                var packageEntry = child.GetComponent<PackageEntry>();
-
-                if (packageEntry.publishedFileId == PublishedFileId.invalid)
-                {
-                    shareButton.isVisible = true;
-                    continue;
-                }
-
-                var workshopDetails = Util.GetPrivate<UGCDetails>(packageEntry, "m_WorkshopDetails");
-                if ((Steam.steamID == workshopDetails.creatorID))
-                {
-                    shareButton.isVisible = true;
-                }
-            }
-        }
+//        void Update()
+//        {
+//            if (!_refreshModContents || !_bootstrapped)
+//            {
+//                return;
+//            }
+//
+//            var categoryContainer = GameObject.Find("CategoryContainer").GetComponent<UITabContainer>();
+//            var modsList = categoryContainer.Find("Mods").Find("Content");
+//            if (modsList == null)
+//            {
+//                return;
+//            }
+//
+//            for (var i = 0; i < modsList.transform.childCount; i++)
+//            {
+//                var child = modsList.transform.GetChild(i).GetComponent<UIPanel>();
+//                var shareButton = child.Find<UIButton>("Share");
+//                var packageEntry = child.GetComponent<PackageEntry>();
+//
+//                if (packageEntry.publishedFileId == PublishedFileId.invalid)
+//                {
+//                    shareButton.isVisible = true;
+//                    continue;
+//                }
+//
+//                var workshopDetails = Util.GetPrivate<UGCDetails>(packageEntry, "m_WorkshopDetails");
+//                if ((Steam.steamID == workshopDetails.creatorID))
+//                {
+//                    shareButton.isVisible = true;
+//                }
+//            }
+//        }

         private static string FormatPackageName(string entryName, string authorName, bool isWorkshopItem)
         {
@@ -383,7 +384,7 @@
                 onOff.enabled = false;
             }

-            _refreshModContents = true;
+            //_refreshModContents = true;
         }

         private static TimeSpan GetPluginLastModifiedDelta(PluginManager.PluginInfo plugin)


Allow GUI selection with -gui

Allow GUI selection with -gui

--- IndieLauncher/Launcher/Main/Program.cs
+++ IndieLauncher/Launcher/Main/Program.cs
@@ -115,12 +115,26 @@
             Arguments = new ProgramArguments( args );
             Language = DetermineLanguage();

+            // Determine UI to run
+            string gui = Arguments.GetString( "gui" );
+            if( gui == null )
+            {
+                if( Platform == Platform.Windows )
+                {
+                    gui = "winforms";
+                }
+                else
+                {
+                    gui = "gtk";
+                }
+            }
+
             // Run UI
-            if( Platform == Platform.Windows )
+            if( gui == "winforms" )
             {
                 WinFormsInterface.Run();
             }
-            else
+            else if( gui == "gtk" )
             {
                 GTKInterface.Run();
             }


Enabled starting a story with pre-set flags.

--- InklewriterSharp/Player/StoryPlayer.cs
+++ InklewriterSharp/Player/StoryPlayer.cs
@@ -94,6 +94,22 @@
 		/// </summary>
 		public PlayChunk CreateFirstChunk ()
 		{
+			return CreateChunkForStitch (InitialStitch);
+		}
+
+		/// <summary>
+		/// Generates and returns a PlayChunk for the first content shown
+		/// to the player before selecting their first option, and shoehorns
+		/// in a list of pre-set flags. This is useful for retaining state
+		/// across multiple inklewriter story files that have been strung together
+		/// into a larger story.
+		/// </summary>
+		public PlayChunk CreateFirstChunkWithFlags (List<FlagValue> startingFlags)
+		{
+			var dummyChunk = new PlayChunk ();
+			dummyChunk.FlagsCollected = startingFlags;
+			allChunks.Add (dummyChunk);
+
 			return CreateChunkForStitch (InitialStitch);
 		}


Fix compile error for Window 8.

Fix compile error for Window 8.

--- src/platform/CCApplication.cs
+++ src/platform/CCApplication.cs
@@ -412,7 +412,7 @@
 		{
 		}

-		CCApplication(CCGame game, bool isFullScreen = true, CCSize? mainWindowSizeInPixels = null,
+		internal CCApplication(CCGame game, bool isFullScreen = true, CCSize? mainWindowSizeInPixels = null,
 			CCDisplayOrientation supportedOrientations = CCDisplayOrientation.Default)
 			: base(game)
 		{


Add thread safety to RPC-style requests

Add thread safety to RPC-style requests

--- IronSmarkets/Clients/SmarketsClient.cs
+++ IronSmarkets/Clients/SmarketsClient.cs
@@ -22,6 +22,7 @@

 using System;
 using System.Collections.Generic;
+using System.Diagnostics;
 using System.Net;
 using System.IO;
 using System.Threading;
@@ -72,10 +73,15 @@

         private readonly IDictionary<ulong, SyncRequest<Proto.Seto.Events>> _eventsRequests =
             new Dictionary<ulong, SyncRequest<Proto.Seto.Events>>();
+        private readonly object _eventsReqLock = new object();
+
         private readonly IDictionary<ulong, SyncRequest<Proto.Seto.AccountState>> _accountRequests =
             new Dictionary<ulong, SyncRequest<Proto.Seto.AccountState>>();
+        private readonly object _accountReqLock = new object();
+
         private readonly IDictionary<Uuid, Queue<SyncRequest<Proto.Seto.MarketQuotes>>> _marketQuotesRequests =
             new Dictionary<Uuid, Queue<SyncRequest<Proto.Seto.MarketQuotes>>>();
+        private readonly object _marketQuotesReqLock = new object();

         private int _disposed;

@@ -252,12 +258,25 @@
                 EventsRequest = query.ToEventsRequest()
             };

-            SendPayload(payload);
-            var sequence = payload.EtoPayload.Seq;
             var req = new SyncRequest<Proto.Seto.Events>();
-            _eventsRequests[sequence] = req;
+            lock (_eventsReqLock)
+            {
+
+                // XXX: At the moment, SendPayload needs to be inside
+                // the lock because the receiver thread could
+                // theoretically receive the payload before the
+                // SyncRequest is added to the dictionary. Although
+                // very unlikely, I am opting for safer in this case
+                // (as well as other cases which exhibit the same
+                // pattern). It may make sense instead to track the
+                // last sequence number for these types of requests in
+                // a volatile long variable and spin-wait in the
+                // receiver where necessary.
+                SendPayload(payload);
+                _eventsRequests[payload.EtoPayload.Seq] = req;
+            }
             return new Response<IEventMap>(
-                sequence,
+                payload.EtoPayload.Seq,
                 EventMap.FromSeto(req.Response));
         }

@@ -291,12 +310,14 @@
                 Type = Proto.Seto.PayloadType.PAYLOADACCOUNTSTATEREQUEST,
                 AccountStateRequest = request
             };
-            SendPayload(payload);
-            var sequence = payload.EtoPayload.Seq;
             var req = new SyncRequest<Proto.Seto.AccountState>();
-            _accountRequests[sequence] = req;
+            lock (_accountReqLock)
+            {
+                SendPayload(payload);
+                _accountRequests[payload.EtoPayload.Seq] = req;
+            }
             return new Response<AccountState>(
-                sequence,
+                payload.EtoPayload.Seq,
                 AccountState.FromSeto(req.Response));
         }

@@ -308,17 +329,19 @@
                     Market = market.ToUuid128()
                 }
             };
-            SendPayload(payload);
-            var sequence = payload.EtoPayload.Seq;
             var req = new SyncRequest<Proto.Seto.MarketQuotes>();
-            if (!_marketQuotesRequests.ContainsKey(market))
-            {
-                _marketQuotesRequests[market] =
-                    new Queue<SyncRequest<Proto.Seto.MarketQuotes>>();
-            }
-            _marketQuotesRequests[market].Enqueue(req);
+            lock (_marketQuotesReqLock)
+            {
+                SendPayload(payload);
+                if (!_marketQuotesRequests.ContainsKey(market))
+                {
+                    _marketQuotesRequests[market] =
+                        new Queue<SyncRequest<Proto.Seto.MarketQuotes>>();
+                }
+                _marketQuotesRequests[market].Enqueue(req);
+            }
             return new Response<MarketQuotes>(
-                sequence,
+                payload.EtoPayload.Seq,
                 MarketQuotes.FromSeto(req.Response));
         }

@@ -355,10 +378,16 @@

         private void HandleAccountState(Proto.Seto.Payload payload)
         {
-            SyncRequest<Proto.Seto.AccountState> req;
-            if (_accountRequests.TryGetValue(
-                    payload.EtoPayload.Seq,
-                    out req)) {
+            SyncRequest<Proto.Seto.AccountState> req = null;
+            lock (_accountReqLock)
+            {
+                if (_accountRequests.TryGetValue(
+                        payload.EtoPayload.Seq,
+                        out req)) {
+                    _accountRequests.Remove(payload.EtoPayload.Seq);
+                }
+            }
+            if (req != null) {
                 req.Response = payload.AccountState;
             }
             else
@@ -371,10 +400,17 @@

         private void HandleEventsHttpFound(Proto.Seto.Payload payload)
         {
-            SyncRequest<Proto.Seto.Events> req;
-            if (_eventsRequests.TryGetValue(
-                    payload.EtoPayload.Seq,
-                    out req)) {
+            SyncRequest<Proto.Seto.Events> req = null;
+            lock (_eventsReqLock)
+            {
+                if (_eventsRequests.TryGetValue(
+                        payload.EtoPayload.Seq,
+                        out req)) {
+                    _eventsRequests.Remove(payload.EtoPayload.Seq);
+                }
+            }
+            if (req != null)
+            {
                 BeginFetchHttpFound(req, payload);
             }
             else
@@ -387,14 +423,24 @@

         private void HandleMarketQuotes(Proto.Seto.Payload payload)
         {
-            Queue<SyncRequest<Proto.Seto.MarketQuotes>> queue;
             Uuid market = Uuid.FromUuid128(payload.MarketQuotes.Market);
-            if (_marketQuotesRequests.TryGetValue(market, out queue)) {
-                SyncRequest<Proto.Seto.MarketQuotes> req = queue.Dequeue();
-                if (queue.Count == 0)
+            SyncRequest<Proto.Seto.MarketQuotes> req = null;
+            bool found;
+            lock (_marketQuotesReqLock)
+            {
+                Queue<SyncRequest<Proto.Seto.MarketQuotes>> queue;
+                found = _marketQuotesRequests.TryGetValue(market, out queue);
+                if (found)
                 {
-                    _marketQuotesRequests.Remove(market);
-                }
+                    Debug.Assert(queue.Count > 0);
+                    req = queue.Dequeue();
+                    if (queue.Count == 0)
+                    {
+                        _marketQuotesRequests.Remove(market);
+                    }
+                }
+            }
+            if (req != null) {
                 req.Response = payload.MarketQuotes;
             }
             else


we will not have these in this site any longer

--- Manager/Manager/AppBuilderExtension.cs
+++ Manager/Manager/AppBuilderExtension.cs
@@ -15,15 +15,6 @@
         public static void UseStardustManager(this IAppBuilder appBuilder, ManagerConfiguration managerConfiguration,
             ILifetimeScope lifetimeScope)
         {
-            appBuilder.UseDefaultFiles(new DefaultFilesOptions
-            {
-                FileSystem = new PhysicalFileSystem(@".\StardustDashboard"),
-                RequestPath = new PathString("/StardustDashboard")
-            });
-
-            appBuilder.UseStaticFiles();
-
-
             appBuilder.Map(
                 managerConfiguration.Route,
                 inner =>


Remove disable resharper warning

Remove disable resharper warning

--- Mapsui.Core/Layers/RasterizingLayer.cs
+++ Mapsui.Core/Layers/RasterizingLayer.cs
@@ -179,7 +179,6 @@

             if (!_onlyRerasterizeIfOutsideOverscan ||
                 (_currentViewport == null) ||
-                // ReSharper disable once CompareOfFloatsByEqualityOperator
                 (_currentViewport.Resolution != newViewport.Resolution) ||
                 !_currentViewport.Extent.Contains(newViewport.Extent))
             {


Fixed Extent

Fixed Extent

--- MatrixPanAndZoomDemo.Wpf/PanAndZoom.cs
+++ MatrixPanAndZoomDemo.Wpf/PanAndZoom.cs
@@ -208,10 +208,12 @@
                 double zx = pw / ew;
                 double zy = ph / eh;
                 double zoom = Math.Min(zx, zy);
-                double cx = ew >= pw ? 0.0 : ew / 2.0;
-                double cy = eh >= ph ? 0.0 : eh / 2.0;
-
-                _matrix = MatrixHelper.ScaleAt(zoom, zoom, cx, cy);
+                double dx = (pw - (ew * zoom)) / 2.0;
+                double dy = (ph - (eh * zoom)) / 2.0;
+                double ox = dx - Math.Max(0, (pw - ew) / 2.0);
+                double oy = dy - Math.Max(0, (ph - eh) / 2.0);
+
+                _matrix = MatrixHelper.Scale(zoom, zoom) * MatrixHelper.Translate(ox, oy);

                 Invalidate();
             }


Improved code

Improved code

--- MotorwaySimulator/MotorwaySimulator.cs
+++ MotorwaySimulator/MotorwaySimulator.cs
@@ -525,9 +525,9 @@
         /// This is the underlying update structure of the simulation. Everytime the FormTick form control 'ticks' (every 15ms) this function is called.
         /// Firstly it checks to see if a new vehicle should be spawned.
         /// Secondly, it increments the scaled time passed by the scaled elapsed miliseconds since the last tick
-        /// Thirdly, it individually ticks each vehicle's lane handling method in order of progress along the road.
+        /// Thirdly, it individually ticks each vehicle's lane and speed handling method in order of progress along the road.
         /// Then, it individually ticks each vehicle's movement handling method in order of progress along the road.
-        ///     After ticking each vehicle's movement handling method, it checks if the vehicle is having a visible effect on any other vehicles on the road.
+        /// Then, it individually checks if each vehicle is having an effect on any other visible vehicles on the road in order of progress along the road
         /// If the vehicles behind in the lane to the left, right and the same as the current vehicle are out of sight, the vehicle is deemed to be no longer affecting any vehicles and removed from the road and vehicles TreeView.
         ///     A new entry is also created for the vehicle in the finished vehicle TreeView.
         /// Penultimately, the method marks each lane for repainting on the form as the vehicle's positions have changed.
@@ -559,10 +559,13 @@
             {
                 // Tick the movment handling method of each vehicle by location
                 vehicle.MovementTick();
-
+            }
+
+            foreach (Vehicle vehicle in OrderedVehicles)
+            {
                 if (!vehicle.InSight)
                 {
-                    // The vehicle is still in sight
+                    // The vehicle is not in sight

                     // Get the object of the vehicle behind the current vehicle in the same lane
                     Vehicle previousVehicle = vehicle.ParentLane.PreviousVehicle(vehicle);
@@ -768,7 +771,7 @@
         /// <returns>The sum of the spawn probabilities from the form inputs</returns>
         private int GetTotalSpawnProbability()
         {
-            return (int)(NumericCarSpawnProbability.Value + NumericLGVSpawnProbability.Value + NumericHGVSpawnProbability.Value + NumericBusSpawnProbability.Value); // drop the decimal parts as the values should be integers despite the decimal type
+            return (int)(NumericCarSpawnProbability.Value + NumericLGVSpawnProbability.Value + NumericHGVSpawnProbability.Value + NumericBusSpawnProbability.Value);
         }

         /// <summary>


optimize Bech32 code

optimize Bech32 code

--- NBitcoin/DataEncoders/Bech32Encoder.cs
+++ NBitcoin/DataEncoders/Bech32Encoder.cs
@@ -79,18 +79,22 @@

 		public override string EncodeData(byte[] data, int offset, int count)
 		{
-			var combined = new byte[count + 6];
+			var combined = new byte[_Hrp.Length + 1 + count + 6];
 			int combinedOffset = 0;
+			Array.Copy(_Hrp, 0, combined, 0, _Hrp.Length);
+			combinedOffset += _Hrp.Length;
+			combined[combinedOffset] = 49;
+			combinedOffset++;
 			Array.Copy(data, offset, combined, combinedOffset, count);
 			combinedOffset += count;
 			var checkSum = CreateChecksum(data, offset, count);
 			Array.Copy(checkSum, 0, combined, combinedOffset, 6);
-			var tmp = new byte[combined.Length];
-			for(int i = 0; i < combined.Length; i++)
-			{
-				tmp[i] = Byteset[combined[i]];
-			}
-			return Encoders.ASCII.EncodeData(_Hrp.Concat(new byte[] { 49 }, tmp));
+			combinedOffset += 6;
+			for(int i = 0; i < count + 6; i++)
+			{
+				combined[_Hrp.Length + 1 + i] = Byteset[combined[_Hrp.Length + 1 + i]];
+			}
+			return Encoders.ASCII.EncodeData(combined);
 		}

 		internal static void CheckCase(string hrp)


Add Assert.ByVal for use in VB

Add Assert.ByVal for use in VB

--HG--
extra : convert_revision : charlie%40nunit.org-20120125201359-v9m6idfbzwza00xe

--- NUnitFramework/src/framework/Assert.cs
+++ NUnitFramework/src/framework/Assert.cs
@@ -437,6 +437,56 @@

         #endregion

+        #region Assert.ByVal
+
+        /// <summary>
+        /// Apply a constraint to an actual value, succeeding if the constraint
+        /// is satisfied and throwing an assertion exception on failure.
+        /// Used as a synonym for That in rare cases where a private setter
+        /// causes a Visual Basic compilation error.
+        /// </summary>
+        /// <param name="expression">A Constraint to be applied</param>
+        /// <param name="actual">The actual value to test</param>
+        static public void ByVal(object actual, IResolveConstraint expression)
+        {
+            Assert.That(actual, expression, null, null);
+        }
+
+        /// <summary>
+        /// Apply a constraint to an actual value, succeeding if the constraint
+        /// is satisfied and throwing an assertion exception on failure.
+        /// Used as a synonym for That in rare cases where a private setter
+        /// causes a Visual Basic compilation error.
+        /// </summary>
+        /// <param name="expression">A Constraint to be applied</param>
+        /// <param name="actual">The actual value to test</param>
+        /// <param name="message">The message that will be displayed on failure</param>
+        static public void ByVal(object actual, IResolveConstraint expression, string message)
+        {
+            Assert.That(actual, expression, message, null);
+        }
+
+        /// <summary>
+        /// Apply a constraint to an actual value, succeeding if the constraint
+        /// is satisfied and throwing an assertion exception on failure.
+        /// Used as a synonym for That in rare cases where a private setter
+        /// causes a Visual Basic compilation error.
+        /// </summary>
+        /// <remarks>
+        /// This method is provided for use by VB developers needing to test
+        /// the value of properties with private setters.
+        /// </remarks>
+        /// <param name="expression">A Constraint expression to be applied</param>
+        /// <param name="actual">The actual value to test</param>
+        /// <param name="message">The message that will be displayed on failure</param>
+        /// <param name="args">Arguments to be used in formatting the message</param>
+        static public void ByVal(object actual, IResolveConstraint expression, string message, params object[] args)
+        {
+            Assert.That(actual, expression, message, args);
+        }
+
+        #endregion
+
         #region Throws, Catch and DoesNotThrow

         #region Throws


Added more precision to content extraction of packages to avoid multiple threads trying to unzip to same directory...

--- Naos.Deployment.Core/PackageManager.cs
+++ Naos.Deployment.Core/PackageManager.cs
@@ -25,6 +25,8 @@
     /// </summary>
     public class PackageManager : IManagePackages
     {
+        private const string DirectoryDateTimeToStringFormat = "yyyy-MM-dd--HH-mm-ss--ffff";
+
         private readonly PackageRepositoryConfiguration repoConfig;
         private readonly string defaultWorkingDirectory;

@@ -156,7 +158,7 @@
                 return null;
             }

-            var workingDirectory = Path.Combine(this.defaultWorkingDirectory, "Down-" + DateTime.Now.ToString("yyyy-MM-dd--HH-mm-ss--fff"));
+            var workingDirectory = Path.Combine(this.defaultWorkingDirectory, "Down-" + DateTime.Now.ToString(DirectoryDateTimeToStringFormat));
             byte[] ret;
             if (bundleAllDependencies)
             {
@@ -267,7 +269,9 @@
             }

             // download package (decompressed)
-            var workingDirectory = Path.Combine(this.defaultWorkingDirectory, "PackageFileContentsSearch-" + DateTime.Now.ToString("yyyy-MM-dd--HH-mm-ss"));
+            var workingDirectory = Path.Combine(
+                this.defaultWorkingDirectory,
+                "PackageFileContentsSearch-" + DateTime.Now.ToString(DirectoryDateTimeToStringFormat));
             var packageFilePath = Path.Combine(workingDirectory, "Package.zip");
             Directory.CreateDirectory(workingDirectory);
             File.WriteAllBytes(packageFilePath, package.PackageFileBytes);


Bump to version 1.3.

Bump to version 1.3.

--- src/AssemblyInfo.cs
+++ src/AssemblyInfo.cs
@@ -27,4 +27,4 @@
 [assembly: AssemblyTitle("Mono.Debugger.Client")]
 [assembly: AssemblyProduct("Mono")]
 [assembly: AssemblyCopyright("Copyright 2013 Alex Rønne Petersen")]
-[assembly: AssemblyVersion("1.2.*")]
+[assembly: AssemblyVersion("1.3.*")]


Allow installing LocalDb instance automatically if it is not installed already. Default is false.

--- src/Core/LocalDb.cs
+++ src/Core/LocalDb.cs
@@ -2,10 +2,12 @@
 using System.Collections.Generic;
 using System.Data;
 using System.Data.SqlClient;
+using System.Diagnostics;
 using System.IO;
 using System.Linq;
 using System.Reflection;
 using System.Runtime.InteropServices;
+using System.Text;
 using Microsoft.Win32;

 namespace RimDev.Automation.Sql
@@ -67,7 +69,8 @@
             string databasePrefix = "localdb",
             Func<string> databaseSuffixGenerator = null,
             int? connectionTimeout = null,
-            bool multipleActiveResultSets = false)
+            bool multipleActiveResultSets = false,
+            bool tryInstallingInstanceIfNotExists = false)
         {
             Location = location;
             Version = version;
@@ -78,6 +81,9 @@
                 ? string.Format("{0}_{1}", databasePrefix, DatabaseSuffixGenerator())
                 : databaseName;

+            if (tryInstallingInstanceIfNotExists && !InstallLocalDbInstanceIfNotExists())
+                throw new ApplicationException(string.Format("Could not start instance of localDb with version {0}", Version));
+
             CreateDatabase();
         }

@@ -126,6 +132,61 @@
                 MultipleActiveResultsSets == true ? "MultipleActiveResultSets=true;" : null);
         }

+        private bool InstallLocalDbInstanceIfNotExists()
+        {
+            var startInfo = new ProcessStartInfo
+            {
+                Arguments = "info",
+                FileName = "sqllocaldb.exe",
+                RedirectStandardOutput = true,
+                UseShellExecute = false,
+                WindowStyle = ProcessWindowStyle.Hidden
+            };
+
+            var standardOutput = new StringBuilder();
+
+            using (var process = Process.Start(startInfo))
+            {
+                // read chunk-wise while process is running.
+                while (!process.HasExited)
+                {
+                    standardOutput.Append(process.StandardOutput.ReadToEnd());
+                }
+
+                // make sure not to miss out on any remaindings.
+                standardOutput.Append(process.StandardOutput.ReadToEnd());
+            }
+
+            var instances = standardOutput.ToString().Split(new string[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries);
+
+            if (!instances.Any(i => i.Trim().Equals(Version)))
+            {
+                standardOutput = new StringBuilder();
+
+                startInfo.Arguments = string.Format("create \"{0}\" {1} -s", Version, Version.Replace("v", ""));
+
+                using (var process = Process.Start(startInfo))
+                {
+                    // read chunk-wise while process is running.
+                    while (!process.HasExited)
+                    {
+                        standardOutput.Append(process.StandardOutput.ReadToEnd());
+                    }
+
+                    // make sure not to miss out on any remaindings.
+                    standardOutput.Append(process.StandardOutput.ReadToEnd());
+                }
+
+                //Check if output says that instance is started
+                var expectedOutput = string.Format("LocalDB instance \"{0}\" started.", Version);
+                var actualOutput = standardOutput.ToString();
+                if (!actualOutput.Contains(expectedOutput))
+                    return false;
+            }
+
+            return true;
+        }
+
         private void DetachDatabase()
         {
             try


日付で比較したときに適切な値になっていないバグを修正した

日付で比較したときに適切な値になっていないバグを修正した

--- NicoNico.Net/Entities/Search/Search.cs
+++ NicoNico.Net/Entities/Search/Search.cs
@@ -42,6 +42,18 @@
         CommentCounter,
         [LabeledEnum("liveStatus")]
         LiveStatus,
+    }
+
+    public enum NicoNicoFilterOperator
+    {
+        [LabeledEnum("gt")]
+        Gt,
+        [LabeledEnum("lt")]
+        Lt,
+        [LabeledEnum("gte")]
+        Gte,
+        [LabeledEnum("lte")]
+        Lte,
     }

     public enum NicoNicoTarget
@@ -125,20 +137,13 @@
                 this.Query = query;
         }

-        public SearchBuilder RangeFrom(NicoNicoFilter field,object value)
+        public SearchBuilder Range(NicoNicoFilter field, NicoNicoFilterOperator ope, object value)
         {
-
-            return new SearchBuilder(this, string.Format("filters[{0}][gte]={1}", field.GetLabel(), value));
-        }
-
-        public SearchBuilder RangeTo(NicoNicoFilter field, object value)
-        {
-            return new SearchBuilder(this, string.Format("filters[{0}][lt]={1}", field.GetLabel(), value));
-        }
-
-        public SearchBuilder RangeEqual(NicoNicoFilter field, object value)
-        {
-            return new SearchBuilder(this, string.Format("filters[{0}][0]={1}", field.GetLabel(), value));
+            DateTime? isodate = value as DateTime?;
+            if (isodate != null)
+                return new SearchBuilder(this, string.Format("filters[{0}][{1}]={2}", field.GetLabel(), ope.GetLabel() , isodate.Value.ToString("yyyy-MM-dd'T'HH:mm:ss'Z'")));
+            else
+                return new SearchBuilder(this, string.Format("filters[{0}][{1}]={2}", field.GetLabel(), ope.GetLabel() , value));
         }

         public SearchBuilder Offset(int o)


disables brace completion because it doesn't work very nicely for Node.js apps.

--- Nodejs/Product/Nodejs/NodejsPackage.cs
+++ Nodejs/Product/Nodejs/NodejsPackage.cs
@@ -59,7 +59,6 @@
     [ProvideDebugEngine("Node.js Debugging", typeof(AD7ProgramProvider), typeof(AD7Engine), AD7Engine.DebugEngineId)]
     [ProvideLanguageService(typeof(NodejsLanguageInfo), NodejsConstants.Nodejs, 106, RequestStockColors = true, ShowSmartIndent = true, ShowCompletion = true, DefaultToInsertSpaces = true, HideAdvancedMembersByDefault = true, EnableAdvancedMembersOption = true, ShowDropDownOptions = true)]
     [ProvideDebugLanguage(NodejsConstants.Nodejs, GuidList.guidNodejsDebugLanguageStr, NodeExpressionEvaluatorGuid, AD7Engine.DebugEngineId)]
-    [ProvideBraceCompletion(NodejsConstants.Nodejs)]
     [WebSiteProject("JavaScript", "JavaScript")]
     // Keep declared exceptions in sync with those given default values in NodeDebugger.GetDefaultExceptionTreatments()
     [ProvideDebugException(AD7Engine.DebugEngineId, "Node.js Exceptions", State = enum_EXCEPTION_STATE.EXCEPTION_STOP_FIRST_CHANCE)]


Remove Lock action from tasks_stress - too much contention.

--- task_stress/Program.cs
+++ task_stress/Program.cs
@@ -89,7 +89,6 @@
         {
             new Action(Allocate),
             new Action(Spin),
-            new Action(Lock)
         };

         public static void Allocate()
@@ -108,14 +107,5 @@
                 s.SpinOnce();
             }
         }
-
-        private static object s_lock = new object();
-        public static void Lock()
-        {
-            lock(s_lock)
-            {
-                Allocate();
-            }
-        }
     }
 }