Offer one more accept mime type for turtle

--- RDFSharp/Model/RDFGraph.cs
+++ RDFSharp/Model/RDFGraph.cs
@@ -862,8 +862,9 @@
                     //RDF/XML
                     webRequest.Headers.Add(HttpRequestHeader.Accept, "application/rdf+xml");
                     //TURTLE
+                    webRequest.Headers.Add(HttpRequestHeader.Accept, "text/turtle");
                     webRequest.Headers.Add(HttpRequestHeader.Accept, "application/turtle");
-                    webRequest.Headers.Add(HttpRequestHeader.Accept, "text/turtle");
+                    webRequest.Headers.Add(HttpRequestHeader.Accept, "application/x-turtle");
                     //N-TRIPLES
                     webRequest.Headers.Add(HttpRequestHeader.Accept, "application/n-triples");
                     //TRIX


Reverse conditional to prep for subsequent code change

--- Source/MethodCallReturn.cs
+++ Source/MethodCallReturn.cs
@@ -164,10 +164,10 @@

 			if (callBase)
 				call.InvokeBase();
-			else if (valueDel.Method.GetParameters().Length != 0)
+			else if (valueDel.Method.GetParameters().Length == 0)
+				call.ReturnValue = valueDel.InvokePreserveStack();   //we need this, for the user to be able to use parameterless methods
+			else
 				call.ReturnValue = valueDel.InvokePreserveStack(call.Arguments); //will throw if parameters mismatch
-			else
-				call.ReturnValue = valueDel.InvokePreserveStack(); //we need this, for the user to be able to use parameterless methods

 			if (afterReturnCallback != null)
 				afterReturnCallback(call.Arguments);


Setting default value for mintty if it exists.

--- SuperPutty/dlgFindPutty.cs
+++ SuperPutty/dlgFindPutty.cs
@@ -66,6 +66,11 @@
                 if (!String.IsNullOrEmpty(frmSuperPutty.PscpExe) && File.Exists(frmSuperPutty.PscpExe))
                 {
                     textBoxPscpLocation.Text = frmSuperPutty.PscpExe;
+                }
+
+                if (!String.IsNullOrEmpty(frmSuperPutty.MinttyExe) && File.Exists(frmSuperPutty.MinttyExe))
+                {
+                    textBoxMinttyLocation.Text = frmSuperPutty.MinttyExe;
                 }
             }
             else if(!String.IsNullOrEmpty(Environment.GetEnvironmentVariable("ProgramFiles(x86)")))


add version comment

add version comment

--- Assets/RequesterScript.cs
+++ Assets/RequesterScript.cs
@@ -1,6 +1,12 @@
 using UnityEngine;
 using System.Collections;
 using UnityEngine.UI;
+
+
+/*
+ * v0.1 2015/08/31
+ *   - set and read Input Field
+ */

 public class RequesterScript : MonoBehaviour {


Fixed blink & talk

Fixed blink & talk

--- Assets/Scripts/Cooldog.cs
+++ Assets/Scripts/Cooldog.cs
@@ -264,30 +264,25 @@
 	{
 		if (!hasMouthOpen)
 		{
-			var lastEyes = CurrentSet.Eyes;
-			if (lastEyes == null || lastEyes[0].Frame == "Buggy")
+			if (CurrentSet.Eyes == null || CurrentSet.Eyes[0].Frame == "Buggy")
 			{
 				Eyes.SetAnimation(BlinkEyes);
 				yield return new WaitForSeconds(UnityEngine.Random.Range(0.075f, 0.175f));
-				Eyes.SetAnimation(lastEyes);
+				Eyes.SetAnimation(CurrentSet.Eyes ?? Costumes["Normal"].Eyes);
 			}
 		}
 	}

 	bool hasMouthOpen;
-	AnimatedSprite[] lastFace;
 	readonly AnimatedSprite[] TalkFace = new [] { new AnimatedSprite { Frame = "Talk" } };
 	public void OpenMouth()
 	{
-		lastFace = CurrentSet.Face;
 		Face.SetAnimation(TalkFace);
 		hasMouthOpen = true;
 	}
 	public void CloseMouth()
 	{
-		if (lastFace == null) return;
-		Face.SetAnimation(lastFace);
-		lastFace = null;
+		Face.SetAnimation(CurrentSet.Face ?? Costumes["Normal"].Face);
 		hasMouthOpen = false;
 	}


Stijve piemeltje deluxe

Stijve piemeltje deluxe

--- Assets/Scripts/BaseController.cs
+++ Assets/Scripts/BaseController.cs
@@ -115,7 +115,7 @@
             Dictionary<World.Resources, int> newResources = new Dictionary<World.Resources, int>();
             foreach (KeyValuePair<World.Resources, int> entry in resources)
             {
-                newResources.Add(entry.Key, Mathf.Max(resources[entry.Key] - GameController.GetValueFromRequirement(gameController.requirements[gameController.currentLevel], (int)entry.Key)));
+                newResources.Add(entry.Key, Mathf.Max(0, resources[entry.Key] - GameController.GetValueFromRequirement(gameController.requirements[gameController.currentLevel], (int)entry.Key)));
             }
             resources = newResources;


fixed z cord

fixed z cord

--- Assets/Scripts/Cards/NukeCard.cs
+++ Assets/Scripts/Cards/NukeCard.cs
@@ -14,6 +14,7 @@
         AudioSource Sound;
         SkeletonAnimation skeletonAnimation;
         MeshRenderer MR;
+        Spine.AnimationState AS;

         // Use this for initialization
         void Start() {
@@ -27,15 +28,13 @@
             Sound = GameObject.Find("ErrorSound (1)").GetComponent<AudioSource>();
             skeletonAnimation = An_Nuke.GetComponent<SkeletonAnimation>();
             MR = skeletonAnimation.GetComponent<MeshRenderer>();
+            AS = skeletonAnimation.state;

+            An_Nuke.transform.position = new Vector3(0, 0, -3);
             MR.enabled = true;
-            print("Animation sichtbar");
             skeletonAnimation.AnimationState.SetAnimation(0, "neuer versuch", false);
-            print("animation set");
             Sound.Play();
-            print("sound");
-
-
+
             while (F.GetComponent<Field>().cardsOnField.Count != 0) {
                 GameObject RemoveCard = F.GetComponent<Field>().cardsOnField[0];
                 F.GetComponent<GameManager>().RemoveCard(RemoveCard);
@@ -43,16 +42,7 @@

             F.GetComponent<GameManager>().GenerateFieldCard(CardID.Startpoint, 0, 0);
             F.GetComponent<GameManager>().RenewIndicators();
-
-        }
-
-
-        // Update is called once per frame
-        void Update() {
-
-            Spine.AnimationState AS = skeletonAnimation.state;
-
-
+
             AS.Complete += delegate {
                 print("animation end");
                 MR.enabled = false;
@@ -62,6 +52,12 @@
             };
         }

+
+        // Update is called once per frame
+        void Update() {
+
+        }
+

     }


Improve message when no automation accounts are available.

--- AzureBot/Dialogs/ActionDialog.cs
+++ AzureBot/Dialogs/ActionDialog.cs
@@ -223,7 +223,7 @@
             }
             else
             {
-                await context.PostAsync($"No automations accounts were found in the current subscription.");
+                await context.PostAsync($"No automations accounts were found in the current subscription. Please create an Azure Automation account or switch to a subscription which has an Automation account in it.");
                 context.Wait(this.MessageReceived);
             }
         }


Bug fix: reset tablet move direction on ResetTablets

--- Assets/Scripts/Tablet.cs
+++ Assets/Scripts/Tablet.cs
@@ -10,7 +10,8 @@

     public Transform TabletCellContainer;

-    public Mover.Direction MovementDirection;
+    [HideInInspector]
+    public Mover.Direction MovementDirection = Mover.Direction.UP;

 	private TabletCell TopLeft;
 	private TabletCell TopRight;
