allow changes to tree values

allow changes to tree values

--- source/mtee/Model/Tree.cs
+++ source/mtee/Model/Tree.cs
@@ -14,7 +14,7 @@
     }

     public abstract class Tree<T> {
-        public abstract T Value { get; }
+        public abstract T Value { get; set; }

         public abstract bool IsLeaf { get; }
         public abstract IList<Tree<T>> Branches { get; }
@@ -37,12 +37,12 @@

     public class TreeList<T>: Tree<T> {
         private readonly List<Tree<T>> list = new List<Tree<T>>();
-        private readonly T value;
-        public override T Value { get { return value; } }
+        private T aValue;
+        public override T Value { get { return aValue; } set { aValue = value; } }

         public TreeList() {}

-        public TreeList(T value) { this.value = value; }
+        public TreeList(T value) { aValue = value; }

         public override bool IsLeaf { get { return false; } }

@@ -55,9 +55,9 @@
     }

     public class TreeLeaf<T>: Tree<T> {
-        private readonly T value;
-        public override T Value { get { return value; } }
-        public TreeLeaf(T value) { this.value = value; }
+        private T aValue;
+        public override T Value { get { return aValue; } set { aValue = value; } }
+        public TreeLeaf(T value) { aValue = value; }

         public override bool IsLeaf { get { return true; } }


commented unused code

commented unused code

--- AIMS_BD_IATI.DAL/AimsDAL.cs
+++ AIMS_BD_IATI.DAL/AimsDAL.cs
@@ -1210,7 +1210,7 @@
                     {
                         var trandate = aimsCommitment.CommitmentAgreementSignDate ?? p.AgreementSignDate;

-                        var notExistInIATI = !iatiCommitments.Exists(e => e.transactiondate?.isodate.Date == trandate && Math.Floor(e.ValUSD) == Math.Floor(aimsCommitment.CommittedAmountInUSD ?? 0));
+                        //var notExistInIATI = !iatiCommitments.Exists(e => e.transactiondate?.isodate.Date == trandate && Math.Floor(e.ValUSD) == Math.Floor(aimsCommitment.CommittedAmountInUSD ?? 0));

                         isFinancialDataMismathed = true;

@@ -1244,7 +1244,7 @@
                     {
                         var trandate = aimsDisbursement.DisbursementToDate ?? aimsDisbursement.DisbursementDate;

-                        var notExistInIATI = !iatiDisbursements.Exists(e => e.transactiondate?.isodate.Date == trandate && Math.Floor(e.ValUSD) == Math.Floor(aimsDisbursement.DisbursedAmountInUSD ?? 0));
+                        //var notExistInIATI = !iatiDisbursements.Exists(e => e.transactiondate?.isodate.Date == trandate && Math.Floor(e.ValUSD) == Math.Floor(aimsDisbursement.DisbursedAmountInUSD ?? 0));

                         isFinancialDataMismathed = true;


no message

no message

--- src/SafeOrbitNetCore/Memory/InjectionDetector/InjectionDetector.cs
+++ src/SafeOrbitNetCore/Memory/InjectionDetector/InjectionDetector.cs
@@ -57,8 +57,7 @@

         private readonly ITypeIdGenerator _typeIdGenerator;

-        private ConcurrentDictionary<long, IStamp<int>> _stateStampsDictionary =
-            new ConcurrentDictionary<long, IStamp<int>>();
+        private IStamp<int> _lastStateStamp;

         public InjectionDetector(bool justCode = true, bool justState = true, InjectionAlertChannel alertChannel = Defaults.AlertChannel) : this
         (
@@ -107,7 +106,7 @@
             if (obj == null) throw new ArgumentNullException(nameof(obj));
             if (this.ScanState)
             {
-                SaveStateStampFor(obj);
+                SaveStateStamp(obj);
             }
             if (this.ScanCode)
             {
@@ -158,11 +157,9 @@
             CodeStampsDictionary.AddOrUpdate(codeId, codeStamp, (key, existingVal) => codeStamp);
         }

-        private void SaveStateStampFor(object obj)
-        {
-            var stateId = GetStateId(obj);
-            var stateStamp = _stateStamper.GetStamp(obj);
-            _stateStampsDictionary.AddOrUpdate(stateId, stateStamp, (key, existingVal) => stateStamp);
+        private void SaveStateStamp(object obj)
+        {
+            _lastStateStamp = _stateStamper.GetStamp(obj);
         }

         /// <exception cref="ArgumentException">
@@ -195,7 +192,6 @@
             return stamp;
         }

-        private long GetStateId(object obj) => _objectIdGenerator.GetStateId(obj);
         private string GetCodeId(Type type) => _typeIdGenerator.Generate(type);

         #region [IAlerts]


Tests fixed.

Tests fixed.

--- backend/tests/Squidex.Domain.Apps.Entities.Tests/TestHelpers/HandlerTestBase.cs
+++ backend/tests/Squidex.Domain.Apps.Entities.Tests/TestHelpers/HandlerTestBase.cs
@@ -88,7 +88,7 @@
             return context;
         }

-        protected async Task<object> PublishIdempotentAsync<T>(DomainObject<T> domainObject, IAggregateCommand command) where T : class, IDomainState<T>, IEntityWithVersion, new()
+        protected async Task<object> PublishIdempotentAsync<T>(DomainObject<T> domainObject, IAggregateCommand command) where T : class, IDomainState<T>, new()
         {
             var result = await domainObject.ExecuteAsync(command);


Add parsing anchor table format 2

Add parsing anchor table format 2

--- src/SixLabors.Fonts/Tables/AdvancedTypographic/GPos/AnchorTable.cs
+++ src/SixLabors.Fonts/Tables/AdvancedTypographic/GPos/AnchorTable.cs
@@ -45,7 +45,8 @@
             return anchorFormat switch
             {
                 1 => AnchorFormat1.Load(reader),
-                _ => throw new NotSupportedException($"anchorFormat {anchorFormat} not supported. Should be '1'.")
+                2 => AnchorFormat2.Load(reader),
+                _ => throw new NotSupportedException($"anchorFormat {anchorFormat} not supported. Should be '1' or `2`.")
             };
         }

@@ -72,5 +73,33 @@
                 return new AnchorFormat1(xCoordinate, yCoordinate);
             }
         }
+
+        internal sealed class AnchorFormat2 : AnchorTable
+        {
+            // TODO: actually use the anchorPointIndex.
+            private readonly ushort anchorPointIndex;
+
+            public AnchorFormat2(short xCoordinate, short yCoordinate, ushort anchorPointIndex)
+                : base(xCoordinate, yCoordinate) => this.anchorPointIndex = anchorPointIndex;
+
+            public static AnchorFormat2 Load(BigEndianBinaryReader reader)
+            {
+                // +--------------+------------------------+------------------------------------------------+
+                // | Type         | Name                   | Description                                    |
+                // +==============+========================+================================================+
+                // | uint16       | anchorFormat           | Format identifier, = 1                         |
+                // +--------------+------------------------+------------------------------------------------+
+                // | int16        | xCoordinate            | Horizontal value, in design units.             |
+                // +--------------+------------------------+------------------------------------------------+
+                // | int16        | yCoordinate            | Vertical value, in design units.               |
+                // +--------------+------------------------+------------------------------------------------+
+                // | uint16       + anchorPoint            | Index to glyph contour point                   +
+                // +--------------+------------------------+------------------------------------------------+
+                short xCoordinate = reader.ReadInt16();
+                short yCoordinate = reader.ReadInt16();
+                ushort anchorPointIndex = reader.ReadUInt16();
+                return new AnchorFormat2(xCoordinate, yCoordinate, anchorPointIndex);
+            }
+        }
     }
 }


fix unittest

fix unittest

--- src/SlipStream.Test/Modules/SlipStream.TestModule/simple-models.cs
+++ src/SlipStream.Test/Modules/SlipStream.TestModule/simple-models.cs
@@ -3,7 +3,6 @@
 using System.Collections.Generic;
 using System.Text;

-using Sandwych;
 using SlipStream.Model;

 namespace SlipStream.Test


fix parsing oversight

fix parsing oversight

--- osu.Framework/Configuration/BindableSize.cs
+++ osu.Framework/Configuration/BindableSize.cs
@@ -20,10 +20,11 @@
             switch (input)
             {
                 case string str:
-                    if (!str.Contains("x"))
+                    string[] split = str.Split('x');
+
+                    if (split.Length != 2)
                         throw new ArgumentException($"Input string was in wrong format! (expected: '<width>x<height>', actual: '{str}')");

-                    var split = str.Split('x');
                     Value = new Size(int.Parse(split[0]), int.Parse(split[1]));
                     break;
                 default:


Add vertical grid lines

Add vertical grid lines

--- osu.Game.Tests/Gameplay/TestSceneScoring.cs
+++ osu.Game.Tests/Gameplay/TestSceneScoring.cs
@@ -180,6 +180,7 @@
         private readonly Box hoverLine;

         private readonly Container missLines;
+        private readonly Container verticalGridLines;

         public GraphContainer()
         {
@@ -191,6 +192,10 @@
                     new Box
                     {
                         Colour = OsuColour.Gray(0.1f),
+                        RelativeSizeAxes = Axes.Both,
+                    },
+                    verticalGridLines = new Container
+                    {
                         RelativeSizeAxes = Axes.Both,
                     },
                     Content,
@@ -208,9 +213,33 @@
                 }
             };

-            MissLocations.BindCollectionChanged((_, _) => updateMissLocations(), true);
-
-            MaxCombo.BindValueChanged(_ => updateMissLocations());
+            MissLocations.BindCollectionChanged((_, _) => updateMissLocations());
+
+            MaxCombo.BindValueChanged(_ =>
+            {
+                updateMissLocations();
+                updateVerticalGridLines();
+            }, true);
+        }
+
+        private void updateVerticalGridLines()
+        {
+            verticalGridLines.Clear();
+
+            for (int i = 0; i < MaxCombo.Value; i++)
+            {
+                if (i % 100 == 0)
+                {
+                    verticalGridLines.Add(new Box
+                    {
+                        Colour = OsuColour.Gray(0.2f),
+                        Width = 1,
+                        RelativeSizeAxes = Axes.Y,
+                        RelativePositionAxes = Axes.X,
+                        X = (float)i / MaxCombo.Value,
+                    });
+                }
+            }
         }

         private void updateMissLocations()


Fix not being able to scroll before the first timing point

--- osu.Game/Rulesets/Edit/HitObjectComposer.cs
+++ osu.Game/Rulesets/Edit/HitObjectComposer.cs
@@ -243,7 +243,7 @@
                 seekTime = timingPoint.Time + closestBeat * seekAmount;
             }

-            if (seekTime < timingPoint.Time)
+            if (seekTime < timingPoint.Time && timingPoint != cpi.TimingPoints.First())
                 seekTime = timingPoint.Time;

             var nextTimingPoint = cpi.TimingPoints.FirstOrDefault(t => t.Time > timingPoint.Time);


Award max combo portion score if max achievable is 0

--- osu.Game/Rulesets/Scoring/ScoreProcessor.cs
+++ osu.Game/Rulesets/Scoring/ScoreProcessor.cs
@@ -197,7 +197,7 @@
         {
             return GetScore(mode, maxHighestCombo,
                 maxBaseScore > 0 ? baseScore / maxBaseScore : 0,
-                maxHighestCombo > 0 ? (double)HighestCombo.Value / maxHighestCombo : 0,
+                maxHighestCombo > 0 ? (double)HighestCombo.Value / maxHighestCombo : 1,
                 scoreResultCounts);
         }


Make HasFailed private set

Make HasFailed private set

--- osu.Game/Rulesets/Scoring/ScoreProcessor.cs
+++ osu.Game/Rulesets/Scoring/ScoreProcessor.cs
@@ -95,7 +95,7 @@
         /// <summary>
         /// Whether this ScoreProcessor has already triggered the failed state.
         /// </summary>
