Remove settings hiding

Remove settings hiding

--- Assets/Adjust/Editor/AdjustSettingsEditor.cs
+++ Assets/Adjust/Editor/AdjustSettingsEditor.cs
@@ -8,49 +8,38 @@
     public class AdjustSettingsEditor : Editor
     {
         SerializedProperty isPostProcessingEnabled;
-#if UNITY_IOS
         SerializedProperty isiOS14ProcessingEnabled;
         SerializedProperty iOSUserTrackingUsageDescription;
         SerializedProperty iOSUrlSchemes;
         SerializedProperty iOSUniversalLinksDomains;
-#elif UNITY_ANDROID
         SerializedProperty androidUriSchemes;
-#endif

         void OnEnable()
         {
             isPostProcessingEnabled = serializedObject.FindProperty("isPostProcessingEnabled");
-#if UNITY_IOS
             isiOS14ProcessingEnabled = serializedObject.FindProperty("isiOS14ProcessingEnabled");
             iOSUserTrackingUsageDescription = serializedObject.FindProperty("_iOSUserTrackingUsageDescription");
             iOSUrlSchemes = serializedObject.FindProperty("_iOSUrlSchemes");
             iOSUniversalLinksDomains = serializedObject.FindProperty("_iOSUniversalLinksDomains");
-#elif UNITY_ANDROID
             androidUriSchemes = serializedObject.FindProperty("androidUriSchemes");
-#endif
         }
         public override void OnInspectorGUI()
         {
             EditorGUILayout.PropertyField(isPostProcessingEnabled);
             if (isPostProcessingEnabled.boolValue)
             {
-#if UNITY_IOS
                 EditorGUILayout.PropertyField(isiOS14ProcessingEnabled, new GUIContent("Is iOS 14 Processing Enabled"));
-                EditorGUILayout.PropertyField(iOSUserTrackingUsageDescription, new GUIContent("User Tracking Usage Description"));
-#endif
+                EditorGUILayout.PropertyField(iOSUserTrackingUsageDescription, new GUIContent("iOS User Tracking Usage Description"));
                 EditorGUILayout.Space();
                 EditorGUILayout.LabelField("DEEP LINKING:", EditorStyles.boldLabel);
-#if UNITY_IOS
-                EditorGUILayout.PropertyField(iOSUrlSchemes, new GUIContent("URL Schemes"), true);
-                EditorGUILayout.PropertyField(iOSUniversalLinksDomains, new GUIContent("Universal Links Domains"), true);
-#elif UNITY_ANDROID
-                EditorGUILayout.PropertyField(androidUriSchemes, new GUIContent("URI Schemes"), true);
+                EditorGUILayout.PropertyField(iOSUrlSchemes, new GUIContent("iOS URL Schemes"), true);
+                EditorGUILayout.PropertyField(iOSUniversalLinksDomains, new GUIContent("iOS Universal Links Domains"), true);
+                EditorGUILayout.PropertyField(androidUriSchemes, new GUIContent("Android URI Schemes"), true);
                 EditorGUILayout.HelpBox(
                     "Please note that Adjust SDK doesn't remove existing URI Schemes, " +
                     "so if you need to clean previously added entries, " +
                     "you need to do it manually from \"Assets/Plugins/Android/AndroidManifest.xml\"", MessageType.Info, true);
-#endif
             }

             serializedObject.ApplyModifiedProperties();


refactor(client)

refactor(client)

fix using

--- src/skadisteam.login/SkadiLogin.cs
+++ src/skadisteam.login/SkadiLogin.cs
@@ -6,9 +6,9 @@
 using skadisteam.login.Models;
 using skadisteam.login.Models.Json;
 using skadisteam.login.Factories;
+using skadisteam.login.Http;
 using skadisteam.login.Validators;
 using skadisteam.shared.Models;
-using HttpMethod = skadisteam.login.Http.HttpMethod;

 namespace skadisteam.login
 {


Fix nunit starting up window in headless mode

--- osu.Framework/Platform/GameHost.cs
+++ osu.Framework/Platform/GameHost.cs
@@ -702,7 +702,6 @@
             Dependencies.Cache(Config = new FrameworkConfigManager(Storage, hostDefaults));

             windowMode = Config.GetBindable<WindowMode>(FrameworkSetting.WindowMode);
-
             windowMode.BindValueChanged(mode =>
             {
                 if (Window == null)
@@ -715,6 +714,9 @@
             frameSyncMode = Config.GetBindable<FrameSync>(FrameworkSetting.FrameSync);
             frameSyncMode.ValueChanged += e =>
             {
+                if (Window == null)
+                    return;
+
                 float refreshRate = DisplayDevice.Default?.RefreshRate ?? 0;
                 // For invalid refresh rates let's assume 60 Hz as it is most common.
                 if (refreshRate <= 0)


Update ManageController.cs

Update ManageController.cs

--- BTCPayServer/Controllers/ManageController.cs
+++ BTCPayServer/Controllers/ManageController.cs
@@ -110,7 +110,7 @@
             {
                 var setEmailResult = await _userManager.SetEmailAsync(user, model.Email);
                 if (!setEmailResult.Succeeded)
-                {
+                {
                     throw new ApplicationException($"Unexpected error occurred setting email for user with ID '{user.Id}'.");
                 }
                 await _userManager.SetUserNameAsync(user, model.Username);


Fixed only the links being italics for /me messages

--- osu.Game/Overlays/Chat/ChatLine.cs
+++ osu.Game/Overlays/Chat/ChatLine.cs
@@ -189,7 +189,12 @@
                     Padding = new MarginPadding { Left = message_padding + padding },
                     Children = new Drawable[]
                     {
-                        contentFlow = new OsuLinkTextFlowContainer<ChatLink>(t => { t.TextSize = text_size; })
+                        contentFlow = new OsuLinkTextFlowContainer<ChatLink>(t =>
+                        {
+                            if (Message.IsAction)
+                                t.Font = "Exo2.0-MediumItalic";
+                            t.TextSize = text_size;
+                        })
                         {
                             AutoSizeAxes = Axes.Y,
                             RelativeSizeAxes = Axes.X,
@@ -218,13 +223,7 @@
             contentFlow.Clear();

             if (message.Links == null || message.Links.Count == 0)
-            {
-                contentFlow.AddText(message.Content, sprite =>
-                {
-                    if (message.IsAction)
-                        sprite.Font = @"Exo2.0-MediumItalic";
-                });
-            }
+                contentFlow.AddText(message.Content);
             else
             {
                 int prevIndex = 0;
@@ -247,9 +246,6 @@
                     contentFlow.AddLink(message.Content.Substring(link.Index, link.Length), link.Url, sprite =>
                     {
                         ((OsuLinkSpriteText)sprite).TextColour = urlColour;
-
-                        if (message.IsAction)
-                            sprite.Font = @"Exo2.0-MediumItalic";
                     });
                 }


Remove unnecessary timestamp update

Remove unnecessary timestamp update

Co-authored-by: Dean Herbert <1db828bcd41de75377dce59825af73ae7fca5651@ppy.sh>

--- osu.Game/Overlays/Chat/ChatLine.cs
+++ osu.Game/Overlays/Chat/ChatLine.cs
@@ -145,7 +145,7 @@
             updateMessageContent();
             FinishTransforms(true);

-            prefer24HourTime.BindValueChanged(_ => updateTimestamp(), true);
+            prefer24HourTime.BindValueChanged(_ => updateTimestamp());
         }

         /// <summary>


Don't use CancelDelayedTasks to avoid cancelling unwanted tasks

--- osu.Game/Overlays/SocialOverlay.cs
+++ osu.Game/Overlays/SocialOverlay.cs
@@ -17,6 +17,7 @@
 using osu.Game.Users;
 using System;
 using System.Threading;
+using osu.Framework.Threading;

 namespace osu.Game.Overlays
 {
@@ -77,12 +78,12 @@
             currentQuery.BindTo(Filter.Search.Current);
             currentQuery.ValueChanged += query =>
             {
-                Scheduler.CancelDelayedTasks();
+                queryChangedDebounce?.Cancel();

                 if (string.IsNullOrEmpty(query.NewValue))
                     queueUpdate();
                 else
-                    Scheduler.AddDelayed(updateSearch, 500);
+                    queryChangedDebounce = Scheduler.AddDelayed(updateSearch, 500);
             };
         }

@@ -90,13 +91,15 @@

         private readonly Bindable<string> currentQuery = new Bindable<string>();

+        private ScheduledDelegate queryChangedDebounce;
+
         private void queueUpdate() => Scheduler.AddOnce(updateSearch);

         private CancellationTokenSource loadCancellation;

         private void updateSearch()
         {
-            Scheduler.CancelDelayedTasks();
+            queryChangedDebounce?.Cancel();

             if (!IsLoaded)
                 return;
@@ -169,6 +172,9 @@

             LoadComponentAsync(newPanels, f =>
             {
+                if (panels != null)
+                    ScrollFlow.Remove(panels);
+
                 loading.Hide();
                 ScrollFlow.Add(panels = newPanels);
             }, loadCancellation.Token);


Limit combo count to minimum 1 when using inversed

Avoids making the mod of no effect.

--- osu.Game/Rulesets/Mods/ModMuted.cs
+++ osu.Game/Rulesets/Mods/ModMuted.cs
@@ -66,6 +66,11 @@
             Value = true
         };

+        protected ModMuted()
+        {
+            InverseMuting.BindValueChanged(i => MuteComboCount.MinValue = i.NewValue ? 1 : 0, true);
+        }
+
         public void ApplyToTrack(ITrack track)
         {
             track.AddAdjustment(AdjustableProperty.Volume, mainVolumeAdjust);


Add stub for APFT list

Add stub for APFT list

--- Battery-Commander.Web/Views/APFT/List.cshtml
+++ Battery-Commander.Web/Views/APFT/List.cshtml
@@ -6,7 +6,6 @@

-

@@ -14,7 +13,13 @@
         @foreach (var model in Model)
         {

-
+                @Html.DisplayFor(_ => model.Soldier)
+                @Html.DisplayFor(_ => model.Date)
+                @Html.DisplayFor(_ => model.PushUps)
+                @Html.DisplayFor(_ => model.SitUps)
+                @Html.DisplayFor(_ => model.Run)
+                @Html.DisplayFor(_ => model.TotalScore)
+                @Html.DisplayFor(_ => model.IsPassing)

         }


Tweak suta label oin list

Tweak suta label oin list

--- Battery-Commander.Web/Views/SUTA/List.cshtml
+++ Battery-Commander.Web/Views/SUTA/List.cshtml
@@ -15,6 +15,7 @@

+
                     Details
                     @Html.DisplayNameFor(_ => _.FirstOrDefault().Status)
                     @Html.DisplayNameFor(_ => _.FirstOrDefault().StartDate)
@@ -34,7 +35,7 @@
                 {

                     @Html.ActionLink("Details", "Details", new { request.Id })
-                    @Html.DisplayFor(_ => request.Status)
+
@Html.DisplayFor(_ => request.Status)

                     @Html.DisplayFor(_ => request.StartDate)
                     @Html.DisplayFor(_ => request.EndDate)
                     @Html.ActionLink(request.Soldier.RankHumanized, "Details", new { request.Id })


修复航空战类型显示

修复航空战类型显示

--- BattleInfoPlugin/Models/CellTypeConverter.cs
+++ BattleInfoPlugin/Models/CellTypeConverter.cs
@@ -37,6 +37,10 @@
                     type |= CellType.夜戦;
                 }
             }
+            else if (data.api_event_kind == 4)
+            {
+                type = CellType.航空戦;
+            }
             else if (data.api_event_id == 7 && data.api_event_kind == 0)
             {
                 type = CellType.航空偵察;


Documentation for properties of Keylogger Keys

Added documentation for the two properties of the Keylogger.

--- Client/Core/Keylogger/KeyloggerAttributes.cs
+++ Client/Core/Keylogger/KeyloggerAttributes.cs
@@ -7,7 +7,15 @@
     [AttributeUsage(AttributeTargets.Enum, AllowMultiple = false)]
     public class KeyloggerKey : Attribute
     {
+        /// <summary>
+        /// The appearance of the logged key.
+        /// </summary>
         public string KeyName { get; private set; }
+        /// <summary>
+        /// Tells the Logger that this key is handled in a special way.
+        /// </summary>
+        // Please note that "Special Keys" will be colored in a different
+        // way by the Logger.
         public bool IsSpecialKey { get; private set; }

         /// <summary>


SemaphoreSlim fixes

SemaphoreSlim fixes

- FIxed DebuggerDisplayAttribute
- AvailableWaitHandle checks for disposal, making it closer to the
specification

--- Core/System/Threading/SemaphoreSlim.net35.cs
+++ Core/System/Threading/SemaphoreSlim.net35.cs
@@ -4,7 +4,7 @@

 namespace System.Threading
 {
-    [System.Diagnostics.DebuggerDisplayAttribute("Current Count = {currCount}")]
+    [System.Diagnostics.DebuggerDisplayAttribute("Current Count = {CurrentCount}")]
     public class SemaphoreSlim : IDisposable
     {
         private int _count;
@@ -36,6 +36,7 @@
         {
             get
             {
+                CheckDisposed();
                 return _event.WaitHandle;
             }
         }


Fixes missing brace

Fixes missing brace

--- code/Inbox.cs
+++ code/Inbox.cs
@@ -257,7 +257,7 @@

 				// logs the error
 				Core.Log("Sync: " + exception.GetType().ToString() + " " + exception.Message);
-			finally {
+			} finally {
 				UI.notifyIcon.Text = UI.notifyIcon.Text.Split('\n')[0] + "\n" + Translation.syncTime.Replace("{time}", Time.ToLongTimeString());
 			}
 		}


Improved error when variables aren't found

--- inklecate2Sharp/Parser/ParsedObjects/VariableReference.cs
+++ inklecate2Sharp/Parser/ParsedObjects/VariableReference.cs
@@ -21,11 +21,16 @@
         {
             bool resolved = false;

+            List<string> searchedLocations = new List<string> ();
+
             var ancestor = this.parent;
             while (ancestor != null) {

                 if (ancestor is FlowBase) {
                     var ancestorFlow = (FlowBase)ancestor;
+                    if (ancestorFlow.name != null) {
+                        searchedLocations.Add ("'"+ancestorFlow.name+"'");
+                    }
                     if( ancestorFlow.HasVariableWithName(this.name) ) {
                         resolved = true;
                         break;
@@ -36,7 +41,13 @@
             }

             if ( !resolved ) {
-                context.Error ("variable not found: " + this.name, this);
+                var locationsStr = "";
+                if (searchedLocations.Count > 0) {
+                    var locationsListStr = string.Join (", ", searchedLocations);
+                    locationsStr = " in " + locationsListStr + " or globally";
+                }
+                string.Join (", ", searchedLocations);
+                context.Error ("variable '" + this.name + "' not found"+locationsStr, this);
             }
         }
     }


Just added a remark indicating that using the GridRegionData member variable may cause a blocking action while that data is retrieved.

git-svn-id: c32cf1ecefca26b8770d7b0740bc0c5c174087e4@658 c754d5e9-d413-0410-bcdf-9574c9dba6b7

--- libsecondlife-cs/Region.cs
+++ libsecondlife-cs/Region.cs
@@ -111,6 +111,7 @@
         public EstateTools Estate;

         /// <summary></summary>
+        /// <remarks>This may cause your code to block while the GridRegion data is fetched for the 1st time.</remarks>
         private GridRegion _GridRegionData = null;
         public GridRegion GridRegionData
         {


How did that become a A/S o.O

How did that become a A/S o.O

--- DotJEM.Json.Index/Properties/AssemblyInfo.cs
+++ DotJEM.Json.Index/Properties/AssemblyInfo.cs
@@ -9,7 +9,7 @@
 [assembly: AssemblyConfiguration("")]
 [assembly: AssemblyProduct("DotJEM.Json.Index")]
 [assembly: AssemblyCompany("N/A")]
-[assembly: AssemblyCopyright("Copyright © DotJEM A/S 2014-2015")]
+[assembly: AssemblyCopyright("Copyright © DotJEM 2014-2016")]
 [assembly: AssemblyTrademark("N/A")]
 [assembly: AssemblyCulture("")]


Propagate build arguments

Propagate build arguments

--- Ductus.FluentDocker/Builders/ImageBuilder.cs
+++ Ductus.FluentDocker/Builders/ImageBuilder.cs
@@ -43,6 +43,7 @@

       var id = host.Value.Build(_config.ImageName, _config.Params.Tags[0], workingdir, new ContainerBuildParams
       {
+        BuildArguments = _config.Params.BuildArguments,
         Tags = _config.Params.Tags.Except(new[] { _config.Params.Tags[0] }).ToArray(),
         Quiet = true
       });


Fix for instead of triggers on views

Fix for instead of triggers on views

--- model/Database.cs
+++ model/Database.cs
@@ -286,15 +286,17 @@
 						m.definition,
 						m.uses_ansi_nulls,
 						m.uses_quoted_identifier,
-						s2.name as tableSchema,
-						t.name as tableName,
+						isnull(s2.name, s3.name) as tableSchema,
+						isnull(t.name, v.name) as tableName,
 						tr.is_disabled as trigger_disabled
 					from sys.sql_modules m
 						inner join sys.objects o on m.object_id = o.object_id
 						inner join sys.schemas s on s.schema_id = o.schema_id
 						left join sys.triggers tr on m.object_id = tr.object_id
 						left join sys.tables t on tr.parent_id = t.object_id
+						left join sys.views v on tr.parent_id = v.object_id
 						left join sys.schemas s2 on s2.schema_id = t.schema_id
+						left join sys.schemas s3 on s3.schema_id = v.schema_id
 					where objectproperty(o.object_id, 'IsMSShipped') = 0
 					";
 			using (var dr = cm.ExecuteReader()) {


Update SpeechService to use StandardVoice

--- EliteDangerousSpeechService/SpeechService.cs
+++ EliteDangerousSpeechService/SpeechService.cs
@@ -21,14 +21,11 @@

         private string locale = "en-GB";

-        private string standardVoice;
-
         private HashSet<ISoundOut> activeSpeeches = new HashSet<ISoundOut>();

         public SpeechService()
         {
             var locale = Thread.CurrentThread.CurrentCulture.Name;
-            var standardVoice = SpeechServiceConfiguration.FromFile().StandardVoice;
         }

         public void Say(Ship ship, string script)
@@ -72,9 +69,9 @@
                 using (SpeechSynthesizer synth = new SpeechSynthesizer())
                 using (MemoryStream stream = new MemoryStream())
                 {
-                    if (voice == null)
-                    {
-                        voice = standardVoice;
+                    if (String.IsNullOrWhiteSpace(voice))
+                    {
+                        voice = SpeechServiceConfiguration.FromFile().StandardVoice;
                     }
                     if (voice != null)
                     {


Benchmarking now uses `long` instead of `ulong`.

--- Evbpc.Framework/Utilities/BenchmarkResult.cs
+++ Evbpc.Framework/Utilities/BenchmarkResult.cs
@@ -11,7 +11,7 @@
         ///
         /// The total number of rounds ran.
         ///
-        public ulong RoundsRun { get; set; }
+        public long RoundsRun { get; set; }

         ///
         /// The average time for all the rounds.
@@ -36,7 +36,7 @@
         ///
         /// The number of rounds that passed testing. (Always equivalent to <see cref="RoundsRun"/> for <see cref="Benchmark(ulong, Action)"/>.)
         ///
-        public ulong RoundsPassed { get; set; }
+        public long RoundsPassed { get; set; }

         ///
         /// The total amount of time taken for all the benchmarks. (Does not include statistic calculation time, or result verification time.)
@@ -52,7 +52,7 @@
         /// <param name="rounds">The number of rounds to run.</param>
         /// <param name="method">The code to run.</param>
         /// <returns>A <see cref="BenchmarkResult"/> representing the result of the session.</returns>
-        public static BenchmarkResult Benchmark(ulong rounds, Action method)
+        public static BenchmarkResult Benchmark(long rounds, Action method)
         {
             var sw = new Stopwatch();

@@ -63,7 +63,7 @@
             long minTicks = 0;
             long totalTime = 0;

-            for (ulong i = 0; i < rounds; i++)
+            for (long i = 0; i < rounds; i++)
             {
                 sw.Start();
                 method.Invoke();
@@ -112,7 +112,7 @@
         /// <param name="method">The code to run.</param>
         /// <param name="expectedResult">The expected result of the function. This will be compared to the actual result and used for <see cref="BenchmarkResult.RoundsPassed"/>. This uses the default object.Equals(object) method.</param>
         /// <returns>A <see cref="BenchmarkResult"/> representing the result of the session.</returns>
-        public static BenchmarkResult Benchmark<T>(ulong rounds, Func<T> method, T expectedResult)
+        public static BenchmarkResult Benchmark<T>(long rounds, Func<T> method, T expectedResult)
         {
             var sw = new Stopwatch();

@@ -122,9 +122,9 @@
             long maxTicks = 0;
             long minTicks = 0;
             long totalTime = 0;
-            ulong roundsPassed = 0;
+            long roundsPassed = 0;

-            for (ulong i = 0; i < rounds; i++)
+            for (long i = 0; i < rounds; i++)
             {
                 sw.Start();
                 var result = method.Invoke();


Update CreatingListObject.cs

Update CreatingListObject.cs

--- Examples/CSharp/Tables/CreatingListObject.cs
+++ Examples/CSharp/Tables/CreatingListObject.cs
@@ -8,6 +8,7 @@
     {
         public static void Main(string[] args)
         {
+            //ExStart:1
             // The path to the documents directory.
             string dataDir = Aspose.Cells.Examples.Utils.GetDataDir(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);

@@ -30,7 +31,8 @@

             //Save the excel file.
             workbook.Save(dataDir + "ouput.out.xls");
+            //ExEnd:1

         }
     }
-}+}


Added date formats

Added date formats

--- ExpandoDB/Serialization/DynamicSerializer.cs
+++ ExpandoDB/Serialization/DynamicSerializer.cs
@@ -18,18 +18,49 @@
     /// </summary>
     public static class DynamicSerializer
     {
-        const string DATE_TIME_FORMAT_ROUNDTRIP_UTC = "yyyy-MM-ddTHH:mm:ss.fffffffZ";
-        const string DATE_TIME_FORMAT_ROUNDTRIP_TIMEZONE = "yyyy-MM-ddTHH:mm:ss.fffffffzzz";
+
+        #region Date Format constants
+
         const string DATE_TIME_FORMAT_DATE_ONLY = "yyyy-MM-dd";
+
         const string DATE_TIME_FORMAT_DATE_HHMM = "yyyy-MM-ddTHH:mm";
         const string DATE_TIME_FORMAT_DATE_HHMM_UTC = "yyyy-MM-ddTHH:mmZ";
         const string DATE_TIME_FORMAT_DATE_HHMM_TIMEZONE = "yyyy-MM-ddTHH:mmzzz";
+
         const string DATE_TIME_FORMAT_DATE_HHMMSS = "yyyy-MM-ddTHH:mm:ss";
         const string DATE_TIME_FORMAT_DATE_HHMMSS_UTC = "yyyy-MM-ddTHH:mm:ssZ";
         const string DATE_TIME_FORMAT_DATE_HHMMSS_TIMEZONE = "yyyy-MM-ddTHH:mm:sszzz";
+
+        const string DATE_TIME_FORMAT_DATE_HHMMSSF = "yyyy-MM-ddTHH:mm:ss.f";
+        const string DATE_TIME_FORMAT_DATE_HHMMSSF_UTC = "yyyy-MM-ddTHH:mm:ss.fZ";
+        const string DATE_TIME_FORMAT_DATE_HHMMSSF_TIMEZONE = "yyyy-MM-ddTHH:mm:ss.fzzz";
+
         const string DATE_TIME_FORMAT_DATE_HHMMSSFF = "yyyy-MM-ddTHH:mm:ss.ff";
         const string DATE_TIME_FORMAT_DATE_HHMMSSFF_UTC = "yyyy-MM-ddTHH:mm:ss.ffZ";
         const string DATE_TIME_FORMAT_DATE_HHMMSSFF_TIMEZONE = "yyyy-MM-ddTHH:mm:ss.ffzzz";
+
+        const string DATE_TIME_FORMAT_DATE_HHMMSSFFF = "yyyy-MM-ddTHH:mm:ss.fff";
+        const string DATE_TIME_FORMAT_DATE_HHMMSSFFF_UTC = "yyyy-MM-ddTHH:mm:ss.fffZ";
+        const string DATE_TIME_FORMAT_DATE_HHMMSSFFF_TIMEZONE = "yyyy-MM-ddTHH:mm:ss.fffzzz";
+
+        const string DATE_TIME_FORMAT_DATE_HHMMSSFFFF = "yyyy-MM-ddTHH:mm:ss.ffff";
+        const string DATE_TIME_FORMAT_DATE_HHMMSSFFFF_UTC = "yyyy-MM-ddTHH:mm:ss.ffffZ";
+        const string DATE_TIME_FORMAT_DATE_HHMMSSFFFF_TIMEZONE = "yyyy-MM-ddTHH:mm:ss.ffffzzz";
+
+        const string DATE_TIME_FORMAT_DATE_HHMMSSFFFFF = "yyyy-MM-ddTHH:mm:ss.fffff";
+        const string DATE_TIME_FORMAT_DATE_HHMMSSFFFFF_UTC = "yyyy-MM-ddTHH:mm:ss.fffffZ";
+        const string DATE_TIME_FORMAT_DATE_HHMMSSFFFFF_TIMEZONE = "yyyy-MM-ddTHH:mm:ss.fffffzzz";
+
+        const string DATE_TIME_FORMAT_DATE_HHMMSSFFFFFF = "yyyy-MM-ddTHH:mm:ss.ffffff";
+        const string DATE_TIME_FORMAT_DATE_HHMMSSFFFFFF_UTC = "yyyy-MM-ddTHH:mm:ss.ffffffZ";
+        const string DATE_TIME_FORMAT_DATE_HHMMSSFFFFFF_TIMEZONE = "yyyy-MM-ddTHH:mm:ss.ffffffzzz";
+
+        const string DATE_TIME_FORMAT_DATE_HHMMSSFFFFFFF = "yyyy-MM-ddTHH:mm:ss.fffffff";
+        const string DATE_TIME_FORMAT_DATE_HHMMSSFFFFFFF_UTC = "yyyy-MM-ddTHH:mm:ss.fffffffZ";
+        const string DATE_TIME_FORMAT_DATE_HHMMSSFFFFFFF_TIMEZONE = "yyyy-MM-ddTHH:mm:ss.fffffffzzz";
+
+        #endregion
+
         const int GUID_STRING_LENGTH = 36;

         /// <summary>
@@ -201,31 +232,72 @@
                 return false;

             var length = value.Length;
-            if (length == DATE_TIME_FORMAT_ROUNDTRIP_UTC.Length)
-                return DateTime.TryParseExact(value, DATE_TIME_FORMAT_ROUNDTRIP_UTC, null, DateTimeStyles.AdjustToUniversal, out dateValue);
-            else if (length == DATE_TIME_FORMAT_ROUNDTRIP_UTC.Length + 5)
-                return DateTime.TryParseExact(value, DATE_TIME_FORMAT_ROUNDTRIP_TIMEZONE, null, DateTimeStyles.AdjustToUniversal, out dateValue);
-            else if (length == DATE_TIME_FORMAT_DATE_ONLY.Length)
+            if (length == DATE_TIME_FORMAT_DATE_ONLY.Length)
                 return DateTime.TryParseExact(value, DATE_TIME_FORMAT_DATE_ONLY, null, DateTimeStyles.AssumeLocal, out dateValue);
+
             else if (length == DATE_TIME_FORMAT_DATE_HHMM.Length)
                 return DateTime.TryParseExact(value, DATE_TIME_FORMAT_DATE_HHMM, null, DateTimeStyles.AssumeLocal, out dateValue);
             else if (length == DATE_TIME_FORMAT_DATE_HHMM_UTC.Length)
                 return DateTime.TryParseExact(value, DATE_TIME_FORMAT_DATE_HHMM_UTC, null, DateTimeStyles.AdjustToUniversal, out dateValue);
             else if (length == DATE_TIME_FORMAT_DATE_HHMM_UTC.Length + 5)
                 return DateTime.TryParseExact(value, DATE_TIME_FORMAT_DATE_HHMM_TIMEZONE, null, DateTimeStyles.AdjustToUniversal, out dateValue);
+
             else if (length == DATE_TIME_FORMAT_DATE_HHMMSS.Length)
                 return DateTime.TryParseExact(value, DATE_TIME_FORMAT_DATE_HHMMSS, null, DateTimeStyles.AssumeLocal, out dateValue);
             else if (length == DATE_TIME_FORMAT_DATE_HHMMSS_UTC.Length)
                 return DateTime.TryParseExact(value, DATE_TIME_FORMAT_DATE_HHMMSS_UTC, null, DateTimeStyles.AdjustToUniversal, out dateValue);
             else if (length == DATE_TIME_FORMAT_DATE_HHMMSS_UTC.Length + 5)
                 return DateTime.TryParseExact(value, DATE_TIME_FORMAT_DATE_HHMMSS_TIMEZONE, null, DateTimeStyles.AdjustToUniversal, out dateValue);
+
+            else if (length == DATE_TIME_FORMAT_DATE_HHMMSSF.Length)
+                return DateTime.TryParseExact(value, DATE_TIME_FORMAT_DATE_HHMMSSF, null, DateTimeStyles.AssumeLocal, out dateValue);
+            else if (length == DATE_TIME_FORMAT_DATE_HHMMSSF_UTC.Length)
+                return DateTime.TryParseExact(value, DATE_TIME_FORMAT_DATE_HHMMSSF_UTC, null, DateTimeStyles.AdjustToUniversal, out dateValue);
+            else if (length == DATE_TIME_FORMAT_DATE_HHMMSSF_UTC.Length + 5)
+                return DateTime.TryParseExact(value, DATE_TIME_FORMAT_DATE_HHMMSSF_TIMEZONE, null, DateTimeStyles.AdjustToUniversal, out dateValue);
+
             else if (length == DATE_TIME_FORMAT_DATE_HHMMSSFF.Length)
                 return DateTime.TryParseExact(value, DATE_TIME_FORMAT_DATE_HHMMSSFF, null, DateTimeStyles.AssumeLocal, out dateValue);
             else if (length == DATE_TIME_FORMAT_DATE_HHMMSSFF_UTC.Length)
                 return DateTime.TryParseExact(value, DATE_TIME_FORMAT_DATE_HHMMSSFF_UTC, null, DateTimeStyles.AdjustToUniversal, out dateValue);
             else if (length == DATE_TIME_FORMAT_DATE_HHMMSSFF_UTC.Length + 5)
                 return DateTime.TryParseExact(value, DATE_TIME_FORMAT_DATE_HHMMSSFF_TIMEZONE, null, DateTimeStyles.AdjustToUniversal, out dateValue);
-
+
+            else if (length == DATE_TIME_FORMAT_DATE_HHMMSSFFF.Length)
+                return DateTime.TryParseExact(value, DATE_TIME_FORMAT_DATE_HHMMSSFFF, null, DateTimeStyles.AssumeLocal, out dateValue);
+            else if (length == DATE_TIME_FORMAT_DATE_HHMMSSFFF_UTC.Length)
+                return DateTime.TryParseExact(value, DATE_TIME_FORMAT_DATE_HHMMSSFFF_UTC, null, DateTimeStyles.AdjustToUniversal, out dateValue);
+            else if (length == DATE_TIME_FORMAT_DATE_HHMMSSFFF_UTC.Length + 5)
+                return DateTime.TryParseExact(value, DATE_TIME_FORMAT_DATE_HHMMSSFFF_TIMEZONE, null, DateTimeStyles.AdjustToUniversal, out dateValue);
+
+            else if (length == DATE_TIME_FORMAT_DATE_HHMMSSFFFF.Length)
+                return DateTime.TryParseExact(value, DATE_TIME_FORMAT_DATE_HHMMSSFFFF, null, DateTimeStyles.AssumeLocal, out dateValue);
+            else if (length == DATE_TIME_FORMAT_DATE_HHMMSSFFFF_UTC.Length)
+                return DateTime.TryParseExact(value, DATE_TIME_FORMAT_DATE_HHMMSSFFFF_UTC, null, DateTimeStyles.AdjustToUniversal, out dateValue);
+            else if (length == DATE_TIME_FORMAT_DATE_HHMMSSFFFF_UTC.Length + 5)
+                return DateTime.TryParseExact(value, DATE_TIME_FORMAT_DATE_HHMMSSFFFF_TIMEZONE, null, DateTimeStyles.AdjustToUniversal, out dateValue);
+
+            else if (length == DATE_TIME_FORMAT_DATE_HHMMSSFFFFF.Length)
+                return DateTime.TryParseExact(value, DATE_TIME_FORMAT_DATE_HHMMSSFFFFF, null, DateTimeStyles.AssumeLocal, out dateValue);
+            else if (length == DATE_TIME_FORMAT_DATE_HHMMSSFFFFF_UTC.Length)
+                return DateTime.TryParseExact(value, DATE_TIME_FORMAT_DATE_HHMMSSFFFFF_UTC, null, DateTimeStyles.AdjustToUniversal, out dateValue);
+            else if (length == DATE_TIME_FORMAT_DATE_HHMMSSFFFFF_UTC.Length + 5)
+                return DateTime.TryParseExact(value, DATE_TIME_FORMAT_DATE_HHMMSSFFFFF_TIMEZONE, null, DateTimeStyles.AdjustToUniversal, out dateValue);
+
+            else if (length == DATE_TIME_FORMAT_DATE_HHMMSSFFFFFF.Length)
+                return DateTime.TryParseExact(value, DATE_TIME_FORMAT_DATE_HHMMSSFFFFFF, null, DateTimeStyles.AssumeLocal, out dateValue);
+            else if (length == DATE_TIME_FORMAT_DATE_HHMMSSFFFFFF_UTC.Length)
+                return DateTime.TryParseExact(value, DATE_TIME_FORMAT_DATE_HHMMSSFFFFFF_UTC, null, DateTimeStyles.AdjustToUniversal, out dateValue);
+            else if (length == DATE_TIME_FORMAT_DATE_HHMMSSFFFFFF_UTC.Length + 5)
+                return DateTime.TryParseExact(value, DATE_TIME_FORMAT_DATE_HHMMSSFFFFFF_TIMEZONE, null, DateTimeStyles.AdjustToUniversal, out dateValue);
+
+            else if (length == DATE_TIME_FORMAT_DATE_HHMMSSFFFFFFF.Length)
+                return DateTime.TryParseExact(value, DATE_TIME_FORMAT_DATE_HHMMSSFFFFFFF, null, DateTimeStyles.AssumeLocal, out dateValue);
+            else if (length == DATE_TIME_FORMAT_DATE_HHMMSSFFFFFFF_UTC.Length)
+                return DateTime.TryParseExact(value, DATE_TIME_FORMAT_DATE_HHMMSSFFFFFFF_UTC, null, DateTimeStyles.AdjustToUniversal, out dateValue);
+            else if (length == DATE_TIME_FORMAT_DATE_HHMMSSFFFFFFF_UTC.Length + 5)
+                return DateTime.TryParseExact(value, DATE_TIME_FORMAT_DATE_HHMMSSFFFFFFF_TIMEZONE, null, DateTimeStyles.AdjustToUniversal, out dateValue);
+
             return false;
         }

@@ -240,18 +312,8 @@
         {
             var length = value.Length;

-            if (!(length == DATE_TIME_FORMAT_ROUNDTRIP_UTC.Length ||
-                  length == DATE_TIME_FORMAT_ROUNDTRIP_UTC.Length + 5 ||
-                  length == DATE_TIME_FORMAT_DATE_ONLY.Length ||
-                  length == DATE_TIME_FORMAT_DATE_HHMM.Length ||
-                  length == DATE_TIME_FORMAT_DATE_HHMM_UTC.Length ||
-                  length == DATE_TIME_FORMAT_DATE_HHMM_UTC.Length + 5 ||
-                  length == DATE_TIME_FORMAT_DATE_HHMMSS.Length ||
-                  length == DATE_TIME_FORMAT_DATE_HHMMSS_UTC.Length ||
-                  length == DATE_TIME_FORMAT_DATE_HHMMSS_UTC.Length + 5 ||
-                  length == DATE_TIME_FORMAT_DATE_HHMMSSFF.Length ||
-                  length == DATE_TIME_FORMAT_DATE_HHMMSSFF_UTC.Length ||
-                  length == DATE_TIME_FORMAT_DATE_HHMMSSFF_UTC.Length + 5
+            if (!(length >= DATE_TIME_FORMAT_DATE_ONLY.Length &&
+                  length == DATE_TIME_FORMAT_DATE_HHMMSSFFFFFFF_UTC.Length + 5
                ))
                 return false;

@@ -268,10 +330,16 @@
                )
                 return false;

-            if (length == DATE_TIME_FORMAT_ROUNDTRIP_UTC.Length ||
-                length == DATE_TIME_FORMAT_DATE_HHMM_UTC.Length ||
+            if (length == DATE_TIME_FORMAT_DATE_HHMM_UTC.Length ||
                 length == DATE_TIME_FORMAT_DATE_HHMMSS_UTC.Length ||
-                length == DATE_TIME_FORMAT_DATE_HHMMSSFF_UTC.Length)
+                length == DATE_TIME_FORMAT_DATE_HHMMSSF_UTC.Length ||
+                length == DATE_TIME_FORMAT_DATE_HHMMSSFF_UTC.Length ||
+                length == DATE_TIME_FORMAT_DATE_HHMMSSFFF_UTC.Length ||
+                length == DATE_TIME_FORMAT_DATE_HHMMSSFFFF_UTC.Length ||
+                length == DATE_TIME_FORMAT_DATE_HHMMSSFFFFF_UTC.Length ||
+                length == DATE_TIME_FORMAT_DATE_HHMMSSFFFFFF_UTC.Length ||
+                length == DATE_TIME_FORMAT_DATE_HHMMSSFFFFFFF_UTC.Length
+               )
             {
                 if (!value.EndsWith("Z", StringComparison.InvariantCulture))
                     return false;


First filter out unique files by size, avoiding to calculate SHA unnecessarily.

Fixes #15

--- FindDuplicateFilesUI/FindDuplicateFilesUI.cs
+++ FindDuplicateFilesUI/FindDuplicateFilesUI.cs
@@ -92,7 +92,7 @@

     private Dictionary<string, HashSet<string>> Scan(string root)
     {
-        string[] allFiles = GetFiles(root);
+        var allFiles = GetFiles(root);
         var filesByHash = FindDuplicateFiles(allFiles);
         return filesByHash;
     }
@@ -229,18 +229,19 @@
         }
     }

-    private static string[] GetFiles(string root)
+    private static FileInfo[] GetFiles(string root)
     {
         var pattern = "*.*";
-        var allFiles = Directory.GetFiles(root, pattern, SearchOption.AllDirectories);
+        var allFiles = new DirectoryInfo(root).GetFiles(pattern, SearchOption.AllDirectories);
         return allFiles;
     }

-    public static Dictionary<string, HashSet<string>> FindDuplicateFiles(string[] allFiles)
-    {
+    public static Dictionary<string, HashSet<string>> FindDuplicateFiles(FileInfo[] allFiles)
+    {
+        var candidates = ExcludeUniqueFilesBySize(allFiles);
+
         var filesByHash = new Dictionary<string, HashSet<string>>(StringComparer.OrdinalIgnoreCase);
-
-        Parallel.ForEach(allFiles, file =>
+        Parallel.ForEach(candidates, file =>
         {
             var hash = Utilities.SHA1Hash(file);

@@ -262,4 +263,31 @@

         return filesByHash;
     }
+
+    private static IEnumerable<string> ExcludeUniqueFilesBySize(IEnumerable<FileInfo> allFiles)
+    {
+        var filesBySize = new Dictionary<long, HashSet<string>>();
+
+        foreach (var file in allFiles)
+        {
+            if (!filesBySize.TryGetValue(file.Length, out var bucket))
+            {
+                bucket = new HashSet<string>();
+                filesBySize[file.Length] = bucket;
+            }
+
+            bucket.Add(file.FullName);
+        }
+
+        var result = new List<string>();
+        foreach (var kvp in filesBySize)
+        {
+            if (kvp.Value.Count > 1)
+            {
+                result.AddRange(kvp.Value);
+            }
+        }
+
+        return result;
+    }
 }


Updated default build identifier setting

--- FluentAutomation.SeleniumWebDriver/WbTstr.cs
+++ FluentAutomation.SeleniumWebDriver/WbTstr.cs
@@ -297,7 +297,7 @@
                 }
             }

-            string buildKey = ConfigReader.GetSetting("BuildKey");
+            string buildKey = ConfigReader.GetSetting("BuildResultKey");
             if (!String.IsNullOrWhiteSpace(buildKey))
             {
                 wbTstr.SetBrowserStackBuildIdentifier(buildKey);


Minor optimization in the drone selection

--- Google.HashCode.ConsoleApplication/Solver.cs
+++ Google.HashCode.ConsoleApplication/Solver.cs
@@ -5,6 +5,20 @@

 namespace Google.HashCode.ConsoleApplication
 {
+    internal struct Drone
+    {
+        public readonly Point CurrentPosition;
+        public readonly int DistanceTraveled;
+        public readonly int Id;
+
+        public Drone(Point currentPosition, int distanceTraveled, int id)
+        {
+            CurrentPosition = currentPosition;
+            DistanceTraveled = distanceTraveled;
+            Id = id;
+        }
+    }
+
     public class Solver
     {
         private readonly Program challenge;
@@ -131,48 +145,16 @@
         public IEnumerable<string> Solve()
         {
             var commands = new List<string>();
-            var droneList = new Dictionary<int, Tuple<int, Point>>();
-
+
+            // L'id du drone est le même que sa position dans la liste
+            var droneList = new List<Drone>();
             for (var i = 0; i < challenge.nbDrone; i++)
             {
-                droneList.Add(i, Tuple.Create(0, challenge.warehouses[0].Position));
-            }
-
-            foreach (var order in challenge.orders)
-            {
-                var droneId = droneList.OrderBy(i => i.Value.Item1).First();
-
-                var computedCommands = ComputeCommands(order, droneId.Key, droneId.Value.Item2).ToList();
-                commands.AddRange(computedCommands);
-
-                if (computedCommands.Any())
-                {
-                    order.Completed = true;
-
-                    droneList[droneId.Key] =
-                        Tuple.Create(
-                            droneId.Value.Item1 + ComputeDistanceTakenByCommands(computedCommands, droneId.Value.Item2),
-                            order.Destination);
-                }
-            }
-
-            foreach (var order in challenge.orders.Where(o => o.Completed == false))
-            {
-                var droneId = droneList.OrderBy(i => i.Value.Item1).First();
-
-                var computedCommands = ComputeCommands(order, droneId.Key, droneId.Value.Item2, 1).ToList();
-                commands.AddRange(computedCommands);
-
-                if (computedCommands.Any())
-                {
-                    order.Completed = true;
-
-                    droneList[droneId.Key] =
-                        Tuple.Create(
-                            droneId.Value.Item1 + ComputeDistanceTakenByCommands(computedCommands, droneId.Value.Item2),
-                            order.Destination);
-                }
-            }
+                droneList.Add(new Drone(challenge.warehouses[0].Position, 0, i));
+            }
+
+            commands.AddRange(ComputeRun(droneList, 0));
+            commands.AddRange(ComputeRun(droneList, 1));

             return commands;
         }
@@ -196,5 +178,33 @@

             return commands;
         }
+
+        private IEnumerable<string> ComputeRun(IList<Drone> droneList, int maxItemsInGroup)
+        {
+            var commands = new List<string>();
+            foreach (var order in challenge.orders.Where(o => o.Completed == false))
+            {
+                var droneId =
+                    droneList.OrderBy(i => i.DistanceTraveled + Program.CalculMove(i.CurrentPosition, order.Destination))
+                             .First();
+
+                var computedCommands =
+                    ComputeCommands(order, droneId.Id, droneId.CurrentPosition, maxItemsInGroup).ToList();
+                commands.AddRange(computedCommands);
+
+                if (computedCommands.Any())
+                {
+                    order.Completed = true;
+
+                    droneList[droneId.Id] = new Drone(order.Destination,
+                                                      droneId.DistanceTraveled +
+                                                      ComputeDistanceTakenByCommands(computedCommands,
+                                                                                droneId.CurrentPosition),
+                                                      droneId.Id);
+                }
+            }
+
+            return commands;
+        }
     }
 }


[REEF-1369] Remove obsolete RuntimeClock.RegisterObserver

JIRA:
  [REEF-1369](https://issues.apache.org/jira/browse/REEF-1369)

Pull request:
  This closes #1027

--- lang/cs/Org.Apache.REEF.Wake/Time/Runtime/RuntimeClock.cs
+++ lang/cs/Org.Apache.REEF.Wake/Time/Runtime/RuntimeClock.cs
@@ -162,21 +162,6 @@
         }

         /// <summary>
-        /// Register the IObserver for the particular Time event.
-        /// </summary>
-        /// <param name="observer">The handler to register</param>
-        [Obsolete("Will be removed in REEF 0.16")]
-        public void RegisterObserver<U>(IObserver<U> observer) where U : Time
-        {
-            if (_disposed)
-            {
-                return;
-            }
-
-            _handlers.Subscribe(observer);
-        }
-
-        /// <summary>
         /// Start the RuntimeClock.
         /// Clock will continue to run and handle events until it has been disposed.
         /// </summary>


Remove some GC Churn in the repeating worker

--- KerbalAlarmClock/WarpTransitionCalculator.cs
+++ KerbalAlarmClock/WarpTransitionCalculator.cs
@@ -98,7 +98,25 @@

         internal static Double UTToRateDown(int FromIndex, int ToIndex)
         {
-            return WarpRateTransitionPeriods.First(w => w.Index == FromIndex).UTTo1Times - WarpRateTransitionPeriods.First(w => w.Index == ToIndex).UTTo1Times;
+            //return WarpRateTransitionPeriods.First(w => w.Index == FromIndex).UTTo1Times - WarpRateTransitionPeriods.First(w => w.Index == ToIndex).UTTo1Times;
+
+            // 0 GC Usage version below
+            double returnValue = 0;
+            for (int i = 0, iRates = WarpRateTransitionPeriods.Count; i < iRates; i++)
+            {
+                if (WarpRateTransitionPeriods[i].Index == FromIndex)
+                {
+                    returnValue = WarpRateTransitionPeriods[i].UTTo1Times;
+                }
+            }
+            for (int i = 0, iRates = WarpRateTransitionPeriods.Count; i < iRates; i++)
+            {
+                if (WarpRateTransitionPeriods[i].Index == ToIndex)
+                {
+                    returnValue -= WarpRateTransitionPeriods[i].UTTo1Times;
+                }
+            }
+            return returnValue;
         }
         internal static Double UTToRateDownOne
         {


DavidBurns (.NET) Added mechanism to load extensions into a profile so that FireFox can use it

git-svn-id: 4179480af2c2519a5eb5e1e9b541cbdf5cf27696@9240 07704840-8298-11de-bf8c-fd130f914ac9

--- firefox/src/csharp/webdriver-firefox/FirefoxProfile.cs
+++ firefox/src/csharp/webdriver-firefox/FirefoxProfile.cs
@@ -155,19 +155,23 @@
             {
                 return;
             }
-
-            Assembly executingAssembly = Assembly.GetExecutingAssembly();
-            string currentDirectory = executingAssembly.Location;
-
-            // If we're shadow copying,. fiddle with
-            // the codebase instead
-            if (AppDomain.CurrentDomain.ShadowCopyFiles)
-            {
-                Uri uri = new Uri(executingAssembly.CodeBase);
-                currentDirectory = uri.LocalPath;
-            }
-
-            InstallExtension();
+
+            AddExtension(ExtensionFileName);
+        }
+
+        /// <summary>
+        /// Adds a Firefox Extension to this profile
+        /// </summary>
+        /// <param name="extensionToInstall">The path to the new extension</param>
+        public void AddExtension(string extensionToInstall)
+        {
+            if (!File.Exists(extensionToInstall))
+            {
+                throw new WebDriverException("The Extension that you wish to install is not available");
+            }
+
+            FileInfo extension = new FileInfo(extensionToInstall);
+            InstallExtension(extension);
         }

         /// <summary>
@@ -426,16 +430,24 @@
             return id;
         }

-        private void InstallExtension()
-        {
-            string tempFileName = Path.Combine(Path.GetTempPath(), "webdriver");
+        private void InstallExtension(FileInfo extension)
+        {
+            string fileName = extension.Name;
+            Console.WriteLine(fileName.ToString());
+            string tempFileName = Path.Combine(Path.GetTempPath(), fileName );
             if (Directory.Exists(tempFileName))
             {
                 Directory.Delete(tempFileName, true);
             }
-
             Directory.CreateDirectory(tempFileName);
-            Stream zipFileStream = ResourceUtilities.GetResourceStream(ExtensionFileName, ExtensionResourceId);
+
+            string resourceID = string.Empty;
+            if (fileName == ExtensionFileName)
+            {
+                resourceID = ExtensionResourceId;
+            }
+
+            Stream zipFileStream = ResourceUtilities.GetResourceStream(fileName, resourceID);
             using (ZipFile extensionZipFile = ZipFile.Read(zipFileStream))
             {
                 extensionZipFile.ExtractExistingFile = ExtractExistingFileAction.OverwriteSilently;


Documentation 1.0

Documentation 1.0

--- LinkIt.Samples/SlightlyMoreComplexExample.cs
+++ LinkIt.Samples/SlightlyMoreComplexExample.cs
@@ -26,13 +26,13 @@
                     linkedSource => linkedSource.MultimediaContent,
                     link => link.Type,
                     includes => includes
+                        .Include<MediaLinkedSource>().AsNestedLinkedSourceById(
+                            "media",
+                            link => (int)link.Id
+                        )
                         .Include<Image>().AsReferenceById(
                             "image",
                             link => (string)link.Id
-                        )
-                        .Include<MediaLinkedSource>().AsNestedLinkedSourceById(
-                            "media",
-                            link => (int)link.Id
                         )
                 );

@@ -71,11 +71,11 @@
                 Author = new Author{
                     Name = "author-name-101",
                     Email = "author-email-101",
-                    ImageId = "distinc-id-loaded-once",
+                    ImageId = "distinc-id-loaded-once", //same entity referenced twice
                 },
                 MultimediaContentRef = new MultimediaContentReference{
                     Type = "image",
-                    Id = "distinc-id-loaded-once"
+                    Id = "distinc-id-loaded-once" //same entity referenced twice
                 },
                 TagIds = new List<int>{
                     1001,


assert if control not found in SetWindowChromeResizeGripDirection

--- MahApps.Metro/Controls/MetroWindowHelpers.cs
+++ MahApps.Metro/Controls/MetroWindowHelpers.cs
@@ -20,15 +20,19 @@
         /// </summary>
         /// <param name="window">The MetroWindow.</param>
         /// <param name="name">The name of the template child.</param>
-        public static void SetIsHitTestVisibleInChromeProperty<T>([NotNull] this MetroWindow window, string name) where T : class
+        /// <param name="hitTestVisible"></param>
+        public static void SetIsHitTestVisibleInChromeProperty<T>([NotNull] this MetroWindow window, string name, bool hitTestVisible = true) where T : class
         {
             if (window == null)
             {
                 throw new ArgumentNullException(nameof(window));
             }
-            var elementPart = window.GetPart<T>(name) as IInputElement;
-            Debug.Assert(elementPart != null, $"{name} is not a IInputElement");
-            WindowChrome.SetIsHitTestVisibleInChrome(elementPart, true);
+            var inputElement = window.GetPart<T>(name) as IInputElement;
+            Debug.Assert(inputElement != null, $"{name} is not a IInputElement");
+            if (WindowChrome.GetIsHitTestVisibleInChrome(inputElement) != hitTestVisible)
+            {
+                WindowChrome.SetIsHitTestVisibleInChrome(inputElement, hitTestVisible);
+            }
         }

         /// <summary>
@@ -37,14 +41,15 @@
         /// <param name="window">The MetroWindow.</param>
         /// <param name="name">The name of the template child.</param>
         /// <param name="direction">The direction.</param>
-        public static void SetWindowChromeResizeGripDirection(this MetroWindow window, string name, ResizeGripDirection direction)
+        public static void SetWindowChromeResizeGripDirection([NotNull] this MetroWindow window, string name, ResizeGripDirection direction)
         {
             if (window == null)
             {
-                return;
+                throw new ArgumentNullException(nameof(window));
             }
             var inputElement = window.GetPart(name) as IInputElement;
-            if (inputElement != null)
+            Debug.Assert(inputElement != null, $"{name} is not a IInputElement");
+            if (WindowChrome.GetResizeGripDirection(inputElement) != direction)
             {
                 WindowChrome.SetResizeGripDirection(inputElement, direction);
             }


Obsoleting RasterizingProvider, use RasterizingLayer instread

--- Mapsui.Rendering.Xaml/RasterizingProvider.cs
+++ Mapsui.Rendering.Xaml/RasterizingProvider.cs
@@ -1,3 +1,4 @@
+using System;
 using System.Collections.Generic;
 using System.Threading;
 using System.Windows.Controls;
@@ -11,6 +12,8 @@
     /// <summary>
     /// Wrapper around a feature provider that returns a rasterized image of the features.
     /// </summary>
+    ///
+    [Obsolete("Use RasterizingLayer as an alternative approach")]
     public class RasterizingProvider : IProvider
     {
         private readonly object _syncLock = new object();


Appveyor - bumping patch number for successful build

--- MediaComplete.Lib/Properties/AssemblyInfo.cs
+++ MediaComplete.Lib/Properties/AssemblyInfo.cs
@@ -35,7 +35,7 @@
 //
 // 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.9")]
+// [assembly: AssemblyVersion("1.0.10")]

-[assembly: AssemblyVersion("1.0.9")]
-[assembly: AssemblyFileVersion("1.0.9")]+[assembly: AssemblyVersion("1.0.10")]
+[assembly: AssemblyFileVersion("1.0.10")]


Fix incorrect profiler environment variable name for .NET framework support

--- Mindscape.Raygun4Net/ProfilingSupport/APM.cs
+++ Mindscape.Raygun4Net/ProfilingSupport/APM.cs
@@ -38,7 +38,7 @@
         // Look for .NET FRAMEWORK compatible Environment Variables
         return
           Environment.GetEnvironmentVariable("COR_PROFILER") == "{e2338988-38cc-48cd-a6b6-b441c31f34f1}" &&
-          Environment.GetEnvironmentVariable("COR_PROFILER") == "1";
+          Environment.GetEnvironmentVariable("COR_ENABLE_PROFILING") == "1";
 #endif
       }
     }


Fixed indexing error.

Fixed indexing error.

--- Models/Models/Evolution/ChangeTransaction.cs
+++ Models/Models/Evolution/ChangeTransaction.cs
@@ -45,7 +45,7 @@
         public void Invert(IModelRepository repository)
         {
             //assumes nestedchanges is ordered like a flattened tree of changes
-            for (var i = NestedChanges.Count; i >= 0; i--)
+            for (var i = NestedChanges.Count - 1; i >= 0; i--)
                 NestedChanges[i].Invert(repository);
             SourceChange.Invert(repository);
         }


Added styling for select.

Added styling for select.

--- MvcForms/Styles/Bootstrap/Bootstrap3Style.cs
+++ MvcForms/Styles/Bootstrap/Bootstrap3Style.cs
@@ -12,6 +12,7 @@
             RegisterInterface<IRenderedFormGroupLayout>((c, t) => FormButtonsStyler((IRenderedFormGroupLayout)c, t));
             RegisterInterface<IRenderedErrorSummary>((c, t) => ErrorSummaryStyler((IRenderedErrorSummary)c, t));
             Register<Input>((c, t) => InputStyler((Input)c, t));
+            Register<Select>((c, t) => SelectStyler((Select)c, t));
         }

         public virtual HtmlTag FormStyler(IForm form, HtmlTag tag)
@@ -72,5 +73,10 @@
                 ? tag.AddClasses("form-control")
                 : tag;
         }
+
+        public virtual HtmlTag SelectStyler(Select select, HtmlTag tag)
+        {
+            return tag.AddClasses("form-control");
+        }
     }
 }


Improve client kit logging.

Improve client kit logging.

--- OSVR-Unity/Assets/OSVRUnity/src/ClientKit.cs
+++ OSVR-Unity/Assets/OSVRUnity/src/ClientKit.cs
@@ -59,7 +59,7 @@
                         Debug.LogError("OSVR ClientKit instance needs AppID set to a reverse-order DNS name! Using dummy name...");
                         AppID = "org.opengoggles.osvr-unity.dummy";
                     }
-                    Debug.Log("Starting OSVR with app ID: " + AppID);
+                    Debug.Log("[OSVR] Starting with app ID: " + AppID);
                     contextObject = new OSVR.ClientKit.ClientContext(AppID, 0);
                 }
             }


Added reference to VREye for a VRSurface, added Camera requirement to VRSurface.

--- OSVR-Unity/Assets/OSVRUnity/src/VRSurface.cs
+++ OSVR-Unity/Assets/OSVRUnity/src/VRSurface.cs
@@ -29,12 +29,17 @@
     namespace Unity
     {
         //This class is responsible for rendering for a VREye.
+        [RequireComponent(typeof(Camera))]
         public class VRSurface : MonoBehaviour
         {
             private Camera _camera;
             private K1RadialDistortion _distortionEffect;
+            private uint _surfaceIndex; //index in the eye's VRSurface array
+            private VREye _eye; //the eye that this surface controls rendering for

             public Camera Camera { get { return _camera; } set { _camera = value; } }
+            public uint SurfaceIndex { get { return _surfaceIndex; } set { _surfaceIndex = value; } }
+            public VREye Eye { get { return _eye; } set { _eye = value; } }

             [HideInInspector]
             public K1RadialDistortion DistortionEffect


Failing test for #35 [skip ci]

Failing test for #35 [skip ci]

--- Csv.Tests/Tests.cs
+++ Csv.Tests/Tests.cs
@@ -558,5 +558,27 @@
             Assert.AreEqual("D", lines[0][1].AsString());
             Assert.AreEqual("D", lines[0]["B"].AsString());
         }
+
+        [TestMethod]
+        [Ignore] // Needs to be fixed for https://github.com/stevehansen/csv/issues/35
+        public void BackslashBeforeQuote()
+        {
+            //"A";"B";"C"
+            //"A """;"B \"" ";"C"
+            var withSpace = CsvReader.ReadFromText("\"A\";\"B\";\"C\"\n\"A \"\"\";\"B \\\"\" \";\"C\"", new CsvOptions { AllowNewLineInEnclosedFieldValues = true, AllowBackSlashToEscapeQuote = false, AllowSingleQuoteToEncloseFieldValues = false }).ToArray();
+            Assert.AreEqual(1, withSpace.Length);
+            Assert.AreEqual(3, withSpace[0].Headers.Length);
+            Assert.AreEqual("A \"", withSpace[0][0]);
+            Assert.AreEqual("B \\\" ", withSpace[0][1]);
+            Assert.AreEqual("C", withSpace[0][2]);
+            //"A";"B";"C"
+            //"A """;"B \""";"C"
+            var withoutSpace = CsvReader.ReadFromText("\"A\";\"B\";\"C\"\n\"A \"\"\";\"B \\\"\"\";\"C\"", new CsvOptions { AllowNewLineInEnclosedFieldValues = true, AllowBackSlashToEscapeQuote = false, AllowSingleQuoteToEncloseFieldValues = false }).ToArray();
+            Assert.AreEqual(1, withoutSpace.Length);
+            Assert.AreEqual(3, withoutSpace[0].Headers.Length);
+            Assert.AreEqual("A \"", withoutSpace[0][0]);
+            Assert.AreEqual("B \\\"", withoutSpace[0][1]);
+            Assert.AreEqual("C", withoutSpace[0][2]);
+        }
     }
 }


added FrameTimer instance as a parameter

--- GameOverlay/Utilities/FrameTimer.cs
+++ GameOverlay/Utilities/FrameTimer.cs
@@ -43,7 +43,7 @@
         ///
         /// </summary>
         /// <param name="device">The device.</param>
-        public delegate void FrameStageNotifyEventHandler(D2DDevice device);
+        public delegate void FrameStageNotifyEventHandler(FrameTimer timer, D2DDevice device);

         /// <summary>
         /// Occurs when [frame starting].
@@ -198,9 +198,9 @@
         {
             if (Device == null) throw new InvalidOperationException("Renderer is null");

-            FrameStarting?.Invoke(Device);
-            OnFrame?.Invoke(Device);
-            FrameEnding?.Invoke(Device);
+            FrameStarting?.Invoke(this, Device);
+            OnFrame?.Invoke(this, Device);
+            FrameEnding?.Invoke(this, Device);
         }

         private void CreateThread()


renamed events

renamed events

--- GameOverlay/Utilities/FrameTimer.cs
+++ GameOverlay/Utilities/FrameTimer.cs
@@ -99,7 +99,7 @@
         /// <summary>
         ///     Occurs when [frame starting].
         /// </summary>
-        public event FrameStageNotifyEventHandler FrameStarting;
+        public event FrameStageNotifyEventHandler OnFrameStarting;

         /// <summary>
         ///     Occurs when [on frame].
@@ -109,7 +109,7 @@
         /// <summary>
         ///     Occurs when [frame ending].
         /// </summary>
-        public event FrameStageNotifyEventHandler FrameEnding;
+        public event FrameStageNotifyEventHandler OnFrameEnding;

         /// <summary>
         ///     Finalizes an instance of the <see cref="FrameTimer" /> class.
@@ -199,9 +199,9 @@
         {
             if (Device == null) throw new InvalidOperationException("Renderer is null");

-            FrameStarting?.Invoke(this, Device);
+            OnFrameStarting?.Invoke(this, Device);
             OnFrame?.Invoke(this, Device);
-            FrameEnding?.Invoke(this, Device);
+            OnFrameEnding?.Invoke(this, Device);
         }

         private void CreateThread()
@@ -255,9 +255,9 @@

             Device = null;

-            FrameStarting = null;
+            OnFrameStarting = null;
             OnFrame = null;
-            FrameEnding = null;
+            OnFrameEnding = null;

             if (_thread != null && !_exitTimerThread) ExitThread();


Tighten up GetWorkspace.

Tighten up GetWorkspace.

--- GitTfs.VsCommon/TfsHelper.Common.cs
+++ GitTfs.VsCommon/TfsHelper.Common.cs
@@ -217,23 +217,17 @@

         private Workspace GetWorkspace(string localDirectory, string repositoryPath)
         {
-            Workspace workspace = null;
+            var workspace = VersionControl.CreateWorkspace(GenerateWorkspaceName());
             try
             {
-                workspace = VersionControl.CreateWorkspace(GenerateWorkspaceName());
                 workspace.CreateMapping(new WorkingFolder(repositoryPath, localDirectory));
-                return workspace;
-            }
-            catch (MappingConflictException e)
-            {
-                if (workspace != null) workspace.Delete();
-                throw new GitTfsException(e.Message, new[] { "Run 'git tfs cleanup-workspaces' to remove the workspace." }, e);
             }
             catch
             {
-                if (workspace != null) workspace.Delete();
+                workspace.Delete();
                 throw;
             }
+            return workspace;
         }

         private string GenerateWorkspaceName()


Update Logger.cs

Update Logger.cs

--- Grabacr07.KanColleWrapper/Logger.cs
+++ Grabacr07.KanColleWrapper/Logger.cs
@@ -27,7 +27,7 @@
 		// ReSharper disable once AssignNullToNotNullAttribute
 		public static string LogFolder = Path.Combine(Path.GetDirectoryName(Assembly.GetEntryAssembly().Location), "Logs");

-	    public enum LogType
+		public enum LogType
 		{
 			BuildItem,
 			BuildShip,
@@ -35,12 +35,12 @@
 			Materials
 		};

-	    public struct LogTypeInfo
+		public struct LogTypeInfo
 		{
 			public string Parameters;
-            public string FileName;
-
-            public LogTypeInfo(string parameters, string fileName)
+			public string FileName;
+
+			public LogTypeInfo(string parameters, string fileName)
 			{
 				this.Parameters = parameters;
 				this.FileName = fileName;
@@ -214,9 +214,7 @@

 			using (var w = File.AppendText(logPath))
 			{
-				w.Write(DateTime.Now.ToString(this.LogTimestampFormat) + ",");
-				args.ForEach(arg => w.Write(arg + ","));
-                w.WriteLine();
+				w.WriteLine(DateTime.Now.ToString(this.LogTimestampFormat) + "," + string.Join(",", args));
 			}
 		}


HR-334

HR-334

Removed Anual Salary text


hotfix: hide "select plan" on plans list to prevent enrollment

Signed-off-by: Robert Miller <64b64a51786336772bca0ed57f04b1a9aadb9916@door3.com>

--- HRI/Views/Partials/PlansList.cshtml
+++ HRI/Views/Partials/PlansList.cshtml
@@ -59,8 +59,9 @@

                                                     @plan.MetalTier

                                                     @*This will allow the user to hide enrollment buttons based on the checkbox in the Home Page under Extra Settings*@
-
-                                                        @using (Html.BeginUmbracoForm<ComparePlansSurfaceController>("SelectPlan", new {}, new { @class = "selectplan", @style = "@displayStatus"}))
+                                                    @if(!Convert.ToBoolean(Umbraco.ContentAtRoot().First().GetPropertyValue("preventEnrollment")))
+                                                    {
+                                                        using (Html.BeginUmbracoForm<ComparePlansSurfaceController>("SelectPlan", new {}, new { @class = "selectplan", @style = "@displayStatus"}))
                                                         {
                                                             @Html.AntiForgeryToken()
                                                             @Html.Hidden("ZipCode", Model.ZipCode)
@@ -68,7 +69,7 @@
                                                             @Html.Hidden("PlanPrice", plan.Price)
                                                             <input class="btn btn-small hri-btn" type="submit" value="Select Plan">
                                                         }
-
+                                                    }

                                             }


Fixed problem where too many onClick listeners would be created

--- Haunt/Assets/Scripts/GameManager.cs
+++ Haunt/Assets/Scripts/GameManager.cs
@@ -73,10 +73,12 @@
 		if (hasWon) {
 			endText.GetComponent<Text> ().text = "You win!";
 			progressButton.GetComponentInChildren<Text> ().text = "Next Level";
+			progressButton.GetComponent<Button> ().onClick.RemoveListener (NextLevel);
 			progressButton.GetComponent<Button> ().onClick.AddListener (NextLevel);
 		} else if (hasLost){
 			endText.GetComponent<Text> ().text = "You lose!";
 			progressButton.GetComponentInChildren<Text> ().text = "Restart Level";
+			progressButton.GetComponent<Button> ().onClick.RemoveListener (RestartLevel);
 			progressButton.GetComponent<Button> ().onClick.AddListener (RestartLevel);
 		}
 	}


MediaElement is no longer abstract

MediaElement is no longer abstract

--- HiP-DataStore.Model/Entity/Media.cs
+++ HiP-DataStore.Model/Entity/Media.cs
@@ -1,6 +1,6 @@
 namespace PaderbornUniversity.SILab.Hip.DataStore.Model.Entity
 {
-    public abstract class MediaElement : ContentBase
+    public class MediaElement : ContentBase
     {
         public const string CollectionName = "media";


Fill the entire InternationalSystemDecode table

--- kh.kh2/Messages/Internals/InternationalSystemDecode.cs
+++ kh.kh2/Messages/Internals/InternationalSystemDecode.cs
@@ -92,8 +92,12 @@
                 [0x51] = x => new TextCmdModel(';'),
                 [0x52] = x => new TextCmdModel(':'),
                 [0x53] = x => new TextCmdModel('-'),
+                [0x54] = null,
+                [0x55] = null,
                 [0x56] = x => new TextCmdModel('〜'),
                 [0x57] = x => new TextCmdModel('\''),
+                [0x58] = null,
+                [0x59] = null,
                 [0x5a] = x => new TextCmdModel('('),
                 [0x5b] = x => new TextCmdModel(')'),
                 [0x5c] = x => new TextCmdModel('「'),
@@ -108,9 +112,17 @@
                 [0x65] = x => new TextCmdModel('>'),
                 [0x66] = x => new TextCmdModel('-'),
                 [0x67] = x => new TextCmdModel('–'),
+                [0x68] = null,
                 [0x69] = x => new TextCmdModel('♪'),
+                [0x6a] = null,
+                [0x6b] = null,
                 [0x6c] = x => new TextCmdModel('◯'),
                 [0x6d] = x => new TextCmdModel('✕'),
+                [0x6e] = null,
+                [0x6f] = null,
+                [0x70] = null,
+                [0x71] = null,
+                [0x72] = null,
                 [0x73] = x => new TextCmdModel('\t'),
                 [0x74] = x => new TextCmdModel('Ⅰ'),
                 [0x75] = x => new TextCmdModel('Ⅱ'),
@@ -133,6 +145,13 @@
                 [0x86] = x => new TextCmdModel('&'),
                 [0x87] = x => new TextCmdModel('#'),
                 [0x88] = x => new TextCmdModel('®'),
+                [0x89] = null,
+                [0x8a] = null,
+                [0x8b] = null,
+                [0x8c] = null,
+                [0x8d] = null,
+                [0x8e] = null,
+                [0x8f] = null,
                 [0x90] = x => new TextCmdModel('0'),
                 [0x91] = x => new TextCmdModel('1'),
                 [0x92] = x => new TextCmdModel('2'),
@@ -169,10 +188,82 @@
                 [0xb1] = x => new TextCmdModel('x'),
                 [0xb2] = x => new TextCmdModel('y'),
                 [0xb3] = x => new TextCmdModel('z'),
+                [0xb4] = null,
+                [0xb5] = null,
+                [0xb6] = null,
+                [0xb7] = null,
+                [0xb8] = null,
+                [0xb9] = null,
+                [0xba] = null,
+                [0xbb] = null,
+                [0xbc] = null,
+                [0xbd] = null,
+                [0xbe] = null,
+                [0xbf] = null,
+                [0xc0] = null,
+                [0xc1] = null,
+                [0xc2] = null,
+                [0xc3] = null,
+                [0xc4] = null,
+                [0xc5] = null,
+                [0xc6] = null,
+                [0xc7] = null,
+                [0xc8] = null,
+                [0xc9] = null,
+                [0xca] = null,
+                [0xcb] = null,
+                [0xcc] = null,
+                [0xcd] = null,
+                [0xce] = null,
+                [0xcf] = null,
+                [0xd0] = null,
+                [0xd1] = null,
+                [0xd2] = null,
+                [0xd3] = null,
+                [0xd4] = null,
+                [0xd5] = null,
+                [0xd6] = null,
+                [0xd7] = null,
+                [0xd8] = null,
+                [0xd9] = null,
+                [0xda] = null,
+                [0xdb] = null,
+                [0xdc] = null,
+                [0xdd] = null,
+                [0xde] = null,
+                [0xdf] = null,
+                [0xe0] = null,
+                [0xe1] = null,
+                [0xe2] = null,
+                [0xe3] = null,
+                [0xe4] = null,
+                [0xe5] = null,
+                [0xe6] = null,
+                [0xe7] = null,
+                [0xe8] = null,
+                [0xe9] = null,
+                [0xea] = null,
                 [0xeb] = x => new TextCmdModel('‘'),
                 [0xec] = x => new TextCmdModel('’'),
+                [0xed] = null,
                 [0xee] = x => new TextCmdModel('\''),
+                [0xef] = null,
                 [0xf0] = x => new TextCmdModel('☆'),
+                [0xf1] = null,
+                [0xf2] = null,
+                [0xf3] = null,
+                [0xf4] = null,
+                [0xf5] = null,
+                [0xf6] = null,
+                [0xf7] = null,
+                [0xf8] = null,
+                [0xf9] = null,
+                [0xfa] = null,
+                [0xfb] = null,
+                [0xfc] = null,
+                [0xfd] = null,
+                [0xfe] = null,
+                [0xff] = null,
             };

         public List<MessageCommandModel> Decode(byte[] data) =>


Circumvent framework bug in ThumbnailExtractor.FromImage.

--- ImageListView/ThumbnailExtractor.cs
+++ ImageListView/ThumbnailExtractor.cs
@@ -68,10 +68,11 @@
                 {
                     stream = new MemoryStream();

-                    image.Save(stream, ImageFormat.MemoryBmp);
+                    image.Save(stream, ImageFormat.Bmp);
                     // Performance vs image quality settings.
                     // Selecting BitmapCacheOption.None speeds up thumbnail generation of large images tremendously
                     // if the file contains no embedded thumbnail. The image quality is only slightly worse.
+                    stream.Seek(0, SeekOrigin.Begin);
                     frameWpf = BitmapFrame.Create(stream,
                         BitmapCreateOptions.IgnoreColorProfile,
                         BitmapCacheOption.None);
@@ -681,24 +682,29 @@
         {
             try
             {
-                PropertyItem prop = img.GetPropertyItem(TagOrientation);
-                ushort orientationFlag = BitConverter.ToUInt16(prop.Value, 0);
-                if (orientationFlag == 1)
-                    return 0;
-                else if (orientationFlag == 2)
-                    return -360;
-                else if (orientationFlag == 3)
-                    return 180;
-                else if (orientationFlag == 4)
-                    return -180;
-                else if (orientationFlag == 5)
-                    return -90;
-                else if (orientationFlag == 6)
-                    return 90;
-                else if (orientationFlag == 7)
-                    return -270;
-                else if (orientationFlag == 8)
-                    return 270;
+                foreach (PropertyItem prop in img.PropertyItems)
+                {
+                    if (prop.Id == TagOrientation)
+                    {
+                        ushort orientationFlag = BitConverter.ToUInt16(prop.Value, 0);
+                        if (orientationFlag == 1)
+                            return 0;
+                        else if (orientationFlag == 2)
+                            return -360;
+                        else if (orientationFlag == 3)
+                            return 180;
+                        else if (orientationFlag == 4)
+                            return -180;
+                        else if (orientationFlag == 5)
+                            return -90;
+                        else if (orientationFlag == 6)
+                            return 90;
+                        else if (orientationFlag == 7)
+                            return -270;
+                        else if (orientationFlag == 8)
+                            return 270;
+                    }
+                }
             }
             catch
             {


Skip xUnit tests not yet ported to OS X

Skip xUnit tests not yet ported to OS X

--- test/csharp/test_CorePsPlatform.cs
+++ test/csharp/test_CorePsPlatform.cs
@@ -80,7 +80,7 @@
             }
         }

-        [Fact]
+        [Fact(Skip="Bad arguments for OS X")]
         public static void TestGetMachineName()
         {
             var startInfo = new ProcessStartInfo
@@ -103,7 +103,7 @@
             }
         }

-        [Fact]
+        [Fact(Skip="Bad arguments for OS X")]
         public static void TestGetFQDN()
         {
             var startInfo = new ProcessStartInfo
@@ -126,7 +126,7 @@
             }
         }

-        [Fact]
+        [Fact(Skip="Bad arguments for OS X")]
         public static void TestGetDomainName()
         {
             var startInfo = new ProcessStartInfo


Fix xUnit tests

Fix xUnit tests

--- test/csharp/test_CorePsPlatform.cs
+++ test/csharp/test_CorePsPlatform.cs
@@ -12,7 +12,19 @@
         [Fact]
         public static void TestIsLinux()
         {
-            Assert.True(Platform.IsLinux());
+            Assert.True(Platform.IsLinux);
+        }
+
+        [Fact]
+        public static void TestIsWindows()
+        {
+            Assert.False(Platform.IsWindows);
+        }
+
+        [Fact]
+        public static void TestIsCore()
+        {
+            Assert.True(Platform.IsCore);
         }

         [Fact]


git-svn-id: https://jumony.svn.codeplex.com/svn/trunk@63393 2327b42d-5241-43d6-9e2a-de5ac946f064

--- Ivony.Html.Web/HtmlBindingModule.cs
+++ Ivony.Html.Web/HtmlBindingModule.cs
@@ -5,6 +5,7 @@
 using System.Web;
 using Ivony.Fluent;
 using System.IO;
+using System.Diagnostics;

 namespace Ivony.Html.Binding
 {
@@ -108,7 +109,7 @@

       if ( !File.Exists( physicalPath ) )
       {
-        HttpContext.Current.Trace.Warn( "Core", string.Format( "在 \"{0}\" 找不到样式表文件", physicalPath ) );
+        Trace.TraceWarning( "Core", string.Format( "在 \"{0}\" 找不到样式表文件", physicalPath ) );
         return null;
       }


Fix for compiler crash when target not found during tunnel onwards

--- compiler/ParsedHierarchy/TunnelOnwards.cs
+++ compiler/ParsedHierarchy/TunnelOnwards.cs
@@ -75,7 +75,7 @@
         {
             base.ResolveReferences (context);

-            if (divertAfter)
+            if (divertAfter && divertAfter.targetContent)
                 _overrideDivertTarget.targetPath = divertAfter.targetContent.runtimePath;
         }


Don't crash on spinners

Don't crash on spinners

--- osu.Game.Rulesets.Catch/Beatmaps/CatchBeatmapConverter.cs
+++ osu.Game.Rulesets.Catch/Beatmaps/CatchBeatmapConverter.cs
@@ -18,10 +18,8 @@

         protected override IEnumerable<CatchBaseHit> ConvertHitObject(HitObject obj, Beatmap beatmap)
         {
-            /*var distanceData = obj as IHasDistance;
-            var repeatsData = obj as IHasRepeats;
-            var endTimeData = obj as IHasEndTime;
-            var curveData = obj as IHasCurve;*/
+            if (!(obj is IHasXPosition))
+                yield break;

             yield return new Fruit
             {


Fix incorrect sort param

Fix incorrect sort param

--- osu.Game/Online/Multiplayer/IndexPlaylistScoresRequest.cs
+++ osu.Game/Online/Multiplayer/IndexPlaylistScoresRequest.cs
@@ -35,11 +35,11 @@
             switch (sort)
             {
                 case MultiplayerScoresSort.Ascending:
-                    req.AddParameter("sort", "scores_asc");
+                    req.AddParameter("sort", "score_asc");
                     break;

                 case MultiplayerScoresSort.Descending:
-                    req.AddParameter("sort", "scores_desc");
+                    req.AddParameter("sort", "score_desc");
                     break;
             }


Add ability to lock the `WaveformComparison` display to a current location

--- osu.Game/Screens/Edit/Timing/WaveformComparisonDisplay.cs
+++ osu.Game/Screens/Edit/Timing/WaveformComparisonDisplay.cs
@@ -14,6 +14,7 @@
 using osu.Framework.Input.Events;
 using osu.Game.Beatmaps;
 using osu.Game.Beatmaps.ControlPoints;
+using osu.Game.Graphics;
 using osu.Game.Graphics.Sprites;
 using osu.Game.Graphics.UserInterfaceV2;
 using osu.Game.Overlays;
@@ -26,6 +27,8 @@
     {
         private const int total_waveforms = 8;

+        private const float corner_radius = LabelledDrawable<Drawable>.CORNER_RADIUS;
+
         private readonly BindableNumber<double> beatLength = new BindableDouble();

         [Resolved]
@@ -49,11 +52,18 @@

         private readonly IBindableList<ControlPointGroup> controlPointGroups = new BindableList<ControlPointGroup>();

+        private readonly BindableBool displayLocked = new BindableBool();
+
+        private LockedOverlay lockedOverlay = null!;
+
+        [Resolved]
+        private OsuColour colours { get; set; } = null!;
+
         public WaveformComparisonDisplay()
         {
             RelativeSizeAxes = Axes.Both;

-            CornerRadius = LabelledDrawable<Drawable>.CORNER_RADIUS;
+            CornerRadius = corner_radius;
             Masking = true;
         }

@@ -81,12 +91,19 @@
                 Width = 3,
             });

+            AddInternal(lockedOverlay = new LockedOverlay());
+
             selectedGroup.BindValueChanged(_ => updateTimingGroup(), true);

             controlPointGroups.BindTo(editorBeatmap.ControlPointInfo.Groups);
             controlPointGroups.BindCollectionChanged((_, __) => updateTimingGroup());

             beatLength.BindValueChanged(_ => showFrom(lastDisplayedBeatIndex), true);
+
+            displayLocked.BindValueChanged(locked =>
+            {
+                lockedOverlay.FadeTo(locked.NewValue ? 1 : 0, 200, Easing.OutQuint);
+            }, true);
         }

         private void updateTimingGroup()
@@ -130,6 +147,12 @@
             return base.OnMouseMove(e);
         }

+        protected override bool OnClick(ClickEvent e)
+        {
+            displayLocked.Toggle();
+            return true;
+        }
+
         protected override void Update()
         {
             base.Update();
@@ -145,6 +168,9 @@
         private void showFrom(int beatIndex)
         {
             if (lastDisplayedBeatIndex == beatIndex)
+                return;
+
+            if (displayLocked.Value)
                 return;

             // Chosen as a pretty usable number across all BPMs.
@@ -173,6 +199,64 @@
             }

             lastDisplayedBeatIndex = beatIndex;
+        }
+
+        internal class LockedOverlay : CompositeDrawable
+        {
+            private OsuSpriteText text = null!;
+
+            [BackgroundDependencyLoader]
+            private void load(OsuColour colours)
+            {
+                RelativeSizeAxes = Axes.Both;
+                Masking = true;
+                CornerRadius = corner_radius;
+                BorderColour = colours.Red;
+                BorderThickness = 3;
+                Alpha = 0;
+
+                InternalChildren = new Drawable[]
+                {
+                    new Box
+                    {
+                        AlwaysPresent = true,
+                        RelativeSizeAxes = Axes.Both,
+                        Alpha = 0,
+                    },
+                    new Container
+                    {
+                        Anchor = Anchor.TopRight,
+                        Origin = Anchor.TopRight,
+                        AutoSizeAxes = Axes.Both,
+                        Children = new Drawable[]
+                        {
+                            new Box
+                            {
+                                Colour = colours.Red,
+                                RelativeSizeAxes = Axes.Both,
+                            },
+                            text = new OsuSpriteText
+                            {
+                                Colour = colours.GrayF,
+                                Text = "Locked",
+                                Margin = new MarginPadding(5),
+                                Shadow = false,
+                                Font = OsuFont.Default.With(size: 12, weight: FontWeight.SemiBold),
+                            }
+                        }
+                    },
+                };
+            }
+
+            protected override void LoadComplete()
+            {
+                base.LoadComplete();
+
+                text
+                    .FadeIn().Then().Delay(500)
+                    .FadeOut().Then().Delay(500)
+                    .Loop();
+            }
         }

         internal class WaveformRow : CompositeDrawable


Use UTF8 instead of ASCII decoding for heartbeats

--- Lidgren.Network/NetPeer.Internal.cs
+++ Lidgren.Network/NetPeer.Internal.cs
@@ -446,7 +446,7 @@
 				if (m_upnp != null && now < m_upnp.m_discoveryResponseDeadline && bytesReceived > 32)
 				{
 					// is this an UPnP response?
-					string resp = System.Text.Encoding.ASCII.GetString(m_receiveBuffer, 0, bytesReceived);
+					string resp = System.Text.Encoding.UTF8.GetString(m_receiveBuffer, 0, bytesReceived);
 					if (resp.Contains("upnp:rootdevice") || resp.Contains("UPnP/1.0"))
 					{
 						try
@@ -745,4 +745,4 @@
 			return m_readHelperMessage;
 		}
 	}
-}+}


Soporte para AuthenticatedAttribute en ClientModule

--- LinkupSharp/Modules/ClientModule.cs
+++ LinkupSharp/Modules/ClientModule.cs
@@ -27,8 +27,10 @@
 */
 #endregion License

+using LinkupSharp.Security.Authentication;
 using System;
 using System.Collections.Generic;
+using System.Linq;

 namespace LinkupSharp.Modules
 {
@@ -43,8 +45,12 @@
         {
             foreach (var handler in PacketHandlers)
                 if (packet.Is(handler.Item1))
-                    if (handler.Item2(packet, client))
-                        return true;
+                {
+                    var attributes = handler.Item2.Method.GetCustomAttributes(typeof(AuthenticatedAttribute), true);
+                    if ((!attributes.Any()) || (client.Session != null))
+                        if (handler.Item2(packet, client))
+                            return true;
+                }
             return false;
         }


fixed race condition in message stream where the old stream wasn't stopped on multiple session:sets

--- Mage/MessageStream/MessageStream.cs
+++ Mage/MessageStream/MessageStream.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
 using System.Collections.Generic;
 using System.Text;

@@ -39,34 +39,43 @@

 		//
-		private void InitializeMessageList()
-		{
+		private void Initialize()
+		{
+			// Stop the transport client if it exists
+			if (transportClient != null)
+			{
+				transportClient.Stop();
+			}
+
+			// Reset the session key
+			sessionKey = null;
+
+			// Initialize the message queue
 			currentMessageId = -1;
 			largestMessageId = -1;
 			messageQueue = new Dictionary<int, JToken>();
 			confirmIds = new List<string>();

-			Logger.Debug("Initialized message queue");
+			Logger.Debug("(Re)Initialized message queue");
 		}

 		// Constructor
 		public MessageStream(TransportType transport = TransportType.LONGPOLLING)
 		{
-			//
-			InitializeMessageList();
-
 			// Start transport client when session is acquired
 			Mage.EventManager.On("session.set", (sender, session) => {
+				// Make sure we re-initialize between multiple session sets to prevent stale requests
+				Initialize();
+
+				// Setup key and start stream
 				sessionKey = UnityEngine.WWW.EscapeURL(session["key"].ToString());
 				transportClient.Start();
 			});

 			// Stop the message client when session is lost
 			Mage.EventManager.On("session.unset", (sender, reason) => {
-				transportClient.Stop();
-				InitializeMessageList();
-				sessionKey = null;
+				Initialize();
 			});

 			// Also stop the message client when the application is stopped
@@ -74,9 +83,7 @@
 			UnityEditorPlayMode.OnEditorModeChanged += newState => {
 				if (newState == EditorPlayModeState.Stopped)
 				{
-					transportClient.Stop();
-					InitializeMessageList();
-					sessionKey = null;
+					Initialize();
 				}
 				if (newState == EditorPlayModeState.Paused && transportClient.running)
 				{
@@ -108,14 +115,7 @@
 		//
 		public void Dispose()
 		{
-			// Stop the transport client if it exists
-			if (transportClient != null)
-			{
-				transportClient.Stop();
-			}
-
-			InitializeMessageList();
-			sessionKey = null;
+			Initialize();
 		}


Updated AssemblyInfo for next minor release

--- MbDotNet/Properties/AssemblyInfo.cs
+++ MbDotNet/Properties/AssemblyInfo.cs
@@ -32,5 +32,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.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]+[assembly: AssemblyVersion("1.1.0.0")]
+[assembly: AssemblyFileVersion("1.1.0.0")]


bug with AddRange

bug with AddRange

was calling it's self

--- MdxClient/MdxParameterCollection.cs
+++ MdxClient/MdxParameterCollection.cs
@@ -59,7 +59,10 @@
         /// <param name="values">An array of values of type MdxParameter to add to the collection.</param>
         public void AddRange(MdxParameter[] values)
         {
-            AddRange(values);
+            if (null != values)
+            {
+                _items.AddRange(values);
+            }
         }

         /// <summary>
@@ -70,10 +73,7 @@
         {
             if (null != values)
             {
-                foreach (object item in values)
-                {
-                    Add(item);
-                }
+                _items.AddRange(values);
             }
         }


Now with some style!

Now with some style!

--- sample/localtheme/_theme/_Layout.cshtml
+++ sample/localtheme/_theme/_Layout.cshtml
@@ -3,8 +3,34 @@

     <meta charset="utf-8">
     <title>@ViewBag.Title</title>
+
+
+    <link href="http://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
+
+    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.98.2/css/materialize.min.css">
+
+
+    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>

-    @RenderBody()
+
+

+            cloud@ViewBag.Title
+

+
search

+
view_module

+
refresh

+
more_vert

+

+

+
+
+

+        @RenderBody()
+

+
+
+
+


Better encapsulation of TryLoadController

--- MonoCross.Navigation/MXContainer.cs
+++ MonoCross.Navigation/MXContainer.cs
@@ -297,47 +297,58 @@

         private static void InternalNavigate(IMXView fromView, string url, Dictionary<string, string> parameters)
         {
-            MXContainer container = Instance;   // optimization for the server size, property reference is a hashed lookup
+            MXContainer container = Instance; // optimization for the server side; property reference is a hashed lookup

             // fetch and allocate a viable controller
-            IMXController controller = container.GetController(url, ref parameters);
-            // Initiate load for the associated controller passing all parameters
+            var controller = container.GetController(url, ref parameters);
             if (controller != null)
             {
-                container.OnControllerLoadBegin(controller, fromView);
-
-                container.CancelLoad = false;
-
-                // synchronize load layer to prevent collisions on web-based targets.
-                lock (container)
-                {
-                    // Console.WriteLine("InternalNavigate: Locked");
-
-                    // if there is no synchronization, don't launch a new thread
-                    if (container.ThreadedLoad)
+                // Initiate load for the associated controller passing all parameters
+                TryLoadController(container, fromView, controller, parameters);
+            }
+        }
+
+        /// <summary>
+        /// Tries to execute the Load method of the specified controller using eventing.
+        /// </summary>
+        /// <param name="container">The container that loads the controller.</param>
+        /// <param name="fromView">The view that activated the navigation.</param>
+        /// <param name="controller">The controller to load.</param>
+        /// <param name="parameters">The parameters to use with the controller's Load method.</param>
+        protected static void TryLoadController(MXContainer container, IMXView fromView, IMXController controller, Dictionary<string, string> parameters)
+        {
+            container.OnControllerLoadBegin(controller, fromView);
+            container.CancelLoad = false;
+
+            // synchronize load layer to prevent collisions on web-based targets.
+            lock (container)
+            {
+                // Console.WriteLine("InternalNavigate: Locked");
+
+                var load = new WaitCallback(o =>
+                {
+                    try
                     {
-                        // new thread to execute the Load() method for the layer
-                        ThreadPool.QueueUserWorkItem(o => TryLoadController(container, fromView, controller, parameters));
+                        container.LoadController(fromView, controller, parameters);
                     }
-                    else
+                    catch (Exception ex)
                     {
-                        TryLoadController(container, fromView, controller, parameters);
+                        container.OnControllerLoadFailed(controller, ex);
                     }
-
-                    // Console.WriteLine("InternalNavigate: Unlocking");
-                }
-            }
-        }
-
-        protected static void TryLoadController(MXContainer container, IMXView fromView, IMXController controller, Dictionary<string, string> parameters)
-        {
-            try
-            {
-                container.LoadController(fromView, controller, parameters);
-            }
-            catch (Exception ex)
-            {
-                container.OnControllerLoadFailed(controller, ex);
+                });
+
+                // if there is no synchronization, don't launch a new thread
+                if (container.ThreadedLoad)
+                {
+                    // new thread to execute the Load() method for the layer
+                    ThreadPool.QueueUserWorkItem(load);
+                }
+                else
+                {
+                    load(null);
+                }
+
+                // Console.WriteLine("InternalNavigate: Unlocking");
             }
         }


fix GetTotalBytes

fix GetTotalBytes

--- NBitcoin.Indexer/ProgressTracker.cs
+++ NBitcoin.Indexer/ProgressTracker.cs
@@ -69,10 +69,22 @@
 					continue;
 				if(fileIndex > range.End.File)
 					continue;
+
+				if(fileIndex == range.End.File && fileIndex == range.Begin.File)
+				{
+					var up = Math.Min(file.Length, range.End.Position);
+					sum += up - range.Begin.Position;
+					continue;
+				}
 				if(fileIndex == range.End.File)
 				{
 					sum += Math.Min(file.Length, range.End.Position);
-					break;
+					continue;
+				}
+				if(fileIndex == range.Begin.File)
+				{
+					sum += file.Length - range.Begin.Position;
+					continue;
 				}
 				sum += file.Length;
 			}


'1.0.263'

--- Node.Net/Properties/AssemblyInfo.cs
+++ Node.Net/Properties/AssemblyInfo.cs
@@ -35,5 +35,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.262")]
-[assembly: AssemblyFileVersion("1.0.262")]
+[assembly: AssemblyVersion("1.0.263")]
+[assembly: AssemblyFileVersion("1.0.263")]


img works.

img works.

--- Nubot/Scripts/GoogleImagesModule.cs
+++ Nubot/Scripts/GoogleImagesModule.cs
@@ -1,4 +1,6 @@
-using System.Net.Http;
+using System;
+using System.Collections.Generic;
+using System.Net.Http;
 using Newtonsoft.Json.Linq;
 using Nubot.Adapters;

@@ -8,33 +10,23 @@
     {
         public GoogleImagesModule()
         {
-            Respond["(image|img)( me)? (.*)"] = ImageMe;
+            const string api = "http://ajax.googleapis.com/ajax/services/search/images?v=1.0&rsz=8&safe=active&";
+
+            Respond["(image|img)( me)? (.*)"] = (msg, text) => msg.Send(SearchGoogleForImage(msg, string.Format("{0}q={1}", api, text)));
+            Respond["animate( me)? (.*)"] = (msg, text) => msg.Send(SearchGoogleForImage(msg, string.Format("imgtype=animated&{0}q={1}", api, text)));
         }

-        public void ImageMe(IMessageChannel msg, string text)
+        public string SearchGoogleForImage(IMessageChannel msg, string imageUri)
         {
-            /*
-                  cb = animated if typeof animated == 'function'
-                  cb = faces if typeof faces == 'function'
-                  q = v: '1.0', rsz: '8', q: query, safe: 'active'
-                  q.imgtype = 'animated' if typeof animated is 'boolean' and animated is true
-                  q.imgtype = 'face' if typeof faces is 'boolean' and faces is true
-                  msg.http('http://ajax.googleapis.com/ajax/services/search/images')
-                    .query(q)
-                    .get() (err, res, body) ->
-                      images = JSON.parse(body)
-                      images = images.responseData?.results
-                      if images?.length > 0
-                        image  = msg.random images
-                        cb "#{image.unescapedUrl}#.png"
-             */
-
             var client = new HttpClient();
-            var response = client.GetAsync(string.Format("http://ajax.googleapis.com/ajax/services/search/images?v=1.0&rsz=8&safe=active&q={0}", "cheese")).Result;
+            var response = client.GetAsync(imageUri).Result;
             var body = response.Content.ReadAsStringAsync().Result;

             dynamic json = JObject.Parse(body);
-            msg.Send(json.responseData.results[0].unescapedUrl.Value);
+            var randomImageId = new Random().Next(0, json.responseData.results.ToObject<List<dynamic>>().Count);
+            var image = json.responseData.results[randomImageId];
+
+            return image.unescapedUrl.Value.ToString();
         }
     }
 }