@@ -49,6 +50,8 @@
     }

     private void Reset() {
+        MovementDirection = Mover.Direction.UP;
+
         gridVertexX = startGridVertexX;
         gridVertexY = startGridVertexY;
         transform.position = FindObjectOfType<MachineGrid>().getVertexWorldPosition(gridVertexX, gridVertexY);


added the other 2 velocities. The thing's entirely usable now, but godawfully inaccurate. ± 10m/s at LKO, and I'm afraid to find out how inaccurate it'll be at the Mun.

--- CactIFMS/CactIFMS/ifms.cs
+++ CactIFMS/CactIFMS/ifms.cs
@@ -56,21 +56,24 @@
 		void DrawWindow(int winid)
 		{
 			GUILayout.BeginVertical();
-			GUILayout.Label("KSC pos: " + stringifyVec(kscpos));
+
+			GUILayout.Label("KSC pos: " + stringifyVec(kscpos) + "\n --");
+
 			GUILayout.Label("Vessel pos (CoM): " + stringifyVec(vescom));
 			GUILayout.Label("rel.ves.pos (CoM): " + stringifyVec(vescom-kscpos));
 			GUILayout.Label("rel.ves.dst (CoM): " + (vescom-kscpos).magnitude.ToString("0.00"));
-			GUILayout.Label("rel.ves.vel (CoM): " + v1.ToString("0.00"));
-			/*
+			GUILayout.Label("rel.ves.vel (CoM): " + v1.ToString("0.00") + "\n --");
+
 			GUILayout.Label("Vessel pos (GWP): " + stringifyVec(vesfgwp));
 			GUILayout.Label("rel.ves.pos (GWP): " + stringifyVec(vesfgwp-kscpos));
 			GUILayout.Label("rel.ves.dst (GWP): " + (vesfgwp-kscpos).magnitude.ToString("0.00"));
-			GUILayout.Label("rel.ves.dst (GWP): " + vel2.update((vesfgwp-kscpos).magnitude, TimeWarp.fixedDeltaTime).ToString("0.00"));
+			GUILayout.Label("rel.ves.vel (GWP): " + v2.ToString("0.00") + "\n --");
+
 			GUILayout.Label("Vessel pos (transform): " + stringifyVec(vestrans));
 			GUILayout.Label("rel.ves.pos (transform): " + stringifyVec(vestrans-kscpos));
 			GUILayout.Label("rel.ves.dst (transform): " + (vestrans-kscpos).magnitude.ToString("0.00"));
-			GUILayout.Label("rel.ves.dst (transform): " + vel3.update((vestrans-kscpos).magnitude, TimeWarp.fixedDeltaTime).ToString("0.00"));
-			*/
+			GUILayout.Label("rel.ves.vel (transform): " + v3.ToString("0.00") + "\n --");
+
 			GUILayout.EndVertical();

 			GUI.DragWindow(); // make window draggable
@@ -114,6 +117,8 @@
 			vestrans = FlightGlobals.ActiveVessel.transform.position;
 			kscpos = GameObject.Find("KSC").transform.position;
 			v1 = vel1.update ((vescom - kscpos).magnitude, TimeWarp.fixedDeltaTime);
+			v2 = vel2.update ((vesfgwp - kscpos).magnitude, TimeWarp.fixedDeltaTime);
+			v3 = vel3.update ((vestrans - kscpos).magnitude, TimeWarp.fixedDeltaTime);
 			//TimeWarp.fixedDeltaTime
 		}
 		/*


Fixed the performance issue of HtmlReporter

--- Bddify/Reporters/HtmlReporter.cs
+++ Bddify/Reporters/HtmlReporter.cs
@@ -18,17 +18,19 @@

         static HtmlReporter()
         {
-            //var report = Razor.Parse(HtmlTemplate.Value, Scenarios);
-            //File.WriteAllText(FileName, report);
+            AppDomain.CurrentDomain.DomainUnload += CurrentDomain_DomainUnload;
+        }
+
+        static void CurrentDomain_DomainUnload(object sender, EventArgs e)
+        {
+            // run this only once when the appdomain is unloading, that is when the last test is run
+            var report = Razor.Parse(HtmlTemplate.Value, Scenarios);
+            File.WriteAllText(FileName, report);
         }

         public void Process(Scenario scenario)
         {
-            // ToDo: this is a dirty hack because I am creating the file each and every time.
-            // should create the file once and dynamically edit it for consequent calls
             Scenarios.Add(scenario);
-            var report = Razor.Parse(HtmlTemplate.Value, Scenarios);
-            File.WriteAllText(FileName, report);
         }

         static readonly Lazy<string> HtmlTemplate = new Lazy<string>(GetHtmlTemplate);


Error fixed

Error fixed

--- BinaryMask/BinaryMask.cs
+++ BinaryMask/BinaryMask.cs
@@ -69,7 +69,7 @@
             for (int i = 0; i < srcLength; i++)
             {
                 int srcIndex = srcStartIndex + i;
-                int dstIndex = i / 16;
+                int dstIndex = dstStartIndex + i / 16;
                 int dstBitIndex = i % 16;

                 ushort dstBitMask = (ushort)(1 << dstBitIndex);


Update memory offset for Shadows of the Innocents (2016/07/20) patch.

--- BnS_ACT_Plugin/BNS_ACT_Plugin.cs
+++ BnS_ACT_Plugin/BNS_ACT_Plugin.cs
@@ -335,7 +335,7 @@
             }
         }

-        private const Int32 chatlogOffset = 0x00DD747C;
+        private const Int32 chatlogOffset = 0x00DD94AC;

         private static void Scan()
         {


Working on tests

Working on tests

--- RazorEngineCms.Tests/Mocks/MockDAL.cs
+++ RazorEngineCms.Tests/Mocks/MockDAL.cs
@@ -15,16 +15,16 @@
         public MockDAL()
         {
             this._SetupApplicationContext();
-
         }

         /// <summary>
-        /// Sets up mock Application Context
+        /// Sets up mock Application Context with a mock Page List object containing 5 pages and
+        /// a mock Include List object containg 5 includes
         /// </summary>
         private void _SetupApplicationContext()
         {
             // setup mock db.Page
-            IQueryable<Page> mockPagesQueryable = this._GetPages();
+            IQueryable<Page> mockPagesQueryable = this._GetPages(5);
             Mock<IDbSet<Page>> mockPageDbSet = new Mock<IDbSet<Page>>();
             mockPageDbSet.Setup(dbSet => dbSet.Provider).Returns(mockPagesQueryable.Provider);
             mockPageDbSet.Setup(dbSet => dbSet.Expression).Returns(mockPagesQueryable.Expression);
@@ -32,7 +32,7 @@
             mockPageDbSet.Setup(dbSet => dbSet.GetEnumerator()).Returns(mockPagesQueryable.GetEnumerator());

             // setup mock db.Include
-            IQueryable<Include> mockIncludesQueryable = this._GetIncludes();
+            IQueryable<Include> mockIncludesQueryable = this._GetIncludes(5);
             Mock<IDbSet<Include>> mockIncludeDbSet = new Mock<IDbSet<Include>>();
             mockIncludeDbSet.Setup(dbSet => dbSet.Provider).Returns(mockIncludesQueryable.Provider);
             mockIncludeDbSet.Setup(dbSet => dbSet.Expression).Returns(mockIncludesQueryable.Expression);
@@ -49,10 +49,10 @@
         /// Returns a list of mock Page objects
         /// </summary>
         /// <returns></returns>
-        private IQueryable<Page> _GetPages()
+        private IQueryable<Page> _GetPages(int numberOfPages)
         {
             List<Page> mockPages = new List<Page>();
-            for (var i = 1; i < 6; i++)
+            for (var i = 1; i < numberOfPages + 1; i++)
             {
                 mockPages.Add(new Page
                 {
@@ -83,10 +83,10 @@
             return mockPages.AsQueryable();
         }

-        private IQueryable<Include> _GetIncludes()
+        private IQueryable<Include> _GetIncludes(int numberOfIncludes)
         {
             List<Include> includes = new List<Include>();
-            for(var i = 1; i < 6; i++)
+            for(var i = 1; i < numberOfIncludes + 1; i++)
             {
                 includes.Add(new Include
                 {


--- CSharp/String/NeedleInHaystck.cs
+++ CSharp/String/NeedleInHaystck.cs
@@ -10,7 +10,7 @@
 			"END OF FILE",
 			};
 		var status = " 18:46:24:97    INQUIRY REQUEST                                                 ";
-		if (warnings.Any(warning => (status.Trim()).Contains(warning))) WriteLine("achou");
+		if (warnings.Any(warning => status.Contains(warning))) WriteLine("achou");
 		else WriteLine("não achou");
 	}
 }


fixed keyspace change on existing connections

--- CassandraSharp/Cluster.cs
+++ CassandraSharp/Cluster.cs
@@ -18,6 +18,7 @@
     using System.Threading;
     using Apache.Cassandra;
     using CassandraSharp.EndpointStrategy;
+    using CassandraSharp.MadeSimple;
     using CassandraSharp.Utils;
     using Thrift.Transport;

@@ -122,19 +123,17 @@
         public IConnection AcquireConnection(byte[] key)
         {
             IConnection connection;
-            if (_pool.Acquire(out connection))
-            {
-                return connection;
-            }
-
-            Endpoint endpoint = _endpointsManager.Pick(key);
-            if (null == endpoint)
-            {
-                throw new ArgumentException("Can't find any valid endpoint");
-            }
-
-            Cassandra.Client client = _transportFactory.Create(endpoint.Address);
-            connection = new Connection(client, endpoint);
+            if (!_pool.Acquire(out connection))
+            {
+                Endpoint endpoint = _endpointsManager.Pick(key);
+                if (null == endpoint)
+                {
+                    throw new ArgumentException("Can't find any valid endpoint");
+                }
+
+                Cassandra.Client client = _transportFactory.Create(endpoint.Address);
+                connection = new Connection(client, endpoint);
+            }

             ChangeKeyspace(connection);

@@ -171,6 +170,11 @@
             {
                 connection.CassandraClient.set_keyspace(BehaviorConfig.KeySpace);
                 connection.KeySpace = BehaviorConfig.KeySpace;
+
+                // UNDONE: CQL3 seems to be badly broken - USE does not work actually
+                //string useKeyspace = string.Format("use {0}", connection.KeySpace);
+                //byte[] bufUseKeyspace = new Utf8NameOrValue(useKeyspace).ToByteArray();
+                //connection.CassandraClient.execute_cql_query(bufUseKeyspace, Compression.NONE);
             }
         }


White-space fix

White-space fix

--- Ceen.Httpd/HttpRequest.cs
+++ Ceen.Httpd/HttpRequest.cs
@@ -342,7 +342,7 @@

                 if (trail[0] != '-' || trail[1] != '-')
-                    throw new HttpException(HttpStatusCode.BadRequest);
+                     throw new HttpException(HttpStatusCode.BadRequest);

                 await reader.RepeatReadAsync(trail, 0, 2, idletime, timeouttask, stoptask);
                 if (trail[0] != '\r' || trail[1] != '\n')


Recompute entries count

Recompute entries count

--- CentralDirectoryFooter.cs
+++ CentralDirectoryFooter.cs
@@ -55,10 +55,12 @@
 			writer.Write(Signature);
 			writer.Write(DiskNumber);
 			writer.Write(CentralDirectoryDiskNumber);
+
+			//At this time, everything is written
+			DiskEntries = TotalDiskEntries = (ushort) archive.Entries.Count;
 			writer.Write(DiskEntries);
 			writer.Write(TotalDiskEntries);

-			//At this time, everything is written
 			var firstEntry = archive.Entries.FirstOrDefault();
 			CentralDirectoryOffset = (uint) (firstEntry?.CentralDirectoryHeader.Offset ?? 0);
 			CentralDirectorySize = (uint) archive.Entries.Sum(entry => entry.CentralDirectoryHeader.GetSize());


Refactor audio recorder tests so that they don't use obsolete method

--- SIL.Media.Tests/AudioRecorderTests.cs
+++ SIL.Media.Tests/AudioRecorderTests.cs
@@ -17,7 +17,7 @@
 		[Test]
 		public void Construct_FileDoesNotExist_OK()
 		{
-			var x = AudioFactory.AudioSession(Path.GetRandomFileName());
+			var x = AudioFactory.CreateAudioSession(Path.GetRandomFileName());
 		}

 		[Test]
@@ -25,7 +25,7 @@
 		{
 			using (var f = new TempFile())
 			{
-				var x = AudioFactory.AudioSession(f.Path);
+				var x = AudioFactory.CreateAudioSession(f.Path);
 			}
 		}

@@ -34,14 +34,14 @@
 		public void Construct_FileDoesNotExist_DoesNotCreateFile()
 		{
 			var path = Path.GetRandomFileName();
-			var x = AudioFactory.AudioSession(path);
+			var x = AudioFactory.CreateAudioSession(path);
 			Assert.IsFalse(File.Exists(path));
 		}

 		[Test]
 		public void StopRecording_NotRecording_Throws()
 		{
-			var x = AudioFactory.AudioSession(Path.GetRandomFileName());
+			var x = AudioFactory.CreateAudioSession(Path.GetRandomFileName());
 			Assert.Throws<ApplicationException>(() => x.StopRecordingAndSaveAsWav());
 		}

@@ -79,14 +79,14 @@
 		[Test]
 		public void CanRecord_FileDoesNotExist_True()
 		{
-			var x = AudioFactory.AudioSession(Path.GetRandomFileName());
+			var x = AudioFactory.CreateAudioSession(Path.GetRandomFileName());
 			Assert.IsTrue(x.CanRecord);
 		}

 		[Test]
 		public void CanStop_NonExistantFile_False()
 		{
-			var x = AudioFactory.AudioSession(Path.GetRandomFileName());
+			var x = AudioFactory.CreateAudioSession(Path.GetRandomFileName());
 			Assert.IsFalse(x.CanStop);
 		}

@@ -95,18 +95,18 @@
 		{
 			using (var f = new TempFile())
 			{
-				var x = AudioFactory.AudioSession(f.Path);
+				var x = AudioFactory.CreateAudioSession(f.Path);
 				Assert.IsTrue(x.CanRecord);
 			}
 		}

 		[Test]
-		[Platform(Include="Linux", Reason="IrrKlang doesn't throw, so we don't really know")]
+		[Platform(Exclude ="Windows", Reason="IrrKlang doesn't throw, so we don't really know")]
 		public void Play_FileEmpty_Throws()
 		{
 			using (var f = new TempFile())
 			{
-				var x = AudioFactory.AudioSession(f.Path);
+				var x = AudioFactory.CreateAudioSession(f.Path);
 				Assert.Throws<Exception>(() => x.Play());
 			}
 		}
@@ -114,7 +114,7 @@
 		[Test]
 		public void Play_FileDoesNotExist_Throws()
 		{
-			var x = AudioFactory.AudioSession(Path.GetRandomFileName());
+			var x = AudioFactory.CreateAudioSession(Path.GetRandomFileName());
 			Assert.Throws<FileNotFoundException>(() => x.Play());
 		}

@@ -140,7 +140,7 @@
 				var oldLength = oldInfo.Length;
 				Assert.AreEqual(0, oldLength);
 				var oldTimestamp = oldInfo.LastWriteTimeUtc;
-				var x = AudioFactory.AudioSession(f.Path);
+				var x = AudioFactory.CreateAudioSession(f.Path);
 				x.StartRecording();
 				Thread.Sleep(1000);
 				x.StopRecordingAndSaveAsWav();
@@ -155,7 +155,7 @@
 		{
 			using (var f = new TempFile())
 			{
-				var x = AudioFactory.AudioSession(f.Path);
+				var x = AudioFactory.CreateAudioSession(f.Path);
 				x.StartRecording();
 				Thread.Sleep(100);
 				Assert.IsTrue(x.IsRecording);
@@ -171,7 +171,7 @@
 				var w = new BackgroundWorker();
 				w.DoWork+=new DoWorkEventHandler((o,args)=> SystemSounds.Exclamation.Play());

-				var x = AudioFactory.AudioSession(f.Path);
+				var x = AudioFactory.CreateAudioSession(f.Path);
 				x.StartRecording();
 				w.RunWorkerAsync();
 				Thread.Sleep(1000);
@@ -194,13 +194,13 @@
 					var w = new BackgroundWorker();
 					w.DoWork += new DoWorkEventHandler((o, args) => SystemSounds.Exclamation.Play());

-					var x = AudioFactory.AudioSession(f.Path);
+					var x = AudioFactory.CreateAudioSession(f.Path);
 					x.StartRecording();
 					w.RunWorkerAsync();
 					Thread.Sleep(1000);
 					x.StopRecordingAndSaveAsWav();

-					var y = AudioFactory.AudioSession(f.Path);
+					var y = AudioFactory.CreateAudioSession(f.Path);
 					y.Play();
 					Thread.Sleep(1000);
 					y.StopPlaying();
@@ -220,7 +220,7 @@
 			public RecordingSession()
 			{
 				_tempFile = new TempFile();
-				_recorder = AudioFactory.AudioSession(_tempFile.Path);
+				_recorder = AudioFactory.CreateAudioSession(_tempFile.Path);
 				_recorder.StartRecording();
 				Thread.Sleep(100);
 			}
@@ -344,7 +344,7 @@

 		private ISimpleAudioSession RecordSomething(TempFile f)
 		{
-			var x = AudioFactory.AudioSession(f.Path);
+			var x = AudioFactory.CreateAudioSession(f.Path);
 			x.StartRecording();
 			Thread.Sleep(100);
 			x.StopRecordingAndSaveAsWav();


Removed code left dangling from some refactoring.

--- SalesforceSample.iOS/AccountObject.cs
+++ SalesforceSample.iOS/AccountObject.cs
@@ -9,7 +9,6 @@
 	{
 		public AccountObject()
 		{
-			this.FieldsWithNullValues = new System.Collections.Hashtable ();
 			this.PreparingUpdateRequest += PrepareForUpdate;
 		}


Global Build from CK-Env.

Global Build from CK-Env.

--- CodeCakeBuilder/Build.cs
+++ CodeCakeBuilder/Build.cs
@@ -52,10 +52,11 @@
             // We do not publish .Tests projects for this solution.
             var projectsToPublish = projects.Where( p => !p.Path.Segments.Contains( "Tests" ) );

+            // The SimpleRepositoryInfo should be computed once and only once.
             SimpleRepositoryInfo gitInfo = Cake.GetSimpleRepositoryInfo();
-
-            // Configuration is either "Debug" or "Release".
-            string configuration = "Debug";
+            // This default global info will be replaced by Check-Repository task.
+            // It is allocated here to ease debugging and/or manual work on complex build script.
+            CheckRepositoryInfo globalInfo = new CheckRepositoryInfo { Version = gitInfo.SafeNuGetVersion };

             Setup( context =>
             {
@@ -80,7 +81,11 @@
             Task( "Check-Repository" )
                 .Does( () =>
                 {
-                    configuration = StandardCheckRepository( projectsToPublish, gitInfo );
+                    globalInfo = StandardCheckRepository( projectsToPublish, gitInfo );
+                    if( globalInfo.ShouldStop )
+                    {
+                        Cake.TerminateWithSuccess( "All packages from this commit are already available. Build skipped." );
+                    }
                 } );

             Task( "Clean" )
@@ -142,7 +147,7 @@
                 .IsDependentOn( "AutoTests" )
                 .Does( () =>
                 {
-                    StandardSolutionBuild( solutionFileName, gitInfo, configuration );
+                    StandardSolutionBuild( solutionFileName, gitInfo, globalInfo.BuildConfiguration );
                 } );

             Task( "Create-NuGet-Packages" )
@@ -150,7 +155,7 @@
                 .IsDependentOn( "Build" )
                 .Does( () =>
                 {
-                    StandardCreateNuGetPackages( releasesDir, projectsToPublish, gitInfo, configuration );
+                    StandardCreateNuGetPackages( releasesDir, projectsToPublish, gitInfo, globalInfo.BuildConfiguration );
                 } );

             Task( "Push-NuGet-Packages" )
@@ -158,7 +163,7 @@
                 .WithCriteria( () => gitInfo.IsValid )
                .Does( () =>
                 {
-                    StandardPushNuGetPackages( Cake.GetFiles( releasesDir.Path + "/*.nupkg" ), gitInfo );
+                    StandardPushNuGetPackages( globalInfo, releasesDir );
                 } );

             Task( "Default" ).IsDependentOn( "Push-NuGet-Packages" );


Move code out of JsonPrettyPrinter into SettingWriter directly.

--- Sandra.UI.WF/Storage/SettingWriter.cs
+++ Sandra.UI.WF/Storage/SettingWriter.cs
@@ -33,121 +33,100 @@
     /// </summary>
     internal class SettingWriter : PValueVisitor
     {
-        private class JsonPrettyPrinter : JsonTextWriter
-        {
-            private const int maxLineLength = 80;
-
-            private static IEnumerable<string> GetCommentLines(string commentText, int indent)
-            {
-                List<string> lines = new List<string>();
-                if (commentText == null) return lines;
-
-                // Cut up the description in pieces.
-                // Available length depends on the current indent level.
-                int availableLength = maxLineLength - indent - JsonComment.SingleLineCommentStart.Length;
-                int totalLength = commentText.Length;
-                int remainingLength = totalLength;
-                int currentPos = 0;
-
-                // Use a StringBuilder for substring generation.
-                StringBuilder text = new StringBuilder(commentText);
-
-                // Set currentPos to first non-whitespace character.
+        private const int maxLineLength = 80;
+
+        private static IEnumerable<string> GetCommentLines(string commentText, int indent)
+        {
+            List<string> lines = new List<string>();
+            if (commentText == null) return lines;
+
+            // Cut up the description in pieces.
+            // Available length depends on the current indent level.
+            int availableLength = maxLineLength - indent - JsonComment.SingleLineCommentStart.Length;
+            int totalLength = commentText.Length;
+            int remainingLength = totalLength;
+            int currentPos = 0;
+
+            // Use a StringBuilder for substring generation.
+            StringBuilder text = new StringBuilder(commentText);
+
+            // Set currentPos to first non-whitespace character.
+            while (currentPos < totalLength && char.IsWhiteSpace(text[currentPos]))
+            {
+                currentPos++;
+                remainingLength--;
+            }
+
+            // Invariants:
+            // 1) currentPos is between 0 and totalLength.
+            // 2) currentPos is at a non-whitespace character, or equal to totalLength.
+            // 3) currentPos + remainingLength == totalLength.
+            while (remainingLength > availableLength)
+            {
+                // Search for the first whitespace character before the maximum break position.
+                int breakPos = currentPos + availableLength;
+                while (breakPos > currentPos && !char.IsWhiteSpace(text[breakPos])) breakPos--;
+
+                if (breakPos == currentPos)
+                {
+                    // Word longer than availableLength, just snip it up midway.
+                    breakPos = currentPos + availableLength;
+                }
+                else
+                {
+                    // Find last non-whitespace character before the found whitespace.
+                    while (breakPos > currentPos && char.IsWhiteSpace(text[breakPos])) breakPos--;
+                    // Increase by 1 again to end up on the first whitespace character after the last word.
+                    breakPos++;
+                }
+
+                // Add line which neither starts nor ends with a whitespace character.
+                lines.Add(text.ToString(currentPos, breakPos - currentPos));
+                currentPos = breakPos;
+                remainingLength = totalLength - currentPos;
+
+                // Set currentPos to first non-whitespace character again.
                 while (currentPos < totalLength && char.IsWhiteSpace(text[currentPos]))
                 {
                     currentPos++;
                     remainingLength--;
                 }
-
-                // Invariants:
-                // 1) currentPos is between 0 and totalLength.
-                // 2) currentPos is at a non-whitespace character, or equal to totalLength.
-                // 3) currentPos + remainingLength == totalLength.
-                while (remainingLength > availableLength)
-                {
-                    // Search for the first whitespace character before the maximum break position.
-                    int breakPos = currentPos + availableLength;
-                    while (breakPos > currentPos && !char.IsWhiteSpace(text[breakPos])) breakPos--;
-
-                    if (breakPos == currentPos)
-                    {
-                        // Word longer than availableLength, just snip it up midway.
-                        breakPos = currentPos + availableLength;
-                    }
-                    else
-                    {
-                        // Find last non-whitespace character before the found whitespace.
-                        while (breakPos > currentPos && char.IsWhiteSpace(text[breakPos])) breakPos--;
-                        // Increase by 1 again to end up on the first whitespace character after the last word.
-                        breakPos++;
-                    }
-
-                    // Add line which neither starts nor ends with a whitespace character.
-                    lines.Add(text.ToString(currentPos, breakPos - currentPos));
-                    currentPos = breakPos;
-                    remainingLength = totalLength - currentPos;
-
-                    // Set currentPos to first non-whitespace character again.
-                    while (currentPos < totalLength && char.IsWhiteSpace(text[currentPos]))
-                    {
-                        currentPos++;
-                        remainingLength--;
-                    }
-                }
-
-                if (remainingLength > 0)
-                {
-                    lines.Add(text.ToString(currentPos, remainingLength));
-                }
-
-                return lines;
-            }
-
-            private static List<string> GetCommentLines(SettingComment comment, int indent)
-            {
-                List<string> lines = new List<string>();
-                if (comment != null)
-                {
-                    bool first = true;
-                    foreach (var paragraph in comment.Paragraphs)
-                    {
-                        if (!first) lines.Add(string.Empty);
-                        first = false;
-
-                        // Add one extra indent because of the space between '//' and the text.
-                        lines.AddRange(GetCommentLines(paragraph, indent + 1));
-                    }
-                }
-                return lines;
-            }
-
-            private readonly SettingSchema schema;
-            private readonly string newLine;
-            private readonly bool commentOutProperties;
-
-            private bool commentOutNextToken;
-            private bool suppressNextValueDelimiter;
-
-            public JsonPrettyPrinter(TextWriter writer, SettingSchema schema, bool commentOutProperties) : base(writer)
-            {
-                this.schema = schema;
-                this.commentOutProperties = commentOutProperties;
-
-                newLine = writer.NewLine;
+            }
+
+            if (remainingLength > 0)
+            {
+                lines.Add(text.ToString(currentPos, remainingLength));
+            }
+
+            return lines;
+        }
+
+        private static List<string> GetCommentLines(SettingComment comment, int indent)
+        {
+            List<string> lines = new List<string>();
+            if (comment != null)
+            {
+                bool first = true;
+                foreach (var paragraph in comment.Paragraphs)
+                {
+                    if (!first) lines.Add(string.Empty);
+                    first = false;
+
+                    // Add one extra indent because of the space between '//' and the text.
+                    lines.AddRange(GetCommentLines(paragraph, indent + 1));
+                }
+            }
+            return lines;
+        }
+
+        private class JsonPrettyPrinter : JsonTextWriter
+        {
+            internal bool commentOutNextToken;
+            internal bool suppressNextValueDelimiter;
+
+            public JsonPrettyPrinter(TextWriter writer) : base(writer)
+            {
                 Formatting = Formatting.Indented;
-
-                // Write schema description, if any.
-                foreach (string commentLine in GetCommentLines(schema.Description, 0))
-                {
-                    // The base WriteComment wraps comments in /*-*/ delimiters,
-                    // so generate raw comments starting with // instead.
-                    WriteRaw(JsonComment.SingleLineCommentStart);
-                    WriteRaw(" ");
-                    WriteRaw(commentLine);
-
-                    // Do this at the end to generate a line-break.
-                    WriteIndent();
-                }
             }

             protected override void WriteValueDelimiter()