-        public virtual bool HasFailed { get; protected set; }
+        public virtual bool HasFailed { get; private set; }

         /// <summary>
         /// The default conditions for failing.


fix sed boundary

fix sed boundary


remove references to DummyWorkingBeatmap

determine content by data that is present instead

--- osu.Game/Screens/Select/BeatmapInfoWedge.cs
+++ osu.Game/Screens/Select/BeatmapInfoWedge.cs
@@ -89,34 +89,8 @@
             [BackgroundDependencyLoader]
             private void load()
             {
-                BeatmapInfo beatmapInfo = working.BeatmapInfo;
-                BeatmapMetadata metadata = beatmapInfo.Metadata ?? working.BeatmapSetInfo?.Metadata ?? new BeatmapMetadata();
-                Beatmap beatmap = working.Beatmap;
-
-                List<InfoLabel> labels = new List<InfoLabel>();
-
-                if (beatmap != null && !(working is DummyWorkingBeatmap))
-                {
-                    HitObject lastObject = beatmap.HitObjects.LastOrDefault();
-                    double endTime = (lastObject as IHasEndTime)?.EndTime ?? lastObject?.StartTime ?? 0;
-
-                    labels.Add(new InfoLabel(new BeatmapStatistic
-                    {
-                        Name = "Length",
-                        Icon = FontAwesome.fa_clock_o,
-                        Content = beatmap.HitObjects.Count == 0 ? "-" : TimeSpan.FromMilliseconds(endTime - beatmap.HitObjects.First().StartTime).ToString(@"m\:ss"),
-                    }));
-
-                    labels.Add(new InfoLabel(new BeatmapStatistic
-                    {
-                        Name = "BPM",
-                        Icon = FontAwesome.fa_circle,
-                        Content = getBPMRange(beatmap),
-                    }));
-
-                    //get statistics from the current ruleset.
-                    labels.AddRange(beatmapInfo.Ruleset.CreateInstance().GetBeatmapStatistics(working).Select(s => new InfoLabel(s)));
-                }
+                var beatmapInfo = working.BeatmapInfo;
+                var metadata = beatmapInfo.Metadata ?? working.BeatmapSetInfo?.Metadata ?? new BeatmapMetadata();

                 PixelSnapping = true;
                 CacheDrawnFrameBuffer = true;
@@ -186,7 +160,7 @@
                             new OsuSpriteText
                             {
                                 Font = @"Exo2.0-MediumItalic",
-                                Text = !string.IsNullOrEmpty(metadata.Source) ? metadata.Source + " — " + metadata.Title : metadata.Title,
+                                Text = string.IsNullOrEmpty(metadata.Source) ? metadata.Title : metadata.Source + " — " + metadata.Title,
                                 TextSize = 28,
                             },
                             new OsuSpriteText
@@ -200,44 +174,84 @@
                                 Margin = new MarginPadding { Top = 10 },
                                 Direction = FillDirection.Horizontal,
                                 AutoSizeAxes = Axes.Both,
-                                Children = working is DummyWorkingBeatmap ? Array.Empty<Drawable>() : getMapper(metadata)
+                                Children = getMapper(metadata)
                             },
                             new FillFlowContainer
                             {
                                 Margin = new MarginPadding { Top = 20 },
                                 Spacing = new Vector2(20, 0),
                                 AutoSizeAxes = Axes.Both,
-                                Children = labels
-                            },
+                                Children = getInfoLabels()
+                            }
                         }
-                    },
+                    }
                 };
             }

-            private OsuSpriteText[] getMapper(BeatmapMetadata metadata) => new[]
-            {
-                new OsuSpriteText
-                {
-                    Font = @"Exo2.0-Medium",
-                    Text = "mapped by ",
-                    TextSize = 15,
-                },
-                new OsuSpriteText
-                {
-                    Font = @"Exo2.0-Bold",
-                    Text = metadata.Author.Username,
-                    TextSize = 15,
+            private InfoLabel[] getInfoLabels()
+            {
+                var beatmap = working.Beatmap;
+                var info = working.BeatmapInfo;
+
+                List<InfoLabel> labels = new List<InfoLabel>();
+
+                if (beatmap?.HitObjects?.Count > 0)
+                {
+                    HitObject lastObject = beatmap.HitObjects.LastOrDefault();
+                    double endTime = (lastObject as IHasEndTime)?.EndTime ?? lastObject?.StartTime ?? 0;
+
+                    labels.Add(new InfoLabel(new BeatmapStatistic
+                    {
+                        Name = "Length",
+                        Icon = FontAwesome.fa_clock_o,
+                        Content = beatmap.HitObjects.Count == 0 ? "-" : TimeSpan.FromMilliseconds(endTime - beatmap.HitObjects.First().StartTime).ToString(@"m\:ss"),
+                    }));
+
+                    labels.Add(new InfoLabel(new BeatmapStatistic
+                    {
+                        Name = "BPM",
+                        Icon = FontAwesome.fa_circle,
+                        Content = getBPMRange(beatmap),
+                    }));
+
+                    //get statistics from the current ruleset.
+                    labels.AddRange(info.Ruleset.CreateInstance().GetBeatmapStatistics(working).Select(s => new InfoLabel(s)));
                 }
-            };
+
+                return labels.ToArray();
+            }

             private string getBPMRange(Beatmap beatmap)
             {
                 double bpmMax = beatmap.ControlPointInfo.BPMMaximum;
                 double bpmMin = beatmap.ControlPointInfo.BPMMinimum;

-                if (Precision.AlmostEquals(bpmMin, bpmMax)) return $"{bpmMin:0}";
+                if (Precision.AlmostEquals(bpmMin, bpmMax))
+                    return $"{bpmMin:0}";

                 return $"{bpmMin:0}-{bpmMax:0} (mostly {beatmap.ControlPointInfo.BPMMode:0})";
+            }
+
+            private OsuSpriteText[] getMapper(BeatmapMetadata metadata)
+            {
+                if (string.IsNullOrEmpty(metadata.Author?.Username))
+                    return Array.Empty<OsuSpriteText>();
+
+                return new[]
+                {
+                    new OsuSpriteText
+                    {
+                        Font = @"Exo2.0-Medium",
+                        Text = "mapped by ",
+                        TextSize = 15,
+                    },
+                    new OsuSpriteText
+                    {
+                        Font = @"Exo2.0-Bold",
+                        Text = metadata.Author.Username,
+                        TextSize = 15,
+                    }
+                };
             }

             public class InfoLabel : Container, IHasTooltip


fix: bump version

fix: bump version


Fixed section parsing bug when there were attachments but no pages on a thread


Remove one more extra Expression.Block call (#2833)

--- src/System.Management.Automation/engine/runtime/Binding/Binders.cs
+++ src/System.Management.Automation/engine/runtime/Binding/Binders.cs
@@ -1728,8 +1728,7 @@
                         Expression.Block(typeof(void), blockExprs),
                         Expression.Catch(
                             exception,
-                            Expression.Block(
-                               Compiler.ThrowRuntimeErrorWithInnerException("PropertyAssignmentException", Expression.Property(exception, "Message"), exception, typeof(void))))),
+                            Compiler.ThrowRuntimeErrorWithInnerException("PropertyAssignmentException", Expression.Property(exception, "Message"), exception, typeof(void)))),
                     // The result of the block is the object constructed, so the tmp must be the last expr in the block.
                     tmp);
             }


revised versioning - setting this to 1.1.1

--- src/Treevs.Essentials.AutoFixture.Xunit/Properties/AssemblyInfo.cs
+++ src/Treevs.Essentials.AutoFixture.Xunit/Properties/AssemblyInfo.cs
@@ -1,16 +1,15 @@
 using System.Reflection;
-using System.Runtime.CompilerServices;
 using System.Runtime.InteropServices;

 // General Information about an assembly is controlled through the following
 // set of attributes. Change these attribute values to modify the information
 // associated with an assembly.
 [assembly: AssemblyTitle("Treevs.Essentials.AutoFixture.Xunit")]
-[assembly: AssemblyDescription("Additions to AutoFixture.Xunit that I wouldn't leave the house without.")]
+[assembly: AssemblyDescription("Use Xunit Theories + AutoFixture.Xunit, in a neat and concise manner.")]
 [assembly: AssemblyConfiguration("")]
 [assembly: AssemblyCompany("")]
 [assembly: AssemblyProduct("Treevs.Essentials.AutoFixture.Xunit")]
-[assembly: AssemblyCopyright("Copyright ©  2014")]
+[assembly: AssemblyCopyright("Copyright ©  2015")]
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyCulture("")]

@@ -32,5 +31,5 @@
 // You can specify all the values or you can default the Build and Revision Numbers
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyFileVersion("1.0.*")]
+[assembly: AssemblyVersion("1.1.1.*")]
+[assembly: AssemblyFileVersion("1.1.1")]


Don't fully regenerate models on startup, they will be regenerated if they are not there or if the hashes don't match so let MB use it's cached models if it can.

--- src/Umbraco.Web/PublishedCache/NuCache/PublishedSnapshotService.cs
+++ src/Umbraco.Web/PublishedCache/NuCache/PublishedSnapshotService.cs
@@ -160,7 +160,7 @@

             _domainStore = new SnapDictionary<int, Domain>();

-            publishedModelFactory.WithSafeLiveFactory(LoadCachesOnStartup);
+            LoadCachesOnStartup();

             Guid GetUid(ContentStore store, int id) => store.LiveSnapshot.Get(id)?.Uid ?? default;
             int GetId(ContentStore store, Guid uid) => store.LiveSnapshot.Get(uid)?.Id ?? default;


Registering missing Web API compat shim services/formatters

--- src/WebJobs.Extensions.Http/Config/HttpWebJobsBuilderExtensions.cs
+++ src/WebJobs.Extensions.Http/Config/HttpWebJobsBuilderExtensions.cs
@@ -2,10 +2,14 @@
 // Licensed under the MIT License. See License.txt in the project root for license information.

 using System;
+using System.Net.Http.Formatting;
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.AspNetCore.Mvc.WebApiCompatShim;
 using Microsoft.Azure.WebJobs;
 using Microsoft.Azure.WebJobs.Extensions.Http;
 using Microsoft.Azure.WebJobs.Host.Bindings;
 using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.DependencyInjection.Extensions;

 namespace Microsoft.Extensions.Hosting
 {
@@ -29,6 +33,18 @@
                 .BindOptions<HttpOptions>();

             builder.Services.AddSingleton<IBindingProvider, HttpDirectRequestBindingProvider>();
+
+            // Compatibility shim configuration and services
+            builder.Services.TryAddSingleton<IContentNegotiator, DefaultContentNegotiator>();
+            builder.Services.Configure<MvcOptions>(o =>
+            {
+                o.OutputFormatters.Insert(0, new HttpResponseMessageOutputFormatter());
+            });
+
+            builder.Services.Configure<WebApiCompatShimOptions>(o =>
+            {
+                o.Formatters.AddRange(new MediaTypeFormatterCollection());
+            });

             return builder;
         }


REstore

REstore

--- src/Workspaces/Core/Portable/Diagnostics/DiagnosticDataLocation.cs
+++ src/Workspaces/Core/Portable/Diagnostics/DiagnosticDataLocation.cs
@@ -129,9 +129,6 @@
             if (RoslynString.IsNullOrEmpty(mapped))
                 return original;

-            if (original == mapped)
-                return original;
-
             var combined = PathUtilities.CombinePaths(PathUtilities.GetDirectoryName(original), PathUtilities.GetFileName(mapped));
             try
             {


TextBox: Add :empty pseudoclass

TextBox: Add :empty pseudoclass

--- src/Avalonia.Controls/TextBox.cs
+++ src/Avalonia.Controls/TextBox.cs
@@ -157,6 +157,8 @@
                 horizontalScrollBarVisibility,
                 BindingPriority.Style);
             _undoRedoHelper = new UndoRedoHelper<UndoRedoState>(this);
+
+            UpdatePseudoclasses();
         }

         public bool AcceptsReturn
