优化瞳孔控制

优化瞳孔控制

--- Assets/link/FaceController.cs
+++ Assets/link/FaceController.cs
@@ -23,9 +23,15 @@
     private Material _eyebrowMtl1 = null;
     private Material _eyebrowMtl2 = null;

-    private int eyeIndex = 0;
-    private int eyeBrowIndex = 0;
-    private int _maskIndex = 0;
+    private int _eyeIndex = 0;
+    private int _eyeBrowIndex = 0;
+    private int _maskId = 0;
+    private float _pupilX = 0;
+    private float _pupilY = 0;
+    private float _pupilS = 1;
+    private int _XOffsetId = 0;
+    private int _YOffsetId = 0;
+    private int _ScaleId = 0;

     // Use this for initialization
     void Start ()
@@ -38,14 +44,11 @@
         _eyebrowMtl2 = eyebrowObj2.GetComponent<MeshRenderer>().material;
         _pupilMtl1 = pupilObj1.GetComponent<MeshRenderer>().material;
         _pupilMtl2 = pupilObj2.GetComponent<MeshRenderer>().material;
-        _maskIndex = Shader.PropertyToID("_EyeMaskTex");
+        _maskId = Shader.PropertyToID("_EyeMaskTex");
+        _XOffsetId = Shader.PropertyToID("_XOffset");
+        _YOffsetId = Shader.PropertyToID("_YOffset");
+        _ScaleId = Shader.PropertyToID("_Scale");
     }
-
-	// Update is called once per frame
-	void Update ()
-    {
-
-	}

     private void OnGUI()
     {
@@ -58,20 +61,46 @@

         if (GUILayout.Button("更换Eye"))
         {
-            eyeIndex++;
-            eyeIndex = eyeIndex % eyes.Length;
-            _eyeMtl1.SetTexture(_mainTexId, eyes[eyeIndex]);
-            _eyeMtl2.SetTexture(_mainTexId, eyes[eyeIndex]);
-            _pupilMtl1.SetTexture(_maskIndex, eyes[eyeIndex]);
-            _pupilMtl2.SetTexture(_maskIndex, eyes[eyeIndex]);
+            _eyeIndex++;
+            _eyeIndex = _eyeIndex % eyes.Length;
+            _eyeMtl1.SetTexture(_mainTexId, eyes[_eyeIndex]);
+            _eyeMtl2.SetTexture(_mainTexId, eyes[_eyeIndex]);
+            _pupilMtl1.SetTexture(_maskId, eyes[_eyeIndex]);
+            _pupilMtl2.SetTexture(_maskId, eyes[_eyeIndex]);
         }

         if (GUILayout.Button("更换Eyebrow"))
         {
-            eyeBrowIndex++;
-            eyeBrowIndex = eyeBrowIndex % eyebrows.Length;
-            _eyebrowMtl1.SetTexture(_mainTexId, eyebrows[eyeBrowIndex]);
-            _eyebrowMtl2.SetTexture(_mainTexId, eyebrows[eyeBrowIndex]);
+            _eyeBrowIndex++;
+            _eyeBrowIndex = _eyeBrowIndex % eyebrows.Length;
+            _eyebrowMtl1.SetTexture(_mainTexId, eyebrows[_eyeBrowIndex]);
+            _eyebrowMtl2.SetTexture(_mainTexId, eyebrows[_eyeBrowIndex]);
+        }
+
+        GUILayout.Label("瞳孔位置X");
+        float pupilX = GUILayout.HorizontalSlider(_pupilX, -0.5f, 0.5f);
+        if (pupilX != _pupilX)
+        {
+            _pupilX = pupilX;
+            _pupilMtl1.SetFloat(_XOffsetId, _pupilX);
+            _pupilMtl2.SetFloat(_XOffsetId, _pupilX);
+        }
+
+        GUILayout.Label("瞳孔位置Y");
+        float pupilY = GUILayout.HorizontalSlider(_pupilY, -0.5f, 0.5f);
+        if (pupilY != _pupilY)
+        {
+            _pupilY = pupilY;
+            _pupilMtl1.SetFloat(_YOffsetId, _pupilY);
+            _pupilMtl2.SetFloat(_YOffsetId, _pupilY);
+        }
+        GUILayout.Label("瞳孔放大");
+        float pupilS = GUILayout.HorizontalSlider(_pupilS, 0, 2);
+        if (pupilS != _pupilS)
+        {
+            _pupilS = pupilS;
+            _pupilMtl1.SetFloat(_ScaleId, 2 - _pupilS);
+            _pupilMtl2.SetFloat(_ScaleId, 2 - _pupilS);
         }
     }
 }


Group analysis tests for Measure-AudioFile.

--- AudioWorks/AudioWorks.Commands.Tests/MeasureAudioFileTests.cs
+++ AudioWorks/AudioWorks.Commands.Tests/MeasureAudioFileTests.cs
@@ -1,5 +1,6 @@
 using System;
 using System.IO;
+using System.Linq;
 using System.Management.Automation;
 using AudioWorks.Api;
 using AudioWorks.Api.Tests.DataSources;
@@ -261,7 +262,7 @@
         [MemberData(nameof(AnalyzeValidFileDataSource.Data), MemberType = typeof(AnalyzeValidFileDataSource))]
         public void CreatesExpectedMetadata(
             [NotNull] string fileName,
-            [NotNull] string analyzer,
+            [NotNull] string analyzerName,
             [CanBeNull] TestSettingDictionary settings,
             [NotNull] TestAudioMetadata expectedMetadata)
         {
@@ -274,7 +275,7 @@
             {
                 ps.Runspace = _moduleFixture.Runspace;
                 ps.AddCommand("Measure-AudioFile")
-                    .AddArgument(analyzer)
+                    .AddArgument(analyzerName)
                     .AddArgument(audioFile);
                 if (settings != null)
                     foreach (var item in settings)
@@ -285,5 +286,44 @@

             Assert.True(new Comparer().Compare(expectedMetadata, audioFile.Metadata, out var differences), string.Join(' ', differences));
         }
+
+        [Theory(DisplayName = "Measure-AudioFile creates the expected metadata for a group")]
+        [MemberData(nameof(AnalyzeGroupDataSource.Data), MemberType = typeof(AnalyzeGroupDataSource))]
+        public void CreatesExpectedMetadataForGroup(
+            [NotNull] string[] fileNames,
+            [NotNull] string analyzerName,
+            [CanBeNull] TestSettingDictionary settings,
+            [NotNull] TestAudioMetadata[] expectedMetadata)
+        {
+            var audioFiles = fileNames.Select(fileName => new TaggedAudioFile(Path.Combine(
+                    new DirectoryInfo(Directory.GetCurrentDirectory()).Parent.Parent.Parent.Parent.FullName,
+                    "TestFiles",
+                    "Valid",
+                    fileName)))
+                .ToArray<ITaggedAudioFile>();
+            using (var ps = PowerShell.Create())
+            {
+                ps.Runspace = _moduleFixture.Runspace;
+                ps.AddCommand("Set-Variable")
+                    .AddArgument("audioFiles")
+                    .AddArgument(audioFiles)
+                    .AddParameter("PassThru");
+                ps.AddCommand("Select-Object")
+                    .AddParameter("ExpandProperty", "Value");
+                ps.AddCommand("Measure-AudioFile")
+                    .AddArgument(analyzerName);
+                if (settings != null)
+                    foreach (var item in settings)
+                        ps.AddParameter(item.Key, item.Value);
+
+                ps.Invoke();
+            }
+
+            var i = 0;
+            var comparer = new Comparer();
+            Assert.All(audioFiles, audioFile =>
+                Assert.True(comparer.Compare(expectedMetadata[i++], audioFile.Metadata, out var differences),
+                    string.Join(' ', differences)));
+        }
     }
 }


Only perform on non town bush; use same methods as SDV's shake implementation to reset state.

--- Automate/Framework/Machines/TerrainFeatures/TeaBushMachine.cs
+++ Automate/Framework/Machines/TerrainFeatures/TeaBushMachine.cs
@@ -38,7 +38,8 @@
         public override MachineState GetState()
         {
             // sanity check for green tea bush, even though caller should have verified
-            if (this.Machine.size.Value != Bush.greenTeaBush)
+            // also it's not a town bush
+            if (this.Machine.size.Value != Bush.greenTeaBush && this.Machine.townBush.Value)
                 return MachineState.Disabled;

             // based on BushSubject
@@ -62,8 +63,8 @@
         /// <param name="item">The output item that was taken.</param>
         private void OnOutputReduced(Item item)
         {
-            // simulate use on the tree to reset its state
-            this.Machine.performUseAction(this.Tile, this.Location);
+            this.Machine.tileSheetOffset.Value = 0;
+            this.Machine.setUpSourceRect();
         }
     }
 }


Moved ornaments slightly higher to account for lowercase letters

--- Moritz.Symbols/Metrics/ChordMetrics.cs
+++ Moritz.Symbols/Metrics/ChordMetrics.cs
@@ -665,23 +665,26 @@
             bottomBoundary += lowerBeamPadding;

 			// These are moved to a position relative to the outer stem tip or notehead.
-			if(_ornamentMetrics is OrnamentMetrics om)
-			{
-				// N.B. topPadding was (gap * 0.6F) for numericOrnamentMetrics (now deleted).
-				// Here it is (gap * 0.75F) to accomodate lower case characters that extend below the baseline (e.g. 'g').
-				MoveMetrics(_ornamentMetrics, om.IsBelow, ref topBoundary, (gap * 0.75F), ref bottomBoundary, (gap * 0.4F));
-			}
+			if(_ornamentMetrics != null)
+				MoveOrnamentMetrics(gap, ref topBoundary, ref bottomBoundary);
 			if(_lyricMetrics != null)
-                MoveLyricMetrics(gap, ref topBoundary, ref bottomBoundary);
-            if(_dynamicMetrics != null)
+				MoveLyricMetrics(gap, ref topBoundary, ref bottomBoundary);
+			if(_dynamicMetrics != null)
                 MoveDynamicMetrics(gap, ref topBoundary, ref bottomBoundary);
         }

-        /// <summary>
-        /// Moves the lyric to its correct position wrt the topBoundary or bottomBoundary.
-        /// Does nothing if lyricMetrics is null.
-        /// </summary>
-        private void MoveLyricMetrics(float gap, ref float topBoundary, ref float bottomBoundary)
+		private void MoveOrnamentMetrics(float gap, ref float topBoundary, ref float bottomBoundary)
+		{
+			// N.B. topPadding was (gap * 0.6F) for numericOrnamentMetrics (now deleted).
+			// Here it is (gap * 0.8F) to accomodate lower case characters that extend below the baseline (e.g. 'g').
+			MoveMetrics(_ornamentMetrics, _ornamentMetrics.IsBelow, ref topBoundary, (gap * 0.8F), ref bottomBoundary, (gap * 0.4F));
+		}
+
+		/// <summary>
+		/// Moves the lyric to its correct position wrt the topBoundary or bottomBoundary.
+		/// Does nothing if lyricMetrics is null.
+		/// </summary>
+		private void MoveLyricMetrics(float gap, ref float topBoundary, ref float bottomBoundary)
         {
             MoveMetrics(_lyricMetrics, _lyricMetrics.IsBelow, ref topBoundary, (gap * 0.6F), ref bottomBoundary, (gap * 0.4F));
         }
@@ -705,7 +708,7 @@
         }
         /// <summary>
         /// If isBelow, metrics.Top is moved to bottomBoundary + bottomPadding and bottomBoundary is then set to metrics.Bottom