@@ -156,44 +135,6 @@
                 else base.WriteValueDelimiter();
             }

-            public void WriteSettingPropertyName(string name, bool isFirst)
-            {
-                SettingProperty property;
-                if (schema.TryGetProperty(new SettingKey(name), out property))
-                {
-                    var commentLines = GetCommentLines(property.Description, Top * Indentation);
-
-                    // Only do the custom formatting when there are comments to write.
-                    if (commentLines.Any())
-                    {
-                        // Prepare by doing a manual auto-completion of a previous value.
-                        if (!isFirst)
-                        {
-                            // Write the value delimiter here already, and suppress it the next time it's called.
-                            // This happens in WritePropertyName().
-                            WriteValueDelimiter();
-                            suppressNextValueDelimiter = true;
-                            WriteWhitespace(newLine);
-                        }
-
-                        foreach (string commentLine in commentLines)
-                        {
-                            WriteIndent();
-                            // The base WriteComment wraps comments in /*-*/ delimiters,
-                            // so generate raw comments starting with // instead.
-                            WriteRaw(JsonComment.SingleLineCommentStart);
-                            WriteRaw(" ");
-                            WriteRaw(commentLine);
-                        }
-                    }
-                }
-
-                // This assumes that all default setting values fit on one line.
-                commentOutNextToken = commentOutProperties;
-                WritePropertyName(name);
-                commentOutNextToken = false;
-            }
-
             protected override void WriteIndent()
             {
                 base.WriteIndent();
@@ -204,16 +145,18 @@
                 }
             }