@@ -375,6 +377,16 @@
             if (IsFocused)
             {
                 _presenter?.ShowCaret();
+            }
+        }
+
+        protected override void OnPropertyChanged<T>(AvaloniaPropertyChangedEventArgs<T> change)
+        {
+            base.OnPropertyChanged(change);
+
+            if (change.Property == TextProperty)
+            {
+                UpdatePseudoclasses();
             }
         }

@@ -1100,6 +1112,11 @@
             SelectionEnd = CaretIndex;
         }

+        private void UpdatePseudoclasses()
+        {
+            PseudoClasses.Set(":empty", string.IsNullOrWhiteSpace(Text));
+        }
+
         private bool IsPasswordBox => PasswordChar != default(char);

         UndoRedoState UndoRedoHelper<UndoRedoState>.IUndoRedoHost.UndoRedoState


Fixed #211

Fixed #211

--- AssetStudio/Classes/Mesh.cs
+++ AssetStudio/Classes/Mesh.cs
@@ -547,11 +547,12 @@
                         bool m_IsReadable = reader.ReadBoolean();
                         bool m_KeepVertices = reader.ReadBoolean();
                         bool m_KeepIndices = reader.ReadBoolean();
-                        if (version[0] == 5 && version[1] == 6 && version[2] == 4 &&
+                        //TODO Need other ways to solve this problem
+                        /*if (version[0] == 5 && version[1] == 6 && version[2] == 4 &&
                             MeshPD.sourceFile.buildType[0] == "p")
                         {
                             var m_UsedForStaticMeshColliderOnly = reader.ReadBoolean();
-                        }
+                        }*/
                     }
                     reader.AlignStream(4);
                     //This is a bug fixed in 2017.3.1p1 and later versions


fixed bug

fixed bug

--- AssetStudio/Classes/Mesh.cs
+++ AssetStudio/Classes/Mesh.cs
@@ -734,50 +734,55 @@
                     }
                     #endregion

-                    if (version[0] >= 5) //ComputeCompressedStreams
-                    {
-                        int maxStream = 0;
-                        foreach (var m_Channel in m_Channels)
-                        {
-                            if (m_Channel.stream > maxStream)
-                            {
-                                maxStream = m_Channel.stream;
-                            }
-                        }
-                        var streamList = new List<StreamInfo>(maxStream + 1);
-                        uint offset = 0;
-                        for (int str = 0; str <= maxStream; str++)
-                        {
+                    //actual Vertex Buffer
+                    byte[] m_DataSize = new byte[reader.ReadInt32()];
+                    reader.Read(m_DataSize, 0, m_DataSize.Length);
+
+                    if (version[0] >= 5) //create streams
+                    {
+                        m_Streams = new StreamInfo[streamCount];
+                        for (int s = 0; s < streamCount; s++)
+                        {
+                            m_Streams[s] = new StreamInfo();
+                            m_Streams[s].offset = 0;
+                            m_Streams[s].stride = 0;
+
                             uint chnMask = 0;
-                            byte stride = 0;
-                            for (int chn = 0; chn < m_Channels.Length; chn++)
-                            {
-                                if (m_Channels[chn].dimension > 0 && m_Channels[chn].stream == str)
+                            for (var chn = 0; chn < m_Channels.Length; chn++)
+                            {
+                                var m_Channel = m_Channels[chn];
+                                if (m_Channel.stream == s)
                                 {
                                     chnMask |= 1u << chn;
-                                    stride += (byte)(m_Channels[chn].dimension * (m_Channels[chn].format == 0 ? 4 : 1));
-                                }
-                            }
-
-                            var streamInfo = new StreamInfo
-                            {
-                                channelMask = new BitArray(new[] { (int)chnMask }),
-                                offset = (int)offset,
-                                stride = stride,
-                                dividerOp = 0,
-                                frequency = 0
-                            };
-                            streamList.Add(streamInfo);
-                            offset += (uint)m_VertexCount * stride + (((uint)m_VertexCount & 1) != 0 ? (uint)8 : 0);
-                        }
-
-                        m_Streams = streamList.ToArray();
-                    }
-
-
-                    //actual Vertex Buffer
-                    var m_DataSize = new byte[reader.ReadInt32()];
-                    reader.Read(m_DataSize, 0, m_DataSize.Length);
+                                    m_Streams[s].stride += m_Channel.dimension * (4 / (int)Math.Pow(2, m_Channel.format));
+                                }
+                            }
+
+                            if (s > 0)
+                            {
+                                m_Streams[s].offset = m_Streams[s - 1].offset + m_Streams[s - 1].stride * m_VertexCount;
+                                //sometimes there are 8 bytes between streams
+                                //this is NOT an alignment, even if sometimes it may seem so
+
+                                if (streamCount == 2)
+                                {
+                                    m_Streams[s].offset = m_DataSize.Length - m_Streams[s].stride * m_VertexCount;
+                                }
+                                else
+                                {
+                                    m_VertexCount = 0;
+                                    return;
+                                }
+
+                                /*var absoluteOffset = a_Stream.Position + 4 + m_Streams[s].offset;
+								if ((absoluteOffset % m_Streams[s].stride) != 0)
+								{
+									m_Streams[s].offset += m_Streams[s].stride - (int)(absoluteOffset % m_Streams[s].stride);
+								}*/
+                            }
+                            m_Streams[s].channelMask = new BitArray(new[] { (int)chnMask });
+                        }
+                    }
                     #endregion

                     #region compute FvF
@@ -852,7 +857,7 @@
                                         }

                                         m_Stream.channelMask.Set(b, false);
-                                        break;
+                                        break; //go to next channel
                                     }
                                 }
                             }


Adicionando as propriedades de Unidade de atendimento e Posto de atendimento para adequar o layout

--- src/Boleto.Net/Boleto/Cedente.cs
+++ src/Boleto.Net/Boleto/Cedente.cs
@@ -20,6 +20,8 @@
         private string _carteira;
         private Endereco _endereco;
         private IList<IInstrucao> _instrucoes = new List<IInstrucao>();
+		private int _postoAtendimento;
+		private int _unidadeAtendimento;
         #endregion Variaveis

         public Cedente()
@@ -241,7 +243,22 @@
                 _instrucoes = value;
             }
         }
-
+		/// <summary>
+		/// Unidade de Atendimento
+		/// </summary>
+		public int UnidadeAtendimento
+		{
+			get { return _unidadeAtendimento; }
+			set { _unidadeAtendimento = value; }
+		}
+		/// <summary>
+		/// Posto de atendimento
+		/// </summary>
+		public int PostoAtendimento
+		{
+			get { return _postoAtendimento; }
+			set { _postoAtendimento = value; }
+		}
         #endregion Propriedades
     }
 }


Code formatting

Code formatting

--- src/CommandLine/Text/HelpText.cs
+++ src/CommandLine/Text/HelpText.cs
@@ -16,27 +16,16 @@
     public class HelpText
     {
         private const int BuilderCapacity = 128;
-
         private const int DefaultMaximumLength = 80; // default console width
-
         private readonly StringBuilder preOptionsHelp;
-
         private readonly StringBuilder postOptionsHelp;
-
         private readonly SentenceBuilder sentenceBuilder;
-
         private int? maximumDisplayWidth;
-
         private string heading;
-
         private string copyright;
-
         private bool additionalNewLineAfterOption;
-
         private StringBuilder optionsHelp;
-
         private bool addDashesToOption;
-
         private bool addEnumValuesToHelpText;

         /// <summary>


FIX: exception being thrown during redirection (EarlyUrlLocalizer) (#195)

--- src/i18n/Concrete/EarlyUrlLocalizer.cs
+++ src/i18n/Concrete/EarlyUrlLocalizer.cs
@@ -189,7 +189,13 @@
                 context.Response.Status = "302 Moved Temporarily";
             }
             context.Response.RedirectLocation = urlNew;
-            context.Response.End();
+
+            // End the request early: no further processing along the pipeline.
+            // NB: we did originally use context.Response.End(); here but that causes an
+            // unnecessary exception to be thrown (https://support.microsoft.com/en-us/kb/312629) (#195)
+            // NB: the line AFTER this line will execute, so best to return immediately here
+            // and from caller etc..
+            context.ApplicationInstance.CompleteRequest();
         }

         /// <summary>


Fixed issue with NuGet.exe requiring 201 Created response from gallery

--- src/Core/Server/PackageServer.cs
+++ src/Core/Server/PackageServer.cs
@@ -76,7 +76,7 @@
                 multiPartRequest.CreateMultipartRequest(request);
             };

-            EnsureSuccessfulResponse(client, HttpStatusCode.Created);
+            EnsureSuccessfulResponse(client);
         }

         public void DeletePackage(string apiKey, string packageId, string packageVersion)
@@ -127,13 +127,18 @@
             return requestUri;
         }