-        /// otherwise metrics.Bottom is moved to topBoundary - topPadding ans topBoundary is then set to metrics.Top.
+        /// otherwise metrics.Bottom is moved to topBoundary - topPadding and topBoundary is then set to metrics.Top.
         /// Does nothing if metrics is null.
         /// </summary>
         private void MoveMetrics(Metrics metrics, bool isBelow,


Make COlDef ctor public

Make COlDef ctor public

--- Mvc.JQuery.Datatables/Models/ColDef.cs
+++ Mvc.JQuery.Datatables/Models/ColDef.cs
@@ -6,7 +6,7 @@
 {
     public class ColDef
     {
-        protected internal ColDef(string name, Type type)
+        public ColDef(string name, Type type)
         {
             Name = name;
             Type = type;


add new AudioRenderer component and comment out the first gui

git-svn-id: 01af18a6463d82f2dfa8239e3c2aedb49696f51b@272 6efbd2d2-d52f-40b0-b04a-ac586c898535

--- BrailleIO/Structs/BoxModel.cs
+++ BrailleIO/Structs/BoxModel.cs
@@ -35,13 +35,15 @@
             return (obj is BoxModel) && (Top == ((BoxModel)obj).Top) && (Right == ((BoxModel)obj).Right) && (Bottom == ((BoxModel)obj).Bottom) && (Left == ((BoxModel)obj).Left);
         }

+        public override int GetHashCode() { return base.GetHashCode(); }
+
         public BoxModel(uint top, uint right, uint bottom, uint left)
         {
             Top = top; Right = right; Bottom = bottom; Left = left;
         }
-        public BoxModel(uint top, uint horizontal, uint bottom) : this(top, horizontal, bottom, horizontal){}
-        public BoxModel(uint vertical, uint horizontal) : this(vertical, horizontal, vertical){}
-        public BoxModel(uint width): this(width, width){}
+        public BoxModel(uint top, uint horizontal, uint bottom) : this(top, horizontal, bottom, horizontal) { }
+        public BoxModel(uint vertical, uint horizontal) : this(vertical, horizontal, vertical) { }
+        public BoxModel(uint width) : this(width, width) { }

         public void Clear() { Top = Right = Bottom = Left = 0; }
         public bool HasBox() { return (Top > 0) || (Right > 0) || (Bottom > 0) || (Left > 0); }


fixed camera reverting style

fixed camera reverting style

Camera would revert to default style after being added to an entity.

--- Nez-PCL/ECS/Components/FollowCamera.cs
+++ Nez-PCL/ECS/Components/FollowCamera.cs
@@ -67,7 +67,7 @@
 			if( camera == null )
 				camera = entity.scene.camera;

-			follow( _targetEntity );
+			follow( _targetEntity, _cameraStyle );

 			// listen for changes in screen size so we can keep our deadzone properly positioned
 			Core.emitter.addObserver( CoreEvents.GraphicsDeviceReset, onGraphicsDeviceReset );


Remove package registration logic

Remove package registration logic

--- Nodejs/Product/Nodejs/NodejsPackage.cs
+++ Nodejs/Product/Nodejs/NodejsPackage.cs
@@ -81,8 +81,6 @@
     [ProvideEditorExtension2(typeof(NodejsEditorFactoryPromptForEncoding), NodeJsFileType, 50, "*:1", ProjectGuid = "{78D985FC-2CA0-4D08-9B6B-35ACD5E5294A}", NameResourceID = 113, DefaultName = "server")]
     [ProvideEditorLogicalView(typeof(NodejsEditorFactory), VSConstants.LOGVIEWID.TextView_string)]
     [ProvideEditorLogicalView(typeof(NodejsEditorFactoryPromptForEncoding), VSConstants.LOGVIEWID.TextView_string)]
-    [ProvideProjectItem(typeof(BaseNodeProjectFactory), NodejsConstants.Nodejs, "FileTemplates\\NewItem", 0)]
-    [ProvideLanguageTemplates("{349C5851-65DF-11DA-9384-00065B846F21}", NodejsConstants.JavaScript, Guids.NodejsPackageString, "Web", "Node.js Project Templates", "{" + Guids.NodejsBaseProjectFactoryString + "}", ".js", NodejsConstants.Nodejs, "{" + Guids.NodejsBaseProjectFactoryString + "}")]
     [ProvideTextEditorAutomation(NodejsConstants.Nodejs, 106, 102, ProfileMigrationType.PassThrough)]
     [ProvideLanguageService(typeof(JadeLanguageInfo), JadeContentTypeDefinition.JadeLanguageName, 3041, RequestStockColors = true, ShowSmartIndent = false, ShowCompletion = false, DefaultToInsertSpaces = true, HideAdvancedMembersByDefault = false, EnableAdvancedMembersOption = false, ShowDropDownOptions = false)]
     [ProvideEditorExtension2(typeof(JadeEditorFactory), JadeContentTypeDefinition.JadeFileExtension, 50, __VSPHYSICALVIEWATTRIBUTES.PVA_SupportsPreview, "*:1", ProjectGuid = VSConstants.CLSID.MiscellaneousFilesProject_string, NameResourceID = 3041, EditorNameResourceId = 3045)]


Add text shadow

Add text shadow

--- OpenKh.Game/AnimatedSequenceFactory.cs
+++ OpenKh.Game/AnimatedSequenceFactory.cs
@@ -291,6 +291,18 @@
                     var textColor = childContext.Color;
                     if (Flags.HasFlag(AnimationFlags.TextIgnoreColor))
                         textColor = new ColorF(1f, 1f, 1f, textColor.A);
+
+                    const float ShadowDistance = 3f;
+                    const float ShadowOpacity = 0.75f;
+                    _messageRenderer.Draw(new DrawContext
+                    {
+                        xStart = childContext.PositionX + xPos + ShadowDistance,
+                        x = childContext.PositionX + xPos + ShadowDistance,
+                        y = childContext.PositionY + childContext.TextPositionY + yPos + ShadowDistance,
+                        Color = new ColorF(0, 0, 0, textColor.A * ShadowOpacity),
+                        Scale = textScale,
+                        WidthMultiplier = 1.0f,
+                    }, _message);

                     _messageRenderer.Draw(new DrawContext
                     {


[Fixed] error dialog has been opened every frame

--- Assets/StomtPopup.cs
+++ Assets/StomtPopup.cs
@@ -103,13 +103,10 @@
 				}
 			}

-            /*if(!startTyping && !placeholderText.GetComponent<Text>().IsActive() )
-            {
-                refreshStartText();
-                this.startTyping = true;
-            }*/
-
-
+            if( (_ui.activeSelf && _api.NetworkError) && !_errorMessage.activeSelf)
+            {
+                ShowError();
+            }
 		}

 		IEnumerator Show()
@@ -123,9 +120,12 @@
 			Reset();
             _ui.SetActive(true);

-            Debug.Log("_errorMessage: " + _api.NetworkError);
-
-            if(_api.NetworkError)
+            ShowError();
+		}
+
+        void ShowError()
+        {
+            if (_api.NetworkError)
             {
                 // Diable GUI
                 _messageObj.SetActive(false);
@@ -144,8 +144,8 @@
                 // Enable Error MSG
                 _errorMessage.SetActive(false);
             }
-
-		}
+        }
+
 		void Hide()
 		{
 			// Hide UI


* Fixed UserServer crash when it's passed 00000000000000000000000000 as the UUID. * It turns out that by proxy, this means that you won't have to look up people's UUID anymore in grid mode, If the UUID is LLUUID.Zero, it tries to look up avatar by name.

--- OpenSim/Grid/UserServer/UserManager.cs
+++ OpenSim/Grid/UserServer/UserManager.cs
@@ -156,8 +156,22 @@
             UserProfileData userProfile;
             if (requestData.Contains("avatar_name"))
             {
-                userProfile = GetUserProfile((string) requestData["avatar_name"]);
-                if (userProfile == null)
+                string query = (string)requestData["avatar_name"];
+
+                System.Text.RegularExpressions.Regex objAlphaNumericPattern = new System.Text.RegularExpressions.Regex("[^a-zA-Z0-9]");
+
+                string[] querysplit;
+                querysplit = query.Split(' ');
+
+                if (querysplit.Length == 2)
+                {
+                    userProfile = GetUserProfile(querysplit[0],querysplit[1]);
+                    if (userProfile == null)
+                    {
+                        return CreateUnknownUserErrorResponse();
+                    }
+                }
+                else
                 {
                     return CreateUnknownUserErrorResponse();
                 }
@@ -179,7 +193,18 @@
             //CFK: Console.WriteLine("METHOD BY UUID CALLED");
             if (requestData.Contains("avatar_uuid"))
             {
-                userProfile = GetUserProfile((LLUUID) (string) requestData["avatar_uuid"]);
+                LLUUID guess = new LLUUID();
+                try
+                {
+                    guess = new LLUUID((string)requestData["avatar_uuid"]);
+
+                    userProfile = GetUserProfile(guess);
+                }
+                catch (System.FormatException)
+                {
+                    return CreateUnknownUserErrorResponse();
+                }
+
                 if (userProfile == null)
                 {
                     return CreateUnknownUserErrorResponse();


Added group-head icon

Added group-head icon

--- Outliner_Plugin/Scene/IINodeWrapper.cs
+++ Outliner_Plugin/Scene/IINodeWrapper.cs
@@ -99,6 +99,7 @@
    public const String IMGKEY_BONE      = "bone";
    public const String IMGKEY_CAMERA    = "camera";
    public const String IMGKEY_GEOMETRY  = "geometry";
+   public const String IMGKEY_GROUPHEAD = "group";
    public const String IMGKEY_HELPER    = "helper";
    public const String IMGKEY_LIGHT     = "light";
    public const String IMGKEY_MATERIAL  = "material";
@@ -121,7 +122,6 @@
          switch (superClass)
          {
             case SClass_ID.Camera: return IMGKEY_CAMERA;
-            case SClass_ID.Helper: return IMGKEY_HELPER;
             case SClass_ID.Light: return IMGKEY_LIGHT;
             case SClass_ID.Material: return IMGKEY_MATERIAL;
             case SClass_ID.Shape: return IMGKEY_SHAPE;
@@ -130,6 +130,14 @@

          if (superClass == SClass_ID.System && HelperMethods.IsXref(node))
             return IMGKEY_XREF;
+
+         if (superClass == SClass_ID.Helper)
+         {
+            if (this.node.IsGroupHead)
+               return IMGKEY_GROUPHEAD;
+            else
+               return IMGKEY_HELPER;
+         }

          if (superClass == SClass_ID.Geomobject)
          {


Add missing error handlers.

Add missing error handlers.

--- CalDavSynchronizer/Scheduling/SynchronizationProfileRunner.cs
+++ CalDavSynchronizer/Scheduling/SynchronizationProfileRunner.cs
@@ -75,29 +75,43 @@

     public async Task RunAndRescheduleNoThrow (bool runNow)
     {
-      if (_inactive)
-        return;
+      try
+      {
+        if (_inactive)
+          return;

-      if (runNow || _interval > TimeSpan.Zero && DateTime.UtcNow > _lastRun + _interval)
+        if (runNow || _interval > TimeSpan.Zero && DateTime.UtcNow > _lastRun + _interval)
+        {
+          _fullSyncPending = true;
+          await RunAllPendingJobs();
+        }
+      }
+      catch (Exception x)
       {
-        _fullSyncPending = true;
-        await RunAllPendingJobs();
+        ExceptionHandler.Instance.HandleException (x, s_logger);
       }
     }

     public async Task RunIfResponsibleNoThrow (string outlookId, string folderEntryId, string folderStoreId)
     {
-      if (!_changeTriggeredSynchronizationEnabled)
-        return;
+      try
+      {
+        if (!_changeTriggeredSynchronizationEnabled)
+          return;

-      if (_inactive)
-        return;
+        if (_inactive)
+          return;

-      if (!_synchronizer.IsResponsible (folderEntryId, folderStoreId))
-        return;
+        if (!_synchronizer.IsResponsible (folderEntryId, folderStoreId))
+          return;

-      _pendingOutlookItems.Add (outlookId);
-      await RunAllPendingJobs();
+        _pendingOutlookItems.Add (outlookId);
+        await RunAllPendingJobs();
+      }
+      catch (Exception x)
+      {
+        ExceptionHandler.Instance.HandleException (x, s_logger);
+      }
     }

     private async Task RunAllPendingJobs ()


replace MediaTypeMap defaults

replace MediaTypeMap defaults


[code style] Added region

[code style] Added region

--- Reversi/Assets/BoardEventsHandler.cs
+++ Reversi/Assets/BoardEventsHandler.cs
@@ -151,6 +151,8 @@
 	}
     #endregion

+
+    #region AI Player Turn
     private IEnumerator coroutineMakeTurnByAI()
     {
         while (this.IsTurnOfAI)
@@ -187,6 +189,7 @@
             return !this._boardModel.IsTurnOfBlackPlayer;
         }
     }
+    #endregion

     #region Turn Drawing


continued with indexer helper

continued with indexer helper

--- Rix/Rix.AzureSearch/IndexerHelper.cs
+++ Rix/Rix.AzureSearch/IndexerHelper.cs
@@ -79,6 +79,7 @@
 			indexer.FieldMappings = new List<FieldMapping>();
 			indexer.FieldMappings.Add(fieldMappingContent);
 			indexer.FieldMappings.Add(fieldMappingId);
+			indexer.Schedule = new IndexingSchedule(TimeSpan.FromMinutes(5));

 			await ServiceClient.Indexers.CreateOrUpdateAsync(indexer);
 		}
@@ -100,17 +101,20 @@
 			return results;
 		}

-		public async Task DeleteDocumentsByIdAsync(List<string> ids)
+		public async Task DeleteDocumentsByIdsAsync(List<string> ids)
 		{
-			throw new NotImplementedException();
+			int maxBatchSize = 1000;
+			int pagesCount = (ids.Count / maxBatchSize) + (ids.Count % maxBatchSize > 0 ? 1 : 0);

-			//var maxBatchSize = 1000;
-			//var pagesCount = ids.Count % maxBatchSize;
+			for (var i = 0; i < pagesCount; i++)
+			{
+				var indexActions = ids
+					.Skip(i * maxBatchSize)
+					.Take(maxBatchSize)
+					.Select(x => IndexAction.Delete("id", x));

-			//var indexActions = new List<IndexAction>();
-			//indexActions.Add(IndexAction.Delete("id", id));
-
-			//await ServiceClient.Indexes.GetClient(ConfigurationReader.SearchIndexName).Documents.IndexAsync(new IndexBatch(indexActions));
+				await ServiceClient.Indexes.GetClient(ConfigurationReader.SearchIndexName).Documents.IndexAsync(new IndexBatch(indexActions));
+			}
 		}

 		public async Task RunIndexerAsync()


Method parameter controls clear

Method parameter controls clear

Method parameter controls clear now if the user selects an algorithm
type

--- Procreate/Procreate/MainWindow.xaml.cs
+++ Procreate/Procreate/MainWindow.xaml.cs
@@ -67,6 +67,9 @@

         private void AlgorithmComboBox_DropDownClosed_1(object sender, EventArgs e)
         {
+            // clear the previous parameter controls displayed to the user
+            ParameterGrid.Children.Clear();
+
             switch (AlgorithmComboBox.Text)
             {
                 // adjust Method GUI to suit parameters for the chosen algorithm type


Fix runtime issue for 2013

Fix runtime issue for 2013

--- Core/OfficeDevPnP.Core.Tests/Extensions/WebExtensionsTests.cs
+++ Core/OfficeDevPnP.Core.Tests/Extensions/WebExtensionsTests.cs
@@ -129,7 +129,7 @@
             bool dirty = false;
             clientContext.Load(clientContext.Web.Webs, wc => wc.Include(w => w.Title, w => w.ServerRelativeUrl));
             clientContext.ExecuteQueryRetry();
-            foreach (Web subWeb in clientContext.Web.Webs)
+            foreach (Web subWeb in clientContext.Web.Webs.ToList())
             {
                 if (subWeb.Title.StartsWith("Test_") || subWeb.ServerRelativeUrl.Contains("Test_"))
                 {


working on some menu sliding

working on some menu sliding

--- Documents/Unity3D/Catcheep/Assets/Scripts/startMenuManager.cs
+++ Documents/Unity3D/Catcheep/Assets/Scripts/startMenuManager.cs
@@ -9,124 +9,42 @@
     public GameObject ScrollBarGameObject;
     private Scrollbar ScrollBar;

-    private Vector2 startPosition;
-    private Vector2 endPosition;
     private Vector2 edgeOfScreen;

-    //number of stops is how many images are in the menu
-    public int numOfStops;
-    //the direction of the swiping
-    private bool goingRightDirection;
-    //total scroll amount (calculated using vectors and not scroll bar values)
-    private float scrollAmount;
-    //the value on the scroll bar when scroll started (dah)
-    private float currentScrollValue;
-    //the destination we need to lerp to when the mouse is released and menu is mid way
-    private float desiredDestination;
-
+    public int menuCount;
     // Use this for initialization
     void Start()
     {
         if (ScrollBarGameObject == null) ScrollBarGameObject = GameObject.Find("Scrollbar");
-        startPosition = new Vector2(0, 0);
-        endPosition = new Vector2(0, 0);
+        ScrollBar = ScrollBarGameObject.GetComponent<Scrollbar>();
         edgeOfScreen = new Vector2(Screen.width, Screen.height);
-        ScrollBar = ScrollBarGameObject.GetComponent<Scrollbar>();
-
-        //basicaly this is true cause we always scroll right first
-        goingRightDirection = true;
-        scrollAmount = 0f;
-        currentScrollValue = 0f;
-        desiredDestination = -1;
     }

     // Update is called once per frame
     void Update()
     {
-        float portion = (float) 1 / (numOfStops - 1);
-        if (Input.GetMouseButtonDown(0))
+        if (Input.touchCount == 0)
         {
-            startPosition = Input.mousePosition;
-        }
-        if (Input.GetMouseButtonUp(0)) endPosition = Input.mousePosition;
-
-        if (!Input.GetMouseButton(0))
-        {
-            scrollAmount = Vector2.Distance(startPosition, endPosition);
-
-            if (scrollAmount > edgeOfScreen.x / 6)
+            float portion = (float) 1 / menuCount;
+            for (int i = 1; i <= menuCount; i++)
             {
-                //if start is bigger than end that means the scroll is to the right
-                //(cnt use scroll amount cause it s a positive distance)
-                if (startPosition.x - endPosition.x > 0)
-                {
-                    goingRightDirection = true;
-                }
-                else
-                {
-                    goingRightDirection = false;
-                }
-
-                if (goingRightDirection)
-                {
-                    ScrollBar.value =
-                        Mathf.Lerp(ScrollBar.value, currentScrollValue + portion, 0.05f);
-                    if(Mathf.Approximately(ScrollBar.value, currentScrollValue + portion)) {
-                        currentScrollValue
-                        = currentScrollValue + portion;
-                        print(currentScrollValue);
+
+                    if (ScrollBar.value < (i * (portion / 2) ) && ScrollBar.value > ((i - 1) * portion))
+                    {
+                        ScrollBar.value = Mathf.Lerp(ScrollBar.value, (i - 1) * portion, 0.05f);
                     }
-                }
-                else
-                {
-                    ScrollBar.value =
-                        Mathf.Lerp(ScrollBar.value, currentScrollValue - portion, 0.05f);
-                    if (Mathf.Approximately(ScrollBar.value, currentScrollValue + portion))
+                    if (ScrollBar.value > (i * (portion / 2)) && ScrollBar.value < (i * portion))
                     {
-                        currentScrollValue
-                            = currentScrollValue - portion;
-                        print(currentScrollValue);
+                        ScrollBar.value = Mathf.Lerp(ScrollBar.value, (i) * portion, 0.05f);
                     }
-                }
-            }
-            else
-            {
-                //TODO fix going back for last case
-                //TODO work on current value and menu automatic for some reason (vectors)
-
-                //this is to determine to which portion of the menu we have to go back to
-                //made desired destination - 1 at first to not waste frames
-                if (desiredDestination == -1)
-                {
-                    for (int i = 0; i < numOfStops; i++)
-                    {
-                        //this lines means the value is between two portions of the menu (between 0 and 0.33 for exemple)
-                        if (ScrollBar.value < (i + 1) * (portion) &&
-                            ScrollBar.value > i * (portion))
-                        {
-                            //once the destination is assigned, this loop wont be accessed until we reach the destination
-                            desiredDestination = i * (portion);
-                        }
-                    }
-                }
-                else
-                {
-                    ScrollBar.value =
-                        Mathf.Lerp(ScrollBar.value, desiredDestination, 0.05f);
-                    if (Mathf.Approximately(ScrollBar.value, desiredDestination))
-                    {
-                        desiredDestination = -1;
-                        print("destination reached");
-                    }
-                }

             }
         }
+        if (Input.touchCount == 1)
+        {

-        if (ScrollBar.value > 1 || ScrollBar.value < 0)
-        {
-            print("error: " + ScrollBar.value);
         }
+
     }

     public void farm()


Removed exception when AfterDoubleJump is null.

--- FRBDK/Glue/PlatformerPlugin/Generators/EntityCodeGenerator.cs
+++ FRBDK/Glue/PlatformerPlugin/Generators/EntityCodeGenerator.cs
@@ -580,11 +580,19 @@

                 if (CurrentMovementType == MovementType.Air)
                 {
-                    if(AfterDoubleJump == null)
-                    {
-                        throw new InvalidOperationException(""The player is attempting to perform a double-jump, "" +
-                            ""but the AfterDoubleJump variable is not set. If you are using glue, select this entity and change the After Double Jump variable."");
-                    }
+                    // November 26, 2021
+                    // We used to check if AfterDoubleJump
+                    // is null, and if so, throw an exception.
+                    // In the past if the player wanted to jump
+                    // in the air, a double jump was needed. But
+                    // Now we want to support wall jumping, which means
+                    // that the user can jump off walls and not have a double
+                    // jump. Removing this error.
+                    //if(AfterDoubleJump == null)
+                    //{
+                    //    throw new InvalidOperationException(""The player is attempting to perform a double-jump, "" +
+                    //        ""but the AfterDoubleJump variable is not set. If you are using glue, select this entity and change the After Double Jump variable."");
+                    //}
                     mHasDoubleJumped = true ;
                 }
                 if(CurrentMovementType == MovementType.Ground && CurrentMovement.CanClimb)


Fixing client builder tests.

Fixing client builder tests.

--- Google.Api.Gax.Grpc.IntegrationTests/ClientBuilderBaseTest.cs
+++ Google.Api.Gax.Grpc.IntegrationTests/ClientBuilderBaseTest.cs
@@ -57,7 +57,7 @@
         {
             var builder = new SampleClientBuilder();

-            ChannelBase channelFromPool = builder.ChannelPool.GetChannel(GrpcCoreAdapter.Instance, SampleClientBuilder.DefaultEndpoint, GrpcChannelOptions.Empty);
+            ChannelBase channelFromPool = builder.ChannelPool.GetChannel(GrpcCoreAdapter.Instance, SampleClientBuilder.DefaultEndpoint, SampleClientBuilder.DefaultOptions);

             Action<CallInvoker> validator = invoker =>
             {
@@ -74,8 +74,8 @@
             var endpoint = "custom.nowhere.com";
             var builder = new SampleClientBuilder { Endpoint = endpoint };

-            ChannelBase channelFromPoolWithDefaultEndpoint = builder.ChannelPool.GetChannel(GrpcCoreAdapter.Instance, SampleClientBuilder.DefaultEndpoint, GrpcChannelOptions.Empty);
-            ChannelBase channelFromPoolWithCustomEndpoint = builder.ChannelPool.GetChannel(GrpcCoreAdapter.Instance, "custom.nowhere.com", GrpcChannelOptions.Empty);
+            ChannelBase channelFromPoolWithDefaultEndpoint = builder.ChannelPool.GetChannel(GrpcCoreAdapter.Instance, SampleClientBuilder.DefaultEndpoint, SampleClientBuilder.DefaultOptions);
+            ChannelBase channelFromPoolWithCustomEndpoint = builder.ChannelPool.GetChannel(GrpcCoreAdapter.Instance, "custom.nowhere.com", SampleClientBuilder.DefaultOptions);

             Action<CallInvoker> validator = invoker =>
             {
@@ -261,6 +261,9 @@
             public static string DefaultEndpoint { get; } = "default.nowhere.com";
             public static string[] DefaultScopes { get; } = new[] { "scope1", "scope2" };
             public ChannelPool ChannelPool { get; } = new ChannelPool(DefaultScopes);
+            public static GrpcChannelOptions DefaultOptions = GrpcChannelOptions.Empty
+                .WithKeepAliveTime(TimeSpan.FromMinutes(1))
+                .WithEnableServiceConfigResolution(false);

             public string EndpointUsedToCreateChannel { get; private set; }
             public ChannelCredentials CredentialsUsedToCreateChannel { get; private set; }


Reload and retry setting metadata in case of fingerprint mismatch (#121)

--- Google.Solutions.Common/ApiExtensions/Instance/AddMetadata.cs
+++ Google.Solutions.Common/ApiExtensions/Instance/AddMetadata.cs
@@ -93,37 +93,37 @@
         {
             using (TraceSources.Common.TraceMethod().WithParameters(instanceRef, key))
             {
-                var instance = await resource.Get(
-                    instanceRef.ProjectId,
-                    instanceRef.Zone,
-                    instanceRef.InstanceName).ExecuteAsync(token).ConfigureAwait(false);
-                var metadata = instance.Metadata;
-
-                if (metadata.Items == null)
-                {
-                    metadata.Items = new List<Metadata.ItemsData>();
-                }
-
-                var existingEntry = metadata.Items
-                    .Where(i => i.Key == key)
-                    .FirstOrDefault();
-                if (existingEntry != null)
-                {
-                    existingEntry.Value = value;
-                }
-                else
-                {
-                    metadata.Items.Add(new Metadata.ItemsData()
-                    {
-                        Key = key,
-                        Value = value
-                    });
-                }
-
-                TraceSources.Common.TraceVerbose("Setting metdata {0} on {1}...", key, instanceRef.InstanceName);
-
                 for (int attempt = 0; attempt < 3; attempt++)
                 {
+                    var instance = await resource.Get(
+                        instanceRef.ProjectId,
+                        instanceRef.Zone,
+                        instanceRef.InstanceName).ExecuteAsync(token).ConfigureAwait(false);
+                    var metadata = instance.Metadata;
+
+                    if (metadata.Items == null)
+                    {
+                        metadata.Items = new List<Metadata.ItemsData>();
+                    }
+
+                    var existingEntry = metadata.Items
+                        .Where(i => i.Key == key)
+                        .FirstOrDefault();
+                    if (existingEntry != null)
+                    {
+                        existingEntry.Value = value;
+                    }
+                    else
+                    {
+                        metadata.Items.Add(new Metadata.ItemsData()
+                        {
+                            Key = key,
+                            Value = value
+                        });
+                    }
+
+                    TraceSources.Common.TraceVerbose("Setting metdata {0} on {1}...", key, instanceRef.InstanceName);
+
                     try
                     {
                         await resource.SetMetadata(
@@ -140,9 +140,11 @@
                             // Fingerprint mismatch - that happens when somebody else updated metadata
                             // in patallel.

+                            int backoff = 100;
                             TraceSources.Common.TraceWarning(
-                                "SetMetadata failed with {0} - retrying", e.Message,
+                                "SetMetadata failed with {0} - retrying after {backoff]ms", e.Message,
                                 e.Error?.Code);
+                            await Task.Delay(backoff);
                         }
                         else
                         {


Enable CORS again for Account controller.

--- Infopulse.EDemocracy.Web/Controllers/API/AccountController.cs
+++ Infopulse.EDemocracy.Web/Controllers/API/AccountController.cs
@@ -4,9 +4,11 @@
 using System.Threading.Tasks;
 using System.Web.Http;
 using Infopulse.EDemocracy.Common.Operations;
+using Infopulse.EDemocracy.Web.CORS;

 namespace Infopulse.EDemocracy.Web.Controllers.API
 {
+	[CorsPolicyProvider]
 	[RoutePrefix("api/Account")]
 	public class AccountController : ApiController
 	{


--- CSharp/Exception/AvoidNull.cs
+++ CSharp/Exception/AvoidNull.cs
@@ -1,8 +1,8 @@
 for (int i = 0; i < numberOfProcessAvailable; i++) {
     var IptcDirectory = directories.OfType<IptcDirectoryBase>().FirstOrDefault();
-    imageFileInfo.Keywords = IptcDirectory.GetProperty('TagKeywords') == null ? "padrao keywords" : IptcDirectory.GetDescription(IptcDirectory.TagKeywords);
-    imageFileInfo.LensModel = IptcDirectory.GetProperty('TagLensModel') == null ? "padrao lensmodel" : IptcDirectory.GetDescription(IptcDirectory.TagLensModel);
-    imageFileInfo.TagMake = IptcDirectory.GetProperty('TagMake') == null ? "padrao make" : IptcDirectory.GetDescription(IptcDirectory.TagMake);
+    imageFileInfo.Keywords = IptcDirectory.TagKeywords == null ? "padrao keywords" : IptcDirectory.GetDescription(IptcDirectory.TagKeywords);
+    imageFileInfo.LensModel = IptcDirectory.TagLensModel == null ? "padrao lensmodel" : IptcDirectory.GetDescription(IptcDirectory.TagLensModel);
+    imageFileInfo.TagMake = IIptcDirectory.TagMake == null ? "padrao make" : IptcDirectory.GetDescription(IptcDirectory.TagMake);
 }

 //https://pt.stackoverflow.com/q/221957/101


Parse: ParseToTYPE or ParseToTYPEOrdDefault

--- CSharpEx/StringConversions.cs
+++ CSharpEx/StringConversions.cs
@@ -14,17 +14,17 @@
         /// </summary>
         public static int ParseToInt(this string str)
         {
-            return ParseToInt(str, 0);
+            return int.Parse(str);
         }

         /// <summary>
         /// Converts the string representation of a number to its 32-bit signed integer equivalent.
         /// </summary>
-        public static int ParseToInt(this string str, int defaultValue)
+        public static int ParseToIntOrDefault(this string str, int defaultValue = default (int))
         {
             try
             {
-                if (str.Length > 0)
+                if (!string.IsNullOrEmpty(str))
                     return int.Parse(str);

                 return defaultValue;
@@ -43,7 +43,7 @@
         /// Converts the specified numeric Unicode character to a short number.
         /// </summary>
         /// <returns>The numeric value of c if that character represents a number; otherwise, -1</returns>
-        public static Int16 ParseToShort(this char ch)
+        public static short ParseToShort(this char ch)
         {
             return (short) Char.GetNumericValue(ch);
         }
@@ -52,7 +52,7 @@
         /// Converts the specified numeric Unicode character to a short number.
         /// </summary>
         /// <returns>The numeric value of c if that character represents a number; otherwise, defaultValue</returns>
-        public static Int16 ParseToShort(this char ch, Int16 defaultValue)
+        public static short ParseToShortOrDefault(this char ch, Int16 defaultValue = default (short))
         {
             short result = ParseToShort(ch);
             return result >= 0 ? result : defaultValue;
@@ -73,11 +73,11 @@
         /// <summary>
         /// Converts the string representation of a number to its 64-bit signed integer equivalent.
         /// </summary>
-        public static long ParseToLong(this string str, long defaultValue)
+        public static long ParseToLongOrDefault(this string str, long defaultValue = default (long))
         {
             try
             {
-                if (str.Length > 0)
+                if (!string.IsNullOrEmpty(str))
                     return long.Parse(str);

                 return defaultValue;
@@ -103,11 +103,11 @@
         /// <summary>
         /// Converts the string representation of a number to its Decimal equivalent.
         /// </summary>
-        public static decimal ParseToDecimal(this string str, decimal defaultValue)
+        public static decimal ParseToDecimalOrDefault(this string str, decimal defaultValue = default (decimal))
         {
             try
             {
-                if (str.Length > 0)
+                if (!string.IsNullOrEmpty(str))
                     return decimal.Parse(str);
                 return defaultValue;
             }
@@ -132,11 +132,11 @@
         /// <summary>
         /// Converts the string representation of a number to its Double equivalent.
         /// </summary>
-        public static double ParseToDouble(this string str, double defaultValue)
+        public static double ParseToDoubleOrDefault(this string str, double defaultValue = default (double))
         {
             try
             {
-                if (str.Length > 0)
+                if (!string.IsNullOrEmpty(str))
                     return double.Parse(str);

                 return defaultValue;


Fixed crash on TransformSpacing with FlowContainer<T>

--- osu.Framework/Graphics/Containers/FlowContainer.cs
+++ osu.Framework/Graphics/Containers/FlowContainer.cs
@@ -104,7 +104,7 @@
             public override void Apply(Drawable d)
             {
                 base.Apply(d);
-                FlowContainer flowContainer = (FlowContainer)d;
+                FlowContainer<Drawable> flowContainer = (FlowContainer<Drawable>)d;
                 flowContainer.Spacing = CurrentValue;
             }
         }


Fix transform removal using incorrect lookup

--- osu.Framework/Graphics/Transforms/Transformable.cs
+++ osu.Framework/Graphics/Transforms/Transformable.cs
@@ -127,7 +127,7 @@
         /// <param name="toRemove">The <see cref="Transform"/> to remove.</param>
         public void RemoveTransform(Transform toRemove)
         {
-            getTrackerFor(toRemove.TargetGrouping)?.RemoveTransform(toRemove);
+            getTrackerForGrouping(toRemove.TargetGrouping)?.RemoveTransform(toRemove);

             toRemove.OnAbort?.Invoke();
         }


* Extensions.cs: Added DirectoryInfo.CreateTempFile() and FileInfo.RenameTo() extensions

--- Extensions.cs
+++ Extensions.cs
@@ -106,6 +106,49 @@
         public static void Write(this Stream writer, ObjectId o)
         {
             o.CopyTo(writer);
+        }
+
+        private static string alphaNumeric = "abcdefghijklmnopqrstuvwxyz0123456789";
+        public static FileInfo CreateTempFile(this DirectoryInfo d, string prefix)
+        {
+            return CreateTempFile(d, prefix, null);
+        }
+
+        public static FileInfo CreateTempFile(this DirectoryInfo d, string prefix, string suffix)
+        {
+            var name = "";
+            var rnd = new Random((int)DateTime.Now.Ticks);
+            if (!string.IsNullOrEmpty(prefix))
+                name += prefix;
+
+            var i = 8;
+            while (i-- > 0)
+                name += alphaNumeric[rnd.Next(alphaNumeric.Length - 1)];
+
+            if (suffix == null)
+                name += ".tmp";
+            else
+                name += suffix;
+
+            return new FileInfo(Path.Combine(d.FullName, name));
+        }
+
+        public static bool RenameTo(this FileInfo file, string newPath)
+        {
+            try
+            {
+                file.MoveTo(newPath);
+                return true;
+            }
+            catch (IOException) { }
+            catch (ArgumentNullException) { }
+            catch (ArgumentException) { }
+            catch (System.Security.SecurityException) { }
+            catch (UnauthorizedAccessException) { }
+            catch (NotSupportedException) { }
+
+            return false;
+
         }
     }
 }


Fix tests not running more than once

Fix tests not running more than once

--- osu.Game.Rulesets.Osu.Tests/TestCaseSliderInput.cs
+++ osu.Game.Rulesets.Osu.Tests/TestCaseSliderInput.cs
@@ -317,32 +317,32 @@
             // Likely requires some discussion regarding how first frame inputs should be handled.
             frames.Insert(0, new OsuReplayFrame());

-            var p = new ScoreAccessibleReplayPlayer(new Score { Replay = new Replay { Frames = frames } })
-            {
-                AllowPause = false,
-                AllowLeadIn = false,
-                AllowResults = false
-            };
-
-            p.OnLoadComplete += _ =>
-            {
-                p.ScoreProcessor.NewJudgement += result =>
-                {
-                    if (currentPlayer == p) judgementResults.Add(result);
+            AddStep("load player", () =>
+            {
+                var p = new ScoreAccessibleReplayPlayer(new Score { Replay = new Replay { Frames = frames } })
+                {
+                    AllowPause = false,
+                    AllowLeadIn = false,
+                    AllowResults = false
                 };
-                p.ScoreProcessor.AllJudged += () =>
-                {
-                    if (currentPlayer == p) allJudgedFired = true;
+
+                p.OnLoadComplete += _ =>
+                {
+                    p.ScoreProcessor.NewJudgement += result =>
+                    {
+                        if (currentPlayer == p) judgementResults.Add(result);
+                    };
+                    p.ScoreProcessor.AllJudged += () =>
+                    {
+                        if (currentPlayer == p) allJudgedFired = true;
+                    };
                 };
-            };
-
-            AddStep("load player", () =>
-            {
+
                 LoadScreen(currentPlayer = p);
                 allJudgedFired = false;
                 judgementResults = new List<JudgementResult>();
             });
-            AddUntilStep(() => p.IsLoaded, "Wait until player is loaded");
+            AddUntilStep(() => currentPlayer.IsLoaded, "Wait until player is loaded");
             AddUntilStep(() => allJudgedFired, "Wait for all judged");
         }


Fix compose mode not showing distance snap grid when entering with a selection

--- osu.Game.Rulesets.Osu/Edit/OsuHitObjectComposer.cs
+++ osu.Game.Rulesets.Osu/Edit/OsuHitObjectComposer.cs
@@ -54,6 +54,9 @@
             EditorBeatmap.SelectedHitObjects.CollectionChanged += (_, __) => updateDistanceSnapGrid();
             EditorBeatmap.PlacementObject.ValueChanged += _ => updateDistanceSnapGrid();
             distanceSnapToggle.ValueChanged += _ => updateDistanceSnapGrid();
+
+            // we may be entering the screen with a selection already active
+            updateDistanceSnapGrid();
         }

         protected override ComposeBlueprintContainer CreateBlueprintContainer(IEnumerable<DrawableHitObject> hitObjects)


Add Enabled property

Add Enabled property

--- GTPWrapper/Engine.cs
+++ GTPWrapper/Engine.cs
@@ -44,20 +44,25 @@
         /// Gets or sets the version of the engine.
         /// </summary>
         public string Version { get; set; }
+        /// <summary>
+        /// Gets or sets whether the engine is accepting commands.
+        /// </summary>
+        public bool Enabled { get; set; }

         /// <summary>
         /// Initializes a new instance of the Engine class.
         /// </summary>
         public Engine(string name, string version = "") {
+            this.CommandQueue = new Queue<Command>();
+            this.ResponseList = new Dictionary<Command, Response>();
             this.SupportedCommands = new List<string>(new string[] {
                 "protocol_version", "name", "version", "known_command", "list_commands", "quit", "boardsize",
                 "clear_board", "komi", "play", "genmove"
             });
-            this.CommandQueue = new Queue<Command>();
-            this.ResponseList = new Dictionary<Command, Response>();

             this.Name = name;
             this.Version = version;
+            this.Enabled = true;

             this.NewCommand += Engine_NewCommand;
         }
@@ -67,6 +72,8 @@
         /// </summary>
         /// <param name="command">The command to add to queue.</param>
         public void AddCommand(Command command) {
+            if (!Enabled) return;
+
             this.CommandQueue.Enqueue(command);
             if (NewCommand != null) NewCommand(this, new CommandEventArgs(command));
         }
@@ -113,6 +120,7 @@
         /// Ends the connection. Corresponds to 'quit'.
         /// </summary>
         public void Quit() {
+            this.Enabled = false;
             if (ConnectionClosed != null) ConnectionClosed(this, new EventArgs());
         }


Fix, execute result

Fix, execute result

Execute() now returns correct result

--- Retry/CircuitBreaker/CircuitBreaker.cs
+++ Retry/CircuitBreaker/CircuitBreaker.cs
@@ -98,7 +98,7 @@
             {
                 try
                 {
-                    execFunc();
+                    result = execFunc();
                 }
                 catch (Exception e)
                 {


Debugging and requested feature changes.

--- SIL.Archiving/ArchivingDlgViewModel.cs
+++ SIL.Archiving/ArchivingDlgViewModel.cs
@@ -126,6 +126,7 @@
 		public const string kModeVideo = "Video";
 		public const string kModeText = "Text";
 		public const string kModePhotograph = "Photograph";
+		public const string kModeGraphic = "Graphic";
 		public const string kModeMusicalNotation = "Musical notation";
 		public const string kModeDataset = "Dataset";
 		public const string kModeSoftwareOrFont = "Software application";
@@ -180,7 +181,10 @@
 		private string _rampProgramPath;
 		private Action _incrementProgressBarAction;
 		private int _imageCount = -1;
+		private int _audioVideoCount = -1;
 		private IDictionary<string, Tuple<IEnumerable<string>, string>> _fileLists;
+
+		private string _imageMode = kModePhotograph;

 		#region properties
 		public string AppName { get; private set; }
@@ -253,6 +257,7 @@
 		public ArchivingDlgViewModel(string appName, string title, string id,
 			Func<string, string, string> getFileDescription)
 		{
+			ShowRecordingCountNotLength = false;
 			if (appName == null)
 				throw new ArgumentNullException("appName");
 			AppName = appName;
@@ -1508,6 +1513,9 @@

 				if (ImageCount > 0)
 					_metsPairs.Add(JSONUtils.MakeKeyValuePair(kImageExtent, string.Format("{0} images", ImageCount.ToString(CultureInfo.InvariantCulture))));
+
+				if (ShowRecordingCountNotLength && _audioVideoCount > 0)
+					SetAudioVideoExtent(string.Format("{0} recording files.", _audioVideoCount));
 			}
 		}

@@ -1528,6 +1536,17 @@
 		}

 		/// ------------------------------------------------------------------------------------
+		public int AudioVideoCount
+		{
+			get
+			{
+				if (_fileLists != null && _audioVideoCount < 0)
+					GetMode();
+				return _audioVideoCount;
+			}
+		}
+
+		/// ------------------------------------------------------------------------------------
 		/// <summary>
 		/// Gets a comma-separated list of types found in the files to be archived
 		/// (e.g. Text, Video, etc.).
@@ -1536,6 +1555,7 @@
 		private string GetMode()
 		{
 			_imageCount = 0;
+			_audioVideoCount = 0;
 			return GetMode(_fileLists.SelectMany(f => f.Value.Item1));
 		}

@@ -1563,6 +1583,24 @@

 			return JSONUtils.MakeBracketedListFromValues(kFileTypeModeList, list);
 		}
+
+		/// ------------------------------------------------------------------------------------
+		/// <summary>
+		/// Are image files to be counted as photographs or graphics
+		/// </summary>
+		/// ------------------------------------------------------------------------------------
+		public bool ImagesArePhotographs
+		{
+			get { return _imageMode == kModePhotograph; }
+			set { _imageMode = value ? kModePhotograph : kModeGraphic; }
+		}
+
+		/// ------------------------------------------------------------------------------------
+		/// <summary>
+		/// Show the count of audio/video files rather than the length
+		/// </summary>
+		/// ------------------------------------------------------------------------------------
+		public bool ShowRecordingCountNotLength { get; set; }

 		/// ------------------------------------------------------------------------------------
 		private void AddModesToSet(HashSet<string> list, IEnumerable<string> files)
@@ -1577,15 +1615,21 @@
 				}

 				if (FileUtils.GetIsAudio(file))
+				{
+					_audioVideoCount++;
 					list.Add(kModeSpeech);
+				}
 				if (FileUtils.GetIsVideo(file))
+				{
+					_audioVideoCount++;
 					list.Add(kModeVideo);
+				}
 				if (FileUtils.GetIsText(file))
 					list.Add(kModeText);
 				if (FileUtils.GetIsImage(file))
 				{
 					_imageCount++;
-					list.Add(kModePhotograph);
+					list.Add(_imageMode); // can be either Photograph or Graphic
 				}
 				if (FileUtils.GetIsMusicalNotation(file))
 					list.Add(kModeMusicalNotation);


Only check if 'bin' dir exists.

Only check if 'bin' dir exists.

--- src/proj/ZeroMQ/Proxy/ProxyAssemblyLoader.cs
+++ src/proj/ZeroMQ/Proxy/ProxyAssemblyLoader.cs
@@ -27,7 +27,7 @@

         private static Assembly LoadFromLocalBinPath()
         {
-            return ExtractAndLoadFromPath("bin");
+            return Directory.Exists("bin") ? ExtractAndLoadFromPath("bin") : null;
         }

         private static Assembly LoadFromExecutingPath()
@@ -45,11 +45,6 @@

         private static Assembly ExtractAndLoadFromPath(string dir)
         {
-            if (!Directory.Exists(dir))
-            {
-                return null;
-            }
-
             string proxyPath = Path.GetFullPath(Path.Combine(dir, ProxyAssemblyFileName));
             string nativePath = Path.GetFullPath(Path.Combine(dir, NativeDllName));
             string platformSuffix = "." + CurrentPlatform;


Ordered checkbox list items

Ordered checkbox list items

--- CmsEngine/Services/Service.cs
+++ CmsEngine/Services/Service.cs
@@ -302,7 +302,7 @@
                 });
             }

-            return checkBoxList;
+            return checkBoxList.OrderBy(o => o.Label);
         }

         private IEnumerable<SelectListItem> PopulateSelectListItems<T>(IEnumerable<string> selectedItems = null) where T : BaseModel


csv export bug fixes

csv export bug fixes

csv export for basic and full projection

--- dotnet/cbcm-csharp/cbcmClient/ChromeBrowser.cs
+++ dotnet/cbcm-csharp/cbcmClient/ChromeBrowser.cs
@@ -1,5 +1,6 @@
 using System;
 using System.Collections.Generic;
+using System.Linq;
 using System.IO;
 using System.Text;
 using System.Web;
@@ -99,7 +100,7 @@
         {
             this.EnrolledBrowsersSaveToFile(string.Empty,
                 orgUnitPath,
-                "BASIC",
+                projection,
                 "machine_name",
                 "ASCENDING",
                 100,
@@ -127,27 +128,26 @@
             StringBuilder stringBuilder = new StringBuilder();
             string outputFileName = String.Format("all-enrolled-browser-data-{0}.csv", DateTime.Now.Ticks);

-            if (String.Compare(fileExt, "json", true) == 0)
-                outputFileName = String.Format("all-enrolled-browser-data-{0}.json", DateTime.Now.Ticks);
-
-
-                string[] scope = { "https://www.googleapis.com/auth/admin.directory.device.chromebrowsers.readonly" };
-                string token = this.GetAuthBearerToken(scope);
-
-                string serviceURL = String.Format("https://www.googleapis.com/admin/directory/v1.1beta1/customer/{0}/devices/chromebrowsers?projection={1}&orderBy={2}&sortOrder={3}&maxResults={4}&pageToken="
-                      , this.CustomerID
-                      , projection
-                      , String.IsNullOrEmpty(orderBy) ? "last_activity" : orderBy
-                      , String.IsNullOrEmpty(sortOrder) ? "DESCENDING" : sortOrder
-                      , maxResults);
-
-                if (!String.IsNullOrEmpty(query))
-                    serviceURL = serviceURL + "&query=" + query;
-
-                if (!String.IsNullOrEmpty(orgUnitPath))
-                    serviceURL = serviceURL + "&orgUnitPath=" + orgUnitPath;
-
-                stringBuilder.AppendLine("deviceId,machineName,orgUnitPath,lastDeviceUser,lastActivityTime,serialNumber,osPlatform,osArchitecture,osVersion");
+            string[] scope = { "https://www.googleapis.com/auth/admin.directory.device.chromebrowsers.readonly" };
+            string token = this.GetAuthBearerToken(scope);
+
+            string serviceURL = String.Format("https://www.googleapis.com/admin/directory/v1.1beta1/customer/{0}/devices/chromebrowsers?projection={1}&orderBy={2}&sortOrder={3}&maxResults={4}&pageToken="
+                  , this.CustomerID
+                  , projection
+                  , String.IsNullOrEmpty(orderBy) ? "last_activity" : orderBy
+                  , String.IsNullOrEmpty(sortOrder) ? "DESCENDING" : sortOrder
+                  , maxResults);
+
+            if (!String.IsNullOrEmpty(query))
+                serviceURL = serviceURL + "&query=" + query;
+
+            if (!String.IsNullOrEmpty(orgUnitPath))
+                serviceURL = serviceURL + "&orgUnitPath=" + orgUnitPath;
+
+            if (String.Compare(projection, "FULL", true) == 0)
+                stringBuilder.AppendLine("deviceId,machineName,orgUnitPath,lastDeviceUser,lastActivityTime,serialNumber,osPlatform,osArchitecture,osVersion,policyCount,machinePolicies,extensionCount,extensionId,extensionName");
+            else
+                stringBuilder.AppendLine("deviceId,machineName,orgUnitPath,lastDeviceUser,lastActivityTime,serialNumber,osPlatform,osArchitecture,osVersion,policyCount,extensionCount");

             // Create a file to write to.
             using (StreamWriter sw = File.CreateText(outputFileName))
@@ -181,35 +181,95 @@
                     //set next page token
                     nextPageToken = browserDevices.NextPageToken;

-                    if (String.Compare(fileExt, "json", true) == 0)
-                        sw.WriteLine(content);
-                    else //csv
+                    foreach (var browser in browserDevices.Browsers)
                     {
-                        foreach (var browser in browserDevices.Browsers)
+
+
+                        if (String.Compare(projection, "FULL", true) == 0)
                         {
-                            stringBuilder.AppendLine(String.Format("{0},{1},{2},{3},{4},{5},{6},{7},{8}",
-                                browser.DeviceId,
-                                browser.MachineName,
-                                browser.OrgUnitPath,
-                                browser.LastDeviceUser,
-                                browser.LastActivityTime?.ToString("yyyy-MM-dd hh:mm"),
-                                browser.SerialNumber,
-                                browser.OsPlatform,
-                                browser.OsArchitecture,
-                                browser.OsVersion));
-
-                        }//foreach browser in browserDevices.Browsers
-                        sw.Write(stringBuilder.ToString());
-
-                        //clean up work
-                        stringBuilder.Clear();
-                        browserDevices = null;  //to-do: nextpagetoken is duplicating and isn't easy to reproduce. adding this for safety.
-                    }//else (CSV)
+                            stringBuilder.AppendLine(String.Format("{0},{1},{2},{3},{4},{5},{6},{7},{8},{9},\"[{10}]\",{11},\"[{12}]\"",
+                            browser.DeviceId,                                           //0
+                            browser.MachineName,                                        //1
+                            browser.OrgUnitPath,                                        //2
+                            browser.LastDeviceUser,                                     //3
+                            browser.LastActivityTime?.ToString("yyyy-MM-dd hh:mm"),     //4
+                            browser.SerialNumber,                                       //5
+                            browser.OsPlatform,                                         //6
+                            browser.OsArchitecture,                                     //7
+                            browser.OsVersion,                                          //8
+                            browser.PolicyCount?.ToString(),                            //9
+                            this.PrettyPrint(browser.MachinePolicies),                  //10
+                            browser.ExtensionCount?.ToString(),                         //11
+                            this.PrettyPrint(browser.AllExtensions)                     //12
+                            ));
+                        }
+                        else
+                        {
+                            stringBuilder.AppendLine(String.Format("{0},{1},{2},{3},{4},{5},{6},{7},{8},{9},{10}",
+                            browser.DeviceId,
+                            browser.MachineName,
+                            browser.OrgUnitPath,
+                            browser.LastDeviceUser,
+                            browser.LastActivityTime?.ToString("yyyy-MM-dd hh:mm"),
+                            browser.SerialNumber,
+                            browser.OsPlatform,
+                            browser.OsArchitecture,
+                            browser.OsVersion,
+                            browser.PolicyCount?.ToString(),
+                            browser.ExtensionCount?.ToString()
+                            ));
+                        }
+
+                    }//foreach browser in browserDevices.Browsers
+                    sw.Write(stringBuilder.ToString());
+
+                    //clean up work
+                    stringBuilder.Clear();
+                    browserDevices = null;  //to-do: nextpagetoken is duplicating and isn't easy to reproduce. adding this for safety.

                 } while (!String.IsNullOrEmpty(nextPageToken));
             }

         }
+        #region Policy Formatter Helper
+        private string PrettyPrint(List<Policy> policies)
+        {
+            if (policies is null)
+                return String.Empty;
+
+            StringBuilder sb = new StringBuilder();
+
+            foreach (Policy policy in policies)
+            {
+                if (policy is null)
+                    continue;
+
+                sb.Append(policy.ToString());
+            }
+
+            return sb.ToString();
+        }
+
+        private string PrettyPrint(List<Extension> extensions)
+        {
+            if (extensions is null)
+                return String.Empty;
+
+            StringBuilder sb = new StringBuilder();
+
+            foreach(Extension extension in extensions)
+            {
+                sb.Append(String.Format("extensionId:{0};name{1};installType:{2};",
+                            extension.ExtensionId,
+                            extension.Name,
+                            extension.InstallType
+                            ));
+            }
+
+            return sb.ToString();
+        }
+
+        #endregion

         /// <summary>
         /// Get all Chrome browser devices.


Try different paths

Try different paths

--- tools/docfixer/docfixer.mt.cs
+++ tools/docfixer/docfixer.mt.cs
@@ -15,13 +15,18 @@
 		//var versions = new[]{"4_0", "3_2", "3_1"};
 		//string format = "/Developer/Platforms/iPhoneOS.platform/Developer/Documentation/DocSets/com.apple.adc.documentation.AppleiPhone{0}.iPhoneLibrary.docset/Contents/Resources/Documents/documentation";
 		var versions = new [] { "5_0" };
-		string format = "/Library/Developer/Shared/Documentation/DocSets/com.apple.adc.documentation.AppleiOS{0}.iOSLibrary.docset/Contents/Resources/Documents/documentation";
+		var base_paths = new [] {
+			"/Library/Developer/Shared/Documentation/DocSets/com.apple.adc.documentation.AppleiOS{0}.iOSLibrary.docset/Contents/Resources/Documents/documentation",
+			"/Developer/Platforms/iPhoneOS.platform/Developer/Documentation/DocSets/com.apple.adc.documentation.AppleiOS{0}.iOSLibrary.docset/Contents/Resources/Documents/documentation",
+		};

-		foreach (var v in versions) {
-			var d = string.Format (format, v);
-			if (Directory.Exists (d)) {
-				return d;
-				break;
+		foreach (var p in base_paths){
+			foreach (var v in versions) {
+				var d = string.Format (p, v);
+				if (Directory.Exists (d)) {
+					return d;
+					break;
+				}
 			}
 		}
 		return null;


added examples for DataDriven tests with MSTest reviewer: lbroda

--- Objectivity.Test.Automation.MsTests/Tests/PerformanceTests.cs
+++ Objectivity.Test.Automation.MsTests/Tests/PerformanceTests.cs
@@ -25,6 +25,8 @@
 namespace Objectivity.Test.Automation.MsTests.Tests
 {
     using System;
+    using System.Globalization;
+
     using Microsoft.VisualStudio.TestTools.UnitTesting;

     using Objectivity.Test.Automation.Common;
@@ -69,7 +71,7 @@
         {
             var loginPage = Pages.Create<HomePage>()
                                  .OpenHomePage();
-            Assert.AreEqual(Convert.ToInt16((string)TestContext.DataRow["number"]), loginPage.CountAllTechnologiesSubLinks());
+            Assert.AreEqual(Convert.ToInt16((string)TestContext.DataRow["number"], CultureInfo.CurrentCulture), loginPage.CountAllTechnologiesSubLinks());
         }

         [DeploymentItem("Objectivity.Test.Automation.MsTests\\DDT.xml"),


Document ElementAttributeEquals

Document ElementAttributeEquals

--- SeleniumExtension/ExpectedCondition.cs
+++ SeleniumExtension/ExpectedCondition.cs
@@ -73,6 +73,13 @@
             return (driver) => { return !driver.FindElement(locator).Text.Contains(text); };
         }

+        /// <summary>
+        /// An expectation for checking that an attribute value.
+        /// </summary>
+        /// <param name="locator">The <see cref="By"/> locator of the <see cref="IWebElement"/></param>
+        /// <param name="htmlTagAttribute">The the name of the attribute</param>
+        /// <param name="attributeValue">The <see cref="string"/> value the attribute should be equal to.</param>
+        /// <returns><see langword="true"/> if the attribute value equals; otherwise, <see langword="false"/></returns>
         public static Func<IWebDriver, bool> ElementAttributeEquals(By locator, HtmlTagAttribute htmlTagAttribute, string attributeValue)
         {
             return (driver) => { return driver.FindElement(locator).GetAttribute(htmlTagAttribute) == attributeValue; };


Minor re-factoring

Minor re-factoring


minor: remove mono compiler warning

minor: remove mono compiler warning

--- OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
+++ OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
@@ -55,7 +55,7 @@
 {
     public class ScriptInstance : MarshalByRefObject, IScriptInstance
     {
-        private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
+//        private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);

         private IScriptEngine m_Engine;
         private IScriptWorkItem m_CurrentResult = null;


Fix method lookup so that it is not ambiguous.

--- SharpEssentials/Observable/Property.cs
+++ SharpEssentials/Observable/Property.cs
@@ -131,8 +131,10 @@

         private static Action<string> CreateRaiseFunction(T owner)
         {
-            var raiseMethod = owner.GetType().GetMethod(DefaultPropertyChangedRaiserName,
-                                                        BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public);
+            var raiseMethod = owner.GetType()
+                .GetMethods(BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public)
+                .Single(m => m.Name == DefaultPropertyChangedRaiserName &&
+                             m.GetParameters().Select(p => p.ParameterType).SequenceEqual(new[] { typeof(string) }));

             if (raiseMethod == null)
                 throw new ArgumentException("A property changed event raising function must be supplied.");


Fix 4 the fix

Fix 4 the fix

--- Sibelius.Web/Views/Courses/Show.cshtml
+++ Sibelius.Web/Views/Courses/Show.cshtml
@@ -41,11 +41,12 @@
         }
         else
         {
-            Semestre:  @Model.Year - @Model.Semester
+            Semestre:
+             @Model.Year - @Model.Semester

                 Este es un curso presencial, no tenemos la cantidad de materiales disponibles que nos gustaría compartir.
-                Puede hacerse una idea de los contenidos y revisar la bibliografía mientras preparamos mejores opciones.
+                Puede hacerse una idea de los contenidos y revisar la bibliografía.

         }


user protected instead of public for GetModelDefinition

--- SimpleStack.Orm/DialectProviderBase.cs
+++ SimpleStack.Orm/DialectProviderBase.cs
@@ -960,8 +960,7 @@
 		/// <param name="compositeIndex">Zero-based index of the composite.</param>
 		/// <param name="modelDef">      The model definition.</param>
 		/// <returns>The composite index name with schema.</returns>
-		protected virtual string GetCompositeIndexNameWithSchema(CompositeIndexAttribute compositeIndex,
-			ModelDefinition modelDef)
+		protected virtual string GetCompositeIndexNameWithSchema(CompositeIndexAttribute compositeIndex,ModelDefinition modelDef)
 		{
 			return compositeIndex.Name ?? GetIndexName(compositeIndex.Unique,
 				(modelDef.IsInSchema
@@ -997,7 +996,7 @@
 		/// <summary>Gets model definition.</summary>
 		/// <param name="modelType">Type of the model.</param>
 		/// <returns>The model definition.</returns>
-		public static ModelDefinition GetModelDefinition(Type modelType)
+		protected static ModelDefinition GetModelDefinition(Type modelType)
 		{
 			return modelType.GetModelDefinition();
 		}


init windows before processor ready

init windows before processor ready

--- TCC.Core/App.xaml.cs
+++ TCC.Core/App.xaml.cs
@@ -89,10 +89,6 @@

             SettingsContainer.Load();

-            //var sr = new JsonSettingsReader();
-            //sr.LoadWindowSettings();
-            //sr.LoadSettings();
-
             Process.GetCurrentProcess().PriorityClass = Settings.HighPriority
                 ? ProcessPriorityClass.High
                 : ProcessPriorityClass.Normal;
@@ -103,12 +99,12 @@
             await Session.InitAsync();

             SplashScreen.SetText("Initializing packet processor...");
+            WindowManager.Init();
             PacketAnalyzer.ProcessorReady += () =>
             {
                 BaseDispatcher.Invoke(() =>
                 {
-                    WindowManager.Init();
-                    ModuleLoader.LoadModules();
+                    ModuleLoader.LoadModules(BasePath);
                 });
                 //SplashScreen.SetText("Initializing windows...");
             };


Made CompositeDisposable thread-safe

Made CompositeDisposable thread-safe

--- SnowyImageCopy/ViewModels/ViewModel.cs
+++ SnowyImageCopy/ViewModels/ViewModel.cs
@@ -53,9 +53,9 @@

 		public CompositeDisposable Subscription
 		{
-			get { return _subscription ?? (_subscription = new CompositeDisposable()); }
+			get { return _subscription.Value; }
 		}
-		private CompositeDisposable _subscription;
+		private Lazy<CompositeDisposable> _subscription = new Lazy<CompositeDisposable>(() => new CompositeDisposable());

 		bool _disposed;

@@ -72,8 +72,8 @@

 			if (disposing)
 			{
-				if (_subscription != null)
-					_subscription.Dispose();
+				if (_subscription.IsValueCreated)
+					_subscription.Value.Dispose();
 			}

 			_disposed = true;


Intersection between and player now checked with Shadow groups

--- Some2DRPG/Some2DRPG/GameObjects/Bat.cs
+++ Some2DRPG/Some2DRPG/GameObjects/Bat.cs
@@ -59,7 +59,7 @@
                     this._attackHeight.Y += 30.0f / ATTACK_COUNTER_LIMIT;
                     this.Drawables.SetGroupProperty("Body", "Offset", _attackHeight);

-                    if (Entity.IntersectsWith(this, "Body", player, "Body", gameTime))
+                    if (Entity.IntersectsWith(this, "Shadow", player, "Shadow", gameTime))
                         player.HP -= 3;

                     if (_attackCounter++ == ATTACK_COUNTER_LIMIT)


Force upload to appharbor

Force upload to appharbor

--- Source/Adapters.Flickr/PhotoAdapter.cs
+++ Source/Adapters.Flickr/PhotoAdapter.cs
@@ -161,4 +161,4 @@

         #endregion
     }
-}+}


fix a problem with null values

fix a problem with null values

--- Code/MySql2MSSQL/SqlHelper.cs
+++ Code/MySql2MSSQL/SqlHelper.cs
@@ -35,7 +35,11 @@
                     items.Add(values[i]);
                 else
                 {
-                    items.Add(string.Format("'{0}'", values[i].Replace("'", "''")));
+                    var val = values[i];
+                    if (val == null || val == string.Empty)
+                        items.Add("NULL");
+                    else
+                        items.Add(string.Format("'{0}'", val.Replace("'", "''")));
                 }
             }
             return string.Join(",", items);


fixing functional test

fixing functional test

--- PlacesToVisit.FunctionalTests/PlacesToVisitFunctionalTests.cs
+++ PlacesToVisit.FunctionalTests/PlacesToVisitFunctionalTests.cs
@@ -8,7 +8,7 @@

 namespace PlacesToVisit.FunctionalTests
 {
-    [Ignore("App must be listening.")]
+
     [TestFixture]
     public class PlacesToVisitFunctionalTests
     {


Update Sprite.cs

Update Sprite.cs

--- VoidEngine/Sprite.cs
+++ VoidEngine/Sprite.cs
@@ -29,8 +29,9 @@

         public AnimationSet currentAnimation;
         public List<AnimationSet> animationSets = new List<AnimationSet>();
+        public Vector2 direction;

-        protected Vector2 position;
+        public Vector2 position;

         public float speed;


Remove unnecessary LINQ queries from some Security properties

These properties are used frequently and should only be updated when adding a new subscription:
- Resolution
- IsFillDataForward
- IsExtendedMarketHours

This property can also be updated by SetDataNormalizationMode:
- DataNormalizationMode

--- Common/Securities/Security.cs
+++ Common/Securities/Security.cs
@@ -1,11 +1,11 @@
 /*
  * QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
  * Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -34,12 +34,11 @@
     /// A base vehicle properties class for providing a common interface to all assets in QuantConnect.
     /// </summary>
     /// <remarks>
-    /// Security object is intended to hold properties of the specific security asset. These properties can include trade start-stop dates,
+    /// Security object is intended to hold properties of the specific security asset. These properties can include trade start-stop dates,
     /// price, market hours, resolution of the security, the holdings information for this security and the specific fill model.
     /// </remarks>
-    public class Security
+    public class Security
     {
-        private readonly Symbol _symbol;
         private LocalTimeKeeper _localTimeKeeper;
         // using concurrent bag to avoid list enumeration threading issues
         protected readonly ConcurrentBag<SubscriptionDataConfig> SubscriptionsBag;
@@ -47,25 +46,19 @@
         /// <summary>
         /// Gets all the subscriptions for this security
         /// </summary>
-        public IEnumerable<SubscriptionDataConfig> Subscriptions
-        {
-            get { return SubscriptionsBag; }
-        }
+        public IEnumerable<SubscriptionDataConfig> Subscriptions => SubscriptionsBag;

         /// <summary>
         /// <see cref="Symbol"/> for the asset.
         /// </summary>
-        public Symbol Symbol
-        {
-            get { return _symbol; }
-        }
+        public Symbol Symbol { get; }

         /// <summary>
         /// Gets the Cash object used for converting the quote currency to the account currency
         /// </summary>
         public Cash QuoteCurrency
         {
-            get; private set;
+            get;
         }

         /// <summary>
@@ -73,7 +66,7 @@
         /// </summary>
         public SymbolProperties SymbolProperties
         {
-            get; private set;
+            get;
         }

         /// <summary>
@@ -82,63 +75,39 @@
         /// <remarks>
         /// QuantConnect currently only supports Equities and Forex
         /// </remarks>
-        public SecurityType Type
-        {
-            get { return _symbol.ID.SecurityType; }
-        }
+        public SecurityType Type => Symbol.ID.SecurityType;

         /// <summary>
         /// Resolution of data requested for this security.
         /// </summary>
         /// <remarks>Tick, second or minute resolution for QuantConnect assets.</remarks>
-        public Resolution Resolution
-        {
-            get { return SubscriptionsBag.Select(x => x.Resolution).DefaultIfEmpty(Resolution.Daily).Min(); }
-        }
+        public Resolution Resolution { get; private set; }

         /// <summary>
         /// Indicates the data will use previous bars when there was no trading in this time period. This was a configurable datastream setting set in initialization.
         /// </summary>
-        public bool IsFillDataForward
-        {
-            get { return SubscriptionsBag.Any(x => x.FillDataForward); }
-        }
+        public bool IsFillDataForward { get; private set; }

         /// <summary>
         /// Indicates the security will continue feeding data after the primary market hours have closed. This was a configurable setting set in initialization.
         /// </summary>
-        public bool IsExtendedMarketHours
-        {
-            get { return SubscriptionsBag.Any(x => x.ExtendedMarketHours); }
-        }
+        public bool IsExtendedMarketHours { get; private set; }

         /// <summary>
         /// Gets the data normalization mode used for this security
         /// </summary>
-        public DataNormalizationMode DataNormalizationMode
-        {
-            get { return SubscriptionsBag.Select(x => x.DataNormalizationMode).DefaultIfEmpty(DataNormalizationMode.Adjusted).FirstOrDefault(); }
-        }
+        public DataNormalizationMode DataNormalizationMode { get; private set; }

         /// <summary>
         /// Gets the subscription configuration for this security
         /// </summary>
         [Obsolete("This property returns only the first subscription. Use the 'Subscriptions' property for all of this security's subscriptions.")]
-        public SubscriptionDataConfig SubscriptionDataConfig
-        {
-            get { return SubscriptionsBag.FirstOrDefault(); }
-        }
+        public SubscriptionDataConfig SubscriptionDataConfig => SubscriptionsBag.FirstOrDefault();

         /// <summary>
         /// There has been at least one datapoint since our algorithm started running for us to determine price.
         /// </summary>
-        public bool HasData
-        {
-            get
-            {
-                return GetLastData() != null;
-            }
-        }
+        public bool HasData => GetLastData() != null;

         /// <summary>
         /// Gets or sets whether or not this security should be considered tradable
@@ -165,7 +134,7 @@
         /// <seealso cref="ForexHolding"/>
         public SecurityHolding Holdings
         {
-            get;
+            get;
             set;
         }

@@ -207,7 +176,7 @@
             get
             {
                 // check if the FillModel/FeeModel/Slippage models are all the same reference
-                if (FillModel is ISecurityTransactionModel
+                if (FillModel is ISecurityTransactionModel
                  && ReferenceEquals(FillModel, FeeModel)
                  && ReferenceEquals(FeeModel, SlippageModel))
                 {
@@ -273,7 +242,7 @@
         /// </summary>
         public ISettlementModel SettlementModel
         {
-            get;
+            get;
             set;
         }

@@ -287,7 +256,7 @@
         }

         /// <summary>
-        /// Customizable data filter to filter outlier ticks before they are passed into user event handlers.
+        /// Customizable data filter to filter outlier ticks before they are passed into user event handlers.
         /// By default all ticks are passed into the user algorithms.
         /// </summary>
         /// <remarks>TradeBars (seconds and minute bars) are prefiltered to ensure the ticks which build the bars are realistically tradeable</remarks>
@@ -295,7 +264,7 @@
         /// <seealso cref="ForexDataFilter"/>
         public ISecurityDataFilter DataFilter
         {
-            get;
+            get;
             set;
         }

@@ -374,7 +343,6 @@
             IPriceVariationModel priceVariationModel
             )
         {
-
             if (symbolProperties == null)
             {
                 throw new ArgumentNullException("symbolProperties", "Security requires a valid SymbolProperties instance.");
@@ -385,7 +353,7 @@
                 throw new ArgumentException("symbolProperties.QuoteCurrency must match the quoteCurrency.Symbol");
             }

-            _symbol = symbol;
+            Symbol = symbol;
             SubscriptionsBag = new ConcurrentBag<SubscriptionDataConfig>();
             QuoteCurrency = quoteCurrency;
             SymbolProperties = symbolProperties;
@@ -402,6 +370,8 @@
             SettlementModel = settlementModel;
             VolatilityModel = volatilityModel;
             Holdings = new SecurityHolding(this);
+
+            UpdateSubscriptionProperties();
         }

@@ -440,33 +410,21 @@
                 )
         {
             SubscriptionsBag.Add(config);
+            UpdateSubscriptionProperties();
         }

         /// <summary>
         /// Read only property that checks if we currently own stock in the company.
         /// </summary>
-        public virtual bool HoldStock
-        {
-            get
-            {
-                //Get a boolean, true if we own this stock.
-                return Holdings.AbsoluteQuantity > 0;
-            }
-        }
+        public virtual bool HoldStock => Holdings.AbsoluteQuantity > 0;

         /// <summary>
         /// Alias for HoldStock - Do we have any of this security
         /// </summary>
-        public virtual bool Invested
-        {
-            get
-            {
-                return HoldStock;
-            }
-        }
-
-        /// <summary>
-        /// Local time for this market
+        public virtual bool Invested => HoldStock;
+
+        /// <summary>
+        /// Local time for this market
         /// </summary>
         public virtual DateTime LocalTime
         {
@@ -483,107 +441,68 @@
         /// <summary>
         /// Get the current value of the security.
         /// </summary>
-        public virtual decimal Price
-        {
-            get { return Cache.Price; }
-        }
+        public virtual decimal Price => Cache.Price;

         /// <summary>
         /// Leverage for this Security.
         /// </summary>
-        public virtual decimal Leverage
-        {
-            get
-            {
-                return Holdings.Leverage;
-            }
-        }
+        public virtual decimal Leverage => Holdings.Leverage;

         /// <summary>
         /// If this uses tradebar data, return the most recent high.
         /// </summary>
-        public virtual decimal High
-        {
-            get { return Cache.High == 0 ? Price : Cache.High; }
-        }
+        public virtual decimal High => Cache.High == 0 ? Price : Cache.High;

         /// <summary>
         /// If this uses tradebar data, return the most recent low.
         /// </summary>
-        public virtual decimal Low
-        {
-            get { return Cache.Low == 0 ? Price : Cache.Low; }
-        }
+        public virtual decimal Low => Cache.Low == 0 ? Price : Cache.Low;

         /// <summary>
         /// If this uses tradebar data, return the most recent close.
         /// </summary>
-        public virtual decimal Close
-        {
-            get { return Cache.Close == 0 ? Price : Cache.Close; }
-        }
+        public virtual decimal Close => Cache.Close == 0 ? Price : Cache.Close;

         /// <summary>
         /// If this uses tradebar data, return the most recent open.
         /// </summary>
-        public virtual decimal Open
-        {
-            get { return Cache.Open == 0 ? Price: Cache.Open; }
-        }
+        public virtual decimal Open => Cache.Open == 0 ? Price: Cache.Open;

         /// <summary>
         /// Access to the volume of the equity today
         /// </summary>
-        public virtual decimal Volume
-        {
-            get { return Cache.Volume; }
-        }
+        public virtual decimal Volume => Cache.Volume;

         /// <summary>
         /// Gets the most recent bid price if available
         /// </summary>
-        public virtual decimal BidPrice
-        {
-            get { return Cache.BidPrice == 0 ? Price : Cache.BidPrice; }
-        }
+        public virtual decimal BidPrice => Cache.BidPrice == 0 ? Price : Cache.BidPrice;

         /// <summary>
         /// Gets the most recent bid size if available
         /// </summary>
-        public virtual decimal BidSize
-        {
-            get { return Cache.BidSize; }
-        }
+        public virtual decimal BidSize => Cache.BidSize;

         /// <summary>
         /// Gets the most recent ask price if available
         /// </summary>
-        public virtual decimal AskPrice
-        {
-            get { return Cache.AskPrice == 0 ? Price : Cache.AskPrice; }
-        }
+        public virtual decimal AskPrice => Cache.AskPrice == 0 ? Price : Cache.AskPrice;

         /// <summary>
         /// Gets the most recent ask size if available
         /// </summary>
-        public virtual decimal AskSize
-        {
-            get { return Cache.AskSize; }
-        }
+        public virtual decimal AskSize => Cache.AskSize;

         /// <summary>
         /// Access to the open interest of the security today
         /// </summary>
-        public virtual long OpenInterest
-        {
-            get { return Cache.OpenInterest; }
-        }
+        public virtual long OpenInterest => Cache.OpenInterest;

         /// <summary>
         /// Get the last price update set to the security.
         /// </summary>
         /// <returns>BaseData object for this security</returns>
-        public BaseData GetLastData()
+        public BaseData GetLastData()
         {
             return Cache.GetData();
         }
@@ -609,8 +528,8 @@
         /// Update any security properties based on the latest market data and time
         /// </summary>
         /// <param name="data">New data packet from LEAN</param>
-        ///
-        public void SetMarketPrice(BaseData data)
+        ///
+        public void SetMarketPrice(BaseData data)
         {
             //Add new point to cache:
             if (data == null) return;
@@ -670,6 +589,7 @@
             {
                 subscription.DataNormalizationMode = mode;
             }
+            UpdateSubscriptionProperties();
         }

         /// <summary>
@@ -744,9 +664,10 @@
         /// <param name="subscription">The subscription configuration to add. The Symbol and ExchangeTimeZone properties must match the existing Security object</param>
         internal void AddData(SubscriptionDataConfig subscription)
         {
-            if (subscription.Symbol != _symbol) throw new ArgumentException("Symbols must match.", "subscription.Symbol");
+            if (subscription.Symbol != Symbol) throw new ArgumentException("Symbols must match.", "subscription.Symbol");
             if (!subscription.ExchangeTimeZone.Equals(Exchange.TimeZone)) throw new ArgumentException("ExchangeTimeZones must match.", "subscription.ExchangeTimeZone");
             SubscriptionsBag.Add(subscription);
+            UpdateSubscriptionProperties();
         }

         /// <summary>
@@ -757,10 +678,19 @@
         {
             foreach (var subscription in subscriptions)
             {
-                if (subscription.Symbol != _symbol) throw new ArgumentException("Symbols must match.", "subscription.Symbol");
+                if (subscription.Symbol != Symbol) throw new ArgumentException("Symbols must match.", "subscription.Symbol");
                 if (!subscription.ExchangeTimeZone.Equals(Exchange.TimeZone)) throw new ArgumentException("ExchangeTimeZones must match.", "subscription.ExchangeTimeZone");
                 SubscriptionsBag.Add(subscription);
             }
+            UpdateSubscriptionProperties();
+        }
+
+        private void UpdateSubscriptionProperties()
+        {
+            Resolution = SubscriptionsBag.Select(x => x.Resolution).DefaultIfEmpty(Resolution.Daily).Min();
+            IsFillDataForward = SubscriptionsBag.Any(x => x.FillDataForward);
+            IsExtendedMarketHours = SubscriptionsBag.Any(x => x.ExtendedMarketHours);
+            DataNormalizationMode = SubscriptionsBag.Select(x => x.DataNormalizationMode).DefaultIfEmpty(DataNormalizationMode.Adjusted).FirstOrDefault();
         }
     }
 }


FIX output message

FIX output message

--- Controllers/HomeController.cs
+++ Controllers/HomeController.cs
@@ -101,15 +101,15 @@
                         string time = "";
                         var diff = (DateTime.Now - changeset.value.FirstOrDefault().createdDate);

-                        if (diff.TotalDays >= 1)
+                        if (diff.TotalDays > 1)
                         {
                             time = $"{(int)diff.TotalDays} days";
                         }
-                        else if (diff.TotalHours >= 1)
+                        else if (diff.TotalHours > 1)
                         {
                             time = $"{(int)diff.TotalHours} hours";
                         }
-                        else if (diff.TotalMinutes >= 1)
+                        else if (diff.TotalMinutes > 1)
                         {
                             time = $"{(int)diff.TotalMinutes} minutes";
                         }


FPS counter available to game itself.

FPS counter available to game itself.

--- Corund/Engine/DebugManager.cs
+++ Corund/Engine/DebugManager.cs
@@ -23,7 +23,7 @@

         #endregion

-        #region Fields and properties
+        #region Fields

         /// <summary>
         /// Texture used to draw bounding boxes.
@@ -31,14 +31,23 @@
         private readonly Texture2D _boxTexture;

         /// <summary>
-        /// Current FPS counter.
-        /// </summary>
-        private int _fps;
-
-        /// <summary>
         /// Time elapsed since last FPS update.
         /// </summary>
         private float _fpsElapsedTime;
+
+        /// <summary>
+        /// Immediate FPS value.
+        /// </summary>
+        private int _fpsCounter;
+
+        #endregion
+
+        #region Properties
+
+        /// <summary>
+        /// Current FPS counter.
+        /// </summary>
+        public int FPS { get; private set; }

         /// <summary>
         /// Flag indicating that FPS must be calculated and written to the debug console.
@@ -54,18 +63,17 @@
         /// </summary>
         public void Update()
         {
-            if (DisplayFPS)
+            _fpsCounter++;
+            _fpsElapsedTime += GameEngine.Delta;
+
+            if (_fpsElapsedTime >= 1)
             {
-                _fps++;
-                _fpsElapsedTime += GameEngine.Delta;
+                FPS = _fpsCounter;
+                _fpsElapsedTime -= 1;
+                _fpsCounter = 0;

-                if (_fpsElapsedTime >= 1)
-                {
-                    Debug.WriteLine($"FPS: {_fps}");
-
-                    _fps = 0;
-                    _fpsElapsedTime = 0;
-                }
+                if(DisplayFPS)
+                    Debug.WriteLine($"FPS: {FPS}");
             }
         }