-            public override void Close()
-            {
-                // End files with a newline character.
-                WriteWhitespace(newLine);
-                base.Close();
-            }
-        }
-
+            public int CurrentDepth => Top;
+
+            public void _WriteIndent() => WriteIndent();
+            public void _WriteValueDelimiter() => WriteValueDelimiter();
+        }
+
+        private readonly SettingSchema schema;
         private readonly StringBuilder outputBuilder;
         private readonly JsonPrettyPrinter jsonTextWriter;
+
+        private readonly string newLine;
+        private readonly bool commentOutProperties;

         public SettingWriter(SettingSchema schema, bool commentOutProperties)
         {
@@ -221,7 +164,61 @@
             var stringWriter = new StringWriter(outputBuilder);
             stringWriter.NewLine = Environment.NewLine;

-            jsonTextWriter = new JsonPrettyPrinter(stringWriter, schema, commentOutProperties);
+            this.schema = schema;
+            this.commentOutProperties = commentOutProperties;
+            newLine = stringWriter.NewLine;
+            jsonTextWriter = new JsonPrettyPrinter(stringWriter);
+
+            // Write schema description, if any.
+            foreach (string commentLine in GetCommentLines(schema.Description, 0))
+            {
+                // The base WriteComment wraps comments in /*-*/ delimiters,
+                // so generate raw comments starting with // instead.
+                jsonTextWriter.WriteRaw(JsonComment.SingleLineCommentStart);
+                jsonTextWriter.WriteRaw(" ");
+                jsonTextWriter.WriteRaw(commentLine);
+
+                // Do this at the end to generate a line-break.
+                jsonTextWriter._WriteIndent();
+            }
+        }
+
+        public void WriteSettingPropertyName(string name, bool isFirst)
+        {
+            SettingProperty property;
+            if (schema.TryGetProperty(new SettingKey(name), out property))
+            {
+                var commentLines = GetCommentLines(property.Description, jsonTextWriter.CurrentDepth * jsonTextWriter.Indentation);
+
+                // Only do the custom formatting when there are comments to write.
+                if (commentLines.Any())
+                {
+                    // Prepare by doing a manual auto-completion of a previous value.
+                    if (!isFirst)
+                    {
+                        // Write the value delimiter here already, and suppress it the next time it's called.
+                        // This happens in WritePropertyName().
+                        jsonTextWriter._WriteValueDelimiter();
+                        jsonTextWriter.suppressNextValueDelimiter = true;
+                        jsonTextWriter.WriteWhitespace(newLine);
+                    }
+
+                    foreach (string commentLine in commentLines)
+                    {
+                        jsonTextWriter._WriteIndent();
+                        // The base WriteComment wraps comments in /*-*/ delimiters,
+                        // so generate raw comments starting with // instead.
+                        jsonTextWriter.WriteRaw(JsonComment.SingleLineCommentStart);
+                        jsonTextWriter.WriteRaw(" ");
+                        jsonTextWriter.WriteRaw(commentLine);
+                    }
+                }
+            }
+
+            // This assumes that all default setting values fit on one line.
+            jsonTextWriter.commentOutNextToken = commentOutProperties;
+            jsonTextWriter.WritePropertyName(name);
+            jsonTextWriter.commentOutNextToken = false;
         }

         public override void VisitBoolean(PBoolean value)
@@ -247,7 +244,7 @@
             bool first = true;
             foreach (var kv in value)
             {
-                jsonTextWriter.WriteSettingPropertyName(kv.Key, first);
+                WriteSettingPropertyName(kv.Key, first);
                 first = false;
                 Visit(kv.Value);
             }
@@ -267,6 +264,8 @@
         /// </returns>
         public string Output()
         {
+            // End files with a newline character.
+            jsonTextWriter.WriteWhitespace(newLine);
             jsonTextWriter.Close();
             return outputBuilder.ToString();
         }


Rather than calling TrySaveToFile() directly, use the ActionHandler to perform the save action.

--- Sandra.UI/AppTemplate/SettingsForm.cs
+++ Sandra.UI/AppTemplate/SettingsForm.cs
@@ -376,7 +376,7 @@
                     case DialogResult.Yes:
                         try
                         {
-                            jsonTextBox.TrySaveToFile(true);
+                            ActionHandler.TryPerformAction(SharedUIAction.SaveToFile.Action, true);
                         }
                         catch (Exception exception)
                         {


Allow pointers to be direct to the memory address

--- Project-Aurora/Project-Aurora/Utils/MemoryReader.cs
+++ Project-Aurora/Project-Aurora/Utils/MemoryReader.cs
@@ -79,15 +79,19 @@
         private IntPtr CalculateAddress(int baseAddress, int[] offsets)
         {
             IntPtr currentAddress = IntPtr.Add(moduleAddress, baseAddress);
-            currentAddress = (IntPtr)ReadInt(currentAddress);

-            for (int x = 0; x < offsets.Length - 1; x++)
+            if (offsets.Length > 0)
             {
-                currentAddress = IntPtr.Add(currentAddress, offsets[x]);
                 currentAddress = (IntPtr)ReadInt(currentAddress);
+
+                for (int x = 0; x < offsets.Length - 1; x++)
+                {
+                    currentAddress = IntPtr.Add(currentAddress, offsets[x]);
+                    currentAddress = (IntPtr)ReadInt(currentAddress);
+                }
+
+                currentAddress = IntPtr.Add(currentAddress, offsets[offsets.Length - 1]);
             }
-
-            currentAddress = IntPtr.Add(currentAddress, offsets[offsets.Length - 1]);

             return currentAddress;
         }


Beam weapon damage falloff bugfix

Beam weapon damage falloff bugfix

CalcDamageTable should properly calculate damage falloff due to range
now.

--- Pulsar4X/Pulsar4X.Lib/Entities/Components/BeamTN.cs
+++ Pulsar4X/Pulsar4X.Lib/Entities/Components/BeamTN.cs
@@ -442,7 +442,7 @@
                 }
                 else
                 {
-                    IncrementDamage = (ushort)Math.Floor((float)((float)(WeaponRangeTech+1) / (float)(loop + 1)));
+                    IncrementDamage = (ushort)Math.Floor(((float)((float)(WeaponRangeTech+1) / (float)(loop + 1)) * (float)Damage[0]));

                     if (IncrementDamage == 0)
                         IncrementDamage = 1;


Forgot to place the optional parameter in the public method.

--- Repo2.SDK.WPF45/Configuration/BesideExeCfgLoader.cs
+++ Repo2.SDK.WPF45/Configuration/BesideExeCfgLoader.cs
@@ -16,11 +16,11 @@
         }

-        public T Load(T defaultCfg)
-            => _lastLoaded ?? (_lastLoaded = ReadBesideExe(defaultCfg));
+        public T Load(T defaultCfg, string cfgFilename = "settings.cfg")
+            => _lastLoaded ?? (_lastLoaded = ReadBesideExe(defaultCfg, cfgFilename));

-        private T ReadBesideExe(T defaultCfg, string cfgFilename = "settings.cfg")
+        private T ReadBesideExe(T defaultCfg, string cfgFilename)
         {
             var p = _fs.GetBesideExeFilePath(cfgFilename);


WaitUnitilVisible using multiple locators

--- SeleniumExtension/Extensions/IWebDriverExtension.cs
+++ SeleniumExtension/Extensions/IWebDriverExtension.cs
@@ -1,4 +1,5 @@
 using System;
+using System.Collections.Generic;
 using OpenQA.Selenium.Support.UI;
 using SeleniumExtension;

@@ -63,6 +64,29 @@
         }

         /// <summary>
+        /// Waits for a <see cref="IWebElement"/> to be visible in the page
+        /// </summary>
+        /// <param name="locator">The <see cref="List"/>/<<see cref="By"/>/> locators of the <see cref="IWebElement"/>s</param>
+        /// <param name="waitTimeInSeconds">Maximum amount of seconds as <see cref="int"/> to wait for the <see cref="IWebElement"/> to become visible</param>
+        /// <returns><see langword="true"/> if the <see cref="IWebElement"/> is visible; otherwise, <see langword="false"/></returns>
+        public static bool WaitUntilVisible(this IWebDriver iWebDriver, List<By> locator, int waitTimeInSeconds = 10)
+        {
+            List<By> failedLocs = new List<By>();
+            foreach (var loc in locator)
+            {
+                if (!WaitUntil(iWebDriver, ExpectedConditions.ElementIsVisible(loc), waitTimeInSeconds))
+                    failedLocs.Add(loc);
+            }
+            if (failedLocs.Count == 0)
+                return true;
+            if (failedLocs.Count > 0 && waitTimeInSeconds > 1)
+                return WaitUntilVisible(iWebDriver, failedLocs, waitTimeInSeconds / 2);
+            if (failedLocs.Count > 0 && waitTimeInSeconds <= 1)
+                return false;
+            return true;
+        }
+
+        /// <summary>
         /// Waits for a <see cref="IWebElement"/> to not be visible in the page
         /// </summary>
         /// <param name="locator">The <see cref="By"/> locator of the <see cref="IWebElement"/></param>


Change "Folder Watcher" "Watch Folder" option name

--- DesktopWidgets/Widgets/FolderWatcher/Settings.cs
+++ DesktopWidgets/Widgets/FolderWatcher/Settings.cs
@@ -19,7 +19,7 @@
         public int FolderCheckIntervalMS { get; set; } = 500;

         [Category("General")]
-        [DisplayName("Watch Folder")]
+        [DisplayName("Watch Folder Path")]
         public string WatchFolder { get; set; } = "";

         [Category("General")]


Update ChartingInsightManagerExtension.cs

--- Engine/Alphas/ChartingInsightManagerExtension.cs
+++ Engine/Alphas/ChartingInsightManagerExtension.cs
@@ -58,7 +58,6 @@
         {
             _statisticsManager = statisticsManager;
             _liveMode = algorithm.LiveMode;
-            if (_liveMode) SampleInterval = TimeSpan.FromMinutes(1);

             // chart for average scores over sample period
             var scoreChart = new Chart("Alpha");


reformat

reformat

--- ExpressionToCodeLib/Internal/ObjectToCodeImpl.cs
+++ ExpressionToCodeLib/Internal/ObjectToCodeImpl.cs
@@ -1,11 +1,11 @@
 using System;
 using System.Collections;
+using System.Collections.Concurrent;
 using System.Reflection;
 using System.Collections.Generic;
 using System.Linq;
 using System.Linq.Expressions;
 using System.Text;
-using System.Collections.Concurrent;

 namespace ExpressionToCodeLib.Internal
 {
@@ -36,7 +36,7 @@
                             && indexPars.Length == 1
                             && typeof(IEnumerable<>).MakeGenericType(typeof(KeyValuePair<,>).MakeGenericType(indexPars[0].ParameterType, pi.PropertyType)) is Type keyEnumerableType
                             && keyEnumerableType.IsAssignableFrom(type)
-                            ) {
+                        ) {
                             var typeName = type.ToCSharpFriendlyTypeName();
                             return "new " + typeName + " " + PrintInitializerContents(config, enumerableVal, indexPars[0].ParameterType, pi.PropertyType, indent, valueSize - typeName.Length);
                         }
@@ -188,11 +188,10 @@
                     }
                 }
             }
+
             public IEnumerable<string> PrintInitializerContents(ExpressionToCodeConfiguration config, IEnumerable list)
                 => PrintInitializerContents(config, (IEnumerable<KeyValuePair<TKey, TValue>>)list);
         }
-
-

         public static string ExpressionValueAsCode(ExpressionToCodeConfiguration config, Expression expression, int indent)
         {


Minor API doc update

Minor API doc update

--- FirebaseAdmin/FirebaseAdmin/Auth/FirebaseAuth.cs
+++ FirebaseAdmin/FirebaseAdmin/Auth/FirebaseAuth.cs
@@ -240,19 +240,19 @@
         }

         /// <summary>
-        /// Sets the specified custom claims on an existing user account. A null claims value
+        /// Sets the specified custom claims on an existing user account. A null claims value
         /// removes any claims currently set on the user account. The claims should serialize into
         /// a valid JSON string. The serialized claims must not be larger than 1000 characters.
         /// </summary>
         /// <exception cref="ArgumentException">If <paramref name="uid"/> is null, empty or longer
