Fixed another set of old tests randomly failing due to access to files with the same name.

--- NBi.Testing/Unit/UI/Configuration/ProjectTest.cs
+++ NBi.Testing/Unit/UI/Configuration/ProjectTest.cs
@@ -2,6 +2,7 @@
 using System.IO;
 using NBi.UI.Configuration;
 using NUnit.Framework;
+using System.Reflection;
 #endregion

 namespace NBi.Testing.Unit.UI.Configuration
@@ -9,19 +10,21 @@
     [TestFixture]
     public class ProjectTest
     {
-
+        protected string ProjectFilename { get; set; }
         #region SetUp & TearDown
         //Called only at instance creation
         [TestFixtureSetUp]
         public void SetupMethods()
         {
-
+            ProjectFilename = DiskOnFile.CreatePhysicalFile("MyProject.nbi", "NBi.Testing.Unit.UI.Configuration.Resources.MyProject.nbi");
         }

         //Called only at instance destruction
         [TestFixtureTearDown]
         public void TearDownMethods()
         {
+            if (File.Exists(DiskOnFile.GetDirectoryPath() + @"\MyProject.nbi"))
+                File.Delete(DiskOnFile.GetDirectoryPath() + @"\MyProject.nbi");
         }

         //Called before each test
@@ -34,19 +37,15 @@
         [TearDown]
         public void TearDownTest()
         {
-            if (File.Exists(DiskOnFile.GetDirectoryPath() + @"\MyProject.nbi"))
-                File.Delete(DiskOnFile.GetDirectoryPath() + @"\MyProject.nbi");
+
         }
         #endregion

         [Test]
         public void Load_CorrectFile_DirectoriesLoaded()
         {
-            //Buiding object used during test
-            var filename = DiskOnFile.CreatePhysicalFile("MyProject.nbi", "NBi.Testing.Unit.UI.Configuration.Resources.MyProject.nbi");
-
-            //Call the method to test
-            Project.Load(filename);
+            //Call the method to test
+            Project.Load(ProjectFilename);

             //Assertion
             Assert.That(Project.Directories.Root, Is.EqualTo(@"C:\Users\Seddryck\Documents\TestCCH\"));
@@ -55,16 +54,13 @@
         [Test]
         public void Load_CorrectFile_DirectoryLoaded()
         {
-            //Buiding object used during test
-            var filename = DiskOnFile.CreatePhysicalFile("MyProject.nbi", "NBi.Testing.Unit.UI.Configuration.Resources.MyProject.nbi");
-
-            //Call the method to test
-            Project.Load(filename);
-
-            //Assertion
-            Assert.That(Project.Directories[DirectoryCollection.DirectoryType.Metadata].FullFileName,
+            //Call the method to test
+            Project.Load(ProjectFilename);
+
+            //Assertion
+            Assert.That(Project.Directories[DirectoryCollection.DirectoryType.Metadata].FullFileName,
                 Is.EqualTo(@"C:\Users\Seddryck\Documents\TestCCH\Metadata\metadata.xls"));
-            Assert.That(Project.Directories[DirectoryCollection.DirectoryType.Query].FullFileName,
+            Assert.That(Project.Directories[DirectoryCollection.DirectoryType.Query].FullFileName,
                 Is.EqualTo(@"C:\Users\Seddryck\Documents\TestCCH\Query\"));
             Assert.That(Project.Directories[DirectoryCollection.DirectoryType.Expect].FullFileName,
                 Is.EqualTo(@"C:\Users\Seddryck\Documents\TestCCH\Expect\"));
@@ -77,15 +73,12 @@
         [Test]
         public void Load_CorrectFile_ConnectionStringLoaded()
         {
-            //Buiding object used during test
-            var filename = DiskOnFile.CreatePhysicalFile("MyProject.nbi", "NBi.Testing.Unit.UI.Configuration.Resources.MyProject.nbi");
-
-            //Call the method to test
-            Project.Load(filename);
+            //Call the method to test
+            Project.Load(ProjectFilename);

             //Assertion
             Assert.That(Project.ConnectionStrings[
-                ConnectionStringCollection.ConnectionClass.Adomd,
+                ConnectionStringCollection.ConnectionClass.Adomd,
                 ConnectionStringCollection.ConnectionType.Expect
                 ].Value,
                 Is.EqualTo("Data Source=localhost;Catalog=\"Finances Analysis\";"));
@@ -107,7 +100,7 @@
         public void Save_Root_CorrectFileContent()
         {
             //Buiding object used during test
-            var filename = DiskOnFile.GetDirectoryPath() + @"\MyProject.nbi";
+            var filename = DiskOnFile.GetDirectoryPath() + @"\MyProject-" + MethodBase.GetCurrentMethod().Name + ".nbi";

             Project.Directories.Root = @"C:\Root\Root\";
             Project.Directories[DirectoryCollection.DirectoryType.Metadata].Path = @"C:\MetadataPath\";
@@ -129,7 +122,7 @@
         public void Save_DirectoryPathAndFile_CorrectFileContent()
         {
             //Buiding object used during test
-            var filename = DiskOnFile.GetDirectoryPath() + @"\MyProject.nbi";
+            var filename = DiskOnFile.GetDirectoryPath() + @"\MyProject-" + MethodBase.GetCurrentMethod().Name + ".nbi";

             Project.Directories[DirectoryCollection.DirectoryType.Metadata].Path = @"C:\MetadataPath\";
             Project.Directories[DirectoryCollection.DirectoryType.Metadata].File = @"MetadataFile.xls";
@@ -151,7 +144,7 @@
         public void Save_DirectoryPath_CorrectFileContent()
         {
             //Buiding object used during test
-            var filename = DiskOnFile.GetDirectoryPath() + @"\MyProject.nbi";
+            var filename = DiskOnFile.GetDirectoryPath() + @"\MyProject-" + MethodBase.GetCurrentMethod().Name + ".nbi";

             Project.Directories[DirectoryCollection.DirectoryType.Metadata].Path = @"C:\MetadataPath\";
             Project.Directories[DirectoryCollection.DirectoryType.Metadata].File = @"";
@@ -172,7 +165,7 @@
         public void Save_ConnectionStringOledbExpect_CorrectFileContent()
         {
             //Buiding object used during test
-            var filename = DiskOnFile.GetDirectoryPath() + @"\MyProject.nbi";
+            var filename = DiskOnFile.GetDirectoryPath() + @"\MyProject-" + MethodBase.GetCurrentMethod().Name + ".nbi";

             Project.ConnectionStrings[
                 ConnectionStringCollection.ConnectionClass.Oledb,
@@ -196,7 +189,7 @@
         public void Save_ConnectionStringAdomdExpect_CorrectFileContent()
         {
             //Buiding object used during test
-            var filename = DiskOnFile.GetDirectoryPath() + @"\MyProject.nbi";
+            var filename = DiskOnFile.GetDirectoryPath() + @"\MyProject-" + MethodBase.GetCurrentMethod().Name + ".nbi";

             Project.ConnectionStrings[
                 ConnectionStringCollection.ConnectionClass.Adomd,
@@ -219,7 +212,7 @@
         public void Save_ConnectionStringOledbActual_CorrectFileContent()
         {
             //Buiding object used during test
-            var filename = DiskOnFile.GetDirectoryPath() + @"\MyProject.nbi";
+            var filename = DiskOnFile.GetDirectoryPath() + @"\MyProject-" + MethodBase.GetCurrentMethod().Name + ".nbi";

             Project.ConnectionStrings[
                 ConnectionStringCollection.ConnectionClass.Oledb,


Attempt to fix the avatar's height being set incorrectly during a teleport.

--- OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -2354,7 +2354,7 @@
                 m_pos = cAgent.Position;
                 Velocity = cAgent.Velocity;
                 m_CameraCenter = cAgent.Center;
-                //m_avHeight = cAgent.Size.Z;
+                SetHeight (cAgent.Size.Z);
                 m_CameraAtAxis = cAgent.AtAxis;
                 m_CameraLeftAxis = cAgent.LeftAxis;
                 m_CameraUpAxis = cAgent.UpAxis;
@@ -2368,9 +2368,7 @@
                 m_bodyRot = cAgent.BodyRotation;
                 m_AgentControlFlags = (AgentManager.ControlFlags)cAgent.ControlFlags;
                 m_savedVelocity = cAgent.Velocity;
-
-                //if (m_scene.Permissions.IsGod(new UUID(cAgent.AgentID)))
-                //    m_godLevel = cAgent.GodLevel;
+
                 SpeedModifier = cAgent.Speed;
                 DrawDistance = cAgent.DrawDistance;
                 m_setAlwaysRun = cAgent.AlwaysRun;


More VCC fixes

More VCC fixes

--- OpenUtau.Plugin.Builtin/ENDeltaVer2Phonemizer.cs
+++ OpenUtau.Plugin.Builtin/ENDeltaVer2Phonemizer.cs
@@ -254,13 +254,15 @@
                         var vcc = $"{prevV} {string.Join("", cc.Take(i))}";
                         var vcc2 = $"{prevV}{string.Join(" ", cc.Take(2))}";
                         var vcc3 = $"{prevV}{string.Join(" ", cc.Take(i))}";
+                        var cc1 = $"{string.Join(" ", cc.Take(2))}";
+                        var cc2 = $"{string.Join("", cc.Take(2))}";
                         if (i == 0) {
                             phonemes.Add($"{prevV} -");
                         } else if (HasOto(vcc, syllable.tone)) {
                             phonemes.Add(vcc);
                             firstC = i - 1;
                             break;
-                        } else if (HasOto(vcc2, syllable.tone)) {
+                        } else if (HasOto(vcc2, syllable.tone) && !(HasOto(cc1, syllable.tone)) && !(HasOto(cc2, syllable.tone))) {
                             phonemes.Add(vcc2);
                             firstC = i - 2;
                             break;


Component selection was missing from 'add/change information' form.

git-svn-id: f68c6b3b1dcd5d00a2560c384475aaef3bc99487@149 af82e41b-90c4-0310-8c96-b1721e28e2e2

--- templates/ticket.cs
+++ templates/ticket.cs
@@ -139,6 +139,13 @@

+      Component:
+
+        <?cs call:hdf_select(ticket.components, "component",
+                             ticket.component) ?>
+
+

+

       Severity:

         <?cs call:hdf_select(enums.severity, "severity",
@@ -155,6 +162,7 @@
         <?cs var:ticket.resolution ?>

     <?cs /if ?>
+


Component selection was missing from 'add/change information' form.

git-svn-id: 0d96b0c1a6983ccc08b3732614f4d6bfcf9cbb42@149 af82e41b-90c4-0310-8c96-b1721e28e2e2


+ maybe just can't make new dirs in this function?

--- bigdataanalytics-azurefunction/services/DataLakeService.csx
+++ bigdataanalytics-azurefunction/services/DataLakeService.csx
@@ -76,7 +76,7 @@
         string localFolderPath = workingDir + @"uploads\";
         string localFilePath = Path.Combine(localFolderPath, localFileName);

-        string remoteFilePath = Path.Combine(_adlsPermittedDir + "neoPath/", "newFileFromNewParams");
+        string remoteFilePath = Path.Combine(_adlsPermittedDir + "/", "newFileFromNewParams");
         bool force = true;

         UploadParameters parameters;


version bump to 4.1.0

version bump to 4.1.0

--- src/Horton/Properties/AssemblyInfo.cs
+++ src/Horton/Properties/AssemblyInfo.cs
@@ -8,4 +8,4 @@

 [assembly: ComVisible(false)]

-[assembly: AssemblyVersion("4.0.0")]
+[assembly: AssemblyVersion("4.1.0")]


fix. it's always an object

fix. it's always an object

--- ARKBreedingStats/FileService.cs
+++ ARKBreedingStats/FileService.cs
@@ -223,7 +223,7 @@

             //try
             //{
-            //    Newtonsoft.Json.Linq.JToken.Parse(fileContent);
+            //    Newtonsoft.Json.Linq.JObject.Parse(fileContent);
             //    return true;
             //}
             //catch { return false; }


Try 2 times

Try 2 times

--- src/NadekoBot/ShardedDiscordClient.cs
+++ src/NadekoBot/ShardedDiscordClient.cs
@@ -90,10 +90,15 @@
                     await c.ConnectAsync().ConfigureAwait(false);
                     _log.Info($"Shard #{c.ShardId} connected.");
                 }
-                catch (Exception ex)
+                catch
                 {
                     _log.Error($"Shard #{c.ShardId} FAILED CONNECTING.");
-                    _log.Error(ex);
+                    try { await c.ConnectAsync().ConfigureAwait(false); }
+                    catch (Exception ex2)
+                    {
+                        _log.Error($"Shard #{c.ShardId} FAILED CONNECTING TWICE.");
+                        _log.Error(ex2);
+                    }
                 }
             }
         }


Bug fix: type names were being serialized to json as 'Nest.Resolvers.TypeNameMarkers' rather than type names

--- src/Nest/ElasticClient-MultiSearch.cs
+++ src/Nest/ElasticClient-MultiSearch.cs
@@ -35,7 +35,7 @@
 							multiSearchDescriptor._FixedIndex ??
 				            new IndexNameResolver(this._connectionSettings).GetIndexForType(operation._ClrType);

-				var types = operation._Types.HasAny() ? string.Join(",", operation._Types) : null;
+				var types =  operation._Types.HasAny() ? string.Join(",", operation._Types.Select(x => x.Resolve(this.Settings)) ) : null;

 				var typeName = types
 							   ?? multiSearchDescriptor._FixedType


updated version to 0.7

updated version to 0.7

--- src/Nvents/Properties/AssemblyInfo.cs
+++ src/Nvents/Properties/AssemblyInfo.cs
@@ -12,4 +12,4 @@

 [assembly: ComVisible(false)]

-[assembly: AssemblyVersion("0.6.*")]
+[assembly: AssemblyVersion("0.7.*")]


Reduce the number of slice operations performed during an Advance, when those slices were used only for their length.

--- src/Parsley/ReadOnlySpanExtensions.cs
+++ src/Parsley/ReadOnlySpanExtensions.cs
@@ -9,11 +9,13 @@

     public static void Advance(this ref ReadOnlySpan<char> input, ref int index, int length)
     {
-        var traversed = input.Peek(length);
+        var traversed = length >= input.Length
+            ? input.Length
+            : length;

-        input = input.Slice(traversed.Length);
+        input = input.Slice(traversed);

-        index += traversed.Length;
+        index += traversed;
     }

     public static ReadOnlySpan<char> TakeWhile(this ref ReadOnlySpan<char> input, Predicate<char> test)


Accept any field value as being significant

See https://github.com/cassidydotdk/Rainbow/blob/3acc34c1f2dbd1594338f3903da5a2527f891a6e/src/Rainbow.Storage.Sc/FieldReader.cs#L47

@cassidydotdk y u no PR :D

Ref: https://github.com/kamsar/Unicorn/issues/151

--- src/Rainbow.Storage.Sc/FieldReader.cs
+++ src/Rainbow.Storage.Sc/FieldReader.cs
@@ -44,7 +44,8 @@

 				var value = field.GetValue(allowDefaultValue: false, allowStandardValue: false);

-				if (!string.IsNullOrEmpty(value))
+				// @cassidydotdk: 07-June-2016: If there is a value (and it's not coming from std values or elsewhere), it is significant
+				if (value != null)
 				{
 					fieldResults.Add(CreateFieldValue(field, value));
 					continue;


Added helper method to open URL

Added helper method to open URL

--- src/DialogHelper.cs
+++ src/DialogHelper.cs
@@ -1,4 +1,5 @@
-using System.Windows.Forms;
+using System.Diagnostics;
+using System.Windows.Forms;

 namespace CodeTitans.Signature
 {
@@ -40,5 +41,16 @@

             return openFile;
         }
+
+        /// <summary>
+        /// Opens a default web-browser with specified URL.
+        /// </summary>
+        public static void StartURL(string url)
+        {
+            if (string.IsNullOrEmpty(url) || !(url.StartsWith("http://") || url.StartsWith("https://")))
+                return;
+
+            Process.Start(url);
+        }
     }
 }


Implemented adding a transient observer

Implemented adding a transient observer

--- AngleSharp/DOM/Node.cs
+++ AngleSharp/DOM/Node.cs
@@ -724,10 +724,7 @@
                     previousSibling: oldPreviousSibling,
                     nextSibling: node.NextSibling));

-                //TODO Mutation
-                // For each ancestor ancestor of node, if ancestor has any registered observers whose options's subtree is true,
-                // then for each such registered observer registered, append a transient registered observer whose observer and
-                // options are identical to those of registered and source which is registered to node's list of registered observers.
+                _owner.AddTransientObserver(node);
             }

             RemoveNode(index, node);


:apple:  修复一些错误。补发！ :bulb:

:apple:  修复一些错误。补发！ :bulb:

--- src/ObjectAccess.cs
+++ src/ObjectAccess.cs
@@ -322,8 +322,6 @@
 					var item = tablevalues.FirstOrDefault();
 					parameter.Paging.TotalCount = Zongsoft.Common.Convert.ConvertValue<int>(item.Values.First());

-					if(parameter.Paging.PageIndex > parameter.Paging.PageCount)
-						parameter.Paging.PageIndex = parameter.Paging.PageCount;
 				}
 			}

@@ -360,6 +358,9 @@
 				sql = CreateSelectSql(subparameter);
 			}

+			//if(parameter.Paging != null && parameter.Paging.PageIndex > parameter.Paging.PageCount)
+			//	parameter.Paging.PageIndex = parameter.Paging.PageCount;
+
 			return new CreateSqlResult(sql, values);
 		}

@@ -571,7 +572,6 @@
 			if(entities == null)
 				return 0;

-			var includes = this.ResolveScope(name, scope, null);
 			var info = MappingInfo.ClassNodeList.FirstOrDefault(p => p.Name.Equals(name, StringComparison.OrdinalIgnoreCase));
 			if(info == null)
 				throw new Exception(string.Join("未找到{0}对应的Mapping", name));
@@ -584,6 +584,10 @@
 			var tableName = CreateClassInfo("", info).GetTableName();
 			foreach(var item in entities)
 			{
+				if(item == null)
+					continue;
+
+				var includes = this.ResolveScope(name, scope, item.GetType());
 				Dictionary<PropertyNode, object> pks;
 				var dic = GetColumnFromEntity(info, item, null, out pks).Where(p => p.Value != null && includes.Contains(p.Key.Name, StringComparer.OrdinalIgnoreCase)).ToDictionary(p => p.Key, p => p.Value);

@@ -630,11 +634,6 @@
 			if(string.IsNullOrEmpty(name))
 				throw new ArgumentNullException("name");

-			var members = this.ResolveScope(name, scope, null);
-
-			if(members == null || members.Length == 0)
-				throw new ArgumentNullException("members");
-
 			var info = MappingInfo.ClassNodeList.FirstOrDefault(p => p.Name.Equals(name, StringComparison.OrdinalIgnoreCase));
 			if(info == null)
 				throw new Exception(string.Join("未找到{0}对应的Mapping", name));
@@ -663,6 +662,14 @@

 			foreach(var entity in entities)
 			{
+				if(entity == null)
+					continue;
+
+				var members = this.ResolveScope(name, scope, entity.GetType());
+
+				if(members == null || members.Length == 0)
+					throw new ArgumentNullException("members");
+
 				Dictionary<PropertyNode, object> pks;
 				var dic = GetColumnFromEntity(info, entity, members, out pks);


Generate drafts correctly as named html files

--- src/Snow/Program.cs
+++ src/Snow/Program.cs
@@ -304,7 +304,7 @@

                 var outputFolder = Path.Combine(output, post.Url.Trim('/')); //Outputfolder is incorrect with leading slash on urlFormat
                 var outputFile = Path.Combine(outputFolder, "index.html");
-
+
                 if (outputFolder.IsFileUrl())
                 {
                     outputFile = outputFolder;
@@ -316,7 +316,7 @@
                     Directory.CreateDirectory(outputFolder);
                 }

-                File.WriteAllText(outputFile, body);
+                File.WriteAllText(outputFile, body);
             }
             catch (Exception)
             {
@@ -339,13 +339,20 @@
                 var body = result.Body.AsString();

                 var outputFolder = Path.Combine(output, post.Url.Trim('/')); //Outputfolder is incorrect with leading slash on urlFormat
+                var outputFile = Path.Combine(outputFolder, "index.html");
+
+                if (outputFolder.IsFileUrl())
+                {
+                    outputFile = outputFolder;
+                    outputFolder = Path.GetDirectoryName(outputFolder);
+                }

                 if (!Directory.Exists(outputFolder))
                 {
                     Directory.CreateDirectory(outputFolder);
                 }

-                File.WriteAllText(Path.Combine(outputFolder, "index.html"), body);
+                File.WriteAllText(outputFile, body);
             }
             catch (Exception)
             {


whitespace test fix in WriterWritesStructureTest

--- test/indice.Edi.Tests/EdiTextWriterTests.cs
+++ test/indice.Edi.Tests/EdiTextWriterTests.cs
@@ -26,7 +26,7 @@
         public void WriterWritesStructureTest() {
             var grammar = EdiGrammar.NewEdiFact();
             var expected = new StringBuilder().AppendLine("UNA:+.? '")
-                                              .AppendLine("UNB +UNOC:3+1234567891123:14+7080005059275:14:SPOTMARKED+101012:1104+HBQ001++++1'")
+                                              .AppendLine("UNB+UNOC:3+1234567891123:14+7080005059275:14:SPOTMARKED+101012:1104+HBQ001++++1'")
                                               .AppendLine("UNH+1+QUOTES:D:96A:UN:EDIEL2+S'");
             var output = new StringBuilder();
             using (var writer = new EdiTextWriter(new StringWriter(output), grammar)) {


Added a (skipped) test for the Turkish I reported in #10

--- tests/Slugify.Core.Tests/SlugHelperTests.cs
+++ tests/Slugify.Core.Tests/SlugHelperTests.cs
@@ -1,4 +1,5 @@
 using System;
+using System.Globalization;
 using Xunit;

 namespace Slugify.Tests
@@ -412,5 +413,19 @@

             Assert.Equal(expected, helper.GenerateSlug(original));
         }
+
+        [Fact(Skip = "Is this actually a bug?")]
+        public void TurkishEncodingOfI()
+        {
+            //Set culture to Turkish
+            CultureInfo.CurrentCulture = new CultureInfo("tr-TR");
+            const string original = "FIFA 18";
+            const string expected = "fıfa 18";
+
+            var helper = Create();
+
+            Assert.Equal(expected, helper.GenerateSlug(original));
+
+        }
     }
 }


fix for bad index buffer init.

fix for bad index buffer init.

--- cocos2d/platform/CCDrawManager.cs
+++ cocos2d/platform/CCDrawManager.cs
@@ -1513,7 +1513,7 @@
                 _indexBuffer.Dispose();
             }

-            _indexBuffer = new IndexBuffer(CCDrawManager.GraphicsDevice, typeof(T), _data.Count, _usage);
+            _indexBuffer = new IndexBuffer(CCDrawManager.GraphicsDevice, typeof(T), _data.Capacity, _usage);

             UpdateBuffer();
         }


Test that shows the lifting failure

Test that shows the lifting failure

#21

--- LINQToTTree/LINQToTTreeLib.Tests/Optimization/CommonStatementLifterTest.cs
+++ LINQToTTree/LINQToTTreeLib.Tests/Optimization/CommonStatementLifterTest.cs
@@ -241,6 +241,54 @@
             Assert.AreEqual(p3.ParameterName, redoneAssign.ResultVariable.ParameterName);
             Assert.AreEqual(p1.ParameterName, redoneAssign.Expression.ToString());
         }
+
+        /// <summary>
+        /// Slightly different statement, but same value, in both places. Lift should occur, and rename
+        /// of variables should also happen correctly.
+        /// </summary>
+        [TestMethod]
+        public void TestStatementOutAndInIfWithSeperateDecl()
+        {
+            var gc = new GeneratedCode();
+            gc.SetResult(DeclarableParameter.CreateDeclarableParameterExpression(typeof(double)));
+
+            var p1 = DeclarableParameter.CreateDeclarableParameterExpression(typeof(int));
+            var assign1 = new StatementAssign(p1, new ValSimple("f", typeof(int)), new IDeclaredParameter[] { }, true);
+            gc.Add(assign1);
+
+            var ifstatement = new StatementFilter(new ValSimple("i", typeof(int)));
+            gc.Add(ifstatement);
+
+            var p2 = DeclarableParameter.CreateDeclarableParameterExpression(typeof(int));
+            gc.Add(p2);
+            var assign2 = new StatementAssign(p2, new ValSimple("f", typeof(int)), new IDeclaredParameter[] { }, true);
+            gc.Add(assign2);
+
+            var p3 = DeclarableParameter.CreateDeclarableParameterExpression(typeof(int));
+            var assign3 = new StatementAssign(p3, p2, new IDeclaredParameter[] { }, true);
+            gc.Add(assign3);
+
+
+            var cc = new CombinedGeneratedCode();
+            cc.AddGeneratedCode(gc);
+
+            Console.WriteLine("Before optimization:");
+            cc.DumpCodeToConsole();
+
+            CommonStatementLifter.Optimize(cc);
+
+            Console.WriteLine();
+            Console.WriteLine("After optimization:");
+            cc.DumpCodeToConsole();
+
+            var block1 = cc.QueryCode().First();
+            var firstAssignment = block1.Statements.First() as StatementAssign;
+            Assert.IsNotNull(firstAssignment, "first assignment");
+            var backIfStatement = block1.Statements.Skip(1).First() as StatementFilter;
+            Assert.IsNotNull(backIfStatement, "if statement there");
+            Assert.AreEqual(0, backIfStatement.DeclaredVariables.Count(), "lifted variables should no longer be declared here");
+        }
+
         /// <summary>
         /// A pair of the same statements, in both places. The lift should occur.
         /// </summary>


Fix date format of the birthdates to conform to what the client expects

--- OpenSim/Region/Environment/Modules/Avatar/Profiles/AvatarProfilesModule.cs
+++ OpenSim/Region/Environment/Modules/Avatar/Profiles/AvatarProfilesModule.cs
@@ -26,6 +26,7 @@
  */

 using System;
+using System.Globalization;
 using System.Reflection;
 using OpenMetaverse;
 using log4net;
@@ -108,7 +109,7 @@
                 }

                 remoteClient.SendAvatarProperties(profile.ID, profile.AboutText,
-                                                  Util.ToDateTime(profile.Created).ToString(),
+                                                  Util.ToDateTime(profile.Created).ToString("M/d/yyyy", CultureInfo.InvariantCulture),
                                                   charterMember, profile.FirstLifeAboutText, (uint)(profile.UserFlags & 0xff),
                                                   profile.FirstLifeImage, profile.Image, String.Empty, profile.Partner);
             }


Setting of current municipality name in DBR

--- PART/Source/CprBroker/DBR/Extensions/CprConverterExtensions.PersonTotal.cs
+++ PART/Source/CprBroker/DBR/Extensions/CprConverterExtensions.PersonTotal.cs
@@ -89,12 +89,10 @@
                             pt.CityName = resp.ClearWrittenAddress.CityName;
                         else
                             pt.CityName = null;
+
+                        pt.CurrentMunicipalityName = CprBroker.Providers.CPRDirect.Authority.GetAuthorityNameByCode(pt.MunicipalityCode.ToString());
                     }
                 }
-                /*
-                 * TODO: FIX THE METHOD IN AUTHORITY!!!
-                 */
-                //pt.CurrentMunicipalityName = CprBroker.Providers.CPRDirect.Authority.GetNameByCode(pt.MunicipalityCode.ToString());
             }

             // TODO: Get from protection records


Lucky Egg message recovery

Lucky Egg message recovery

--- PoGo.PokeMobBot.Logic/Tasks/EvolvePokemonTask.cs
+++ PoGo.PokeMobBot.Logic/Tasks/EvolvePokemonTask.cs
@@ -42,6 +42,10 @@
                     else
                     {
                         // Wait until we have enough pokemon
+                        session.EventDispatcher.Send(new NoticeEvent()
+                        {
+                            Message = $"Not enough Pokemon to trigger a lucky egg. Waiting for {session.LogicSettings.UseLuckyEggsMinPokemonAmount - pokemonToEvolve.Count} more ({pokemonToEvolve.Count}/{session.LogicSettings.UseLuckyEggsMinPokemonAmount})"
+                        });
                         return;
                     }
                 }


Added try/catch block to OverseerRoggle Write method, it will now try to create a file named overseer.log if it can't send log to Overseer website

--- src/Roggle.Overseer/OverseerRoggle.cs
+++ src/Roggle.Overseer/OverseerRoggle.cs
@@ -1,4 +1,5 @@
 using System;
+using System.IO;
 using System.Net.Http;
 using System.Net.Http.Headers;

@@ -21,30 +22,49 @@

         public override void Write(string message, RoggleLogLevel level)
         {
-            var newEvent = new OverseerEvent()
+            try
             {
-                Description = message,
-                Name = Source,
-                UserId = Key,
-                Level =
+                var newEvent = new OverseerEvent()
+                {
+                    Description = message,
+                    Name = Source,
+                    UserId = Key,
+                    Level =
                     level == RoggleLogLevel.Critical ? OverseerEventLevel.Critical :
                     level == RoggleLogLevel.Debug ? OverseerEventLevel.Debug :
                     level == RoggleLogLevel.Error ? OverseerEventLevel.Error :
                     level == RoggleLogLevel.Info ? OverseerEventLevel.Information :
                     level == RoggleLogLevel.Warning ? OverseerEventLevel.Warning :
                     OverseerEventLevel.Debug
-            };
+                };

-            using (var client = new HttpClient())
+                using (var client = new HttpClient())
+                {
+                    client.BaseAddress = new Uri(Url);
+                    client.DefaultRequestHeaders.Accept.Clear();
+                    client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
+
+                    var response = AsyncHelper.RunSync(() => client.PostAsJsonAsync("api/events", newEvent));
+                    if (!response.IsSuccessStatusCode)
+                    {
+                        throw new RoggleException($"Overseer return an error '{response.StatusCode}: {response.ReasonPhrase}'.");
+                    }
+                }
+            }
+            catch (Exception e)
             {
-                client.BaseAddress = new Uri(Url);
-                client.DefaultRequestHeaders.Accept.Clear();
-                client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
-
-                var response = AsyncHelper.RunSync(() => client.PostAsJsonAsync("api/events", newEvent));
-                if (!response.IsSuccessStatusCode)
+                try
                 {
-                    throw new RoggleException($"Overseer return an error '{response.StatusCode}: {response.ReasonPhrase}'.");
+                    // Try to write a overseer.log
+                    var content =
+                        $"Something goes wrong while trying to log to Overseer: {e.Message}.{Environment.NewLine}" +
+                        $"RoggleOverseer wanted to write the following error:{Environment.NewLine}" +
+                        $"{Source} - {message}";
+                    File.WriteAllText("overseer.log", content);
+                }
+                catch
+                {
+                    // Nothing else to do ...
                 }
             }
         }


Update for Sandra.Snow

Update for Sandra.Snow

--- Somedave/Views/Blog/Posts/a-survey-of-dotnet-static-site-generators.cshtml
+++ Somedave/Views/Blog/Posts/a-survey-of-dotnet-static-site-generators.cshtml
@@ -124,7 +124,7 @@
         @row.TableData("JSON config file")
         @row.TableData("At top of file")
         @row.TableData("Razor, Markdown")
-        @row.TableData("None")
+        @row.TableData("Embedded web server, regeneration on file change")
         @row.TableData("Sparse")
     }
 }


Optimize SortedSetValue<T>.GetHashCode When we happen to be using the default comparer for the type, we now use the default equality comparer for the type to aggregate the hash code.

--- Source/AirBreather.Common/AirBreather.Common/Collections/SortedSetValue.cs
+++ Source/AirBreather.Common/AirBreather.Common/Collections/SortedSetValue.cs
@@ -50,6 +50,14 @@
             // We can actually do better than returning right now unconditionally, because
             // many IComparer<T> implementations also happen to implement IEqualityComparer<T>.
             IEqualityComparer<T> equalityComparer = underlyingSet.KeyComparer as IEqualityComparer<T>;
+
+            // Otherwise, if we happen to be using the default comparer for the type, then
+            // we should be able to assume that GetHashCode() is consistent.
+            if (equalityComparer == null && Equals(underlyingSet.KeyComparer, Comparer<T>.Default))
+            {
+                equalityComparer = EqualityComparer<T>.Default;
+            }
+
             if (equalityComparer != null)
             {
                 foreach (T element in underlyingSet)


[Social] Fixed localization for discussion lists.

--- Source/GSoft.Dynamite.Social.Core/Configuration/SocialDiscussionsConfig.cs
+++ Source/GSoft.Dynamite.Social.Core/Configuration/SocialDiscussionsConfig.cs
@@ -26,6 +26,7 @@
                     SocialResources.DiscussionsListTitle,
                     SocialResources.DiscussionsListDescription)
                     {
+                        ResourceFileName = SocialResources.Global,
                         ListTemplateInfo = BuiltInListTemplates.DiscussionsList
                     };
             }