-        private static void EnsureSuccessfulResponse(HttpClient client, HttpStatusCode expectedStatusCode = HttpStatusCode.OK)
+        private static void EnsureSuccessfulResponse(HttpClient client, HttpStatusCode? expectedStatusCode = null)
         {
             HttpWebResponse response = null;
             try
             {
                 response = (HttpWebResponse)client.GetResponse();
-                if (response != null && expectedStatusCode != response.StatusCode)
+                if (response != null &&
+                    ((expectedStatusCode.HasValue && expectedStatusCode.Value != response.StatusCode) ||
+
+                    // If expected status code isn't provided, just look for anything 400 (Client Errors) or higher (incl. 500-series, Server Errors)
+                    // 100-series is protocol changes, 200-series is success, 300-series is redirect.
+                    (!expectedStatusCode.HasValue && (int)response.StatusCode >= 400)))
                 {
                     throw new InvalidOperationException(String.Format(CultureInfo.CurrentCulture, NuGetResources.PackageServerError, response.StatusDescription, String.Empty));
                 }


Gerando grid de adversário e aumentando o tamanho para 15x15 para ficar bonito =D

--- Assets/Scripts/GeraGrids.cs
+++ Assets/Scripts/GeraGrids.cs
@@ -5,8 +5,12 @@

 	private int posX, posY;

-	private float MapaJogadorX = -7;
-	private float MapaJogadorY = -2;
+	private float MapaJogadorX = -8;
+	private float MapaJogadorY = -3;
+
+	private float MapaAdversarioX = 1;
+	private float MapaAdversarioY = -3;
+
 	private float MapaX;
 	private float MapaY;

@@ -21,8 +25,8 @@

 		MapaX = MapaJogadorX;
 		MapaY = MapaJogadorY;
-		for (posX = 1; posX <=10 ; posX++)
-		{	for (posY =1; posY <=10; posY++)
+		for (posX = 1; posX <=15 ; posX++)
+		{	for (posY =1; posY <=15; posY++)
 			{
 				Instantiate(ObjetoGrid, new Vector3(MapaX, MapaY, -1), Quaternion.identity);
 				MapaY = MapaY + 0.5f;
@@ -30,5 +34,17 @@
 			MapaY = MapaJogadorY;
 			MapaX = MapaX + 0.5f;
 		}
+
+		MapaX = MapaAdversarioX;
+		MapaY = MapaAdversarioY;
+		for (posX = 1; posX <=15 ; posX++)
+		{	for (posY =1; posY <=15; posY++)
+			{
+				Instantiate(ObjetoGrid, new Vector3(MapaX, MapaY, -1), Quaternion.identity);
+				MapaY = MapaY + 0.5f;
+			}
+			MapaY = MapaAdversarioY;
+			MapaX = MapaX + 0.5f;
+		}
 	}
 }


* Simplified ErrorLogPageFactory.GetHandler by moving the authorization test into a separate method.

--- src/Elmah/ErrorLogPageFactory.cs
+++ src/Elmah/ErrorLogPageFactory.cs
@@ -73,17 +73,10 @@
                 throw new HttpException(404, "Resource not found.");

             //
-            // Check if the request is authorized.
-            //
-
-            int authorized = /* uninitialized */ -1;
-            IEnumerator authorizationHandlers = GetAuthorizationHandlers(context).GetEnumerator();
-            while (authorized != 0 && authorizationHandlers.MoveNext())
-            {
-                IRequestAuthorizationHandler authorizationHandler = (IRequestAuthorizationHandler) authorizationHandlers.Current;
-                authorized = authorizationHandler.Authorize(context) ? 1 : 0;
-            }
-
+            // Check if authorized then grant or deny request.
+            //
+
+            int authorized = IsAuthorized(context);
             if (authorized == 0
                 || (authorized < 0 // Compatibility case...
                     && !HttpRequestSecurity.IsLocal(context.Request)
@@ -155,6 +148,30 @@

         public virtual void ReleaseHandler(IHttpHandler handler)
         {
+        }
+
+        /// <summary>
+        /// Determines if the request is authorized by objects implementing
+        /// <see cref="IRequestAuthorizationHandler" />.
+        /// </summary>
+        /// <returns>
+        /// Returns zero if unauthorized, a value greater than zero if
+        /// authorized otherwise a value less than zero if no handlers
+        /// were available to answer.
+        /// </returns>
+
+        private static int IsAuthorized(HttpContext context)
+        {
+            Debug.Assert(context != null);
+
+            int authorized = /* uninitialized */ -1;
+            IEnumerator authorizationHandlers = GetAuthorizationHandlers(context).GetEnumerator();
+            while (authorized != 0 && authorizationHandlers.MoveNext())
+            {
+                IRequestAuthorizationHandler authorizationHandler = (IRequestAuthorizationHandler)authorizationHandlers.Current;
+                authorized = authorizationHandler.Authorize(context) ? 1 : 0;
+            }
+            return authorized;
         }

         private static IList GetAuthorizationHandlers(HttpContext context)


added escape function.

added escape function.


Cleanup

Cleanup

--- AsyncTransactions/Script.cs
+++ AsyncTransactions/Script.cs
@@ -10,7 +10,14 @@
     [TestFixture]
     public class Script
     {
-        [Test]
+        [SetUp]
+        public void SetUp()
+        {
+            Transaction.Current = null;
+        }
+
+        [Test]
+        [ExpectedException(typeof(ArgumentOutOfRangeException))]
         [TestCase("EntityFramework")]
         public void TheStart(string EntityFramework = null)
         {
@@ -59,6 +66,7 @@
         }

         [Test]
+        [ExpectedException(typeof(InvalidOperationException))] // Normally never use those
         public async Task TransactionScopeAsync()
         {
             var slide = new Slide(title: "Transaction Scope Async");
@@ -199,6 +207,7 @@
         }

         [Test]
+        [Explicit]
         public async Task TheEnd()
         {
             var giveAway = new GiveAway();


Add option to convert output to hexadecimal

--- AutoCalc/MainWindow.xaml.cs
+++ AutoCalc/MainWindow.xaml.cs
@@ -21,11 +21,14 @@
     /// </summary>
     public partial class MainWindow : Window
     {
+        bool hexOutput;
         DispatcherTimer infoTextTimer;

         public MainWindow()
         {
             InitializeComponent();
+
+            hexOutput = false;

             // initialize the text boxes
             formulaBox.Text = string.Empty;
@@ -59,6 +62,12 @@
                     UpdateSolution(this, null);
                     ResetInfoText(this, null);
                     break;
+                // Ctrl - Toggle hex output
+                case Key.LeftShift:
+                case Key.RightShift:
+                    hexOutput = !hexOutput;
+                    UpdateSolution(this, null);
+                    break;
             }
         }

@@ -83,19 +92,22 @@
                 {
                     // split by 0x to get just the base16 number
                     string[] hex = inputText.Split(new string[] { "0x" }, StringSplitOptions.RemoveEmptyEntries);
-                    for(int i = 0; i < hex.Length; i++)
+                    if (inputText.Contains("0x"))
                     {
-                        // strip off everything past the next space/operator
-                        string chunk = hex[i].Split(new char[] { ' ', '+', '*', '/', '(', ')' })[0];
+                        for (int i = 0; i < hex.Length; i++)
+                        {
+                            // strip off everything past the next space/operator
+                            string chunk = hex[i].Split(new char[] { ' ', '+', '*', '/', '(', ')' })[0];

-                        // replace the hex numbers with base-10 numbers
-                        int actualNum = Convert.ToInt32(chunk, 16);
+                            // replace the hex numbers with base-10 numbers
+                            int actualNum = Convert.ToInt32(chunk, 16);

-                        hex[i] = hex[i].Replace(chunk, actualNum.ToString());
+                            hex[i] = hex[i].Replace(chunk, actualNum.ToString());
+                        }
+
+                        // reassemble the input string
+                        inputText = string.Concat(hex);
                     }
-
-                    // reassemble the input string
-                    inputText = string.Concat(hex);
                 }
                 catch(Exception)
                 {
@@ -122,7 +134,25 @@
                 else
                 {
                     resultLabel.Foreground = new SolidColorBrush(Color.FromRgb(90, 158, 34));
-                    resultLabel.Content = result;
+
+                    // defaults to non-hex output
+                    if(!hexOutput)
+                    {
+                        resultLabel.Content = result;
+                    }
+                    else
+                    {
+                        // convert the result to a string with the 0x identifier
+                        string hexResult = string.Format("0x{0:X}", Convert.ToInt32(result));
+                        resultLabel.Content = hexResult;
+
+                        // decimals are automatically rounded during conversion - notify the user
+                        if(result.ToString().Contains("."))
+                        {
+                            infoLabel.Content = "Decimals have been rounded off.";
+                            infoTextTimer.Start();
+                        }
+                    }

                     // attempt to read/display the result as a bool (logical operators)


Update while iterating won't work yet. Next project.

--- Biggy.Tasks/MassiveTasks.cs
+++ Biggy.Tasks/MassiveTasks.cs
@@ -164,24 +164,6 @@
             }
             sw.Stop();
             this.LogOutput("Wrote queried values out to console", query.Count(), sw.ElapsedMilliseconds);
-
-            sw.Reset();
-            sw.Start();
-
-            // Update the queried records:
-            foreach(var trans in query)
-            {
-                trans.Amount = trans.Amount * 2;
-                transactions.Update(trans);
-            }
-            sw.Stop();
-            this.LogOutput("Updated", query.Count(), sw.ElapsedMilliseconds);
-
-            // Read the queried records to the console:
-            foreach (var trans in query)
-            {
-                this.LogOutput("New amount = " + trans.Amount);
-            }
         }


Module constructor precondition test.

Module constructor precondition test.

--- src/Knapsack.UnitTests/Module.cs
+++ src/Knapsack.UnitTests/Module.cs
@@ -2,6 +2,7 @@
 using System.Security.Cryptography;
 using Should;
 using Xunit;
+using System;

 namespace Knapsack
 {
@@ -78,4 +79,16 @@
             Assert.NotEqual(module1, module2);
         }
     }
+
+    public class Module_constructor
+    {
+        [Fact]
+        public void Cannot_create_Module_with_script_having_path_not_in_module()
+        {
+            Assert.Throws<ArgumentException>(delegate
+            {
+                new Module("module-a", new[] { new Script("module-b/test.js", new byte[0], new string[0]) }, new string[0]);
+            });
+        }
+    }
 }


Comment out third tracker to avoid having to wait for a webrequest timeout when running tests

svn path=/trunk/bitsharp/; revision=104149

--- src/MonoTorrent.Tests/TestRig.cs
+++ src/MonoTorrent.Tests/TestRig.cs
@@ -328,7 +328,7 @@
             BEncodedList announceTier = new BEncodedList();
             announceTier.Add(new BEncodedString("custom://transfers1/announce"));
             announceTier.Add(new BEncodedString("custom://transfers2/announce"));
-            announceTier.Add(new BEncodedString("http://transfers3/announce"));
+            //announceTier.Add(new BEncodedString("http://transfers3/announce"));
             BEncodedList announceList = new BEncodedList();
             announceList.Add(announceTier);
             dict[new BEncodedString("announce-list")] = announceList;


fixed a bug where the IStoreEvents instance used by NES couldnt be disposed

--- src/NES.NEventStore/NESWireup.cs
+++ src/NES.NEventStore/NESWireup.cs
@@ -30,7 +30,6 @@
             Container.Register<IScheduleDispatches>(c => new SynchronousDispatchScheduler(new MessageDispatcher(() => DI.Current.Resolve<IEventPublisher>()), c.Resolve<IPersistStreams>()));

             DI.Current.Register<IEventStore, IStoreEvents>(eventStore => new EventStoreAdapter(eventStore));
-            DI.Current.Register(() => Container.Resolve<IStoreEvents>());
         }

         public SerializationWireup UsingJsonSerialization()
@@ -61,7 +60,11 @@

             pipelineHooks.Add(eventConverterPipelineHook);

-            return base.Build();
+            var store = base.Build();
+
+            DI.Current.Register(() => store);
+
+            return store;
         }
     }
 }


Minor refactoring

Minor refactoring

SVN: 488784591515bd4cdaa016be4ec9b172dc4e7caf@4473

--- src/NHibernate/Mapping/Column.cs
+++ src/NHibernate/Mapping/Column.cs
@@ -412,14 +412,19 @@
 			return quoted ? '`' + name + '`' : name;
 		}

-		private bool IsCaracteristicsDefined()
-		{
-			return length.HasValue || precision.HasValue || scale.HasValue;
-		}
-
-		private bool IsPrecisionDefined()
+		public bool IsCaracteristicsDefined()
+		{
+			return IsLengthDefined() || IsPrecisionDefined();
+		}
+
+		public bool IsPrecisionDefined()
 		{
 			return precision.HasValue || scale.HasValue;
+		}
+
+		public bool IsLengthDefined()
+		{
+			return length.HasValue;
 		}

 		#region ICloneable Members


Update colours of all overlay components in one swoop (based off combo colour)

--- osu.Game/Screens/Edit/Compose/Components/Timeline/TimelineHitObjectBlueprint.cs
+++ osu.Game/Screens/Edit/Compose/Components/Timeline/TimelineHitObjectBlueprint.cs
@@ -31,6 +31,8 @@
         private const float shadow_radius = 5;
         private const float circle_size = 38;

+        private Container repeatsContainer;
+
         public Action<DragEvent> OnDragHandled;

         [UsedImplicitly]
@@ -41,7 +43,7 @@

         private readonly Drawable circle;

-        private readonly Container mainComponents;
+        private readonly Container colouredComponents;
         private readonly OsuSpriteText comboIndexText;

         [Resolved]
@@ -59,39 +61,37 @@
             RelativePositionAxes = Axes.X;

             RelativeSizeAxes = Axes.X;