-        /// than 128 characters. Or, if the serialized <paramref name="claims"/> is larger than 1000
+        /// than 128 characters. Or, if the serialized <paramref name="claims"/> is larger than 1000
         /// characters.</exception>
-        /// <param name="uid">The user ID string for the custom claims will be set. Must not be null
+        /// <param name="uid">The user ID string for the custom claims will be set. Must not be null
         /// or longer than 128 characters.
         /// </param>
         /// <param name="claims">The claims to be stored on the user account, and made
-        /// available to Firebase security rules. These must be serializable to JSON, and after
-        /// serialization it should not be larger than 1000 characters.</param>
+        /// available to Firebase security rules. These must be serializable to JSON, and the
+        /// serialized claims should not be larger than 1000 characters.</param>
         public async Task SetCustomUserClaimsAsync(string uid, IReadOnlyDictionary<string, object> claims)
         {
             lock (_lock)


Clean code

Clean code

--- FonctionsUtiles.Fred.Csharp/FunctionsInternet.cs
+++ FonctionsUtiles.Fred.Csharp/FunctionsInternet.cs
@@ -58,24 +58,24 @@
         string ret = client.DownloadString(url);

         // ret now contains the contents of the webpage
-        Console.WriteLine("First 256 bytes of response: " + ret.Substring(0, 265));
+        //Console.WriteLine("First 256 bytes of response: " + ret.Substring(0, 265));
         result = ret;
       }
       catch (WebException we)
       {
         // WebException.Status holds useful information
-        Console.WriteLine(we.Message + "\n" + we.Status.ToString());
+        //Console.WriteLine(we.Message + "\n" + we.Status.ToString());
       }
       catch (NotSupportedException ne)
       {
         // other errors
-        Console.WriteLine(ne.Message);
+        //Console.WriteLine(ne.Message);
       }

       return result;
     }

-    public static bool IsOnenNtworkIsAvailable()
+    public static bool IsOnenNetworkCardAvailable()
     {
       NetworkInterface[] nics = NetworkInterface.GetAllNetworkInterfaces();
       bool networkIsAvailable = false;


Better handling around converting yaml to dto

--- Functions/Functions/ConvertToHtmlWithMetadata.cs
+++ Functions/Functions/ConvertToHtmlWithMetadata.cs
@@ -57,14 +57,16 @@
                     // build dto
                     var dto = new Dto()
                     {
+                        Title = yamlHeader.Title ?? string.Empty,
                         RowKey = yamlHeader.Title.Replace(" ", "-").ToLowerInvariant(),
-                        Title = yamlHeader.Title,
-                        Author = yamlHeader.Author,
-                        Description = yamlHeader.Description,
-                        Image = yamlHeader.Image,
+                        Author = yamlHeader.Author ?? string.Empty,
+                        Description = yamlHeader.Description ?? string.Empty,
+                        Image = yamlHeader.Image.ToLowerInvariant() ?? string.Empty,
+                        Thumbnail = yamlHeader.Thumbnail.ToLowerInvariant() ?? string.Empty,
+                        Type = yamlHeader.Type.ToLowerInvariant() ?? string.Empty,
                         Published = yamlHeader.Published,
-                        Categories = string.Join(",", yamlHeader.Categories),
-                        HtmlBase64 = Helpers.Base64Encode(html) // Base64 required to make sure things like line endings are properly included
+                        Categories = (string.Join(",", yamlHeader.Categories)) ?? string.Empty,
+                        HtmlBase64 = (Helpers.Base64Encode(html)) ?? string.Empty // Base64 required to make sure things like line endings are properly included
                     };

                     // respond with OK and the DTO object
@@ -85,6 +87,8 @@
         public string Author { get; set; }
         public string Description { get; set; }
         public string Image { get; set; }
+        public string Thumbnail { get; set; }
+        public string Type { get; set; }
         public DateTime Published { get; set; }
         public List<string> Categories { get; set; }
     }
@@ -96,6 +100,8 @@
         public string Author { get; set; }
         public string Description { get; set; }
         public string Image { get; set; }
+        public string Thumbnail { get; set; }
+        public string Type { get; set; }
         public DateTime Published { get; set; }
         public string Categories { get; set; }
         public string HtmlBase64 { get; set; }


clean up gesture tracker

clean up gesture tracker

--- GestureTracker/GestureTracker/MainWindow.xaml.cs
+++ GestureTracker/GestureTracker/MainWindow.xaml.cs
@@ -442,47 +442,43 @@
             {
                 this.SkeletonCanvas.Children.Clear();

-                //using (DrawingContext dc = this.trackingImageDrawingGroup.Open())
-                //{
-                //    dc.DrawRectangle(Brushes.Black, null, new Rect(0.0, 0.0, this.displayWidth, this.displayHeight));
-
-                    Kinect2KitPerspective viewingPerspective = perspectives.First(p => p.Key.Equals(this.selectedKinectFOV.Header)).Value;
-
-                    int penIndex = 0;
-
-                    foreach (Kinect2KitPerson person in viewingPerspective.People)
+                Kinect2KitPerspective viewingPerspective = perspectives.First(p => p.Key.Equals(this.selectedKinectFOV.Header)).Value;
+
+                int penIndex = 0;
+
+                foreach (Kinect2KitPerson person in viewingPerspective.People)
+                {
+                    Pen personPen = this.bodyColors[penIndex++];
+
+                    if (viewAll)
                     {
-                        Pen drawPen = this.bodyColors[penIndex++];
-
-                        if (viewAll)
+                        foreach (Kinect2KitSkeleton skeleton in person.Skeletons.Values)
                         {
-                            foreach (Kinect2KitSkeleton skeleton in person.Skeletons.Values)
-                            {
-                                IReadOnlyDictionary<JointType, Kinect2KitJoint> joints = skeleton.Joints;
-                                Dictionary<JointType, Point> jointPoints = this.GetJointsPoints(joints);
-                                this.DrawBody(joints, jointPoints, drawPen);
-                            }
+                            IReadOnlyDictionary<JointType, Kinect2KitJoint> joints = skeleton.Joints;
+                            Dictionary<JointType, Point> jointPoints = this.GetJointsPoints(joints);
+                            this.DrawBody(joints, jointPoints, personPen);
                         }
-
-                        IReadOnlyDictionary<JointType, Kinect2KitJoint> averageJoints = person.AverageSkeleton;
-                        Dictionary<JointType, Point> averageJointPoints = this.GetJointsPoints(averageJoints);
-
-                        Pen averageSkeletonPen;
-
-                        if (viewAll)
-                        {
-                            averageSkeletonPen = this.averageBonePen;
-                        }
-                        else
-                        {
-                            averageSkeletonPen = drawPen;
-                        }
-
-                        this.DrawBody(averageJoints, averageJointPoints, averageSkeletonPen);
                     }

-                    this.trackingImageDrawingGroup.ClipGeometry = new RectangleGeometry(new Rect(0.0, 0.0, this.displayWidth, this.displayHeight));
-                //}
+                    IReadOnlyDictionary<JointType, Kinect2KitJoint> averageJoints = person.AverageSkeleton;
+                    Dictionary<JointType, Point> averageJointPoints = this.GetJointsPoints(averageJoints);
+
+                    Pen averageSkeletonPen;
+
+                    if (viewAll)
+                    {
+                        averageSkeletonPen = this.averageBonePen;
+                    }
+                    else
+                    {
+                        // show person color in average skeleton view
+                        averageSkeletonPen = personPen;
+                    }
+
+                    this.DrawBody(averageJoints, averageJointPoints, averageSkeletonPen);
+                }
+
+                this.trackingImageDrawingGroup.ClipGeometry = new RectangleGeometry(new Rect(0.0, 0.0, this.displayWidth, this.displayHeight));
             }));
         }

@@ -515,6 +511,8 @@
                 }
             }
         }
+
+        // Returns color space point
         private Dictionary<JointType, Point> GetJointsPoints(IReadOnlyDictionary<JointType, Kinect2KitJoint> joints)
         {
             Dictionary<JointType, Point> jointPoints = new Dictionary<JointType, Point>();
@@ -671,13 +669,13 @@
         #region Screenshot
         private void Screenshot_Click(object sender, RoutedEventArgs e)
         {
-            Rect bounds = VisualTreeHelper.GetDescendantBounds(this.GestureTrackerWindow);
+            Rect bounds = VisualTreeHelper.GetDescendantBounds(this.GestureTrackerViewbox);
             RenderTargetBitmap renderTarget = new RenderTargetBitmap((Int32)bounds.Width, (Int32)bounds.Height, 96, 96, PixelFormats.Pbgra32);

             DrawingVisual visual = new DrawingVisual();
             using (DrawingContext context = visual.RenderOpen())
             {
-                VisualBrush visualBrush = new VisualBrush(this.GestureTrackerWindow);
+                VisualBrush visualBrush = new VisualBrush(this.GestureTrackerViewbox);
                 context.DrawRectangle(visualBrush, null, new Rect(new Point(), bounds.Size));
             }


HR-290

HR-290

Changed restriction to 29 and below instead of 30 and below

--- HRI/Controllers/ComparePlansSurfaceController.cs
+++ HRI/Controllers/ComparePlansSurfaceController.cs
@@ -103,7 +103,7 @@
             }

             // Children cannot be age 30 or above.
-            if (model.CoverChildren && model.ChildrenAges.Any(x => x >= 30))
+            if (model.CoverChildren && model.ChildrenAges.Any(x => x >= 29))
             {
                 ModelState.AddModelError("viewModel", "Children cannot be age 30 or above.");
                 return CurrentUmbracoPage();


Minor fix

Minor fix

--- Hermod/HTTP/Server/URLMapping/HTTPEventSource.cs
+++ Hermod/HTTP/Server/URLMapping/HTTPEventSource.cs
@@ -197,8 +197,7 @@
                                                                               DateTime.UtcNow)))
                         {

-                            await logfile.WriteLineAsync(String.Concat(//Value.Id,                    (Char) 0x1E,
-                                                                       Value.Timestamp.ToIso8601(), (Char) 0x1E,
+                            await logfile.WriteLineAsync(String.Concat(Value.Timestamp.ToIso8601(), (Char) 0x1E,
                                                                        Value.Subevent,              (Char) 0x1E,
                                                                        Value.Data.AggregateWith(    (Char) 0x1F))).
                                           ConfigureAwait(false);


Add unitTests

Add unitTests

--- 1st_course/2nd_sem/HomeWork_2/Hw2_2/Hw2_2Tests/ListTests.cs
+++ 1st_course/2nd_sem/HomeWork_2/Hw2_2/Hw2_2Tests/ListTests.cs
@@ -11,28 +11,71 @@
     [TestClass()]
     public class ListTests
     {
-        [TestMethod()]
-        public void AddValueToPositionTest()
+        private List list;
+
+        [TestInitialize]
+        public void Initialize()
         {
-            Assert.Fail();
+            list = new List();
         }

         [TestMethod()]
-        public void GetValueByPositionTest()
+        public void AddFiveToSecondPositionTest()
         {
-            Assert.Fail();
+            list.AddValueToPosition(1, 0);
+            list.AddValueToPosition(1, 0);
+            list.AddValueToPosition(1, 0);
+            list.AddValueToPosition(1, 0);
+            list.AddValueToPosition(5, 2);
+            Assert.IsTrue(list.GetValueByPosition(2) == 5);
         }

         [TestMethod()]
-        public void ChangeValueByPositionTest()
+        [ExpectedException(typeof(InvalidOperationException))]
+        public void AddFiveToEmptyListOnSecondPositionExceptionTest()
         {
-            Assert.Fail();
+            list.AddValueToPosition(5, 2);
         }

         [TestMethod()]
-        public void RemoveElementFromPositionTest()
+        public void GetValueByZeroPositionTest()
         {
-            Assert.Fail();
+            list.AddValueToPosition(1, 0);
+            Assert.AreEqual(1, list.GetValueByPosition(0));
+        }
+
+        [TestMethod()]
+        public void ChangeFiveBySecondPositionTest()
+        {
+            list.AddValueToPosition(1, 0);
+            list.AddValueToPosition(1, 0);
+            list.AddValueToPosition(1, 0);
+            list.AddValueToPosition(1, 0);
+            list.AddValueToPosition(5, 2);
+            list.ChangeValueByPosition(1, 2);
+            bool flag = true;
+            for (int i = 0; i < list.length; i++)
+            {
+                flag = flag && (1 == list.GetValueByPosition(i));
+            }
+            Assert.IsTrue(flag);
+        }
+
+        [TestMethod()]
+        public void RemoveFiveFromListTest()
+        {
+            list.AddValueToPosition(1, 0);
+            list.AddValueToPosition(1, 0);
+            list.AddValueToPosition(1, 0);
+            list.AddValueToPosition(1, 0);
+            list.AddValueToPosition(5, 2);
+            list.RemoveElementFromPosition(2);
+            bool flag = true;
+            for (int i = 0; i < list.length; i++)
+            {
+                flag = flag && (1 == list.GetValueByPosition(i));
+            }
+            Assert.IsTrue(flag);
         }
     }
 }


refs #24 Implement an event handler for member click event

--- Application/MatchGenerator/ViewModel/MemberListViewModel.cs
+++ Application/MatchGenerator/ViewModel/MemberListViewModel.cs
@@ -80,7 +80,9 @@
 		/// <exception cref="ArgumentException"><paramref name="sender"/>が<see cref="IMemberListItemViewModel"/>でない.</exception>
 		private void Item_MemberClick(object sender, MemberClickEventArgs e)
 		{
-			throw new NotImplementedException();
+			if (!(sender is IMemberListItemViewModel)) { throw new ArgumentException(); }
+
+			LastClickedMember = sender as IMemberListItemViewModel;
 		}
 	}
 }