d

d

Signed-off-by: Emmanuel Mathot <367ff60fe70ac02365998fe620af37ff67ae3274@gmail.com>

--- Terradue.OpenSearch/Terradue/OpenSearch/Response/HttpOpenSearchResponse.cs
+++ Terradue.OpenSearch/Terradue/OpenSearch/Response/HttpOpenSearchResponse.cs
@@ -52,7 +52,6 @@
         public override object GetResponseObject() {
             if (payload == null) {
                 using (var ms = new MemoryStream()) {
-                    webResponse.GetResponseStream().Seek(0, SeekOrigin.Begin);
                     webResponse.GetResponseStream().CopyTo(ms);
                     payload = ms.ToArray();
                 }
@@ -61,7 +60,7 @@
         }

         public override object Clone() {
-            return new HttpOpenSearchResponse(webResponse, requestTime);
+            return new MemoryOpenSearchResponse(payload, ContentType);
         }

         #endregion


Fix whitespace errors.

Fix whitespace errors.

--- Tomboy/Addins/NoteDirectoryWatcher/NoteDirectoryWatcherApplicationAddin.cs
+++ Tomboy/Addins/NoteDirectoryWatcher/NoteDirectoryWatcherApplicationAddin.cs
@@ -27,7 +27,7 @@
 		{
 			string note_path = Tomboy.DefaultNoteManager.NoteDirectoryPath;

-			file_change_records = new Dictionary<string, NoteFileChangeRecord>();
+			file_change_records = new Dictionary<string, NoteFileChangeRecord> ();

 			file_system_watcher = new FileSystemWatcher (note_path);

@@ -52,10 +52,7 @@

 		public override bool Initialized
 		{
-			get
-			{
-				return initialized;
-			}
+			get { return initialized; }
 		}

 		private void HandleFileSystemErrorEvent (Object sender, ErrorEventArgs arg)
@@ -64,65 +61,45 @@
 		}

 		private void HandleFileSystemChangeEvent (Object sender, FileSystemEventArgs arg)
-		{
-			string note_id = GetId(arg.FullPath);
+		{
+			string note_id = GetId (arg.FullPath);

 			if (VERBOSE_LOGGING)
-			{
 				Logger.Debug ("{0} has {1} (note_id={2})", arg.FullPath, arg.ChangeType, note_id);
-			}

 			// If the note_id is long 36 characters then the file probably wasn't a note.
-			if (note_id.Length != 36)
-			{
+			if (note_id.Length != 36) {
 				if (VERBOSE_LOGGING)
-				{
 					Logger.Debug ("Ignoring change to {0}", arg.FullPath);
-				}

 				return;
 			}

 			// Record that the file has been added/changed/deleted.  Adds/changes trump
 			// deletes.  Record the date.
-			lock (file_change_records)
-			{
+			lock (file_change_records) {
 				NoteFileChangeRecord record = null;

-				if (file_change_records.ContainsKey (note_id))
-				{
-					record = file_change_records[note_id];
-				}
-				else
-				{
+				if (file_change_records.ContainsKey (note_id)) {
+					record = file_change_records [note_id];
+				} else {
 					record = new NoteFileChangeRecord ();
-					file_change_records[note_id] = record;
+					file_change_records [note_id] = record;
 				}

-				if (arg.ChangeType == WatcherChangeTypes.Changed)
-				{
+				if (arg.ChangeType == WatcherChangeTypes.Changed) {
 					record.changed = true;
 					record.deleted = false;
-				}
-				else if (arg.ChangeType == WatcherChangeTypes.Created)
-				{
+				} else if (arg.ChangeType == WatcherChangeTypes.Created) {
 					record.changed = true;
 					record.deleted = false;
-				}
-				else if (arg.ChangeType == WatcherChangeTypes.Renamed)
-				{
+				} else if (arg.ChangeType == WatcherChangeTypes.Renamed) {
 					record.changed = true;
 					record.deleted = false;
-				}
-				else if (arg.ChangeType == WatcherChangeTypes.Deleted)
-				{
+				} else if (arg.ChangeType == WatcherChangeTypes.Deleted) {
 					if (!record.changed)
-					{
 						record.deleted = true;
-					}
-				}
-				else
-				{
+				} else {
 					String message = "Unexpected WatcherChangeType " + arg.ChangeType;
 					Logger.Error (message);
 					throw new Exception (message);
@@ -136,36 +113,25 @@

 		private bool HandleTimeout ()
 		{
-			lock (file_change_records)
-			{
+			lock (file_change_records) {
 				List<string> keysToRemove = new List<string> (file_change_records.Count);

-				foreach (KeyValuePair<string, NoteFileChangeRecord> pair in file_change_records)
-				{
+				foreach (KeyValuePair<string, NoteFileChangeRecord> pair in file_change_records)  {
 					if (VERBOSE_LOGGING)
-					{
 						Logger.Debug ("Handling (timeout) {0}", pair.Key);
-					}

-					if (DateTime.Now > pair.Value.last_change.Add (new TimeSpan (4000)) )
-					{
-						if (pair.Value.deleted)
-						{
+					if (DateTime.Now > pair.Value.last_change.Add (new TimeSpan (4000)) ) {
+						if (pair.Value.deleted)
 							DeleteNote (pair.Key);
-						}
 						else
-						{
 							AddOrUpdateNote (pair.Key);
-						}

 						keysToRemove.Add (pair.Key);
 					}
 				}

-				foreach (string note_id in keysToRemove)
-				{
+				foreach (string note_id in keysToRemove)
 					file_change_records.Remove (note_id);
-				}
 			}

 			return false;
@@ -193,14 +159,11 @@

 			Note note = Tomboy.DefaultNoteManager.FindByUri (note_uri);

-			if (note == null)
-			{
+			if (note == null) {
 				Logger.Debug ("Adding {0} because file changed.", note_id);
 				Note new_note = Note.Load (note_path, Tomboy.DefaultNoteManager);
 				Tomboy.DefaultNoteManager.Notes.Add (new_note);
-			}
-			else
-			{
+			} else {
 				NoteData data = NoteArchiver.Instance.ReadFile (note_path, note_uri);

 				// Only record changes if the note actually changes.  This prevents the Addin from
@@ -208,12 +171,8 @@
 				if (data.Text == note.XmlContent)
 				{
 					if (VERBOSE_LOGGING)
-					{
 						Logger.Debug ("Ignoring {0} because contents identical", note_id);
-					}
-				}
-				else
-				{
+				} else  {
 					Logger.Debug ("Updating {0} because file changed.", note_id);
 					note.XmlContent = data.Text;
 					note.Title = data.Title;


Fixed small error: making changes without compiling is too much error prone/  --iVersion iPhone Client ***

--- src/Subtext.Web/UI/Controls/Search.cs
+++ src/Subtext.Web/UI/Controls/Search.cs
@@ -29,7 +29,7 @@
     {
         public Search()
         {
-            MaxResults = 100;
+            MaxResultsCount = 100;
         }

         public ISearchEngineService SearchEngineService


Update index.cshtml

Update index.cshtml

--- SITE/index.cshtml
+++ SITE/index.cshtml
@@ -6,10 +6,10 @@
 	double [] T = new double [N];
 	double [] X = new double [N];
 	String data = "";
-	String chart = "";
+	bool showChart = false;
 	if(IsPost)
 	{
-		chart = "

";
+		showChart = true;
 		var num = Request["text1"];
 		double z_0 = 0;
 		double z_d = num.AsInt();
@@ -93,6 +93,10 @@
 			<input type="text" name="text1" />

<input type="submit" value=" Add " />

 	</form>
+	@if (showChart)
+	{
+

+	}
     @chart


Fix Color Math help message typo.

Fix Color Math help message typo.

--- TwitchPlaysAssembly/Src/ComponentSolvers/Helpers/ComponentSolverFactory.cs
+++ TwitchPlaysAssembly/Src/ComponentSolvers/Helpers/ComponentSolverFactory.cs
@@ -301,7 +301,7 @@
 		ModComponentSolverInformation["ChessModule"] = new ModuleInformation { moduleScore = 12, helpText = "Cycle the positions with !{0} cycle. Submit the safe spot with !{0} press C2.", DoesTheRightThing = false };
 		ModComponentSolverInformation["ColourFlash"] = new ModuleInformation { moduleScore = 6, helpText = "Submit the correct response with !{0} press yes 3, or !{0} press no 5.", manualCode = "Color Flash", DoesTheRightThing = false };
 		ModComponentSolverInformation["Color Generator"] = new ModuleInformation { moduleDisplayName = "Color Generator", DoesTheRightThing = true };
-		ModComponentSolverInformation["colormath"] = new ModuleInformation { moduleScore = 9, helpText = "Set the correct number with !{0} set a,k,m,y. Submit your set answer with !{0} submit. colors are Red, Orange, Yellow, Green, Blue, Purple, Magenta, White, grAy, blackK. (note what letter is capitalized in each color.)" };
+		ModComponentSolverInformation["colormath"] = new ModuleInformation { moduleScore = 9, helpText = "Set the correct number with !{0} set a,k,m,y. Submit your set answer with !{0} submit. colors are Red, Orange, Yellow, Green, Blue, Purple, Magenta, White, grAy, blacK. (note what letter is capitalized in each color.)" };
 		ModComponentSolverInformation["combinationLock"] = new ModuleInformation { moduleScore = 5, helpText = "Submit the code using !{0} submit 1 2 3.", DoesTheRightThing = false };
 		ModComponentSolverInformation["complicatedButtonsModule"] = new ModuleInformation { moduleScore = 8, helpText = "Press the top button with !{0} press top (also t, 1, etc.)." };
 		ModComponentSolverInformation["graphModule"] = new ModuleInformation { moduleScore = 6, helpText = "Submit an answer with !{0} submit green red true false. Order is TL, TR, BL, BR." }; // Connection Check


space

space

--- Assets/Scripts/Enemies/Enemy.cs
+++ Assets/Scripts/Enemies/Enemy.cs
@@ -12,7 +12,7 @@
 	public bool IsAutoMove = true;
 	public float Speed = 10;

-	void Start()
+	void Start()
 	{
 		Game.Enemies.Add(this);
 		if(IsAutoMove == true) IsMoving = true;


Fix aiming bug

Fix aiming bug

--- Assets/Scripts/Player/Player.cs
+++ Assets/Scripts/Player/Player.cs
@@ -21,13 +21,10 @@
   }

   void Update() {
-    // `GetAxisRaw` returns the unmolested input value. We use it here to make the pill stop on a dime.
-    Vector3 movement = new Vector3(Input.GetAxisRaw("Horizontal"), 0, Input.GetAxisRaw("Vertical"));
-    Vector3 velocity = movement.normalized * trait.locomotiveSpeed;
-    playerController.Move(velocity);
-
     // The code below allows the player's "eyes" to follow the mouse movement.
     Ray ray = mainCamera.ScreenPointToRay(Input.mousePosition);
+    //  Debug.DrawLine(ray.origin, point, Color.red);
+
     // Emulate the playing surface by creating a new, flat plane. This simplifies the code as we
     // don't have to depend on the actual in-game plane.
     //
@@ -35,14 +32,26 @@
     Plane plane = new Plane(Vector3.up, Vector3.up * weaponController.weaponHold.position.y);
     float rayLength;

-    if (plane.Raycast(ray, out rayLength)) {
-      Vector3 point = ray.GetPoint(rayLength);
-//      Debug.DrawLine(ray.origin, point, Color.red);
-      playerController.LookAt(point);
+    // This function sets enter to the distance along the ray, where it intersects the plane. If the
+    // ray is parallel or pointing in the opposite direction to the plane then `Raycast()` is false
+    // and `rayLength` is 0 and negative, respectively.
+    if (!plane.Raycast(ray, out rayLength)) {
+      return;
+    }
+
+    const int threshold = 6;
+    Vector3 point = ray.GetPoint(rayLength);
+    Vector2 newPoint = new Vector2(point.x, point.z);
+    Vector2 newPosition = new Vector2(transform.position.x, transform.position.z);
+
+    playerController.LookAt(point);
+
+    if ((newPoint - newPosition).sqrMagnitude > threshold) {
       weaponController.Aim(point);
-      crossHair.transform.position = point;
-      crossHair.DetectTargets(ray);
     }
+
+    crossHair.transform.position = point;
+    crossHair.DetectTargets(ray);

     if (Input.GetMouseButton(0)) {
       weaponController.OnTriggerPull();
@@ -50,5 +59,15 @@
     else if (Input.GetMouseButtonUp(0)) {
       weaponController.OnTriggerRelease();
     }
+
+    Move();
+  }
+
+  void Move() {
+    // `GetAxisRaw` returns the unmolested input value. We use it here to make the pill stop on a
+    // dime.
+    Vector3 movement = new Vector3(Input.GetAxisRaw("Horizontal"), 0, Input.GetAxisRaw("Vertical"));
+    Vector3 velocity = movement.normalized * trait.locomotiveSpeed;
+    playerController.Move(velocity);
   }
 }


ensure none null return for Controller.selectedPageId

--- Assets/Scripts/UI/Controller.cs
+++ Assets/Scripts/UI/Controller.cs
@@ -314,7 +314,7 @@
             get
             {
                 if (_selectedIndex == -1)
-                    return null;
+                    return string.Empty;
                 else
                     return _pageIds[_selectedIndex];
             }


:open_mouth: Flugzeugbild im Angebot

:open_mouth: Flugzeugbild im Angebot

--- Autopilot/GUI/Aufträge.xaml.cs
+++ Autopilot/GUI/Aufträge.xaml.cs
@@ -18,6 +18,7 @@
 using iTextSharp.text;
 using iTextSharp.text.pdf;
 using System.IO;
+using System.Drawing;

 namespace Autopilot.GUI
 {
@@ -89,6 +90,9 @@
             Document Angebot = CreatePDF("Angebot");
             Angebot.Open();
             Angebot.Add(GetAngebotHeader());
+            iTextSharp.text.Image FlugzeugPic = GetFlugzeugImage();
+            if (FlugzeugPic != null)
+                Angebot.Add(FlugzeugPic);
             Angebot.Add(GetAngebotText());
             Angebot.Close();
         }
@@ -111,7 +115,7 @@
             var Header = new Phrase();
             Header.Add(new Chunk("Charterangebot", BoldFont));
             Header.Add(new Chunk("\n\nder", NormalFont));
-            Header.Add(new Chunk("\n\nHINOTORI Executive AG ", BoldFont));
+            Header.Add(new Chunk("\n\nHINOTORI Executive AG \n\n", BoldFont));
             HeaderTable.AddCell(Header);
             return HeaderTable;
         }
@@ -128,6 +132,53 @@
             BriefText.Add(new Chunk("\n\nHINOTORI Executive AG", NormalFont));
             return BriefText;
         }
+
+        private iTextSharp.text.Image GetFlugzeugImage()
+        {
+            SqlConnection conn = new SqlConnection(DBconnStrg);
+
+            SqlCommand cmd = new SqlCommand();
+            cmd.Connection = conn;
+
+            //Get flugzeug pic
+            cmd.CommandText = "SELECT f.flz_bild FROM termin_auftrag ta LEFT JOIN termin t ON (ta.ter_id = t.ter_id) LEFT JOIN termin_flugzeug tf ON (tf.ter_id = t.ter_id)"
+                + " LEFT JOIN flugzeug f ON (f.flz_id = tf.flz_id)"
+                + " WHERE ta.auf_id = " + FAuftragsID.ToString();
+            cmd.CommandType = System.Data.CommandType.Text;
+            conn.Open();
+            SqlDataReader ResultSet = cmd.ExecuteReader();
+            BitmapImage BitObj = new BitmapImage();
+            byte[] a = null;
+            if (ResultSet.Read())
+            {
+                a = (byte[])ResultSet["flz_bild"];
+            }
+            conn.Close();
+
+            if (a == null)
+                return null;
+            iTextSharp.text.Image pic = iTextSharp.text.Image.GetInstance(a);
+
+            if (pic.Height > pic.Width)
+            {
+                //Maximum height is 50 pixels.
+                float percentage = 0.0f;
+                percentage = 50 / pic.Height;
+                pic.ScalePercent(percentage * 100);
+            }
+            else
+            {
+                //Maximum width is 50 pixels.
+                float percentage = 0.0f;
+                percentage = 50 / pic.Width;
+                pic.ScalePercent(percentage * 100);
+            }
+
+            pic.Border = iTextSharp.text.Rectangle.BOX;
+            pic.BorderColor = iTextSharp.text.BaseColor.BLACK;
+            pic.BorderWidth = 1f;
+            return pic;
+        }
         #endregion

         private double CalculateCosts()


- Water plane fix.

- Water plane fix.

git-svn-id: 53f2a8ff3606f182ef4420064c1f4a5cdcbe6bb1@470 bb9bf1cf-960d-0410-9a3a-baeba60cf407

--- Axiom/DemoTest/Demos/Terrain.cs
+++ Axiom/DemoTest/Demos/Terrain.cs
@@ -43,7 +43,7 @@
             scene.SetFog(FogMode.Exp2, ColorEx.White, .008f, 0, 250);

             // water plane setup
-            Plane waterPlane = new Plane(Vector3.UnitY, -1.5f);
+            Plane waterPlane = new Plane(Vector3.UnitY, 1.5f);

             MeshManager.Instance.CreatePlane(
                 "WaterPlane",


Published.

Published.

--- BTDB/Properties/AssemblyInfo.cs
+++ BTDB/Properties/AssemblyInfo.cs
@@ -28,7 +28,7 @@
 //      Minor Version
 //      Build Number
 //      Revision
-[assembly: AssemblyVersion("2.9.0.0")]
-[assembly: AssemblyFileVersion("2.9.0.0")]
+[assembly: AssemblyVersion("2.9.1.0")]
+[assembly: AssemblyFileVersion("2.9.1.0")]

 [assembly: InternalsVisibleTo("BTDBTest")]


wait hold on I got this

wait hold on I got this

--- sadx-model-view/Ninja/Util.cs
+++ sadx-model-view/Ninja/Util.cs
@@ -34,7 +34,7 @@
 		/// <param name="buffer">Buffer containing data.</param>
 		/// <param name="offset">Offset in buffer to read from.</param>
 		/// <returns>The new vector.</returns>
-		public static Vector3 VectorFromStream(ref byte[] buffer, int offset = 0)
+		public static Vector3 VectorFromStream(ref byte[] buffer, int offset)
 		{
 			return new Vector3(BitConverter.ToSingle(buffer, offset + 0), BitConverter.ToSingle(buffer, offset + 4), BitConverter.ToSingle(buffer, offset + 8));
 		}


fix member hidden

fix member hidden

--- RegulatedNoise.Core/DomainModel/MarketDataRow.cs
+++ RegulatedNoise.Core/DomainModel/MarketDataRow.cs
@@ -56,8 +56,6 @@

 		[JsonProperty(PropertyName = "timestamp")]
 		public DateTime SampleDate { get; set; }
-
-		public string Source { get; set; }

 		public string MarketDataId
 		{


Added test to RPCGen CompileApi.

Added test to RPCGen CompileApi.

--- src/Tools/RPCGen.Tests/RPCGenTests.cs
+++ src/Tools/RPCGen.Tests/RPCGenTests.cs
@@ -1,4 +1,5 @@
-using NUnit.Framework;
+using Flood.Tools.RPCGen;
+using NUnit.Framework;
 using System;
 using System.IO;
 using System.Reflection;
@@ -33,5 +34,19 @@
             var ret = Flood.Tools.RPCGen.Program.Main(args);
             Assert.AreEqual(0, ret);
         }
+
+        [Test]
+        public void GenAPI()
+        {
+            string genDirectory = Path.Combine("..", "..", "gen", "RPCGen.Tests.API");
+            Directory.CreateDirectory(genDirectory);
+
+            var sourceDllPath = Path.GetFullPath("RPCGen.Tests.Services.dll");
+            var destDllPath = Path.Combine(genDirectory, "RPCGen.Tests.Services.dll");
+
+            var rpcCompiler = new Compiler(sourceDllPath, genDirectory);
+            rpcCompiler.Process();
+            rpcCompiler.CompileApi(destDllPath);
+        }
     }
 }


Port NullStream.CopyTo override from corert (#7589)

--- src/mscorlib/src/System/IO/Stream.cs
+++ src/mscorlib/src/System/IO/Stream.cs
@@ -880,6 +880,13 @@
                 set {}
             }

+            public override void CopyTo(Stream destination, int bufferSize)
+            {
+                StreamHelpers.ValidateCopyToArgs(this, destination, bufferSize);
+
+                // After we validate arguments this is a nop.
+            }
+
             public override Task CopyToAsync(Stream destination, int bufferSize, CancellationToken cancellationToken)
             {
                 // Validate arguments here for compat, since previously this method


fix: put nuget package path in quotes

fix: put nuget package path in quotes

Fixes #12

--- Cake.Squirrel/SquirrelRunner.cs
+++ Cake.Squirrel/SquirrelRunner.cs
@@ -53,7 +53,7 @@

         private ProcessArgumentBuilder GetArguments(FilePath nugetPackage, SquirrelSettings settings) {
             var builder = new ProcessArgumentBuilder();
-            builder.Append("--releasify {0}", nugetPackage.FullPath);
+            builder.Append("--releasify \"{0}\"", nugetPackage.FullPath);
             if (settings.ReleaseDirectory != null) {
                 builder.Append("--releaseDir {0}", settings.ReleaseDirectory.FullPath);
             }


handle both unix and newlines

handle both unix and newlines

unix platforms get confused when they run into GIMP palettes that use CRLF

--- Colours.Core/Palette/Palette.cs
+++ Colours.Core/Palette/Palette.cs
@@ -76,7 +76,7 @@
         /// </summary>
         /// <param name="file">The file itself.</param>
         public Palette(string file) :
-            this(file.Split(Environment.NewLine.ToCharArray()))
+            this(Regex.Split(file, "\r?\n"))
         { }

         /// <summary>


Refactor: Better naming

Refactor: Better naming

--- src/reni2/Parser/MainTokenFactory.cs
+++ src/reni2/Parser/MainTokenFactory.cs
@@ -17,42 +17,42 @@
         {
             get
             {
-                var x = PrioTable.Left(PrioTable.Any);
-                x += PrioTable.Left
+                var result = PrioTable.Left(PrioTable.Any);
+                result += PrioTable.Left
                     (
                         AtToken.TokenId,
                         "_N_E_X_T_",
                         ToNumberOfBase.TokenId
                     );

-                x += PrioTable.Left(ConcatArrays.TokenId, ConcatArrays.MutableId);
+                result += PrioTable.Left(ConcatArrays.TokenId, ConcatArrays.MutableId);

-                x += PrioTable.Left(Star.TokenId, Slash.TokenId, "\\");
-                x += PrioTable.Left(Plus.TokenId, Minus.TokenId);
+                result += PrioTable.Left(Star.TokenId, Slash.TokenId, "\\");
+                result += PrioTable.Left(Plus.TokenId, Minus.TokenId);

-                x += PrioTable.Left
+                result += PrioTable.Left
                     (
                         CompareOperation.TokenId(),
                         CompareOperation.TokenId(canBeEqual: true),
                         CompareOperation.TokenId(false),
                         CompareOperation.TokenId(false, true)
                     );
-                x += PrioTable.Left(EqualityOperation.TokenId(false), EqualityOperation.TokenId());
+                result += PrioTable.Left(EqualityOperation.TokenId(false), EqualityOperation.TokenId());

-                x += PrioTable.Right(ReassignToken.TokenId);
+                result += PrioTable.Right(ReassignToken.TokenId);

-                x = x.ThenElseLevel(ThenToken.TokenId, ElseToken.TokenId);
-                x += PrioTable.Right(Exclamation.TokenId);
-                x += PrioTable.Left
+                result = result.ThenElseLevel(ThenToken.TokenId, ElseToken.TokenId);
+                result += PrioTable.Right(Exclamation.TokenId);
+                result += PrioTable.Left
                     (
                         Function.TokenId(),
                         Function.TokenId(true),
                         Function.TokenId(isMetaFunction: true));
-                x += PrioTable.Right(Colon.TokenId);
-                x += PrioTable.Right(List.TokenId(0));
-                x += PrioTable.Right(List.TokenId(1));
-                x += PrioTable.Right(List.TokenId(2));
-                x = x.ParenthesisLevelLeft
+                result += PrioTable.Right(Colon.TokenId);
+                result += PrioTable.Right(List.TokenId(0));
+                result += PrioTable.Right(List.TokenId(1));
+                result += PrioTable.Right(List.TokenId(2));
+                result = result.ParenthesisLevelLeft
                     (
                         new[]
                         {
@@ -67,17 +67,17 @@
                             RightParenthesis.TokenId(3)
                         }
                     );
-                x.Correct("(", PrioTable.Any, '-');
-                x.Correct("[", PrioTable.Any, '-');
-                x.Correct("{", PrioTable.Any, '-');
+                result.Correct("(", PrioTable.Any, '-');
+                result.Correct("[", PrioTable.Any, '-');
+                result.Correct("{", PrioTable.Any, '-');

-                x += PrioTable.Right(PrioTable.Error);
+                result += PrioTable.Right(PrioTable.Error);

-                x = x.ParenthesisLevelLeft
+                result = result.ParenthesisLevelLeft
                     (new[] {PrioTable.BeginOfText}, new[] {PrioTable.EndOfText});

                 //Tracer.FlaggedLine("\n"+x.ToString());
-                return x;
+                return result;
             }
         }


Safety checks for Get and Set methods changed.

Get method returns default object when instance is null. Set method checks to see if the value passed in is not default before it assignes the it.


Make sure we can copy over an old version!


Removes connection close header

Removes connection close header

--- source/Loggly/Transports/HttpTransports/HttpMessageTransport.cs
+++ source/Loggly/Transports/HttpTransports/HttpMessageTransport.cs
@@ -29,7 +29,6 @@
         {
             HttpClient = new HttpClient(messageHandler);
             HttpClient.DefaultRequestHeaders.UserAgent.ParseAdd(_userAgent);
-            HttpClient.DefaultRequestHeaders.Add("Connection", "close");

             if (!string.IsNullOrWhiteSpace(LogglyConfig.Instance.Transport.ForwardedForIp))
             {
@@ -177,4 +176,4 @@
             return await response.Content.ReadAsStringAsync().ConfigureAwait(false);
         }
     }
-}+}


Lucene analyzer selected by language in config. Fixes #14.

Not greatest solution, but ok for now. Need some language detection in
future.

--- DotOPDS/Utils/LuceneIndexStorage.cs
+++ DotOPDS/Utils/LuceneIndexStorage.cs
@@ -1,5 +1,7 @@
 using DotOPDS.Models;
+using Lucene.Net.Analysis;
 using Lucene.Net.Analysis.Ru;
+using Lucene.Net.Analysis.Standard;
 using Lucene.Net.Documents;
 using Lucene.Net.Index;
 using Lucene.Net.QueryParsers;
@@ -44,7 +46,7 @@
         };

         private IndexWriter writer;
-        private RussianAnalyzer analyzer;
+        private Analyzer analyzer;
         private SimpleFSDirectory directory;
         private Stopwatch watch = Stopwatch.StartNew();

@@ -60,7 +62,7 @@
         {
             var take = Settings.Instance.Pagination;
             var skip = (page - 1) * Settings.Instance.Pagination;
-            using (var analyzer = new RussianAnalyzer(Version.LUCENE_30))
+            using (var analyzer = GetAnalyzer())
             {
                 var parser = new QueryParser(Version.LUCENE_30, field, analyzer);
                 var q = parser.Parse(query);
@@ -201,7 +203,7 @@

         public void Open(string connection)
         {
-            analyzer = new RussianAnalyzer(Version.LUCENE_30);
+            analyzer = GetAnalyzer();
             directory = new SimpleFSDirectory(new System.IO.DirectoryInfo(connection));
             writer = new IndexWriter(directory, analyzer, IndexWriter.MaxFieldLength.UNLIMITED);
         }
@@ -262,7 +264,7 @@

         public int RemoveLibrary(string database, string id)
         {
-            using (var analyzer = new RussianAnalyzer(Version.LUCENE_30))
+            using (var analyzer = GetAnalyzer())
             using (var directory = new SimpleFSDirectory(new DirectoryInfo(database)))
             using (var writer = new IndexWriter(directory, analyzer, IndexWriter.MaxFieldLength.UNLIMITED))
             {
@@ -302,5 +304,17 @@

             return total;
         }
+
+        private Analyzer GetAnalyzer()
+        {
+            switch (Settings.Instance.Language)
+            {
+                case "ru":
+                    return new RussianAnalyzer(Version.LUCENE_30);
+
+                default:
+                    return new StandardAnalyzer(Version.LUCENE_30);
+            }
+        }
     }
 }


Add: Show only selected layers in layout control.

--- DotSpatial.Controls/LayoutLegend.cs
+++ DotSpatial.Controls/LayoutLegend.cs
@@ -62,7 +62,12 @@
                     if (Map.MapControl != null)
                     {
                         foreach (IMapLayer t in Map.MapControl.Layers)
-                            _layers.Add(t);
+                        {
+                            if (t.Checked)
+                            {
+                                _layers.Add(t);
+                            }
+                        }
                     }

                     base.UpdateThumbnail();


Store un-minimized s-panel size and location

--- EDDiscovery/Forms/TabControlForm.cs
+++ EDDiscovery/Forms/TabControlForm.cs
@@ -35,6 +35,10 @@
         public bool isactive = false;
         public int displaynumber;
         public bool norepositionwindow = false;
+        private int _formWidth;
+        private int _formHeight;
+        private int _formTop;
+        private int _formLeft;

         public TabControlForm()
         {
@@ -114,6 +118,11 @@
                 this.Height = height;
                 this.Width = width;

+                this._formTop = top;
+                this._formLeft = left;
+                this._formWidth = width;
+                this._formHeight = height;
+
                 this.CreateParams.X = this.Left;
                 this.CreateParams.Y = this.Top;
                 this.StartPosition = FormStartPosition.Manual;
@@ -130,12 +139,38 @@
             }

             string root = "PopUpForm" + displaynumber;
-            SQLiteDBClass.PutSettingInt(root + "Width", this.Width);
-            SQLiteDBClass.PutSettingInt(root + "Height", this.Height);
-            SQLiteDBClass.PutSettingInt(root + "Top", this.Top);
-            SQLiteDBClass.PutSettingInt(root + "Left", this.Left);
+            SQLiteDBClass.PutSettingInt(root + "Width", this._formWidth);
+            SQLiteDBClass.PutSettingInt(root + "Height", this._formHeight);
+            SQLiteDBClass.PutSettingInt(root + "Top", this._formTop);
+            SQLiteDBClass.PutSettingInt(root + "Left", this._formLeft);

             SQLiteDBClass.PutSettingInt(root + "Tab", ctc.SelectedIndex);
+        }
+
+        protected override void OnResize(EventArgs e)
+        {
+            if (WindowState == FormWindowState.Normal)
+            {
+                _formTop = this.Top;
+                _formLeft = this.Left;
+                _formWidth = this.Width;
+                _formHeight = this.Height;
+            }
+
+            base.OnResize(e);
+        }
+
+        protected override void OnResizeEnd(EventArgs e)
+        {
+            if (WindowState == FormWindowState.Normal)
+            {
+                _formTop = this.Top;
+                _formLeft = this.Left;
+                _formWidth = this.Width;
+                _formHeight = this.Height;
+            }
+
+            base.OnResizeEnd(e);
         }

         public void SelectDefaultTab()


Calculate home distance from set home system

--- EDDiscovery/TravelHistoryControl.cs
+++ EDDiscovery/TravelHistoryControl.cs
@@ -456,7 +456,18 @@
                     textBoxY.Text = syspos.System.y.ToString(SingleCoordinateFormat);
                     textBoxZ.Text = syspos.System.z.ToString(SingleCoordinateFormat);

-                    textBoxHomeDist.Text = Math.Sqrt(syspos.System.x * syspos.System.x + syspos.System.y * syspos.System.y + syspos.System.z * syspos.System.z).ToString("0.00");
+                    ISystem homesys = _discoveryForm.GetHomeSystem();
+
+                    if (homesys == null || !homesys.HasCoordinate)
+                    {
+                        homesys = new SystemClass("Sol", 0, 0, 0);
+                    }
+
+                    double xdist = syspos.System.x - homesys.x;
+                    double ydist = syspos.System.y - homesys.y;
+                    double zdist = syspos.System.z - homesys.z;
+
+                    textBoxHomeDist.Text = Math.Sqrt(xdist * xdist + ydist * ydist + zdist * zdist).ToString("0.00");
                 }
                 else
                 {


use remainder for format check.

use remainder for format check.

--- ArcFormats/ImagePMP.cs
+++ ArcFormats/ImagePMP.cs
@@ -52,7 +52,7 @@
                 return null;
             int flg = stream.ReadByte() ^ 0x21;
             int fcheck = first << 8 | flg;
-            if (fcheck / 0x1f * 0x1f != fcheck)
+            if (fcheck % 0x1f != 0)
                 return null;

             stream.Position = 0;


Delete EnemyBarrels.cs

Delete EnemyBarrels.cs

Fixing bug?


YEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE HAW

--- Assets/PlayerPrefab.cs
+++ Assets/PlayerPrefab.cs
@@ -366,9 +366,14 @@
 			Bullet bull;
 			bull=col.gameObject.GetComponent<Bullet>();
 			if(!bull.IsPlayer()&&(!crouchFlag||!InWater)){Destroy(col.gameObject);
-				contraScript.KillThePlayer();}
+					if(contraScript){contraScript.KillThePlayer();}
+					else {OtherContra contsc= Camera.main.gameObject.GetComponent<OtherContra>();
+						contsc.KillThePlayer();}
+				}
 				} else if (col.CompareTag ("Villan")) {
-						contraScript.KillThePlayer();
+				if(contraScript){contraScript.KillThePlayer();}
+				else {OtherContra contsc= Camera.main.gameObject.GetComponent<OtherContra>();
+					contsc.KillThePlayer();}
 				} else if(col.CompareTag("PowerupTrig"))
 			          {
 				Debug.Log ("here");


Updated Reset to reflect SpringJoint changes

--- Assets/Scripts/Ball.cs
+++ Assets/Scripts/Ball.cs
@@ -20,7 +20,9 @@
 		rigidbody.detectCollisions = true;
 		transform.position = Vector3.zero;
 		rigidbody.velocity = Vector3.zero;
-		transform.parent = null;
+		//transform.parent = null;
+		var spring = GetComponent<SpringJoint>();
+		spring.connectedBody = null;
 	}

 }


Added comments

Added comments

--- Automoqer/Automoqer.cs
+++ Automoqer/Automoqer.cs
@@ -5,6 +5,10 @@

 namespace Automoqer
 {
+    /// <summary>
+    /// AutoMoqer mocks all constructor dependencies for a service
+    /// </summary>
+    /// <typeparam name="TService">Type of the service to mock dependencies for</typeparam>
     public class AutoMoqer<TService> where TService : class
     {
         private readonly ConstructorInfo _primaryConstructor;


Castle.Facilities.AutoTx: drop DependencyType from DependencyModel

* it was dropped in https://github.com/castleproject/Windsor/commit/0c44018dc85f041d7e5e3438f2e4089b611d5c7a

Signed-off-by: Martin Jansa <3ba6c51779fb31acf0de04bbcb2aad34c65b9c1c@oksystem.cz>

--- src/Castle.Facilities.AutoTx/TransactionalComponentInspector.cs
+++ src/Castle.Facilities.AutoTx/TransactionalComponentInspector.cs
@@ -75,7 +75,7 @@
 			if (!meta.HasValue)
 				return;

-			model.Dependencies.Add(new DependencyModel(DependencyType.Service, null, typeof (TransactionInterceptor), false));
+			model.Dependencies.Add(new DependencyModel(null, typeof (TransactionInterceptor), false));
 			model.Interceptors.Add(new InterceptorReference(typeof (TransactionInterceptor)));
 		}


Add locking to SimplePromise

Add locking to SimplePromise

--- Basil/SimplePromise.cs
+++ Basil/SimplePromise.cs
@@ -17,9 +17,9 @@
 using System;

 namespace org.herbal3d.Basil {
-    /* A simple implementation of the Promise interface.
-     * .NET does many things in a complicated and non-standard way.
-     * This class creates a simple wrapper for Task<T> and TaskCompletionSource<T>
+    /* A simple implementation of the Promise pattern.
+     *
+     * This class is a simple implementation of the promise coding pattern
      *    that looks more like the Promise/Future interface used in other languages.
      *    There exist complete and featureful alternatives
      *    (https://github.com/Real-Serious-Games/C-Sharp-Promise for instance)
@@ -36,6 +36,7 @@
      *       or
      *    someDay.Reject(Exception e);
      */
+
     public class SimplePromise<T> {
         private enum ResolutionState {
             NoValueOrResolver,
@@ -45,6 +46,7 @@
         };

         private ResolutionState resolverState;
+        private Object resolverStateLock;   // access lock for the above state variable
         private Action<T> resolver;
         private ResolutionState rejectorState;
         private Action<Exception> rejecter;
@@ -66,73 +68,93 @@

         // Called by the one doing the action to complete the promise
         public void Resolve(T val) {
-            switch (resolverState) {
-                case ResolutionState.NoValueOrResolver:
-                    resolveValue = val;
-                    resolverState = ResolutionState.HaveValue;
-                    break;
-                case ResolutionState.HaveResolver:
-                    resolver(val);
-                    resolverState = ResolutionState.ResolutionComplete;
-                    break;
-                case ResolutionState.HaveValue:
-                    throw new Exception("SimplePromise.Resolve: double resolving of value");
-                case ResolutionState.ResolutionComplete:
-                    throw new Exception("SimplePromise.Resolve: resolving of value after completion");
+            bool doit = false;
+            lock (resolverStateLock) {
+                switch (resolverState) {
+                    case ResolutionState.NoValueOrResolver:
+                        resolveValue = val;
+                        resolverState = ResolutionState.HaveValue;
+                        break;
+                    case ResolutionState.HaveResolver:
+                        doit = true;
+                        resolveValue = val;
+                        resolverState = ResolutionState.ResolutionComplete;
+                        break;
+                    case ResolutionState.HaveValue:
+                        throw new Exception("SimplePromise.Resolve: double resolving of value");
+                    case ResolutionState.ResolutionComplete:
+                        throw new Exception("SimplePromise.Resolve: resolving of value after completion");
+                }
             }
+            if (doit) resolver(resolveValue);
         }

         // Called by the one doing the action to reject the promise
         public void Reject(Exception e) {
-            switch (rejectorState) {
-                case ResolutionState.NoValueOrResolver:
-                    rejectValue = e;
-                    rejectorState = ResolutionState.HaveValue;
-                    break;
-                case ResolutionState.HaveResolver:
-                    rejecter(e);
-                    rejectorState = ResolutionState.ResolutionComplete;
-                    break;
-                case ResolutionState.HaveValue:
-                    throw new Exception("SimplePromise.Reject: double rejection");
-                case ResolutionState.ResolutionComplete:
-                    throw new Exception("SimplePromise.Reject: rejection after completion");
+            bool doit = false;
+            lock (resolverStateLock) {
+                switch (rejectorState) {
+                    case ResolutionState.NoValueOrResolver:
+                        rejectValue = e;
+                        rejectorState = ResolutionState.HaveValue;
+                        break;
+                    case ResolutionState.HaveResolver:
+                        doit = true;
+                        rejectValue = e;
+                        rejectorState = ResolutionState.ResolutionComplete;
+                        break;
+                    case ResolutionState.HaveValue:
+                        throw new Exception("SimplePromise.Reject: double rejection");
+                    case ResolutionState.ResolutionComplete:
+                        throw new Exception("SimplePromise.Reject: rejection after completion");
+                }
             }
+            if (doit) rejecter(rejectValue);
         }

         public SimplePromise<T> Then(Action<T> resolve) {
-            switch (resolverState) {
-                case ResolutionState.NoValueOrResolver:
-                    resolver = resolve;
-                    resolverState = ResolutionState.HaveResolver;
-                    break;
-                case ResolutionState.HaveValue:
-                    resolve(resolveValue);
-                    resolverState = ResolutionState.ResolutionComplete;
-                    break;
-                case ResolutionState.HaveResolver:
-                    throw new Exception("SimplePromise.Then: double resolving");
-                case ResolutionState.ResolutionComplete:
-                    throw new Exception("SimplePromise.Then: resolving after completion");
+            bool doit = false;
+            lock (resolverStateLock) {
+                switch (resolverState) {
+                    case ResolutionState.NoValueOrResolver:
+                        resolver = resolve;
+                        resolverState = ResolutionState.HaveResolver;
+                        break;
+                    case ResolutionState.HaveValue:
+                        doit = true;
+                        resolver = resolve;
+                        resolverState = ResolutionState.ResolutionComplete;
+                        break;
+                    case ResolutionState.HaveResolver:
+                        throw new Exception("SimplePromise.Then: double resolving");
+                    case ResolutionState.ResolutionComplete:
+                        throw new Exception("SimplePromise.Then: resolving after completion");
+                }
             }
+            if (doit) resolver(resolveValue);
             return this;
         }

         public SimplePromise<T> Rejected(Action<Exception> reject) {
-            switch (rejectorState) {
-                case ResolutionState.NoValueOrResolver:
-                    rejecter = reject;
-                    rejectorState = ResolutionState.HaveResolver;
-                    break;
-                case ResolutionState.HaveValue:
-                    reject(rejectValue);
-                    rejectorState = ResolutionState.ResolutionComplete;
-                    break;
-                case ResolutionState.HaveResolver:
-                    throw new Exception("SimplePromise.Rejected: double rejection");
-                case ResolutionState.ResolutionComplete:
-                    throw new Exception("SimplePromise.Then: rejecting after completion");
+            bool doit = false;
+            lock (resolverStateLock) {
+                switch (rejectorState) {
+                    case ResolutionState.NoValueOrResolver:
+                        rejecter = reject;
+                        rejectorState = ResolutionState.HaveResolver;
+                        break;
+                    case ResolutionState.HaveValue:
+                        doit = true;
+                        rejecter = reject;
+                        rejectorState = ResolutionState.ResolutionComplete;
+                        break;
+                    case ResolutionState.HaveResolver:
+                        throw new Exception("SimplePromise.Rejected: double rejection");
+                    case ResolutionState.ResolutionComplete:
+                        throw new Exception("SimplePromise.Then: rejecting after completion");
+                }
             }
+            if (doit) rejecter(rejectValue);
             return this;
         }


Add Initiative notification email when project in Initiative stage is followed.

--- src/CompetitionPlatform/Controllers/ProjectDetailsController.cs
+++ src/CompetitionPlatform/Controllers/ProjectDetailsController.cs
@@ -1,6 +1,8 @@
 using System;
 using System.Linq;
+using System.Security.Cryptography.X509Certificates;
 using System.Threading.Tasks;
+using AzureStorage.Queue;
 using CompetitionPlatform.Data.AzureRepositories.Project;
 using CompetitionPlatform.Data.AzureRepositories.Result;
 using CompetitionPlatform.Data.AzureRepositories.Users;
@@ -24,12 +26,15 @@
         private readonly IProjectResultRepository _resultRepository;
         private readonly IProjectResultVoteRepository _resultVoteRepository;
         private readonly IProjectFollowRepository _projectFollowRepository;
+        private readonly IMailSentRepository _mailSentRepository;
+        private readonly IAzureQueue<string> _emailsQueue;

         public ProjectDetailsController(IProjectCommentsRepository commentsRepository, IProjectFileRepository fileRepository,
             IProjectFileInfoRepository fileInfoRepository, IProjectVoteRepository voteRepository,
             IProjectRepository projectRepository, IProjectParticipantsRepository participantsRepository,
             IProjectResultRepository resultRepository, IProjectResultVoteRepository resultVoteRepository,
-            IProjectFollowRepository projectFollowRepository)
+            IProjectFollowRepository projectFollowRepository, IMailSentRepository mailSentRepository,
+            IAzureQueue<string> emailsQueue)
         {
             _commentsRepository = commentsRepository;
             _fileRepository = fileRepository;
@@ -40,6 +45,8 @@
             _resultRepository = resultRepository;
             _resultVoteRepository = resultVoteRepository;
             _projectFollowRepository = projectFollowRepository;
+            _mailSentRepository = mailSentRepository;
+            _emailsQueue = emailsQueue;
         }

         [Authorize]
@@ -328,7 +335,23 @@
         {
             var user = GetAuthenticatedUser();

-            await _projectFollowRepository.SaveAsync(user.Email, id);
+            var project = await _projectRepository.GetAsync(id);
+
+            project.Status = (Status)Enum.Parse(typeof(Status), project.ProjectStatus, true);
+
+            var sentMails = await _mailSentRepository.GetFollowAsync();
+
+            var match = sentMails.FirstOrDefault(x => x.ProjectId == id && x.UserId == user.Email);
+
+            if (project.Status == Status.Initiative && match == null)
+            {
+                var initiativeMessage = NotificationMessageHelper.GenerateInitiativeMessage(project, user.GetFullName(),
+                    user.Email);
+                await _emailsQueue.PutMessageAsync(initiativeMessage);
+                await _mailSentRepository.SaveFollowAsync(user.Email, id);
+            }
+
+            await _projectFollowRepository.SaveAsync(user.Email, user.GetFullName(), id);

             return RedirectToAction("ProjectDetails", "Project", new { id });
         }


[ThickClient] Fix NRE in SourceView

[ThickClient] Fix NRE in SourceView

Instead of inserting a node into the source model backing the TreeView
and then setting each of its columns, insert it with its values so that
the callbacks listening for new rows don't try to pull the
not-initialized values.

--- src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceModel.cs
+++ src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceModel.cs
@@ -211,13 +211,10 @@

                 int position = source.Order;

+                var type = source is SourceManager.GroupSource ? EntryType.Group : EntryType.Source;
                 TreeIter iter = parent.Equals (TreeIter.Zero)
-                    ? InsertNode (position)
-                    : InsertNode (parent, position);
-
-                SetValue (iter, 0, source);
-                SetValue (iter, 1, source.Order);
-                SetValue (iter, 2, source is SourceManager.GroupSource ? EntryType.Group : EntryType.Source);
+                    ? InsertWithValues (position, source, source.Order, type)
+                    : InsertWithValues (parent, position, source, source.Order, type);

                 lock (source.Children) {
                     foreach (Source child in source.Children) {


Add ViewChannel to Voice channel permissions (#1059)

Previously, Voice channels did not have ViewChannel in their "all" permissions

--- src/Discord.Net.Core/Entities/Permissions/ChannelPermissions.cs
+++ src/Discord.Net.Core/Entities/Permissions/ChannelPermissions.cs
@@ -12,7 +12,7 @@
         /// <summary> Gets a ChannelPermissions that grants all permissions for text channels. </summary>
         public static readonly ChannelPermissions Text = new ChannelPermissions(0b01100_0000000_1111111110001_010001);
         /// <summary> Gets a ChannelPermissions that grants all permissions for voice channels. </summary>
-        public static readonly ChannelPermissions Voice = new ChannelPermissions(0b00100_1111110_0000000000000_010001);
+        public static readonly ChannelPermissions Voice = new ChannelPermissions(0b00100_1111110_0000000010000_010001);
         /// <summary> Gets a ChannelPermissions that grants all permissions for category channels. </summary>
         public static readonly ChannelPermissions Category = new ChannelPermissions(0b01100_1111110_1111111110001_010001);
         /// <summary> Gets a ChannelPermissions that grants all permissions for direct message channels. </summary>


Skip SolutionCrawler test

Skip SolutionCrawler test

--- src/EditorFeatures/Test/SolutionCrawler/WorkCoordinatorTests.cs
+++ src/EditorFeatures/Test/SolutionCrawler/WorkCoordinatorTests.cs
@@ -790,7 +790,7 @@
             }
         }

-        [Fact(Skip = https://github.com/dotnet/roslyn/issues/23657)]
+        [Fact(Skip = "https://github.com/dotnet/roslyn/issues/23657")]
         public async Task ProgressReporterTest()
         {
             var solution = GetInitialSolutionInfoWithP2P();


Add exception message.

Add exception message.

--- src/ExRam.Gremlinq.Core/Serialization/GremlinQuerySerializer.cs
+++ src/ExRam.Gremlinq.Core/Serialization/GremlinQuerySerializer.cs
@@ -56,7 +56,7 @@
                 if (serialized is ISerializedGremlinQuery serializedQuery)
                     return serializedQuery;

-                throw new InvalidOperationException();//TODO: Message
+                throw new InvalidOperationException($"Unable to serialize a query of type {query.GetType().FullName}.");
             }

             public IGremlinQuerySerializer ConfigureFragmentSerializer(Func<IGremlinQueryFragmentSerializer, IGremlinQueryFragmentSerializer> transformation)


Introduce caching of ShouldIgnore request so that the ignorer pipeline is only executed once per request

--- src/Glimpse.Agent.Web/Framework/DefaultRequestIgnorerManager.cs
+++ src/Glimpse.Agent.Web/Framework/DefaultRequestIgnorerManager.cs
@@ -2,6 +2,7 @@
 using System.Collections.Generic;
 using System.Linq;
 using Microsoft.AspNet.Http;
+using Microsoft.AspNet.JsonPatch.Helpers;

 namespace Glimpse.Agent.Web
 {
@@ -29,18 +30,40 @@
                 throw new ArgumentNullException(nameof(context));
             }

-            if (RequestIgnorers.Any())
+            var result = GetCachedResult(context);
+            if (result == null)
             {
-                foreach (var policy in RequestIgnorers)
+                if (RequestIgnorers.Any())
                 {
-                    if (policy.ShouldIgnore(context))
+                    foreach (var policy in RequestIgnorers)
                     {
-                        return true;
+                        if (policy.ShouldIgnore(context))
+                        {
+                            result = true;
+                            break;
+                        }
                     }
                 }
+
+                if (!result.HasValue)
+                {
+                    result = false;
+                }
+
+                SetCachedResult(context, result);
             }

-            return false;
+            return result.Value;
+        }
+
+        private bool? GetCachedResult(HttpContext context)
+        {
+            return context.Items["Glimpse.ShouldIgnoreRequest"] as bool?;
+        }
+
+        private void SetCachedResult(HttpContext context, bool? value)
+        {
+            context.Items["Glimpse.ShouldIgnoreRequest"] = value;
         }
     }
 }


added test

added test

--- src/GraphQL.Tests/Execution/Performance/ListPerformanceTests.cs
+++ src/GraphQL.Tests/Execution/Performance/ListPerformanceTests.cs
@@ -63,7 +63,7 @@

         private readonly ITestOutputHelper _output;

-        private const int PerformanceIterations = 10000;
+        private const int PerformanceIterations = 100000;
         private readonly List<Person> _people;

         private dynamic PeopleList => new


Simplify a bit of a code

Simplify a bit of a code


Revert "Lucene.Net.Tests.Util.TestRamUsageEstimatorOnWildAnimals: Reworked test so it exists in .NET Standard but does not run"

This reverts commit 4854038058d384703ed7219e9661764f1f23fff6.

--- src/Lucene.Net.Tests/Util/TestRamUsageEstimatorOnWildAnimals.cs
+++ src/Lucene.Net.Tests/Util/TestRamUsageEstimatorOnWildAnimals.cs
@@ -25,18 +25,15 @@
     [TestFixture]
     public class TestRamUsageEstimatorOnWildAnimals : LuceneTestCase
     {
+#if !NETSTANDARD // StackOverflowException cannot be caught in .NET Core. This test does not apply.
         public class ListElement
         {
             internal ListElement Next;
         }

-
         [Test]
         public virtual void TestOverflowMaxChainLength()
         {
-#if NETSTANDARD
-            AssumeTrue("StackOverflowException cannot be caught in .NET Core. This test does not apply.", false);
-#endif
             int UPPERLIMIT = 100000;
             int lower = 0;
             int upper = UPPERLIMIT;
@@ -68,5 +65,6 @@
                 Assert.Fail("Max object chain length till stack overflow: " + lower);
             }
         }
+#endif
     }
 }


Remove unnecessary method call.

Remove unnecessary method call.

--- src/Markup/Avalonia.Markup.Xaml/Converters/IconTypeConverter.cs
+++ src/Markup/Avalonia.Markup.Xaml/Converters/IconTypeConverter.cs
@@ -34,14 +34,9 @@
             var bitmap = value as IBitmap;
             if (bitmap != null)
             {
-                return CreateIconFromBitmap(bitmap);
+                return new WindowIcon(bitmap);
             }
             throw new NotSupportedException();
-        }
-
-        private WindowIcon CreateIconFromBitmap(IBitmap bitmap)
-        {
-            return new WindowIcon(bitmap);
         }

         private WindowIcon CreateIconFromPath(IValueContext context, string path)


stablize nearest toc (#4183)

stablize nearest toc (#4183)

--- src/Microsoft.DocAsCode.Build.Engine/SystemMetadataGenerator.cs
+++ src/Microsoft.DocAsCode.Build.Engine/SystemMetadataGenerator.cs
@@ -19,18 +19,13 @@

         public SystemMetadataGenerator(IDocumentBuildContext context)
         {
-            if (context == null)
-            {
-                throw new ArgumentNullException(nameof(context));
-            }
-
-            _context = context;
+            _context = context ?? throw new ArgumentNullException(nameof(context));

             // Order toc files by the output folder depth
             _toc = context.GetTocInfo()
-                .Select(s => new FileInfo(s.TocFileKey, (RelativePath)context.GetFilePath(s.TocFileKey)))
-                .Where(s => s.File != null)
-                .OrderBy(s => s.File.SubdirectoryCount);
+                .Select(s => new FileInfo(s.TocFileKey, context.GetFilePath(s.TocFileKey)))
+                .Where(s => s.RelativePath != null)
+                .OrderBy(s => s.RelativePath.SubdirectoryCount);
         }

         public SystemMetadata Generate(InternalManifestItem item)
@@ -79,12 +74,12 @@
             // 2. The algorithm of toc current article belongs to:
             //    a. If toc can be found in TocMap, return that toc
             //    b. Elsewise, get the nearest toc, **nearest** means nearest toc in **OUTPUT** folder
-            var parentTocFiles = _context.GetTocFileKeySet(key)?.Select(s => new FileInfo(s, (RelativePath)_context.GetFilePath(s)));
+            var parentTocFiles = _context.GetTocFileKeySet(key)?.Select(s => new FileInfo(s, _context.GetFilePath(s)));
             var parentToc = GetNearestToc(parentTocFiles, file) ?? GetDefaultToc(key);

             if (parentToc != null)
             {
-                var parentTocPath = parentToc.File.RemoveWorkingFolder();
+                var parentTocPath = parentToc.RelativePath.RemoveWorkingFolder();
                 attrs.TocPath = parentTocPath;
                 var tocRelativePath = parentTocPath.MakeRelativeTo(file);
                 attrs.RelativePathToToc = tocRelativePath;
@@ -104,7 +99,7 @@
             var rootToc = _toc.FirstOrDefault();
             if (rootToc != null)
             {
-                var rootTocPath = rootToc.File.RemoveWorkingFolder();
+                var rootTocPath = rootToc.RelativePath.RemoveWorkingFolder();
                 if (rootTocPath.SubdirectoryCount == 0)
                 {
                     attrs.RootTocPath = rootTocPath;
@@ -128,7 +123,7 @@
             // MakeRelativeTo calculates how to get file "s" from "outputPath"
             // The standard for being the toc of current file is: Relative directory is empty or ".."s only
             var parentTocs = _toc
-                .Select(s => new { rel = s.File.MakeRelativeTo(outputPath), info = s })
+                .Select(s => new { rel = s.RelativePath.MakeRelativeTo(outputPath), info = s })
                 .Where(s => s.rel.SubdirectoryCount == 0)
                 .OrderBy(s => s.rel.ParentDirectoryCount)
                 .Select(s => s.info);
@@ -148,9 +143,9 @@
                 return null;
             }
             return (from toc in tocFiles
-                    where toc.File != null
-                    let relativePath = toc.File.RemoveWorkingFolder() - file
-                    orderby relativePath.SubdirectoryCount, relativePath.ParentDirectoryCount
+                    where toc.RelativePath != null
+                    let relativePath = toc.RelativePath.RemoveWorkingFolder() - file
+                    orderby relativePath.SubdirectoryCount, relativePath.ParentDirectoryCount, toc.FilePath, toc.Key
                     select toc)
                 .FirstOrDefault();
         }
@@ -164,11 +159,16 @@
         private sealed class FileInfo
         {
             public string Key { get; set; }
-            public RelativePath File { get; set; }
-            public FileInfo(string key, RelativePath file)
+
+            public string FilePath { get; set; }
+
+            public RelativePath RelativePath{ get; set; }
+
+            public FileInfo(string key, string filePath)
             {
                 Key = key;
-                File = file;
+                FilePath = filePath;
+                RelativePath = (RelativePath)filePath;
             }
         }
     }


Changed some properties to protected set, to allow the clients to override their values.

--- RestSharp.Portable.OAuth2/OAuth2/OAuth2Client.cs
+++ RestSharp.Portable.OAuth2/OAuth2/OAuth2Client.cs
@@ -46,12 +46,12 @@
         /// <summary>
         /// Access token returned by provider. Can be used for further calls of provider API.
         /// </summary>
-        public string AccessToken { get; private set; }
+        public string AccessToken { get; protected set; }

         /// <summary>
         /// Refresh token returned by provider. Can be used for further calls of provider API.
         /// </summary>
-        public string RefreshToken { get; private set; }
+        public string RefreshToken { get; protected set; }

         /// <summary>
         /// Token type returned by provider. Can be used for further calls of provider API.


Updating comments to use inclusive terms (#1705)

* Updating comments to use inclusive terms

* Changing typical to default for consistency

--- src/Microsoft.IdentityModel.Tokens/TokenValidationParameters.cs
+++ src/Microsoft.IdentityModel.Tokens/TokenValidationParameters.cs
@@ -247,7 +247,8 @@
         /// Gets or sets a delegate that will be used to validate the audience.
         /// </summary>
         /// <remarks>
-        /// If set, this delegate will be called to validate the 'audience', instead of normal processing. This means that no default 'audience' validation will occur.
+        /// If set, this delegate will be called to validate the 'audience', instead of default processing.
+        /// This means that no default 'audience' validation will occur.
         /// Even if <see cref="ValidateAudience"/> is false, this delegate will still be called.
         /// </remarks>
         public AudienceValidator AudienceValidator { get; set; }
@@ -369,7 +370,8 @@
         /// Gets or sets a delegate for validating the <see cref="SecurityKey"/> that signed the token.
         /// </summary>
         /// <remarks>
-        /// If set, this delegate will be called to validate the <see cref="SecurityKey"/> that signed the token, instead of normal processing. This means that no default <see cref="SecurityKey"/> validation will occur.
+        /// If set, this delegate will be called to validate the <see cref="SecurityKey"/> that signed the token, instead of default processing.
+        /// This means that no default <see cref="SecurityKey"/> validation will occur.
         /// Even if <see cref="ValidateIssuerSigningKey"/> is false, this delegate will still be called.
         /// </remarks>
         public IssuerSigningKeyValidator IssuerSigningKeyValidator { get; set; }
@@ -396,7 +398,8 @@
         /// Gets or sets a delegate that will be used to validate the issuer of the token.
         /// </summary>
         /// <remarks>
-        /// If set, this delegate will be called to validate the 'issuer' of the token, instead of normal processing. This means that no default 'issuer' validation will occur.
+        /// If set, this delegate will be called to validate the 'issuer' of the token, instead of default processing.
+        /// This means that no default 'issuer' validation will occur.
         /// Even if <see cref="ValidateIssuer"/> is false, this delegate will still be called.
         /// </remarks>
         public IssuerValidator IssuerValidator { get; set; }
@@ -405,7 +408,8 @@
         /// Gets or sets a delegate that will be used to validate the lifetime of the token
         /// </summary>
         /// <remarks>
-        /// If set, this delegate will be called to validate the lifetime of the token, instead of normal processing. This means that no default lifetime validation will occur.
+        /// If set, this delegate will be called to validate the lifetime of the token, instead of default processing.
+        /// This means that no default lifetime validation will occur.
         /// Even if <see cref="ValidateLifetime"/> is false, this delegate will still be called.
         /// </remarks>
         public LifetimeValidator LifetimeValidator { get; set; }
@@ -501,7 +505,7 @@
         /// Gets or sets a delegate that will be used to validate the signature of the token.
         /// </summary>
         /// <remarks>
-        /// If set, this delegate will be called to signature of the token, instead of normal processing.
+        /// If set, this delegate will be called to signature of the token, instead of default processing.
         /// </remarks>
         public SignatureValidator SignatureValidator { get; set; }

@@ -527,7 +531,7 @@
         /// Gets or sets a delegate that will be used to read the token.
         /// </summary>
         /// <remarks>
-        /// If set, this delegate will be called to read the token instead of normal processing.
+        /// If set, this delegate will be called to read the token instead of default processing.
         /// </remarks>
         public TokenReader TokenReader { get; set; }

@@ -541,7 +545,8 @@
         /// Gets or sets a delegate that will be used to validate the token replay of the token
         /// </summary>
         /// <remarks>
-        /// If set, this delegate will be called to validate the token replay of the token, instead of normal processing. This means no default token replay validation will occur.
+        /// If set, this delegate will be called to validate the token replay of the token, instead of default processing.
+        /// This means no default token replay validation will occur.
         /// Even if <see cref="ValidateTokenReplay"/> is false, this delegate will still be called.
         /// </remarks>
         public TokenReplayValidator TokenReplayValidator { get; set; }
@@ -559,7 +564,7 @@
         /// Implementations that need to resolve it from a different location can use the 'token' parameter.
         /// </summary>
         /// <remarks>
-        /// If set, this delegate will be called to validate the 'type' of the token, instead of normal processing.
+        /// If set, this delegate will be called to validate the 'type' of the token, instead of default processing.
         /// This means that no default 'type' validation will occur.
         /// </remarks>
         public TypeValidator TypeValidator { get; set; }


Auto remove nav menu container after animation.

--- Ross/ViewControllers/NavigationMenuController.cs
+++ Ross/ViewControllers/NavigationMenuController.cs
@@ -49,6 +49,7 @@
             containerView.AddSubview (menuView);

             menuAnimator = new UIDynamicAnimator (containerView);
+            menuAnimator.Delegate = new AnimatorDelegate (this);

             containerView.Frame = new RectangleF (
                 x: 0,
@@ -63,8 +64,6 @@
                 width: containerView.Frame.Width,
                 height: containerView.Frame.Height
             );
-
-            navController.View.AddSubview (containerView);

             return;
         }
@@ -106,5 +105,34 @@
             menuShown = !menuShown;
             containerView.UserInteractionEnabled = menuShown;
         }
+
+        private class AnimatorDelegate : UIDynamicAnimatorDelegate
+        {
+            private readonly NavigationMenuController menuController;
+
+            public AnimatorDelegate (NavigationMenuController menuController)
+            {
+                this.menuController = menuController;
+            }
+
+            public override void DidPause (UIDynamicAnimator animator)
+            {
+                // Remove from subview
+                if (!menuController.menuShown) {
+                    menuController.containerView.RemoveFromSuperview ();
+                }
+            }
+
+            public override void WillResume (UIDynamicAnimator animator)
+            {
+                // Make sure that the containerView has been added the the view hiearchy
+                if (menuController.containerView.Superview == null) {
+                    var navController = menuController.controller.NavigationController;
+                    if (navController != null) {
+                        navController.View.AddSubview (menuController.containerView);
+                    }
+                }
+            }
+        }
     }
 }


Added speed potion

Added speed potion

--- CupCake.Messages/User/Potion.cs
+++ CupCake.Messages/User/Potion.cs
@@ -14,6 +14,7 @@
         Respawn = 10,
         Levitation = 11,
         Flaunt = 12,
-        Solitude = 13
+        Solitude = 13,
+        Speed = 14
     }
-}+}