-            AutoSizeAxes = Axes.Y;
-
-            AddRangeInternal(new Drawable[]
-            {
-                mainComponents = new Container
-                {
+            Height = circle_size;
+
+            AddRangeInternal(new[]
+            {
+                circle = new ExtendableCircle
+                {
+                    RelativeSizeAxes = Axes.Both,
                     Anchor = Anchor.CentreLeft,
                     Origin = Anchor.CentreLeft,
-                    RelativeSizeAxes = Axes.X,
-                    AutoSizeAxes = Axes.Y,
                 },
-                comboIndexText = new OsuSpriteText
+                colouredComponents = new Container
                 {
                     Anchor = Anchor.CentreLeft,
-                    Origin = Anchor.Centre,
-                    Y = -1,
-                    Font = OsuFont.Default.With(size: circle_size * 0.5f, weight: FontWeight.Regular),
+                    Origin = Anchor.CentreLeft,
+                    RelativeSizeAxes = Axes.Both,
+                    Children = new Drawable[]
+                    {
+                        comboIndexText = new OsuSpriteText
+                        {
+                            Anchor = Anchor.CentreLeft,
+                            Origin = Anchor.Centre,
+                            Y = -1,
+                            Font = OsuFont.Default.With(size: circle_size * 0.5f, weight: FontWeight.Regular),
+                        },
+                    }
                 },
             });

-            circle = new ExtendableCircle
-            {
-                RelativeSizeAxes = Axes.X,
-                Size = new Vector2(1, circle_size),
-                Anchor = Anchor.CentreLeft,
-                Origin = Anchor.CentreLeft,
-            };
-
-            mainComponents.Add(circle);
-
             if (hitObject is IHasDuration)
             {
-                mainComponents.Add(new DragArea(hitObject)
+                colouredComponents.Add(new DragArea(hitObject)
                 {
                     OnDragHandled = e => OnDragHandled?.Invoke(e)
                 });
@@ -127,15 +127,15 @@
             var comboColour = combo.GetComboColour(comboColours);

             if (HitObject is IHasDuration)
-                mainComponents.Colour = ColourInfo.GradientHorizontal(comboColour, comboColour.Lighten(0.4f));
+                circle.Colour = ColourInfo.GradientHorizontal(comboColour, comboColour.Lighten(0.4f));
             else
-                mainComponents.Colour = comboColour;
-
-            var col = mainComponents.Colour.TopLeft.Linear;
+                circle.Colour = comboColour;
+
+            var col = circle.Colour.TopLeft.Linear;
             float brightness = col.R + col.G + col.B;

             // decide the combo index colour based on brightness?
-            comboIndexText.Colour = brightness > 0.5f ? Color4.Black : Color4.White;
+            colouredComponents.Colour = OsuColour.Gray(brightness > 0.5f ? 0.2f : 0.9f);
         }

         protected override void Update()
@@ -155,13 +155,11 @@
             }
         }

-        private Container repeatsContainer;
-
         private void updateRepeats(IHasRepeats repeats)
         {
             repeatsContainer?.Expire();

-            mainComponents.Add(repeatsContainer = new Container
+            colouredComponents.Add(repeatsContainer = new Container
             {
                 RelativeSizeAxes = Axes.Both,
             });
@@ -170,7 +168,8 @@
             {
                 repeatsContainer.Add(new Circle
                 {
-                    Size = new Vector2(circle_size / 2),
+                    Size = new Vector2(circle_size / 3),
+                    Alpha = 0.2f,
                     Anchor = Anchor.CentreLeft,
                     Origin = Anchor.Centre,
                     RelativePositionAxes = Axes.X,
@@ -224,7 +223,6 @@
                 Origin = Anchor.Centre;
                 RelativePositionAxes = Axes.X;
                 RelativeSizeAxes = Axes.Y;
-                Colour = OsuColour.Gray(0.2f);

                 InternalChildren = new Drawable[]
                 {
@@ -351,7 +349,6 @@

         /// <summary>
         /// A circle with externalised end caps so it can take up the full width of a relative width area.
-        /// TODO: figure how to do this with a single circle to avoid pixel-misaligned edges.
         /// </summary>
         public class ExtendableCircle : Container
         {
@@ -391,7 +388,9 @@
                     Colour = Color4.Black.Opacity(0.4f)
                 };

-                const float fudge = 0.97f;
+                // TODO: figure how to do this whole thing with a single circle to avoid pixel-misaligned edges.
+                // just working with what i can make work for the time being..
+                const float fudge = 0.4f;

                 InternalChildren = new Drawable[]
                 {
@@ -400,7 +399,7 @@
                         RelativeSizeAxes = Axes.Both,
                         Anchor = Anchor.CentreLeft,
                         Origin = Anchor.CentreLeft,
-                        Height = fudge,
+                        Padding = new MarginPadding { Vertical = fudge },
                         Masking = true,
                         AlwaysPresent = true,
                         EdgeEffect = effect,
@@ -418,12 +417,16 @@
                         Origin = Anchor.TopCentre,
                         Size = new Vector2(circle_size)
                     },
-                    new Box
+                    new Container
                     {
                         RelativeSizeAxes = Axes.Both,
+                        Padding = new MarginPadding { Vertical = fudge },
                         Anchor = Anchor.CentreLeft,
                         Origin = Anchor.CentreLeft,
-                        Height = fudge,
+                        Children = new Drawable[]
+                        {
+                            new Box { RelativeSizeAxes = Axes.Both, }
+                        }
                     },
                 };
             }


--- CSharp/String/RemovePart.cs
+++ CSharp/String/RemovePart.cs
@@ -7,7 +7,7 @@
 			posicao = texto.IndexOf(">", posicao + 1);
 			if (posicao == -1) break;
 		}
-        if (posicao > -1) texto = texto.Substring(0, posicao + 1);
+        if (posicao > -1) texto = texto.Substring(0, posicao);
         WriteLine(texto);
         texto = "0001>0002";
 		posicao = -1;
@@ -15,7 +15,7 @@
 			posicao = texto.IndexOf(">", posicao + 1);
 			if (posicao == -1) break;
 		}
-        if (posicao > -1) texto = texto.Substring(0, posicao + 1);
+        if (posicao > -1) texto = texto.Substring(0, posicao);
         WriteLine(texto);
     }
 }


Switch failing test to passing tests (AppVeyor now successfully running xunit tests and failing the build on failing test)

--- ControlFlow.Test/TryTest.cs
+++ ControlFlow.Test/TryTest.cs
@@ -6,9 +6,8 @@
     public class TryTest
     {
         [Fact]
-        public void Fail()
+        public void Pass()
         {
-            throw new Exception();
         }
     }
 }


Updated Craft.Net.Client.Session to throw an exception on login error

--- Craft.Net.Client/Session.cs
+++ Craft.Net.Client/Session.cs
@@ -22,7 +22,7 @@
             string login = responseStream.ReadToEnd();
             responseStream.Close();
             if (login.Count(c => c == ':') != 4)
-                return new Session(login.Trim());
+                throw new UnauthorizedAccessException(login);
             string[] parts = login.Split(':');
             return new Session(parts[2], parts[3], parts[0]);
         }


Revert field type change

Revert field type change

--- osu.Framework/Bindables/Bindable.cs
+++ osu.Framework/Bindables/Bindable.cs
@@ -421,7 +421,7 @@
             Value = serializer.Deserialize<T>(reader);
         }

-        private ILeasedBindable<T> leasedBindable;
+        private LeasedBindable<T> leasedBindable;

         private bool isLeased => leasedBindable != null;

@@ -437,9 +437,7 @@
             if (checkForLease(this))
                 throw new InvalidOperationException("Attempted to lease a bindable that is already in a leased state.");

-            var instance = new LeasedBindable<T>(this, revertValueOnReturn);
-            leasedBindable = instance;
-            return instance;
+            return leasedBindable = new LeasedBindable<T>(this, revertValueOnReturn);
         }

         private bool checkForLease(Bindable<T> source)


Make InputManager not box AliveInternalChildren's enumerator

--- osu.Framework/Input/InputManager.cs
+++ osu.Framework/Input/InputManager.cs
@@ -311,8 +311,10 @@
             if (this is UserInputManager)
                 FrameStatistics.Increment(StatisticsCounterType.MouseQueue);

-            foreach (Drawable d in AliveInternalChildren)
-                d.BuildMouseInputQueue(state.Mouse.Position, positionalInputQueue);
+            // for-loop is used to avoid boxing the enumerator
+            // ReSharper disable once ForCanBeConvertedToForeach
+            for (int i = 0; i < AliveInternalChildren.Count; i++)
+                AliveInternalChildren[i].BuildMouseInputQueue(state.Mouse.Position, positionalInputQueue);

             positionalInputQueue.Reverse();
             return positionalInputQueue;


Change shift-tab to cycle available HUD visibility modes

--- osu.Game/Screens/Play/HUDOverlay.cs
+++ osu.Game/Screens/Play/HUDOverlay.cs
@@ -277,9 +277,25 @@
                 switch (e.Key)
                 {
                     case Key.Tab:
-                        configVisibilityMode.Value = configVisibilityMode.Value != HUDVisibilityMode.Never
-                            ? HUDVisibilityMode.Never
-                            : HUDVisibilityMode.HideDuringGameplay;
+                        switch (configVisibilityMode.Value)
+                        {
+                            case HUDVisibilityMode.Never:
+                                configVisibilityMode.Value = HUDVisibilityMode.HideDuringGameplay;
+                                break;
+
+                            case HUDVisibilityMode.HideDuringGameplay:
+                                configVisibilityMode.Value = HUDVisibilityMode.HideDuringBreaks;
+                                break;
+
+                            case HUDVisibilityMode.HideDuringBreaks:
+                                configVisibilityMode.Value = HUDVisibilityMode.Always;
+                                break;
+
+                            case HUDVisibilityMode.Always:
+                                configVisibilityMode.Value = HUDVisibilityMode.Never;
+                                break;
+                        }
+
                         return true;
                 }
             }


fixes #87

fixes #87

--- slimCat/ViewModels/Channels/PMChannelViewModel.cs
+++ slimCat/ViewModels/Channels/PMChannelViewModel.cs
@@ -330,7 +330,7 @@
         private void SendTypingNotification(TypingStatus type)
         {
             Events.SendUserCommand(CommandDefinitions.ClientSendTypingStatus,
-                new[] {type.ToString(), ConversationWith.Name});
+                new[] {type.ToString().ToLower(), ConversationWith.Name});
         }

         private bool UpdateIsOurCharacter(NotificationModel param)


using StringListResult instead of StringResult

--- Blueprint41/Query/StringListResult.cs
+++ Blueprint41/Query/StringListResult.cs
@@ -31,9 +31,9 @@
             return new StringResult(this, "reduce(value = {0}, item in {base} | {1})", new object[] { Parameter.Constant<string>(init), result }, typeof(string));
         }

-        public StringResult Union(StringListResult stringListResult)
+        public StringListResult Union(StringListResult stringListResult)
         {
-            return new StringResult(this, "{base} + {0}", new object[] { stringListResult });
+            return new StringListResult(this, "{base} + {0}", new object[] { stringListResult });
         }
     }
 }


BL-9518 Fix template thumb regression

BL-9518 Fix template thumb regression

(cherry picked from commit bc5e80a6f4e90f5e69552f6678b3f632f53807da)

--- src/BloomExe/Book/Book.cs
+++ src/BloomExe/Book/Book.cs
@@ -3518,9 +3518,9 @@
 				return null;	// can happen in tests
 			// This first branch covers the currently obsolete approach to images using background-image.
 			// In that approach the data-book attribute is on the imageContainer.
-			// Note that we want the coverImage from from a page instead of the dataDiv because the former
-			// "doesn't have the data in the form that GetImageElementUrl can handle."
-			var coverImgElt = Storage.Dom.SafeSelectNodes("//div[@id!='bloomDataDiv']/div[@data-book='coverImage']")
+			// Note that we want the coverImage from a page, instead of the dataDiv because the former
+			// "doesn't have the data in the form that GetImageElementUrl can handle."
+			var coverImgElt = Storage.Dom.SafeSelectNodes("//div[not(@id='bloomDataDiv')]/div[@data-book='coverImage']")
 				.Cast<XmlElement>()
 				.FirstOrDefault();
 			// If that fails, we look for an img with the relevant attribute. Happily this doesn't conflict with the data-div.


The ItemComparer will no longer attempt to find a Field Comparer for null/null values, it will now assume them to be identical. This should help untangle Unicorn Issue 319.

--- src/Rainbow/Diff/ItemComparer.cs
+++ src/Rainbow/Diff/ItemComparer.cs
@@ -254,6 +254,9 @@
 			IItemFieldValue targetField;
 			if (!targetFields.TryGetValue(fieldId, out targetField)) return true;

+			if (sourceField.Value == null && targetField.Value == null) return false;   // 2.0.6-pre3 - added this. It makes no sense to loop through field comparers, asking them to compare two null values.
+																						// Relates to issue https://github.com/SitecoreUnicorn/Unicorn/issues/319
+
 			IFieldComparer comparer;
 			// ReSharper disable once ForCanBeConvertedToForeach
 			for (var index = 0; index < FieldComparers.Count; index++)


Fix changing multiple page layouts in shell books (BL-6991)