Allow overriding collision event callbacks

--- Assets/Alensia/Core/Physics/CollisionBasedGroundDetector.cs
+++ Assets/Alensia/Core/Physics/CollisionBasedGroundDetector.cs
@@ -58,14 +58,14 @@
             CollisionDetector.CollisionExited.Unlisten(OnCollisionExit);
         }

-        private void OnCollisionEnter(Collision collision)
+        protected virtual void OnCollisionEnter(Collision collision)
         {
             var ground = FindGroundContacts(collision.contacts).FirstOrDefault();

             OnDetectGround(ground);
         }

-        private void OnCollisionExit(Collision collision)
+        protected virtual void OnCollisionExit(Collision collision)
         {
             if (FindGroundContacts(collision.contacts).Exists(c => c == Ground))
             {


removed unused config

removed unused config

--- Assets/BitStrap/Plugins/Editor/BitPicker/BitPickerConfig.cs
+++ Assets/BitStrap/Plugins/Editor/BitPicker/BitPickerConfig.cs
@@ -24,7 +24,6 @@

 		public FuzzyFinderConfig fuzzyFinderConfig;
 		public ScoreConfig scoreConfig;
-		public float scrollSensitivity = 1.0f;

 		[InlineScriptableObject]
 		public BitPickerProvider[] providers;


spaces for static prims not have sizes power of 2, ranging for 16m to 256m acording to region sizes. No longer user definable

--- Aurora/Physics/AuroraOpenDynamicsEngine/AODEPhysicsScene.cs
+++ Aurora/Physics/AuroraOpenDynamicsEngine/AODEPhysicsScene.cs
@@ -97,7 +97,6 @@
         private CollisionLocker ode;

         public float ODE_STEPSIZE = 0.020f;
-        private float metersInSpace = 29.9f;
         private float m_timeDilation = 1.0f;

         public float gravityx = 0f;
@@ -106,11 +105,11 @@

         private float contactsurfacelayer = 0.001f;

-        private int worldHashspaceLow = -4;
-        private int worldHashspaceHigh = 128;
-
-        private int smallHashspaceLow = -4;
-        private int smallHashspaceHigh = 66;
+        private int HashspaceLow = -3;  // current ODE limits
+        private int HashspaceHigh = 10;
+        private int GridSpaceScaleBits = 5; // used to do shifts to find space from position. Value decided from region size in init
+        private int nspacesPerSideX = 8;
+        private int nspacesPerSideY = 8;

         private int framecount = 0;

@@ -463,12 +462,6 @@
                     m_PointOfGravity.Y = physicsconfig.GetFloat("point_gravityy", 0);
                     m_PointOfGravity.Z = physicsconfig.GetFloat("point_gravityz", 0);

-                    worldHashspaceLow = physicsconfig.GetInt("world_hashspace_size_low", -4);
-                    worldHashspaceHigh = physicsconfig.GetInt("world_hashspace_size_high", 128);
-
-                    metersInSpace = physicsconfig.GetFloat("meters_in_small_space", 29.9f);
-                    smallHashspaceLow = physicsconfig.GetInt("small_hashspace_size_low", -4);
-                    smallHashspaceHigh = physicsconfig.GetInt("small_hashspace_size_high", 66);

                     contactsurfacelayer = physicsconfig.GetFloat("world_contact_surface_layer", 0.001f);

@@ -542,7 +535,23 @@

             contacts = new d.ContactGeom[contactsPerCollision];

-            staticPrimspace = new IntPtr[(int)(300 / metersInSpace), (int)(300 / metersInSpace)];
+            // area in 8m multiples and in parts so it fits in integer and scales so 256m get similar sizes as previus
+            GridSpaceScaleBits = (int)WorldExtents.X / 8;
+            GridSpaceScaleBits *= (int)WorldExtents.Y / 8;
+
+            // // constant is 1/log(2), plus 0.5 for rounding
+            GridSpaceScaleBits = (int)(Math.Log((double)GridSpaceScaleBits) * 1.4426950f - 0.5f);
+            GridSpaceScaleBits /= 2; // side take half as many bits
+
+            if (GridSpaceScaleBits < 4) // no less than 16m side
+                GridSpaceScaleBits = 4;
+            else if (GridSpaceScaleBits > 8)
+                GridSpaceScaleBits = 8;   // no more than 256m side
+
+            int nspacesPerSideX = (int)(WorldExtents.X) >> GridSpaceScaleBits;
+            int nspacesPerSideY = (int)(WorldExtents.Y) >> GridSpaceScaleBits;
+
+            staticPrimspace = new IntPtr[nspacesPerSideX, nspacesPerSideY];

             // Centeral contact friction and bounce
             // ckrinke 11/10/08 Enabling soft_erp but not soft_cfm until I figure out why
@@ -706,7 +715,7 @@
             m_materialContacts[(int)Material.Rubber, 1].surface.soft_cfm = 0.010f;
             m_materialContacts[(int)Material.Rubber, 1].surface.soft_erp = 0.010f;

-            d.HashSpaceSetLevels(space, worldHashspaceLow, worldHashspaceHigh);
+            d.HashSpaceSetLevels(space, HashspaceLow, HashspaceHigh);

             // Set the gravity,, don't disable things automatically (we set it explicitly on some things)

@@ -2371,7 +2380,7 @@
             if (newspace == IntPtr.Zero)
             {
                 newspace = createprimspace(iprimspaceArrItem[0], iprimspaceArrItem[1]);
-                d.HashSpaceSetLevels(newspace, smallHashspaceLow, smallHashspaceHigh);
+                d.HashSpaceSetLevels(newspace, HashspaceLow, HashspaceHigh);
             }

             return newspace;
@@ -2415,16 +2424,16 @@
         {
             int[] returnint = new int[2];

-            returnint[0] = (int)(pos.X / metersInSpace);
-
-            if (returnint[0] > ((int)(259f / metersInSpace)))
-                returnint[0] = ((int)(259f / metersInSpace));
+            returnint[0] = (int)(pos.X) >> GridSpaceScaleBits;
+
+            if (returnint[0] >= nspacesPerSideX)
+                returnint[0] = nspacesPerSideX -1;
             if (returnint[0] < 0)
                 returnint[0] = 0;

-            returnint[1] = (int)(pos.Y / metersInSpace);
-            if (returnint[1] > ((int)(259f / metersInSpace)))
-                returnint[1] = ((int)(259f / metersInSpace));
+            returnint[1] = (int)(pos.Y) >> GridSpaceScaleBits;
+            if (returnint[1] >= nspacesPerSideY)
+                returnint[1] = nspacesPerSideY-1;
             if (returnint[1] < 0)
                 returnint[1] = 0;


DateTime.Now.ToUniversalTime -> DateTime.UtcNow

--- BTCPayServer/Models/AppViewModels/ViewCrowdfundViewModel.cs
+++ BTCPayServer/Models/AppViewModels/ViewCrowdfundViewModel.cs
@@ -68,9 +68,9 @@
             public decimal TotalCurrency { get; }
         }

-        public bool Started => !StartDate.HasValue || DateTime.Now.ToUniversalTime() > StartDate;
+        public bool Started => !StartDate.HasValue || DateTime.UtcNow > StartDate;

-        public bool Ended => EndDate.HasValue && DateTime.Now.ToUniversalTime() > EndDate;
+        public bool Ended => EndDate.HasValue && DateTime.UtcNow > EndDate;
         public bool DisplayPerksRanking { get; set; }
         public bool Enabled { get; set; }
         public string ResetEvery { get; set; }


Expose FindMembers()

Expose FindMembers()

--- Curse.NET/CurseClient.cs
+++ Curse.NET/CurseClient.cs
@@ -191,6 +191,11 @@
 		{
 			CurseApi.SendMessage(group.GroupID, user.UserID, message);
 		}
+
+		public UserResponse[] FindMembers(Group group, string query)
+		{
+			return CurseApi.FindMembers(group.GroupID, query);
+		}
 		#endregion

 		public void Dispose()


Added comments where I need to edit to make good for even numbers too

--- ClassLibrary1/Solution.cs
+++ ClassLibrary1/Solution.cs
@@ -39,7 +39,7 @@

         //Even check symmetry method:
         private static bool EvenSymmetryCheck(char[] characterArray)//For even number of elements only.
-        {//*****************************Make good for odds too***************************************
+        {//*****************************Make good for odds too***************************************
             int Length = characterArray.Length;
             if (characterArray.Length % 2 != 0)//if not even number of elements.
             {


Show all IP address families (un-shun IPv6)

--- IoTCoreDefaultApp/Presenters/NetworkPresenter.cs
+++ IoTCoreDefaultApp/Presenters/NetworkPresenter.cs
@@ -70,11 +70,10 @@
                         (hn.Type == HostNameType.Ipv4 || hn.Type == HostNameType.Ipv6))
                     {
                         ipaddr += hn.CanonicalName + "\n";
-                        return ipaddr.Trim();
                     }
                 }
-            }
-
+                return ipaddr.Trim();
+            }
             return "<no Internet connection>";
         }


Added try catch block

Added try catch block

--- Core2D.UI.Wpf/App.xaml.cs
+++ Core2D.UI.Wpf/App.xaml.cs
@@ -87,7 +87,21 @@
             _context.View = _mainWindow;

             _mainWindow.DataContext = _context;
-            _mainWindow.ShowDialog();
+
+            try
+            {
+                _mainWindow.ShowDialog();
+            }
+            catch (Exception ex)
+            {
+                if (_context.Editor.Log != null)
+                {
+                    _context.Editor.Log.LogError("{0}{1}{2}",
+                        ex.Message,
+                        Environment.NewLine,
+                        ex.StackTrace);
+                }
+            }
         }

         /// <summary>


Implement account/remove_profile_banner close #21

--- CoreTweet/Rest/Account.cs
+++ CoreTweet/Rest/Account.cs
@@ -207,6 +207,23 @@
         }

         /// <summary>
+        /// <para>Removes the uploaded profile banner for the authenticating user. Returns HTTP 200 upon success.</para>
+        /// </summary>
+        /// <param name="parameters">Parameters.</param>
+        public void RemoveProfileBanner(params Expression<Func<string, object>>[] parameters)
+        {
+            this.Tokens.SendRequest(MethodType.PostNoResponse, InternalUtils.GetUrl("account/remove_profile_banner"), InternalUtils.ExpressionsToDictionary(parameters));
+        }
+        public void RemoveProfileBanner(IDictionary<string, object> parameters)
+        {
+            this.Tokens.SendRequest(MethodType.PostNoResponse, InternalUtils.GetUrl("account/remove_profile_banner"), parameters);
+        }
+        public void RemoveProfileBanner<T>(T parameters)
+        {
+            this.Tokens.SendRequest(MethodType.PostNoResponse, InternalUtils.GetUrl("account/remove_profile_banner"), InternalUtils.ResolveObject(parameters));
+        }
+
+        /// <summary>
         /// <para>Sets one or more hex values that control the color scheme of the authenticating user's profile page on twitter.com. Each parameter's value must be a valid hexidecimal value, and may be either three or six characters (ex: #fff or #ffffff).</para>
         /// <para>Avaliable parameters: </para>
         /// <para><paramref name="string profile_background_color (optional)"/> : Profile background color.</para>


Print out to trace soemthing about the dataset we are running on before we actually run. Fixes #237

--- LINQToTTree/LINQToTTreeLib/TTreeQueryExecutor.cs
+++ LINQToTTree/LINQToTTreeLib/TTreeQueryExecutor.cs
@@ -653,6 +653,7 @@
         /// </summary>
         internal void ExecuteQueuedQueries()
         {
+            LogExecutionStart();
             // We now need the actual root files - so resolve them.
             ResolveROOTFiles();

@@ -708,6 +709,22 @@

             _queryDirectory = null;
             TraceHelpers.TraceInfo(17, "ExecuteQueuedQueries: Done");
+        }
+
+        /// <summary>
+        /// Log that we are about to start query execution
+        /// </summary>
+        private void LogExecutionStart()
+        {
+            if (_originalRootFiles != null)
+            {
+                var m = new StringBuilder();
+                foreach (var f in _originalRootFiles)
+                {
+                    m.Append($" {f.OriginalString}");
+                }
+                Trace.Write("LINQTOTTree Query Execution", $"Starting query on {m.ToString()}");
+            }
         }

         /// <summary>


re-ordered JumpList

re-ordered JumpList

--- CryptoTracker/App.xaml.cs
+++ CryptoTracker/App.xaml.cs
@@ -131,16 +131,16 @@
                 jumpList.Items.Clear();

                 JumpListItem taskItem;
+                taskItem = JumpListItem.CreateWithArguments("/News", "News");
+                taskItem.Description = "See the latest news.";
+                taskItem.DisplayName = "News";
+                taskItem.Logo = new Uri("ms-appx:///Assets/Icons/News.png");
+                jumpList.Items.Add(taskItem);
+
                 taskItem = JumpListItem.CreateWithArguments("/Portfolio", "Portfolio");
                 taskItem.Description = "Check your crypto-portfolio.";
                 taskItem.DisplayName = "Portfolio";
                 taskItem.Logo = new Uri("ms-appx:///Assets/Icons/Portfolio.png");
-                jumpList.Items.Add(taskItem);
-
-                taskItem = JumpListItem.CreateWithArguments("/News", "News");
-                taskItem.Description = "See the latest news.";
-                taskItem.DisplayName = "News";
-                taskItem.Logo = new Uri("ms-appx:///Assets/Icons/News.png");
                 jumpList.Items.Add(taskItem);

                 await jumpList.SaveAsync();


use throwif

use throwif

--- Mailgun.AspNet.Identity/MailgunMessageService.cs
+++ Mailgun.AspNet.Identity/MailgunMessageService.cs
@@ -3,6 +3,7 @@
 using System.Threading.Tasks;
 using Mailgun.AspNet.Identity.Core;
 using Mailgun.AspNet.Identity.Exceptions;
+using Mailgun.Exceptions;
 using Mailgun.Messages;
 using Mailgun.Service;
 using Microsoft.AspNet.Identity;
@@ -22,14 +23,9 @@
         /// <param name="apikey"></param>
         public MailgunMessageService(string domain, string apikey)
         {
-            if (string.IsNullOrEmpty(domain))
-            {
-                throw new ArgumentNullException(domain);
-            }
-            if (string.IsNullOrEmpty(apikey))
-            {
-                throw new ArgumentNullException(apikey);
-            }
+            ThrowIf.IsArgumentNull(() => domain);
+            ThrowIf.IsArgumentNull(() => apikey);
+

             _domain = domain;
             _messageService = new MessageService(apikey);
@@ -62,11 +58,15 @@
         /// <returns></returns>
         public Task SendAsync(IdentityMessage message)
         {
+            ThrowIf.IsArgumentNull(() => message);
+
             return _options != null ? SendWithOptions(message) : SendWithSimpleParameters(message);
         }

         private Task SendWithOptions(IdentityMessage message)
         {
+            ThrowIf.IsArgumentNull(() => message);
+
             var builder = new MessageBuilder();
             builder.
                 SetSubject(message.Subject).
@@ -105,6 +105,8 @@

         private Task SendWithSimpleParameters(IdentityMessage message)
         {
+            ThrowIf.IsArgumentNull(() => message);
+
             //Build a mailgun message from the message object
             var msg = new MessageBuilder()
                 .AddToRecipient(new Recipient {Email = message.Destination})


[Bff] Fix intermittent bug when collecting natvis files.

--- Sharpmake.Generators/FastBuild/Bff.cs
+++ Sharpmake.Generators/FastBuild/Bff.cs
@@ -1453,10 +1453,11 @@
         private static Strings CollectNatvisFiles(BffGenerationContext context)
         {
             Project.Configuration projectConfig = context.Configuration;
+
+            var natvisFiles = new Strings(projectConfig.Project.NatvisFiles);
             if (projectConfig.Output == Project.Configuration.OutputType.Dll || projectConfig.Output == Project.Configuration.OutputType.Exe)
             {
-                Strings natvisFiles = new Strings(projectConfig.Project.NatvisFiles);
-                HashSet<Project> visitedProjects = new HashSet<Project>();
+                var visitedProjects = new HashSet<Project>();
                 foreach (Project.Configuration resolvedDepConfig in projectConfig.ResolvedDependencies)
                 {
                     if (resolvedDepConfig.Output != Project.Configuration.OutputType.Dll && resolvedDepConfig.Output != Project.Configuration.OutputType.Exe)
@@ -1471,13 +1472,8 @@
                         }
                     }
                 }
-
-                return natvisFiles;
-            }
-            else
-            {
-                return projectConfig.Project.NatvisFiles;
-            }
+            }
+            return natvisFiles;
         }

         private static void FillEmbeddedNatvisOptions(BffGenerationContext context)


Fix bug with renew access token

Fix bug with renew access token

--- MeetupManager.Portable/Services/MeetupService.cs
+++ MeetupManager.Portable/Services/MeetupService.cs
@@ -34,6 +34,10 @@
 	public class MeetupService : IMeetupService
 	{
 		#region IMeetupService implementation
+
+
+        public static string ClientId = "<YOUR CLIENT ID>";
+        public static string ClientSecret = "<YOUR CLIENT SECRET>";

         private const string GetGroupsUrl = @"https://api.meetup.com/2/groups?offset={0}&member_id={1}&page=100&order=name&access_token={2}&only=name,id,group_photo";
         private const string GetEventsUrl = @"https://api.meetup.com/2/events?offset={0}&group_id={1}&page=20&status=upcoming,past&desc=true&access_token={2}&only=name,id,time";
@@ -87,15 +91,15 @@

 		}

-		public static string ClientId = "<YOUR CLIENT ID>";
-        public static string ClientSecret = "<YOUR CLIENT SECRET>";
+
+

         public async Task<bool> RenewAccessToken()
 		{
 			if (string.IsNullOrWhiteSpace (Settings.AccessToken))
 				return false;

-			if (DateTime.UtcNow.Ticks > Settings.KeyValidUntil)
+			if (DateTime.UtcNow.Ticks < Settings.KeyValidUntil)
 				return true;

             using (var client = new HttpClient())


Support August Public preview SDK

Support August Public preview SDK

--- Smithers.Reading/DependencyChecker.cs
+++ Smithers.Reading/DependencyChecker.cs
@@ -53,7 +53,8 @@
     {
         const string PUBLIC_PREVIEW_MIN_VERSION_PREFIX = "2.0.1407";
         const string NUIDB_SOURCE_FOLDER = @"C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0\ExtensionSDKs\Microsoft.Kinect.Face\2.0\Redist\CommonConfiguration\x64\NuiDatabase";
-        const string KINECT_FACE_ASSEMBLY_PUBLIC_PREVIEW_PATH = @"C:\Program Files\Microsoft SDKs\Kinect\v2.0-PublicPreview1407\Assemblies\Microsoft.Kinect.Face.dll";
+        const string KINECT_FACE_ASSEMBLY_PUBLIC_PREVIEW_1407_PATH = @"C:\Program Files\Microsoft SDKs\Kinect\v2.0-PublicPreview1407\Assemblies\Microsoft.Kinect.Face.dll";
+        const string KINECT_FACE_ASSEMBLY_PUBLIC_PREVIEW_1408_PATH = @"C:\Program Files\Microsoft SDKs\Kinect\v2.0-PublicPreview1408\Redist\Face\x64\Microsoft.Kinect.Face.dll";
         const string KINECT_FACE_ASSEMBLY_07_30_PATH = @"C:\Program Files\Microsoft SDKs\Kinect\MainV2\Assemblies\Microsoft.Kinect.Face.dll";

         public static void CheckDependencies()
@@ -89,9 +90,13 @@

             if (!File.Exists(targetPath) || FaceAssemblyVersionMisMatch(targetPath))
             {
-                if (File.Exists(KINECT_FACE_ASSEMBLY_PUBLIC_PREVIEW_PATH))
+                if (File.Exists(KINECT_FACE_ASSEMBLY_PUBLIC_PREVIEW_1407_PATH))
                 {
-                    sourcePath = KINECT_FACE_ASSEMBLY_PUBLIC_PREVIEW_PATH;
+                    sourcePath = KINECT_FACE_ASSEMBLY_PUBLIC_PREVIEW_1407_PATH;
+                }
+                else if(File.Exists(KINECT_FACE_ASSEMBLY_PUBLIC_PREVIEW_1408_PATH))
+                {
+                    sourcePath = KINECT_FACE_ASSEMBLY_PUBLIC_PREVIEW_1408_PATH;
                 }
                 else if (File.Exists(KINECT_FACE_ASSEMBLY_07_30_PATH))
                 {
@@ -103,7 +108,7 @@
                     throw new DependencyException("Kinect Face Assembly Not Found. Please Install the Latest SDK");
                 }

-                File.Copy(sourcePath, targetPath);
+                File.Copy(sourcePath, targetPath, true);
             }

         }


Fixes tabs

Fixes tabs

--- Mono.Addins.Setup/Mono.Addins.Setup/SetupTool.cs
+++ Mono.Addins.Setup/Mono.Addins.Setup/SetupTool.cs
@@ -357,7 +357,7 @@
 			bool found = false;
 			foreach (PackageRepositoryEntry addin in addins) {
 				Addin sinfo = registry.GetAddin (addin.Addin.LocalId);
-                if (sinfo != null && !showAll && IsHidden(sinfo))
+				if (sinfo != null && !showAll && IsHidden(sinfo))
 					continue;
 				if (sinfo != null && Addin.CompareVersions (sinfo.Version, addin.Addin.Version) == 1) {
 					Console.WriteLine (" - " + addin.Addin.Id + " " + addin.Addin.Version + " (" + addin.Repository.Name + ")");


Fixed a loading bug in AB.Load

Fixed a loading bug in AB.Load

--- MonoDroid/Xamarin.Mobile/Contacts/AddressBook.cs
+++ MonoDroid/Xamarin.Mobile/Contacts/AddressBook.cs
@@ -84,7 +84,7 @@
 			try
 			{
 				c = this.content.Query (curi, null, column + " = ?", new[] { id }, null);
-				return (c.MoveToNext() ? ContactHelper.GetContact (PreferContactAggregation, this.content, this.resources, c) : null);
+				return (c.MoveToNext() ? ContactHelper.GetContact (!PreferContactAggregation, this.content, this.resources, c) : null);
 			}
 			finally
 			{


Updating Twitter summary title with application name.

--- MoviePicker.WebApp/Controllers/HomeController.cs
+++ MoviePicker.WebApp/Controllers/HomeController.cs
@@ -196,9 +196,9 @@
 				}
 			}

-			tweetText += $"{nl}{nl}#ShowYourScreens @SpilledMilkCOM";
-
-			ControllerUtility.SetTwitterCard(ViewBag, null, "Expert League", "See what the experts pick AND their ranking when the estimates are in.", null, null, tweetText);
+			tweetText += $"{nl}{nl}#ShowYourScreens #BoxOffice @SpilledMilkCOM";
+
+			ControllerUtility.SetTwitterCard(ViewBag, null, $"{Constants.APPLICATION_NAME} - Expert League", "See what the experts pick AND their ranking when the estimates are in.", null, null, tweetText);

 			stopWatch.Stop();

@@ -279,7 +279,7 @@

 			tweetText += $"{nl}{nl}#ShowYourScreens @SpilledMilkCOM";

-			ControllerUtility.SetTwitterCard(ViewBag, null, "Fandango Hourly Sales", "A breakdown of the hourly ticket sales by percentages. (click-through for up-to-date numbers)", null, null, tweetText);
+			ControllerUtility.SetTwitterCard(ViewBag, null, $"{Constants.APPLICATION_NAME} - Fandango Hourly Sales", "A breakdown of the hourly ticket sales by percentages. (click-through for up-to-date numbers)", null, null, tweetText);

 			stopWatch.Stop();
@@ -319,7 +319,7 @@

 			tweetText += $"{nl}{nl}#ShowYourScreens @SpilledMilkCOM";

-			ControllerUtility.SetTwitterCard(ViewBag, null, "Fandango Weekend Sales", "A breakdown of the weekend ticket sales by percentages. (click-through for up-to-date numbers)", null, null, tweetText);
+			ControllerUtility.SetTwitterCard(ViewBag, null, $"{Constants.APPLICATION_NAME} - Fandango Weekend Sales", "A breakdown of the weekend ticket sales by percentages. (click-through for up-to-date numbers)", null, null, tweetText);

 			stopWatch.Stop();


Drawing improvements

Drawing improvements

--- MultyNetHack/MultyNetHack/Screen/EngineScreen.cs
+++ MultyNetHack/MultyNetHack/Screen/EngineScreen.cs
@@ -109,7 +109,7 @@
             x = 0;
             y = 0;
             z = 0;
-            WantedWidth = 70;
+            WantedWidth = 60;
             WantedHeight = 20;
             Width = TrueWidth;
             Height = TrueHeight;
@@ -221,7 +221,7 @@

         protected override void GenerateFooter()
         {
-            string mid = string.Format("({0},{1})", this.x, this.y);
+            string mid = string.Format("({0},{1}) - {2}", this.x, this.y, this.GetComponentOnLocation(this.x,this.y).Name);
             GenerateFooter(mid);
         }
         bool inside = false;
@@ -248,12 +248,11 @@
                     }
                 }