This was tested on "The Moon and the Cap" and "Vaccinations" (which are
the official sample shell books) and on *"My Fish! "No, it's my fish!"*
downloaded from bloomlibrary.org.

--- src/BloomExe/Book/Page.cs
+++ src/BloomExe/Book/Page.cs
@@ -39,7 +39,7 @@
 			sourcePage = EnsureID(sourcePage);
 			_id = FixPageId(sourcePage.Attributes["id"].Value);
 			var lineage = sourcePage.Attributes["data-pagelineage"];
-			_pageLineage = lineage == null ? new string[] {} : lineage.Value.Split(new[] { ',' });
+			_pageLineage = lineage == null ? new string[] {} : lineage.Value.Split(new[] { ',', ';' });

 			Guard.AgainstNull(book,"Book");
 			Book = book;


Updated to corectly load responseStream

Updated to corectly load responseStream

--- src/CAPNet.Cmd/Program.cs
+++ src/CAPNet.Cmd/Program.cs
@@ -83,8 +83,7 @@
                     using (Stream responseStream = response.GetResponseStream())
                     {
                         XDocument doc = new XDocument();
-                        doc.Add(responseStream);
-
+                        doc = XDocument.Load(responseStream);
                         var alertList = XmlParser.Parse(doc);
                         return alertList;
                     }


Added Sequence class for legacy support

Added Sequence class for legacy support

Sequence has been renamed to Block to be more descriptive.

--- Assets/Fungus/Flowchart/Scripts/Block.cs
+++ Assets/Fungus/Flowchart/Scripts/Block.cs
@@ -6,6 +6,16 @@

 namespace Fungus
 {
+	/**
+	 * The Sequence class has been renamed to Block to be more descriptive.
+	 */
+	[ExecuteInEditMode]
+	[RequireComponent(typeof(Flowchart))]
+	[AddComponentMenu("")]
+	[Obsolete("Use Block class instead")]
+	public class Sequence : Block
+	{}
+
 	[ExecuteInEditMode]
 	[RequireComponent(typeof(Flowchart))]
 	[AddComponentMenu("")]


filehandler test

filehandler test

--- AutoSharpporting/Autoplay/FileHandler.cs
+++ AutoSharpporting/Autoplay/FileHandler.cs
@@ -11,26 +11,26 @@
 {
     internal class FileHandler
     {
-        private static string _cBuildsPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\AutoSharpporting\\"; //y u do dis csharp
+        private static string _cBuildsPath = Config.LeagueSharpDirectory + @"\AutoSharpporting\";
         private static string theFile = ""; //better to intialize at ongameload
         private static string[] _itemsStringArray = { };
         public static int[] Items = { };

         public static void DoChecks()
         {
-            theFile = _cBuildsPath + Utility.Map.GetMap().Type.ToString() + Autoplay.Bot.BaseSkinName + ".txt";
+            theFile = _cBuildsPath + Utility.Map.GetMap().Type + Autoplay.Bot.BaseSkinName + ".txt";
             if (!Directory.Exists(_cBuildsPath))
             {
                 Directory.CreateDirectory(_cBuildsPath);
-                Directory.CreateDirectory(_cBuildsPath + Utility.Map.MapType.CrystalScar.ToString());
-                Directory.CreateDirectory(_cBuildsPath + Utility.Map.MapType.HowlingAbyss.ToString());
-                Directory.CreateDirectory(_cBuildsPath + Utility.Map.MapType.SummonersRift.ToString());
-                Directory.CreateDirectory(_cBuildsPath + Utility.Map.MapType.TwistedTreeline.ToString());
-                Directory.CreateDirectory(_cBuildsPath + Utility.Map.MapType.Unknown.ToString());
+                Directory.CreateDirectory(_cBuildsPath + Utility.Map.MapType.CrystalScar);
+                Directory.CreateDirectory(_cBuildsPath + Utility.Map.MapType.HowlingAbyss);
+                Directory.CreateDirectory(_cBuildsPath + Utility.Map.MapType.SummonersRift);
+                Directory.CreateDirectory(_cBuildsPath + Utility.Map.MapType.TwistedTreeline);
+                Directory.CreateDirectory(_cBuildsPath + Utility.Map.MapType.Unknown);
             }
             if (ExistsCustomBuild())
             {
-                Console.WriteLine("Found custom build");
+                Game.PrintChat("Found custom build");
                 var contents = File.ReadAllText(theFile);
                 string[] separator = { "," };
                 _itemsStringArray = contents.Split(separator, StringSplitOptions.RemoveEmptyEntries);
@@ -43,7 +43,7 @@

         public static bool ExistsCustomBuild()
         {
-            return (File.Exists(theFile));
+            return File.Exists(theFile);
         }

         public static ItemId[] GetCustomBuild()


#133 Fix incorrect routing for unauthenticated users

--- CVGS/Controllers/AccountController.cs
+++ CVGS/Controllers/AccountController.cs
@@ -257,7 +257,7 @@
             var memberId = this.Session["MemberId"];
             if (memberId == null)
             {
-                return RedirectToAction("Index", "Account");
+                return RedirectToAction("Index", "Login");
             }

             // Find the member to change their password


Point3D Documentation updates

Point3D Documentation updates

--- src/Spatial/Euclidean/Point3D.cs
+++ src/Spatial/Euclidean/Point3D.cs
@@ -12,6 +12,9 @@
     using MathNet.Spatial.Internals;
     using MathNet.Spatial.Units;

+    /// <summary>
+    /// Represents a point in 3 dimensional space
+    /// </summary>
     [Serializable]
     public struct Point3D : IXmlSerializable, IEquatable<Point3D>, IFormattable
     {
@@ -43,12 +46,24 @@
             this.Z = z;
         }

+        /// <summary>
+        /// Initializes a new instance of the <see cref="Point3D"/> struct.
+        /// Creates a point from a list of coordinates (x, y, z)
+        /// </summary>
+        /// <param name="data">a list of coordinates in the order x, y, z</param>
+        /// <exception cref="ArgumentException">Exception thrown if anything other than 3 coordinates are passed</exception>
         [Obsolete("This constructor will be removed. Made obsolete 2017-12-05.")]
         public Point3D(IEnumerable<double> data)
             : this(data.ToArray())
         {
         }

+        /// <summary>
+        /// Initializes a new instance of the <see cref="Point3D"/> struct.
+        /// Creates a point from a list of coordinates (x, y, z)
+        /// </summary>
+        /// <param name="data">a size 3 array of coordinates in the order x, y, z</param>
+        /// <exception cref="ArgumentException">Exception thrown if anything other than 3 coordinates are passed</exception>
         [Obsolete("This constructor will be removed. Made obsolete 2017-12-05.")]
         public Point3D(double[] data)
             : this(data[0], data[1], data[2])
@@ -59,52 +74,112 @@
             }
         }

+        /// <summary>
+        /// Gets a point at the origin
+        /// </summary>
         public static Point3D Origin { get; } = new Point3D(0, 0, 0);

+        /// <summary>
+        /// Gets a point where all values are NAN
+        /// </summary>
         public static Point3D NaN { get; } = new Point3D(double.NaN, double.NaN, double.NaN);

+        /// <summary>
+        /// Multiplies a matrix and a vector representation of the point together
+        /// </summary>
+        /// <param name="left">A matrix</param>
+        /// <param name="right">A point</param>
+        /// <returns>A Mathnet.Numerics vector</returns>
         [Obsolete("Not sure this is nice")]
         public static Vector<double> operator *(Matrix<double> left, Point3D right)
         {
             return left * right.ToVector();
         }

+        /// <summary>
+        /// Multiplies a matrix and a vector representation of the point together
+        /// </summary>
+        /// <param name="left">A point</param>
+        /// <param name="right">A matrix</param>
+        /// <returns>A Mathnet.Numerics vector</returns>
         [Obsolete("Not sure this is nice")]
         public static Vector<double> operator *(Point3D left, Matrix<double> right)
         {
             return left.ToVector() * right;
         }

-        public static Point3D operator +(Point3D p, Vector3D v)
-        {
-            return new Point3D(p.X + v.X, p.Y + v.Y, p.Z + v.Z);
-        }
-
-        public static Point3D operator +(Point3D p, UnitVector3D v)
-        {
-            return new Point3D(p.X + v.X, p.Y + v.Y, p.Z + v.Z);
-        }
-
-        public static Point3D operator -(Point3D p, Vector3D v)
-        {
-            return new Point3D(p.X - v.X, p.Y - v.Y, p.Z - v.Z);
-        }
-
-        public static Point3D operator -(Point3D p, UnitVector3D v)
-        {
-            return new Point3D(p.X - v.X, p.Y - v.Y, p.Z - v.Z);
-        }
-
-        public static Vector3D operator -(Point3D lhs, Point3D rhs)
-        {
-            return new Vector3D(lhs.X - rhs.X, lhs.Y - rhs.Y, lhs.Z - rhs.Z);
-        }
-
+        /// <summary>
+        /// Adds a point and a vector together
+        /// </summary>
+        /// <param name="point">A point</param>
+        /// <param name="vector">A vector</param>
+        /// <returns>A new point at the summed location</returns>
+        public static Point3D operator +(Point3D point, Vector3D vector)
+        {
+            return new Point3D(point.X + vector.X, point.Y + vector.Y, point.Z + vector.Z);
+        }
+
+        /// <summary>
+        /// Adds a point and a vector together
+        /// </summary>
+        /// <param name="point">A point</param>
+        /// <param name="vector">A vector</param>
+        /// <returns>A new point at the summed location</returns>
+        public static Point3D operator +(Point3D point, UnitVector3D vector)
+        {
+            return new Point3D(point.X + vector.X, point.Y + vector.Y, point.Z + vector.Z);
+        }
+
+        /// <summary>
+        /// Subtracts a vector from a point
+        /// </summary>
+        /// <param name="point">A point</param>
+        /// <param name="vector">A vector</param>
+        /// <returns>A new point at the difference</returns>
+        public static Point3D operator -(Point3D point, Vector3D vector)
+        {
+            return new Point3D(point.X - vector.X, point.Y - vector.Y, point.Z - vector.Z);
+        }
+
+        /// <summary>
+        /// Subtracts a vector from a point
+        /// </summary>
+        /// <param name="point">A point</param>
+        /// <param name="vector">A vector</param>
+        /// <returns>A new point at the difference</returns>
+        public static Point3D operator -(Point3D point, UnitVector3D vector)
+        {
+            return new Point3D(point.X - vector.X, point.Y - vector.Y, point.Z - vector.Z);
+        }
+
+        /// <summary>
+        /// Subtracts the first point from the second point
+        /// </summary>
+        /// <param name="left">The first point</param>
+        /// <param name="right">The second point</param>
+        /// <returns>A vector pointing to the difference</returns>
+        public static Vector3D operator -(Point3D left, Point3D right)
+        {
+            return new Vector3D(left.X - right.X, left.Y - right.Y, left.Z - right.Z);
+        }
+
+        /// <summary>
+        /// Returns a value that indicates whether each pair of elements in two specified points is equal.
+        /// </summary>
+        /// <param name="left">The first point to compare</param>
+        /// <param name="right">The second point to compare</param>
+        /// <returns>True if the points are the same; otherwise false.</returns>
         public static bool operator ==(Point3D left, Point3D right)
         {
             return left.Equals(right);
         }

+        /// <summary>
+        /// Returns a value that indicates whether any pair of elements in two specified points is not equal.
+        /// </summary>
+        /// <param name="left">The first point to compare</param>
+        /// <param name="right">The second point to compare</param>
+        /// <returns>True if the points are different; otherwise false.</returns>
         public static bool operator !=(Point3D left, Point3D right)
         {
             return !left.Equals(right);
@@ -181,11 +256,21 @@
             return reader.ReadElementAs<Point3D>();
         }

+        /// <summary>
+        /// Returns the centroid of an arbitary collection of points
+        /// </summary>
+        /// <param name="points">a list of points</param>
+        /// <returns>The centroid of the points</returns>
         public static Point3D Centroid(IEnumerable<Point3D> points)
         {
             return Centroid(points.ToArray());
         }

+        /// <summary>
+        /// Returns the centroid of an arbitary collection of points
+        /// </summary>
+        /// <param name="points">a list of points</param>
+        /// <returns>The centroid of the points</returns>
         public static Point3D Centroid(params Point3D[] points)
         {
             return new Point3D(
@@ -194,40 +279,81 @@
                 points.Average(point => point.Z));
         }

+        /// <summary>
+        /// Returns the midpoint of two points
+        /// </summary>
+        /// <param name="p1">The first point</param>
+        /// <param name="p2">The second point</param>
+        /// <returns>The midpoint of the points</returns>
         public static Point3D MidPoint(Point3D p1, Point3D p2)
         {
             return Centroid(p1, p2);
         }

+        /// <summary>
+        /// Returns the point at which three planes intersect
+        /// </summary>
+        /// <param name="plane1">The first plane</param>
+        /// <param name="plane2">The second plane</param>
+        /// <param name="plane3">The third plane</param>
+        /// <returns>The point of intersection</returns>
         public static Point3D IntersectionOf(Plane plane1, Plane plane2, Plane plane3)
         {
             var ray = plane1.IntersectionWith(plane2);
             return plane3.IntersectionWith(ray);
         }

+        /// <summary>
+        /// Returns the point of intersection between a plane and a ray
+        /// </summary>
+        /// <param name="plane">A geometric plane</param>
+        /// <param name="ray">a ray</param>
+        /// <returns>The point of intersection</returns>
         public static Point3D IntersectionOf(Plane plane, Ray3D ray)
         {
             return plane.IntersectionWith(ray);
         }

+        /// <summary>
+        /// Returns the mirror point of this point across a plane
+        /// </summary>
+        /// <param name="plane">A plane</param>
+        /// <returns>The mirrored point</returns>
         [Pure]
         public Point3D MirrorAbout(Plane plane)
         {
             return plane.MirrorAbout(this);
         }

+        /// <summary>
+        /// Projects a point onto a plane
+        /// </summary>
+        /// <param name="plane">a plane</param>
+        /// <returns>The projected point</returns>
         [Pure]
         public Point3D ProjectOn(Plane plane)
         {
             return plane.Project(this);
         }

+        /// <summary>
+        /// Rotates the point about a given vector
+        /// </summary>
+        /// <param name="aboutVector">A vector</param>
+        /// <param name="angle">The angle to rotate</param>
+        /// <returns>The rotated point</returns>
         [Pure]
         public Point3D Rotate(Vector3D aboutVector, Angle angle)
         {
             return this.Rotate(aboutVector.Normalize(), angle);
         }

+        /// <summary>
+        /// Rotates the point about a given vector
+        /// </summary>
+        /// <param name="aboutVector">A vector</param>
+        /// <param name="angle">The angle to rotate</param>
+        /// <returns>The rotated point</returns>
         [Pure]
         public Point3D Rotate(UnitVector3D aboutVector, Angle angle)
         {
@@ -235,12 +361,22 @@
             return cs.Transform(this);
         }

+        /// <summary>
+        /// Gets a vector from this point to another point
+        /// </summary>
+        /// <param name="p">The point to which the vector should go</param>
+        /// <returns>A vector pointing to the other point.</returns>
         [Pure]
         public Vector3D VectorTo(Point3D p)
         {
             return p - this;
         }

+        /// <summary>
+        /// Finds the straight line distance to another point
+        /// </summary>
+        /// <param name="p">The other point</param>
+        /// <returns>a distance measure</returns>
         [Pure]
         public double DistanceTo(Point3D p)
         {
@@ -248,18 +384,32 @@
             return vector.Length;
         }

+        /// <summary>
+        /// Converts this point into a vector from the origin
+        /// </summary>
+        /// <returns>A vector equivalent to this point</returns>
         [Pure]
         public Vector3D ToVector3D()
         {
             return new Vector3D(this.X, this.Y, this.Z);
         }

+        /// <summary>
+        /// Applies a transform coordinatesystem to the point
+        /// </summary>
+        /// <param name="cs">A coordinate system</param>
+        /// <returns>A new 3D point</returns>
         [Pure]
         public Point3D TransformBy(CoordinateSystem cs)
         {
             return cs.Transform(this);
         }

+        /// <summary>
+        /// Applies a transform matrix to the point
+        /// </summary>
+        /// <param name="m">A transform matrix</param>
+        /// <returns>A new point</returns>
         [Pure]
         public Point3D TransformBy(Matrix<double> m)
         {
@@ -269,6 +419,7 @@
         /// <summary>
         /// Convert to a Math.NET Numerics dense vector of length 3.
         /// </summary>
+        /// <returns>A Math.Net Numerics vector</returns>
         [Pure]
         public Vector<double> ToVector()
         {
@@ -308,9 +459,16 @@
         {
             // ReSharper disable CompareOfFloatsByEqualityOperator
             return this.X == other.X && this.Y == other.Y && this.Z == other.Z;
+
             // ReSharper restore CompareOfFloatsByEqualityOperator
         }

+        /// <summary>
+        /// Returns a value to indicate if a pair of points are equal
+        /// </summary>
+        /// <param name="other">The point to compare against.</param>
+        /// <param name="tolerance">A tolerance (epsilon) to adjust for floating point error</param>
+        /// <returns>True if the points are equal; otherwise false</returns>
         [Pure]
         public bool Equals(Point3D other, double tolerance)
         {
@@ -349,11 +507,10 @@
             }
         }

-        XmlSchema IXmlSerializable.GetSchema()
-        {
-            return null;
-        }
-
+        /// <inheritdoc />
+        XmlSchema IXmlSerializable.GetSchema() => null;
+
+        /// <inheritdoc />
         void IXmlSerializable.ReadXml(XmlReader reader)
         {
             if (reader.TryReadAttributeAsDouble("X", out var x) &&
@@ -375,6 +532,7 @@
             throw new XmlException($"Could not read a {this.GetType()}");
         }

+        /// <inheritdoc />
         void IXmlSerializable.WriteXml(XmlWriter writer)
         {
             writer.WriteAttribute("X", this.X);


added v2

added v2

--- src/ToDoListAngular/index.cshtml
+++ src/ToDoListAngular/index.cshtml
@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
-    <title>Todo List: A sample application for Azure API Apps</title>
+    <title>Todo List: A sample application for Azure API Apps v2</title>
     <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
     <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css">
 </head>


style: change comment

style: change comment

--- src/Yaapii.Atoms/Func/BowFunc.cs
+++ src/Yaapii.Atoms/Func/BowFunc.cs
@@ -7,7 +7,7 @@
 namespace Yaapii.Atoms.Func
 {
     /// <summary>
-    /// An action which waits for a trigger to return true before executing.
+    /// An Function which waits for a trigger to return true before executing.
     /// </summary>
     public sealed class BowFunc<T> : IAction<T>
     {


camera

camera

--- CSharpGL/OpenGLObjects/Cameras/Camera.cs
+++ CSharpGL/OpenGLObjects/Cameras/Camera.cs
@@ -12,20 +12,20 @@
         IPerspectiveViewCamera, IOrthoViewCamera,
         IViewCamera, IPerspectiveCamera, IOrthoCamera
     {
-        /// <summary>
-        /// 默认目标为vec3(0, 0, 0)
-        /// </summary>
-        public static readonly vec3 defaultTarget = new vec3(0, 0, 0);
+        ///// <summary>
+        ///// 默认目标为vec3(0, 0, 0)
+        ///// </summary>
+        //public static readonly vec3 defaultTarget = new vec3(0, 0, -1);

-        /// <summary>
-        /// 默认位置为vec3(0, 0, 1)
-        /// </summary>
-        public static readonly vec3 defaultPosition = new vec3(0, 0, 1);
+        ///// <summary>
+        ///// 默认位置为vec3(0, 0, 1)
+        ///// </summary>
+        //public static readonly vec3 defaultPosition = new vec3(0, 0, 0);

-        /// <summary>
-        /// 默认上方为vec3(0, 1, 0)
-        /// </summary>
-        public static readonly vec3 defaultUpVector = new vec3(0, 1, 0);
+        ///// <summary>
+        ///// 默认上方为vec3(0, 1, 0)
+        ///// </summary>
+        //public static readonly vec3 defaultUpVector = new vec3(0, 1, 0);

         internal Camera() { }

@@ -35,8 +35,12 @@
         /// <param name="cameraType">类型</param>
         /// <param name="width">OpenGL窗口的宽度</param>
         /// <param name="height">OpenGL窗口的高度</param>
-        public Camera(CameraType cameraType, double width, double height)
+        public Camera(vec3 position, vec3 target, vec3 up, CameraType cameraType, double width, double height)
         {
+            this.Position = position;
+            this.Target = target;
+            this.UpVector = up;
+
             this.lastWidth = width;
             this.lastHeight = height;

@@ -54,10 +58,6 @@
             orthoCamera.Top = height / 2 / factor;
             orthoCamera.Near = -1000;
             orthoCamera.Far = 1000;
-
-            this.Target = defaultTarget;
-            this.Position = defaultPosition;
-            this.UpVector = defaultUpVector;

             this.CameraType = cameraType;
         }
@@ -109,51 +109,28 @@
         double lastHeight;

         /// <summary>
-        /// Gets or sets the target.
+        /// Gets or sets world coordinate of the camera's target.
         /// </summary>
-        /// <value>
-        /// The target.
-        /// </value>
-        [Description("The target of the camera (the point it's looking at)"), Category("Camera")]
+        [Description("world coordinate of the camera's target(the point it's looking at)."), Category("Camera")]
         public vec3 Target { get; set; }

         /// <summary>
-        /// Gets or sets up vector.
+        /// Gets or sets world coordinate of the camera's up vector.
         /// </summary>
         /// <value>
         /// Up vector.
         /// </value>
-        [Description("The up direction, relative to camera. (Controls tilt)."), Category("Camera")]
+        [Description("world coordinate of the camera's up vector."), Category("Camera")]
         public vec3 UpVector { get; set; }

         /// <summary>
-        /// The camera position.
-        /// </summary>
-        private vec3 position = new vec3(0, 0, 0);
-
-        /// <summary>
-        /// Every time a camera is used to project, the projection matrix calculated
-        /// and stored here.
-        /// </summary>
-        private mat4 projectionMatrix = mat4.identity();
-
-        ///// <summary>
-        ///// The screen aspect ratio.
-        ///// </summary>
-        //private double aspectRatio = 1.0f;
-
-        /// <summary>
-        /// Gets or sets the position.
+        /// Gets or sets world coordinate of the camera 's position.
         /// </summary>
         /// <value>
         /// The position.
         /// </value>
-        [Description("The position of the camera"), Category("Camera")]
-        public vec3 Position
-        {
-            get { return position; }
-            set { position = value; }
-        }
+        [Description("world coordinate of the camera 's position."), Category("Camera")]
+        public vec3 Position { get; set; }

         /// <summary>
         /// camera's perspective type.


Added comment after regex investigation

Added comment after regex investigation

--- ChatImprovements.mod/ChatImprovements.cs
+++ ChatImprovements.mod/ChatImprovements.cs
@@ -225,8 +225,11 @@
                             chatLineInfo = new ChatLineInfo();
                             Match userMatch = userRegex.Match(current.text);
                             if (userMatch.Success) {
-                                // strip HTML from user name (usually a color). Yes. I know. Regexes should not be used on
-                                // XML, but here it should not pose a problem
+                                // strip XML from user name (usually a color)
+                                // this won't strip usernames containing invalid XML correctly
+                                // usernames cannot contain < or > (messages can, but I think that's a server bug)
+                                // noHero provided this regex which parses full messages correctly, but it's (probably)
+                                // slower: @"(?></?\w+)(?>(?:[^>'""]+|'[^']*'|""[^""]*"")*)>
                                 String strippedMatch = Regex.Replace(userMatch.Value, @"<[^>]*>", String.Empty);
                                 chatLineInfo.userName = strippedMatch;
                             }


Performance #CHANGED: Turns out that not compressing the pixmap data internally causes excessive memory use when there are many large textures as the resource class also needs to allocate an amount of memory equal to the size of the pixmap, which when uncompressed, is far larger than it is when compressed. Moved to LZ4 compression to offset the loss in performance from multiple decompression steps. #FIX: SetPixelDataDxtCompressed now takes memory pooling into account.

--- Duality/Resources/Pixmap.cs
+++ Duality/Resources/Pixmap.cs
@@ -15,6 +15,7 @@
 using Duality.Cloning;
 using Duality.Properties;
 using Duality.Utility.Memory;
+using LZ4;
 using ManagedSquish;
 using OpenTK;

@@ -438,7 +439,18 @@

 			public void SetPixelDataDxtCompressed(byte[] pixelData)
 			{
-				this.compressedData = pixelData;
+				if(this.compressedDataDisposable != null)
+					this.compressedDataDisposable.Dispose();
+
+				if (pixelData == null)
+				{
+					this.compressedData = null;
+					return;
+				}
+
+				this.compressedDataDisposable = AllocateArray<byte>(pixelData.Length);
+				Array.Copy(pixelData, this.compressedDataDisposable.Value, pixelData.Length);
+				this.compressedData = this.compressedDataDisposable.Value;
 			}

 			/// <summary>
@@ -1106,11 +1118,11 @@
 				{
 					writer.WriteValue("version", ResFormat_Version_DxtCompressed);

-					byte[] bytesToSave = new byte[this.compressedDataDisposable.RequestedSize];
-					Array.Copy(this.compressedData, bytesToSave, this.compressedDataDisposable.RequestedSize);
-					writer.WriteValue("pixelData", bytesToSave);
+					var compressed = LZ4Codec.Wrap(this.CompressedData, 0, this.compressedDataDisposable.RequestedSize);
+					writer.WriteValue("pixelData", compressed);
 					writer.WriteValue("width", width);
 					writer.WriteValue("height", height);
+					writer.WriteValue("length", this.compressedDataDisposable.RequestedSize);
 				}
 				else
 				{
@@ -1143,16 +1155,17 @@
 				else if(version == ResFormat_Version_DxtCompressed)
 				{
 					byte[] dataBlock;
-					int width, height;
+					int width, height, length;
 					reader.ReadValue("pixelData", out dataBlock);
 					reader.ReadValue("width", out width);
 					reader.ReadValue("height", out height);
+					reader.ReadValue("length", out length);
 					this.width = width;
 					this.height = height;

-					var dxtData = AllocateArray<byte>(dataBlock.Length);
-					Array.Copy(dataBlock, dxtData.Value, dataBlock.Length);
-
+					var dxtData = AllocateArray<byte>(length);
+					LZ4Codec.Decode(dataBlock, 0, dataBlock.Length, dxtData.Value, 0);
+
 					if (DualityApp.ExecContext == DualityApp.ExecutionContext.Editor)
 					{
 						Squish.DecompressImage(dxtData.Value, width, height, SquishFlags.Dxt5).AsColourArray(arr =>


GridName serialize and deserialize

GridName serialize and deserialize


Always search in song comments.

Always search in song comments.


fix default assembly info company name

fix default assembly info company name

--- src/CommonAssemblyInfo.cs
+++ src/CommonAssemblyInfo.cs
@@ -2,6 +2,6 @@
 using System.Reflection;
 using System.Runtime.InteropServices;
 [assembly: AssemblyCompany("Building-Blocks")]
-[assembly: AssemblyCopyright("Copyright 2012 Innokentiy Filipenko. All rights reserved.")]
-[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyCopyright("Copyright 2011 Innokentiy Filipenko. All rights reserved.")]
+[assembly: AssemblyVersion("0.1.0.0")]


increment to version 0.12.0

increment to version 0.12.0

--- src/CommonAssemblyInfo.cs
+++ src/CommonAssemblyInfo.cs
@@ -17,9 +17,9 @@
 [assembly: AssemblyCulture("")]
 [assembly: AssemblyProduct("LiteGuard")]

-[assembly: AssemblyVersion("0.11.0.0")]
-[assembly: AssemblyFileVersion("0.11.0.0")]
-[assembly: AssemblyInformationalVersion("0.11.0")]
+[assembly: AssemblyVersion("0.12.0.0")]
+[assembly: AssemblyFileVersion("0.12.0.0")]
+[assembly: AssemblyInformationalVersion("0.12.0")]

 [assembly: CLSCompliant(true)]


Dumb change for Pat

Dumb change for Pat


Add static Nonce.Equals method

Add static Nonce.Equals method

--- src/Cryptography/Nonce.cs
+++ src/Cryptography/Nonce.cs
@@ -86,6 +86,21 @@
         public int FixedFieldSize => _size >> 4;

         public int Size => (_size >> 4) + (_size & 0xF);
+
+        public static bool Equals(
+            in Nonce left,
+            in Nonce right)
+        {
+            Debug.Assert(Unsafe.SizeOf<Nonce>() == 16);
+
+            ref byte first = ref Unsafe.AsRef(in left._bytes);
+            ref byte second = ref Unsafe.AsRef(in right._bytes);
+
+            return Unsafe.ReadUnaligned<uint>(ref Unsafe.Add(ref first, 0x0)) == Unsafe.ReadUnaligned<uint>(ref Unsafe.Add(ref second, 0x0))
+                && Unsafe.ReadUnaligned<uint>(ref Unsafe.Add(ref first, 0x4)) == Unsafe.ReadUnaligned<uint>(ref Unsafe.Add(ref second, 0x4))
+                && Unsafe.ReadUnaligned<uint>(ref Unsafe.Add(ref first, 0x8)) == Unsafe.ReadUnaligned<uint>(ref Unsafe.Add(ref second, 0x8))
+                && Unsafe.ReadUnaligned<uint>(ref Unsafe.Add(ref first, 0xC)) == Unsafe.ReadUnaligned<uint>(ref Unsafe.Add(ref second, 0xC));
+        }

         public static bool TryAdd(
             ref Nonce nonce,
@@ -132,7 +147,7 @@
             Nonce left,
             Nonce right)
         {
-            return !left.Equals(right);
+            return !Equals(in left, in right);
         }

         public static Nonce operator ^(
@@ -212,7 +227,7 @@
             Nonce left,
             Nonce right)
         {
-            return left.Equals(right);
+            return Equals(in left, in right);
         }

         public static bool operator >(
@@ -271,21 +286,13 @@
         public bool Equals(
             Nonce other)
         {
-            Debug.Assert(Unsafe.SizeOf<Nonce>() == 16);
-
-            ref byte first = ref Unsafe.AsRef(in _bytes);
-            ref byte second = ref Unsafe.AsRef(in other._bytes);
-
-            return Unsafe.ReadUnaligned<uint>(ref Unsafe.Add(ref first, 0x0)) == Unsafe.ReadUnaligned<uint>(ref Unsafe.Add(ref second, 0x0))
-                && Unsafe.ReadUnaligned<uint>(ref Unsafe.Add(ref first, 0x4)) == Unsafe.ReadUnaligned<uint>(ref Unsafe.Add(ref second, 0x4))
-                && Unsafe.ReadUnaligned<uint>(ref Unsafe.Add(ref first, 0x8)) == Unsafe.ReadUnaligned<uint>(ref Unsafe.Add(ref second, 0x8))
-                && Unsafe.ReadUnaligned<uint>(ref Unsafe.Add(ref first, 0xC)) == Unsafe.ReadUnaligned<uint>(ref Unsafe.Add(ref second, 0xC));
+            return Equals(in this, in other);
         }

         public override bool Equals(
             object obj)
         {
-            return (obj is Nonce other) && Equals(other);
+            return (obj is Nonce other) && Equals(in this, in other);
         }

         public override int GetHashCode()


Some changes to code highlighting

Some changes to code highlighting

--- src/Hades.Core/Program.cs
+++ src/Hades.Core/Program.cs
@@ -29,9 +29,12 @@
                     Console.ForegroundColor = ConsoleColor.Green;
                 }

-                if (token.Kind == Classifier.Identifier && (tokens[i+1].Kind == Classifier.LeftParenthesis || tokens[i+1].Kind == Classifier.Colon))
+                if (i + 1 < tokens.Count)
                 {
-                    Console.ForegroundColor = ConsoleColor.Red;
+                    if (token.Kind == Classifier.Identifier && (tokens[i+1].Kind == Classifier.LeftParenthesis || tokens[i+1].Kind == Classifier.Colon))
+                    {
+                        Console.ForegroundColor = ConsoleColor.Red;
+                    }
                 }

                 if (token.Kind == Classifier.Identifier && token.Value == "super")
@@ -46,13 +49,13 @@

                 if (token.Kind == Classifier.StringLiteral)
                 {
-                    Console.ForegroundColor = ConsoleColor.Green;
+                    Console.ForegroundColor = ConsoleColor.Red;
                     token.Value = $"\"{token.Value}\"";
                 }

                 if (token.Kind == Classifier.IntLiteral || token.Kind == Classifier.DecLiteral)
                 {
-                    Console.ForegroundColor = ConsoleColor.DarkRed;
+                    Console.ForegroundColor = ConsoleColor.Green;
                 }

                 if (token.Kind == Classifier.BoolLiteral)
@@ -78,6 +81,11 @@
                 if (token.Category == Category.Comment)
                 {
                     Console.ForegroundColor = ConsoleColor.DarkGray;
+                }
+
+                if (token.Value == "std")
+                {
+                    Console.ForegroundColor = ConsoleColor.White;
                 }

                 Console.Write(token.Value);


reorder right-click menu

reorder right-click menu

--- ComPortNotify/MyApplicationContext.cs
+++ ComPortNotify/MyApplicationContext.cs
@@ -52,11 +52,11 @@
             // TrayIconContextMenu
             //
             this.TrayIconContextMenu.Items.AddRange(
-                    new System.Windows.Forms.ToolStripItem[] { this.CloseMenuItem });
+                new System.Windows.Forms.ToolStripItem[] { this.CheckForUpdates });
             this.TrayIconContextMenu.Items.AddRange(
-                    new System.Windows.Forms.ToolStripItem[] { this.StartOnBoot });
+                new System.Windows.Forms.ToolStripItem[] { this.StartOnBoot });
             this.TrayIconContextMenu.Items.AddRange(
-                    new System.Windows.Forms.ToolStripItem[] { this.CheckForUpdates });
+                new System.Windows.Forms.ToolStripItem[] { this.CloseMenuItem });
             this.TrayIconContextMenu.Name = "TrayIconContextMenu";
             this.TrayIconContextMenu.Size = new System.Drawing.Size(153, 70);
             //


added consolidation major to major code

added consolidation major to major code

git-tfs-id: [https://tfs.caes.ucdavis.edu:8088/tfs]$/Commencement/Trunk/Commencement;C8651

--- Commencement.Core/Domain/MajorCode.cs
+++ Commencement.Core/Domain/MajorCode.cs
@@ -9,6 +9,21 @@
         public virtual string DisciplineCode { get; set; }

         public virtual College College { get; set; }
+        public virtual MajorCode ConsolidationMajor { get; set; }
+
+        /// <summary>
+        /// returns the real major for those with consolidation codes
+        /// </summary>
+        public virtual string MajorName {
+            get { return ConsolidationMajor != null ? ConsolidationMajor.Name : Name; }
+        }
+
+        /// <summary>
+        /// returns the real college for those with consolidation codes
+        /// </summary>
+        public virtual College MajorCollege {
+            get { return ConsolidationMajor != null ? ConsolidationMajor.College : College; }
+        }
     }

     public class MajorCodeMap : ClassMap<MajorCode>
@@ -21,6 +36,7 @@

             Map(x => x.Name);
             Map(x => x.DisciplineCode);
+            References(x => x.ConsolidationMajor).Column("ConsolidationCode").Cascade.None().Fetch.Join();

             References(x => x.College).Column("CollegeCode");
         }