-                FillBuffer(this.x, this.y, 1, 1, Material.Player, 15);
+                FillBuffer(new Rectangle(this.y,this.x ,this.y - 1,this.x - 1), Material.Player, 15);
                 DrawPaths();
-                ZBufferUpdate(this, 0, 0);
-                FillBuffer(Bounds.l, Bounds.t, TrueHeight, TrueWidth, this.MadeOf, 0);
+                ZBufferUpdate(this, Point.Origin());
+                FillBuffer(this.Bounds, this.MadeOf, 0);
                 FlushBuffer();
-                FooterString = string.Format("({0},{1})", this.x, this.y);
                 Screen_Change(this, EventArgs.Empty);
                 inside = false;
             }
@@ -273,9 +272,51 @@

                 }
             }
-            FillBuffer(parentLeft + (parentLeft-comp.x) - comp.Bounds.width/2, parentTop - (parentTop - comp.y) + comp.Bounds.height/2, comp.Bounds.height, comp.Bounds.width, comp.MadeOf, comp.z);
-
-        }
+            FillBuffer(comp.Bounds.l - parentLeft , comp.Bounds.t - parentTop, comp.Bounds.height, comp.Bounds.width, comp.MadeOf, comp.z);
+
+        }
+        private void ZBufferUpdate(Component comp, Point Translatin)
+        {
+            Rectangle TransformdBounds = comp.Bounds + Translatin;
+            Point startEnd = comp.GetStartEndEnter(TransformdBounds.l, TransformdBounds.r);
+            for (int i = startEnd.x; i <= startEnd.y; i++)
+            {
+                if (comp.GetType() != typeof(EngineSceen))
+                {
+                    if (this.Bounds & (comp.sweep[i].component.Bounds + Translatin + new Point(comp.x, comp.y)))
+                    {
+
+                        var NewTranslatin = new Point(comp.x, comp.y) + Translatin;
+                        ZBufferUpdate(comp.sweep[i].component, NewTranslatin);
+                    }
+
+                }
+                else
+                {
+                    if (this.Bounds & (comp.sweep[i].component.Bounds + Translatin))
+                        ZBufferUpdate(comp.sweep[i].component, Point.Origin());
+                }
+            }
+            FillBuffer(TransformdBounds, comp.MadeOf, comp.z);
+
+        }
+
+        private void FillBuffer(Rectangle transformdBounds, Material madeOf, int zLevel)
+        {
+            Rectangle Transformed = Bounds.ToTopLeft(transformdBounds);
+            for (int i=Transformed.t; i < Transformed.b; i++)
+            {
+                for (int j = Transformed.l; j < Transformed.r; j++)
+                {
+                    if (updated[i][j] < zLevel)
+                    {
+                        buff1[i][j] = Texture[madeOf];
+                        updated[i][j] = zLevel;
+                    }
+                }
+            }
+        }
+
         private void FillBuffer(int x, int y, int h, int w, Material m, int zLevle)
         {
             Point start = Bounds.ToTopLeft(x, y);


Now defaults to looking for index.html

Now defaults to looking for index.html

--- DefaultResourceServlet.cs
+++ DefaultResourceServlet.cs
@@ -80,6 +80,12 @@
                 var path = Path.GetFullPath(resourceDir + "/" + url);
                 var ext = Path.GetExtension(path);

+                if ( string.IsNullOrEmpty( ext ) )
+                {
+                    path += "/index.html";
+                    ext = ".html";
+                }
+
                 if (ContentTypes.ContainsKey(ext) && File.Exists(path)) {
                     Response.ContentType = ContentTypes[ext];


Drop Database Command

Drop Database Command

--- ArangoDB.Client/ArangoDatabaseCommands.cs
+++ ArangoDB.Client/ArangoDatabaseCommands.cs
@@ -190,5 +190,35 @@

             return result.Result;
         }
+
+        /// <summary>
+        /// Deletes a database
+        /// </summary>
+        /// <param name="name">Name of the database</param>
+        /// <returns></returns>
+        public void DeleteDatabase(string name)
+        {
+            DeleteDatabaseAsync(name).WaitSynchronizer();
+        }
+
+        /// <summary>
+        /// Creates a database
+        /// </summary>
+        /// <param name="name">Name of the database</param>
+        /// <param name="users">list of database user</param>
+        /// <returns></returns>
+        public async Task DeleteDatabaseAsync(string name)
+        {
+            var command = new HttpCommand(this)
+            {
+                Api = CommandApi.Database,
+                Method = HttpMethod.Delete,
+                IsSystemCommand = true
+            };
+
+            command.Command = name;
+
+            var result = await command.RequestGenericSingleResult<bool, InheritedCommandResult<bool>>().ConfigureAwait(false);
+        }
     }
 }


Correct bug when restart

Correct bug when restart

--- Assets/DemoVikings/Scripts/MainMenuVik.cs
+++ Assets/DemoVikings/Scripts/MainMenuVik.cs
@@ -25,7 +25,9 @@
 	{
 		if(Input.GetButton("Cancel"))
 		{
+			PhotonNetwork.LeaveRoom();
 			Application.LoadLevel(0);
+
 		}
 	}


input is now reset on new pages

input is now reset on new pages

--- Assets/Scripts/Presenter/PagePresenter.cs
+++ Assets/Scripts/Presenter/PagePresenter.cs
@@ -184,6 +184,7 @@
         private void SetInputField(bool isEnabled) {
             if (isEnabled) {
                 InputBoxView ibv = textBoxHolder.AddInputBox();
+                ibv.Reset();
                 GetInputFunc = () => ibv.Input;
             } else {
                 GetInputFunc = () => string.Empty;


Added Test comment

Added Test comment

--- Assets/Scripts/Tools/ChemCamController.cs
+++ Assets/Scripts/Tools/ChemCamController.cs
@@ -115,6 +115,7 @@
                 //If we're changing color
                 currentTime = 0.0f;
                 previousColour = light.color;
+                //Test
             }
         }
     }


Added a Characterization Test of AtomLink.WriteTo,

because I changed its accesibility from internal to public in the previous
commit.

--- AtomEventStore.UnitTests/AtomLinkTests.cs
+++ AtomEventStore.UnitTests/AtomLinkTests.cs
@@ -8,6 +8,8 @@
 using Grean.AtomEventStore;
 using Xunit;
 using Ploeh.SemanticComparison.Fluent;
+using System.Xml;
+using System.Xml.Linq;

 namespace Grean.AtomEventStore.UnitTests
 {
@@ -94,5 +96,31 @@
                 sut.Href.GetHashCode();
             Assert.Equal(expected, actual);
         }
+
+        [Theory, AutoAtomData]
+        public void WriteToXmlWriterWritesCorrectXml(
+            AtomLink sut)
+        {
+            // Fixture setup
+            var sb = new StringBuilder();
+            using (var w = XmlWriter.Create(sb))
+            {
+                // Exercise system
+                sut.WriteTo(w);
+
+                // Verify outcome
+                w.Flush();
+
+                var expected = XDocument.Parse(
+                    "<link" +
+                    " href=\"" + sut.Href.ToString() + "\"" +
+                    " rel=\"" + sut.Rel + "\"" +
+                    " xmlns=\"http://www.w3.org/2005/Atom\" />");
+
+                var actual = XDocument.Parse(sb.ToString());
+                Assert.Equal(expected, actual, new XNodeEqualityComparer());
+            }
+            // Teardown
+        }
     }
 }


Row reduction row swapping without copying all elements.

--- Circuit/Simulation/Simulation.cs
+++ Circuit/Simulation/Simulation.cs
@@ -482,13 +482,14 @@
                 }

                 // Swap pivot row with the current row.
+                if (pi != j)
+                {
+                    var Abpi = Ab[pi];
+                    Ab[pi] = Ab[j];
+                    Ab[j] = Abpi;
+                }
+
                 double[] Abj = Ab[j];
-                if (pi != j)
-                {
-                    double[] Abpi = Ab[pi];
-                    for (int ij = j; ij <= N; ++ij)
-                        Swap(ref Abj[ij], ref Abpi[ij]);
-                }

                 // Eliminate the rows after the pivot.
                 double p = Abj[j];


Make the Connect method asynchronous

Make the Connect method asynchronous

--- WolfyBot.Core/IRCServer.cs
+++ WolfyBot.Core/IRCServer.cs
@@ -81,7 +81,7 @@

 		#endregion

-		public void Connect ()
+		public async void Connect ()
 		{
 			using (var client = new TcpClient (Host, Port)) {
 				var stream = client.GetStream ();
@@ -102,7 +102,7 @@
 				SendMessageHandler (this, IRCMessageFactory.BuildJoinChannelMessage (channelsString));

 				while (true) {
-					var line = reader.ReadLine ();
+					var line = await reader.ReadLineAsync ();
 					var msg = new IRCMessage (line);
 					Log (msg);
 					OnMessageReceived (msg);


Bump version to 0.10.9

Bump version to 0.10.9

--- CactbotOverlay/Properties/AssemblyInfo.cs
+++ CactbotOverlay/Properties/AssemblyInfo.cs
@@ -20,5 +20,5 @@
 // - Build Number
 // - Revision
 // GitHub has only 3 version components, so Revision should always be 0.
-[assembly: AssemblyVersion("0.10.8.0")]
-[assembly: AssemblyFileVersion("0.10.8.0")]+[assembly: AssemblyVersion("0.10.9.0")]
+[assembly: AssemblyFileVersion("0.10.9.0")]


Bump version to 0.13.2

Bump version to 0.13.2

--- CactbotOverlay/Properties/AssemblyInfo.cs
+++ CactbotOverlay/Properties/AssemblyInfo.cs
@@ -20,5 +20,5 @@
 // - Build Number
 // - Revision
 // GitHub has only 3 version components, so Revision should always be 0.
-[assembly: AssemblyVersion("0.13.1.0")]
-[assembly: AssemblyFileVersion("0.13.1.0")]+[assembly: AssemblyVersion("0.13.2.0")]
+[assembly: AssemblyFileVersion("0.13.2.0")]